diff --git a/src/configd/configd.tproj/notify_server.h b/src/configd/EventFactory/EventFactory.h similarity index 68% rename from src/configd/configd.tproj/notify_server.h rename to src/configd/EventFactory/EventFactory.h index f1b46ec18..3fdbb6e52 100644 --- a/src/configd/configd.tproj/notify_server.h +++ b/src/configd/EventFactory/EventFactory.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001 Apple Computer, Inc. All rights reserved. + * Copyright (c) 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,30 +17,19 @@ * 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 * - * June 1, 2001 Allan Nathanson - * - public API conversion - * - * March 24, 2000 Allan Nathanson + * November 15, 2017 Allan Nathanson * - initial revision */ -#ifndef _S_NOTIFY_SERVER_H -#define _S_NOTIFY_SERVER_H - -#include -#include - -__BEGIN_DECLS - -boolean_t notify_server (mach_msg_header_t *request, mach_msg_header_t *reply); +#import -__END_DECLS +@interface EventFactory : EFEventFactory -#endif /* !_S_NOTIFY_SERVER_H */ +@end diff --git a/src/configd/EventFactory/EventFactory.m b/src/configd/EventFactory/EventFactory.m new file mode 100644 index 000000000..d1eb8e680 --- /dev/null +++ b/src/configd/EventFactory/EventFactory.m @@ -0,0 +1,127 @@ +/* + * Copyright (c) 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, + * 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 + * + * November 15, 2017 Allan Nathanson + * - initial revision + */ + +#import +#import "EventFactory.h" +#import "SCLogParser.h" +#import "InterfaceNamerParser.h" +#import "IPMonitorParser.h" +#import "KernelEventMonitorParser.h" +#import "PreferencesMonitorParser.h" +#import "StateDumpParser.h" +#import "IPConfigurationParser.h" + +#pragma mark - +#pragma mark Logging + +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; +} + +#pragma mark - +#pragma mark SystemConfiguratioin Network Event Factory + +@interface EventFactory () +@property NSDictionary *parserMap; +@end + +@implementation EventFactory + +- (void)startWithLogSourceAttributes:(__unused NSDictionary *)attributes +{ + NSMutableDictionary *newParserMap = [[NSMutableDictionary alloc] init]; + SCLogParser *parser; + + parser = [[InterfaceNamerParser alloc] init]; + newParserMap[parser.category] = parser; + + parser = [[IPConfigurationParser alloc] init]; + newParserMap[parser.category] = parser; + + parser = [[IPMonitorParser alloc] init]; + newParserMap[parser.category] = parser; + + parser = [[KernelEventMonitorParser alloc] init]; + newParserMap[parser.category] = parser; + + parser = [[PreferencesMonitorParser alloc] init]; + newParserMap[parser.category] = parser; + + parser = [[StateDumpParser alloc] init]; + newParserMap[parser.category] = parser; + + _parserMap = [[NSDictionary alloc] initWithDictionary:newParserMap]; +} + +- (void)handleLogEvent:(EFLogEvent *)logEvent completionHandler:(void (^)(NSArray * _Nullable))completionHandler +{ + NSString *category = nil; + if ([logEvent.eventType isEqualToString:@"stateEvent"]) { + category = @"StateDump"; + logEvent.subsystem = @"com.apple.SystemConfiguration"; + logEvent.category = category; + } else if ([logEvent.subsystem isEqualToString:@"com.apple.IPConfiguration"]) { + logEvent.category = @"IPConfiguration"; + } + + if (logEvent.category.length == 0) { + specs_log_debug("Skipped message without a category: %@", logEvent.eventMessage); + completionHandler(nil); + return; + } + + SCLogParser *parser = _parserMap[logEvent.category]; + if (parser == nil) { + specs_log_debug("Skipped message with an unknown category (%@): %@", logEvent.category, logEvent.eventMessage); + completionHandler(nil); + return; + } + + NSArray *completeEvents = [parser.eventParser parseLogEventIntoMultipleEvents:logEvent]; + completionHandler(completeEvents); +} + +- (void)finishWithCompletionHandler:(void (^)(NSArray * _Nullable))completionHandler +{ + specs_log_notice("Event factory is finishing"); + completionHandler(nil); +} + +@end + + diff --git a/src/configd/EventFactory/IPConfigurationParser.h b/src/configd/EventFactory/IPConfigurationParser.h new file mode 100644 index 000000000..0dc0a2833 --- /dev/null +++ b/src/configd/EventFactory/IPConfigurationParser.h @@ -0,0 +1,27 @@ +/* + * 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@ + */ + +#import "SCLogParser.h" + +@interface IPConfigurationParser : SCLogParser +@end diff --git a/src/configd/EventFactory/IPConfigurationParser.m b/src/configd/EventFactory/IPConfigurationParser.m new file mode 100644 index 000000000..32717a915 --- /dev/null +++ b/src/configd/EventFactory/IPConfigurationParser.m @@ -0,0 +1,105 @@ +/* + * 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@ + */ + +#import +#import +#import "IPConfigurationParser.h" + +#define TokenLinkStatus "linkStatus" +#define TokenSSID "ssid" +#define TokenMessage "message" +#define TokenAddress "address" +#define TokenComponentName "component" + +@implementation IPConfigurationParser + +- (instancetype)init +{ + NSArray *matches = @[ + [[EFLogEventMatch alloc] initWithPattern:@"(?<"TokenInterfaceName">\\w+) link (?<"TokenLinkStatus">ACTIVE|INACTIVE)" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + NSString *statusString = [logEvent substringForCaptureGroup:@TokenLinkStatus inMatchResult:matchResult]; + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + if ([statusString isEqualToString:@"ACTIVE"]) { + newEvent.link = @"link up"; + } else { + newEvent.link = @"link down"; + } + *isComplete = YES; + return newEvent; + }], + [[EFLogEventMatch alloc] initWithPattern:@"(?<"TokenInterfaceName">\\w+): SSID (?<"TokenSSID">\\S+) BSSID" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + NSString *ssid = [logEvent substringForCaptureGroup:@TokenSSID inMatchResult:matchResult]; + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + EFSubEvent *subEvent = [[EFSubEvent alloc] initWithTimestamp:logEvent.date textDescription:ssid]; + [newEvent addSubEvent:subEvent]; + *isComplete = YES; + return newEvent; + }], + [[EFLogEventMatch alloc] initWithPattern:@"\\[(?<"TokenComponentName">\\w+ )?(?<"TokenInterfaceName">\\w+)\\] (?<"TokenMessage">(?:Transmit|Receive) \\d+ byte packet xid \\w+ (?:to|from) .*)" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + NSString *message = [logEvent substringForCaptureGroup:@TokenMessage inMatchResult:matchResult]; + NSString *component = [logEvent substringForCaptureGroup:@TokenComponentName inMatchResult:matchResult]; + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + NSString *description = [[NSString alloc] initWithFormat:@"%@ %@", component, message]; + EFSubEvent *subEvent = [[EFSubEvent alloc] initWithTimestamp:logEvent.date textDescription:description]; + [newEvent addSubEvent:subEvent]; + *isComplete = YES; + return newEvent; + }], + [[EFLogEventMatch alloc] initWithPattern:@"\\w+ (?<"TokenInterfaceName">\\w+): setting (?<"TokenAddress">\\S+) netmask \\S+ broadcast \\S+" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + *isComplete = YES; + NSString *addressString = [logEvent substringForCaptureGroup:@TokenAddress inMatchResult:matchResult]; + if (addressString.length > 0) { + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + [self addAddress:addressString toInterfaceEvent:newEvent]; + return newEvent; + } + return nil; + }], + [[EFLogEventMatch alloc] initWithPattern:@"\\w+ (?<"TokenInterfaceName">\\w+): removing (?<"TokenAddress">.+)" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + *isComplete = YES; + NSString *addressString = [logEvent substringForCaptureGroup:@TokenAddress inMatchResult:matchResult]; + if (addressString.length > 0) { + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + if ([self removeAddress:addressString fromInterfaceEvent:newEvent]) { + return newEvent; + } + } + return nil; + }] + ]; + + EFLogEventParser *parser = [[EFLogEventParser alloc] initWithMatches:matches]; + return [super initWithCategory:@"IPConfiguration" eventParser:parser]; +} + +@end diff --git a/src/configd/EventFactory/IPMonitorParser.h b/src/configd/EventFactory/IPMonitorParser.h new file mode 100644 index 000000000..4a3121087 --- /dev/null +++ b/src/configd/EventFactory/IPMonitorParser.h @@ -0,0 +1,27 @@ +/* + * 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@ + */ + +#import "SCLogParser.h" + +@interface IPMonitorParser: SCLogParser +@end diff --git a/src/configd/EventFactory/IPMonitorParser.m b/src/configd/EventFactory/IPMonitorParser.m new file mode 100644 index 000000000..ecc1151a3 --- /dev/null +++ b/src/configd/EventFactory/IPMonitorParser.m @@ -0,0 +1,148 @@ +/* + * 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@ + */ + +#import +#import + +#import "IPMonitorParser.h" + +#define TokenInterfaceNameV6 "interfaceNameV6" +#define TokenAddressAction "addressAction" +#define TokenAddressAction6 "addressAction6" +#define TokenAddress "address" +#define TokenAddress6 "address6" +#define TokenServiceID "serviceID" +#define TokenV4Changes "v4Changes" +#define TokenV6Changes "v6Changes" + +@interface IPMonitorParser () +@property (readonly, nonatomic) NSRegularExpression *netChangeRegex; +@end + +@implementation IPMonitorParser + +- (instancetype)init +{ + NSError *regexError = nil; + _netChangeRegex = [[NSRegularExpression alloc] initWithPattern:@"(?<"TokenInterfaceName">\\w+)(?<"TokenAddressAction">[\\+\\-\\!\\/\\\\]?)(:(?<"TokenAddress">[:.0-9a-f]+))?" options:0 error:®exError]; + if (_netChangeRegex == nil) { + specs_log_err("Failed to create the network change regex: %@", regexError); + return nil; + } + + NSArray *matches = @[ + [[EFLogEventMatch alloc] initWithPattern:@"\\d+. (?<"TokenInterfaceName">\\w+) serviceID=(?<"TokenServiceID">[-\\w]+) addr=(?<"TokenAddress">) rank=\\w+" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + *isComplete = YES; + EFNetworkControlPathEvent *newEvent = nil; + NSString *serviceID = [logEvent substringForCaptureGroup:@TokenServiceID inMatchResult:matchResult]; + NSString *addressString = [logEvent substringForCaptureGroup:@TokenAddress inMatchResult:matchResult]; + if (serviceID != nil && addressString != nil) { + newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + if (newEvent != nil) { + newEvent.serviceID = serviceID; + [self addAddress:addressString toInterfaceEvent:newEvent]; + } + } + return newEvent; + }], + [[EFLogEventMatch alloc] initWithPattern:@"network changed:( v4\\((?<"TokenV4Changes">[^\\)]+)\\))?( v6\\((?<"TokenV6Changes">[^\\)]+)\\))?" + multipleNewEventHandler: + ^NSArray *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent) { + NSMutableDictionary *newEventsMap = nil; + NSArray *tokens = @[ @TokenV4Changes, @TokenV6Changes ]; + for (NSString *token in tokens) { + BOOL isIPv4 = [token isEqualToString:@TokenV4Changes]; + NSString *changes = [logEvent substringForCaptureGroup:token inMatchResult:matchResult]; + if (changes == nil) { + continue; + } + NSArray *matches = [self.netChangeRegex matchesInString:changes options:0 range:NSMakeRange(0, changes.length)]; + BOOL isPrimary = YES; + for (NSTextCheckingResult *match in matches) { + NSString *interfaceName = [self substringOfString:changes forCaptureGroup:@TokenInterfaceName inMatchResult:match]; + NSString *addressAction = [self substringOfString:changes forCaptureGroup:@TokenAddressAction inMatchResult:match]; + NSString *address = [self substringOfString:changes forCaptureGroup:@TokenAddress inMatchResult:match]; + + if (interfaceName == nil || address.length == 0) { + continue; + } + + EFNetworkControlPathEvent *event = newEventsMap[interfaceName]; + if (event == nil) { + event = [self createInterfaceEventWithLogEvent:logEvent interfaceName:interfaceName]; + if (newEventsMap == nil) { + newEventsMap = [[NSMutableDictionary alloc] init]; + } + newEventsMap[interfaceName] = event; + } + + if (addressAction.length > 0 && [addressAction isEqualToString:@"-"]) { + if (isPrimary) { + if (isIPv4) { + event.primaryStateIPv4 = EFPrimaryStateNotPrimary; + } else { + event.primaryStateIPv6 = EFPrimaryStateNotPrimary; + } + } + [self removeAddress:address fromInterfaceEvent:event]; + } else { + if (isPrimary) { + if (isIPv4) { + event.primaryStateIPv4 = EFPrimaryStatePrimary; + } else { + event.primaryStateIPv6 = EFPrimaryStatePrimary; + } + for (NSString *otherInterfaceName in SCLogParser.interfaceMap) { + if ([otherInterfaceName isEqualToString:interfaceName]) { + continue; + } + EFNetworkControlPathEvent *otherEvent = newEventsMap[otherInterfaceName]; + if (otherEvent == nil) { + otherEvent = [self createInterfaceEventWithLogEvent:logEvent interfaceName:otherInterfaceName]; + if (newEventsMap == nil) { + newEventsMap = [[NSMutableDictionary alloc] init]; + } + newEventsMap[otherInterfaceName] = otherEvent; + } + if (isIPv4) { + otherEvent.primaryStateIPv4 = EFPrimaryStateNotPrimary; + } else { + otherEvent.primaryStateIPv6 = EFPrimaryStateNotPrimary; + } + } + isPrimary = NO; + } + [self addAddress:address toInterfaceEvent:event]; + } + } + } + return newEventsMap.allValues; + }], + ]; + EFLogEventParser *parser = [[EFLogEventParser alloc] initWithMatches:matches]; + return [super initWithCategory:@"IPMonitor" eventParser:parser]; +} + +@end diff --git a/src/configd/EventFactory/Info.plist b/src/configd/EventFactory/Info.plist new file mode 100644 index 000000000..b76c32914 --- /dev/null +++ b/src/configd/EventFactory/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.19 + CFBundleVersion + 1 + NSPrincipalClass + EventFactory + LogEventPredicate + subsystem == "com.apple.SystemConfiguration" || (processImagePath contains "configd" && eventType == "stateEvent") || subsystem == "com.apple.IPConfiguration" + + diff --git a/src/configd/EventFactory/InterfaceNamerParser.h b/src/configd/EventFactory/InterfaceNamerParser.h new file mode 100644 index 000000000..ae15bafc4 --- /dev/null +++ b/src/configd/EventFactory/InterfaceNamerParser.h @@ -0,0 +1,27 @@ +/* + * 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@ + */ + +#import "SCLogParser.h" + +@interface InterfaceNamerParser: SCLogParser +@end diff --git a/src/configd/EventFactory/InterfaceNamerParser.m b/src/configd/EventFactory/InterfaceNamerParser.m new file mode 100644 index 000000000..d68b6c73a --- /dev/null +++ b/src/configd/EventFactory/InterfaceNamerParser.m @@ -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@ + */ + +#import +#import + +#import "InterfaceNamerParser.h" + +@implementation InterfaceNamerParser + +- (instancetype)init +{ + NSArray *matches = @[]; + EFLogEventParser *parser = [[EFLogEventParser alloc] initWithMatches:matches]; + return [super initWithCategory:@"InterfaceNamer" eventParser:parser]; +} + +@end diff --git a/src/configd/EventFactory/KernelEventMonitorParser.h b/src/configd/EventFactory/KernelEventMonitorParser.h new file mode 100644 index 000000000..7fa79ca0b --- /dev/null +++ b/src/configd/EventFactory/KernelEventMonitorParser.h @@ -0,0 +1,28 @@ +/* + * 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@ + */ + +#import "SCLogParser.h" + +@interface KernelEventMonitorParser: SCLogParser +@end + diff --git a/src/configd/EventFactory/KernelEventMonitorParser.m b/src/configd/EventFactory/KernelEventMonitorParser.m new file mode 100644 index 000000000..3b856a5b0 --- /dev/null +++ b/src/configd/EventFactory/KernelEventMonitorParser.m @@ -0,0 +1,91 @@ +/* + * 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@ + */ + +#import +#import + +#import "KernelEventMonitorParser.h" + +#define TokenStatus "status" +#define TokenLinkStatus "linkStatus" +#define TokenLinkQuality "linkQuality" + +@implementation KernelEventMonitorParser + +- (instancetype)init +{ + NSArray *matches = @[ + [[EFLogEventMatch alloc] initWithPattern:@"Process interface (?<"TokenStatus">attach|detach): (?<"TokenInterfaceName">\\w+)" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + *isComplete = YES; + EFNetworkControlPathEvent *newEvent = nil; + NSString *statusString = [logEvent substringForCaptureGroup:@TokenStatus inMatchResult:matchResult]; + if (statusString != nil) { + newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + if (newEvent != nil) { + newEvent.interfaceStatus = statusString; + } + } + return newEvent; + }], + [[EFLogEventMatch alloc] initWithPattern:@"Process interface link (?<"TokenLinkStatus">down|up): (?<"TokenInterfaceName">\\w+)" + newEventHandler: + ^EFEvent *(NSTextCheckingResult *matchResult, EFLogEvent *logEvent, BOOL *isComplete) { + *isComplete = YES; + EFNetworkControlPathEvent *newEvent = nil; + NSString *linkStatusString = [logEvent substringForCaptureGroup:@TokenLinkStatus inMatchResult:matchResult]; + if (linkStatusString != nil) { + newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + if (newEvent != nil) { + if ([linkStatusString isEqualToString:@"up"]) { + newEvent.link = @"link up"; + } else if ([linkStatusString isEqualToString:@"down"]) { + newEvent.link = @"link down"; + } else { + newEvent.link = linkStatusString; + } + } + } + return newEvent; + }], + [[EFLogEventMatch alloc] initWithPattern:@"Process interface quality: (?<"TokenInterfaceName">\\w+) \\(q=(?<"TokenLinkQuality">[-\\d]+)\\)" + newEventHandler: + ^EFEvent * _Nullable(NSTextCheckingResult * _Nonnull matchResult, EFLogEvent * _Nonnull logEvent, BOOL * _Nonnull isComplete) { + *isComplete = YES; + EFNetworkControlPathEvent *newEvent = nil; + NSString *qualityString = [logEvent substringForCaptureGroup:@TokenLinkQuality inMatchResult:matchResult]; + if (qualityString != nil) { + newEvent = [self createInterfaceEventWithLogEvent:logEvent matchResult:matchResult]; + if (newEvent != nil) { + newEvent.linkQuality = qualityString.integerValue; + } + } + return newEvent; + }], + ]; + EFLogEventParser *parser = [[EFLogEventParser alloc] initWithMatches:matches]; + return [super initWithCategory:@"KernelEventMonitor" eventParser:parser]; +} + +@end diff --git a/src/configd/EventFactory/PreferencesMonitorParser.h b/src/configd/EventFactory/PreferencesMonitorParser.h new file mode 100644 index 000000000..bd4205db7 --- /dev/null +++ b/src/configd/EventFactory/PreferencesMonitorParser.h @@ -0,0 +1,27 @@ +/* + * 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@ + */ + +#import "SCLogParser.h" + +@interface PreferencesMonitorParser: SCLogParser +@end diff --git a/src/configd/EventFactory/PreferencesMonitorParser.m b/src/configd/EventFactory/PreferencesMonitorParser.m new file mode 100644 index 000000000..8b10acd45 --- /dev/null +++ b/src/configd/EventFactory/PreferencesMonitorParser.m @@ -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@ + */ + +#import +#import + +#import "PreferencesMonitorParser.h" + +@implementation PreferencesMonitorParser + +- (instancetype)init +{ + NSArray *matches = @[]; + EFLogEventParser *parser = [[EFLogEventParser alloc] initWithMatches:matches]; + return [super initWithCategory:@"PreferencesMonitor" eventParser:parser]; +} + +@end diff --git a/src/configd/EventFactory/SCLogParser.h b/src/configd/EventFactory/SCLogParser.h new file mode 100644 index 000000000..099def95b --- /dev/null +++ b/src/configd/EventFactory/SCLogParser.h @@ -0,0 +1,50 @@ +/* + * 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@ + */ + +#import + +@class EFLogEventParser; + +os_log_t __log_Spectacles(void); +#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__) + +#define TokenInterfaceName "ifname" + +@interface SCLogParser: NSObject +- (instancetype)initWithCategory:(NSString *)category eventParser:(EFLogEventParser *)eventParser; +- (NSData *)createSubsystemIdentifier; +- (NSArray *)addUniqueString:(NSString *)newString toArray:(NSArray *)array; +- (NSArray *)addUniqueStrings:(NSArray *)strings toArray:(NSArray *)array; +- (EFNetworkControlPathEvent *)createInterfaceEventWithLogEvent:(EFLogEvent *)logEvent matchResult:(NSTextCheckingResult *)matchResult; +- (EFNetworkControlPathEvent *)createInterfaceEventWithLogEvent:(EFLogEvent *)logEvent interfaceName:(NSString *)interfaceName; +- (void)addAddress:(NSString *)addressString toInterfaceEvent:(EFNetworkControlPathEvent *)event; +- (BOOL)removeAddress:(NSString *)addressString fromInterfaceEvent:(EFNetworkControlPathEvent *)event; +- (NSString *)substringOfString:(NSString *)matchedString forCaptureGroup:(NSString *)groupName inMatchResult:(NSTextCheckingResult *)result; +- (sa_family_t)getAddressFamilyOfAddress:(NSString *)addressString; +@property (readonly) EFLogEventParser *eventParser; +@property (readonly) NSString *category; +@property (class, readonly) NSMutableDictionary *> *interfaceMap; +@end diff --git a/src/configd/EventFactory/SCLogParser.m b/src/configd/EventFactory/SCLogParser.m new file mode 100644 index 000000000..17bcf5985 --- /dev/null +++ b/src/configd/EventFactory/SCLogParser.m @@ -0,0 +1,178 @@ +/* + * 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@ + */ + +#import +#import +#import + +#import "SCLogParser.h" + +@interface SCLogParser () +@property uint64_t nextEventCounter; +@end + +@implementation SCLogParser + +- (instancetype)initWithCategory:(NSString *)category eventParser:(EFLogEventParser *)eventParser +{ + self = [super init]; + if (self) { + _category = category; + _eventParser = eventParser; + _nextEventCounter = 1; + } + return self; +} + ++ (NSMutableDictionary *> *)interfaceMap +{ + static NSMutableDictionary *> *_interfaceMap = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _interfaceMap = [[NSMutableDictionary alloc] init]; + }); + return _interfaceMap; +} + +- (NSData *)createSubsystemIdentifier +{ + NSString *identifierString = [[NSString alloc] initWithFormat:@"%@.%llu", _category, _nextEventCounter]; + _nextEventCounter++; + const char *utf8String = identifierString.UTF8String; + return [[NSData alloc] initWithBytes:utf8String length:strlen(utf8String)]; +} + +- (NSArray *)addUniqueString:(NSString *)newString toArray:(NSArray *)array +{ + if (array.count > 0) { + NSInteger index = [array indexOfObject:newString]; + return (index == NSNotFound ? [array arrayByAddingObject:newString] : array); + } else { + return @[ newString ]; + } +} + +- (NSArray *)addUniqueStrings:(NSArray *)strings toArray:(NSArray *)array +{ + if (array == nil) { + return strings; + } + + NSMutableArray *uniqueStrings = [[NSMutableArray alloc] init]; + for (NSString *string in strings) { + NSInteger index = [array indexOfObject:string]; + if (index == NSNotFound) { + [uniqueStrings addObject:string]; + } + } + if (uniqueStrings.count > 0) { + return [array arrayByAddingObjectsFromArray:uniqueStrings]; + } else { + return array; + } +} + +- (EFNetworkControlPathEvent *)createInterfaceEventWithLogEvent:(EFLogEvent *)logEvent matchResult:(NSTextCheckingResult *)matchResult +{ + EFNetworkControlPathEvent *newEvent = nil; + NSString *interfaceName = [logEvent substringForCaptureGroup:@TokenInterfaceName inMatchResult:matchResult]; + if (interfaceName != nil) { + if (SCLogParser.interfaceMap[interfaceName] == nil) { + SCLogParser.interfaceMap[interfaceName] = @[]; + } + NSData *identifier = [self createSubsystemIdentifier]; + newEvent = [[EFNetworkControlPathEvent alloc] initWithLogEvent:logEvent subsystemIdentifier:identifier]; + newEvent.interfaceBSDName = interfaceName; + } + return newEvent; +} + +- (EFNetworkControlPathEvent *)createInterfaceEventWithLogEvent:(EFLogEvent *)logEvent interfaceName:(NSString *)interfaceName +{ + EFNetworkControlPathEvent *newEvent = nil; + if (SCLogParser.interfaceMap[interfaceName] == nil) { + SCLogParser.interfaceMap[interfaceName] = @[]; + } + NSData *identifier = [self createSubsystemIdentifier]; + newEvent = [[EFNetworkControlPathEvent alloc] initWithLogEvent:logEvent subsystemIdentifier:identifier]; + newEvent.interfaceBSDName = interfaceName; + return newEvent; +} + +- (void)addAddress:(NSString *)addressString toInterfaceEvent:(EFNetworkControlPathEvent *)event +{ + if (event.interfaceBSDName != nil) { + NSArray *addresses = SCLogParser.interfaceMap[event.interfaceBSDName]; + event.addresses = [self addUniqueString:addressString toArray:addresses]; + SCLogParser.interfaceMap[event.interfaceBSDName] = event.addresses; + } +} + +- (BOOL)removeAddress:(NSString *)addressString fromInterfaceEvent:(EFNetworkControlPathEvent *)event +{ + if (event.interfaceBSDName != nil) { + NSArray *addresses = SCLogParser.interfaceMap[event.interfaceBSDName]; + if (addresses.count > 0) { + NSPredicate *matchPredicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, __unused NSDictionary *bindings) { + NSString *matchString = (NSString *)evaluatedObject; + if (matchString != nil) { + return ![matchString isEqualToString:addressString]; + } else { + return NO; + } + }]; + event.addresses = [addresses filteredArrayUsingPredicate:matchPredicate]; + SCLogParser.interfaceMap[event.interfaceBSDName] = event.addresses; + return YES; + } + } + + return NO; +} + +- (NSString *)substringOfString:(NSString *)matchedString forCaptureGroup:(NSString *)groupName inMatchResult:(NSTextCheckingResult *)result +{ + NSString *substring = nil; + NSRange groupRange = [result rangeWithName:groupName]; + if (!NSEqualRanges(groupRange, NSMakeRange(NSNotFound, 0))) { + substring = [matchedString substringWithRange:groupRange]; + } + return substring; +} + +- (sa_family_t)getAddressFamilyOfAddress:(NSString *)addressString +{ + sa_family_t af = AF_UNSPEC; + struct in6_addr v6addr; + struct in_addr v4addr; + + if (inet_pton(AF_INET6, addressString.UTF8String, &v6addr) == 1) { + af = AF_INET6; + } else if (inet_pton(AF_INET, addressString.UTF8String, &v4addr)) { + af = AF_INET; + } + + return af; +} + +@end diff --git a/src/configd/EventFactory/StateDumpParser.h b/src/configd/EventFactory/StateDumpParser.h new file mode 100644 index 000000000..af2c74530 --- /dev/null +++ b/src/configd/EventFactory/StateDumpParser.h @@ -0,0 +1,27 @@ +/* + * 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@ + */ + +#import "SCLogParser.h" + +@interface StateDumpParser : SCLogParser +@end diff --git a/src/configd/EventFactory/StateDumpParser.m b/src/configd/EventFactory/StateDumpParser.m new file mode 100644 index 000000000..ef223dd21 --- /dev/null +++ b/src/configd/EventFactory/StateDumpParser.m @@ -0,0 +1,315 @@ +/* + * 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@ + */ + +#import +#import +#import + +#import "StateDumpParser.h" + +#define TokenFlagsDescription "flagsDescription" +#define TokenAddress "address" +#define TokenReachabilityDescription "reachabilityDescription" +#define TokenRank "rank" +#define TokenOrder "order" +#define TokenDomain "domain" +#define TokenSearchDomains "searchDomains" +#define TokenNameServers "nameServers" + +#define ResolverSearchDomainsKey @"searchDomains" +#define ResolverNameServersKey @"nameServers" +#define ResolverInterfaceNameKey @"interfaceName" +#define ResolverFlagsDescriptionKey @"flagsDescription" +#define ResolverReachabilityDescriptionKey @"reachabilityDescription" +#define ResolverMatchDomainsKey @"matchDomains" + +@interface StateDumpParser () +@property (readonly, nonatomic) NSRegularExpression *nwiRegex; +@property (readonly, nonatomic) NSRegularExpression *dnsRegex; +@property (readonly, nonatomic) NSRegularExpression *nameserverRegex; +@property (readonly, nonatomic) NSRegularExpression *searchDomainRegex; +@end + +@implementation StateDumpParser + +- (instancetype)init +{ + NSError *regexError = nil; + + _nwiRegex = [[NSRegularExpression alloc] initWithPattern:@"\\s+(?<"TokenInterfaceName">\\w+) : flags\\s+: \\w+ \\(.+\\)\\n" + "\\s+address\\s+: (?<"TokenAddress">\\S+)\\n" + "(\\s+VPN server\\s+: \\S+\\n)?" + "\\s+reach\\s+: \\w+ \\(.+\\)\\n" + "\\s+rank\\s+: \\w+ \\((?<"TokenRank">\\w+), (?<"TokenOrder">\\w+)\\)" + options:0 + error:®exError]; + if (_nwiRegex == nil || regexError != nil) { + specs_log_err("Failed to create NWI regex: %@", regexError); + return nil; + } + + regexError = nil; + _dnsRegex = [[NSRegularExpression alloc] initWithPattern:@"resolver #\\d+\\n" + "( domain : (?<"TokenDomain">\\S+)\\n)?" + "(?<"TokenSearchDomains">(?: search domain\\[\\d+\\] : \\S+\\n)*)" + "(?<"TokenNameServers">(?: nameserver\\[\\d+\\] : \\S+\\n)*)" + "( if_index : \\d+ \\((?<"TokenInterfaceName">\\w+)\\)\\n)" + "( flags : \\w+ \\((?<"TokenFlagsDescription">.+)\\)\\n)" + "( reach : \\w+ \\((?<"TokenReachabilityDescription">.+)\\)\\n)" + options:0 + error:®exError]; + if (_dnsRegex == nil || regexError != nil) { + specs_log_err("Failed to create DNS configuration regex: %@", regexError); + return nil; + } + + regexError = nil; + _nameserverRegex = [[NSRegularExpression alloc] initWithPattern:@" nameserver\\[\\d+\\] : (?<"TokenAddress">\\S+)\\n" + options:0 + error:®exError]; + if (_nameserverRegex == nil || regexError != nil) { + specs_log_err("Failed to create the nameserver regex: %@", regexError); + return nil; + } + + regexError = nil; + _searchDomainRegex = [[NSRegularExpression alloc] initWithPattern:@" search domain\\[\\d+\\] : (?<"TokenDomain">\\S+)\\n" + options:0 + error:®exError]; + if (_searchDomainRegex == nil || regexError != nil) { + specs_log_err("Failed to create the search domain regex: %@", regexError); + return nil; + } + + NSArray *matches = @[ + [[EFLogEventMatch alloc] initWithPattern:@"^Network information" + multipleNewEventHandler: + ^NSArray *(__unused NSTextCheckingResult *matchResult, EFLogEvent *logEvent) { + NSMutableDictionary *newEvents = nil; + NSArray *matches = [self.nwiRegex matchesInString:logEvent.eventMessage options:0 range:NSMakeRange(0, logEvent.eventMessage.length)]; + BOOL primaryV4 = YES; + BOOL primaryV6 = YES; + + for (NSString *interfaceName in SCLogParser.interfaceMap.allKeys) { + SCLogParser.interfaceMap[interfaceName] = @[ ]; + } + + for (NSTextCheckingResult *match in matches) { + NSString *interfaceName = [logEvent substringForCaptureGroup:@TokenInterfaceName inMatchResult:match]; + if (interfaceName == nil) { + continue; + } + EFNetworkControlPathEvent *event = newEvents[interfaceName]; + if (event == nil) { + event = [self createInterfaceEventWithLogEvent:logEvent matchResult:match]; + if (newEvents == nil) { + newEvents = [[NSMutableDictionary alloc] init]; + } + newEvents[event.interfaceBSDName] = event; + event.primaryStateIPv4 = EFPrimaryStateNotPrimary; + event.primaryStateIPv6 = EFPrimaryStateNotPrimary; + } + NSString *addressString = [logEvent substringForCaptureGroup:@TokenAddress inMatchResult:match]; + if (addressString.length > 0) { + if (primaryV4 || primaryV6) { + sa_family_t addressFamily = [self getAddressFamilyOfAddress:addressString]; + if (primaryV4 && addressFamily == AF_INET) { + event.primaryStateIPv4 = EFPrimaryStatePrimary; + primaryV4 = NO; + } else if (primaryV6 && addressFamily == AF_INET6) { + event.primaryStateIPv6 = EFPrimaryStatePrimary; + primaryV6 = NO; + } + } + [self addAddress:addressString toInterfaceEvent:event]; + } + NSString *rankString = [logEvent substringForCaptureGroup:@TokenRank inMatchResult:match]; + if (rankString.length > 0) { + event.rank = rankString; + } + NSString *orderString = [logEvent substringForCaptureGroup:@TokenOrder inMatchResult:match]; + if (orderString.length > 0) { + if ([orderString isEqualToString:@"Last"]) { + event.order = -1; + } else { + event.order = orderString.integerValue; + } + } + } + return newEvents.allValues; + }], + [[EFLogEventMatch alloc] initWithPattern:@"^DNS Configuration" + multipleNewEventHandler: + ^NSArray *(__unused NSTextCheckingResult *matchResult, EFLogEvent *logEvent) { + NSMutableArray *newEvents = nil; + NSArray *matches = [self.dnsRegex matchesInString:logEvent.eventMessage options:0 range:NSMakeRange(0, logEvent.eventMessage.length)]; + NSMutableDictionary *> *interfaceDNSConfigurations = nil; + NSMutableArray *> *orderedDNSConfigurations = nil; + + for (NSTextCheckingResult *match in matches) { + NSMutableDictionary *dnsConfiguration = [[NSMutableDictionary alloc] init]; + NSString *matchDomain = [logEvent substringForCaptureGroup:@TokenDomain inMatchResult:match]; + BOOL scoped = NO; + if (matchDomain.length > 0) { + NSArray *domains = (NSArray *)dnsConfiguration[ResolverMatchDomainsKey]; + dnsConfiguration[ResolverMatchDomainsKey] = [self addUniqueString:matchDomain toArray:domains]; + } + NSString *searchDomainsString = [logEvent substringForCaptureGroup:@TokenSearchDomains inMatchResult:match]; + if (searchDomainsString.length > 0) { + [self addSubstringsFromString:searchDomainsString + forCaptureGroup:@TokenDomain + inRegex:self.searchDomainRegex + toArrayAtKey:ResolverSearchDomainsKey + inDictionary:dnsConfiguration]; + } + NSString *nameServersString = [logEvent substringForCaptureGroup:@TokenNameServers inMatchResult:match]; + if (nameServersString.length > 0) { + [self addSubstringsFromString:nameServersString + forCaptureGroup:@TokenAddress + inRegex:self.nameserverRegex + toArrayAtKey:ResolverNameServersKey + inDictionary:dnsConfiguration]; + } + NSString *flagsDescription = [logEvent substringForCaptureGroup:@TokenFlagsDescription inMatchResult:match]; + if (flagsDescription.length > 0) { + dnsConfiguration[ResolverFlagsDescriptionKey] = flagsDescription; + if ([flagsDescription containsString:@"Scoped"]) { + scoped = YES; + } + } + NSString *reachabilityDescription = [logEvent substringForCaptureGroup:@TokenReachabilityDescription inMatchResult:match]; + if (reachabilityDescription.length > 0) { + dnsConfiguration[ResolverReachabilityDescriptionKey] = reachabilityDescription; + } + + NSString *interfaceName = [logEvent substringForCaptureGroup:@TokenInterfaceName inMatchResult:match]; + if (interfaceName != nil) { + dnsConfiguration[ResolverInterfaceNameKey] = interfaceName; + } + + NSDictionary *newConfiguration = nil; + if (interfaceName != nil && (scoped || matchDomain.length > 0)) { + NSDictionary *existingConfiguration = interfaceDNSConfigurations[interfaceName]; + if (existingConfiguration != nil) { + if (matchDomain.length > 0) { + NSArray *matchDomains = (NSArray *)existingConfiguration[ResolverMatchDomainsKey]; + dnsConfiguration[ResolverMatchDomainsKey] = [self addUniqueString:matchDomain toArray:matchDomains]; + } else { + dnsConfiguration[ResolverMatchDomainsKey] = existingConfiguration[ResolverMatchDomainsKey]; + } + } + newConfiguration = [[NSDictionary alloc] initWithDictionary:dnsConfiguration]; + if (interfaceDNSConfigurations == nil) { + interfaceDNSConfigurations = [[NSMutableDictionary alloc] init]; + } + interfaceDNSConfigurations[interfaceName] = newConfiguration; + } else { + newConfiguration = [[NSDictionary alloc] initWithDictionary:dnsConfiguration]; + } + + if (!scoped) { + if (orderedDNSConfigurations == nil) { + orderedDNSConfigurations = [[NSMutableArray alloc] init]; + } + NSUInteger existingIndex = [orderedDNSConfigurations indexOfObjectPassingTest: + ^BOOL(NSDictionary *obj, __unused NSUInteger idx, __unused BOOL *stop) { + NSString *existingInterfaceName = (NSString *)obj[ResolverInterfaceNameKey]; + return (existingInterfaceName != nil && [interfaceName isEqualToString:existingInterfaceName]); + }]; + if (existingIndex == NSNotFound) { + [orderedDNSConfigurations addObject:newConfiguration]; + } else { + orderedDNSConfigurations[existingIndex] = newConfiguration; + } + } + } + + for (NSString *interfaceName in interfaceDNSConfigurations) { + NSDictionary *dnsConfiguration = interfaceDNSConfigurations[interfaceName]; + if (dnsConfiguration == nil || ![NSJSONSerialization isValidJSONObject:dnsConfiguration]) { + specs_log_err("DNS configuration is not valid JSON: %@", dnsConfiguration); + continue; + } + NSError *jsonError = nil; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dnsConfiguration options:NSJSONWritingPrettyPrinted error:&jsonError]; + if (jsonData == nil) { + specs_log_err("Failed to generate JSON from %@: %@", dnsConfiguration, jsonError); + continue; + } + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent interfaceName:interfaceName]; + newEvent.dnsConfiguration = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + if (newEvents == nil) { + newEvents = [[NSMutableArray alloc] init]; + } + [newEvents addObject:newEvent]; + } + if (orderedDNSConfigurations.count > 0) { + NSError *jsonError = nil; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:orderedDNSConfigurations options:NSJSONWritingPrettyPrinted error:&jsonError]; + if (jsonData != nil) { + NSData *subsystemIdentifier = [self createSubsystemIdentifier]; + EFNetworkControlPathEvent *newEvent = [[EFNetworkControlPathEvent alloc] initWithLogEvent:logEvent subsystemIdentifier:subsystemIdentifier]; + newEvent.interfaceBSDName = @"system"; + newEvent.interfaceDescription = @"System Configuration"; + newEvent.dnsConfiguration = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + if (newEvents == nil) { + newEvents = [[NSMutableArray alloc] init]; + } + [newEvents addObject:newEvent]; + } + } + for (NSString *interfaceName in SCLogParser.interfaceMap) { + if (interfaceDNSConfigurations[interfaceName] == nil) { + EFNetworkControlPathEvent *newEvent = [self createInterfaceEventWithLogEvent:logEvent interfaceName:interfaceName]; + newEvent.dnsConfiguration = EFNetworkControlPathEvent.configurationNotSet; + if (newEvents == nil) { + newEvents = [[NSMutableArray alloc] init]; + } + [newEvents addObject:newEvent]; + } + } + return newEvents; + }], + ]; + EFLogEventParser *parser = [[EFLogEventParser alloc] initWithMatches:matches]; + return [super initWithCategory:@"StateDump" eventParser:parser]; +} + +- (void)addSubstringsFromString:(NSString *)string forCaptureGroup:(NSString *)groupName inRegex:(NSRegularExpression *)regex toArrayAtKey:(NSString *)configKey inDictionary:(NSMutableDictionary *)dictionary +{ + NSArray *matches = [regex matchesInString:string options:0 range:NSMakeRange(0, string.length)]; + for (NSTextCheckingResult *match in matches) { + NSRange groupRange = [match rangeWithName:groupName]; + if (!NSEqualRanges(groupRange, NSMakeRange(NSNotFound, 0))) { + NSString *substring = [string substringWithRange:groupRange]; + if (substring.length > 0) { + NSArray *existingList = (NSArray *)dictionary[configKey]; + dictionary[configKey] = [self addUniqueString:substring toArray:existingList]; + } + } + } +} + +@end diff --git a/src/configd/IPMonitorControl/AWD/AWDIPMonitorGlobalEnums.h b/src/configd/IPMonitorControl/AWD/AWDIPMonitorGlobalEnums.h new file mode 100644 index 000000000..e45d965ad --- /dev/null +++ b/src/configd/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/src/configd/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.h b/src/configd/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.h new file mode 100644 index 000000000..f1dca4f75 --- /dev/null +++ b/src/configd/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/src/configd/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.m b/src/configd/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.m new file mode 100644 index 000000000..89a5d2198 --- /dev/null +++ b/src/configd/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/src/configd/IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h b/src/configd/IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h new file mode 100644 index 000000000..36f2d8b81 --- /dev/null +++ b/src/configd/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/src/configd/IPMonitorControl/AWD/AwdMetadata-0x81-IPMonitor.bin b/src/configd/IPMonitorControl/AWD/AwdMetadata-0x81-IPMonitor.bin new file mode 100644 index 0000000000000000000000000000000000000000..abe88872bbc4734ddc52957d4df36323f67465c2 GIT binary patch literal 548 zcmZ<^ckyLpU}RusU|?WkU}0!vU|?`zU|=w3U|@*txcQqIDpt+Fz!1a8z|gjFUkD2W z6T@{z1_oaS2;dSF;^$~+XkihMmSD7C3}8%Pb5n~;5_1bY7=B2FdFu0B4YK8`^GOn7Yz_Y87%5n$%hNJ>q$ zFiSBrH%_ulGEGS}GDtHvOExq~Ni +#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/src/configd/IPMonitorControl/IPMonitorAWDReport.m b/src/configd/IPMonitorControl/IPMonitorAWDReport.m new file mode 100644 index 000000000..7c5ded5da --- /dev/null +++ b/src/configd/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/src/configd/IPMonitorControl/IPMonitorControl.c b/src/configd/IPMonitorControl/IPMonitorControl.c index 83c6f10fd..39950ce91 100644 --- a/src/configd/IPMonitorControl/IPMonitorControl.c +++ b/src/configd/IPMonitorControl/IPMonitorControl.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013-2014 Apple Inc. All rights reserved. + * Copyright (c) 2013-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@ */ @@ -44,12 +44,14 @@ #include #ifdef TEST_IPMONITOR_CONTROL -#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) + +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) #else /* TEST_IPMONITOR_CONTROL */ -#define my_log(__level, fmt, ...) SCLog(TRUE, __level, CFSTR(fmt), ## __VA_ARGS__) -#endif /* TEST_IPMONITOR_CONTROL */ +#define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) + +#endif /* TEST_IPMONITOR_CONTROL */ /** ** IPMonitorControl CF object glue @@ -60,7 +62,9 @@ struct IPMonitorControl { dispatch_queue_t queue; xpc_connection_t connection; + CFMutableDictionaryRef assertions; /* ifname = rank */ + CFMutableDictionaryRef advisories; /* ifname = adv */ }; STATIC CFStringRef __IPMonitorControlCopyDebugDesc(CFTypeRef cf); @@ -85,7 +89,7 @@ __IPMonitorControlCopyDebugDesc(CFTypeRef cf) { CFAllocatorRef allocator = CFGetAllocator(cf); IPMonitorControlRef control = (IPMonitorControlRef)cf; - + return (CFStringCreateWithFormat(allocator, NULL, CFSTR(""), control)); @@ -95,16 +99,18 @@ STATIC void __IPMonitorControlDeallocate(CFTypeRef cf) { IPMonitorControlRef control = (IPMonitorControlRef)cf; - + if (control->connection != NULL) { xpc_release(control->connection); } if (control->queue != NULL) { - xpc_release(control->queue); + dispatch_release(control->queue); } + my_CFRelease(&control->advisories); + my_CFRelease(&control->assertions); return; } - + /** ** IPMonitorControl support functions **/ @@ -131,10 +137,25 @@ __IPMonitorControlAllocate(CFAllocatorRef allocator) control = (IPMonitorControlRef) _CFRuntimeCreateInstance(allocator, __kIPMonitorControlTypeID, size, NULL); - bzero(((void *)control) + sizeof(CFRuntimeBase), size); 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) @@ -147,19 +168,18 @@ IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, if (type == XPC_TYPE_DICTIONARY) { if (async) { /* we don't expect async responses messages */ - my_log(LOG_NOTICE, "IPMonitorControl: unexpected message"); + my_log(LOG_NOTICE, "unexpected message"); } else { int64_t error; - + error = xpc_dictionary_get_int64(event, kIPMonitorControlResponseKeyError); if (error != 0) { success = FALSE; #ifdef TEST_IPMONITOR_CONTROL - my_log(LOG_NOTICE, - "IPMonitorControl: failure code %lld", error); -#endif /* TEST_IPMONITOR_CONTROL */ + my_log(LOG_NOTICE, "failure code %lld", error); +#endif /* TEST_IPMONITOR_CONTROL */ } else { success = TRUE; @@ -169,19 +189,19 @@ IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, else if (type == XPC_TYPE_ERROR) { if (event == XPC_ERROR_CONNECTION_INTERRUPTED) { #ifdef TEST_IPMONITOR_CONTROL - my_log(LOG_NOTICE, "IPMonitorControl: can retry"); -#endif /* TEST_IPMONITOR_CONTROL */ + my_log(LOG_NOTICE, "can retry"); +#endif /* TEST_IPMONITOR_CONTROL */ retry = TRUE; } else { const char * desc; desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); - my_log(LOG_NOTICE, "IPMonitorControl: %s", desc); + my_log(LOG_NOTICE, "%s", desc); } } else { - my_log(LOG_NOTICE, "IPMonitorControl: unknown event type : %p", type); + my_log(LOG_NOTICE, "unknown event type : %p", type); } if (retry_p != NULL) { *retry_p = retry; @@ -191,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) { @@ -208,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 { @@ -230,14 +249,14 @@ ApplyInterfaceRank(const void * key, const void * value, void * context) SCNetworkServicePrimaryRank rank; xpc_object_t request; - if (CFStringGetCString(key, ifname, sizeof(ifname), - kCFStringEncodingUTF8) == FALSE) { + if (!CFStringGetCString(key, ifname, sizeof(ifname), + kCFStringEncodingUTF8)) { return; } - if (CFNumberGetValue(value, kCFNumberSInt32Type, &rank) == FALSE) { + if (!CFNumberGetValue(value, kCFNumberSInt32Type, &rank)) { return; } - request = xpc_dictionary_create(NULL, NULL, 0); + request = create_request_dictionary(); xpc_dictionary_set_uint64(request, kIPMonitorControlRequestKeyType, kIPMonitorControlRequestTypeSetInterfaceRank); @@ -253,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 **/ @@ -268,16 +349,23 @@ IPMonitorControlCreate(void) control = __IPMonitorControlAllocate(NULL); queue = dispatch_queue_create("IPMonitorControl", NULL); connection - = xpc_connection_create_mach_service(kIPMonitorControlServerName, + = xpc_connection_create_mach_service(kIPMonitorControlServerName, queue, flags); handler = ^(xpc_object_t event) { - Boolean retry; + Boolean retry; (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); + } } }; xpc_connection_set_event_handler(connection, handler); @@ -287,61 +375,77 @@ IPMonitorControlCreate(void) return (control); } -PRIVATE_EXTERN Boolean -IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, - CFStringRef ifname_cf, - SCNetworkServicePrimaryRank rank) +STATIC xpc_object_t +IPMonitorControlSendRequest(IPMonitorControlRef control, + xpc_object_t request) { - char ifname[IF_NAMESIZE]; - xpc_object_t request; - Boolean success = FALSE; + xpc_object_t reply; - if (CFStringGetCString(ifname_cf, ifname, sizeof(ifname), - kCFStringEncodingUTF8) == FALSE) { - return (FALSE); - } - request = xpc_dictionary_create(NULL, NULL, 0); - xpc_dictionary_set_uint64(request, - kIPMonitorControlRequestKeyType, - kIPMonitorControlRequestTypeSetInterfaceRank); - xpc_dictionary_set_string(request, - kIPMonitorControlRequestKeyInterfaceName, - ifname); - xpc_dictionary_set_uint64(request, - kIPMonitorControlRequestKeyPrimaryRank, - rank); while (TRUE) { - xpc_object_t reply; 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, "IPMonitorControl: failed to send message"); + my_log(LOG_NOTICE, "failed to send message"); break; } success = IPMonitorControlHandleResponse(reply, FALSE, &retry_on_error); - xpc_release(reply); if (success) { break; } + xpc_release(reply); + reply = NULL; if (retry_on_error) { continue; } - my_log(LOG_NOTICE, "IPMonitorControl: fatal error"); + 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; + + if (!CFStringGetCString(ifname_cf, ifname, sizeof(ifname), + kCFStringEncodingUTF8)) { + return (FALSE); + } + + request = create_request_dictionary(); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeSetInterfaceRank); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyPrimaryRank, + rank); + 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); }); @@ -349,55 +453,153 @@ IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, return (success); } -SCNetworkServicePrimaryRank +PRIVATE_EXTERN SCNetworkServicePrimaryRank IPMonitorControlGetInterfacePrimaryRank(IPMonitorControlRef control, CFStringRef ifname_cf) { - char ifname[IF_NAMESIZE]; - SCNetworkServicePrimaryRank rank; - xpc_object_t request; + char ifname[IF_NAMESIZE]; + SCNetworkServicePrimaryRank rank; + xpc_object_t reply; + xpc_object_t request; rank = kSCNetworkServicePrimaryRankDefault; - if (CFStringGetCString(ifname_cf, ifname, sizeof(ifname), - kCFStringEncodingUTF8) == FALSE) { - goto done; + if (!CFStringGetCString(ifname_cf, ifname, sizeof(ifname), + kCFStringEncodingUTF8)) { + return rank; } - 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, "IPMonitorControl: 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); +} - done: - 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/src/configd/IPMonitorControl/IPMonitorControl.h b/src/configd/IPMonitorControl/IPMonitorControl.h index 2442a0eed..64052fd30 100644 --- a/src/configd/IPMonitorControl/IPMonitorControl.h +++ b/src/configd/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/src/configd/IPMonitorControl/IPMonitorControlPrivate.h b/src/configd/IPMonitorControl/IPMonitorControlPrivate.h index 5e23a5ed9..cd048fb32 100644 --- a/src/configd/IPMonitorControl/IPMonitorControlPrivate.h +++ b/src/configd/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/src/configd/IPMonitorControl/IPMonitorControlServer.c b/src/configd/IPMonitorControl/IPMonitorControlServer.c index e19ccbbf1..cbdd9dc0e 100644 --- a/src/configd/IPMonitorControl/IPMonitorControlServer.c +++ b/src/configd/IPMonitorControl/IPMonitorControlServer.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013-2014 Apple Inc. All rights reserved. + * Copyright (c) 2013-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@ */ @@ -40,15 +40,14 @@ #include #include #include +#include #include "IPMonitorControlServer.h" #include "symbol_scope.h" #include "IPMonitorControlPrivate.h" -#include - -STATIC Boolean * S_verbose; +#include "IPMonitorAWDReport.h" #ifdef TEST_IPMONITOR_CONTROL -#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) #else /* TEST_IPMONITOR_CONTROL */ #include "ip_plugin.h" @@ -65,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 */ }; /** @@ -74,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) { @@ -83,8 +98,7 @@ InterfaceChangedListAddInterface(CFStringRef ifname) CFArrayAppendValue(S_if_changes, ifname); S_if_changes_range.length = 1; } - else if (CFArrayContainsValue(S_if_changes, S_if_changes_range, - ifname) == FALSE) { + else if (!CFArrayContainsValue(S_if_changes, S_if_changes_range, ifname)) { CFArrayAppendValue(S_if_changes, ifname); S_if_changes_range.length++; } @@ -113,14 +127,42 @@ InterfaceRankAssertionAdd(const void * key, const void * value, void * context) = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionarySetValue(*assertions_p, key, value); + 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, value); + CFDictionarySetValue(*assertions_p, key, rank); + } + 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; } @@ -132,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; @@ -154,7 +281,7 @@ SetNotificationInfo(CFRunLoopRef runloop, CFRunLoopSourceRef rls) } STATIC void -GenerateNotification(void) +NotifyIPMonitor(void) { if (S_signal_source != NULL) { CFRunLoopSourceSignal(S_signal_source); @@ -165,34 +292,128 @@ 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 **/ STATIC void AddChangedInterface(const void * key, const void * value, void * context) { +#pragma unused(value) +#pragma unused(context) InterfaceChangedListAddInterface((CFStringRef)key); return; } STATIC void -ControlSessionInvalidate(ControlSessionRef session) +AddChangedInterfaceNotify(const void * key, const void * value, void * context) { - if (*S_verbose) { - my_log(LOG_NOTICE, "Invalidating %p", session); +#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; } @@ -200,9 +421,7 @@ ControlSessionInvalidate(ControlSessionRef session) STATIC void ControlSessionRelease(void * p) { - if (*S_verbose) { - my_log(LOG_NOTICE, "Releasing %p", p); - } + my_log(LOG_DEBUG, "Releasing %p", p); free(p); return; } @@ -219,19 +438,17 @@ 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); LIST_INSERT_HEAD(&S_ControlSessions, session, link); - if (*S_verbose) { - my_log(LOG_NOTICE, "Created %p (connection %p)", session, connection); - } + my_log(LOG_DEBUG, "Created %p (connection %p)", session, connection); return (session); } STATIC ControlSessionRef -ControlSessionGet(xpc_connection_t connection) +ControlSessionForConnection(xpc_connection_t connection) { ControlSessionRef session; @@ -261,7 +478,7 @@ ControlSessionSetInterfaceRank(ControlSessionRef session, } ifname_cf = CFStringCreateWithCString(NULL, ifname, kCFStringEncodingUTF8); - + if (rank == kSCNetworkServicePrimaryRankDefault) { CFDictionaryRemoveValue(session->assertions, ifname_cf); if (CFDictionaryGetCount(session->assertions) == 0) { @@ -277,7 +494,7 @@ ControlSessionSetInterfaceRank(ControlSessionRef session, CFRelease(rank_cf); } InterfaceChangedListAddInterface(ifname_cf); - GenerateNotification(); + NotifyIPMonitor(); CFRelease(ifname_cf); return; } @@ -303,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; @@ -315,22 +596,67 @@ 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) == FALSE) { - my_log(LOG_DEBUG, - "IPMonitorControlServer: %p pid %d permission denied", + if (!IPMonitorControlServerConnectionIsRoot(connection)) { + my_log(LOG_INFO, "connection %p pid %d permission denied", connection, xpc_connection_get_pid(connection)); return (EPERM); } - ifname + ifname = xpc_dictionary_get_string(request, kIPMonitorControlRequestKeyInterfaceName); if (ifname == NULL) { @@ -339,28 +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_DEBUG, - "IPMonitorControlServer: %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; @@ -375,7 +695,7 @@ IPMonitorControlServerHandleGetInterfaceRank(xpc_connection_t connection, /* no session, no rank assertion */ return (ENOENT); } - ifname + ifname = xpc_dictionary_get_string(request, kIPMonitorControlRequestKeyInterfaceName); if (ifname == NULL) { @@ -387,15 +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; - if (*S_verbose) { - my_log(LOG_NOTICE, "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 */ @@ -410,28 +840,33 @@ IPMonitorControlServerHandleRequest(xpc_connection_t connection, xpc_object_t request) { xpc_type_t type; - + type = xpc_get_type(request); if (type == XPC_TYPE_DICTIONARY) { int error = 0; uint64_t request_type; xpc_connection_t remote; xpc_object_t reply; - - request_type + + request_type = xpc_dictionary_get_uint64(request, kIPMonitorControlRequestKeyType); 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; @@ -452,12 +887,11 @@ IPMonitorControlServerHandleRequest(xpc_connection_t connection, IPMonitorControlServerHandleDisconnect(connection); } else if (request == XPC_ERROR_CONNECTION_INTERRUPTED) { - my_log(LOG_NOTICE, - "IPMonitorControlServer: connection interrupted"); + my_log(LOG_INFO, "connection interrupted"); } } else { - my_log(LOG_NOTICE, "IPMonitorControlServer: unexpected event"); + my_log(LOG_NOTICE, "unexpected event"); } return; } @@ -471,6 +905,7 @@ IPMonitorControlServerHandleNewConnection(xpc_connection_t connection) IPMonitorControlServerHandleRequest(connection, event); }; xpc_connection_set_event_handler(connection, handler); + xpc_connection_set_target_queue(connection, S_IPMonitorControlServerQueue); xpc_connection_resume(connection); return; } @@ -488,26 +923,25 @@ IPMonitorControlServerCreate(dispatch_queue_t queue, const char * name) } handler = ^(xpc_object_t event) { xpc_type_t type; - + type = xpc_get_type(event); if (type == XPC_TYPE_CONNECTION) { IPMonitorControlServerHandleNewConnection(event); } else if (type == XPC_TYPE_ERROR) { const char * desc; - + desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); if (event == XPC_ERROR_CONNECTION_INVALID) { - my_log(LOG_NOTICE, "IPMonitorControlServer: %s", desc); + my_log(LOG_NOTICE, "%s", desc); xpc_release(connection); } else { - my_log(LOG_NOTICE, "IPMonitorControlServer: %s", desc); - } + my_log(LOG_NOTICE, "%s", desc); + } } else { - my_log(LOG_NOTICE, "IPMonitorControlServer: unknown event %p", - type); + my_log(LOG_NOTICE, "unknown event %p", type); } }; S_IPMonitorControlServerQueue = queue; @@ -520,10 +954,10 @@ PRIVATE_EXTERN Boolean IPMonitorControlServerStart(CFRunLoopRef runloop, CFRunLoopSourceRef rls, Boolean * verbose) { +#pragma unused(verbose) dispatch_queue_t q; xpc_connection_t connection; - S_verbose = verbose; SetNotificationInfo(runloop, rls); q = dispatch_queue_create("IPMonitorControlServer", NULL); connection = IPMonitorControlServerCreate(q, kIPMonitorControlServerName); diff --git a/src/configd/IPMonitorControl/awdgen.yaml b/src/configd/IPMonitorControl/awdgen.yaml new file mode 100644 index 000000000..43c2ceee6 --- /dev/null +++ b/src/configd/IPMonitorControl/awdgen.yaml @@ -0,0 +1,4 @@ +component: IPMonitor +output_directory: IPMonitorControl/AWD +package: AWD +language: objc-no-arc diff --git a/src/configd/IPMonitorControl/main.c b/src/configd/IPMonitorControl/main.c index 7d4080e07..9b227e33e 100644 --- a/src/configd/IPMonitorControl/main.c +++ b/src/configd/IPMonitorControl/main.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013 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; @@ -70,6 +70,7 @@ main(int argc, char * argv[]) IPMonitorControlRef control; SCNetworkServicePrimaryRank rank; Boolean rank_set = FALSE; + Boolean wait = FALSE; rank = kSCNetworkServicePrimaryRankDefault; control = IPMonitorControlCreate(); @@ -78,7 +79,7 @@ main(int argc, char * argv[]) exit(1); } - while ((ch = getopt(argc, argv, "i:r:")) != EOF) { + while ((ch = getopt(argc, argv, "i:r:w")) != EOF) { CFStringRef ifname; SCNetworkServicePrimaryRank existing_rank; @@ -103,6 +104,9 @@ main(int argc, char * argv[]) case 'r': rank = strtoul(optarg, NULL, 0); break; + case 'w': + wait = TRUE; + break; default: fprintf(stderr, "unexpected option '%c'\n", (char)ch); exit(1); @@ -114,28 +118,30 @@ main(int argc, char * argv[]) if (argc > 0) { fprintf(stderr, "ignoring additional parameters\n"); } - if (rank_set == FALSE) { + if (!rank_set) { exit(1); } + if (wait) { + CFRunLoopRun(); + } } else { CFRunLoopSourceContext context; 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); CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - if (IPMonitorControlServerStart(CFRunLoopGetCurrent(), rls, - &verbose) == FALSE) { + if (!IPMonitorControlServerStart(CFRunLoopGetCurrent(), rls, &verbose)) { fprintf(stderr, "failed to create connection\n"); exit(1); } + CFRunLoopRun(); } - CFRunLoopRun(); exit(0); return (0); } diff --git a/src/configd/IPMonitorControl/test_rank.sh b/src/configd/IPMonitorControl/test_rank.sh new file mode 100644 index 000000000..6c62215a7 --- /dev/null +++ b/src/configd/IPMonitorControl/test_rank.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +while true +do + ./if_rank_assert -i en0 -r 1 & + ./if_rank_assert -i en0 -r 2 & + ./if_rank_assert -i en0 -r 3 & + ./if_rank_assert -i en0 -r 4 & + wait +done + + diff --git a/src/configd/Plugins/IPMonitor/Info-EmbeddedSimulator.plist b/src/configd/Plugins/IPMonitor/Info-EmbeddedSimulator.plist index 9cf9740de..b5f8f83b8 100644 --- a/src/configd/Plugins/IPMonitor/Info-EmbeddedSimulator.plist +++ b/src/configd/Plugins/IPMonitor/Info-EmbeddedSimulator.plist @@ -2,12 +2,16 @@ + AppendStateArrayToSetupArray + + Builtin + CFBundleDevelopmentRegion English CFBundleExecutable IPMonitor CFBundleIdentifier - com.apple.SystemConfiguration.IPMonitor + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,33 +19,28 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.13 + 1.19 + MachServices + + com.apple.SystemConfiguration.DNSConfiguration_sim + + com.apple.SystemConfiguration.NetworkInformation_sim + + Requires com.apple.SystemConfiguration.IPConfiguration com.apple.SystemConfiguration.PreferencesMonitor - com.apple.SystemConfiguration.SCNetworkReachability - Builtin - + SupplementalProxiesFollowSupplementalDNS + mdns_timeout 5 pdns_timeout 5 - AppendStateArrayToSetupArray - - SupplementalProxiesFollowSupplementalDNS - - MachServices - - com.apple.SystemConfiguration.DNSConfiguration_sim - - com.apple.SystemConfiguration.NetworkInformation_sim - - diff --git a/src/configd/Plugins/IPMonitor/Info.plist b/src/configd/Plugins/IPMonitor/Info.plist index 12cdb636c..3bd882d14 100644 --- a/src/configd/Plugins/IPMonitor/Info.plist +++ b/src/configd/Plugins/IPMonitor/Info.plist @@ -2,12 +2,16 @@ + AppendStateArrayToSetupArray + + Builtin + CFBundleDevelopmentRegion English CFBundleExecutable IPMonitor CFBundleIdentifier - com.apple.SystemConfiguration.IPMonitor + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,33 +19,28 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 + MachServices + + com.apple.SystemConfiguration.DNSConfiguration + + com.apple.SystemConfiguration.IPMonitorControl + + com.apple.SystemConfiguration.NetworkInformation + + Requires com.apple.SystemConfiguration.IPConfiguration com.apple.SystemConfiguration.PreferencesMonitor - com.apple.SystemConfiguration.SCNetworkReachability - Builtin - mdns_timeout 5 pdns_timeout 5 - AppendStateArrayToSetupArray - - MachServices - - com.apple.SystemConfiguration.DNSConfiguration - - com.apple.SystemConfiguration.NetworkInformation - - com.apple.SystemConfiguration.IPMonitorControl - - diff --git a/src/configd/Plugins/IPMonitor/agent-monitor.h b/src/configd/Plugins/IPMonitor/agent-monitor.h new file mode 100644 index 000000000..31ad4aebc --- /dev/null +++ b/src/configd/Plugins/IPMonitor/agent-monitor.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2017 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 AGENT_MONITOR_H +#define AGENT_MONITOR_H + +#include +#include + +__BEGIN_DECLS + +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); + +__END_DECLS + +#endif /* AGENT_MONITOR_H */ diff --git a/src/configd/Plugins/IPMonitor/agent-monitor.m b/src/configd/Plugins/IPMonitor/agent-monitor.m new file mode 100644 index 000000000..9c329c41c --- /dev/null +++ b/src/configd/Plugins/IPMonitor/agent-monitor.m @@ -0,0 +1,153 @@ +/* + * Copyright (c) 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, + * 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@ + */ + +#import "controller.h" + +static Boolean +haveNetworkExtensionFramework() +{ + Boolean haveFramework; + + haveFramework = ([NEPolicy class] != nil); + return haveFramework; +} + +void +process_AgentMonitor(void) +{ + if (!haveNetworkExtensionFramework()) { + return; + } + + SC_log(LOG_DEBUG, "Triggering AgentMonitor"); + @autoreleasepool { + AgentController *controller = [AgentController sharedController]; + if (controller == nil) { + SC_log(LOG_ERR, "AgentController could not be initialized"); + return; + } + + dispatch_sync(controller.controllerQueue, ^{ + [[AgentController sharedController] processDNSChanges]; + [[AgentController sharedController] processProxyChanges]; + }); + } + + return; +} + +void +process_AgentMonitor_DNS(void) +{ + if (!haveNetworkExtensionFramework()) { + return; + } + + SC_log(LOG_DEBUG, "Triggering AgentMonitor for DNS"); + @autoreleasepool { + AgentController *controller = [AgentController sharedController]; + if (controller == nil) { + SC_log(LOG_ERR, "AgentController could not be initialized"); + return; + } + + dispatch_sync(controller.controllerQueue, ^{ + [[AgentController sharedController] processDNSChanges]; + }); + } + + return; +} + +void +process_AgentMonitor_Proxy(void) +{ + if (!haveNetworkExtensionFramework()) { + return; + } + + SC_log(LOG_DEBUG, "Triggering AgentMonitor for Proxy"); + @autoreleasepool { + AgentController *controller = [AgentController sharedController]; + if (controller == nil) { + SC_log(LOG_ERR, "AgentController could not be initialized"); + return; + } + + dispatch_sync(controller.controllerQueue, ^{ + [[AgentController sharedController] processProxyChanges]; + }); + } + + return; +} + +const void * +copy_proxy_information_for_agent_uuid(uuid_t uuid, uint64_t *length) +{ + __block const void *buffer = NULL; + + if (!haveNetworkExtensionFramework()) { + return NULL; + } + + @autoreleasepool { + AgentController *controller = [AgentController sharedController]; + if (controller == nil) { + SC_log(LOG_ERR, "AgentController could not be initialized"); + return NULL; + } + + dispatch_sync(controller.controllerQueue, ^{ + buffer = [[AgentController sharedController] copyProxyAgentData:uuid + length:length]; + }); + } + + return buffer; +} + +const void * +copy_dns_information_for_agent_uuid(uuid_t uuid, uint64_t *length) +{ + __block const void *buffer = NULL; + + if (!haveNetworkExtensionFramework()) { + return NULL; + } + + @autoreleasepool { + AgentController *controller = [AgentController sharedController]; + if (controller == nil) { + SC_log(LOG_ERR, "AgentController could not be initialized"); + return NULL; + } + + dispatch_sync(controller.controllerQueue, ^{ + buffer = [[AgentController sharedController] copyDNSAgentData:uuid + length:length]; + }); + } + + return buffer; +} diff --git a/src/configd/Plugins/IPMonitor/com.apple.networking.IPMonitor b/src/configd/Plugins/IPMonitor/com.apple.networking.IPMonitor deleted file mode 100644 index 2f4a10a27..000000000 --- a/src/configd/Plugins/IPMonitor/com.apple.networking.IPMonitor +++ /dev/null @@ -1 +0,0 @@ -? [= LoggerID com.apple.networking.IPMonitor] file /Library/Logs/CrashReporter/com.apple.networking.IPMonitor.log crashlog rotate=local file_max=1M compress format=$((Time)(local.6))\ $Host\ $(Sender)[$(PID)]\ <$((Level)(str))>:\ $(Message) diff --git a/src/configd/Plugins/IPMonitor/configAgent.h b/src/configd/Plugins/IPMonitor/configAgent.h new file mode 100644 index 000000000..29bdb6e43 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/configAgent.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2015-2017 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 CONFIG_AGENT_H +#define CONFIG_AGENT_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#import +#import +#import +#import + +#import "configAgentDefines.h" + +typedef NS_ENUM(NSUInteger, AgentType) { + kAgentTypeUnknown = 0, + kAgentTypeProxy, + kAgentTypeDNS +}; + +typedef NS_ENUM(NSUInteger, AgentSubType) { + kAgentSubTypeUnknown = 0, + kAgentSubTypeScoped, + kAgentSubTypeSupplemental, + kAgentSubTypeDefault, + kAgentSubTypeMulticast, + kAgentSubTypePrivate, + kAgentSubTypeServiceSpecific, + kAgentSubTypeGlobal, +}; + +os_log_t __log_IPMonitor(void); + +/* Parameters */ +#define kEntityName "EntityName" +#define kAgentSubType "AgentSubType" + +@interface ConfigAgent : NSObject + +@property NEPolicySession *preferredPolicySession; + +- (instancetype)initWithParameters:(NSDictionary *)parameters; +- (void)addAgentRegistrationObject:(NWNetworkAgentRegistration *)regObject; +- (NWNetworkAgentRegistration *)getRegistrationObject; +- (NSString *)getAssociatedEntity; +- (NSString *)getAgentName; +- (NSData *)getAgentData; +- (AgentType)getAgentType; +- (AgentSubType)getAgentSubType; +- (NSUUID *)getAgentUUID; +- (void)setStartHandler:(void (^)(void))startHandler; +- (BOOL)startAgentWithOptions:(NSDictionary *)options; +- (void)updateAgentData:(NSData *)data; +- (BOOL)shouldUpdateAgent; +- (id)getAgentMapping; +- (void)setAgentMapping:(id)agent; + +- (NSUUID *)createUUIDForName:(NSString *)agentName; + +@end + +#endif /* CONFIG_AGENT_H */ diff --git a/src/configd/Plugins/IPMonitor/configAgent.m b/src/configd/Plugins/IPMonitor/configAgent.m new file mode 100644 index 000000000..5af5b4746 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/configAgent.m @@ -0,0 +1,193 @@ +/* + * Copyright (c) 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, + * 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@ + */ + +#import "configAgent.h" + +@interface ConfigAgent() + +@property (nonatomic) NWNetworkAgentRegistration * internalRegistrationObject; +@property (nonatomic) NSString *internalAssociatedEntity; +@property (nonatomic, copy) NSData *internalAgentData; +@property (nonatomic) BOOL internalShouldUpdateAgent; +@property (strong) void (^internalStartHandler)(void); +@property (nonatomic) id internalAgentMapping; + +@end + +@implementation ConfigAgent + +@synthesize agentUUID; +@synthesize agentDescription; +@synthesize active; +@synthesize kernelActivated; +@synthesize userActivated; +@synthesize voluntary; +@synthesize specificUseOnly; + ++ (NSString *)agentDomain +{ + return @kConfigAgentDomain; +} + ++ (NSString *)agentType +{ + return @kConfigAgentTypeGeneric; +} + ++ (instancetype)agentFromData:(NSData *)data +{ +#pragma unused(data) + return nil; +} + +- (instancetype)initWithParameters:(NSDictionary *)parameters +{ + self = [super init]; + if (self) { + NSString *intf = [parameters valueForKey:@kEntityName]; + + _internalRegistrationObject = nil; + _internalAssociatedEntity = [intf copy]; + _internalAgentData = nil; + _internalShouldUpdateAgent = YES; + _internalAgentMapping = nil; + + active = YES; + kernelActivated = NO; + userActivated = YES; + voluntary = NO; + } + + return self; +} + +- (void)addAgentRegistrationObject:(NWNetworkAgentRegistration *)regObject +{ + _internalRegistrationObject = regObject; +} + +- (AgentType)getAgentType +{ + return kAgentTypeUnknown; +} + +- (NSUUID *)getAgentUUID +{ + return nil; +} + +- (NSString *)getAgentName +{ + return @kConfigAgentTypeGeneric; +} + +- (AgentSubType)getAgentSubType +{ + return kAgentSubTypeUnknown; +} + +- (NWNetworkAgentRegistration *)getRegistrationObject +{ + return _internalRegistrationObject; +} + +- (NSString *)getAssociatedEntity +{ + return _internalAssociatedEntity; +} + +- (NSData *)getAgentData +{ + return _internalAgentData; +} + +- (NSData *)copyAgentData +{ + return _internalAgentData; +} + +- (void)setAgentMapping:(id)agent +{ + _internalAgentMapping = agent; +} + +- (id)getAgentMapping +{ + return _internalAgentMapping; +} + +- (void)setStartHandler:(void (^)(void))startHandler +{ + if (startHandler != nil) { + self.internalStartHandler = startHandler; + } +} + +- (BOOL)startAgentWithOptions:(NSDictionary *)options +{ +#pragma unused(options) + BOOL ok = NO; + if (!self.active) { + self.active = YES; + ok = [self.internalRegistrationObject updateNetworkAgent:self]; + } + + return ok; +} + +- (void)updateAgentData:(NSData *)data +{ + if ([data isEqual:_internalAgentData]) { + _internalShouldUpdateAgent = NO; + return; + } + + _internalAgentData = [data copy]; + _internalShouldUpdateAgent = YES; +} + +- (BOOL)shouldUpdateAgent +{ + return _internalShouldUpdateAgent; +} + +- (NSUUID *)createUUIDForName:(NSString *)agentName +{ + /* We would like to have same UUIDs for an interface/domain. So here is a way to fix this, + without maintaining any state in configd. + + - We know that every agent has a unique name. + - Use that name to calculate an MD5 hash. MD5 because the digest size is 16 bytes, and so it uuid_t. + - create a NSUUID from these raw bytes. + + - So for a name, we would always have the same UUID. + + */ + unsigned char hashValue[CC_SHA256_DIGEST_LENGTH]; + const char *strForHash = [agentName UTF8String]; + CC_SHA256(strForHash, (CC_LONG)strlen(strForHash), hashValue); + + return [[NSUUID alloc] initWithUUIDBytes:hashValue]; +} + +@end diff --git a/src/configd/Plugins/IPMonitor/configAgentDefines.h b/src/configd/Plugins/IPMonitor/configAgentDefines.h new file mode 100644 index 000000000..d2c61c5c2 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/configAgentDefines.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015, 2016 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 CONFIGAGENTDEFINES_H +#define CONFIGAGENTDEFINES_H + +#import "config_agent_info.h" + +#define kConfigAgentType "AgentType" +#define kConfigAgentTypeGeneric "ConfigAgent" + +#define kConfigAgentTypeDNSMulticast kConfigAgentTypeDNS "(m)" +#define kConfigAgentTypeDNSPrivate kConfigAgentTypeDNS "(p)" + +#define kConfigAgentDNSNameServers "NameServers" +#define kConfigAgentDNSSearchDomains "SearchDomains" + +#define kConfigAgentOutOfBandDataUUID "OutOfBandDataUUID" +#define kConfigAgentAgentName "AgentName" +#define kConfigAgentAgentData "AgentData" +#define kConfigAgentAgentUUID "AgentUUID" + +#endif /* CONFIGAGENTDEFINES_H */ diff --git a/src/configd/Plugins/IPMonitor/controller.h b/src/configd/Plugins/IPMonitor/controller.h new file mode 100644 index 000000000..9b90ff18b --- /dev/null +++ b/src/configd/Plugins/IPMonitor/controller.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015, 2016 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 CONTROLLER_H +#define CONTROLLER_H + +#import "configAgent.h" +#import "dnsAgent.h" +#import "proxyAgent.h" + +@interface AgentController : NWNetworkAgentRegistration + +@property (readwrite) dispatch_queue_t controllerQueue; + +- (void)processProxyChanges; +- (void)processDNSChanges; ++ (AgentController *)sharedController; +- (const void *)copyProxyAgentData:(uuid_t)requested_uuid length:(uint64_t *)length; +- (const void *)copyDNSAgentData:(uuid_t)requested_uuid length:(uint64_t *)length; + +@end + +#endif /* CONTROLLER_H */ diff --git a/src/configd/Plugins/IPMonitor/controller.m b/src/configd/Plugins/IPMonitor/controller.m new file mode 100644 index 000000000..78f5573e3 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/controller.m @@ -0,0 +1,2143 @@ +/* + * Copyright (c) 2015-2017 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@ + */ + +#import "controller.h" +#import +#import "ip_plugin.h" + +#define numberToNSNumber(x) [NSNumber numberWithUnsignedInteger:x] + +#define dnsAgentDefault "_defaultDNS" +#define proxyAgentDefault "_defaultProxy" +#define multipleEntitySuffix " #" +#define prefixForInterfaceName "@" + +/* These define the starting and ending order of each policy section */ +#define INIT_ORDER_FOR_SCOPED_INTERFACE_POLICY 100 +#define INIT_ORDER_FOR_DOMAIN_POLICY 500 +#define INIT_ORDER_FOR_DEFAULT_POLICY 1000 + +#define SKIP_ORDER_FOR_SCOPED_INTERFACE_POLICY 250 +#define SKIP_ORDER_FOR_DOMAIN_POLICY 750 +#define SKIP_ORDER_FOR_DEFAULT_POLICY 1250 + +#define POLICY_TYPE_NO_POLICY -1 +#define CONFIG_AGENT_DATA_LIMIT MIN(NETAGENT_MAX_DATA_SIZE, 1024) + +typedef struct resolverList { + dns_resolver_t **default_resolvers; + uint32_t n_default_resolvers; + dns_resolver_t **multicast_resolvers; + uint32_t n_multicast_resolvers; + dns_resolver_t **private_resolvers; + uint32_t n_private_resolvers; +} resolver_list_t; + +@interface AgentController() + +@property (nonatomic) NSMutableDictionary * floatingProxyAgentList; +@property (nonatomic) NSMutableDictionary * floatingDNSAgentList; +@property (nonatomic) NSMutableDictionary * policyDB; +@property (nonatomic) NEPolicySession * policySession; +@property (nonatomic) NEPolicySession * controlPolicySession; + +@end + +@implementation AgentController + +#pragma mark Init + ++ (AgentController *)sharedController +{ + static AgentController * gController = nil; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + gController = [[AgentController alloc] init]; + }); + + @synchronized (gController) { + if (![gController isControllerReady]) { + if (![gController initializeController]) { + return nil; + } + } + } + + return gController; +} + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self initializeController]; + } + + return self; +} + +- (BOOL)initializeController +{ + const char *errorMessage = NULL; + + do { + /* The NE policy session for the controller */ + + if (self.policySession == nil) { + self.policySession = [self createPolicySession]; + if (self.policySession == nil) { + errorMessage = "Failed to create a policy session"; + break; + } + } + + /* A dictionary of all floating proxy agents + * Key : (can be an interface name or domain name) + * Value : agent object + */ + + if (self.floatingProxyAgentList == nil) { + self.floatingProxyAgentList = [NSMutableDictionary dictionary]; + if (self.floatingProxyAgentList == nil) { + errorMessage = "Failed to create a dictionary"; + break; + } + } + + /* A dictionary of all floating dns agents + * Key : (can be an interface name or domain name) + * Value : agent object + */ + + if (self.floatingDNSAgentList == nil) { + self.floatingDNSAgentList = [NSMutableDictionary dictionary]; + if (self.floatingDNSAgentList == nil) { + errorMessage = "Failed to create a dictionary"; + break; + } + } + + /* A dictionary for the maintaining the policy IDs for all installed policy. + * These IDs would be necessary to uninstall a policy when an agent goes away + * Key : agent name (which can be retrieved by [agent getAgentName]) + * Value : An array of integers, each being a policy ID for that agent + */ + + if (self.policyDB == nil) { + self.policyDB = [NSMutableDictionary dictionary]; + if (self.policyDB == nil) { + errorMessage = "Failed to create a dictionary"; + break; + } + } + + /* The queue to run the all processing on */ + + if (self.controllerQueue == nil) { + self.controllerQueue = dispatch_queue_create("com.apple.SystemConfiguration.controllerQueue", NULL); + if (self.controllerQueue == nil) { + errorMessage = "Failed to create a queue"; + break; + } + } + } while (0); + + if (errorMessage != NULL) { + /* Some error occurred. This is unlikely during controller initialization... */ + SC_log(LOG_ERR, "Error occured while initializing AgentController: %s", errorMessage); + _SC_crash(errorMessage, NULL, NULL); + return NO; + } + + return YES; +} + +- (NEPolicySession *)createPolicySession +{ + return [[NEPolicySession alloc] init]; +} + +- (BOOL)isControllerReady +{ + /* Make sure that we have all our data structures in place */ + return ((self.policySession != nil) && + (self.floatingProxyAgentList != nil) && + (self.floatingDNSAgentList != nil) && + (self.policyDB != nil) && + (self.controllerQueue != nil)); +} + +/* ========================== proxy agent helpers =========================== */ +#pragma mark Proxy agent helper functions + +- (NSData *)dataForProxyArray:(CFArrayRef)proxy_array_for_data +{ + CFDataRef data = NULL; + (void)_SCSerialize(proxy_array_for_data, &data, NULL, NULL); + return (__bridge_transfer NSData *)data; +} + +- (NSData *)dataForProxyDictionary:(CFDictionaryRef)domain_proxy +{ + NSData * data = nil; + CFMutableDictionaryRef domain_proxy_dict; + + if (domain_proxy == NULL) { + SC_log(LOG_NOTICE, "Invalid domain proxy dict"); + return nil; + } + + domain_proxy_dict = CFDictionaryCreateMutableCopy(NULL, 0, domain_proxy); + CFDictionaryRemoveValue(domain_proxy_dict, kSCPropNetProxiesSupplementalMatchDomain); + + data = (__bridge_transfer NSData *)(SCNetworkProxiesCreateProxyAgentData(domain_proxy_dict)); + CFRelease(domain_proxy_dict); + + return data; +} + +- (NSData *)getProxyDataFromCurrentConfig:(CFDictionaryRef)proxies + domain:(NSString *)domain +{ + CFIndex count; + CFIndex idx; + CFArrayRef supplemental; + + if (proxies == NULL || domain == nil) { + SC_log(LOG_NOTICE, "Invalid proxies/domain"); + return nil; + } + + supplemental = CFDictionaryGetValue(proxies, kSCPropNetProxiesSupplemental); + count = supplemental ? CFArrayGetCount(supplemental) : 0; + + for (idx = 0; idx < count; idx++) { + CFDictionaryRef domain_proxy; + CFStringRef match_domain; + + domain_proxy = CFArrayGetValueAtIndex(supplemental, idx); + match_domain = CFDictionaryGetValue(domain_proxy, kSCPropNetProxiesSupplementalMatchDomain); + if (match_domain != NULL && CFEqual(match_domain, (__bridge CFTypeRef)(domain))) { + return [self dataForProxyDictionary:domain_proxy]; + } + } + + return nil; +} + +- (bool)getIntValue:(CFTypeRef)cf_value + valuePtr:(int *) int_value_ptr +{ + bool valid = false; + if (cf_value && CFGetTypeID(cf_value) == CFNumberGetTypeID() && CFNumberGetValue(cf_value, kCFNumberIntType, int_value_ptr)) + { + valid = true; + } + return valid; +} + +- (int)countProxyEntriesEnabled:(CFDictionaryRef)proxies +{ + int enabled = 0; + + if (proxies == NULL) { + SC_log(LOG_NOTICE, "Invalid proxies"); + return 0; + } + + if (([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesHTTPEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesHTTPSEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesProxyAutoConfigEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesFTPEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesGopherEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesRTSPEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesSOCKSEnable) valuePtr:&enabled] && enabled > 0) || + ([self getIntValue:CFDictionaryGetValue(proxies, kSCPropNetProxiesProxyAutoDiscoveryEnable) valuePtr:&enabled] && enabled > 0)) { + return enabled; + } + + return 0; +} + +- (void)processSupplementalProxyChanges:(CFDictionaryRef)proxies +{ + CFIndex count; + NSMutableArray * deleteList; + NSCountedSet * duplicate_domain_list; + CFIndex idx; + NSMutableArray * new_domain_list; + NSMutableArray * old_domain_list; + CFArrayRef supplemental; + NSMutableArray * update_agent_list; + + if (proxies == NULL) { + SC_log(LOG_INFO, "No proxy config to process"); + return; + } + + old_domain_list = [self getAgentList:self.floatingProxyAgentList + agentType:kAgentTypeProxy + agentSubType:kAgentSubTypeSupplemental]; + duplicate_domain_list = [[NSCountedSet alloc] initWithCapacity:0]; + new_domain_list = [NSMutableArray array]; + update_agent_list = [NSMutableArray array]; + supplemental = CFDictionaryGetValue(proxies, kSCPropNetProxiesSupplemental); + count = supplemental ? CFArrayGetCount(supplemental) : 0; + deleteList = [NSMutableArray array]; + + for (idx = 0; idx < count; idx++) { + CFDictionaryRef domain_proxy; + CFStringRef match_domain; + int proxy_count; + + domain_proxy = CFArrayGetValueAtIndex(supplemental, idx); + match_domain = CFDictionaryGetValue(domain_proxy, kSCPropNetProxiesSupplementalMatchDomain); + if (match_domain == NULL) { + continue; + } + + /* This domain is present in current config. But if it has generic (no protocols enabled) + * proxy content, there is no real use of that agent. Do NOT add it to + * the new_domain_list. + * + * This way, if there was an agent previously for this domain, + * it will be destroyed AND since it is not present in the new domain list, we wont + * spawn a new agent too! :) + */ + + proxy_count = [self countProxyEntriesEnabled:domain_proxy]; + if (proxy_count == 0) { + SC_log(LOG_INFO, "Proxy settings on %@ are generic. Not recognizing as new domain", match_domain); + continue; + } + + [new_domain_list addObject:(__bridge NSString *)match_domain]; + } + + [self cleanConflictingAgentsFromList:old_domain_list + new_list:new_domain_list + agentDictionary:self.floatingProxyAgentList]; + + for (NSString *key in old_domain_list) { + BOOL domain_present; + + domain_present = [new_domain_list containsObject:key]; + if (domain_present == NO) { + id agent; + + agent = [self.floatingProxyAgentList objectForKey:key]; + [self destroyFloatingAgent:agent]; + } + } + + /* At this point, whatever is in the controller's floating agent list, + * is present in the current proxy config. The current proxy config + * might have even more configs, not known to the controller, YET + */ + + for (NSString *domain in old_domain_list) { + id agent; + id mapped_agent; + + agent = [self.floatingProxyAgentList objectForKey:domain]; + if (agent == nil) { + continue; + } + + /* Am I mapped to some agent? */ + mapped_agent = [agent getAgentMapping]; + if (mapped_agent) { + /* OK, this agent is mapped to some other agent. We compare this agent's data + * to the current data of the agent to which it is mapped. If different, we destroy + * the agent and later map it to someone else OR spawn a new one. + */ + NSData * mapped_agent_data; + + mapped_agent_data = [self getProxyDataFromCurrentConfig:proxies domain:[mapped_agent getAssociatedEntity]]; + if (mapped_agent_data == nil || ![[agent getAgentData] isEqual:mapped_agent_data]) { + /* Something changed for mapped agent */ + [deleteList addObject:agent]; + continue; + } + } else { + /* Since this agent is NOT mapped to any other agent, this agent is + * registered with the kernel. So instead of destroying the agent and + * re-registering it, just update it here. + * + * All the agents which were mapped to this agent, will be deleted and + * re-mapped, if the data changed. + */ + NSData * agent_data; + + agent_data = [self getProxyDataFromCurrentConfig:proxies domain:[agent getAssociatedEntity]]; + if (![[agent getAgentData] isEqual:agent_data]) { + /* Something changed for agent */ + [agent updateAgentData:agent_data]; + + /* The reason I don't publish the data to agent here is that, if there were + * some agents mapping to this one, they will momentarily have a policy for + * using this agent UUID for some domain based on this agent's previous data. + */ + [update_agent_list addObject:agent]; + } + } + [new_domain_list removeObject:domain]; + } + + for (id agent in deleteList) { + SC_log(LOG_INFO, "Destroying agent %@ because something changed!", [agent getAgentName]); + [self destroyFloatingAgent:agent]; + } + + for (id agent in update_agent_list) { + [self publishToAgent:agent]; + } + + for (idx = 0; idx < count; idx++) { + CFDictionaryRef domain_proxy; + CFStringRef match_domain; + + domain_proxy = CFArrayGetValueAtIndex(supplemental, idx); + match_domain = CFDictionaryGetValue(domain_proxy, kSCPropNetProxiesSupplementalMatchDomain); + + if (match_domain != NULL) { + NSData * data; + NSUInteger found; + id mapped_agent; + + found = [new_domain_list indexOfObject:(__bridge id _Nonnull)(match_domain)]; + if (found == NSNotFound) { + continue; + } + + /* + * We will only process agents which are mapped AND the agent they were mapped to, changed OR + * agents for domains which we did not know before. + */ + + NSUInteger domainInstance = [duplicate_domain_list countForObject:(__bridge id _Nonnull)(match_domain)]; + if (domainInstance > 0) { + /* domainInstance will be > 0, only if we have conflicting domains */ + domainInstance++; + NSString *ns_domain_name_copy = [NSString stringWithFormat:@"%@" multipleEntitySuffix "%lu", match_domain, (unsigned long)domainInstance]; + + data = [self dataForProxyDictionary:domain_proxy]; + + BOOL ok = [self spawnFloatingAgent:[ProxyAgent class] + entity:ns_domain_name_copy + agentSubType:kAgentSubTypeSupplemental + addPolicyOfType:NEPolicyConditionTypeDomain + publishData:data]; + if (ok) { + id agent = [self.floatingProxyAgentList objectForKey:ns_domain_name_copy]; + SC_log(LOG_INFO, "Duplicate Proxy agent %@", [agent getAgentName]);; + } + } else { + data = [self dataForProxyDictionary:domain_proxy]; + mapped_agent = [self getAgentWithSameDataAndSubType:self.floatingProxyAgentList + data:data + subType:kAgentSubTypeSupplemental]; + if (mapped_agent != nil) { + [self spawnMappedFloatingAgent:mapped_agent + entity:(__bridge NSString *)(match_domain) + agentSubType:kAgentSubTypeSupplemental + addPolicyOfType:NEPolicyConditionTypeDomain + updateData:data]; + } else { + [self spawnFloatingAgent:[ProxyAgent class] + entity:(__bridge NSString *)(match_domain) + agentSubType:kAgentSubTypeSupplemental + addPolicyOfType:NEPolicyConditionTypeDomain + publishData:data]; + } + } + + [new_domain_list removeObjectAtIndex:found]; + [duplicate_domain_list addObject:(__bridge id _Nonnull)(match_domain)]; + } + } + + return; +} + +- (void)processScopedProxyChanges:(CFDictionaryRef)proxies +{ + NSMutableArray * old_intf_list; + CFDictionaryRef scoped_proxies; + CFIndex scoped_proxies_count; + + old_intf_list = [self getAgentList:self.floatingProxyAgentList + agentType:kAgentTypeProxy + agentSubType:kAgentSubTypeScoped]; + + scoped_proxies = CFDictionaryGetValue(proxies, kSCPropNetProxiesScoped); + scoped_proxies_count = scoped_proxies ? CFDictionaryGetCount(scoped_proxies) : 0; + + if (scoped_proxies_count > 0) { + const void **keys; + + keys = malloc(scoped_proxies_count * sizeof(void *)); + CFDictionaryGetKeysAndValues(scoped_proxies, keys, NULL); + + for (int i = 0; i < scoped_proxies_count; i++) { + NSData * data = nil; + NSUInteger idx; + CFArrayRef matching; + NSString * ns_if_name; + NSString * ns_if_name_with_prefix; + int proxy_count = 0; + id proxyAgent; + + ns_if_name = (__bridge NSString *)keys[i]; + ns_if_name_with_prefix = [NSString stringWithFormat:@"%s%@", prefixForInterfaceName, ns_if_name]; + + /* Does the proxy config have any protocols enabled? */ + proxy_count = [self countProxyEntriesEnabled:CFDictionaryGetValue(scoped_proxies, + (__bridge const void *)(ns_if_name))]; + + if (proxy_count == 0) { + SC_log(LOG_INFO, "Proxy settings on %@ are generic. Skipping", ns_if_name); + continue; + } + + idx = [old_intf_list indexOfObject:ns_if_name_with_prefix]; + + matching = SCNetworkProxiesCopyMatching(proxies, NULL, (__bridge CFStringRef)(ns_if_name)); + if (matching != NULL) { + data = [self dataForProxyArray:matching]; + CFRelease(matching); + } + + if (idx == NSNotFound) { + /* We need to spawn an agent */ + [self spawnFloatingAgent:[ProxyAgent class] + entity:ns_if_name_with_prefix + agentSubType:kAgentSubTypeScoped + addPolicyOfType:NEPolicyConditionTypeScopedInterface + publishData:data]; + + continue; + } else { + /* We have an agent for this interface. Update it */ + [old_intf_list removeObjectAtIndex:idx]; + } + + proxyAgent = [self.floatingProxyAgentList objectForKey:ns_if_name_with_prefix]; + if (proxyAgent != nil) { + /* Do we need to update this agent? */ + [proxyAgent updateAgentData:data]; + if ([proxyAgent shouldUpdateAgent]) { + [self publishToAgent:proxyAgent]; + } + } + } + + free(keys); + } + + [self deleteAgentList:self.floatingProxyAgentList list:old_intf_list]; +} + +- (void)processServiceSpecificProxyChanges:(CFDictionaryRef)proxies +{ + NSMutableArray * old_service_list; + CFDictionaryRef service_proxies; + CFIndex service_proxies_count; + + old_service_list = [self getAgentList:self.floatingProxyAgentList + agentType:kAgentTypeProxy + agentSubType:kAgentSubTypeServiceSpecific]; + + service_proxies = CFDictionaryGetValue(proxies, kSCPropNetProxiesServices); + service_proxies_count = service_proxies ? CFDictionaryGetCount(service_proxies) : 0; + + if (service_proxies_count > 0) { + const void **keys; + + keys = malloc(service_proxies_count * sizeof(void *)); + CFDictionaryGetKeysAndValues(service_proxies, keys, NULL); + + for (int i = 0; i < service_proxies_count; i++) { + NSData * data = nil; + NSUInteger idx; + NSString * ns_service_identifier = nil; + NSString * ns_service_with_prefix = nil; + int proxy_count = 0; + id proxyAgent; + CFDictionaryRef proxyDict = NULL; + + ns_service_identifier = (__bridge NSString *)keys[i]; + ns_service_with_prefix = [NSString stringWithFormat:@"%s%@", prefixForInterfaceName, ns_service_identifier]; + + /* Does the proxy config have any protocols enabled? */ + proxy_count = [self countProxyEntriesEnabled:CFDictionaryGetValue(service_proxies, + (__bridge const void *)(ns_service_identifier))]; + + if (proxy_count == 0) { + SC_log(LOG_INFO, "Proxy settings on %@ are generic. Skipping", ns_service_identifier); + continue; + } + + proxyDict = CFDictionaryGetValue(service_proxies, (__bridge CFStringRef)ns_service_identifier); + if (proxyDict != nil) { + data = [self dataForProxyArray:(__bridge CFArrayRef)(@[ (__bridge NSDictionary *)proxyDict ])]; + } + + idx = [old_service_list indexOfObject:ns_service_with_prefix]; + if (idx == NSNotFound) { + /* We need to spawn an agent */ + [self spawnFloatingAgent:[ProxyAgent class] + entity:ns_service_with_prefix + agentSubType:kAgentSubTypeServiceSpecific + addPolicyOfType:(POLICY_TYPE_NO_POLICY) /* Don't install a policy */ + publishData:data]; + + continue; + } else { + /* We have an agent for this service. Update it */ + [old_service_list removeObjectAtIndex:idx]; + } + + proxyAgent = [self.floatingProxyAgentList objectForKey:ns_service_with_prefix]; + if (proxyAgent != nil) { + /* Do we need to update this agent? */ + [proxyAgent updateAgentData:data]; + if ([proxyAgent shouldUpdateAgent]) { + [self publishToAgent:proxyAgent]; + } + } + } + + free(keys); + } + + [self deleteAgentList:self.floatingProxyAgentList list:old_service_list]; +} + +- (BOOL)isGlobalProxy:(CFDictionaryRef)proxies +{ + if (CFDictionaryContainsKey(proxies, kSCPropNetProxiesBypassAllowed)) { + /* + * Since we did not ask to "bypass" the proxies, this key will always + * be present in a managed (global) proxy configuration + */ + return YES; + } + + return NO; +} + +- (void)processDefaultProxyChanges:(CFDictionaryRef)proxies +{ + CFArrayRef global_proxy; + CFIndex global_proxy_count; + CFMutableDictionaryRef proxies_copy; + + proxies_copy = CFDictionaryCreateMutableCopy(NULL, 0, proxies); + CFDictionaryRemoveValue(proxies_copy, kSCPropNetProxiesScoped); + CFDictionaryRemoveValue(proxies_copy, kSCPropNetProxiesServices); + CFDictionaryRemoveValue(proxies_copy, kSCPropNetProxiesSupplemental); + + global_proxy = CFArrayCreate(NULL, (const void **)&proxies_copy, 1, &kCFTypeArrayCallBacks); + global_proxy_count = CFArrayGetCount(global_proxy); + if (global_proxy_count > 0 && + [self countProxyEntriesEnabled:proxies_copy] == 0) { + SC_log(LOG_INFO, "Proxy settings on defaultProxy are generic. Skipping"); + global_proxy_count = 0; + } + CFRelease(proxies_copy); + + if (global_proxy_count > 0) { + BOOL spawnAgent = YES; + id proxyAgent; + NSData * data; + + data = [self dataForProxyArray:global_proxy]; + proxyAgent = [self.floatingProxyAgentList objectForKey:@proxyAgentDefault]; + if (proxyAgent != nil) { + if (![data isEqual:[proxyAgent getAgentData]]) { + [self destroyFloatingAgent:proxyAgent]; + } else { + spawnAgent = NO; + } + } + + if (spawnAgent) { + AgentSubType subtype = kAgentSubTypeDefault; + NEPolicyConditionType conditionType = NEPolicyConditionTypeNone; + if ([self isGlobalProxy:proxies_copy]) { + SC_log(LOG_INFO, "Global proxy detected..."); + conditionType = NEPolicyConditionTypeAllInterfaces; + subtype = kAgentSubTypeGlobal; + } + + [self spawnFloatingAgent:[ProxyAgent class] + entity:@proxyAgentDefault + agentSubType:subtype + addPolicyOfType:conditionType + publishData:data]; + } + } else { + /* No default proxy config OR generic (no protocols enabled) default proxy config. + * Destroy the default agent if we had one + */ + id proxyAgent; + + proxyAgent = [self.floatingProxyAgentList objectForKey:@proxyAgentDefault]; + if (proxyAgent != nil) { + [self destroyFloatingAgent:proxyAgent]; + } + } + + CFRelease(global_proxy); +} + +- (void)processProxyChanges +{ + CFDictionaryRef proxies; + + proxies = SCDynamicStoreCopyProxiesWithOptions(NULL, NULL); + if (proxies == NULL) { + SC_log(LOG_INFO, "No proxy information"); + + NSMutableDictionary *copy = [self.floatingProxyAgentList copy]; + for (NSString *entity in copy) { + id agent = [copy objectForKey:entity]; + [self destroyFloatingAgent:agent]; + } + + return; + } + + [self processDefaultProxyChanges:proxies]; + [self processScopedProxyChanges:proxies]; + [self processSupplementalProxyChanges:proxies]; + [self processServiceSpecificProxyChanges:proxies]; + + CFRelease(proxies); +} + +/* ========================== DNS agent helpers =========================== */ +#pragma mark DNS agent helper functions + +- (void)freeResolverList:(resolver_list_t *)resolvers +{ + /* This is a shallow free of resolver_list_t only. + * The actual resolver pointers are owned by 'dns_config' + */ + if (resolvers == NULL) { + return; + } + + if (resolvers->default_resolvers != NULL) { + free(resolvers->default_resolvers); + } + if (resolvers->multicast_resolvers != NULL) { + free(resolvers->multicast_resolvers); + } + if (resolvers->private_resolvers != NULL) { + free(resolvers->private_resolvers); + } + + free(resolvers); +} + +- (resolver_list_t *)copyResolverList:(dns_config_t *)dns_config +{ + resolver_list_t *resolvers = NULL; + + if ((dns_config->n_resolver > 0) && (dns_config->resolver != NULL)) { + uint32_t a = 0; + uint32_t b = 0; + uint32_t c = 0; + + resolvers = calloc(1, sizeof(resolver_list_t)); + for (int i = 0; i < dns_config->n_resolver; i++) { + dns_resolver_t *r = dns_config->resolver[i]; + + if ([self isResolverMulticast:r]) { + resolvers->n_multicast_resolvers++; + continue; + + } else if ([self isResolverPrivate:r]) { + resolvers->n_private_resolvers++; + continue; + } + + // do not consider default resolvers with no nameservers + if (r->domain == NULL && r->n_nameserver > 0) { + resolvers->n_default_resolvers++; + } + } + + SC_log(LOG_INFO, "Resolvers: %d default, %d multicast, %d private", + resolvers->n_default_resolvers, + resolvers->n_multicast_resolvers, + resolvers->n_private_resolvers); + + if (resolvers->n_default_resolvers > 0) { + resolvers->default_resolvers = calloc(resolvers->n_default_resolvers, + sizeof(dns_resolver_t *)); + } + if (resolvers->n_multicast_resolvers > 0) { + resolvers->multicast_resolvers = calloc(resolvers->n_multicast_resolvers, + sizeof(dns_resolver_t *)); + } + if (resolvers->n_private_resolvers > 0) { + resolvers->private_resolvers = calloc(resolvers->n_private_resolvers, + sizeof(dns_resolver_t *)); + } + + for (int i = 0; i < dns_config->n_resolver; i++) { + dns_resolver_t *r = dns_config->resolver[i]; + + if ([self isResolverMulticast:r] && + (a < resolvers->n_multicast_resolvers)) { + resolvers->multicast_resolvers[a++] = r; + continue; + + } else if ([self isResolverPrivate:r] && + (b < resolvers->n_private_resolvers)) { + resolvers->private_resolvers[b++] = r; + continue; + } + + if ((r->domain == NULL) && + (r->n_nameserver > 0) && + (c < resolvers->n_default_resolvers)) { + resolvers->default_resolvers[c++] = r; + } + } + } + + return resolvers; +} + +/* + * Generate a data blob for the resolver. + * Currently the blob only has: + * - nameserver count + * - sockaddr structs for each nameserver + * - ifindex + */ + +- (NSData *)dataForResolver:(dns_resolver_t *)resolver +{ + NSData * data = nil; + CFMutableDictionaryRef resolverDict = nil; + + if (resolver == NULL) { + SC_log(LOG_NOTICE, "Invalid dns resolver"); + return nil; + } + + if (resolver->n_search > 0) { + if (resolverDict == nil) { + resolverDict = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + + CFMutableArrayRef searchDomainArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + /* Append search domains */ + for (int i = 0; i < resolver->n_search; i++) { + CFArrayAppendValue(searchDomainArray, (__bridge CFStringRef)(@(resolver->search[i]))); + } + + CFDictionaryAddValue(resolverDict, CFSTR(kConfigAgentDNSSearchDomains), searchDomainArray); + CFRelease(searchDomainArray); + } + + /* Get the count of nameservers */ + if (resolver->n_nameserver > 0) { + if (resolverDict == nil) { + resolverDict = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + + CFMutableArrayRef nameserverArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + /* Get all the nameservers */ + for (int i = 0; i < resolver->n_nameserver; i++) { + char buf[128] = {0}; + _SC_sockaddr_to_string(resolver->nameserver[i], buf, sizeof(buf)); + if (*buf != '\0') { + CFArrayAppendValue(nameserverArray, (__bridge CFStringRef)(@(buf))); + } + } + + CFDictionaryAddValue(resolverDict, CFSTR(kConfigAgentDNSNameServers), nameserverArray); + CFRelease(nameserverArray); + } + + if (resolverDict != nil) { + data = [NSPropertyListSerialization dataWithPropertyList:(__bridge id _Nonnull)(resolverDict) + format:NSPropertyListBinaryFormat_v1_0 + options:0 + error:nil]; + + CFRelease(resolverDict); + } + + return (NSData *)data; +} + +- (NSData *)getDNSDataFromCurrentConfig:(dns_config_t *)dns_config + domain:(NSString *)domain +{ + if (dns_config == NULL || domain == nil) { + SC_log(LOG_NOTICE, "Invalid dns_config/domain"); + return nil; + } + + if ((dns_config->n_resolver > 0) && (dns_config->resolver != NULL)) { + for (int i = 0; i < dns_config->n_resolver; i++) { + dns_resolver_t * resolver; + + resolver = dns_config->resolver[i]; + if (resolver->domain != NULL && + ![self isResolverMulticast:resolver]) { + NSString * ns_domain_name; + + ns_domain_name = @(resolver->domain); + if ([ns_domain_name isEqualToString:domain]) { + return [self dataForResolver:resolver]; + } else { + continue; + } + } + } + } + + return nil; +} + +- (BOOL)isResolverMulticast:(dns_resolver_t *)resolver +{ + if (resolver->options == NULL) { + return NO; + } + + if (!strstr(resolver->options, "mdns")) { + return NO; + } + + return YES; +} + +- (BOOL)isResolverPrivate:(dns_resolver_t *)resolver +{ + if (resolver->options == NULL) { + return NO; + } + + if (!strstr(resolver->options, "pdns")) { + return NO; + } + + return YES; +} + +- (void)processSupplementalDNSResolvers:(dns_config_t *)dns_config +{ + NSMutableArray * deleteList; + NSMutableArray * new_domain_list; + NSCountedSet * duplicate_domain_list; + NSMutableArray * old_domain_list; + NSMutableArray * update_agent_list; + + + deleteList = [NSMutableArray array]; + duplicate_domain_list = [[NSCountedSet alloc] initWithCapacity:0]; + new_domain_list = [NSMutableArray array]; + update_agent_list = [NSMutableArray array]; + old_domain_list = [self getAgentList:self.floatingDNSAgentList + agentType:kAgentTypeDNS + agentSubType:kAgentSubTypeSupplemental]; + + if (dns_config->resolver == NULL) { + dns_config->n_resolver = 0; + } + if (dns_config->n_resolver > 0) { + for (int i = 0; i < dns_config->n_resolver; i++) { + dns_resolver_t * resolver; + + resolver = dns_config->resolver[i]; + if (resolver->domain != NULL && + ![self isResolverPrivate:resolver] && + ![self isResolverMulticast:resolver]) { + NSString * ns_domain_name; + + ns_domain_name = [NSString stringWithCString:resolver->domain encoding:NSASCIIStringEncoding]; + [new_domain_list addObject:ns_domain_name]; + } + } + } + + [self cleanConflictingAgentsFromList:old_domain_list + new_list:new_domain_list + agentDictionary:self.floatingDNSAgentList]; + + /* Sync between controller and current config */ + for (NSString *key in old_domain_list) { + BOOL domain_present = NO; + + domain_present = [new_domain_list containsObject:key]; + if (domain_present == NO) { + id agent; + + agent = [self.floatingDNSAgentList objectForKey:key]; + [self destroyFloatingAgent:agent]; + } + } + + /* At this point, whatever is in the controller's floating agent list, + is present in the current DNS config. The current DNS config + might have even more configs, not known to the controller, YET + */ + + for (NSString *domain in old_domain_list) { + id agent; + id mapped_agent; + + agent = [self.floatingDNSAgentList objectForKey:domain]; + if (agent == nil) { + continue; + } + + /* Am I mapped to some agent? */ + mapped_agent = [agent getAgentMapping]; + if (mapped_agent) { + /* OK, this agent is mapped to some other agent. We compare this agent's data + * to the current data of the agent to which it is mapped. If different, we destroy + * the agent and later map it to someone else OR spawn a new one. + */ + NSData *mapped_agent_data; + + mapped_agent_data = [self getDNSDataFromCurrentConfig:dns_config domain:[mapped_agent getAssociatedEntity]]; + if (mapped_agent_data == nil || ![[agent getAgentData] isEqual:mapped_agent_data]) { + /* Something changed for mapped agent */ + [deleteList addObject:agent]; + continue; + } + } else { + /* Since this agent is NOT mapped to any other agent, this agent is + * registered with the kernel. So instead of destroying the agent and + * re-registering it, just update it here. + * + * All the agents which were mapped to this agent, will be deleted and + * re-mapped, if the data changed. + */ + NSData *agent_data; + + agent_data = [self getDNSDataFromCurrentConfig:dns_config domain:[agent getAssociatedEntity]]; + if (![[agent getAgentData] isEqual:agent_data]) { + /* Something changed for agent */ + [agent updateAgentData:agent_data]; + + /* The reason I don't publish the data to agent here is that, if there were + * some agents mapping to this one, they will momentarily have a policy for + * using this agent UUID for some domain based on this agent's previous data. + */ + [update_agent_list addObject:agent]; + + } + } + [new_domain_list removeObject:domain]; + } + + for (id agent in deleteList) { + SC_log(LOG_INFO, "Destroying agent %@ because something changed!", [agent getAgentName]); + [self destroyFloatingAgent:agent]; + } + + for (id agent in update_agent_list) { + [self publishToAgent:agent]; + } + + for (int idx = 0; idx < dns_config->n_resolver; idx++) { + dns_resolver_t * resolver; + + resolver = dns_config->resolver[idx]; + if (resolver->domain != NULL && + ![self isResolverPrivate:resolver] && + ![self isResolverMulticast:resolver]) { + NSData * data; + NSUInteger found; + id mapped_agent; + NSString * ns_domain_name; + + ns_domain_name = @(resolver->domain); + found = [new_domain_list indexOfObject:ns_domain_name]; + if (found == NSNotFound) { + /* Nothing changed for this agent */ + continue; + } + + /* We will only process agents which are mapped AND if the agent they were mapped to, changed OR + * agents for domains which we did not know before. + */ + + NSUInteger domainInstance = [duplicate_domain_list countForObject:ns_domain_name]; + if (domainInstance > 0) { + /* domainInstance will be > 0, only if we have conflicting domains */ + domainInstance++; + data = [self dataForResolver:resolver]; + + NSString *ns_domain_name_copy = [NSString stringWithFormat:@"%@" multipleEntitySuffix "%lu", ns_domain_name, (unsigned long)domainInstance]; + + BOOL ok = [self spawnFloatingAgent:[DNSAgent class] + entity:ns_domain_name_copy + agentSubType:kAgentSubTypeSupplemental + addPolicyOfType:NEPolicyConditionTypeDomain + publishData:data]; + if (ok) { + id agent = [self.floatingDNSAgentList objectForKey:ns_domain_name_copy]; + SC_log(LOG_INFO, "Duplicate DNS agent %@", [agent getAgentName]);; + } + } else { + data = [self dataForResolver:resolver]; + mapped_agent = [self getAgentWithSameDataAndSubType:self.floatingDNSAgentList + data:data + subType:kAgentSubTypeSupplemental]; + if (mapped_agent != nil) { + [self spawnMappedFloatingAgent:mapped_agent + entity:ns_domain_name + agentSubType:kAgentSubTypeSupplemental + addPolicyOfType:NEPolicyConditionTypeDomain + updateData:data]; + } else { + [self spawnFloatingAgent:[DNSAgent class] + entity:ns_domain_name + agentSubType:kAgentSubTypeSupplemental + addPolicyOfType:NEPolicyConditionTypeDomain + publishData:data]; + } + } + + [new_domain_list removeObjectAtIndex:found]; + [duplicate_domain_list addObject:ns_domain_name]; + } + } + + return; + +} + +- (void)processDNSResolvers:(dns_config_t *)dns_config +{ + resolver_list_t *resolvers = [self copyResolverList:dns_config]; + if (resolvers) { + /* Process Default resolvers */ + NSMutableArray *old_default_resolver_list = [self getAgentList:self.floatingDNSAgentList + agentType:kAgentTypeDNS + agentSubType:kAgentSubTypeDefault]; + + // For default resolvers, their name will be '_defaultDNS', '_defaultDNS #2' so on... + if (resolvers->n_default_resolvers > 0 && resolvers->default_resolvers != NULL) { + for (uint32_t i = 0; i < resolvers->n_default_resolvers; i++) { + dns_resolver_t *default_resolver = resolvers->default_resolvers[i]; + NSData * data; + id dnsAgent; + NSString * resolverName; + + data = [self dataForResolver:default_resolver]; + if (i == 0) { + resolverName = @(dnsAgentDefault); + } else { + resolverName = [NSString stringWithFormat:@dnsAgentDefault multipleEntitySuffix "%d", i+1 ]; + } + + dnsAgent = [self.floatingDNSAgentList objectForKey:resolverName]; + + if (dnsAgent != nil) { + [old_default_resolver_list removeObject:resolverName]; + if ([data isEqual:[dnsAgent getAgentData]]) { + /* Leave this agent in place. Nothing changed! */ + continue; + } else { + [self destroyFloatingAgent:dnsAgent]; + } + } + + [self spawnFloatingAgent:[DNSAgent class] + entity:resolverName + agentSubType:kAgentSubTypeDefault + addPolicyOfType:NEPolicyConditionTypeNone + publishData:data]; + } + } + + // Only agents that are NOT present in the new config, will be present in the list + // and they need to be destroyed. + [self deleteAgentList:self.floatingDNSAgentList list:old_default_resolver_list]; + + /* Process Multicast resolvers */ + + NSMutableArray *old_multicast_resolver_list = [self getAgentList:self.floatingDNSAgentList + agentType:kAgentTypeDNS + agentSubType:kAgentSubTypeMulticast]; + + if (resolvers->n_multicast_resolvers > 0 && resolvers->multicast_resolvers != NULL) { + for (uint32_t i = 0; i < resolvers->n_multicast_resolvers; i++) { + dns_resolver_t * multicast_resolver = resolvers->multicast_resolvers[i]; + id dnsAgent; + NSString * resolverName; + + if (multicast_resolver == NULL) { + continue; + } + + if (multicast_resolver->domain == NULL) { + /* Multicast resolvers MUST have a domain */ + continue; + } + + resolverName = @(multicast_resolver->domain); + if (resolverName == NULL) { + /* Multicast resolvers MUST have a domain */ + continue; + } + + dnsAgent = [self.floatingDNSAgentList objectForKey:resolverName]; + if (dnsAgent != nil) { + [old_multicast_resolver_list removeObject:resolverName]; + continue; + } + + [self spawnFloatingAgent:[DNSAgent class] + entity:resolverName + agentSubType:kAgentSubTypeMulticast + addPolicyOfType:NEPolicyConditionTypeDomain + publishData:nil]; + // Don't care about data for mdns resolvers. Do we? + } + } + + [self deleteAgentList:self.floatingDNSAgentList list:old_multicast_resolver_list]; + + /* Process Private resolvers */ + + NSMutableArray *old_private_resolver_list = [self getAgentList:self.floatingDNSAgentList + agentType:kAgentTypeDNS + agentSubType:kAgentSubTypePrivate]; + + if (resolvers->n_private_resolvers > 0 && resolvers->private_resolvers != NULL) { + for (uint32_t i = 0; i < resolvers->n_private_resolvers; i++) { + dns_resolver_t * private_resolver = resolvers->private_resolvers[i]; + id dnsAgent; + NSString * resolverName; + + if (private_resolver == NULL) { + continue; + } + + if (private_resolver->domain == NULL) { + /* private resolvers MUST have a domain */ + continue; + } + + resolverName = @(private_resolver->domain); + if (resolverName == nil) { + /* Private resolvers MUST have a domain */ + continue; + } + + dnsAgent = [self.floatingDNSAgentList objectForKey:resolverName]; + if (dnsAgent != nil) { + [old_private_resolver_list removeObject:resolverName]; + continue; + } + + [self spawnFloatingAgent:[DNSAgent class] + entity:resolverName + agentSubType:kAgentSubTypePrivate + addPolicyOfType:NEPolicyConditionTypeDomain + publishData:nil]; + // Don't care about data for pdns resolvers. Do we? + } + } + + [self deleteAgentList:self.floatingDNSAgentList list:old_private_resolver_list]; + } + + [self freeResolverList:resolvers]; +} + +- (void)processScopedDNSResolvers:(dns_config_t *)dns_config +{ + NSMutableArray * old_intf_list; + old_intf_list = [self getAgentList:self.floatingDNSAgentList + agentType:kAgentTypeDNS + agentSubType:kAgentSubTypeScoped]; + + if ((dns_config->n_scoped_resolver > 0) && (dns_config->scoped_resolver != NULL)) { + for (int i = 0; i < dns_config->n_scoped_resolver; i++) { + char buf[IFNAMSIZ]; + NSData * data; + id dnsAgent; + NSUInteger idx; + const char * if_name; + NSString * ns_if_name; + NSString * ns_if_name_with_prefix; + dns_resolver_t * resolver; + + resolver = dns_config->scoped_resolver[i]; + if_name = my_if_indextoname(resolver->if_index, buf); + if (if_name) { + ns_if_name = @(if_name); + ns_if_name_with_prefix = [NSString stringWithFormat:@"%s%@", prefixForInterfaceName, ns_if_name]; + } else { + continue; + } + + data = [self dataForResolver:resolver]; + idx = [old_intf_list indexOfObject:ns_if_name_with_prefix]; + + if (idx == NSNotFound) { + /* We need to spawn an agent */ + [self spawnFloatingAgent:[DNSAgent class] + entity:ns_if_name_with_prefix + agentSubType:kAgentSubTypeScoped + addPolicyOfType:NEPolicyConditionTypeScopedInterface + publishData:data]; + continue; + } else { + /* We have an agent on this interface. Update it */ + [old_intf_list removeObjectAtIndex:idx]; + } + + /* Get the DNS agent for this interface? */ + dnsAgent = [self.floatingDNSAgentList objectForKey:ns_if_name_with_prefix]; + if (dnsAgent != nil) { + /* Do we need to update this agent? */ + [dnsAgent updateAgentData:data]; + if ([dnsAgent shouldUpdateAgent]) { + [self publishToAgent:dnsAgent]; + } + } + } + } + + [self deleteAgentList:self.floatingDNSAgentList list:old_intf_list]; +} + +- (void)processServiceSpecificDNSResolvers:(dns_config_t *)dns_config +{ + NSMutableArray * old_service_list; + old_service_list = [self getAgentList:self.floatingDNSAgentList + agentType:kAgentTypeDNS + agentSubType:kAgentSubTypeServiceSpecific]; + + if ((dns_config->n_service_specific_resolver > 0) && (dns_config->service_specific_resolver != NULL)) { + for (int i = 0; i < dns_config->n_service_specific_resolver; i++) { + NSData * data; + id dnsAgent; + NSUInteger idx; + uint32_t service_identifier; + NSString * ns_service_identifier_with_prefix; + dns_resolver_t * resolver; + + resolver = dns_config->service_specific_resolver[i]; + service_identifier = resolver->service_identifier; + if (service_identifier != 0) { + ns_service_identifier_with_prefix = [NSString stringWithFormat:@"%s%u", prefixForInterfaceName, service_identifier]; + } else { + continue; + } + + data = [self dataForResolver:resolver]; + idx = [old_service_list indexOfObject:ns_service_identifier_with_prefix]; + + if (idx == NSNotFound) { + /* We need to spawn an agent */ + [self spawnFloatingAgent:[DNSAgent class] + entity:ns_service_identifier_with_prefix + agentSubType:kAgentSubTypeServiceSpecific + addPolicyOfType:(POLICY_TYPE_NO_POLICY) /* Don't install a policy */ + publishData:data]; + continue; + } else { + /* We have an agent on this interface. Update it */ + [old_service_list removeObjectAtIndex:idx]; + } + + /* Get the DNS agent for this interface? */ + dnsAgent = [self.floatingDNSAgentList objectForKey:ns_service_identifier_with_prefix]; + if (dnsAgent != nil) { + /* Do we need to update this agent? */ + [dnsAgent updateAgentData:data]; + if ([dnsAgent shouldUpdateAgent]) { + [self publishToAgent:dnsAgent]; + } + } + } + } + + [self deleteAgentList:self.floatingDNSAgentList list:old_service_list]; +} + +#define ONION_RESOLVER_DOMAIN "onion" +- (BOOL)isResolverOnion:(dns_resolver_t *)resolver +{ + if (resolver->domain != NULL && + (strcmp(resolver->domain, ONION_RESOLVER_DOMAIN) == 0)) { + return YES; + } + + return NO; +} + + +- (void)processOnionResolver:(dns_config_t *)dns_config +{ + static NSUInteger policy_id = 0; + + if (dns_config == NULL) { + goto remove_policy; + } + + /* Run through the resolver configurations. We only care for the supplemental resolvers. */ + for (int32_t i = 0; i < dns_config->n_resolver; i++) { + dns_resolver_t *resolver = dns_config->resolver[i]; + if ([self isResolverOnion:resolver]) { + goto remove_policy; + } + } + + /* We do not have any such resolver. Add a system-wide "drop" policy for this domain */ + if (policy_id == 0) { + NEPolicy *policy = [[NEPolicy alloc] initWithOrder:INIT_ORDER_FOR_DOMAIN_POLICY + result:[NEPolicyResult drop] + conditions:@[[NEPolicyCondition domain:@ONION_RESOLVER_DOMAIN]]]; + if (policy != nil) { + policy_id = [self.policySession addPolicy:policy]; + if (![self.policySession apply]) { + policy_id = 0; + SC_log(LOG_NOTICE, "Could not add a [." ONION_RESOLVER_DOMAIN "] drop policy"); + } else { + SC_log(LOG_INFO, "Added a [." ONION_RESOLVER_DOMAIN "] drop policy"); + } + } + } + + return; + +remove_policy: + + /* We have such a resolver in the config OR no DNS config at all. Remove the system-wide "drop" policy for this domain */ + if (policy_id > 0) { + [self.policySession removePolicyWithID:policy_id]; + if (![self.policySession apply]) { + SC_log(LOG_NOTICE, "Could not remove the [." ONION_RESOLVER_DOMAIN "] drop policy"); + } else { + policy_id = 0; + SC_log(LOG_INFO, "Removed the [." ONION_RESOLVER_DOMAIN "] drop policy"); + } + } + + return; +} +#undef ONION_RESOLVER_DOMAIN + + +- (void)processDNSChanges +{ + dns_config_t * dns_config; + + dns_config = dns_configuration_copy(); + if (dns_config == NULL) { + SC_log(LOG_INFO, "No DNS configuration"); + NSMutableDictionary *copy = [self.floatingDNSAgentList copy]; + for (NSString *entity in copy) { + id agent = [copy objectForKey:entity]; + + [self destroyFloatingAgent:agent]; + } + goto done; + } + + [self processDNSResolvers:dns_config]; + [self processScopedDNSResolvers:dns_config]; + [self processSupplementalDNSResolvers:dns_config]; + [self processServiceSpecificDNSResolvers:dns_config]; + +done: + + [self processOnionResolver:dns_config]; + if (dns_config != NULL) { + dns_configuration_free(dns_config); + } +} + +#pragma mark Helper functions + +- (const void *)copyConfigAgentData:(NSMutableDictionary *)controllerDict + uuid:(uuid_t)requested_uuid + length:(uint64_t *)length +{ + if (length == NULL) { + SC_log(LOG_NOTICE, "Invalid parameters for copying agent data"); + return NULL; + } + + id agent = nil; + void *buffer = NULL; + *length = 0; + + for (NSString *key in controllerDict) { + id temp_agent = [controllerDict objectForKey:key]; + + uuid_t agent_uuid; + + [[temp_agent getAgentUUID] getUUIDBytes:agent_uuid]; + if (uuid_compare(agent_uuid, requested_uuid) == 0) { + agent = temp_agent; + break; + } + } + + if (agent == nil) { + uuid_string_t uuid_str; + uuid_unparse(requested_uuid, uuid_str); + SC_log(LOG_NOTICE, "Invalid config agent uuid %s specified", uuid_str); + return NULL; + } + + NSData *data = [agent getAgentData]; + uint64_t len = [data length]; + if (len > 0) { + *length = len; + buffer = malloc((size_t)len); + memcpy(buffer, [data bytes], len); + } + + return (const void *)buffer; +} + +- (const void *)copyProxyAgentData:(uuid_t)requested_uuid + length:(uint64_t *)length +{ + return [self copyConfigAgentData:self.floatingProxyAgentList + uuid:requested_uuid + length:length]; +} + +- (const void *)copyDNSAgentData:(uuid_t)requested_uuid + length:(uint64_t *)length +{ + return [self copyConfigAgentData:self.floatingDNSAgentList + uuid:requested_uuid + length:length]; +} + +- (NSData *)dataLengthSanityCheck:(id)agent +{ + NSData * data = [agent getAgentData]; + + if ([data length] > CONFIG_AGENT_DATA_LIMIT) { + /* We impose a limit on the config agent data as 1KB. + * If we have a data blob larger than this limit, do NOT publish it into the agent. + * Instead publish a key which will trigger fetching of the configuration directly + * through NWI server. + */ + NSMutableDictionary *data_dict = [NSMutableDictionary dictionary]; + + NSUUID *uuid = [agent getAgentUUID]; + uuid_t c_uuid; + [uuid getUUIDBytes:c_uuid]; + NSData *uuid_data = [[NSData alloc] initWithBytes:c_uuid length:sizeof(c_uuid)]; + [data_dict setValue:uuid_data forKey:@kConfigAgentOutOfBandDataUUID]; + + NSData *new_data = [NSPropertyListSerialization dataWithPropertyList:data_dict + format:NSPropertyListBinaryFormat_v1_0 + options:0 + error:nil]; + + return new_data; + } + + return nil; +} + +/* + * For conflicting agents, the convention is that its name & entity, + * will have a suffix " #". This function will sanitize the + * suffix and just return the entity name + */ +- (NSString *)sanitizeEntity:(NSString *)entity +{ + NSRange range = [entity rangeOfString:@multipleEntitySuffix]; + if (range.location != NSNotFound) { + NSString *str = [entity substringToIndex:range.location]; + return str; + } + + return entity; +} + +/* + * For interface names, there is a prefix to differentiate then + * from the domain name (iff there were conflicting domain names). + * Returns the sanitized interface name + */ +- (NSString *)sanitizeInterfaceName:(NSString *)intf +{ + NSRange range = [intf rangeOfString:@prefixForInterfaceName]; + if (range.location != NSNotFound) { + NSString *str = [intf substringFromIndex:(range.location + strlen(prefixForInterfaceName))]; + return str; + } + + return intf; +} + +/* + * For conflicting agents, the convention is that its name & entity, + * will have a suffix " #". This function will return that + */ +- (int)entityInstanceNumber:(NSString *)entity +{ + NSRange range = [entity rangeOfString:@multipleEntitySuffix]; + if (range.location != NSNotFound) { + NSString *str = [entity substringFromIndex:(range.location + strlen(multipleEntitySuffix))]; + return str.intValue; + } + + return 0; +} + +/* + * In case that we have conflicting DNS/Proxy domains + * This function will remove all those conflicting agents, + * so that we can start afresh with the new config + */ +- (void)cleanConflictingAgentsFromList:(NSMutableArray *)old_list + new_list:(NSMutableArray *)new_list + agentDictionary:(NSMutableDictionary *)agent_list +{ + NSCountedSet * duplicate_domain_list; + + for (NSString *domain in old_list) { + /* If we had conflicting domains before, remove all of them */ + NSString *sanitizedDomain = [self sanitizeEntity:domain]; + if (![sanitizedDomain isEqualToString:domain]) { + /* Destroy the original domain */ + id agent = [agent_list objectForKey:sanitizedDomain]; + [self destroyFloatingAgent:agent]; + + /* Destroy the conflicting domain */ + agent = [agent_list objectForKey:domain]; + [self destroyFloatingAgent:agent]; + + SC_log(LOG_INFO, "Removing conflicting domain: %@, %@", sanitizedDomain, domain); + } + } + + duplicate_domain_list = [[NSCountedSet alloc] initWithArray:new_list]; + for (NSString *domain in old_list) { + if ([duplicate_domain_list countForObject:domain] > 1) { + id agent = [agent_list objectForKey:domain]; + [self destroyFloatingAgent:agent]; + SC_log(LOG_INFO, "Removing domain %@ as it has duplicates in the current config", domain); + } + } +} + +/* + * Get the list of agents from a specific dictionary. + * The list of agents will only consist of the ones which + * match the agent type and sub-type + */ + +- (NSMutableArray *)getAgentList:(NSMutableDictionary *)all_agents + agentType:(AgentType)type + agentSubType:(AgentSubType)subtype +{ + NSMutableArray *list = [NSMutableArray array]; + NSArray *agentObjects = [all_agents allValues]; + + for (id agent in agentObjects) { + if (([agent getAgentType] == type) && + ([agent getAgentSubType] == subtype)) { + + [list addObject:[agent getAssociatedEntity]]; + } + } + + return list; +} + +/* + * Destroy all the agents are listed in "list" + */ + +- (void)deleteAgentList:(NSMutableDictionary *)all_agents + list:(NSMutableArray *)list +{ + for (NSString *intf in list) { + id agent; + + agent = [all_agents objectForKey:intf]; + [self destroyFloatingAgent:agent]; + } +} + +/* + * In order to not duplicate agents with same content, + * we map an agent X to agent Y, when their content is the same. + * + * This function tries to find that agent Y + */ + +- (id)getAgentWithSameDataAndSubType:(NSMutableDictionary *)agentList + data:(NSData *)data + subType:(AgentSubType)subtype +{ + for (NSString *key in agentList) { + id agent = [agentList objectForKey:key]; + if ([[agent getAgentData] isEqual:data]) { + /* Do not map to default agents */ + if ([agent getAgentSubType] != subtype) { + continue; + } + + /* Return only registered agents */ + if ([agent getRegistrationObject] != nil) { + return agent; + } + } + } + + return nil; +} + +#pragma mark Policy installation function + +/* + * Add NECP policies for an agent + */ +- (BOOL)addPolicyToFloatingAgent:(id)agent + domain:(NSString *)domain + agentUUIDToUse:(NSUUID *)uuid + policyType:(NEPolicyConditionType)policyType + useControlPolicySession:(BOOL)useControlPolicySession +{ + NEPolicyCondition * condition = nil; + NEPolicySession * session; + uint32_t multiple_entity_offset; + NEPolicy * newPolicy; + BOOL ok; + uint32_t order; + uint32_t orderForSkip; + NSMutableArray * policyArray; + NSUInteger policyID1; + NSUInteger policyID2; + NEPolicyResult * result; + uint32_t skipOrder; + AgentType type; + uint32_t typeOffset; + + type = [agent getAgentType]; + typeOffset = (type == kAgentTypeDNS) ? 0 : 5000; + skipOrder = (type == kAgentTypeDNS) ? 5000 : 0; + + multiple_entity_offset = (uint32_t)[self entityInstanceNumber:domain]; + domain = [self sanitizeEntity:domain]; + + switch (policyType) { + case NEPolicyConditionTypeScopedInterface: + order = INIT_ORDER_FOR_SCOPED_INTERFACE_POLICY + typeOffset + multiple_entity_offset; + domain = [self sanitizeInterfaceName:domain]; + condition = [NEPolicyCondition scopedInterface:domain]; + orderForSkip = SKIP_ORDER_FOR_SCOPED_INTERFACE_POLICY + typeOffset; + break; + + case NEPolicyConditionTypeDomain: + order = INIT_ORDER_FOR_DOMAIN_POLICY + typeOffset + multiple_entity_offset; + condition = [NEPolicyCondition domain:domain]; + orderForSkip = SKIP_ORDER_FOR_DOMAIN_POLICY + typeOffset; + break; + + case NEPolicyConditionTypeAllInterfaces: + order = INIT_ORDER_FOR_DEFAULT_POLICY + typeOffset + multiple_entity_offset; + condition = [NEPolicyCondition allInterfaces]; + orderForSkip = SKIP_ORDER_FOR_DEFAULT_POLICY + typeOffset; + break; + + case NEPolicyConditionTypeNone: + order = INIT_ORDER_FOR_DEFAULT_POLICY + typeOffset + multiple_entity_offset; + orderForSkip = SKIP_ORDER_FOR_DEFAULT_POLICY + typeOffset; + break; + + default: + SC_log(LOG_NOTICE, "Invalid policy condition specified"); + return NO; + } + + result = [NEPolicyResult netAgentUUID:uuid]; + newPolicy = [[NEPolicy alloc] initWithOrder:order + result:result + conditions: (condition ? @[condition] : nil)]; + + if (newPolicy == nil) { + SC_log(LOG_NOTICE, "Could not create a policy for agent %@", [agent getAgentName]); + return NO; + } + + if (useControlPolicySession) { + if (self.controlPolicySession == nil) { + /* The NE policy session at "control" level for the controller */ + self.controlPolicySession = [self createPolicySession]; + if (self.controlPolicySession == nil) { + SC_log(LOG_NOTICE, "Could not create a control policy session for agent %@", [agent getAgentName]); + return NO; + } + [self.controlPolicySession setPriority:NEPolicySessionPriorityControl]; + } + ((ConfigAgent *)agent).preferredPolicySession = self.controlPolicySession; + } else { + ((ConfigAgent *)agent).preferredPolicySession = self.policySession; + } + + session = ((ConfigAgent *)agent).preferredPolicySession; + + policyID1 = [session addPolicy:newPolicy]; + if (policyID1 == 0) { + SC_log(LOG_NOTICE, "Could not add a netagent policy for agent %@", [agent getAgentName]); + return NO; + } + + result = [NEPolicyResult skipWithOrder:skipOrder]; + newPolicy = [[NEPolicy alloc] initWithOrder:orderForSkip + result:result + conditions:(condition ? @[condition] : nil)]; + + if (newPolicy == nil) { + SC_log(LOG_NOTICE, "Could not create a policy for agent %@", [agent getAgentName]); + return NO; + } + + policyID2 = [session addPolicy:newPolicy]; + if (policyID2 == 0) { + SC_log(LOG_NOTICE, "Could not add a skip policy for agent %@", [agent getAgentName]); + return NO; + } + + ok = [session apply]; + if (!ok) { + SC_log(LOG_NOTICE, "Could not apply policy for agent %@", [agent getAgentName]); + return NO; + } + + policyArray = [self.policyDB objectForKey:[agent getAgentName]]; + if (policyArray == nil) { + policyArray = [NSMutableArray array]; + } + + [policyArray addObject:numberToNSNumber(policyID1)]; + [policyArray addObject:numberToNSNumber(policyID2)]; + [self.policyDB setObject:policyArray forKey:[agent getAgentName]]; + + return ok; +} + +#pragma mark Agent manipulation functions + +/* + * Create an agent + */ +- (BOOL)spawnFloatingAgent:(Class)agentClass + entity:(NSString *)entity + agentSubType:(AgentSubType)subtype + addPolicyOfType:(NEPolicyConditionType)policyType + publishData:(NSData *)data +{ + id agent; + BOOL ok; + NSMutableDictionary * parameters; + + parameters =[NSMutableDictionary dictionary]; + [parameters setValue:entity forKey:@kEntityName]; + [parameters setValue:numberToNSNumber(subtype) forKey:@kAgentSubType]; + + agent = [[agentClass alloc] initWithParameters:parameters]; + ok = [self registerAgent:agent]; + if (!ok) { + return NO; + } + + if (data) { + /* Since we just spawned this agent, update its data */ + [agent updateAgentData:data]; + [self publishToAgent:agent]; + } + + /* Add a policy if there is a valid type. If POLICY_TYPE_NO_POLICY, then ignore policies. + * POLICY_TYPE_NO_POLICY will be set for service-specific agents, in which case we rely on + * service owners to install custom policies to point at the agents. */ + if (policyType >= NEPolicyConditionTypeNone) { + BOOL useControlPolicySession = NO; + if (subtype == kAgentSubTypeGlobal) { + /* Policies for a Global scoped agents are at "control" level */ + useControlPolicySession = YES; + } + + ok = [self addPolicyToFloatingAgent:agent + domain:entity + agentUUIDToUse:[agent agentUUID] + policyType:policyType + useControlPolicySession:useControlPolicySession]; + + if (!ok) { + [self unregisterAgent:agent]; + return NO; + } + } + + SC_log(LOG_INFO, "Spawning floating agent for %@", entity); + + if ([agent getAgentType] == kAgentTypeProxy) { + [self.floatingProxyAgentList setObject:agent forKey:entity]; + } else { + [self.floatingDNSAgentList setObject:agent forKey:entity]; + } + + return ok; +} + +/* + * Create an agent mapped to another agent. + */ +- (BOOL)spawnMappedFloatingAgent:(id)mapped_agent + entity:(NSString *)entity + agentSubType:(AgentSubType)subtype + addPolicyOfType:(NEPolicyConditionType)policyType + updateData:(NSData *)data +{ + id dummyAgent; + NSMutableDictionary * parameters; + + parameters = [NSMutableDictionary dictionary]; + [parameters setValue:entity forKey:@kEntityName]; + [parameters setValue:numberToNSNumber(subtype) forKey:@kAgentSubType]; + + dummyAgent = [[[mapped_agent class] alloc] initWithParameters:parameters]; + + if (data) { + /* Since we just spawned this agent, update its data. + * We do not publish it since this agent is mapped + * to an agent which already has the same data + */ + [dummyAgent updateAgentData:data]; + } + + BOOL useControlPolicySession = NO; + if (subtype == kAgentSubTypeGlobal) { + /* Policies for a Global scoped agents are at "control" level */ + useControlPolicySession = YES; + } + + BOOL ok = [self addPolicyToFloatingAgent:dummyAgent + domain:entity + agentUUIDToUse:[mapped_agent agentUUID] + policyType:policyType + useControlPolicySession:useControlPolicySession]; + + if (!ok) { + return NO; + } + + if ([mapped_agent getAgentType] == kAgentTypeProxy) { + [self.floatingProxyAgentList setObject:dummyAgent forKey:entity]; + } else { + [self.floatingDNSAgentList setObject:dummyAgent forKey:entity]; + } + + [dummyAgent setAgentMapping:mapped_agent]; + + SC_log(LOG_INFO, "Mapped floating agent %@ to %@", [dummyAgent getAgentName], [mapped_agent getAgentName]); + return YES; +} + +/* + * Write into an agent + */ +- (BOOL)publishToAgent:(id)agent +{ + /* Before any data goes into the kernel, do a sanity check. */ + NSData *sanityCheckData = [self dataLengthSanityCheck:agent]; + NSData *tempAgentData = nil; + + if (sanityCheckData != nil) { + /* Data length is more than the limit! for updateNetworkAgent, the data blob + * has to be a part of the agent object. Thus the temporary data replacement! + */ + tempAgentData = [[agent getAgentData] copy]; + [agent updateAgentData:sanityCheckData]; + SC_log(LOG_NOTICE, "Data too large for %@ (%lu bytes)!", [agent getAgentName], (unsigned long)[tempAgentData length]); + } + + BOOL ok = NO; + + NWNetworkAgentRegistration *regObject = [agent valueForKey:@"registrationObject"]; + if (regObject != nil) { + SC_log(LOG_NOTICE, "Publishing data to agent %@ (%lu bytes)", [agent getAgentName], (unsigned long)[[agent getAgentData] length]); + ok = [regObject updateNetworkAgent:agent]; + if (!ok) { + SC_log(LOG_NOTICE, "Could not update config agent"); + } + } else { + SC_log(LOG_NOTICE, "Config Agent not registered. Cannot Update"); + } + + if (tempAgentData != nil) { + [agent updateAgentData:tempAgentData]; + } + + return ok; +} + +/* + * Destroy an agent + */ +- (BOOL)destroyFloatingAgent:(id)agent +{ + BOOL ok = NO; + + if ( agent != nil) { + NSMutableArray * policyArray; + + policyArray = [self.policyDB objectForKey:[agent getAgentName]]; + if (policyArray != nil) { + NEPolicySession * session = ((ConfigAgent *)agent).preferredPolicySession; + BOOL result = NO; + + for (NSNumber *policyID in policyArray) { + NSUInteger idVal; + + idVal = [policyID unsignedIntegerValue]; + result = [session removePolicyWithID:idVal]; + if (result == NO) { + SC_log(LOG_NOTICE, "Could not remove policy %@ for agent %@", [session policyWithID:idVal], [agent getAgentName]); + } + } + + result = [session apply]; + if (result == NO) { + SC_log(LOG_NOTICE, "Could not apply removed policies for agent %@", [agent getAgentName]); + } + + [self.policyDB removeObjectForKey:[agent getAgentName]]; + } + + if ([agent getAgentType] == kAgentTypeProxy) { + [self.floatingProxyAgentList removeObjectForKey:[agent getAssociatedEntity]]; + } else { + [self.floatingDNSAgentList removeObjectForKey:[agent getAssociatedEntity]]; + } + + if ([agent getRegistrationObject] != nil) { + [self unregisterAgent:agent]; + } + + SC_log(LOG_INFO, "X - Destroyed agent %@", [agent getAgentName]); + + /* Check if we need to close the "control" policy session */ + if (self.controlPolicySession != nil) { + NSMutableArray *globalProxyAgentList; + NSMutableArray *globalDNSAgentList; + globalProxyAgentList = [self getAgentList:self.floatingProxyAgentList agentType:kAgentTypeProxy agentSubType:kAgentSubTypeGlobal]; + globalDNSAgentList = [self getAgentList:self.floatingDNSAgentList agentType:kAgentTypeDNS agentSubType:kAgentSubTypeGlobal]; + + if ([globalProxyAgentList count] == 0 && + [globalDNSAgentList count] == 0) { + ok = [self.controlPolicySession removeAllPolicies]; + if (!ok) { + SC_log(LOG_ERR, "Could not remove policies for agent %@", [agent getAgentName]); + } + + ok = [self.controlPolicySession apply]; + if (!ok) { + SC_log(LOG_ERR, "Could not apply policy change for agent %@", [agent getAgentName]); + } + + self.controlPolicySession = nil; + SC_log(LOG_NOTICE, "Closed control policy session"); + } + } + + ok = YES; + } + + return ok; +} + +/* + * Register an agent + */ +- (BOOL)registerAgent:(id)agent +{ + BOOL ok = NO; + + NWNetworkAgentRegistration *registration = [[NWNetworkAgentRegistration alloc] initWithNetworkAgentClass:[agent class]]; + + ok = [registration registerNetworkAgent:agent]; + if (!ok) { + SC_log(LOG_NOTICE, "Could not register config agent"); + goto done; + } + + [agent addAgentRegistrationObject:registration]; + +done: + return ok; +} + +/* + * Unregister an agent + */ +- (BOOL)unregisterAgent:(id)agent +{ + BOOL ok = false; + + NWNetworkAgentRegistration *regObject = [agent valueForKey:@"registrationObject"]; + if (regObject != nil) { + ok = [regObject unregisterNetworkAgent]; + if (!ok) { + SC_log(LOG_NOTICE, "Could not unregister config agent"); + } + } else { + SC_log(LOG_NOTICE, "Config Agent not registered. Cannot unregister"); + } + + return ok; +} + + +@end diff --git a/src/configd/Plugins/IPMonitor/dns-configuration.c b/src/configd/Plugins/IPMonitor/dns-configuration.c index e2c31e2a5..3d0121f32 100644 --- a/src/configd/Plugins/IPMonitor/dns-configuration.c +++ b/src/configd/Plugins/IPMonitor/dns-configuration.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2019 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,10 +41,8 @@ #include #include #include -#if !TARGET_OS_IPHONE #include extern uint32_t notify_monitor_file(int token, const char *name, int flags); -#endif // !TARGET_OS_IPHONE #include #include @@ -57,23 +55,15 @@ extern uint32_t notify_monitor_file(int token, const char *name, int flags); #include #include "dnsinfo_create.h" +#include "dnsinfo_internal.h" +#include "dnsinfo_logging.h" +#include "dnsinfo_private.h" #include "dnsinfo_server.h" -#ifdef MAIN -#undef MAIN -#include "dnsinfo_copy.c" -#include "dnsinfo_internal.h" -#define MAIN -#define DNS_CONFIGURATION_DEBUG -#endif // MAIN +#include #include -#ifndef kDNSServiceCompMulticastDNS -#define kDNSServiceCompMulticastDNS "MulticastDNS" -#endif -#ifndef kDNSServiceCompPrivateDNS -#define kDNSServiceCompPrivateDNS "PrivateDNS" -#endif +#include #define DNS_CONFIGURATION_FLAGS_KEY CFSTR("__FLAGS__") #define DNS_CONFIGURATION_IF_INDEX_KEY CFSTR("__IF_INDEX__") @@ -90,26 +80,49 @@ static CFNumberRef S_pdns_timeout = NULL; #pragma mark DNS resolver flags +static __inline__ boolean_t +dns_resolver_flags_all_queries(uint32_t query_flags) +{ + return ((query_flags & DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS) == DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS); +} -static void -add_dns_query_flags(const void *key, const void *value, void *context) -{ - CFDictionaryRef service = value; - uint32_t *query_flags = context; - // check if the service has v4 or v6 configured +static uint32_t +dns_resolver_flags_service(CFDictionaryRef service, uint32_t resolver_flags) +{ + + // check if the service has v4 configured + if (((resolver_flags & DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS) == 0) && + service_is_routable(service, AF_INET)) { + resolver_flags |= DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS; + } - if ((*query_flags & DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS) == 0 - && service_contains_protocol(service, AF_INET)) { - *query_flags |= DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS; + // check if the service has v6 configured + if (((resolver_flags & DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) == 0) && + service_is_routable(service, AF_INET6)) { + resolver_flags |= DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS; } - if ((*query_flags & DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) == 0 - && service_contains_protocol(service, AF_INET6)) { - *query_flags |= DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS; + + return resolver_flags; +} + + +static void +add_dns_resolver_flags(const void *key, const void *value, void *context) +{ +#pragma unused(key) + CFDictionaryRef service = (CFDictionaryRef)value; +// CFStringRef serviceID = (CFStringRef)key; + uint32_t *resolver_flags = (uint32_t *)context; + + if (service_is_scoped_only(service)) { + return; } + // update resovler flags based on configured (and available) protocols + *resolver_flags = dns_resolver_flags_service(service, *resolver_flags); return; } @@ -218,27 +231,61 @@ add_resolver(CFMutableArrayRef resolvers, CFMutableDictionaryRef resolver) } +#define DNS_CONFIGURATION_CONFIGURATION_ID CFSTR("__CONFIGURATION_ID__") + + +static void +add_resolver_signature(CFMutableDictionaryRef resolver, const char *rType, CFStringRef cID, CFIndex rIndex) +{ + CFStringRef str; + + str = CFStringCreateWithFormat(NULL, NULL, + CFSTR("%s:%s%@ %ld"), + rType, + (cID != NULL) ? " " : "", + (cID != NULL) ? cID : CFSTR(""), + rIndex); + CFDictionarySetValue(resolver, DNS_CONFIGURATION_CONFIGURATION_ID, str); + CFRelease(str); + + return; +} + + static void -add_supplemental(CFMutableArrayRef resolvers, CFDictionaryRef dns, uint32_t defaultOrder) +add_supplemental(CFMutableArrayRef resolvers, + CFStringRef serviceID, + CFDictionaryRef dns, + uint32_t defaultOrder, + Boolean scoped) { CFArrayRef domains; CFIndex i; CFIndex n_domains; CFArrayRef orders; + CFArrayRef servers; domains = CFDictionaryGetValue(dns, kSCPropNetDNSSupplementalMatchDomains); n_domains = isA_CFArray(domains) ? CFArrayGetCount(domains) : 0; if (n_domains == 0) { + // if no supplemental match domains return; } orders = CFDictionaryGetValue(dns, kSCPropNetDNSSupplementalMatchOrders); if (orders != NULL) { if (!isA_CFArray(orders) || (n_domains != CFArrayGetCount(orders))) { + // if supplemental match orders... but too many/not enough return; } } + servers = CFDictionaryGetValue(dns, kSCPropNetDNSServerAddresses); + if (!isA_CFArray(servers) || (CFArrayGetCount(servers) == 0)) { + // if no DNS server addresses + return; + } + /* * yes, this is a "supplemental" resolver configuration, expand * the match domains and add each to the resolvers list. @@ -282,6 +329,10 @@ add_supplemental(CFMutableArrayRef resolvers, CFDictionaryRef dns, uint32_t defa CFDictionaryRemoveValue(match_resolver, kSCPropNetDNSSearchDomains); CFDictionaryRemoveValue(match_resolver, kSCPropNetDNSSortList); + add_resolver_signature(match_resolver, + scoped ? "Supplemental/Scoped" : "Supplemental", + serviceID, + i); add_resolver(resolvers, match_resolver); CFRelease(match_resolver); } @@ -293,6 +344,28 @@ add_supplemental(CFMutableArrayRef resolvers, CFDictionaryRef dns, uint32_t defa #define N_QUICK 32 +static void +merge_configuration_flags(CFMutableDictionaryRef newDNS, uint32_t mergeFlags) +{ + uint32_t flags; + CFNumberRef num; + + if (!CFDictionaryGetValueIfPresent(newDNS, DNS_CONFIGURATION_FLAGS_KEY, (const void **)&num) || + !isA_CFNumber(num) || + !CFNumberGetValue(num, kCFNumberSInt32Type, &flags)) { + flags = 0; + } + + flags |= mergeFlags; + + num = CFNumberCreate(NULL, kCFNumberSInt32Type, &flags); + CFDictionarySetValue(newDNS, DNS_CONFIGURATION_FLAGS_KEY, num); + CFRelease(num); + + return; +} + + static void add_supplemental_resolvers(CFMutableArrayRef resolvers, CFDictionaryRef services, @@ -324,10 +397,13 @@ add_supplemental_resolvers(CFMutableArrayRef resolvers, for (i = 0; i < n_services; i++) { uint32_t defaultOrder; CFDictionaryRef dns; + uint32_t dns_resolver_flags; CFStringRef interface; - uint32_t interface_flags; CFMutableDictionaryRef newDNS = NULL; + uint32_t newFlags; CFDictionaryRef service = (CFDictionaryRef)vals[i]; + CFStringRef serviceID = (CFStringRef)keys[i]; + Boolean trusted = FALSE; // trusted config w/interface if (!isA_CFDictionary(service)) { continue; @@ -368,9 +444,8 @@ add_supplemental_resolvers(CFMutableArrayRef resolvers, // on the IP[v6] addresses). If we would not be issuing a // query then don't bother adding the configuration. // - interface_flags = 0; - add_dns_query_flags(NULL, scoped_service, &interface_flags); - if (interface_flags == 0) { + dns_resolver_flags = dns_resolver_flags_service(scoped_service, 0); + if (dns_resolver_flags == 0) { continue; } } @@ -387,48 +462,55 @@ add_supplemental_resolvers(CFMutableArrayRef resolvers, /* * Ensure that we have the correct InterfaceName in the DNS configuration * - * scoped_interface [supplemental] interface DNS interface - * ================ ======================== ================= - * NULL NULL NULL (No change) - * NULL en0 NULL - * NULL * NULL - * en0 NULL "en0" - * en0 en0 "en0" (now mutable) - * en0 * "en0" + * scoped_interface [supplemental] interface Trusted config DNS interface + * ================ ======================== ============== ================= + * NULL NULL No NULL (No change) + * NULL en0 No NULL + * NULL * No NULL + * NULL NULL Yes NULL (No change) + * NULL en0 Yes en0 (trusted config w/interface) + * NULL * Yes NULL + * en0 NULL N/A en0 (scoped interface) + * en0 en0 N/A en0 (scoped interface) + * en0 * N/A en0 (scoped interface) */ if ((scoped_interface == NULL) && (interface == NULL)) { newDNS = (CFMutableDictionaryRef)CFRetain(dns); } else { + CFBooleanRef val; + newDNS = CFDictionaryCreateMutableCopy(NULL, 0, dns); if (scoped_interface != NULL) { CFDictionarySetValue(newDNS, kSCPropInterfaceName, scoped_interface); + } else if ((interface != NULL) && + CFDictionaryGetValueIfPresent(dns, DNS_CONFIGURATION_SCOPED_QUERY_KEY, (const void **)&val) && + isA_CFBoolean(val) && + CFBooleanGetValue(val)) { + // leave the [trusted configuration] InterfaceName in place + trusted = TRUE; } else { CFDictionaryRemoveValue(newDNS, kSCPropInterfaceName); } } - if (scoped_interface != NULL) { - uint32_t flags; - CFNumberRef num; - - // set "scoped" configuration flag(s) - if (!CFDictionaryGetValueIfPresent(newDNS, DNS_CONFIGURATION_FLAGS_KEY, (const void **)&num) || - !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &flags)) { - flags = 0; - } - flags |= DNS_RESOLVER_FLAGS_SCOPED; + // set "supplemental" flag + newFlags = DNS_RESOLVER_FLAGS_SUPPLEMENTAL; - // add A/AAAA query flag(s) - flags |= interface_flags; + if (scoped_interface != NULL) { + // set "scoped" configuration flag + newFlags |= DNS_RESOLVER_FLAGS_SCOPED; - num = CFNumberCreate(NULL, kCFNumberSInt32Type, &flags); - CFDictionarySetValue(newDNS, DNS_CONFIGURATION_FLAGS_KEY, num); - CFRelease(num); + // add "Request A/AAAA query" flag(s) + newFlags |= dns_resolver_flags; + } else if (trusted) { + // use the DNS query flags from the supplemental match service + newFlags |= dns_resolver_flags_service(service, 0); } + merge_configuration_flags(newDNS, newFlags); + // add [scoped] resolver entry - add_supplemental(resolvers, newDNS, defaultOrder); + add_supplemental(resolvers, serviceID, newDNS, defaultOrder, (scoped_interface != NULL)); CFRelease(newDNS); } @@ -476,6 +558,7 @@ add_multicast_resolvers(CFMutableArrayRef resolvers, CFArrayRef multicastResolve if (S_mdns_timeout != NULL) { CFDictionarySetValue(resolver, kSCPropNetDNSServerTimeout, S_mdns_timeout); } + add_resolver_signature(resolver, "Multicast DNS", NULL, i); add_resolver(resolvers, resolver); CFRelease(resolver); CFRelease(domain); @@ -520,6 +603,7 @@ add_private_resolvers(CFMutableArrayRef resolvers, CFArrayRef privateResolvers) if (S_pdns_timeout != NULL) { CFDictionarySetValue(resolver, kSCPropNetDNSServerTimeout, S_pdns_timeout); } + add_resolver_signature(resolver, "Private DNS", NULL, i); add_resolver(resolvers, resolver); CFRelease(resolver); CFRelease(domain); @@ -532,6 +616,7 @@ add_private_resolvers(CFMutableArrayRef resolvers, CFArrayRef privateResolvers) static CFComparisonResult compareBySearchOrder(const void *val1, const void *val2, void *context) { +#pragma unused(context) CFDictionaryRef dns1 = (CFDictionaryRef)val1; CFDictionaryRef dns2 = (CFDictionaryRef)val2; CFNumberRef num1; @@ -580,10 +665,10 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme uint32_t defaultOrder = DEFAULT_SEARCH_ORDER; CFArrayRef defaultSearchDomains = NULL; CFIndex defaultSearchIndex = 0; - CFIndex i; CFMutableArrayRef mySearchDomains; CFMutableArrayRef mySupplemental = NULL; CFIndex n_supplemental; + CFStringRef trimmedDomainName; mySearchDomains = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); @@ -605,7 +690,7 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme CFIndex n_search; n_search = CFArrayGetCount(defaultSearchDomains); - for (i = 0; i < n_search; i++) { + for (int i = 0; i < n_search; i++) { CFStringRef search; search = CFArrayGetValueAtIndex(defaultSearchDomains, i); @@ -616,18 +701,28 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme } } } else { - defaultDomainName = _SC_trimDomain(defaultDomainName); - if (defaultDomainName != NULL) { + trimmedDomainName = _SC_trimDomain(defaultDomainName); +#ifdef PERFORM_DOMAIN_EXPANSION + /* + * With BIND 4.8.3 (and earlier) resolvers, the default search list included + * the default domain and each of its parent domains with two or more labels. + */ + if ((trimmedDomainName != NULL) && + CFStringHasSuffix(defaultDomainName, CFSTR("."))) { + // if "domain" name is fully qualified + CFArrayAppendValue(mySearchDomains, trimmedDomainName); + CFRelease(trimmedDomainName); + } else if (trimmedDomainName != NULL) { char *domain; int domain_parts = 1; char *dp; const int ndots = 1; - domain = _SC_cfstring_to_cstring(defaultDomainName, + domain = _SC_cfstring_to_cstring(trimmedDomainName, NULL, 0, kCFStringEncodingUTF8); - CFRelease(defaultDomainName); + CFRelease(trimmedDomainName); // count domain parts for (dp = domain; *dp != '\0'; dp++) { @@ -637,7 +732,6 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme } // move "domain" to "search" list (and expand as needed) - i = LOCALDOMAINPARTS; dp = domain; do { CFStringRef search; @@ -654,9 +748,19 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme } dp = strchr(dp, '.') + 1; - } while (++i <= (domain_parts - ndots)); + } while (domain_parts-- > 2); CFAllocatorDeallocate(NULL, domain); } +#else // PERFORM_DOMAIN_EXPANSION + /* + * With BIND 4.9.3 (and later) resolvers, the default search list included + * just the default domain. + */ + if (trimmedDomainName != NULL) { + CFArrayAppendValue(mySearchDomains, trimmedDomainName); + CFRelease(trimmedDomainName); + } +#endif // PERFORM_DOMAIN_EXPANSION } // add any supplemental "domain" names to the search list @@ -669,7 +773,7 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme NULL); supplemental = mySupplemental; } - for (i = 0; i < n_supplemental; i++) { + for (int i = 0; i < n_supplemental; i++) { CFDictionaryRef dns; CFIndex domainIndex; int noSearch; @@ -764,7 +868,9 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme static void -add_scoped_resolvers(CFMutableArrayRef scoped, CFDictionaryRef services, CFArrayRef service_order) +add_scoped_resolvers(CFMutableArrayRef scoped, + CFDictionaryRef services, + CFArrayRef service_order) { const void * keys_q[N_QUICK]; const void ** keys = keys_q; @@ -809,15 +915,15 @@ add_scoped_resolvers(CFMutableArrayRef scoped, CFDictionaryRef services, CFArray seen = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); for (i = 0; i < n_order; i++) { CFDictionaryRef dns; - uint32_t flags; + uint32_t dns_resolver_flags; char if_name[IF_NAMESIZE]; CFStringRef interface; CFMutableDictionaryRef newDNS; - CFNumberRef num; + uint32_t newFlags; CFArrayRef searchDomains; CFDictionaryRef service; CFStringRef serviceID; - uint32_t these_flags; + CFArrayRef servers; serviceID = CFArrayGetValueAtIndex(order, i); service = CFDictionaryGetValue(services, serviceID); @@ -832,6 +938,12 @@ add_scoped_resolvers(CFMutableArrayRef scoped, CFDictionaryRef services, CFArray continue; } + servers = CFDictionaryGetValue(dns, kSCPropNetDNSServerAddresses); + if (!isA_CFArray(servers) || (CFArrayGetCount(servers) == 0)) { + // if no DNS server addresses + continue; + } + interface = CFDictionaryGetValue(dns, kSCPropInterfaceName); if ((interface == NULL) || CFEqual(interface, CFSTR("*"))) { // if no [scoped] interface or supplemental configuration w/match-all @@ -868,30 +980,26 @@ add_scoped_resolvers(CFMutableArrayRef scoped, CFDictionaryRef services, CFArray CFRelease(searchDomains); } - // set "scoped" configuration flag(s) - if (!CFDictionaryGetValueIfPresent(newDNS, DNS_CONFIGURATION_FLAGS_KEY, (const void **)&num) || - !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &flags)) { - flags = 0; + // get "Request A/AAAA query" flag(s) + dns_resolver_flags = dns_resolver_flags_service(service, 0); + if (dns_resolver_flags == 0) { + goto skip; } - flags |= DNS_RESOLVER_FLAGS_SCOPED; - these_flags = 0; - add_dns_query_flags(serviceID, service, &these_flags); - if (these_flags == 0) { - goto skip; - } - flags |= these_flags; + // set "scoped" configuration flag + newFlags = DNS_RESOLVER_FLAGS_SCOPED; - num = CFNumberCreate(NULL, kCFNumberSInt32Type, &flags); - CFDictionarySetValue(newDNS, DNS_CONFIGURATION_FLAGS_KEY, num); - CFRelease(num); + // add "Request A/AAAA query" flag(s) + newFlags |= dns_resolver_flags; + + merge_configuration_flags(newDNS, newFlags); // remove keys we don't want in a [scoped] resolver CFDictionaryRemoveValue(newDNS, kSCPropNetDNSSupplementalMatchDomains); CFDictionaryRemoveValue(newDNS, kSCPropNetDNSSupplementalMatchOrders); // add the [scoped] resolver + add_resolver_signature(newDNS, "Scoped", serviceID, 0); add_resolver(scoped, newDNS); // add any supplemental resolver configurations for this interface @@ -910,68 +1018,107 @@ add_scoped_resolvers(CFMutableArrayRef scoped, CFDictionaryRef services, CFArray static void add_service_specific_resolvers(CFMutableArrayRef resolvers, CFDictionaryRef services) { - CFIndex services_count = (isA_CFDictionary(services) ? CFDictionaryGetCount(services) : 0); + CFIndex i; + CFStringRef keys_q[N_QUICK]; + CFStringRef *keys = keys_q; + CFIndex n_services; + CFMutableSetRef seen; + CFDictionaryRef vals_q[N_QUICK]; + CFDictionaryRef *vals = vals_q; + + n_services = isA_CFDictionary(services) ? CFDictionaryGetCount(services) : 0; + if (n_services == 0) { + return; // if no services + } + + if (n_services > (CFIndex)(sizeof(keys_q) / sizeof(keys_q[0]))) { + keys = CFAllocatorAllocate(kCFAllocatorDefault, n_services * sizeof(keys[0]), 0); + vals = CFAllocatorAllocate(kCFAllocatorDefault, n_services * sizeof(vals[0]), 0); + } + CFDictionaryGetKeysAndValues(services, (const void **)keys, (const void **)vals); - if (services_count > 0) { - CFIndex key_idx; - CFStringRef keys_q[N_QUICK]; - CFStringRef *keys = keys_q; - CFMutableSetRef seen = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); + seen = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); + for (i = 0; i < n_services; i++) { + CFDictionaryRef dns; + CFNumberRef dns_service_identifier; + CFMutableDictionaryRef newDNS; + uint32_t newFlags = 0; + CFDictionaryRef service = vals[i]; + CFStringRef serviceID = keys[i]; + CFArrayRef searchDomains; - if (services_count > (CFIndex)(sizeof(keys_q) / sizeof(keys_q[0]))) { - keys = CFAllocatorAllocate(kCFAllocatorDefault, services_count * sizeof(keys[0]), 0); + dns = CFDictionaryGetValue(service, kSCEntNetDNS); + if (!isA_CFDictionary(dns)) { + // if no DNS + continue; } - CFDictionaryGetKeysAndValues(services, (const void **)keys, NULL); + dns_service_identifier = CFDictionaryGetValue(dns, kSCPropNetDNSServiceIdentifier); + if (!isA_CFNumber(dns_service_identifier)) { + // if no DNS [vpn] Service Identifier + continue; + } - for (key_idx = 0; key_idx < services_count; key_idx++) { - CFDictionaryRef service = CFDictionaryGetValue(services, keys[key_idx]); - CFDictionaryRef dns = CFDictionaryGetValue(service, kSCEntNetDNS); + if (CFSetContainsValue(seen, dns_service_identifier)) { + my_log(LOG_ERR, "add_service_specific_resolvers: got a resolver with a duplicate service identifier, skipping"); + continue; + } + CFSetSetValue(seen, dns_service_identifier); - if (isA_CFDictionary(dns)) { - CFNumberRef service_identifier = CFDictionaryGetValue(dns, kSCPropNetDNSServiceIdentifier); + newDNS = CFDictionaryCreateMutableCopy(NULL, 0, dns); - if (isA_CFNumber(service_identifier)) { - if (!CFSetContainsValue(seen, service_identifier)) { - CFMutableDictionaryRef new_resolver = CFDictionaryCreateMutableCopy(NULL, 0, dns); - CFNumberRef flags_num; - int32_t flags = 0; + // add "Request A/AAAA query" flag(s) + newFlags |= DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS; - CFSetSetValue(seen, service_identifier); + // set search list + searchDomains = extract_search_domains(newDNS, NULL); + if (searchDomains != NULL) { + CFDictionarySetValue(newDNS, kSCPropNetDNSSearchDomains, searchDomains); + CFRelease(searchDomains); + searchDomains = NULL; + } - if (!CFDictionaryGetValueIfPresent(new_resolver, DNS_CONFIGURATION_FLAGS_KEY, (const void **)&flags_num) || - !isA_CFNumber(flags_num) || - !CFNumberGetValue(flags_num, kCFNumberSInt32Type, &flags)) { - flags = 0; - } + CFDictionaryRemoveValue(newDNS, kSCPropNetDNSSupplementalMatchDomains); + CFDictionaryRemoveValue(newDNS, kSCPropNetDNSSupplementalMatchOrders); - flags |= DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC | DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS; + if (CFDictionaryContainsKey(newDNS, kSCPropInterfaceName)) { + CFMutableDictionaryRef interfaceScopedDNS; + uint32_t interfaceScopedFlags; - flags_num = CFNumberCreate(NULL, kCFNumberSInt32Type, &flags); - CFDictionarySetValue(new_resolver, DNS_CONFIGURATION_FLAGS_KEY, flags_num); - CFRelease(flags_num); + // The dictionary has an interface, so add a interface-scoped resolver - if (CFDictionaryContainsKey(new_resolver, kSCPropInterfaceName)) { - CFDictionarySetValue(new_resolver, DNS_CONFIGURATION_SCOPED_QUERY_KEY, kCFBooleanTrue); - } + CFDictionarySetValue(newDNS, DNS_CONFIGURATION_SCOPED_QUERY_KEY, kCFBooleanTrue); - CFDictionaryRemoveValue(new_resolver, kSCPropNetDNSSupplementalMatchDomains); - CFDictionaryRemoveValue(new_resolver, kSCPropNetDNSSupplementalMatchOrders); + interfaceScopedDNS = CFDictionaryCreateMutableCopy(NULL, 0, newDNS); + interfaceScopedFlags = newFlags; - add_resolver(resolvers, new_resolver); - CFRelease(new_resolver); - } else { - my_log(LOG_ERR, "add_service_specific_resolvers: got a resolver with a duplicate service identifier, skipping"); - } - } - } - } + // set "scoped" configuration flag + interfaceScopedFlags |= DNS_RESOLVER_FLAGS_SCOPED; + merge_configuration_flags(interfaceScopedDNS, interfaceScopedFlags); + + CFDictionaryRemoveValue(interfaceScopedDNS, kSCPropNetDNSServiceIdentifier); - if (keys != keys_q) { - CFAllocatorDeallocate(kCFAllocatorDefault, keys); + add_resolver_signature(interfaceScopedDNS, "Service", serviceID, 0); + add_resolver(resolvers, interfaceScopedDNS); + CFRelease(interfaceScopedDNS); } - CFRelease(seen); + + // set "service specific" configuration flag + newFlags |= DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC; + merge_configuration_flags(newDNS, newFlags); + + add_resolver_signature(newDNS, "Service", serviceID, 0); + add_resolver(resolvers, newDNS); + CFRelease(newDNS); + } + CFRelease(seen); + + if (keys != keys_q) { + CFAllocatorDeallocate(kCFAllocatorDefault, keys); + CFAllocatorDeallocate(kCFAllocatorDefault, vals); } + + return; } @@ -1014,6 +1161,7 @@ add_default_resolver(CFMutableArrayRef resolvers, // add the default resolver + add_resolver_signature(myDefault, "Default", NULL, 0); add_resolver(resolvers, myDefault); CFRelease(myDefault); return; @@ -1067,17 +1215,20 @@ create_resolver(CFDictionaryRef dns) int if_index; if (CFNumberGetValue(num, kCFNumberIntType, &if_index)) { - char if_name[IFNAMSIZ]; - - _dns_resolver_set_if_index(&_resolver, if_index); - - if ((if_index != 0) && - (my_if_indextoname(if_index, if_name) != NULL)) { - targetInterface = CFStringCreateWithCString(NULL, - if_name, - kCFStringEncodingASCII); - targetInterfaceIndex = if_index; + char buf[IFNAMSIZ]; + const char *if_name = NULL; + + if (if_index != 0) { + if_name = my_if_indextoname(if_index, buf); + if (if_name != NULL) { + targetInterface = CFStringCreateWithCString(NULL, + if_name, + kCFStringEncodingASCII); + targetInterfaceIndex = if_index; + } } + + _dns_resolver_set_if_index(&_resolver, if_index, if_name); } } @@ -1168,7 +1319,7 @@ create_resolver(CFDictionaryRef dns) *slash = '\0'; } - bzero(&sortaddr, sizeof(sortaddr)); + memset(&sortaddr, 0, sizeof(sortaddr)); if (inet_aton(buf, &sortaddr.address) != 1) { /* if address not valid */ continue; @@ -1235,10 +1386,22 @@ create_resolver(CFDictionaryRef dns) num = CFDictionaryGetValue(dns, kSCPropNetDNSServiceIdentifier); if (isA_CFNumber(num)) { - int service_identifier; + int dns_service_identifier; + + if (CFNumberGetValue(num, kCFNumberIntType, &dns_service_identifier)) { + _dns_resolver_set_service_identifier(&_resolver, (uint32_t)dns_service_identifier); + } + } - if (CFNumberGetValue(num, kCFNumberIntType, &service_identifier)) { - _dns_resolver_set_service_identifier(&_resolver, (uint32_t)service_identifier); + // process configuration ID + str = CFDictionaryGetValue(dns, DNS_CONFIGURATION_CONFIGURATION_ID); + if (isA_CFString(str) && (CFStringGetLength(str) > 0)) { + char *cID; + + cID = _SC_cfstring_to_cstring(str, NULL, 0, kCFStringEncodingUTF8); + if (cID != NULL) { + _dns_resolver_set_configuration_identifier(&_resolver, cID); + CFAllocatorDeallocate(NULL, cID); } } @@ -1261,25 +1424,7 @@ isScopedConfiguration(CFDictionaryRef dns) (num != NULL) && CFNumberGetValue(num, kCFNumberSInt32Type, &flags) && ((flags & DNS_RESOLVER_FLAGS_SCOPED) != 0)) { - return TRUE; - } - - return FALSE; -} - - -static __inline__ Boolean -isServiceSpecificConfiguration(CFDictionaryRef dns) -{ - uint32_t flags; - CFNumberRef num; - - if (dns != NULL && - CFDictionaryGetValueIfPresent(dns, DNS_CONFIGURATION_FLAGS_KEY, (const void **)&num) && - num != NULL && - CFNumberGetValue(num, kCFNumberSInt32Type, &flags) && - (flags & DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC)) - { + // if scoped return TRUE; } @@ -1324,11 +1469,6 @@ compareDomain(const void *val1, const void *val2, void *context) } } - // must have domain names for any further comparisons - if ((domain1 == NULL) || (domain2 == NULL)) { - return kCFCompareEqualTo; - } - // forward (A, AAAA) domains sort before reverse (PTR) domains rev1 = CFStringHasSuffix(domain1, CFSTR(".arpa")); rev2 = CFStringHasSuffix(domain2, CFSTR(".arpa")); @@ -1377,6 +1517,35 @@ compareDomain(const void *val1, const void *val2, void *context) } +static __inline__ Boolean +needsMergeWithDefaultConfiguration(CFDictionaryRef dns) +{ + uint32_t flags; + CFNumberRef num; + + if ((dns != NULL) && + CFDictionaryGetValueIfPresent(dns, DNS_CONFIGURATION_FLAGS_KEY, (const void **)&num) && + (num != NULL) && + CFNumberGetValue(num, kCFNumberSInt32Type, &flags)) { + + // check if merge needed (at all) + if (dns_resolver_flags_all_queries(flags)) { + // if we are already querying for both A/AAAA + return FALSE; + } + + // check if scoped or service-specific + if (((flags & DNS_RESOLVER_FLAGS_SCOPED ) != 0) || + ((flags & DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC) != 0)) { + // yes, skip merge + return FALSE; + } + } + + return TRUE; +} + + __private_extern__ Boolean dns_configuration_set(CFDictionaryRef defaultResolver, @@ -1385,17 +1554,16 @@ dns_configuration_set(CFDictionaryRef defaultResolver, CFArrayRef multicastResolvers, CFArrayRef privateResolvers) { - dns_create_config_t _config; + dns_create_config_t dns_create_config; Boolean changed = FALSE; - uint32_t dns_resolver_flags = 0; CFIndex i; CFMutableDictionaryRef myDefault; Boolean myOrderAdded = FALSE; CFArrayRef mySearchDomains = NULL; CFIndex n_resolvers; CFMutableArrayRef resolvers; - unsigned char signature[CC_SHA1_DIGEST_LENGTH]; - static unsigned char signature_last[CC_SHA1_DIGEST_LENGTH]; + unsigned char signature[CC_SHA256_DIGEST_LENGTH]; + static unsigned char signature_last[CC_SHA256_DIGEST_LENGTH]; // establish list of resolvers @@ -1412,6 +1580,16 @@ dns_configuration_set(CFDictionaryRef defaultResolver, // add the "default" resolver + if (defaultResolver != NULL) { + CFArrayRef servers; + + servers = CFDictionaryGetValue(defaultResolver, kSCPropNetDNSServerAddresses); + if (!isA_CFArray(servers) || (CFArrayGetCount(servers) == 0)) { + // if no DNS server addresses + defaultResolver = NULL; + } + } + add_default_resolver(resolvers, defaultResolver, &myOrderAdded, &mySearchDomains); // collect (and add) any "multicast" resolver configurations @@ -1478,106 +1656,118 @@ dns_configuration_set(CFDictionaryRef defaultResolver, /* * if no default and no supplemental/scoped resolvers */ - _config = NULL; + dns_create_config = NULL; } else { + uint32_t default_resolver_flags = 0; + Boolean have_default_flags = FALSE; + /* * if default and/or supplemental/scoped resolvers are defined */ - _config = _dns_configuration_create(); - - CFDictionaryApplyFunction(services, add_dns_query_flags , &dns_resolver_flags); + dns_create_config = _dns_configuration_create(); for (i = 0; i < n_resolvers; i++) { - boolean_t is_default_resolver; + Boolean merge_default_flags; CFDictionaryRef resolver; dns_create_resolver_t _resolver; resolver = CFArrayGetValueAtIndex(resolvers, i); - is_default_resolver = (!isScopedConfiguration(resolver) && !isServiceSpecificConfiguration(resolver)); - if (is_default_resolver) { + merge_default_flags = needsMergeWithDefaultConfiguration(resolver); + if (merge_default_flags) { CFMutableDictionaryRef new_resolver; - CFNumberRef num; - new_resolver = CFDictionaryCreateMutableCopy(NULL, 0, resolver); - - num = CFNumberCreate(NULL, kCFNumberSInt32Type, &dns_resolver_flags); - CFDictionarySetValue(new_resolver, DNS_CONFIGURATION_FLAGS_KEY, num); - CFRelease(num); + if (!have_default_flags) { + CFDictionaryApplyFunction(services, + add_dns_resolver_flags, + &default_resolver_flags); + have_default_flags = TRUE; + } + new_resolver = CFDictionaryCreateMutableCopy(NULL, 0, resolver); + merge_configuration_flags(new_resolver, default_resolver_flags); resolver = new_resolver; } _resolver = create_resolver(resolver); - _dns_configuration_add_resolver(&_config, _resolver); + _dns_configuration_add_resolver(&dns_create_config, _resolver); _dns_resolver_free(&_resolver); - if (is_default_resolver) { + if (merge_default_flags) { CFRelease(resolver); } } -#if !TARGET_OS_IPHONE // add flatfile resolvers - _dnsinfo_flatfile_set_flags(dns_resolver_flags); - _dnsinfo_flatfile_add_resolvers(&_config); -#endif // !TARGET_OS_IPHONE - } - -#ifdef DNS_CONFIGURATION_DEBUG - { - uint8_t *buf; - dns_config_t *config; - _dns_config_buf_t *config_buf; - uint32_t n_config; - uint32_t n_padding; - - config_buf = (_dns_config_buf_t *)_config; - n_config = sizeof(_dns_config_buf_t) + ntohl(config_buf->n_attribute); - n_padding = ntohl(config_buf->n_padding); - buf = malloc(n_config + n_padding); - bcopy((void *)config_buf, buf, n_config); - bzero(&buf[n_config], n_padding); - config = expand_config((_dns_config_buf_t *)buf); - _dns_configuration_print(config); - free(buf); + _dnsinfo_flatfile_set_flags(default_resolver_flags); + _dnsinfo_flatfile_add_resolvers(&dns_create_config); } -#endif // DNS_CONFIGURATION_DEBUG // check if the configuration changed - _dns_configuration_signature(&_config, signature, sizeof(signature)); + _dns_configuration_signature(&dns_create_config, signature, sizeof(signature)); if (bcmp(signature, signature_last, sizeof(signature)) != 0) { // save [new] signature - bcopy(signature, signature_last, sizeof(signature)); + memcpy(signature_last, signature, sizeof(signature)); + + my_log(LOG_INFO, "Updating DNS configuration"); + if (dns_create_config != NULL) { + dns_config_t *dns_config = NULL; + _dns_config_buf_t *dns_config_buf; + size_t n; + + n = sizeof(_dns_config_buf_t); + n += ntohl(((_dns_config_buf_t *)dns_create_config)->n_attribute); + dns_config_buf = _dns_configuration_buffer_create((void *)dns_create_config, n); + if (dns_config_buf != NULL) { + dns_config = _dns_configuration_buffer_expand(dns_config_buf); + if (dns_config == NULL) { + // if we were unable to expand the configuration + _dns_configuration_buffer_free(&dns_config_buf); + } + } + if (dns_config != NULL) { + _dns_configuration_log(dns_config, TRUE, NULL); + free(dns_config); + } + } else { + my_log(LOG_INFO, "*** No DNS configuration"); + } +#ifndef MAIN // save [new] configuration - if (!_dns_configuration_store(&_config)) { - my_log(LOG_ERR, "dns_configuration_set: could not store configuration"); + if (!_dns_configuration_store(&dns_create_config)) { + my_log(LOG_ERR, "could not store configuration"); } +#endif // MAIN changed = TRUE; } - if (_config != NULL) _dns_configuration_free(&_config); + if (dns_create_config != NULL) { + _dns_configuration_free(&dns_create_config); + } CFRelease(resolvers); return changed; } -#if !TARGET_OS_IPHONE static SCDynamicStoreRef dns_configuration_store; static SCDynamicStoreCallBack dns_configuration_callout; static void dns_configuration_changed(CFMachPortRef port, void *msg, CFIndex size, void *info) { - CFStringRef key = CFSTR(_PATH_RESOLVER_DIR); - CFArrayRef keys; - Boolean resolvers_now; - static Boolean resolvers_save = FALSE; - struct stat statbuf; +#pragma unused(port) +#pragma unused(msg) +#pragma unused(size) +#pragma unused(info) + static const CFStringRef key = CFSTR(_PATH_RESOLVER_DIR); + CFArrayRef keys; + Boolean resolvers_now; + static Boolean resolvers_save = FALSE; + struct stat statbuf; resolvers_now = (stat(_PATH_RESOLVER_DIR, &statbuf) == 0); if (!resolvers_save && (resolvers_save == resolvers_now)) { @@ -1588,16 +1778,44 @@ dns_configuration_changed(CFMachPortRef port, void *msg, CFIndex size, void *inf } resolvers_save = resolvers_now; - my_log(LOG_DEBUG, _PATH_RESOLVER_DIR " changed"); + my_log(LOG_INFO, _PATH_RESOLVER_DIR " changed"); // fake a "DNS" change keys = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); (*dns_configuration_callout)(dns_configuration_store, keys, NULL); CFRelease(keys); + return; } +static Boolean +normalize_path(const char *file_name, char resolved_name[PATH_MAX]) +{ + char *ch; + char path[PATH_MAX]; + + strlcpy(path, file_name, sizeof(path)); + if (realpath(path, resolved_name) != NULL) { + // if the path exists + return TRUE; + } + + ch = strrchr(path, '/'); + if (ch != NULL) { + *ch = '\0'; + if (realpath(path, resolved_name) != NULL) { + // if a parent path exists + strlcat(resolved_name, "/", PATH_MAX); + strlcat(resolved_name, ch+1, PATH_MAX); + return TRUE; + } + } + + return FALSE; +} + + __private_extern__ void dns_configuration_monitor(SCDynamicStoreRef store, SCDynamicStoreCallBack callout) @@ -1605,9 +1823,15 @@ dns_configuration_monitor(SCDynamicStoreRef store, SCDynamicStoreCallBack callou CFMachPortRef mp; mach_port_t notify_port; int notify_token; + char resolver_directory_path[PATH_MAX]; CFRunLoopSourceRef rls; uint32_t status; + if (!normalize_path(_PATH_RESOLVER_DIR, resolver_directory_path)) { + my_log(LOG_ERR, "Not monitoring \"%s\", could not resolve directory path", _PATH_RESOLVER_DIR); + return; + } + dns_configuration_store = store; dns_configuration_callout = callout; @@ -1617,7 +1841,7 @@ dns_configuration_monitor(SCDynamicStoreRef store, SCDynamicStoreCallBack callou return; } - status = notify_monitor_file(notify_token, "/private" _PATH_RESOLVER_DIR, 0); + status = notify_monitor_file(notify_token, resolver_directory_path, 0); if (status != NOTIFY_STATUS_OK) { my_log(LOG_ERR, "notify_monitor_file() failed"); (void)notify_cancel(notify_token); @@ -1642,7 +1866,6 @@ dns_configuration_monitor(SCDynamicStoreRef store, SCDynamicStoreCallBack callou CFRelease(mp); return; } -#endif // !TARGET_OS_IPHONE __private_extern__ @@ -1773,6 +1996,7 @@ main(int argc, char **argv) CFDictionaryRef state_global_ipv4; SCDynamicStoreRef store; + _sc_debug = TRUE; _sc_log = FALSE; _sc_verbose = (argc > 1) ? TRUE : FALSE; diff --git a/src/configd/Plugins/IPMonitor/dns-configuration.h b/src/configd/Plugins/IPMonitor/dns-configuration.h index b218d3a4f..1753f7096 100644 --- a/src/configd/Plugins/IPMonitor/dns-configuration.h +++ b/src/configd/Plugins/IPMonitor/dns-configuration.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2006, 2008, 2009, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2009, 2011, 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,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@ */ @@ -37,10 +37,8 @@ __BEGIN_DECLS void dns_configuration_init (CFBundleRef bundle); -#if !TARGET_OS_IPHONE void dns_configuration_monitor (SCDynamicStoreRef store, SCDynamicStoreCallBack callout); -#endif // !TARGET_OS_IPHONE Boolean dns_configuration_set (CFDictionaryRef defaultResolver, CFDictionaryRef services, @@ -50,5 +48,5 @@ Boolean dns_configuration_set (CFDictionaryRef defaultResolver, __END_DECLS -#endif /* _DNS_CONFIGURATION_H */ +#endif /* _DNS_CONFIGURATION_H */ diff --git a/src/configd/Plugins/IPMonitor/dnsAgent.h b/src/configd/Plugins/IPMonitor/dnsAgent.h new file mode 100644 index 000000000..86598fafe --- /dev/null +++ b/src/configd/Plugins/IPMonitor/dnsAgent.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015 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 DNS_AGENT_H +#define DNS_AGENT_H + +#import "configAgent.h" + +@interface DNSAgent : ConfigAgent + +@end + +#endif /* DNS_AGENT_H */ diff --git a/src/configd/Plugins/IPMonitor/dnsAgent.m b/src/configd/Plugins/IPMonitor/dnsAgent.m new file mode 100644 index 000000000..cbda2c472 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/dnsAgent.m @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2015, 2016 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@ + */ + +#import "configAgent.h" + +@interface DNSAgent:ConfigAgent + +@property (nonatomic) AgentType internalAgentType; +@property (nonatomic) NSString *internalAgentName; +@property (nonatomic) AgentSubType internalAgentSubType; + +@end + +@implementation DNSAgent + +@synthesize agentUUID; +@synthesize agentDescription; + ++ (NSString *)agentType +{ + return @kConfigAgentTypeDNS; +} + +- (instancetype)initWithParameters:(NSDictionary *)parameters +{ + self = [super initWithParameters:parameters]; + if (self) { + NSString *intf = [parameters valueForKey:@kEntityName]; + NSNumber *subType = [parameters valueForKey:@kAgentSubType]; + NSString *type = [[self class] agentType]; + + if ([subType unsignedIntegerValue] == kAgentSubTypeMulticast) { + type = @kConfigAgentTypeDNSMulticast; + } else if ([subType unsignedIntegerValue] == kAgentSubTypePrivate) { + type = @kConfigAgentTypeDNSPrivate; + } + + _internalAgentName = [NSString stringWithFormat:@"%@-%@", type, intf]; + _internalAgentSubType = [subType unsignedIntegerValue]; + _internalAgentType = kAgentTypeDNS; + + agentDescription = _internalAgentName; + agentUUID = [super createUUIDForName:agentDescription]; + if (agentUUID == nil) { + agentUUID = [NSUUID UUID]; + } + } + + return self; +} + +- (AgentType)getAgentType +{ + return _internalAgentType; +} + +- (NSString *)getAgentName +{ + return _internalAgentName; +} + +- (AgentSubType)getAgentSubType +{ + return _internalAgentSubType; +} + +- (NSUUID *)getAgentUUID +{ + return agentUUID; +} + +@end \ No newline at end of file diff --git a/src/configd/Plugins/IPMonitor/ip_plugin.c b/src/configd/Plugins/IPMonitor/ip_plugin.c index d111ad438..97d14d049 100644 --- a/src/configd/Plugins/IPMonitor/ip_plugin.c +++ b/src/configd/Plugins/IPMonitor/ip_plugin.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2014 Apple Inc. All Rights Reserved. + * Copyright (c) 2000-2019 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@ */ @@ -86,6 +86,7 @@ #include #include #include +#include #include #include #include @@ -94,11 +95,14 @@ #include #include +#include "ip_plugin.h" +#include "serviceIDNumber.h" + #include #include #include #include -#include /* for SCLog() */ +#include #include "SCNetworkReachabilityInternal.h" #include "SCNetworkSignaturePrivate.h" #include @@ -107,20 +111,18 @@ #include #include -#ifndef kDNSServiceCompMulticastDNS -#define kDNSServiceCompMulticastDNS "MulticastDNS" -#endif -#ifndef kDNSServiceCompPrivateDNS -#define kDNSServiceCompPrivateDNS "PrivateDNS" -#endif +#include + #include -#include "network_information_priv.h" +#include "network_state_information_priv.h" +#include "network_state_information_logging.h" #include "network_information_server.h" #include -#include "ip_plugin.h" -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST #include "set-hostname.h" -#endif /* !TARGET_IPHONE_SIMULATOR */ +#include "nat64-configuration.h" +#include "agent-monitor.h" +#endif /* TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ #include "dns-configuration.h" #include "proxy-configuration.h" @@ -147,7 +149,30 @@ enum { kDebugFlagAll = 0xffffffff }; -typedef unsigned int IFIndex; +typedef unsigned int IFIndex; /* interface index */ + +static dispatch_queue_t __network_change_queue(void); + + +#pragma mark - +#pragma mark Logging + + +__private_extern__ os_log_t +__log_IPMonitor(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "IPMonitor"); + } + + return log; +} + +#pragma mark - +#pragma mark interface index + #ifndef TEST_ROUTELIST @@ -155,54 +180,80 @@ typedef unsigned int IFIndex; static struct if_nameindex * S_if_nameindex_cache; +static dispatch_queue_t +__my_if_nametoindex_queue() +{ + static dispatch_once_t once; + static dispatch_queue_t q; + + dispatch_once(&once, ^{ + q = dispatch_queue_create("my_if_nametoindex queue", NULL); + }); + + return q; +} + __private_extern__ IFIndex my_if_nametoindex(const char * ifname) { - IFIndex idx = 0; - struct if_nameindex * scan; + __block IFIndex idx = 0; - if (S_if_nameindex_cache == NULL) { - return (if_nametoindex(ifname)); - } - for (scan = S_if_nameindex_cache; - scan->if_index != 0 && scan->if_name != NULL; - scan++) { - if (strcmp(scan->if_name, ifname) == 0) { - idx = scan->if_index; - break; + dispatch_sync(__my_if_nametoindex_queue(), ^{ + struct if_nameindex * scan; + + if (S_if_nameindex_cache == NULL) { + idx = if_nametoindex(ifname); + return; } - } + for (scan = S_if_nameindex_cache; + scan->if_index != 0 && scan->if_name != NULL; + scan++) { + if (strcmp(scan->if_name, ifname) == 0) { + idx = scan->if_index; + break; + } + } + }); + return (idx); } __private_extern__ const char * my_if_indextoname(IFIndex idx, char if_name[IFNAMSIZ]) { - const char * name = NULL; - struct if_nameindex * scan; + __block const char * name = NULL; - if (S_if_nameindex_cache == NULL) { - return (if_indextoname(idx, if_name)); - } - for (scan = S_if_nameindex_cache; - scan->if_index != 0 && scan->if_name != NULL; - scan++) { - if (scan->if_index == idx) { - name = if_name; - strlcpy(if_name, scan->if_name, IFNAMSIZ); - break; + dispatch_sync(__my_if_nametoindex_queue(), ^{ + struct if_nameindex * scan; + + if (S_if_nameindex_cache == NULL) { + name = if_indextoname(idx, if_name); + return; } - } + for (scan = S_if_nameindex_cache; + scan->if_index != 0 && scan->if_name != NULL; + scan++) { + if (scan->if_index == idx) { + name = if_name; + strlcpy(if_name, scan->if_name, IFNAMSIZ); + break; + } + } + }); + return (name); } static void my_if_freenameindex(void) { - if (S_if_nameindex_cache != NULL) { - if_freenameindex(S_if_nameindex_cache); - S_if_nameindex_cache = NULL; - } + dispatch_sync(__my_if_nametoindex_queue(), ^{ + if (S_if_nameindex_cache != NULL) { + if_freenameindex(S_if_nameindex_cache); + S_if_nameindex_cache = NULL; + } + }); + return; } @@ -210,7 +261,10 @@ static void my_if_nameindex(void) { my_if_freenameindex(); - S_if_nameindex_cache = if_nameindex(); + dispatch_sync(__my_if_nametoindex_queue(), ^{ + S_if_nameindex_cache = if_nameindex(); + }); + return; } @@ -306,6 +360,9 @@ lo0_ifindex(void) } +#pragma mark - + + /* * Property: kServiceOptionRankAssertion * Purpose: @@ -333,8 +390,6 @@ lo0_ifindex(void) #define IP_CH(ip) ((u_char *)(ip)) #define IP_LIST(ip) IP_CH(ip)[0],IP_CH(ip)[1],IP_CH(ip)[2],IP_CH(ip)[3] -static SCLoggerRef S_IPMonitor_logger; - static Boolean S_bundle_logging_verbose; /* @@ -360,12 +415,16 @@ typedef CF_ENUM(uint16_t, ControlFlags) { IFIndex exclude_ifindex; \ Rank rank; \ RouteFlags flags; \ - ControlFlags control_flags; + ControlFlags control_flags; \ + serviceIDNumber sidn; typedef struct { ROUTE_COMMON } Route, * RouteRef; +#define PREFIX_LENGTH_IN_CLASSC 24 +#define PREFIX_LENGTH_IN_CLASSD 4 + typedef struct { ROUTE_COMMON struct in_addr dest; @@ -383,7 +442,8 @@ typedef struct { typedef CF_ENUM(uint16_t, RouteListFlags) { kRouteListFlagsExcludeNWI = 0x0001, - kRouteListFlagsHasDefault = 0x0002 + kRouteListFlagsHasDefault = 0x0002, + kRouteListFlagsScopedOnly = 0x0004 }; #define ROUTELIST_COMMON \ @@ -436,6 +496,7 @@ typedef struct Candidate { CFStringRef if_name; Rank rank; boolean_t ip_is_coupled; + boolean_t ineligible; SCNetworkReachabilityFlags reachability_flags; in_addr addr; in_sockaddr vpn_server_addr; @@ -456,28 +517,8 @@ ElectionResultsComputeSize(unsigned int n) } /* - * Type: Rank - * Purpose: - * A 32-bit value to encode the relative rank of a service. - * - * The top 8 bits are used to hold the rank assertion (first, default, last, - * never, scoped); - * - * The bottom 24 bits are used to store the service index (i.e. the - * position within the service order array). + * Rank support */ -#define RANK_ASSERTION_MAKE(r) ((Rank)(r) << 24) -#define kRankAssertionFirst RANK_ASSERTION_MAKE(0) -#define kRankAssertionDefault RANK_ASSERTION_MAKE(1) -#define kRankAssertionLast RANK_ASSERTION_MAKE(2) -#define kRankAssertionNever RANK_ASSERTION_MAKE(3) -#define kRankAssertionScoped RANK_ASSERTION_MAKE(4) -#define kRankAssertionMask RANK_ASSERTION_MAKE(0xff) -#define RANK_ASSERTION_MASK(r) ((Rank)(r) & kRankAssertionMask) -#define RANK_ASSERTION_GET(r) ((Rank)(r) >> 24) -#define RANK_INDEX_MAKE(r) ((Rank)(r)) -#define kRankIndexMask RANK_INDEX_MAKE(0xffffff) -#define RANK_INDEX_MASK(r) ((Rank)(r) & kRankIndexMask) static __inline__ Rank RankMake(uint32_t service_index, Rank primary_rank) @@ -512,7 +553,6 @@ InterfaceRankGetRankAssertion(CFNumberRef rank_cf, Boolean * ret_is_set) static Rank PrimaryRankGetRankAssertion(CFStringRef rank_str, Boolean * is_set) { - int i; struct { const CFStringRef * name; Rank rank_assertion; @@ -524,7 +564,7 @@ PrimaryRankGetRankAssertion(CFStringRef rank_str, Boolean * is_set) }; if (rank_str != NULL) { - for (i = 0; i < countof(values); i++) { + for (size_t i = 0; i < countof(values); i++) { if (CFEqual(rank_str, *(values[i].name))) { if (is_set != NULL) { *is_set = TRUE; @@ -549,16 +589,14 @@ static Boolean S_IPMonitor_verbose = FALSE; /* are we netbooted? If so, don't touch the default route */ static boolean_t S_netboot = FALSE; -/* is scoped routing enabled? */ -static boolean_t S_scopedroute = FALSE; -static boolean_t S_scopedroute_v6 = FALSE; - /* dictionary to hold per-service state: key is the serviceID */ -static CFMutableDictionaryRef S_service_state_dict = NULL; -static CFMutableDictionaryRef S_ipv4_service_rank_dict = NULL; -static CFMutableDictionaryRef S_ipv6_service_rank_dict = NULL; +static CFMutableDictionaryRef S_service_state_dict; -/* dictionary to hold per-interface rank information */ +/* dictionaries to hold per-service rank: key is the serviceID */ +static CFMutableDictionaryRef S_ipv4_service_rank_dict; +static CFMutableDictionaryRef S_ipv6_service_rank_dict; + +/* dictionary to hold per-interface rank information: key is the ifname */ static CFDictionaryRef S_if_rank_dict; /* if set, a PPP interface overrides the primary */ @@ -582,14 +620,15 @@ static CFStringRef S_state_service_prefix = NULL; static CFStringRef S_setup_global_ipv4 = NULL; static CFStringRef S_setup_service_prefix = NULL; +static CFStringRef S_interface_delegation_prefix = NULL; + static CFStringRef S_multicast_resolvers = NULL; static CFStringRef S_private_resolvers = NULL; -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static IPv4RouteListRef S_ipv4_routelist = NULL; static IPv6RouteListRef S_ipv6_routelist = NULL; - -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ static boolean_t S_append_state = FALSE; @@ -610,6 +649,7 @@ static uint32_t S_network_change_needed = 0; #if !TARGET_OS_IPHONE #define NETWORK_CHANGE_SMB 1<<3 #endif /* !TARGET_OS_IPHONE */ +#define NETWORK_CHANGE_NAT64 1<<4 static struct timeval S_network_change_start; static Boolean S_network_change_timeout = FALSE; static dispatch_source_t S_network_change_timer = NULL; @@ -655,6 +695,7 @@ static const CFStringRef *entityTypeNames[ENTITY_TYPES_COUNT] = { #endif /* !TARGET_OS_IPHONE */ }; + static Boolean S_dict_get_boolean(CFDictionaryRef dict, CFStringRef key, Boolean def_value); @@ -752,8 +793,17 @@ static GetEntityChangesFunc get_proxies_changes; static GetEntityChangesFunc get_smb_changes; #endif /* !TARGET_OS_IPHONE */ -static void -my_CFRelease(void * t); +static __inline__ void +my_CFRelease(void * t) +{ + void * * obj = (void * *)t; + + if (obj && *obj) { + CFRelease(*obj); + *obj = NULL; + } + return; +} static void my_CFArrayAppendUniqueValue(CFMutableArrayRef arr, CFTypeRef new); @@ -852,15 +902,15 @@ keyChangeListApplyToStore(keyChangeListRef keys, SCDynamicStoreRef session) if (set == NULL && remove == NULL && notify == NULL) { return; } - if (S_IPMonitor_debug & kDebugFlag1) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { if (set != NULL) { - my_log(LOG_DEBUG, "IPMonitor: Setting:\n%@", set); + my_log(LOG_DEBUG, "Setting:\n%@", set); } if (remove != NULL) { - my_log(LOG_DEBUG, "IPMonitor: Removing:\n%@", remove); + my_log(LOG_DEBUG, "Removing:\n%@", remove); } if (notify != NULL) { - my_log(LOG_DEBUG, "IPMonitor: Notifying:\n%@", notify); + my_log(LOG_DEBUG, "Notifying:\n%@", notify); } } (void)SCDynamicStoreSetMultiple(session, set, remove, notify); @@ -868,76 +918,6 @@ keyChangeListApplyToStore(keyChangeListRef keys, SCDynamicStoreRef session) return; } -static void -S_nwi_ifstate_dump(nwi_ifstate_t ifstate, int i) -{ - const char * addr_str; - void * address; - char ntopbuf[INET6_ADDRSTRLEN]; - char vpn_ntopbuf[INET6_ADDRSTRLEN]; - const struct sockaddr * vpn_addr; - - address = nwi_ifstate_get_address(ifstate); - addr_str = inet_ntop(ifstate->af, address, ntopbuf, sizeof(ntopbuf)); - vpn_addr = nwi_ifstate_get_vpn_server(ifstate); - if (vpn_addr != NULL) { - _SC_sockaddr_to_string(nwi_ifstate_get_vpn_server(ifstate), - vpn_ntopbuf, - sizeof(vpn_ntopbuf)); - } - my_log(LOG_DEBUG, - " [%d]: %s%s%s%s rank 0x%x iaddr %s%s%s reach_flags 0x%x", - i, ifstate->ifname, - ifstate->diff_str != NULL ? ifstate->diff_str : "", - (ifstate->flags & NWI_IFSTATE_FLAGS_HAS_DNS) != 0 - ? " dns" : "", - (ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0 - ? " never" : "", - ifstate->rank, - addr_str, - (vpn_addr != NULL) ? " vpn_server_addr: " : "", - (vpn_addr != NULL) ? vpn_ntopbuf : "", - ifstate->reach_flags); - return; -} - -static void -S_nwi_state_dump(nwi_state_t state) -{ - int i; - nwi_ifstate_t scan; - - if (state == NULL) { - my_log(LOG_DEBUG, "nwi_state = "); - return; - } - my_log(LOG_DEBUG, - "nwi_state = { " - "gen=%llu size=%u #v4=%u #v6=%u " - "reach_flags=(v4=0x%x, v6=0x%x) }", - state->generation_count, - state->size, - state->ipv4_count, - state->ipv6_count, - nwi_state_get_reachability_flags(state, AF_INET), - nwi_state_get_reachability_flags(state, AF_INET6)); - if (state->ipv4_count) { - my_log(LOG_DEBUG, "IPv4:"); - for (i = 0, scan = state->nwi_ifstates; - i < state->ipv4_count; i++, scan++) { - S_nwi_ifstate_dump(scan, i); - } - } - if (state->ipv6_count) { - my_log(LOG_DEBUG, "IPv6:"); - for (i = 0, scan = state->nwi_ifstates + state->ipv6_start; - i < state->ipv6_count; i++, scan++) { - S_nwi_ifstate_dump(scan, i); - } - } - return; -} - static boolean_t S_is_network_boot() { @@ -954,24 +934,29 @@ S_is_network_boot() static int rtm_seq = 0; -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static int open_routing_socket(void) { int sockfd; if ((sockfd = socket(PF_ROUTE, SOCK_RAW, PF_ROUTE)) == -1) { - my_log(LOG_NOTICE, - "IPMonitor: open_routing_socket: socket failed, %s", - strerror(errno)); + my_log(LOG_ERR, "socket() failed: %s", strerror(errno)); } return (sockfd); } static __inline__ int -inet6_dgram_socket() +inet6_dgram_socket(void) { - return (socket(AF_INET6, SOCK_DGRAM, 0)); + int sockfd; + + sockfd = socket(AF_INET6, SOCK_DGRAM, 0); + if (sockfd == -1) { + my_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + } + + return sockfd; } static int @@ -980,7 +965,7 @@ siocdradd_in6(int s, int if_index, const struct in6_addr * addr, u_char flags) struct in6_defrouter dr; struct sockaddr_in6 * sin6; - bzero(&dr, sizeof(dr)); + memset(&dr, 0, sizeof(dr)); sin6 = &dr.rtaddr; sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; @@ -996,7 +981,7 @@ siocdrdel_in6(int s, int if_index, const struct in6_addr * addr) struct in6_defrouter dr; struct sockaddr_in6 * sin6; - bzero(&dr, sizeof(dr)); + memset(&dr, 0, sizeof(dr)); sin6 = &dr.rtaddr; sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; @@ -1005,37 +990,7 @@ siocdrdel_in6(int s, int if_index, const struct in6_addr * addr) return (ioctl(s, SIOCDRDEL_IN6, &dr)); } -#endif /* !TARGET_IPHONE_SIMULATOR */ - -static boolean_t -S_is_scoped_routing_enabled() -{ - int scopedroute = 0; - size_t len = sizeof(scopedroute); - - if ((sysctlbyname("net.inet.ip.scopedroute", - &scopedroute, &len, - NULL, 0) == -1) - && (errno != ENOENT)) { - my_log(LOG_ERR, "sysctlbyname() failed: %s", strerror(errno)); - } - return (scopedroute); -} - -static boolean_t -S_is_scoped_v6_routing_enabled() -{ - int scopedroute_v6 = 0; - size_t len = sizeof(scopedroute_v6); - - if ((sysctlbyname("net.inet6.ip6.scopedroute", - &scopedroute_v6, &len, - NULL, 0) == -1) - && (errno != ENOENT)) { - my_log(LOG_ERR, "sysctlbyname() failed: %s", strerror(errno)); - } - return (scopedroute_v6); -} +#endif /* !TARGET_OS_SIMULATOR */ static void my_CFArrayAppendUniqueValue(CFMutableArrayRef arr, CFTypeRef new) @@ -1075,18 +1030,6 @@ my_CFArrayCreateCombinedArray(CFArrayRef array1, CFArrayRef array2) return (combined); } -static void -my_CFRelease(void * t) -{ - void * * obj = (void * *)t; - - if (obj && *obj) { - CFRelease(*obj); - *obj = NULL; - } - return; -} - static CFDictionaryRef my_CFDictionaryGetDictionary(CFDictionaryRef dict, CFStringRef key) { @@ -1105,8 +1048,92 @@ my_CFDictionaryGetArray(CFDictionaryRef dict, CFStringRef key) return (isA_CFArray(CFDictionaryGetValue(dict, key))); } +#if !TARGET_OS_SIMULATOR + +typedef CF_ENUM(uint16_t, PLATDiscoveryOption) { + kPLATDiscoveryOptionStart, + kPLATDiscoveryOptionUpdate, + kPLATDiscoveryOptionCancel +}; + +static void +my_CFSetAddValue(CFMutableSetRef * set_p, CFTypeRef value) +{ + if (*set_p == NULL) { + *set_p = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); + } + CFSetAddValue(*set_p, value); +} + +static void +my_CFSetRemoveValue(CFMutableSetRef * set_p, CFTypeRef value) +{ + if (*set_p == NULL) { + return; + } + CFSetRemoveValue(*set_p, value); + if (CFSetGetCount(*set_p) == 0) { + my_CFRelease(set_p); + } +} + +static Boolean +my_CFSetContainsValue(CFSetRef set, CFTypeRef value) +{ + if (set == NULL) { + return (FALSE); + } + return (CFSetContainsValue(set, value)); +} + +// Note: must only accessed on __network_change_queue() +static CFMutableSetRef S_nat64_cancel_prefix_requests; +static CFMutableSetRef S_nat64_prefix_updates; +static CFMutableSetRef S_nat64_prefix_requests; + +static void +set_plat_discovery_locked(PLATDiscoveryOption option, CFStringRef interface) +{ + switch (option) { + case kPLATDiscoveryOptionStart: + my_log(LOG_DEBUG, "NAT64 Start %@", interface); + my_CFSetAddValue(&S_nat64_prefix_requests, interface); + my_CFSetRemoveValue(&S_nat64_prefix_updates, interface); + my_CFSetRemoveValue(&S_nat64_cancel_prefix_requests, interface); + break; + case kPLATDiscoveryOptionUpdate: + my_log(LOG_DEBUG, "NAT64 Update %@", interface); + if (!my_CFSetContainsValue(S_nat64_prefix_requests, interface)) { + my_CFSetAddValue(&S_nat64_prefix_updates, interface); + } + my_CFSetRemoveValue(&S_nat64_cancel_prefix_requests, interface); + break; + case kPLATDiscoveryOptionCancel: + my_log(LOG_DEBUG, "NAT64 Cancel %@", interface); + my_CFSetRemoveValue(&S_nat64_prefix_requests, interface); + my_CFSetRemoveValue(&S_nat64_prefix_updates, interface); + my_CFSetAddValue(&S_nat64_cancel_prefix_requests, interface); + break; + default: + break; + } +} + +static void +set_plat_discovery(PLATDiscoveryOption option, CFStringRef interface) +{ + CFRetain(interface); + dispatch_async(__network_change_queue(), ^{ + set_plat_discovery_locked(option, interface); + CFRelease(interface); + }); + + return; +} +#endif /* !TARGET_OS_SIMULATOR */ + static boolean_t -cfstring_to_ipvx(int family, CFStringRef str, void * addr, int addr_size) +cfstring_to_ipvx(int family, CFStringRef str, void * addr, size_t addr_size) { char buf[128]; @@ -1133,7 +1160,7 @@ cfstring_to_ipvx(int family, CFStringRef str, void * addr, int addr_size) return (TRUE); } done: - bzero(addr, addr_size); + memset(addr, 0, addr_size); return (FALSE); } @@ -1463,7 +1490,7 @@ RouteListGetFirstRoute(RouteListInfoRef info, RouteListRef routes) return (RouteListGetRouteAtIndexSimple(info, routes, 0)); } -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static CFIndex RouteListRouteIndex(RouteListInfoRef info, RouteListRef routes, RouteRef route) @@ -1472,7 +1499,7 @@ RouteListRouteIndex(RouteListInfoRef info, RouteListRef routes, - (void *)RouteListGetFirstRoute(info, routes)) / info->element_size); } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ static RouteRef RouteGetNextRoute(RouteListInfoRef info, RouteRef route) @@ -1494,12 +1521,12 @@ RouteListAddRouteAtIndex(RouteListInfoRef info, RouteListRef routes, else { /* make space at [where] */ insert_route = RouteListGetRouteAtIndexSimple(info, routes, where); - bcopy(insert_route, - (void *)insert_route + info->element_size, - info->element_size * (routes->count - where)); + memcpy((void *)insert_route + info->element_size, + insert_route, + info->element_size * (routes->count - where)); } /* copy the route */ - bcopy(this_route, insert_route, info->element_size); + memcpy(insert_route, this_route, info->element_size); routes->count++; return (insert_route); } @@ -1520,9 +1547,9 @@ RouteListRemoveRouteAtIndex(RouteListInfoRef info, RouteListRef routes, RouteRef remove_route; remove_route = RouteListGetRouteAtIndexSimple(info, routes, where); - bcopy((void *)remove_route + info->element_size, - remove_route, - info->element_size * (routes->count - where)); + memcpy(remove_route, + (void *)remove_route + info->element_size, + info->element_size * (routes->count - where)); } return; } @@ -1564,7 +1591,7 @@ RouteListAddRoute(RouteListInfoRef info, size_t alloc_size = (*info->list_compute_size)(init_size); routes = (RouteListRef)malloc(alloc_size); - bzero(routes, sizeof(*routes)); + memset(routes, 0, alloc_size); routes->size = init_size; } for (i = 0, scan = RouteListGetFirstRoute(info, routes); @@ -1575,12 +1602,13 @@ RouteListAddRoute(RouteListInfoRef info, cmp = RouteCompare(info, this_route, this_rank, scan, scan->rank, &same_dest); - if (same_dest == TRUE && first_scan == NULL) { + if (same_dest && (first_scan == NULL)) { first_scan = scan; } if (cmp < 0) { if (where == kCFNotFound) { - if (same_dest == TRUE + if (same_dest + && (first_scan != NULL) && (first_scan->flags & kRouteFlagsIsScoped) == 0) { if ((scan->flags & kRouteFlagsIsScoped) != 0) { ROUTELIST_DEBUG(kDebugFlag8, @@ -1638,7 +1666,7 @@ RouteListAddRoute(RouteListInfoRef info, else if (this_route->ifindex != 0) { ifindex = this_route->ifindex; } - bcopy(this_route, scan, info->element_size); + memcpy(scan, this_route, info->element_size); scan->rank = this_rank; scan->ifindex = ifindex; scan->exclude_ifindex = 0; @@ -1652,7 +1680,7 @@ RouteListAddRoute(RouteListInfoRef info, goto done; } else { - if (same_dest == TRUE) { + if (same_dest) { if (scope_which == kScopeNone) { ROUTELIST_DEBUG(kDebugFlag8, "Hit 6: set scope on self\n"); scope_which = kScopeThis; @@ -1803,7 +1831,7 @@ RouteAddFlagsToDescription(RouteRef r, CFMutableStringRef str) return; } -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static RouteRef RouteListFindRoute(RouteListInfoRef info, RouteListRef routes, RouteRef route) { @@ -1935,16 +1963,13 @@ RouteProcess(RouteRef route, route->ifindex, kRouteLookupFlagsNone); if (gateway_route == NULL) { - (*route_log)(LOG_NOTICE, route, - "IPMonitor RouteProcess: no gateway route"); + (*route_log)(LOG_NOTICE, route, "no gateway route"); } else { #define MAX_RECURSE_DEPTH 10 /* avoid infinite recursion */ if (context->depth == MAX_RECURSE_DEPTH) { - (*route_log)(LOG_NOTICE, route, - "IPMonitor RouteProcess: " - "routing loop detected, not adding"); + (*route_log)(LOG_NOTICE, route, "routing loop detected, not adding"); return (FALSE); } /* recurse to add gateway route */ @@ -1953,9 +1978,8 @@ RouteProcess(RouteRef route, kRouteCommandAdd, context); context->depth--; - if (added == FALSE) { - (*route_log)(LOG_NOTICE, route, - "IPMonitor RouteProcess: failed to add"); + if (!added) { + (*route_log)(LOG_NOTICE, route, "failed to add"); return (FALSE); } } @@ -1969,7 +1993,7 @@ RouteProcess(RouteRef route, switch (retval) { default: my_log(LOG_NOTICE, - "IPMonitor RouteProcess failed to add route, %s:", + "failed to add route, %s:", strerror(retval)); (*route_log)(LOG_NOTICE, route, NULL); break; @@ -2013,8 +2037,8 @@ RouteProcess(RouteRef route, break; default: my_log(LOG_NOTICE, - "IPMonitor RouteProcess failed to remove" - " route, %s", strerror(retval)); + "failed to remove route, %s", + strerror(retval)); (*route_log)(LOG_NOTICE, route, NULL); break; } @@ -2038,7 +2062,7 @@ RouteListApply(RouteListInfoRef info, /* both old and new are NULL, so there's nothing to do */ return; } - bzero(&context, sizeof(context)); + memset(&context, 0, sizeof(context)); context.old_routes = old_routes; context.new_routes = new_routes; context.sockfd = sockfd; @@ -2068,7 +2092,7 @@ RouteListApply(RouteListInfoRef info, RouteRef old_route = NULL; old_route = RouteListFindRoute(info, old_routes, scan); - if (old_route != NULL) { + if (old_route != NULL && scan->sidn == old_route->sidn) { /* preserve the control state in the new route */ scan->control_flags = old_route->control_flags; } @@ -2130,8 +2154,7 @@ RouteListFinalize(RouteListInfoRef info, RouteListRef routes) (*info->route_destination)(scan), scan->prefix_length, ifindex, flags); if (route == NULL) { - (*info->route_log)(LOG_NOTICE, (RouteRef)scan, - "IPMonitor: can't resolve excluded route"); + (*info->route_log)(LOG_NOTICE, (RouteRef)scan, "can't resolve excluded route"); } else { if ((S_IPMonitor_debug & kDebugFlag8) != 0) { @@ -2154,7 +2177,7 @@ RouteListFinalize(RouteListInfoRef info, RouteListRef routes) } return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ /** ** IPv4Route* @@ -2197,6 +2220,11 @@ IPv4RouteCopyDescriptionWithString(IPv4RouteRef r, CFMutableStringRef str) CFSTR(" Ifa " IP_FORMAT), IP_LIST(&r->ifa)); } +#if !TEST_IPV4_ROUTELIST + CFStringAppendFormat(str, NULL, + CFSTR(" "), + r->sidn); +#endif RouteAddFlagsToDescription((RouteRef)r, str); return; } @@ -2427,7 +2455,7 @@ typedef struct { static int IPv4RouteApply(RouteRef r_route, int cmd, int sockfd) { - int len; + size_t len; int ret = 0; IPv4RouteRef route = (IPv4RouteRef)r_route; route_msg rtmsg; @@ -2441,17 +2469,12 @@ IPv4RouteApply(RouteRef r_route, int cmd, int sockfd) /* don't touch the default route */ return (EROUTENOTAPPLIED); } - if ((route->flags & kRouteFlagsIsScoped) != 0 - && !S_scopedroute) { - return (EROUTENOTAPPLIED); - } if ((route->flags & kRouteFlagsIsNULL) != 0) { return (EROUTENOTAPPLIED); } if (route->ifindex == 0) { my_log(LOG_NOTICE, - "IPMonitor IPv4RouteApply: " IP_FORMAT - " no interface specified, ignoring", + IP_FORMAT " no interface specified, ignoring", IP_LIST(&route->dest)); return (ENXIO); } @@ -2561,7 +2584,7 @@ static const RouteListInfo IPv4RouteListInfo = { IPV4_ROUTE_ALL_BITS_SET }; -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static __inline__ void IPv4RouteListLog(int level, IPv4RouteListRef routes) { @@ -2588,9 +2611,9 @@ IPv4RouteListFinalize(IPv4RouteListRef routes) RouteListFinalize(&IPv4RouteListInfo, (RouteListRef)routes); return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ -#ifdef TEST_IPV4_ROUTELIST +#if TEST_IPV4_ROUTELIST static IPv4RouteListRef IPv4RouteListAddRouteList(IPv4RouteListRef routes, int init_size, IPv4RouteListRef service_routes, Rank rank) @@ -2612,8 +2635,7 @@ plist_get_string(CFDictionaryRef dict, CFStringRef prop_name, if (isA_CFString(val) == NULL) { return (NULL); } - if (CFStringGetCString(val, buf, buf_size, kCFStringEncodingUTF8) - == FALSE) { + if (!CFStringGetCString(val, buf, buf_size, kCFStringEncodingUTF8)) { return (NULL); } return (val); @@ -2627,6 +2649,7 @@ typedef struct { IPv4RouteRef * route_p; Rank rank; const char * descr; + serviceIDNumber sidn; } AddIPv4RouteContext, * AddIPv4RouteContextRef; static void @@ -2642,22 +2665,23 @@ AddIPv4Route(const void * value, void * context) || !dict_get_ip(dict, kSCPropNetIPv4RouteSubnetMask, &r->mask)) { /* one less route than we expected */ if (dict == NULL) { - my_log(LOG_NOTICE, "IPMonitor: %s route is not a dictionary", + my_log(LOG_NOTICE, "%s route is not a dictionary", ctx->descr); } else { - my_log(LOG_NOTICE, "IPMonitor: %s route is invalid, %@", + my_log(LOG_NOTICE, "%s route is invalid, %@", ctx->descr, dict); } goto skip; } - if (IPv4RouteSetPrefixLength(r) == FALSE) { - my_log(LOG_NOTICE, "IPMonitor: %s route has invalid subnet mask, %@", + if (!IPv4RouteSetPrefixLength(r)) { + my_log(LOG_NOTICE, "%s route has invalid subnet mask, %@", ctx->descr, dict); goto skip; } r->rank = ctx->rank; r->exclude_ifindex = ctx->exclude_ifindex; + r->sidn = ctx->sidn; if (ctx->ifindex != 0) { r->ifindex = ctx->ifindex; r->ifa = ctx->addr; @@ -2681,13 +2705,13 @@ AddIPv4Route(const void * value, void * context) ifindex = my_if_nametoindex(ifname); if (ifindex == 0) { my_log(LOG_NOTICE, - "IPMonitor %s: interface %s does not exist, %@", + "%s: interface %s does not exist, %@", ctx->descr, ifname, dict); goto skip; } else if (ifindex == ctx->ifindex) { my_log(LOG_NOTICE, - "IPMonitor %s: interface %s unexpected, %@", + "%s: interface %s unexpected, %@", ctx->descr, ifname, dict); goto skip; } @@ -2735,8 +2759,10 @@ confirm_interface_name(CFDictionaryRef dict, CFStringRef ifname) static IPv4RouteListRef IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, CFDictionaryRef dict, - CFNumberRef rank_assertion) + CFNumberRef rank_assertion, + serviceIDNumber sidn) { + boolean_t add_broadcast_multicast = FALSE; boolean_t add_default = FALSE; boolean_t add_router_subnet = FALSE; boolean_t add_subnet = FALSE; @@ -2758,6 +2784,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, IPv4RouteRef r; Rank rank = kRankAssertionDefault; struct in_addr router = { 0 }; + boolean_t scoped_only = FALSE; struct in_addr subnet = { 0 }; if (dict == NULL) { @@ -2774,29 +2801,23 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, return (NULL); } allow_additional_routes = confirm_interface_name(dict, ifname_cf); - if (dict_get_ip(dict, kSCPropNetIPv4Router, &router) == FALSE) { + if (!dict_get_ip(dict, kSCPropNetIPv4Router, &router)) { (void)dict_get_first_ip(dict, kSCPropNetIPv4DestAddresses, &router); } if (dict_get_first_ip(dict, kSCPropNetIPv4Addresses, &addr) && dict_get_first_ip(dict, kSCPropNetIPv4SubnetMasks, &mask)) { /* subnet route */ subnet = subnet_addr(addr, mask); - /* ignore link-local subnets, let IPConfiguration handle them for now */ - if (ntohl(subnet.s_addr) != IN_LINKLOCALNETNUM) { - prefix_length = mask_get_prefix_length(mask); - if (prefix_length < 0) { - my_log(LOG_NOTICE, - "IPMonitor: ignoring bad subnet mask " - IP_FORMAT " on %s", - IP_LIST(&mask), ifname); - } - else { - add_subnet = TRUE; - n++; - } + prefix_length = mask_get_prefix_length(mask); + if (prefix_length < 0) { + my_log(LOG_NOTICE, + "ignoring bad subnet mask " + IP_FORMAT " on %s", + IP_LIST(&mask), ifname); } - else if (router.s_addr == 0) { - exclude_from_nwi = TRUE; + else { + add_subnet = TRUE; + n++; } } if (addr.s_addr == 0) { @@ -2848,6 +2869,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, /* Scoped means all routes for the service get scoped */ primary_rank = rank = kRankAssertionNever; flags |= kRouteFlagsIsScoped; + scoped_only = TRUE; break; case kRankAssertionNever: /* Never means just the default route gets scoped */ @@ -2865,8 +2887,12 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, } if (ifindex != lo0_ifindex()) { - add_default = TRUE; - n++; + if (router.s_addr != 0) { + add_default = TRUE; + n++; + } + add_broadcast_multicast = TRUE; + n += 2; } if (allow_additional_routes) { additional_routes @@ -2886,13 +2912,19 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, } if (routes == NULL || routes->size < n) { routes = (IPv4RouteListRef)malloc(IPv4RouteListComputeSize(n)); + memset(routes, 0, IPv4RouteListComputeSize(n)); routes->size = n; } - bzero(routes, IPv4RouteListComputeSize(n)); + else { + memset(routes->list, 0, sizeof(routes->list[0]) * n); + } routes->count = n; if (exclude_from_nwi) { routes->flags |= kRouteListFlagsExcludeNWI; } + else if (scoped_only) { + routes->flags |= kRouteListFlagsScopedOnly; + } /* start at the beginning */ r = routes->list; @@ -2900,6 +2932,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, if (add_default) { /* add the default route */ routes->flags |= kRouteListFlagsHasDefault; + r->sidn = sidn; r->ifindex = ifindex; r->ifa = addr; r->flags = flags; @@ -2912,6 +2945,34 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, r->rank = primary_rank; r++; } + if (add_broadcast_multicast) { + /* add the broadcast route (rdar://problem/22149738) */ + if ((flags & kRouteFlagsIsNULL) != 0) { + r->flags |= kRouteFlagsIsNULL; + } + r->dest.s_addr = INADDR_BROADCAST; + r->mask.s_addr = INADDR_BROADCAST; + r->prefix_length = IPV4_ROUTE_ALL_BITS_SET; + r->ifindex = ifindex; + r->sidn = sidn; + r->ifa = addr; + r->rank = rank; + r++; + + /* add multicast route (rdar://problem/26457121) */ + if ((flags & kRouteFlagsIsNULL) != 0) { + r->flags |= kRouteFlagsIsNULL; + } + r->dest.s_addr = htonl(INADDR_UNSPEC_GROUP); + r->mask.s_addr = htonl(IN_CLASSD_NET); + r->prefix_length = PREFIX_LENGTH_IN_CLASSD; + r->ifindex = ifindex; + r->sidn = sidn; + r->ifa = addr; + r->rank = rank; + r++; + + } /* add the subnet route */ if (add_subnet) { @@ -2919,6 +2980,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, r->flags |= kRouteFlagsIsNULL; } r->ifindex = ifindex; + r->sidn = sidn; r->gateway = addr; r->dest = subnet; r->mask = mask; @@ -2934,6 +2996,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, r->flags |= kRouteFlagsIsNULL; } r->ifindex = ifindex; + r->sidn = sidn; r->gateway = addr; r->dest = router; r->mask.s_addr = INADDR_BROADCAST; @@ -2946,7 +3009,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, if (additional_routes != NULL || excluded_routes != NULL) { AddIPv4RouteContext context; - bzero(&context, sizeof(context)); + memset(&context, 0, sizeof(context)); context.count_p = &routes->count; context.route_p = &r; context.rank = rank; @@ -2956,6 +3019,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, context.ifindex = ifindex; context.addr = addr; context.descr = "AdditionalRoutes"; + context.sidn = sidn; CFArrayApplyFunction(additional_routes, CFRangeMake(0, additional_routes_count), AddIPv4Route, &context); @@ -2966,6 +3030,7 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, /* exclude this interface */ context.ifindex = 0; context.exclude_ifindex = ifindex; + context.sidn = sidn; CFArrayApplyFunction(excluded_routes, CFRangeMake(0, excluded_routes_count), AddIPv4Route, &context); @@ -2974,6 +3039,27 @@ IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, return (routes); } +#if !TARGET_OS_SIMULATOR +static IPv4RouteListRef +IPv4RouteListCopyMulticastLoopback(void) +{ + IPv4RouteRef r; + IPv4RouteListRef routes; + + routes = (IPv4RouteListRef)malloc(IPv4RouteListComputeSize(1)); + memset(routes, 0, IPv4RouteListComputeSize(1)); + routes->count = routes->size = 1; + + r = routes->list; + r->dest.s_addr = htonl(INADDR_UNSPEC_GROUP); + r->mask.s_addr = htonl(IN_CLASSC_NET); + r->prefix_length = PREFIX_LENGTH_IN_CLASSC; + r->ifindex = lo0_ifindex(); + r->sidn = kserviceIDNumberZero; + return (routes); +} +#endif /* !TARGET_OS_SIMULATOR */ + /** ** IPv6Route* **/ @@ -2996,7 +3082,7 @@ in6_len2mask(struct in6_addr * mask, int len) { int i; - bzero(mask, sizeof(*mask)); + memset(mask, 0, sizeof(*mask)); for (i = 0; i < len / 8; i++) mask->s6_addr[i] = 0xff; if (len % 8) @@ -3006,9 +3092,7 @@ in6_len2mask(struct in6_addr * mask, int len) static void in6_maskaddr(struct in6_addr * addr, const struct in6_addr * mask) { - int i; - - for (i = 0; i < sizeof(addr->s6_addr); i++) { + for (size_t i = 0; i < sizeof(addr->s6_addr); i++) { addr->s6_addr[i] &= mask->s6_addr[i]; } return; @@ -3066,6 +3150,11 @@ IPv6RouteCopyDescriptionWithString(IPv6RouteRef r, CFMutableStringRef str) CFStringAppend(str, CFSTR(" Ifa ")); string_append_in6_addr(str, &r->ifa); } +#if !TEST_IPV6_ROUTELIST + CFStringAppendFormat(str, NULL, + CFSTR(" "), + r->sidn); +#endif RouteAddFlagsToDescription((RouteRef)r, str); return; } @@ -3098,7 +3187,7 @@ IPv6RouteListCopyDescription(IPv6RouteListRef routes) return (str); } -#ifdef TEST_IPV6_ROUTELIST +#if TEST_IPV6_ROUTELIST static void IPv6RouteLog(int level, RouteRef route, const char * msg) @@ -3159,6 +3248,7 @@ typedef struct { IPv6RouteRef * route_p; Rank rank; const char * descr; + serviceIDNumber sidn; } AddIPv6RouteContext, * AddIPv6RouteContextRef; static void @@ -3176,17 +3266,18 @@ AddIPv6Route(const void * value, void * context) || !ipv6_prefix_length_is_valid(r->prefix_length)) { /* one less route than we expected */ if (dict == NULL) { - my_log(LOG_NOTICE, "IPMonitor: %s route is not a dictionary", + my_log(LOG_NOTICE, "%s route is not a dictionary", ctx->descr); } else { - my_log(LOG_NOTICE, "IPMonitor: %s route is invalid, %@", + my_log(LOG_NOTICE, "%s route is invalid, %@", ctx->descr, dict); } goto skip; } r->rank = ctx->rank; r->exclude_ifindex = ctx->exclude_ifindex; + r->sidn = ctx->sidn; if (ctx->ifindex != 0) { r->ifindex = ctx->ifindex; r->ifa = *ctx->addr; @@ -3210,13 +3301,13 @@ AddIPv6Route(const void * value, void * context) ifindex = my_if_nametoindex(ifname); if (ifindex == 0) { my_log(LOG_NOTICE, - "IPMonitor %s: interface %s does not exist, %@", + "%s: interface %s does not exist, %@", ctx->descr, ifname, dict); goto skip; } else if (ifindex == ctx->ifindex) { my_log(LOG_NOTICE, - "IPMonitor %s: interface %s unexpected, %@", + "%s: interface %s unexpected, %@", ctx->descr, ifname, dict); goto skip; } @@ -3245,7 +3336,8 @@ AddIPv6Route(const void * value, void * context) static IPv6RouteListRef IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, CFDictionaryRef dict, - CFNumberRef rank_assertion) + CFNumberRef rank_assertion, + serviceIDNumber sidn) { boolean_t add_default = FALSE; boolean_t add_prefix = FALSE; @@ -3266,6 +3358,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, IPv6RouteRef r; Rank rank = kRankAssertionDefault; struct in6_addr router = in6addr_any; + boolean_t scoped_only = FALSE; if (dict == NULL) { return (NULL); @@ -3281,7 +3374,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, return (NULL); } allow_additional_routes = confirm_interface_name(dict, ifname_cf); - if (dict_get_ipv6(dict, kSCPropNetIPv6Router, &router) == FALSE) { + if (!dict_get_ipv6(dict, kSCPropNetIPv6Router, &router)) { (void)dict_get_first_ipv6(dict, kSCPropNetIPv6DestAddresses, &router); } if (dict_get_first_ipv6(dict, kSCPropNetIPv6Addresses, &addr)) { @@ -3337,6 +3430,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, /* Scoped means all routes for the service get scoped */ primary_rank = rank = kRankAssertionNever; flags |= kRouteFlagsIsScoped; + scoped_only = TRUE; break; case kRankAssertionNever: /* Never means just the default route gets scoped */ @@ -3373,13 +3467,19 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, if (routes == NULL || routes->size < n) { routes = (IPv6RouteListRef)malloc(IPv6RouteListComputeSize(n)); + memset(routes, 0, IPv6RouteListComputeSize(n)); routes->size = n; } - bzero(routes, IPv6RouteListComputeSize(n)); + else { + memset(routes->list, 0, sizeof(routes->list[0]) * n); + } routes->count = n; if (exclude_from_nwi) { routes->flags |= kRouteListFlagsExcludeNWI; } + else if (scoped_only) { + routes->flags |= kRouteListFlagsScopedOnly; + } /* start at the beginning */ r = routes->list; @@ -3387,6 +3487,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, /* add the default route */ routes->flags |= kRouteListFlagsHasDefault; r->ifindex = ifindex; + r->sidn = sidn; r->ifa = addr; r->flags = flags; if ((flags & kRouteFlagsHasGateway) != 0) { @@ -3396,15 +3497,14 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, r->gateway = addr; } r->rank = primary_rank; - if (S_scopedroute_v6) { - r->flags |= kRouteFlagsKernelManaged; - } + r->flags |= kRouteFlagsKernelManaged; r++; } /* add IPv6LL route */ r->ifindex = ifindex; + r->sidn = sidn; r->dest.s6_addr[0] = 0xfe; r->dest.s6_addr[1] = 0x80; r->prefix_length = 64; @@ -3420,6 +3520,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, r->flags |= kRouteFlagsIsNULL; } r->ifindex = ifindex; + r->sidn = sidn; r->gateway = addr; r->dest = addr; in6_netaddr(&r->dest, prefix_length); @@ -3432,7 +3533,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, if (additional_routes != NULL || excluded_routes != NULL) { AddIPv6RouteContext context; - bzero(&context, sizeof(context)); + memset(&context, 0, sizeof(context)); context.count_p = &routes->count; context.route_p = &r; context.rank = rank; @@ -3442,6 +3543,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, context.ifindex = ifindex; context.addr = &addr; context.descr = "AdditionalRoutes"; + context.sidn = sidn; CFArrayApplyFunction(additional_routes, CFRangeMake(0, additional_routes_count), AddIPv6Route, &context); @@ -3453,6 +3555,7 @@ IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, context.ifindex = 0; context.exclude_ifindex = ifindex; context.addr = NULL; + context.sidn = sidn; CFArrayApplyFunction(excluded_routes, CFRangeMake(0, excluded_routes_count), AddIPv6Route, &context); @@ -3542,10 +3645,6 @@ IPv6RouteApply(RouteRef r_route, int cmd, int sockfd) void * ptr; } rtaddr; - if ((route->flags & kRouteFlagsIsScoped) != 0 - && !S_scopedroute_v6) { - return (EROUTENOTAPPLIED); - } if ((route->flags & kRouteFlagsKernelManaged) != 0) { /* the kernel manages this route, don't touch it */ return (EROUTENOTAPPLIED); @@ -3555,11 +3654,11 @@ IPv6RouteApply(RouteRef r_route, int cmd, int sockfd) } if (route->ifindex == 0) { IPv6RouteLog(LOG_NOTICE, (RouteRef)route, - "IPMonitor IPv6RouteApply: no interface specified"); + "no interface specified"); return (ENXIO); } if (sockfd == -1) { -#ifdef TEST_IPV6_ROUTELIST +#if TEST_IPV6_ROUTELIST return (0); #else /* TEST_IPV6_ROUTELIST */ return (EBADF); @@ -3666,7 +3765,7 @@ static const RouteListInfo IPv6RouteListInfo = { IPV6_ROUTE_ALL_BITS_SET }; -#ifdef TEST_IPV6_ROUTELIST +#if TEST_IPV6_ROUTELIST static IPv6RouteListRef IPv6RouteListAddRouteList(IPv6RouteListRef routes, int init_size, IPv6RouteListRef service_routes, Rank rank) @@ -3678,7 +3777,7 @@ IPv6RouteListAddRouteList(IPv6RouteListRef routes, int init_size, } #endif /* TEST_IPV6_ROUTELIST */ -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static __inline__ void IPv6RouteListLog(int level, IPv6RouteListRef routes) { @@ -3705,7 +3804,7 @@ IPv6RouteListApply(IPv6RouteListRef old_routes, IPv6RouteListRef new_routes, sockfd); return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ /* * Function: parse_component @@ -3726,7 +3825,7 @@ parse_component(CFStringRef key, CFStringRef prefix) CFMutableStringRef comp; CFRange range; - if (CFStringHasPrefix(key, prefix) == FALSE) { + if (!CFStringHasPrefix(key, prefix)) { return (NULL); } comp = CFStringCreateMutableCopy(NULL, 0, key); @@ -3743,40 +3842,57 @@ parse_component(CFStringRef key, CFStringRef prefix) return (comp); } -__private_extern__ boolean_t -service_contains_protocol(CFDictionaryRef service, int af) + +static boolean_t +ipdict_is_routable(CFDictionaryRef entity_dict) { - boolean_t contains_protocol = FALSE; - CFStringRef entity; RouteListRef routes; - CFDictionaryRef dict; - entity = (af == AF_INET) ? kSCEntNetIPv4 : kSCEntNetIPv6; - dict = CFDictionaryGetValue(service, entity); - if (dict == NULL) { - goto done; - } - routes = ipdict_get_routelist(dict); + routes = ipdict_get_routelist(entity_dict); if (routes == NULL) { - goto done; + // if no routes + return FALSE; + } + + if ((routes->flags & kRouteListFlagsHasDefault) == 0) { + // if service has no default route + return FALSE; } + if ((routes->flags & kRouteListFlagsExcludeNWI) != 0) { - goto done; + // if service should be excluded from NWI + return FALSE; } - contains_protocol = TRUE; - done: - return (contains_protocol); + return TRUE; } -static CFMutableDictionaryRef -service_dict_copy(CFStringRef serviceID) +__private_extern__ boolean_t +service_is_routable(CFDictionaryRef service_dict, int af) { - CFDictionaryRef d = NULL; - CFMutableDictionaryRef service_dict; + boolean_t contains_protocol; + CFStringRef entity; + CFDictionaryRef entity_dict; - /* create a modifyable dictionary, a copy or a new one */ + entity = (af == AF_INET) ? kSCEntNetIPv4 : kSCEntNetIPv6; + entity_dict = CFDictionaryGetValue(service_dict, entity); + if (entity_dict == NULL) { + return FALSE; + } + + contains_protocol = ipdict_is_routable(entity_dict); + return contains_protocol; +} + + +static CFMutableDictionaryRef +service_dict_copy(CFStringRef serviceID) +{ + CFDictionaryRef d = NULL; + CFMutableDictionaryRef service_dict; + + /* create a modifyable dictionary, a copy or a new one */ d = CFDictionaryGetValue(S_service_state_dict, serviceID); if (d == NULL) { service_dict @@ -3790,11 +3906,68 @@ service_dict_copy(CFStringRef serviceID) return (service_dict); } +__private_extern__ boolean_t +service_is_scoped_only(CFDictionaryRef service_dict) +{ + nwi_ifstate_t alias; + CFDictionaryRef dict; + char ifname[IFNAMSIZ]; + nwi_ifstate_t ifstate; + CFStringRef interface = NULL; + + // get IPv4 (or IPv6) info + dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv4); + if (dict == NULL) { + dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv6); + } + if (dict == NULL) { + // if no connectivity + return FALSE; + } + + // get interface + interface = ipdict_get_ifname(dict); + if ((interface == NULL) || + !CFStringGetCString(interface, ifname, sizeof(ifname), kCFStringEncodingUTF8)) { + // if no interface / interface name + return FALSE; + } + +#ifdef TEST_DNS + if (S_nwi_state == NULL) { + S_nwi_state = nwi_state_copy(); + } +#endif // TEST_DNS + + // get [nwi] interface state + ifstate = nwi_state_get_ifstate(S_nwi_state, ifname); + if (ifstate == NULL) { + // if unknown state + return FALSE; + } else if ((ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0) { + // if scoped (i.e. not in list) + return TRUE; + } + + // check both both IPv4 and IPv6 + alias = nwi_ifstate_get_alias(ifstate, ifstate->af == AF_INET ? AF_INET6 : AF_INET); + if (alias == NULL) { + // if only one address family + return FALSE; + } else if ((alias->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0) { + // if scoped (i.e. not in list) + return TRUE; + } + + return FALSE; +} + static void log_service_entity(int level, CFStringRef serviceID, CFStringRef entity, CFStringRef operation, CFTypeRef val) { - CFMutableStringRef this_val = NULL; + serviceIDNumber service_number; + CFMutableStringRef this_val = NULL; if (val != NULL) { boolean_t is_ipv4; @@ -3827,8 +4000,14 @@ log_service_entity(int level, CFStringRef serviceID, CFStringRef entity, if (val == NULL) { val = CFSTR(""); } - my_log(level, "IPMonitor: serviceID %@ %@ %@ value = %@", - serviceID, operation, entity, val); + if (serviceIDNumberGetIfPresent(serviceID, &service_number)) { + my_log(level, "serviceID %@ %@ %@ value = %@", + serviceID, service_number, operation, entity, val); + } + else { + my_log(level, "serviceID %@ %@ %@ value = %@", + serviceID, operation, entity, val); + } my_CFRelease(&this_val); return; } @@ -3854,7 +4033,7 @@ service_dict_set(CFStringRef serviceID, CFStringRef entity, } } else { - if (old_val == NULL || CFEqual(new_val, old_val) == FALSE) { + if (old_val == NULL || !CFEqual(new_val, old_val)) { if ((S_IPMonitor_debug & kDebugFlag1) != 0) { log_service_entity(LOG_DEBUG, serviceID, entity, CFSTR("Changed: old"), old_val); @@ -3867,6 +4046,7 @@ service_dict_set(CFStringRef serviceID, CFStringRef entity, } if (CFDictionaryGetCount(service_dict) == 0) { CFDictionaryRemoveValue(S_service_state_dict, serviceID); + serviceIDNumberRemove(serviceID); } else { CFDictionarySetValue(S_service_state_dict, serviceID, service_dict); @@ -3880,6 +4060,9 @@ service_dict_get(CFStringRef serviceID, CFStringRef entity) { CFDictionaryRef service_dict; + if (S_service_state_dict == NULL) { + return (NULL); + } service_dict = CFDictionaryGetValue(S_service_state_dict, serviceID); if (service_dict == NULL) { return (NULL); @@ -3887,6 +4070,58 @@ service_dict_get(CFStringRef serviceID, CFStringRef entity) return (CFDictionaryGetValue(service_dict, entity)); } +#if !TARGET_OS_SIMULATOR +static CFStringRef +service_copy_interface(CFStringRef serviceID, CFDictionaryRef new_service) +{ + CFDictionaryRef dict; + CFStringRef interface = NULL; + + if (new_service != NULL) { + interface = ipdict_get_ifname(new_service); + } + if (interface == NULL) { + dict = service_dict_get(serviceID, kSCEntNetIPv4); + if (dict != NULL) { + interface = ipdict_get_ifname(dict); + } + } + if (interface == NULL) { + dict = service_dict_get(serviceID, kSCEntNetIPv6); + if (dict != NULL) { + interface = ipdict_get_ifname(dict); + } + } + if (interface != NULL) { + CFRetain(interface); + } + return interface; +} +#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 @@ -3914,7 +4149,7 @@ copy_dhcp_hostname(CFStringRef serviceID) return (hostname); } -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static struct in6_addr * ipv6_service_get_router(CFDictionaryRef service, @@ -3957,9 +4192,6 @@ ipv6_service_update_router(CFStringRef serviceID, CFDictionaryRef new_service) } s = inet6_dgram_socket(); if (s < 0) { - my_log(LOG_ERR, - "IPMonitor: ipv6_service_update_router: socket failed, %s", - strerror(errno)); goto done; } /* remove the old router if it was defined */ @@ -3967,19 +4199,16 @@ ipv6_service_update_router(CFStringRef serviceID, CFDictionaryRef new_service) && (new_router == NULL || !IN6_ARE_ADDR_EQUAL(old_router, new_router))) { if (siocdrdel_in6(s, ifindex, old_router) < 0) { - if (errno != EINVAL - || (S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log((errno == EINVAL) ? LOG_DEBUG : LOG_ERR, - "IPMonitor: siocdrdel_in6(%@, %s) failed, %s", - ifname, - inet_ntop(AF_INET6, old_router, - ntopbuf, sizeof(ntopbuf)), - strerror(errno)); - } + my_log((errno == EINVAL) ? LOG_DEBUG : LOG_ERR, + "siocdrdel_in6(%@, %s) failed: %s", + ifname, + inet_ntop(AF_INET6, old_router, + ntopbuf, sizeof(ntopbuf)), + strerror(errno)); } - else if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "IPMonitor: %@ removed default route %s", + else { + my_log(LOG_INFO, + "%@ removed default route %s", ifname, inet_ntop(AF_INET6, old_router, ntopbuf, sizeof(ntopbuf))); } @@ -3989,19 +4218,16 @@ ipv6_service_update_router(CFStringRef serviceID, CFDictionaryRef new_service) && (old_router == NULL || !IN6_ARE_ADDR_EQUAL(old_router, new_router))) { if (siocdradd_in6(s, ifindex, new_router, 0) < 0) { - if (errno != EINVAL - || (S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log((errno == EINVAL) ? LOG_DEBUG : LOG_ERR, - "IPMonitor: siocdradd_in6(%@, %s) failed, %s", - ifname, - inet_ntop(AF_INET6, new_router, - ntopbuf, sizeof(ntopbuf)), - strerror(errno)); - } + my_log((errno == EINVAL) ? LOG_DEBUG : LOG_ERR, + "siocdradd_in6(%@, %s) failed: %s", + ifname, + inet_ntop(AF_INET6, new_router, + ntopbuf, sizeof(ntopbuf)), + strerror(errno)); } - else if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "IPMonitor: %@ added default route %s", + else { + my_log(LOG_INFO, + "%@ added default route %s", ifname, inet_ntop(AF_INET6, new_router, ntopbuf, sizeof(ntopbuf))); } @@ -4011,7 +4237,7 @@ ipv6_service_update_router(CFStringRef serviceID, CFDictionaryRef new_service) done: return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ #define ALLOW_EMPTY_STRING 0x1 @@ -4148,13 +4374,15 @@ pick_prop(CFMutableDictionaryRef dict, routes->flags = 0; static CFDataRef -IPv4RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion) +IPv4RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion, + serviceIDNumber sidn) { IPv4RouteListRef r; CFDataRef routes_data; IPV4_ROUTES_BUF_DECL(routes); - r = IPv4RouteListCreateWithDictionary(routes, dict, rank_assertion); + r = IPv4RouteListCreateWithDictionary(routes, dict, rank_assertion, + sidn); if (r != NULL) { routes_data = CFDataCreate(NULL, (const void *)r, @@ -4184,13 +4412,15 @@ IPv4RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion) routes->flags = 0; static CFDataRef -IPv6RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion) +IPv6RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion, + serviceIDNumber sidn) { IPv6RouteListRef r; CFDataRef routes_data; IPV6_ROUTES_BUF_DECL(routes); - r = IPv6RouteListCreateWithDictionary(routes, dict, rank_assertion); + r = IPv6RouteListCreateWithDictionary(routes, dict, rank_assertion, + sidn); if (r != NULL) { routes_data = CFDataCreate(NULL, (const void *)r, @@ -4206,22 +4436,25 @@ IPv6RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion) } static CFDictionaryRef -IPDictCreate(int af, CFDictionaryRef state_dict, CFDictionaryRef setup_dict, - CFNumberRef rank_assertion) +IPDictCreate(int af, _Nonnull CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, + CFNumberRef rank_assertion, CFStringRef serviceID) { CFDictionaryRef aggregated_dict = NULL; CFDictionaryRef dict; CFMutableDictionaryRef modified_dict = NULL; CFDataRef routes_data; + serviceIDNumber sidn; + sidn = serviceIDNumberGet(serviceID); dict = state_dict; - if (dict != NULL && setup_dict != NULL) { + if (setup_dict != NULL) { /* look for keys in Setup: that override/merge with State: */ CFArrayRef additional_routes; + CFStringRef route_list_prop; CFStringRef router; in_addr router_ip; CFStringRef router_prop; - CFStringRef route_list_prop; /* Router */ switch (af) { @@ -4278,11 +4511,11 @@ IPDictCreate(int af, CFDictionaryRef state_dict, CFDictionaryRef setup_dict, } switch (af) { case AF_INET: - routes_data = IPv4RouteListDataCreate(dict, rank_assertion); + routes_data = IPv4RouteListDataCreate(dict, rank_assertion, sidn); break; default: case AF_INET6: - routes_data = IPv6RouteListDataCreate(dict, rank_assertion); + routes_data = IPv6RouteListDataCreate(dict, rank_assertion, sidn); break; } if (routes_data != NULL) { @@ -4299,6 +4532,7 @@ static boolean_t get_ipv4_changes(CFStringRef serviceID, CFDictionaryRef state_dict, CFDictionaryRef setup_dict, CFDictionaryRef info) { +#pragma unused(info) CFDictionaryRef dict = NULL; boolean_t changed = FALSE; CFNumberRef rank_assertion = NULL; @@ -4313,7 +4547,8 @@ get_ipv4_changes(CFStringRef serviceID, CFDictionaryRef state_dict, = CFDictionaryGetValue(service_options, kServiceOptionRankAssertion); } - dict = IPDictCreate(AF_INET, state_dict, setup_dict, rank_assertion); + dict = IPDictCreate(AF_INET, state_dict, setup_dict, rank_assertion, + serviceID); done: changed = service_dict_set(serviceID, kSCEntNetIPv4, dict); @@ -4325,12 +4560,17 @@ get_ipv4_changes(CFStringRef serviceID, CFDictionaryRef state_dict, return (changed); } + static boolean_t get_ipv6_changes(CFStringRef serviceID, CFDictionaryRef state_dict, CFDictionaryRef setup_dict, CFDictionaryRef info) { +#pragma unused(info) CFDictionaryRef dict = NULL; boolean_t changed = FALSE; +#if !TARGET_OS_SIMULATOR + CFStringRef interface; +#endif /* !TARGET_OS_SIMULATOR */ CFNumberRef rank_assertion = NULL; CFDictionaryRef service_options; @@ -4343,15 +4583,46 @@ get_ipv6_changes(CFStringRef serviceID, CFDictionaryRef state_dict, = CFDictionaryGetValue(service_options, kServiceOptionRankAssertion); } - dict = IPDictCreate(AF_INET6, state_dict, setup_dict, rank_assertion); + + dict = IPDictCreate(AF_INET6, state_dict, setup_dict, rank_assertion, + serviceID); done: -#if !TARGET_IPHONE_SIMULATOR + +#if !TARGET_OS_SIMULATOR + interface = service_copy_interface(serviceID, dict); ipv6_service_update_router(serviceID, dict); -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ + changed = service_dict_set(serviceID, kSCEntNetIPv6, dict); + +#if !TARGET_OS_SIMULATOR + if (interface != NULL) { + if (changed) { + CFBooleanRef needs_plat = NULL; + + if (dict == NULL) { + // if service is unpublished, cancel the request + set_plat_discovery(kPLATDiscoveryOptionCancel, interface); + } else if ((state_dict != NULL) && + CFDictionaryGetValueIfPresent(state_dict, + kSCPropNetIPv6PerformPLATDiscovery, + (const void **)&needs_plat) && + isA_CFBoolean(needs_plat) && + CFBooleanGetValue(needs_plat)) { + // perform PLAT discovery + set_plat_discovery(kPLATDiscoveryOptionStart, interface); + } else { + // IPv6 configuration changed for this interface, poke NAT64 + set_plat_discovery(kPLATDiscoveryOptionUpdate, interface); + } + } + CFRelease(interface); + } +#endif /* !TARGET_OS_SIMULATOR */ + if (dict == NULL) { - /* clean up the rank too */ + /* service removed, clean up the rank too */ CFDictionaryRemoveValue(S_ipv6_service_rank_dict, serviceID); } my_CFRelease(&dict); @@ -4363,13 +4634,13 @@ get_ipv6_changes(CFStringRef serviceID, CFDictionaryRef state_dict, __private_extern__ CFDictionaryRef ipv4_dict_create(CFDictionaryRef state_dict) { - return (IPDictCreate(AF_INET, state_dict, NULL, NULL)); + return (IPDictCreate(AF_INET, state_dict, NULL, NULL, NULL)); } __private_extern__ CFDictionaryRef ipv6_dict_create(CFDictionaryRef state_dict) { - return (IPDictCreate(AF_INET6, state_dict, NULL, NULL)); + return (IPDictCreate(AF_INET6, state_dict, NULL, NULL, NULL)); } #endif /* TEST_DNS */ @@ -4394,12 +4665,10 @@ accumulate_dns_servers(CFArrayRef in_servers, ProtocolFlags active_protos, /* IPv4 address */ if ((active_protos & kProtocolFlagsIPv4) == 0 && ntohl(ip_addr.s_addr) != INADDR_LOOPBACK) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: no IPv4 connectivity, " - "ignoring DNS server address " IP_FORMAT, - IP_LIST(&ip_addr)); - } + my_log(LOG_INFO, + "no IPv4 connectivity, " + "ignoring DNS server address " IP_FORMAT, + IP_LIST(&ip_addr)); continue; } @@ -4409,15 +4678,13 @@ accumulate_dns_servers(CFArrayRef in_servers, ProtocolFlags active_protos, /* IPv6 address */ if ((active_protos & kProtocolFlagsIPv6) == 0 && !IN6_IS_ADDR_LOOPBACK(&ipv6_addr)) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - char ntopbuf[INET6_ADDRSTRLEN]; - - my_log(LOG_DEBUG, - "IPMonitor: no IPv6 connectivity, " - "ignoring DNS server address %s", - inet_ntop(AF_INET6, &ipv6_addr, - ntopbuf, sizeof(ntopbuf))); - } + char ntopbuf[INET6_ADDRSTRLEN]; + + my_log(LOG_INFO, + "no IPv6 connectivity, " + "ignoring DNS server address %s", + inet_ntop(AF_INET6, &ipv6_addr, + ntopbuf, sizeof(ntopbuf))); continue; } @@ -4436,9 +4703,7 @@ accumulate_dns_servers(CFArrayRef in_servers, ProtocolFlags active_protos, } else { /* bad IP address */ - my_log(LOG_NOTICE, - "IPMonitor: ignoring bad DNS server address '%@'", - addr); + my_log(LOG_NOTICE, "ignoring bad DNS server address '%@'", addr); continue; } @@ -4449,13 +4714,98 @@ accumulate_dns_servers(CFArrayRef in_servers, ProtocolFlags active_protos, return; } +static CF_RETURNS_RETAINED CFArrayRef +order_dns_servers(CFArrayRef servers, ProtocolFlags active_protos) +{ + Boolean favor_v4 = FALSE; + CFMutableArrayRef ordered_servers; + ProtocolFlags proto_last = kProtocolFlagsIPv4; + struct sockaddr_in v4_dns1 = { .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in) }; + CFIndex v4_n = 0; + struct sockaddr_in6 v6_dns1 = { .sin6_family = AF_INET6, + .sin6_len = sizeof(struct sockaddr_in6), + .sin6_scope_id = 0 }; + CFIndex v6_n = 0; + + if (((active_protos & kProtocolFlagsIPv4) == 0) || + ((active_protos & kProtocolFlagsIPv6) == 0)) { + /* only one protocol */ +#ifdef TEST_DNS_ORDER + printf("only one protocol\n"); +#endif // TEST_DNS_ORDER + return CFRetain(servers); + } + + ordered_servers = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + for (CFIndex i = 0, n = CFArrayGetCount(servers); i < n; i++) { + struct in_addr ia; + struct in6_addr ia6; + ProtocolFlags proto; + CFStringRef server; + + server = CFArrayGetValueAtIndex(servers, i); + if (cfstring_to_ip(server, &ia)) { + proto = kProtocolFlagsIPv4; + if (v4_n++ == 0) { + v4_dns1.sin_addr = ia; + } + } else if (cfstring_to_ip6(server, &ia6)) { + proto = kProtocolFlagsIPv6; + if (v6_n++ == 0) { + memcpy(&v6_dns1.sin6_addr, &ia6, sizeof(ia6)); + } + } else { + CFRelease(ordered_servers); + return CFRetain(servers); + } + + if ((i > 0) && (proto != proto_last)) { + /* if the protocol of the server addresses changed */ + if (((proto == kProtocolFlagsIPv4) && (v4_n == 1)) || + ((proto == kProtocolFlagsIPv6) && (v6_n == 1))) { + /* if we now have the 1st server address of another protocol */ + favor_v4 = (sa_dst_compare_no_dependencies((struct sockaddr *)&v4_dns1, + (struct sockaddr *)&v6_dns1) >= 0); +#ifdef TEST_DNS_ORDER + char v4_buf[INET_ADDRSTRLEN]; + char v6_buf[INET6_ADDRSTRLEN]; + printf("comparing %s vs %s, favoring %s\n", + inet_ntop(v4_dns1.sin_family, &v4_dns1.sin_addr, v4_buf, sizeof(v4_buf)), + inet_ntop(v6_dns1.sin6_family, &v6_dns1.sin6_addr, v6_buf, sizeof(v6_buf)), + favor_v4 ? "v4" : "v6"); +#endif // TEST_DNS_ORDER + } else { + /* if the server addresses array is randomly mixed */ +#ifdef TEST_DNS_ORDER + printf("v4/v6 not ordered\n"); +#endif // TEST_DNS_ORDER + CFRelease(ordered_servers); + return CFRetain(servers); + } + } + proto_last = proto; + + if ((proto == kProtocolFlagsIPv4) && favor_v4) { + CFArrayInsertValueAtIndex(ordered_servers, v4_n - 1, server); + } else if ((proto == kProtocolFlagsIPv6) && !favor_v4) { + CFArrayInsertValueAtIndex(ordered_servers, v6_n - 1, server); + } else { + CFArrayAppendValue(ordered_servers, server); + } + } + + return ordered_servers; +} + static void -merge_dns_servers(CFMutableDictionaryRef new_dict, - CFArrayRef state_servers, - CFArrayRef setup_servers, - Boolean have_setup, - ProtocolFlags active_protos, - CFStringRef interface) +merge_dns_servers(CFMutableDictionaryRef new_dict, + CFArrayRef state_servers, + CFArrayRef setup_servers, + Boolean have_setup, + Boolean trust_state, + ProtocolFlags active_protos, + CFStringRef interface) { CFMutableArrayRef dns_servers; Boolean have_dns_setup = FALSE; @@ -4475,8 +4825,12 @@ merge_dns_servers(CFMutableDictionaryRef new_dict, } if ((CFArrayGetCount(dns_servers) == 0 || S_append_state) && state_servers != NULL) { - accumulate_dns_servers(state_servers, active_protos, + CFArrayRef ordered_servers; + + ordered_servers = order_dns_servers(state_servers, active_protos); + accumulate_dns_servers(ordered_servers, active_protos, dns_servers, NULL); + CFRelease(ordered_servers); } /* @@ -4505,11 +4859,18 @@ merge_dns_servers(CFMutableDictionaryRef new_dict, * We also add an exception to the "follow the dynamically derived * network configuration" path for on-the-fly (no Setup: content) * network services. + * + * But, we add an exception to the exception to support our own + * VPN code. Here, we look for a "ServiceID" property in the DNS + * entity. If present, and if it matches, then we extend our + * trust even when there is no Setup: content. */ if (CFArrayGetCount(dns_servers) != 0) { CFDictionarySetValue(new_dict, kSCPropNetDNSServerAddresses, dns_servers); - if (have_setup && !have_dns_setup) { + if ((have_setup && !have_dns_setup) || (!have_setup && trust_state)) { + // if this is a "setup"+"state" service with only "state" DNS content (i.e. no + // setup override) or this is a TRUSTED "state"-only service CFDictionarySetValue(new_dict, DNS_CONFIGURATION_SCOPED_QUERY_KEY, kCFBooleanTrue); } } @@ -4530,7 +4891,6 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, CFStringRef interface = NULL; CFDictionaryRef ipv4; CFDictionaryRef ipv6; - int i; const struct { CFStringRef key; uint32_t flags; @@ -4551,6 +4911,7 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, kSCPropNetDNSServiceIdentifier, kSCPropNetDNSSupplementalMatchDomainsNoSearch, }; + Boolean trust_state = FALSE; if ((state_dict == NULL) && (setup_dict == NULL)) { /* there is no DNS content */ @@ -4558,7 +4919,7 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, } ipv4 = service_dict_get(serviceID, kSCEntNetIPv4); - if (ipv4 != NULL) { + if (ipdict_is_routable(ipv4)) { if (get_service_setup_entity(info, serviceID, kSCEntNetIPv4) != NULL) { have_setup = TRUE; } @@ -4567,10 +4928,9 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, } ipv6 = service_dict_get(serviceID, kSCEntNetIPv6); - if (ipv6 != NULL) { - if (!have_setup - && (get_service_setup_entity(info, serviceID, kSCEntNetIPv6) - != NULL)) { + if (ipdict_is_routable(ipv6)) { + if (!have_setup && + (get_service_setup_entity(info, serviceID, kSCEntNetIPv6) != NULL)) { have_setup = TRUE; } active_protos |= kProtocolFlagsIPv6; @@ -4589,6 +4949,18 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, setup_dict = NULL; } + if (state_dict != NULL) { + CFStringRef state_serviceID = NULL; + + if (CFDictionaryGetValueIfPresent(state_dict, + kSCPropNetDNSConfirmedServiceID, + (const void **)&state_serviceID) && + isA_CFString(state_serviceID) && + CFEqual(serviceID, state_serviceID)) { + trust_state = TRUE; + } + } + /* merge DNS configuration */ new_dict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, @@ -4600,6 +4972,7 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, kSCPropNetDNSServerAddresses), NULL, FALSE, + trust_state, kProtocolFlagsIPv4 | kProtocolFlagsIPv6, NULL); } @@ -4610,11 +4983,12 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, my_CFDictionaryGetArray(setup_dict, kSCPropNetDNSServerAddresses), have_setup, + trust_state, active_protos, interface); } - for (i = 0; i < countof(merge_list); i++) { + for (size_t i = 0; i < countof(merge_list); i++) { merge_array_prop(new_dict, merge_list[i].key, state_dict, @@ -4623,7 +4997,7 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, merge_list[i].append); } - for (i = 0; i < countof(pick_list); i++) { + for (size_t i = 0; i < countof(pick_list); i++) { pick_prop(new_dict, pick_list[i], state_dict, @@ -4689,7 +5063,27 @@ get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, } done: + +#if !TARGET_OS_SIMULATOR + if (interface != NULL) { + CFRetain(interface); + } +#endif /* !TARGET_OS_SIMULATOR */ + changed = service_dict_set(serviceID, kSCEntNetDNS, new_dict); + +#if !TARGET_OS_SIMULATOR + if (interface != NULL) { + if (changed) { + // DNS configuration changed for this interface, poke NAT64 + if ((active_protos & kProtocolFlagsIPv6) != 0) { + set_plat_discovery(kPLATDiscoveryOptionUpdate, interface); + } + } + CFRelease(interface); + } +#endif /* !TARGET_OS_SIMULATOR */ + my_CFRelease(&new_dict); return (changed); } @@ -4804,12 +5198,12 @@ get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, goto done; } ipv4 = service_dict_get(serviceID, kSCEntNetIPv4); - if (ipdict_get_routelist(ipv4) != NULL) { + if (ipdict_is_routable(ipv4)) { active_protos |= kProtocolFlagsIPv4; interface = ipdict_get_ifname(ipv4); } ipv6 = service_dict_get(serviceID, kSCEntNetIPv6); - if (ipdict_get_routelist(ipv6) != NULL) { + if (ipdict_is_routable(ipv6)) { active_protos |= kProtocolFlagsIPv6; if (interface == NULL) { interface = ipdict_get_ifname(ipv6); @@ -4825,7 +5219,6 @@ get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, } if ((setup_dict != NULL) && (state_dict != NULL)) { - CFIndex i; CFMutableDictionaryRef setup_copy; /* @@ -4837,7 +5230,7 @@ get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, * the "Setup:" keys and others from the "State:" keys. */ new_dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); - for (i = 0; i < countof(merge_list); i++) { + for (size_t i = 0; i < countof(merge_list); i++) { merge_array_prop(new_dict, merge_list[i].key, state_dict, @@ -4847,7 +5240,7 @@ get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, } setup_copy = CFDictionaryCreateMutableCopy(NULL, 0, setup_dict); - for (i = 0; i < countof(pick_list); i++) { + for (size_t i = 0; i < countof(pick_list); i++) { if (CFDictionaryContainsKey(setup_copy, pick_list[i].key1)) { /* * if a "Setup:" enabled key has been provided than we want to @@ -4932,7 +5325,7 @@ get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, pacURL = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigURLString); if (pacURL != NULL) { - if (!isA_CFString(pacURL)) { + if (!isA_CFString(pacURL) || (CFStringGetLength(pacURL) == 0)) { /* if we don't like the PAC URL */ pacEnabled = 0; } @@ -4940,7 +5333,7 @@ get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, CFStringRef pacJS; pacJS = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigJavaScript); - if (!isA_CFString(pacJS)) { + if (!isA_CFString(pacJS) || (CFStringGetLength(pacJS) == 0)) { /* if we don't have (or like) the PAC JavaScript */ pacEnabled = 0; } @@ -5004,8 +5397,8 @@ static boolean_t get_smb_changes(CFStringRef serviceID, CFDictionaryRef state_dict, CFDictionaryRef setup_dict, CFDictionaryRef info) { +#pragma unused(info) boolean_t changed = FALSE; - int i; CFMutableDictionaryRef new_dict = NULL; const CFStringRef pick_list[] = { kSCPropNetSMBNetBIOSName, @@ -5036,7 +5429,7 @@ get_smb_changes(CFStringRef serviceID, CFDictionaryRef state_dict, setup_dict, 0, FALSE); - for (i = 0; i < countof(pick_list); i++) { + for (size_t i = 0; i < countof(pick_list); i++) { pick_prop(new_dict, pick_list[i], state_dict, @@ -5095,9 +5488,8 @@ get_transient_status_changes(CFStringRef serviceID, CFDictionaryRef services_info) { boolean_t changed = FALSE; - int i; - for (i = 0; i < countof(transientServiceInfo); i++) { + for (size_t i = 0; i < countof(transientServiceInfo); i++) { CFDictionaryRef dict; CFNumberRef status = NULL; CFMutableDictionaryRef ts_dict = NULL; @@ -5132,6 +5524,22 @@ get_transient_status_changes(CFStringRef serviceID, return (changed); } +static boolean_t +if_dict_is_expensive(CFDictionaryRef if_dict) +{ + boolean_t is_expensive = FALSE; + + if (isA_CFDictionary(if_dict) != NULL) { + CFBooleanRef expensive; + expensive = CFDictionaryGetValue(if_dict, kSCPropNetLinkExpensive); + if (isA_CFBoolean(expensive) != NULL + && CFBooleanGetValue(expensive)) { + is_expensive = TRUE; + } + } + return is_expensive; +} + static boolean_t service_is_expensive(CFStringRef serviceID, CFDictionaryRef services_info) { @@ -5146,68 +5554,141 @@ service_is_expensive(CFStringRef serviceID, CFDictionaryRef services_info) key = interface_entity_key_copy(ifname, kSCEntNetLink); if_dict = CFDictionaryGetValue(services_info, key); CFRelease(key); - if (isA_CFDictionary(if_dict) != NULL) { - CFBooleanRef expensive; + is_expensive = if_dict_is_expensive(if_dict); + } + return (is_expensive); +} - expensive = CFDictionaryGetValue(if_dict, kSCPropNetLinkExpensive); - if (isA_CFBoolean(expensive) != NULL - && CFBooleanGetValue(expensive)) { - is_expensive = TRUE; - } +static boolean_t +interface_is_expensive(CFStringRef ifname) +{ + boolean_t is_expensive = FALSE; + + if (ifname != NULL) { + CFDictionaryRef if_dict; + CFStringRef key; + + key = interface_entity_key_copy(ifname, kSCEntNetLink); + if_dict = SCDynamicStoreCopyValue(S_session, key); + CFRelease(key); + if (if_dict != NULL) { + is_expensive = if_dict_is_expensive(if_dict); + CFRelease(if_dict); } } return (is_expensive); } +static CFNumberRef +service_rank_entity_get_index(CFDictionaryRef dict, CFStringRef serviceID, + CFStringRef which, uint32_t * ret_val) +{ + CFNumberRef service_index = NULL; + + if (dict != NULL) { + service_index = CFDictionaryGetValue(dict, + kSCPropNetServiceServiceIndex); + service_index = isA_CFNumber(service_index); + } + if (service_index != NULL) { + SInt32 index_val; + + if (!CFNumberGetValue(service_index, kCFNumberSInt32Type, + &index_val) + || index_val <= 0) { + /* ServiceIndex must be >= 1 */ + my_log(LOG_NOTICE, + "%@%@ ServiceIndex %@ is invalid, ignoring", + which, serviceID, service_index); + service_index = NULL; + } + else if (ret_val != NULL) { + *ret_val = (uint32_t)index_val; + } + } + return (service_index); +} + static boolean_t get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, CFDictionaryRef setup_options, CFDictionaryRef services_info) { boolean_t changed = FALSE; + CFStringRef interface; boolean_t ip_is_coupled = FALSE; CFMutableDictionaryRef new_dict = NULL; - Rank rank_assertion = kRankAssertionDefault; + Rank rank_assertion = kRankAssertionDefault; Boolean rank_assertion_is_set = FALSE; CFStringRef setup_rank = NULL; CFStringRef state_rank = NULL; + CFNumberRef service_index = NULL; + boolean_t use_setup_rank = TRUE; - if (state_options != NULL) { + if (setup_options != NULL) { CFBooleanRef coupled; - state_rank - = CFDictionaryGetValue(state_options, kSCPropNetServicePrimaryRank); - state_rank = isA_CFString(state_rank); - coupled = CFDictionaryGetValue(state_options, kIPIsCoupled); + setup_rank + = CFDictionaryGetValue(setup_options, kSCPropNetServicePrimaryRank); + setup_rank = isA_CFString(setup_rank); + if (setup_rank != NULL && !use_setup_rank) { + my_log(LOG_DEBUG, "%@ ignoring Setup PrimaryRank = %@", + serviceID, setup_rank); + setup_rank = NULL; + } + coupled = CFDictionaryGetValue(setup_options, kIPIsCoupled); if (isA_CFBoolean(coupled) != NULL && CFBooleanGetValue(coupled)) { ip_is_coupled = TRUE; } + service_index + = service_rank_entity_get_index(setup_options, + serviceID, + kSCDynamicStoreDomainSetup, + NULL); } - if (setup_options != NULL) { + if (state_options != NULL) { CFBooleanRef coupled; - setup_rank - = CFDictionaryGetValue(setup_options, kSCPropNetServicePrimaryRank); - setup_rank = isA_CFString(setup_rank); - coupled = CFDictionaryGetValue(setup_options, kIPIsCoupled); + state_rank + = CFDictionaryGetValue(state_options, kSCPropNetServicePrimaryRank); + state_rank = isA_CFString(state_rank); + coupled = CFDictionaryGetValue(state_options, kIPIsCoupled); if (isA_CFBoolean(coupled) != NULL && CFBooleanGetValue(coupled)) { ip_is_coupled = TRUE; } + if (service_index == NULL) { + service_index + = service_rank_entity_get_index(state_options, + serviceID, + kSCDynamicStoreDomainState, + NULL); + } } - if (ip_is_coupled == FALSE) { + if (!ip_is_coupled) { ip_is_coupled = service_is_expensive(serviceID, services_info); } if (setup_rank != NULL || state_rank != NULL) { /* rank assertion is set on the service */ Rank setup_assertion; + Boolean setup_assertion_is_set = FALSE; Rank state_assertion; Boolean state_assertion_is_set = FALSE; - setup_assertion = PrimaryRankGetRankAssertion(setup_rank, NULL); + setup_assertion = PrimaryRankGetRankAssertion(setup_rank, + &setup_assertion_is_set); state_assertion = PrimaryRankGetRankAssertion(state_rank, &state_assertion_is_set); - if (setup_assertion > state_assertion) { + if (setup_assertion_is_set && state_assertion_is_set) { + if (setup_assertion > state_assertion) { + rank_assertion = setup_assertion; + } + else { + rank_assertion = state_assertion; + } + rank_assertion_is_set = TRUE; + } + else if (setup_assertion_is_set) { rank_assertion = setup_assertion; rank_assertion_is_set = TRUE; } @@ -5217,12 +5698,10 @@ get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, } } - if (rank_assertion_is_set == FALSE) { - /* check for a rank assertion on the interface */ - CFStringRef interface; - - interface = services_info_get_interface(services_info, serviceID); - if (interface != NULL) { + interface = services_info_get_interface(services_info, serviceID); + if (interface != NULL) { + if (!rank_assertion_is_set) { + /* check for a rank assertion on the interface */ CFNumberRef if_rank = NULL; if (S_if_rank_dict != NULL) { @@ -5231,16 +5710,25 @@ get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, rank_assertion = InterfaceRankGetRankAssertion(if_rank, &rank_assertion_is_set); - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "serviceID %@ interface %@ rank = %@", - serviceID, interface, if_rank); - } +#define kNotSetString ((CFTypeRef)CFSTR("not set")) + my_log(LOG_INFO, + "serviceID %@ interface %@ rank = 0x%x (%@)%s", + serviceID, + interface, + rank_assertion, + (if_rank != NULL) ? (CFTypeRef)if_rank : kNotSetString, + ip_is_coupled ? " [coupled]" : ""); + } + else { + my_log(LOG_INFO, + "serviceID %@ interface %@ rank = 0x%x%s", + serviceID, interface, rank_assertion, + ip_is_coupled ? " [coupled]" : ""); } } - if (rank_assertion_is_set || ip_is_coupled) { + if (service_index != NULL || rank_assertion_is_set || ip_is_coupled) { new_dict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -5256,6 +5744,10 @@ get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, if (ip_is_coupled) { CFDictionarySetValue(new_dict, kIPIsCoupled, kCFBooleanTrue); } + if (service_index != NULL) { + CFDictionarySetValue(new_dict, kSCPropNetServiceServiceIndex, + service_index); + } } changed = service_dict_set(serviceID, kSCEntNetService, new_dict); my_CFRelease(&new_dict); @@ -5263,8 +5755,9 @@ get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, } static void -add_service_keys(CFStringRef serviceID, - CFMutableArrayRef keys, CFMutableArrayRef patterns) +add_service_keys(CFStringRef serviceID, + CFMutableArrayRef keys, + CFMutableArrayRef patterns) { int i; CFStringRef key; @@ -5274,40 +5767,46 @@ add_service_keys(CFStringRef serviceID, } for (i = 0; i < ENTITY_TYPES_COUNT; i++) { - key = setup_service_key(serviceID, *entityTypeNames[i]); - CFArrayAppendValue(keys, key); + CFStringRef name = *entityTypeNames[i]; + + key = setup_service_key(serviceID, name); + my_CFArrayAppendUniqueValue(keys, key); CFRelease(key); - key = state_service_key(serviceID, *entityTypeNames[i]); - CFArrayAppendValue(keys, key); + key = state_service_key(serviceID, name); + my_CFArrayAppendUniqueValue(keys, key); CFRelease(key); } key = state_service_key(serviceID, kSCEntNetDHCP); - CFArrayAppendValue(patterns, key); + my_CFArrayAppendUniqueValue(keys, key); CFRelease(key); key = setup_service_key(serviceID, NULL); - CFArrayAppendValue(patterns, key); + my_CFArrayAppendUniqueValue(keys, key); CFRelease(key); key = state_service_key(serviceID, NULL); - CFArrayAppendValue(patterns, key); + my_CFArrayAppendUniqueValue(keys, key); CFRelease(key); return; } static void -add_transient_status_keys(CFStringRef service_id, CFMutableArrayRef patterns) +add_transient_status_keys(CFStringRef serviceID, + CFMutableArrayRef keys, + CFMutableArrayRef patterns) { - int i; + if (CFEqual(serviceID, kSCCompAnyRegex)) { + keys = patterns; + } - for (i = 0; i < countof(transientServiceInfo); i++) { - CFStringRef pattern; + for (size_t i = 0; i < countof(transientServiceInfo); i++) { + CFStringRef key; - pattern = state_service_key(service_id, - *transientServiceInfo[i].entityName); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); + key = state_service_key(serviceID, + *transientServiceInfo[i].entityName); + my_CFArrayAppendUniqueValue(keys, key); + CFRelease(key); } return; @@ -5324,12 +5823,10 @@ static const CFStringRef *reachabilitySetupKeys[] = { static void add_reachability_patterns(CFMutableArrayRef patterns) { - int i; - - for (i = 0; i < countof(reachabilitySetupKeys); i++) { + for (size_t i = 0; i < countof(reachabilitySetupKeys); i++) { CFStringRef pattern; pattern = setup_service_key(kSCCompAnyRegex, *reachabilitySetupKeys[i]); - CFArrayAppendValue(patterns, pattern); + my_CFArrayAppendUniqueValue(patterns, pattern); CFRelease(pattern); } } @@ -5341,7 +5838,7 @@ add_vpn_pattern(CFMutableArrayRef patterns) CFStringRef pattern; pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetVPN); - CFArrayAppendValue(patterns, pattern); + my_CFArrayAppendUniqueValue(patterns, pattern); CFRelease(pattern); } @@ -5351,7 +5848,7 @@ add_interface_link_pattern(CFMutableArrayRef patterns) CFStringRef pattern; pattern = interface_entity_key_copy(kSCCompAnyRegex, kSCEntNetLink); - CFArrayAppendValue(patterns, pattern); + my_CFArrayAppendUniqueValue(patterns, pattern); CFRelease(pattern); } @@ -5359,55 +5856,38 @@ static CFDictionaryRef services_info_copy(SCDynamicStoreRef session, CFArrayRef service_list) { CFIndex count; - CFMutableArrayRef get_keys; - CFMutableArrayRef get_patterns; + CFMutableArrayRef keys; CFDictionaryRef info; - CFIndex s; + CFMutableArrayRef patterns; - count = CFArrayGetCount(service_list); - get_keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - get_patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - CFArrayAppendValue(get_keys, S_setup_global_ipv4); - CFArrayAppendValue(get_keys, S_multicast_resolvers); - CFArrayAppendValue(get_keys, S_private_resolvers); + CFArrayAppendValue(keys, S_setup_global_ipv4); + CFArrayAppendValue(keys, S_multicast_resolvers); + CFArrayAppendValue(keys, S_private_resolvers); - for (s = 0; s < count; s++) { + count = CFArrayGetCount(service_list); + for (CFIndex s = 0; s < count; s++) { CFStringRef serviceID = CFArrayGetValueAtIndex(service_list, s); - add_service_keys(serviceID, get_keys, get_patterns); - add_transient_status_keys(serviceID, get_keys); + add_service_keys(serviceID, keys, patterns); + add_transient_status_keys(serviceID, keys, patterns); } - add_reachability_patterns(get_patterns); + add_reachability_patterns(patterns); - add_vpn_pattern(get_patterns); + add_vpn_pattern(patterns); - add_interface_link_pattern(get_patterns); + add_interface_link_pattern(patterns); - info = SCDynamicStoreCopyMultiple(session, get_keys, get_patterns); - my_CFRelease(&get_keys); - my_CFRelease(&get_patterns); + info = SCDynamicStoreCopyMultiple(session, keys, patterns); + my_CFRelease(&keys); + my_CFRelease(&patterns); return (info); } -#if !TARGET_IPHONE_SIMULATOR - -static int -multicast_route(int sockfd, int cmd) -{ - IPv4Route route; - - bzero(&route, sizeof(route)); - route.dest.s_addr = htonl(INADDR_UNSPEC_GROUP); - route.mask.s_addr = htonl(IN_CLASSD_NET); - route.ifindex = lo0_ifindex(); - return (IPv4RouteApply((RouteRef)&route, cmd, sockfd)); -} - -#endif /* !TARGET_IPHONE_SIMULATOR */ - -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR static boolean_t set_ipv6_default_interface(IFIndex ifindex) @@ -5416,7 +5896,7 @@ set_ipv6_default_interface(IFIndex ifindex) int sock; boolean_t success = FALSE; - bzero((char *)&ndifreq, sizeof(ndifreq)); + memset((char *)&ndifreq, 0, sizeof(ndifreq)); strlcpy(ndifreq.ifname, kLoopbackInterface, sizeof(ndifreq.ifname)); if (ifindex != 0) { ndifreq.ifindex = ifindex; @@ -5425,26 +5905,23 @@ set_ipv6_default_interface(IFIndex ifindex) ndifreq.ifindex = lo0_ifindex(); } sock = inet6_dgram_socket(); - if (sock == -1) { + if (sock < 0) { + goto done; + } + if (ioctl(sock, SIOCSDEFIFACE_IN6, (caddr_t)&ndifreq) == -1) { my_log(LOG_ERR, - "IPMonitor: set_ipv6_default_interface: socket failed, %s", + "ioctl(SIOCSDEFIFACE_IN6) failed: %s", strerror(errno)); } else { - if (ioctl(sock, SIOCSDEFIFACE_IN6, (caddr_t)&ndifreq) == -1) { - my_log(LOG_ERR, - "IPMonitor: ioctl(SIOCSDEFIFACE_IN6) failed, %s", - strerror(errno)); - } - else { - success = TRUE; - } - close(sock); + success = TRUE; } + close(sock); +done: return (success); } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ #if !TARGET_OS_IPHONE static __inline__ void @@ -5467,11 +5944,17 @@ set_dns(CFArrayRef val_search_domains, CFIndex n; SCPrint(TRUE, f, CFSTR("#\n")); - SCPrint(TRUE, f, CFSTR("# Mac OS X Notice\n")); + SCPrint(TRUE, f, CFSTR("# macOS Notice\n")); + SCPrint(TRUE, f, CFSTR("#\n")); + SCPrint(TRUE, f, CFSTR("# This file is not consulted for DNS hostname resolution, address\n")); + SCPrint(TRUE, f, CFSTR("# resolution, or the DNS query routing mechanism used by most\n")); + SCPrint(TRUE, f, CFSTR("# processes on this system.\n")); SCPrint(TRUE, f, CFSTR("#\n")); - SCPrint(TRUE, f, CFSTR("# This file is not used by the host name and address resolution\n")); - SCPrint(TRUE, f, CFSTR("# or the DNS query routing mechanisms used by most processes on\n")); - SCPrint(TRUE, f, CFSTR("# this Mac OS X system.\n")); + SCPrint(TRUE, f, CFSTR("# To view the DNS configuration used by this system, use:\n")); + SCPrint(TRUE, f, CFSTR("# scutil --dns\n")); + SCPrint(TRUE, f, CFSTR("#\n")); + SCPrint(TRUE, f, CFSTR("# SEE ALSO\n")); + SCPrint(TRUE, f, CFSTR("# dns-sd(1), scutil(8)\n")); SCPrint(TRUE, f, CFSTR("#\n")); SCPrint(TRUE, f, CFSTR("# This file is automatically generated.\n")); SCPrint(TRUE, f, CFSTR("#\n")); @@ -5520,7 +6003,7 @@ set_dns(CFArrayRef val_search_domains, } fclose(f); - rename(VAR_RUN_RESOLV_CONF "-", VAR_RUN_RESOLV_CONF); + (void)rename(VAR_RUN_RESOLV_CONF "-", VAR_RUN_RESOLV_CONF); } return; } @@ -5571,9 +6054,9 @@ update_ipv4(CFStringRef primary, IPv4RouteListRef new_routelist, keyChangeListRef keys) { -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR int sockfd; -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ if (keys != NULL) { if (new_routelist != NULL && primary != NULL) { @@ -5618,9 +6101,17 @@ update_ipv4(CFStringRef primary, } } -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR sockfd = open_routing_socket(); if (sockfd != -1) { + /* go through routelist and bind any unbound routes */ + if (new_routelist != NULL) { + IPv4RouteListFinalize(new_routelist); + } + else { + /* provide a routelist with just loopback multicast */ + new_routelist = IPv4RouteListCopyMulticastLoopback(); + } if ((S_IPMonitor_debug & kDebugFlag1) != 0) { if (S_ipv4_routelist == NULL) { my_log(LOG_DEBUG, "Old Routes = "); @@ -5637,26 +6128,18 @@ update_ipv4(CFStringRef primary, IPv4RouteListLog(LOG_DEBUG, new_routelist); } } - /* go through routelist and bind any unbound routes */ - IPv4RouteListFinalize(new_routelist); IPv4RouteListApply(S_ipv4_routelist, new_routelist, sockfd); - if (new_routelist != NULL) { - (void)multicast_route(sockfd, RTM_DELETE); - } - else { - (void)multicast_route(sockfd, RTM_ADD); - } close(sockfd); } if (S_ipv4_routelist != NULL) { free(S_ipv4_routelist); } S_ipv4_routelist = new_routelist; -#else /* !TARGET_IPHONE_SIMULATOR */ +#else /* !TARGET_OS_SIMULATOR */ if (new_routelist != NULL) { free(new_routelist); } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ return; } @@ -5673,9 +6156,9 @@ update_ipv6(CFStringRef primary, IPv6RouteListRef new_routelist, keyChangeListRef keys) { -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR int sockfd; -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ if (keys != NULL) { if (new_routelist != NULL && primary != NULL) { @@ -5714,25 +6197,23 @@ update_ipv6(CFStringRef primary, primary); keyChangeListSetValue(keys, S_state_global_ipv6, dict); CFRelease(dict); -#if !TARGET_IPHONE_SIMULATOR - if (S_scopedroute_v6) { - set_ipv6_default_interface(r->ifindex); - } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#if !TARGET_OS_SIMULATOR + set_ipv6_default_interface(r->ifindex); +#endif /* !TARGET_OS_SIMULATOR */ } else { -#if !TARGET_IPHONE_SIMULATOR - if (S_scopedroute_v6) { - set_ipv6_default_interface(0); - } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#if !TARGET_OS_SIMULATOR + set_ipv6_default_interface(0); +#endif /* !TARGET_OS_SIMULATOR */ keyChangeListRemoveValue(keys, S_state_global_ipv6); } } -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR sockfd = open_routing_socket(); if (sockfd != -1) { + /* go through routelist and bind any unbound routes */ + IPv6RouteListFinalize(new_routelist); if ((S_IPMonitor_debug & kDebugFlag1) != 0) { if (S_ipv6_routelist == NULL) { my_log(LOG_DEBUG, "Old Routes = "); @@ -5749,8 +6230,6 @@ update_ipv6(CFStringRef primary, IPv6RouteListLog(LOG_DEBUG, new_routelist); } } - /* go through routelist and bind any unbound routes */ - IPv6RouteListFinalize(new_routelist); IPv6RouteListApply(S_ipv6_routelist, new_routelist, sockfd); close(sockfd); } @@ -5758,11 +6237,11 @@ update_ipv6(CFStringRef primary, free(S_ipv6_routelist); } S_ipv6_routelist = new_routelist; -#else /* !TARGET_IPHONE_SIMULATOR */ +#else /* !TARGET_OS_SIMULATOR */ if (new_routelist != NULL) { free(new_routelist); } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ return; } @@ -5772,6 +6251,7 @@ update_dns(CFDictionaryRef services_info, CFStringRef primary, keyChangeListRef keys) { +#pragma unused(services_info) Boolean changed = FALSE; CFDictionaryRef dict = NULL; @@ -5854,25 +6334,27 @@ update_dnsinfo(CFDictionaryRef services_info, static Boolean update_nwi(nwi_state_t state) { - unsigned char signature[CC_SHA1_DIGEST_LENGTH]; - static unsigned char signature_last[CC_SHA1_DIGEST_LENGTH]; + unsigned char signature[CC_SHA256_DIGEST_LENGTH]; + static unsigned char signature_last[CC_SHA256_DIGEST_LENGTH]; - _nwi_state_signature(state, signature, sizeof(signature)); + _nwi_state_compute_sha256_hash(state, signature); if (bcmp(signature, signature_last, sizeof(signature)) == 0) { + my_log(LOG_DEBUG, "Not updating network information"); return FALSE; } // save [new] signature - bcopy(signature, signature_last, sizeof(signature)); + memcpy(signature_last, signature, sizeof(signature)); // save [new] configuration - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, "Updating network information"); - S_nwi_state_dump(state); - } - if (_nwi_state_store(state) == FALSE) { + my_log(LOG_INFO, "Updating network information"); + _nwi_state_log(state, TRUE, NULL); + +#if !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + if (!_nwi_state_store(state)) { my_log(LOG_ERR, "Notifying nwi_state_store failed"); } +#endif /* !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ return TRUE; } @@ -5921,6 +6403,7 @@ update_smb(CFDictionaryRef services_info, CFStringRef primary, keyChangeListRef keys) { +#pragma unused(services_info) Boolean changed = FALSE; CFDictionaryRef dict = NULL; @@ -5951,12 +6434,26 @@ update_smb(CFDictionaryRef services_info, #endif /* !TARGET_OS_IPHONE */ static Rank -get_service_rank(CFArrayRef order, int n_order, CFStringRef serviceID) +get_service_index(CFDictionaryRef rank_entity, + CFArrayRef order, CFIndex n_order, CFStringRef serviceID) { CFIndex i; Rank rank = kRankIndexMask; - - if (serviceID != NULL && order != NULL && n_order > 0) { + CFNumberRef service_index; + + service_index + = service_rank_entity_get_index(rank_entity, + serviceID, + CFSTR(""), + &rank); + if (service_index != NULL) { + /* ServiceIndex specified in service entity */ + rank += n_order; + my_log(LOG_INFO, + "%@ specifies ServiceIndex %@, effective index is %d", + serviceID, service_index, rank); + } + else if (serviceID != NULL && order != NULL && n_order > 0) { for (i = 0; i < n_order; i++) { CFStringRef s = isA_CFString(CFArrayGetValueAtIndex(order, i)); @@ -5984,12 +6481,16 @@ static Rank rank_dict_get_service_rank(CFDictionaryRef rank_dict, CFStringRef serviceID) { CFNumberRef rank; - Rank rank_val; + Rank rank_val = kRankAssertionDefault; rank_val = RankMake(kRankIndexMask, kRankAssertionDefault); rank = CFDictionaryGetValue(rank_dict, serviceID); if (rank != NULL) { - CFNumberGetValue(rank, kCFNumberSInt32Type, &rank_val); + if (!CFNumberGetValue(rank, kCFNumberSInt32Type, &rank_val)) { + /* if we don't like the rank value */ + rank_val = kRankAssertionDefault; + } + } return (rank_val); } @@ -6024,7 +6525,7 @@ CollectTransientServices(const void * key, const void * value, void * context) { - int i; +#pragma unused(value) CFStringRef service = key; CFMutableArrayRef vif_setup_keys = context; @@ -6033,9 +6534,9 @@ CollectTransientServices(const void * key, return; } - for (i = 0; i < countof(transientInterfaceEntityNames); i++) { + for (size_t i = 0; i < countof(transientInterfaceEntityNames); i++) { if (CFStringHasSuffix(service, *transientInterfaceEntityNames[i])) { - CFArrayAppendValue(vif_setup_keys, service); + my_CFArrayAppendUniqueValue(vif_setup_keys, service); break; } } @@ -6272,7 +6773,6 @@ VPNAttributesGet(CFStringRef service_id, CFStringRef *server_address, int af) { - int i; CFDictionaryRef entity_dict; CFNumberRef num; CFDictionaryRef p_state = NULL; @@ -6281,8 +6781,7 @@ VPNAttributesGet(CFStringRef service_id, if (af == AF_INET) { entity_dict = service_dict_get(service_id, kSCEntNetIPv4); - } - else { + } else { entity_dict = service_dict_get(service_id, kSCEntNetIPv6); } entity_dict = ipdict_get_service(entity_dict); @@ -6290,7 +6789,7 @@ VPNAttributesGet(CFStringRef service_id, return; } - for (i = 0; i < countof(transientServiceInfo); i++) { + for (size_t i = 0; i < countof(transientServiceInfo); i++) { CFStringRef entity = *transientServiceInfo[i].entityName; p_state = service_dict_get(service_id, entity); @@ -6325,7 +6824,7 @@ VPNAttributesGet(CFStringRef service_id, kSCPropNetVPNStatus, // IPSecStatus, PPPStatus, VPNStatus (const void **)&num) || !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &status)) { + !CFNumberGetValue(num, kCFNumberIntType, &status)) { return; } @@ -6348,7 +6847,7 @@ VPNAttributesGet(CFStringRef service_id, kSCPropNetPPPDialOnDemand, (const void **)&num) && isA_CFNumber(num) && - CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand) && + CFNumberGetValue(num, kCFNumberIntType, &ppp_demand) && (ppp_demand != 0)) { *flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; if (status == PPP_IDLE) { @@ -6365,7 +6864,7 @@ typedef struct ElectionInfo { CFStringRef entity; int n_services; CFArrayRef order; - int n_order; + CFIndex n_order; ElectionResultsRef results; CFMutableDictionaryRef rank_dict; } ElectionInfo, * ElectionInfoRef; @@ -6441,8 +6940,9 @@ ElectionResultsLog(int level, ElectionResultsRef results, const char * prefix) char ntopbuf[INET6_ADDRSTRLEN]; (void)inet_ntop(results->af, &scan->addr, ntopbuf, sizeof(ntopbuf)); - my_log(level, "%d. %@ serviceID=%@ addr=%s rank=0x%x", - i, scan->if_name, scan->serviceID, ntopbuf, scan->rank); + my_log(level, "%d. %@ serviceID=%@ addr=%s rank=0x%x%s", + i, scan->if_name, scan->serviceID, ntopbuf, scan->rank, + scan->ineligible ? " [ineligible]" : ""); } return; } @@ -6501,7 +7001,7 @@ elect_ip(const void * key, const void * value, void * context); * function. Return the results of the election. */ static ElectionResultsRef -ElectionResultsCopy(int af, CFArrayRef order, int n_order) +ElectionResultsCopy(int af, CFArrayRef order) { int count; ElectionInfo info; @@ -6522,7 +7022,12 @@ ElectionResultsCopy(int af, CFArrayRef order, int n_order) info.results = ElectionResultsAlloc(af, count); info.n_services = count; info.order = order; - info.n_order = n_order; + if (order != NULL) { + info.n_order = CFArrayGetCount(order); + } + else { + info.order = 0; + } CFDictionaryApplyFunction(S_service_state_dict, elect_ip, (void *)&info); if (info.results->count == 0) { ElectionResultsRelease(info.results); @@ -6537,20 +7042,33 @@ ElectionResultsCopy(int af, CFArrayRef order, int n_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(ElectionResultsRef other_results, +ElectionResultsCandidateNeedsDemotion(CandidateRef other_candidate, CandidateRef candidate) { - CandidateRef other_candidate; Boolean ret = FALSE; - if (other_results == NULL - || candidate->ip_is_coupled == FALSE - || 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; } - other_candidate = other_results->candidates; if (CFEqual(other_candidate->if_name, candidate->if_name)) { /* they are over the same interface, no need to demote */ goto done; @@ -6559,14 +7077,28 @@ ElectionResultsCandidateNeedsDemotion(ElectionResultsRef other_results, /* 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->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; done: @@ -6576,22 +7108,22 @@ ElectionResultsCandidateNeedsDemotion(ElectionResultsRef other_results, static void -get_signature_sha1(CFStringRef signature, - unsigned char * sha1) +get_signature_sha256(CFStringRef signature, + unsigned char * sha256) { - CC_SHA1_CTX ctx; - CFDataRef signature_data; + CC_SHA256_CTX ctx; + CFDataRef signature_data; signature_data = CFStringCreateExternalRepresentation(NULL, signature, kCFStringEncodingUTF8, 0); - CC_SHA1_Init(&ctx); - CC_SHA1_Update(&ctx, - signature_data, + CC_SHA256_Init(&ctx); + CC_SHA256_Update(&ctx, + CFDataGetBytePtr(signature_data), (CC_LONG)CFDataGetLength(signature_data)); - CC_SHA1_Final(sha1, &ctx); + CC_SHA256_Final(sha256, &ctx); CFRelease(signature_data); @@ -6601,7 +7133,8 @@ get_signature_sha1(CFStringRef signature, static void add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, - CandidateRef candidate, Rank rank) + CandidateRef candidate, Boolean not_in_list, + Boolean not_in_iflist) { uint64_t flags = 0; char ifname[IFNAMSIZ]; @@ -6611,12 +7144,19 @@ add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, /* can't happen */ return; } - if (RANK_ASSERTION_MASK(rank) == kRankAssertionNever) { + if (not_in_list + || RANK_ASSERTION_MASK(candidate->rank) == kRankAssertionNever) { flags |= NWI_IFSTATE_FLAGS_NOT_IN_LIST; } + if (not_in_iflist) { + flags |= NWI_IFSTATE_FLAGS_NOT_IN_IFLIST; + } 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) { @@ -6624,19 +7164,20 @@ add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, (void)inet_ntop(af, &candidate->addr, ntopbuf, sizeof(ntopbuf)); my_log(LOG_DEBUG, - "Inserting IPv%c [%s] %s " + "Adding IPv%c [%s] %s " "with flags 0x%llx rank 0x%x reach_flags 0x%x", ipvx_char(af), ifname, ntopbuf, - flags, rank, candidate->reachability_flags); + flags, candidate->rank, candidate->reachability_flags); } - ifstate = nwi_insert_ifstate(nwi_state, ifname, af, flags, rank, - (void *)&candidate->addr, - (void *)&candidate->vpn_server_addr, - candidate->reachability_flags); + ifstate = nwi_state_add_ifstate(nwi_state, ifname, af, flags, + candidate->rank, + (void *)&candidate->addr, + (void *)&candidate->vpn_server_addr, + candidate->reachability_flags); if (ifstate != NULL && candidate->signature) { - uint8_t hash[CC_SHA1_DIGEST_LENGTH]; + uint8_t hash[CC_SHA256_DIGEST_LENGTH]; - get_signature_sha1(candidate->signature, hash); + get_signature_sha256(candidate->signature, hash); nwi_ifstate_set_signature(ifstate, hash); } return; @@ -6646,8 +7187,11 @@ add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, static void add_reachability_flags_to_candidate(CandidateRef candidate, CFDictionaryRef services_info, int af) { - SCNetworkReachabilityFlags flags = kSCNetworkReachabilityFlagsReachable; - CFStringRef vpn_server_address = NULL; + SCNetworkReachabilityFlags flags = kSCNetworkReachabilityFlagsReachable; + CFStringRef vpn_server_address = NULL; + + assert(candidate != NULL); + assert(services_info != NULL); VPNAttributesGet(candidate->serviceID, services_info, @@ -6658,7 +7202,7 @@ add_reachability_flags_to_candidate(CandidateRef candidate, CFDictionaryRef serv candidate->reachability_flags = flags; if (vpn_server_address == NULL) { - bzero(&candidate->vpn_server_addr, sizeof(candidate->vpn_server_addr)); + memset(&candidate->vpn_server_addr, 0, sizeof(candidate->vpn_server_addr)); } else { char buf[128]; @@ -6674,7 +7218,7 @@ add_reachability_flags_to_candidate(CandidateRef candidate, CFDictionaryRef serv return; } /* - * Function: ElectionResultsCopyPrimary + * Function: ElectionResultsGetPrimary * Purpose: * Use the results of the current protocol and the other protocol to * determine which service should become primary. @@ -6682,20 +7226,19 @@ add_reachability_flags_to_candidate(CandidateRef candidate, CFDictionaryRef serv * At the same time, generate the IPv4/IPv6 routing table and * the nwi_state for the protocol. */ -static CFStringRef -ElectionResultsCopyPrimary(ElectionResultsRef results, - ElectionResultsRef other_results, - nwi_state_t nwi_state, int af, - RouteListRef * ret_routes, - CFDictionaryRef services_info) -{ - CFStringRef primary = NULL; +static CandidateRef +ElectionResultsGetPrimary(ElectionResultsRef results, + CandidateRef other_candidate, + nwi_state_t nwi_state, int af, + RouteListRef * ret_routes, + CFDictionaryRef services_info) +{ + CandidateRef primary = NULL; Boolean primary_is_null = FALSE; RouteListRef routes = NULL; - if (nwi_state != NULL) { - nwi_state_clear(nwi_state, af); - } + assert(services_info != NULL); + if (results != NULL) { CandidateRef deferred[results->count]; int deferred_count; @@ -6723,25 +7266,27 @@ ElectionResultsCopyPrimary(ElectionResultsRef results, i < results->count; i++, scan++) { Boolean is_primary = FALSE; - Rank rank = scan->rank; CFDictionaryRef service_dict; RouteListRef service_routes; Boolean skip = FALSE; - if (primary == NULL - && RANK_ASSERTION_MASK(rank) != kRankAssertionNever) { - if (ElectionResultsCandidateNeedsDemotion(other_results, + if (!scan->ineligible + && primary == NULL + && RANK_ASSERTION_MASK(scan->rank) != kRankAssertionNever) { + if (ElectionResultsCandidateNeedsDemotion(other_candidate, scan)) { - /* demote to RankNever */ + /* 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)); - rank = RankMake(rank, kRankAssertionNever); + "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; } else { - primary = CFRetain(scan->serviceID); + primary = scan; is_primary = TRUE; } } @@ -6749,6 +7294,12 @@ ElectionResultsCopyPrimary(ElectionResultsRef results, service_dict = service_dict_get(scan->serviceID, entity_name); service_routes = ipdict_get_routelist(service_dict); if (service_routes != NULL) { + Rank rank = scan->rank; + + if (skip) { + /* routes are RankNever to prevent becoming primary */ + rank = RankMake(rank, kRankAssertionNever); + } routes = RouteListAddRouteList(info, routes, initial_size, service_routes, rank); if ((service_routes->flags & kRouteListFlagsExcludeNWI) != 0) { @@ -6764,28 +7315,24 @@ ElectionResultsCopyPrimary(ElectionResultsRef results, primary_is_null = TRUE; } } - else { - if (primary_is_null) { - /* everything after the primary must be Never */ - rank = RankMake(rank, kRankAssertionNever); - } + else if (!scan->ineligible) { + Boolean not_in_iflist; + add_reachability_flags_to_candidate(scan, services_info, af); - add_candidate_to_nwi_state(nwi_state, af, scan, rank); + not_in_iflist + = (service_routes->flags & kRouteListFlagsScopedOnly) != 0; + add_candidate_to_nwi_state(nwi_state, af, scan, + primary_is_null, + not_in_iflist); } } for (i = 0; i < deferred_count; i++) { CandidateRef candidate = deferred[i]; - Rank rank; - /* demote to RankNever */ - rank = RankMake(candidate->rank, kRankAssertionNever); add_reachability_flags_to_candidate(candidate, services_info, af); - add_candidate_to_nwi_state(nwi_state, af, candidate, rank); + add_candidate_to_nwi_state(nwi_state, af, candidate, TRUE, FALSE); } } - if (nwi_state != NULL) { - nwi_state_set_last(nwi_state, af); - } if (ret_routes != NULL) { *ret_routes = routes; } @@ -6793,7 +7340,7 @@ ElectionResultsCopyPrimary(ElectionResultsRef results, free(routes); } if (primary_is_null) { - my_CFRelease(&primary); + primary = NULL; } return (primary); } @@ -6807,7 +7354,7 @@ service_dict_get_signature(CFDictionaryRef service_dict) ifname = CFDictionaryGetValue(service_dict, kSCPropInterfaceName); if (isA_CFString(ifname) == NULL - || confirm_interface_name(service_dict, ifname) == FALSE) { + || !confirm_interface_name(service_dict, ifname)) { return (NULL); } return (CFDictionaryGetValue(service_dict, kStoreKeyNetworkSignature)); @@ -6829,6 +7376,7 @@ elect_ip(const void * key, const void * value, void * context) CFStringRef if_name; CFDictionaryRef ipdict; Rank primary_rank; + CFDictionaryRef rank_entity; RouteListUnion routelist; CFDictionaryRef service_dict; @@ -6845,10 +7393,6 @@ elect_ip(const void * key, const void * value, void * context) /* no connectivity */ return; } - if ((routelist.common->flags & kRouteListFlagsHasDefault) == 0) { - /* no default route, not a candidate for being primary */ - return; - } if_name = CFDictionaryGetValue(service_dict, kSCPropInterfaceName); if (if_name == NULL) { /* need an interface name */ @@ -6858,10 +7402,16 @@ elect_ip(const void * key, const void * value, void * context) /* don't process loopback */ return; } - bzero(&candidate, sizeof(candidate)); + memset(&candidate, 0, sizeof(candidate)); candidate.serviceID = (CFStringRef)key; - candidate.rank = get_service_rank(elect_info->order, elect_info->n_order, - candidate.serviceID); + if ((routelist.common->flags & kRouteListFlagsHasDefault) == 0) { + /* no default route means it's ineligible to become primary */ + candidate.ineligible = TRUE; + } + rank_entity = CFDictionaryGetValue(all_entities_dict, kSCEntNetService); + candidate.rank = get_service_index(rank_entity, + elect_info->order, elect_info->n_order, + candidate.serviceID); if (elect_info->af == AF_INET) { default_rank = routelist.v4->list->rank; candidate.addr.v4 = routelist.v4->list->ifa; @@ -6907,19 +7457,23 @@ service_changed(CFDictionaryRef services_info, CFStringRef serviceID) services_info)) { changed |= (1 << kEntityTypeServiceOptions); } + /* update IPv4, IPv6, DNS, Proxies, SMB, ... */ for (i = 0; i < ENTITY_TYPES_COUNT; i++) { - GetEntityChangesFuncRef func = entityChangeFunc[i]; + GetEntityChangesFuncRef func; + CFStringRef name; + + func = entityChangeFunc[i]; + name = *entityTypeNames[i]; if ((*func)(serviceID, - get_service_state_entity(services_info, serviceID, - *entityTypeNames[i]), - get_service_setup_entity(services_info, serviceID, - *entityTypeNames[i]), + get_service_state_entity(services_info, serviceID, name), + get_service_setup_entity(services_info, serviceID, name), services_info)) { changed |= (1 << i); } } + /* update transient service status */ if (get_transient_status_changes(serviceID, services_info)) { changed |= (1 << kEntityTypeTransientStatus); } @@ -6927,6 +7481,31 @@ service_changed(CFDictionaryRef services_info, CFStringRef serviceID) return (changed); } +static CFStringRef +serviceID_get_ifname(CFStringRef serviceID) +{ + CFDictionaryRef entity_dict; + CFStringRef ifname = NULL; + + entity_dict = service_dict_get(serviceID, kSCEntNetIPv4); + if (entity_dict == NULL) { + entity_dict = service_dict_get(serviceID, kSCEntNetIPv6); + } + if (entity_dict != NULL) { + ifname = ipdict_get_ifname(entity_dict); + } + return (ifname); +} + +__private_extern__ boolean_t +check_if_service_expensive(CFStringRef serviceID) +{ + CFStringRef ifname; + ifname = serviceID_get_ifname(serviceID); + + return interface_is_expensive(ifname); +} + static CFArrayRef service_order_get(CFDictionaryRef services_info) { @@ -6966,29 +7545,17 @@ set_new_primary(CFStringRef * primary_p, CFStringRef new_primary, if (new_primary != NULL) { if (primary != NULL && CFEqual(new_primary, primary)) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ is still primary %s", - new_primary, entity); - } + my_log(LOG_INFO, "%@ is still primary %s", new_primary, entity); } else { my_CFRelease(primary_p); *primary_p = CFRetain(new_primary); - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ is the new primary %s", - new_primary, entity); - } + my_log(LOG_INFO, "%@ is the new primary %s", new_primary, entity); changed = TRUE; } } else if (primary != NULL) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ is no longer primary %s", - primary, entity); - } + my_log(LOG_INFO, "%@ is no longer primary %s", primary, entity); my_CFRelease(primary_p); changed = TRUE; } @@ -7046,11 +7613,9 @@ append_serviceIDs_for_interface(CFMutableArrayRef services_changed, } interface = ipdict_get_ifname(ipdict); if (interface != NULL && CFEqual(interface, ifname)) { - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "Found IP service %@ on interface %@.", - serviceID, ifname); - } + my_log(LOG_DEBUG, + "Found IP service %@ on interface %@", + serviceID, ifname); my_CFArrayAppendUniqueValue(services_changed, serviceID); } } @@ -7081,33 +7646,253 @@ get_changed_str(CFStringRef serviceID, CFStringRef entity, return "!"; } } - return ""; + return ""; +} + +#if !TARGET_OS_SIMULATOR + +#ifdef SIOCSIFORDER +#define MANAGE_IF_ORDER +#define MANAGE_IF_IOCTL +#endif /* SIOCSIFORDER */ + +#ifdef SIOCSIFNETSIGNATURE +#define MANAGE_IF_SIGNATURE +#define MANAGE_IF_IOCTL +#endif /* SIOCSIFNETSIGNATURE */ + +#ifdef MANAGE_IF_IOCTL +static int +inet_dgram_socket(void) +{ + int sockfd; + + sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if (sockfd == -1) { + my_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + } + + return sockfd; +} +#endif /* MANAGE_IF_IOCTL */ + +#ifdef MANAGE_IF_ORDER +static Boolean +interface_order_changed(nwi_state_t old_state, nwi_state_t new_state) +{ + if (old_state == NULL && new_state == NULL) { + // Both are NULL, nothing changed + return FALSE; + } + + if (old_state == NULL || new_state == NULL) { + // One is NULL, something changed + return TRUE; + } + + if (old_state->if_list_count != new_state->if_list_count) { + // Count is different, something changed + return TRUE; + } + + if (new_state->if_list_count == 0) { + // Count is same and 0, nothing changed + return FALSE; + } + + int i; + nwi_ifindex_t *old_scan; + nwi_ifindex_t *new_scan; + for (i = 0, old_scan = nwi_state_if_list(old_state), new_scan = nwi_state_if_list(new_state); + i < new_state->if_list_count; i++, old_scan++, new_scan++) { + if (strcmp(old_state->ifstate_list[*old_scan].ifname, new_state->ifstate_list[*new_scan].ifname) != 0) { + // Some interface in the list is different, something changed + return TRUE; + } + } + + // Count and contents are the same, nothing changed + return FALSE; +} + +static Boolean +update_interface_order(nwi_state_t state, int sockfd) +{ + Boolean success = FALSE; + + // Set interface order into the kernel + struct if_order interface_order; + interface_order.ifo_count = (uint32_t)state->if_list_count; + interface_order.ifo_ordered_indices = (mach_vm_address_t)calloc((size_t)interface_order.ifo_count, sizeof(uint32_t)); + if (((uint32_t *)interface_order.ifo_ordered_indices) != NULL) { + int i; + nwi_ifindex_t *scan; + for (i = 0, scan = nwi_state_if_list(state); + i < state->if_list_count; i++, scan++) { + const char *ifname = state->ifstate_list[*scan].ifname; + ((uint32_t *)interface_order.ifo_ordered_indices)[i] = my_if_nametoindex(ifname); + } + } + if (ioctl(sockfd, SIOCSIFORDER, &interface_order) != 0) { + my_log(LOG_ERR, "SIOCSIFORDER for %u(%p) failed on %d: %s", interface_order.ifo_count, (void *)interface_order.ifo_ordered_indices, sockfd, strerror(errno)); + } else { + my_log(LOG_INFO, "Set kernel interface order for %u interfaces", interface_order.ifo_count); + success = TRUE; + } + if (((uint32_t *)interface_order.ifo_ordered_indices) != NULL) { + free((void *)interface_order.ifo_ordered_indices); + interface_order.ifo_ordered_indices = (mach_vm_address_t)NULL; + } + + return success; +} +#endif /* MANAGE_IF_ORDER */ + +#ifdef MANAGE_IF_SIGNATURE +static int +siocsifnetsignature(int s, const char * ifname, int af, + const uint8_t * signature, size_t signature_length) +{ + struct if_nsreq nsreq; + + memset(&nsreq, 0, sizeof(nsreq)); + strlcpy(nsreq.ifnsr_name, ifname, sizeof(nsreq.ifnsr_name)); + nsreq.ifnsr_family = af; + if (signature_length > 0) { + if (signature_length > sizeof(nsreq.ifnsr_data)) { + signature_length = sizeof(nsreq.ifnsr_data); + } + nsreq.ifnsr_len = signature_length; + memcpy(nsreq.ifnsr_data, signature, signature_length); + } + return (ioctl(s, SIOCSIFNETSIGNATURE, &nsreq)); +} + +static void +process_ifstate_difference(nwi_ifstate_t ifstate, int af, int sockfd) +{ + nwi_ifstate_difference_t diff; + boolean_t set_signature = FALSE; + int signature_length = 0; + + diff = nwi_ifstate_get_difference(ifstate); + switch (diff) { + case knwi_ifstate_difference_changed: + /* set signature for this interface */ + set_signature = TRUE; + if ((ifstate->flags & NWI_IFSTATE_FLAGS_HAS_SIGNATURE) != 0) { + signature_length = sizeof(ifstate->signature); + } + break; + case knwi_ifstate_difference_removed: + /* remove signature for this interface */ + set_signature = TRUE; + break; + default: + break; + } + if (set_signature) { + if (siocsifnetsignature(sockfd, ifstate->ifname, af, + ifstate->signature, + signature_length) < 0) { + my_log(LOG_ERR, + "siocsifnetsignature(%s, IPv%c, %d) failed: %s", + ifstate->ifname, ipvx_char(af), + signature_length, + strerror(errno)); + } + else { + my_log(LOG_DEBUG, "IPv%c Network Signature %s %s", + ipvx_char(af), + (signature_length > 0) ? "Set" : "Cleared", + ifstate->ifname); + if (signature_length > 0 + && (S_IPMonitor_debug & kDebugFlag1) != 0) { + int i; + char sig_buf[signature_length * 3 + 1]; + + sig_buf[0] = '\0'; + for (i = 0; i < signature_length; i++) { + char byte_buf[4]; + + snprintf(byte_buf, sizeof(byte_buf), + "%02x ", ifstate->signature[i]); + strlcat(sig_buf, byte_buf, sizeof(sig_buf)); + } + my_log(LOG_DEBUG, "Signature Bytes: %s", sig_buf); + } + } + } + return; +} + +static void +process_state_differences(nwi_state_t state, int af, int sockfd) +{ + int count; + int i; + nwi_ifstate_t scan; + + if (af == AF_INET) { + count = state->ipv4_count; + } + else { + count = state->ipv6_count; + } + for (i = 0, scan = nwi_state_ifstate_list(state, af); + i < count; i++, scan++) { + process_ifstate_difference(scan, af, sockfd); + } + return; } +#endif /* MANAGE_IF_SIGNATURE */ -static CF_RETURNS_RETAINED CFStringRef -generate_log_changes(nwi_state_t changes_state, - boolean_t dns_changed, - boolean_t dnsinfo_changed, - CFDictionaryRef old_primary_dns, - boolean_t proxy_changed, - CFDictionaryRef old_primary_proxy, - boolean_t smb_changed, - CFDictionaryRef old_primary_smb - ) -{ - int idx; - CFMutableStringRef log_output; - nwi_ifstate_t scan; - - log_output = CFStringCreateMutable(NULL, 0); - - if (changes_state != NULL) { - for (idx = 0; idx < countof(nwi_af_list); idx++) { - CFMutableStringRef changes = NULL; - CFMutableStringRef primary_str = NULL; +#endif /* !TARGET_OS_SIMULATOR */ - scan = nwi_state_get_first_ifstate(changes_state, nwi_af_list[idx]); +static void +process_nwi_changes(CFMutableStringRef log_output, + nwi_state_t changes_state, + nwi_state_t new_state, + nwi_state_t old_state, + boolean_t dns_changed, + boolean_t dnsinfo_changed, + CFDictionaryRef old_primary_dns, + boolean_t proxy_changed, + CFDictionaryRef old_primary_proxy, + boolean_t smb_changed, + CFDictionaryRef old_primary_smb) +{ +#ifndef MANAGE_IF_ORDER +#pragma unused(new_state) +#pragma unused(old_state) +#endif // !MANAGE_IF_ORDER +#if TARGET_OS_IPHONE +#pragma unused(smb_changed) +#pragma unused(old_primary_smb) +#endif // TARGET_OS_IPHONE + if (changes_state != NULL) { + const sa_family_t af_list[] = {AF_INET, AF_INET6}; + nwi_ifstate_t scan; +#ifdef MANAGE_IF_IOCTL + int sockfd = inet_dgram_socket(); +#endif /* MANAGE_IF_IOCTL */ + +#ifdef MANAGE_IF_ORDER + if (interface_order_changed(new_state, old_state)) { + update_interface_order(new_state, sockfd); + } +#endif /* MANAGE_IF_ORDER */ + + for (size_t idx = 0; idx < countof(af_list); idx++) { + int af = af_list[idx]; + CFMutableStringRef changes = NULL; + CFMutableStringRef primary_str = NULL; + +#ifdef MANAGE_IF_SIGNATURE + process_state_differences(changes_state, af, sockfd); +#endif /* MANAGE_IF_SIGNATURE */ + scan = nwi_state_get_first_ifstate(changes_state, af); while (scan != NULL) { const char * changed_str; @@ -7120,7 +7905,7 @@ generate_log_changes(nwi_state_t changes_state, address = (void *)nwi_ifstate_get_address(scan); addr_str = inet_ntop(scan->af, address, ntopbuf, sizeof(ntopbuf)); - if (primary_str == NULL) { + if (primary_str == NULL) { primary_str = CFStringCreateMutable(NULL, 0); CFStringAppendFormat(primary_str, NULL, CFSTR("%s%s:%s"), @@ -7132,7 +7917,7 @@ generate_log_changes(nwi_state_t changes_state, } CFStringAppendFormat(changes, NULL, CFSTR(", %s"), nwi_ifstate_get_ifname(scan)); - if (strcmp(changed_str, "") != 0) { + if (strcmp(changed_str, "") != 0) { CFStringAppendFormat(changes, NULL, CFSTR("%s:%s"), changed_str, addr_str); } @@ -7143,7 +7928,7 @@ generate_log_changes(nwi_state_t changes_state, if (primary_str != NULL) { CFStringAppendFormat(log_output, NULL, CFSTR(" %s(%@"), - nwi_af_list[idx] == AF_INET ? "v4" : "v6", + af == AF_INET ? "v4" : "v6", primary_str); if (changes != NULL && CFStringGetLength(changes) != 0) { @@ -7156,6 +7941,11 @@ generate_log_changes(nwi_state_t changes_state, my_CFRelease(&changes); } } +#ifdef MANAGE_IF_IOCTL + if (sockfd >= 0) { + close(sockfd); + } +#endif /* MANAGE_IF_IOCTL */ } if (dns_changed || dnsinfo_changed) { @@ -7190,7 +7980,7 @@ generate_log_changes(nwi_state_t changes_state, } #endif // !TARGET_OS_IPHONE - return log_output; + return; } #pragma mark - @@ -7215,6 +8005,8 @@ post_network_change_when_ready() { int status; + dispatch_assert_queue(__network_change_queue()); + if (S_network_change_needed == 0) { return; } @@ -7223,13 +8015,10 @@ post_network_change_when_ready() (!S_dnsinfo_synced || !S_nwi_synced)) { // if we [still] need to wait for the DNS configuration // or network information changes to be ack'd - - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "Defer \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s, %s)", - S_dnsinfo_synced ? "DNS" : "!DNS", - S_nwi_synced ? "nwi" : "!nwi"); - } + my_log(LOG_DEBUG, + "Defer \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s, %s)", + S_dnsinfo_synced ? "DNS" : "!DNS", + S_nwi_synced ? "nwi" : "!nwi"); return; } @@ -7242,7 +8031,7 @@ post_network_change_when_ready() } // set (and log?) the post time - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + { struct timeval elapsed; struct timeval end; @@ -7252,7 +8041,7 @@ post_network_change_when_ready() #define QUERY_TIME__FMT "%ld.%6.6d" #define QUERY_TIME__DIV 1 - my_log(LOG_DEBUG, + my_log(LOG_INFO, "Post \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s: " QUERY_TIME__FMT ": 0x%x)", S_network_change_timeout ? "timeout" : "delayed", elapsed.tv_sec, @@ -7260,11 +8049,20 @@ post_network_change_when_ready() S_network_change_needed); } + + /* We are about to post a network change to everyone, get the agents up to date */ +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + if ((S_network_change_needed & NETWORK_CHANGE_DNS) != 0) { + /* Setup or Update config agents */ + process_AgentMonitor_DNS(); + } +#endif //!TARGET_OS_SIMULATOR + if ((S_network_change_needed & NETWORK_CHANGE_NET) != 0) { status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_NWI); if (status != NOTIFY_STATUS_OK) { my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_NWI ") failed: error=%d", status); + "notify_post(" _SC_NOTIFY_NETWORK_CHANGE_NWI ") failed: error=%d", status); } } @@ -7272,22 +8070,46 @@ post_network_change_when_ready() status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_DNS); if (status != NOTIFY_STATUS_OK) { my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_DNS ") failed: error=%d", status); + "notify_post(" _SC_NOTIFY_NETWORK_CHANGE_DNS ") failed: error=%d", status); } } if ((S_network_change_needed & NETWORK_CHANGE_PROXY) != 0) { +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + /* Setup or Update config agents */ + process_AgentMonitor_Proxy(); +#endif //!TARGET_OS_SIMULATOR status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); if (status != NOTIFY_STATUS_OK) { my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_PROXY ") failed: error=%d", status); + "notify_post(" _SC_NOTIFY_NETWORK_CHANGE_PROXY ") failed: error=%d", status); } } - status = notify_post(_SC_NOTIFY_NETWORK_CHANGE); - if (status != NOTIFY_STATUS_OK) { - my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE ") failed: error=%d", status); + if ((S_network_change_needed & NETWORK_CHANGE_NAT64) != 0) { +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + // process any NAT64 prefix update requests (and refresh existing prefixes on change) + if (S_nat64_prefix_requests != NULL || S_nat64_prefix_updates != NULL + || S_nat64_cancel_prefix_requests != NULL) { + nat64_configuration_update(S_nat64_prefix_requests, + S_nat64_prefix_updates, + S_nat64_cancel_prefix_requests); + my_CFRelease(&S_nat64_prefix_requests); + my_CFRelease(&S_nat64_prefix_updates); + my_CFRelease(&S_nat64_cancel_prefix_requests); + } +#endif /* TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ + + S_network_change_needed &= ~(NETWORK_CHANGE_NAT64); + } + + if (S_network_change_needed != 0) { + // if more than just a NAT64 prefix change + status = notify_post(_SC_NOTIFY_NETWORK_CHANGE); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, + "notify_post(" _SC_NOTIFY_NETWORK_CHANGE ") failed: error=%d", status); + } } S_network_change_needed = 0; @@ -7300,6 +8122,8 @@ post_network_change_when_ready() static void post_network_change(uint32_t change) { + dispatch_assert_queue(__network_change_queue()); + if (S_network_change_needed == 0) { // set the start time (void) gettimeofday(&S_network_change_start, NULL); @@ -7353,12 +8177,11 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, boolean_t dnsinfo_changed = FALSE; boolean_t global_ipv4_changed = FALSE; boolean_t global_ipv6_changed = FALSE; - CFIndex i; keyChangeList keys; CFIndex n; - CFStringRef network_change_msg = NULL; + boolean_t nat64_changed = FALSE; + CFMutableStringRef network_change_msg = NULL; int n_services; - int n_service_order = 0; nwi_state_t old_nwi_state = NULL; CFDictionaryRef old_primary_dns = NULL; CFDictionaryRef old_primary_proxy = NULL; @@ -7381,7 +8204,7 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, count = CFArrayGetCount(changed_keys); if ((S_IPMonitor_debug & kDebugFlag1) != 0) { my_log(LOG_DEBUG, - "IPMonitor: changed keys %@ (%ld)", changed_keys, count); + "changed keys %@ (%ld)", changed_keys, count); } } if (if_rank_changes == NULL && count == 0) { @@ -7416,8 +8239,13 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, service_changes = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - for (i = 0; i < count; i++) { - CFStringRef change = CFArrayGetValueAtIndex(changed_keys, i); + for (CFIndex i = 0; i < count; i++) { + CFStringRef change; +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + CFStringRef interface = NULL; +#endif /* TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ + + change = CFArrayGetValueAtIndex(changed_keys, i); if (CFEqual(change, S_setup_global_ipv4)) { global_ipv4_changed = TRUE; global_ipv6_changed = TRUE; @@ -7428,31 +8256,32 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, else if (CFEqual(change, S_private_resolvers)) { dnsinfo_changed = TRUE; } -#if !TARGET_OS_IPHONE else if (CFEqual(change, CFSTR(_PATH_RESOLVER_DIR))) { dnsinfo_changed = TRUE; } -#endif /* !TARGET_OS_IPHONE */ + else if (CFStringHasPrefix(change, S_interface_delegation_prefix) && + CFStringHasSuffix(change, kSCEntNetInterfaceDelegation)) { + reachability_changed = TRUE; + } else if (CFStringHasPrefix(change, S_state_service_prefix)) { CFStringRef serviceID; serviceID = parse_component(change, S_state_service_prefix); - if (serviceID) { + if (serviceID != NULL) { my_CFArrayAppendUniqueValue(service_changes, serviceID); CFRelease(serviceID); } } else if (CFStringHasPrefix(change, S_setup_service_prefix)) { - int j; + CFStringRef serviceID; - CFStringRef serviceID = parse_component(change, - S_setup_service_prefix); - if (serviceID) { + serviceID = parse_component(change, S_setup_service_prefix); + if (serviceID != NULL) { my_CFArrayAppendUniqueValue(service_changes, serviceID); CFRelease(serviceID); } - for (j = 0; j < countof(transientInterfaceEntityNames); j++) { + for (size_t j = 0; j < countof(transientInterfaceEntityNames); j++) { if (CFStringHasSuffix(change, *transientInterfaceEntityNames[j])) { reachability_changed = TRUE; @@ -7464,17 +8293,22 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, reachability_changed = TRUE; } } +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + else if (is_nat64_prefix_request(change, &interface)) { + set_plat_discovery(kPLATDiscoveryOptionStart, interface); + nat64_changed = TRUE; + } +#endif /* TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ } /* determine which serviceIDs are impacted by the interface rank changes */ if (if_rank_changes != NULL) { n = CFArrayGetCount(if_rank_changes); - for (i = 0; i < n; i++) { + for (CFIndex i = 0; i < n; i++) { CFStringRef ifname = CFArrayGetValueAtIndex(if_rank_changes, i); - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, "Interface rank changed %@", - ifname); + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, "Interface rank changed %@", ifname); } append_serviceIDs_for_interface(service_changes, ifname); } @@ -7482,17 +8316,19 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, /* grab a snapshot of everything we need */ services_info = services_info_copy(session, service_changes); + assert(services_info != NULL); + + /* grab the service order */ service_order = service_order_get(services_info); if (service_order != NULL) { - n_service_order = (int)CFArrayGetCount(service_order); if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: service_order %@ ", service_order); + my_log(LOG_DEBUG, "service_order %@ ", service_order); } } + /* process protocol (v4, v6, rank, ...) and configuration (dns, proxies, smb, ...) changes */ n = CFArrayGetCount(service_changes); - for (i = 0; i < n; i++) { + for (CFIndex i = 0; i < n; i++) { uint32_t changes; CFStringRef serviceID; @@ -7513,6 +8349,7 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, global_ipv6_changed = TRUE; dnsinfo_changed = TRUE; proxies_changed = TRUE; + nat64_changed = TRUE; } } if ((changes & (1 << kEntityTypeDNS)) != 0) { @@ -7520,6 +8357,7 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, dns_changed = TRUE; } dnsinfo_changed = TRUE; + nat64_changed = TRUE; } if ((changes & (1 << kEntityTypeProxies)) != 0) { proxies_changed = TRUE; @@ -7534,13 +8372,13 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, if ((changes & (1 << kEntityTypeTransientStatus)) != 0 && (service_dict_get(serviceID, kSCEntNetIPv4) != NULL || service_dict_get(serviceID, kSCEntNetIPv6) != NULL)) { - dnsinfo_changed = TRUE; - } + dnsinfo_changed = TRUE; + } } /* ensure S_nwi_state can hold as many services as we have currently */ n_services = (int)CFDictionaryGetCount(S_service_state_dict); - old_nwi_state = nwi_state_copy_priv(S_nwi_state); + old_nwi_state = nwi_state_make_copy(S_nwi_state); S_nwi_state = nwi_state_new(S_nwi_state, n_services); if (global_ipv4_changed) { @@ -7548,62 +8386,63 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, ElectionResultsRelease(S_ipv4_results); } S_ipv4_results - = ElectionResultsCopy(AF_INET, service_order, n_service_order); - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - ElectionResultsLog(LOG_DEBUG, S_ipv4_results, "IPv4"); - } + = ElectionResultsCopy(AF_INET, service_order); + ElectionResultsLog(LOG_INFO, S_ipv4_results, "IPv4"); } if (global_ipv6_changed) { if (S_ipv6_results != NULL) { ElectionResultsRelease(S_ipv6_results); } S_ipv6_results - = ElectionResultsCopy(AF_INET6, service_order, n_service_order); - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - ElectionResultsLog(LOG_DEBUG, S_ipv6_results, "IPv6"); - } + = ElectionResultsCopy(AF_INET6, service_order); + ElectionResultsLog(LOG_INFO, S_ipv6_results, "IPv6"); } if (global_ipv4_changed || global_ipv6_changed || dnsinfo_changed) { - CFStringRef new_primary; - RouteListUnion new_routelist; + CFStringRef new_primary; + CFStringRef new_primary_dns = NULL; + CFStringRef new_primary_proxies = NULL; +#if !TARGET_OS_IPHONE + CFStringRef new_primary_smb = NULL; +#endif /* !TARGET_OS_IPHONE */ + RouteListUnion new_routelist; + CandidateRef other_candidate; + CandidateRef primary_candidate; - /* IPv4 */ - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: electing IPv4 primary"); + if (S_nwi_state != NULL) { + nwi_state_clear(S_nwi_state, AF_INET); + nwi_state_clear(S_nwi_state, AF_INET6); } + + /* IPv4 */ + my_log(LOG_DEBUG, "electing IPv4 primary"); new_routelist.ptr = NULL; - new_primary = ElectionResultsCopyPrimary(S_ipv4_results, - S_ipv6_results, - S_nwi_state, AF_INET, - &new_routelist.common, - services_info); + other_candidate = (S_ipv6_results != NULL) /* get IPv6 primary */ + ? S_ipv6_results->candidates : NULL; + primary_candidate = ElectionResultsGetPrimary(S_ipv4_results, + other_candidate, + S_nwi_state, AF_INET, + &new_routelist.common, + services_info); + new_primary = (primary_candidate != NULL) + ? primary_candidate->serviceID : NULL; (void)set_new_primary(&S_primary_ipv4, new_primary, "IPv4"); update_ipv4(S_primary_ipv4, new_routelist.v4, &keys); - my_CFRelease(&new_primary); /* IPv6 */ - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: electing IPv6 primary"); - } + my_log(LOG_DEBUG, "electing IPv6 primary"); new_routelist.ptr = NULL; - new_primary = ElectionResultsCopyPrimary(S_ipv6_results, - S_ipv4_results, - S_nwi_state, AF_INET6, - &new_routelist.common, - services_info); + other_candidate = primary_candidate; /* get IPv4 primary */ + primary_candidate = ElectionResultsGetPrimary(S_ipv6_results, + other_candidate, + S_nwi_state, AF_INET6, + &new_routelist.common, + services_info); + new_primary = (primary_candidate != NULL) + ? primary_candidate->serviceID : NULL; (void)set_new_primary(&S_primary_ipv6, new_primary, "IPv6"); update_ipv6(S_primary_ipv6, new_routelist.v6, &keys); - my_CFRelease(&new_primary); - } - if (global_ipv4_changed || global_ipv6_changed) { - CFStringRef new_primary_dns = NULL; - CFStringRef new_primary_proxies = NULL; -#if !TARGET_OS_IPHONE - CFStringRef new_primary_smb = NULL; -#endif /* !TARGET_OS_IPHONE */ + nwi_state_finalize(S_nwi_state); if (S_primary_ipv4 != NULL && S_primary_ipv6 != NULL) { /* decide between IPv4 and IPv6 */ @@ -7743,25 +8582,31 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, } } #endif /* !TARGET_OS_IPHONE */ + if (nat64_changed) { + changes |= NETWORK_CHANGE_NAT64; + } my_CFRelease(&service_changes); my_CFRelease(&services_info); if (changes != 0) { - network_change_msg = - generate_log_changes(changes_state, - dns_changed, - dnsinfo_changed, - old_primary_dns, - proxies_changed, - old_primary_proxy, + network_change_msg = CFStringCreateMutable(NULL, 0); + process_nwi_changes(network_change_msg, + changes_state, + S_nwi_state, + old_nwi_state, + dns_changed, + dnsinfo_changed, + old_primary_dns, + proxies_changed, + old_primary_proxy, #if !TARGET_OS_IPHONE - smb_changed, - old_primary_smb + smb_changed, + old_primary_smb #else // !TARGET_OS_IPHONE - FALSE, // smb_changed - NULL // old_primary_smb + FALSE, // smb_changed + NULL // old_primary_smb #endif // !TARGET_OS_IPHONE - ); + ); } keyChangeListApplyToStore(&keys, session); @@ -7781,18 +8626,20 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, && (CFStringGetLength(network_change_msg) != 0)) { my_log(LOG_NOTICE, "network changed:%@", network_change_msg); } else if (keyChangeListActive(&keys)) { - my_log(LOG_NOTICE, "network changed."); + my_log(LOG_NOTICE, "network changed"); + } else if (nat64_changed) { + my_log(LOG_NOTICE, "nat64 update"); } else { - my_log(LOG_DEBUG, "network event w/no changes"); + my_log(LOG_INFO, "network event w/no changes"); } my_CFRelease(&network_change_msg); if (changes_state != NULL) { - nwi_state_release(changes_state); + nwi_state_free(changes_state); } if (old_nwi_state != NULL) { - nwi_state_release(old_nwi_state); + nwi_state_free(old_nwi_state); } keyChangeListFree(&keys); @@ -7804,74 +8651,80 @@ IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, static void IPMonitorNotify(SCDynamicStoreRef session, CFArrayRef changed_keys, - void * not_used) + void * info) { +#pragma unused(info) IPMonitorProcessChanges(session, changed_keys, NULL); return; } -static void -watch_proxies() -{ #if !TARGET_OS_IPHONE - const _scprefs_observer_type type = scprefs_observer_type_mcx; +#define PROXY_GLOBAL_OBSERVER_TYPE scprefs_observer_type_mcx #else - const _scprefs_observer_type type = scprefs_observer_type_global; +#define PROXY_GLOBAL_OBSERVER_TYPE scprefs_observer_type_global #endif + +static void +watch_proxies() +{ static dispatch_queue_t proxy_cb_queue; proxy_cb_queue = dispatch_queue_create("com.apple.SystemConfiguration.IPMonitor.proxy", NULL); - _scprefs_observer_watch(type, + _scprefs_observer_watch(PROXY_GLOBAL_OBSERVER_TYPE, "com.apple.SystemConfiguration.plist", proxy_cb_queue, ^{ SCDynamicStoreNotifyValue(NULL, S_state_global_proxies); - notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); - my_log(LOG_DEBUG, "IPMonitor: Notifying:\n%@", +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + /* Setup or Update config agents */ + process_AgentMonitor_Proxy(); +#endif //!TARGET_OS_SIMULATOR + (void)notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); + my_log(LOG_INFO, "Notifying:\n%@", S_state_global_proxies); }); return; } -#include "IPMonitorControlPrefs.h" +#if TEST_IPV4_ROUTELIST || TEST_IPV6_ROUTELIST -__private_extern__ SCLoggerRef -my_log_get_logger() +static void +prefs_changed_callback_init(void) { - return (S_IPMonitor_logger); } +#else /* TEST_IPV4_ROUTELIST || TEST_IPV6_ROUTELIST */ + +#include "IPMonitorControlPrefs.h" + static void -prefs_changed(__unused SCPreferencesRef prefs) +prefs_changed(SCPreferencesRef prefs) { +#pragma unused(prefs) if (S_bundle_logging_verbose || IPMonitorControlPrefsIsVerbose()) { S_IPMonitor_debug = kDebugFlagDefault; S_IPMonitor_verbose = TRUE; - SCLoggerSetFlags(S_IPMonitor_logger, kSCLoggerFlagsFile | kSCLoggerFlagsDefault); - my_log(LOG_DEBUG, "IPMonitor: Setting logging verbose mode on."); + my_log(LOG_DEBUG, "Setting logging verbose mode on"); } else { - my_log(LOG_DEBUG, "IPMonitor: Setting logging verbose mode off."); + my_log(LOG_DEBUG, "Setting logging verbose mode off"); S_IPMonitor_debug = 0; S_IPMonitor_verbose = FALSE; - SCLoggerSetFlags(S_IPMonitor_logger, kSCLoggerFlagsDefault); } return; } -#define LOGGER_ID CFSTR("com.apple.networking.IPMonitor") static void -my_log_init() +prefs_changed_callback_init(void) { - if (S_IPMonitor_logger != NULL) { - return; - } - S_IPMonitor_logger = SCLoggerCreate(LOGGER_ID); + IPMonitorControlPrefsInit(CFRunLoopGetCurrent(), prefs_changed); + prefs_changed(NULL); return; - } -#if !TARGET_IPHONE_SIMULATOR +#endif /* TEST_IPV4_ROUTELIST || TEST_IPV6_ROUTELIST */ + +#if !TARGET_OS_SIMULATOR static int flush_routes(int s) { @@ -7918,26 +8771,26 @@ flush_routes(int s) addr = ntohl(sin->sin_addr.s_addr); if (IN_LOOPBACK(addr)) { my_log(LOG_DEBUG, - "IPMonitor: flush_routes: ignoring loopback route"); + "flush_routes: ignoring loopback route"); continue; } if (IN_LOCAL_GROUP(addr)) { my_log(LOG_DEBUG, - "IPMonitor: flush_routes: ignoring multicast route"); + "flush_routes: ignoring multicast route"); continue; } rtm->rtm_type = RTM_DELETE; rtm->rtm_seq = ++rtm_seq; if (write(s, rtm, rtm->rtm_msglen) < 0) { - my_log(LOG_DEBUG, - "IPMonitor: flush_routes: removing route for " - IP_FORMAT " failed, %s", + my_log(LOG_NOTICE, + "flush_routes: removing route for " + IP_FORMAT " failed: %s", IP_LIST(&sin->sin_addr), strerror(errno)); } else { my_log(LOG_DEBUG, - "IPMonitor: flush_routes: removed route for " IP_FORMAT, + "flush_routes: removed route for " IP_FORMAT, IP_LIST(&sin->sin_addr)); } } @@ -7957,14 +8810,14 @@ flush_inet_routes(void) } } -#else /* !TARGET_IPHONE_SIMULATOR */ +#else /* !TARGET_OS_SIMULATOR */ static void flush_inet_routes(void) { } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ @@ -7984,14 +8837,6 @@ ip_plugin_init() flush_inet_routes(); } - if (S_is_scoped_routing_enabled() != 0) { - S_scopedroute = TRUE; - } - - if (S_is_scoped_v6_routing_enabled() != 0) { - S_scopedroute_v6 = TRUE; - } - S_session = SCDynamicStoreCreate(NULL, CFSTR("IPMonitor"), IPMonitorNotify, NULL); if (S_session == NULL) { @@ -8036,6 +8881,10 @@ ip_plugin_init() kSCDynamicStoreDomainSetup, CFSTR(""), NULL); + S_interface_delegation_prefix + = SCDynamicStoreKeyCreateNetworkInterface(NULL, + kSCDynamicStoreDomainState); + S_service_state_dict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, @@ -8070,7 +8919,7 @@ ip_plugin_init() CFRelease(pattern); /* register for State: per-service PPP/VPN/IPSec status notifications */ - add_transient_status_keys(kSCCompAnyRegex, patterns); + add_transient_status_keys(kSCCompAnyRegex, NULL, patterns); /* add notifier for ServiceOrder/PPPOverridePrimary changes for IPv4 */ CFArrayAppendValue(keys, S_setup_global_ipv4); @@ -8089,19 +8938,27 @@ ip_plugin_init() CFSTR(kDNSServiceCompPrivateDNS)); CFArrayAppendValue(keys, S_private_resolvers); +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + /* add NAT64 prefix request pattern */ + nat64_prefix_request_add_pattern(patterns); +#endif /* TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ + + /* add interface delegation pattern */ + pattern = interface_entity_key_copy(kSCCompAnyRegex, kSCEntNetInterfaceDelegation); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); + if (!SCDynamicStoreSetNotificationKeys(S_session, keys, patterns)) { my_log(LOG_ERR, - "IPMonitor ip_plugin_init " - "SCDynamicStoreSetNotificationKeys failed: %s", - SCErrorString(SCError())); + "SCDynamicStoreSetNotificationKeys() failed: %s", + SCErrorString(SCError())); goto done; } rls = SCDynamicStoreCreateRunLoopSource(NULL, S_session, 0); if (rls == NULL) { my_log(LOG_ERR, - "IPMonitor ip_plugin_init " - "SCDynamicStoreCreateRunLoopSource failed: %s", + "SCDynamicStoreCreateRunLoopSource() failed: %s", SCErrorString(SCError())); goto done; } @@ -8109,6 +8966,8 @@ ip_plugin_init() CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); CFRelease(rls); + serviceIDNumberInit(); + /* initialize dns configuration */ (void)dns_configuration_set(NULL, NULL, NULL, NULL, NULL); #if !TARGET_OS_IPHONE @@ -8135,6 +8994,11 @@ prime_IPMonitor() { /* initialize multicast route */ update_ipv4(NULL, NULL, NULL); + +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + process_AgentMonitor(); +#endif // !TARGET_OS_SIMULATOR + return; } @@ -8152,12 +9016,13 @@ S_get_plist_boolean(CFDictionaryRef plist, CFStringRef key, return (ret); } -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST #include "IPMonitorControlServer.h" static void InterfaceRankChanged(void * info) { +#pragma unused(info) CFDictionaryRef assertions = NULL; CFArrayRef changes; @@ -8170,6 +9035,7 @@ InterfaceRankChanged(void * info) IPMonitorProcessChanges(S_session, NULL, changes); CFRelease(changes); } + return; } @@ -8179,11 +9045,12 @@ StartIPMonitorControlServer(void) CFRunLoopSourceContext context; CFRunLoopSourceRef rls; - bzero(&context, sizeof(context)); + memset(&context, 0, sizeof(context)); context.perform = InterfaceRankChanged; rls = CFRunLoopSourceCreate(NULL, 0, &context); - if (IPMonitorControlServerStart(CFRunLoopGetCurrent(), rls, - &S_bundle_logging_verbose) == FALSE) { + if (!IPMonitorControlServerStart(CFRunLoopGetCurrent(), + rls, + &S_bundle_logging_verbose)) { my_log(LOG_ERR, "IPMonitorControlServerStart failed"); } else { @@ -8194,7 +9061,7 @@ StartIPMonitorControlServer(void) return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ __private_extern__ void @@ -8212,27 +9079,23 @@ load_IPMonitor(CFBundleRef bundle, Boolean bundleVerbose) } if (bundleVerbose) { S_IPMonitor_debug = kDebugFlagDefault; - S_bundle_logging_verbose = bundleVerbose; + S_bundle_logging_verbose = TRUE; S_IPMonitor_verbose = TRUE; } - my_log_init(); - - /* register to receive changes to verbose and read the initial setting */ - IPMonitorControlPrefsInit(CFRunLoopGetCurrent(), prefs_changed); - prefs_changed(NULL); - + /* register to receive changes to the "verbose" flag and read the initial setting */ + prefs_changed_callback_init(); +#if !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + /* start DNS configuration (dnsinfo) server */ load_DNSConfiguration(bundle, // bundle - S_IPMonitor_logger, // SCLogger - &S_bundle_logging_verbose, // bundleVerbose ^(Boolean inSync) { // syncHandler dispatch_async(__network_change_queue(), ^{ S_dnsinfo_synced = inSync; if (inSync && ((S_network_change_needed & NETWORK_CHANGE_DNS) == 0)) { - // all of the mDNSResponder ack's should result + // all of the DNS service ack's should result // in a [new] network change being posted post_network_change(NETWORK_CHANGE_DNS); } else { @@ -8241,37 +9104,39 @@ load_IPMonitor(CFBundleRef bundle, Boolean bundleVerbose) }); }); + /* start Network Information (nwi) server */ load_NetworkInformation(bundle, // bundle - S_IPMonitor_logger, // SCLogger - &S_bundle_logging_verbose, // bundleVerbose ^(Boolean inSync) { // syncHandler dispatch_async(__network_change_queue(), ^{ S_nwi_synced = inSync; post_network_change_when_ready(); }); }); -#if !TARGET_IPHONE_SIMULATOR +#endif /* !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ + +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + /* start IPMonitor Control (InterfaceRank) server */ StartIPMonitorControlServer(); #endif /* !TARGET_OS_IPHONE */ + /* initialize DNS configuration */ dns_configuration_init(bundle); + /* initialize proxy configuration */ proxy_configuration_init(bundle); ip_plugin_init(); -#if !TARGET_OS_IPHONE if (S_session != NULL) { dns_configuration_monitor(S_session, IPMonitorNotify); } -#endif /* !TARGET_OS_IPHONE */ -#if !TARGET_IPHONE_SIMULATOR - load_hostname((S_IPMonitor_debug & kDebugFlag1) != 0); -#endif /* !TARGET_IPHONE_SIMULATOR */ +#if !TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST + load_hostname(TRUE); +#endif /* TARGET_OS_SIMULATOR && !TEST_IPV4_ROUTELIST && !TEST_IPV6_ROUTELIST */ #if !TARGET_OS_IPHONE - load_smb_configuration((S_IPMonitor_debug & kDebugFlag1) != 0); + load_smb_configuration(TRUE); #endif /* !TARGET_OS_IPHONE */ return; @@ -8284,12 +9149,6 @@ load_IPMonitor(CFBundleRef bundle, Boolean bundleVerbose) #ifdef TEST_IPMONITOR -#include "dns-configuration.c" - -#if !TARGET_IPHONE_SIMULATOR -#include "set-hostname.c" -#endif /* !TARGET_IPHONE_SIMULATOR */ - int main(int argc, char **argv) { @@ -8311,8 +9170,6 @@ main(int argc, char **argv) #endif /* TEST_IPMONITOR */ #ifdef TEST_ROUTELIST -#include "dns-configuration.c" -#include "set-hostname.c" struct route { const char * dest; @@ -8323,7 +9180,7 @@ struct route { #endif -#ifdef TEST_IPV4_ROUTELIST +#if TEST_IPV4_ROUTELIST typedef struct { const char * addr; @@ -8920,8 +9777,7 @@ make_IPv4RouteList_for_test(IPv4RouteListRef list, = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank_assertion); } } - r = IPv4RouteListCreateWithDictionary(routes, dict, - rank_assertion_cf); + r = IPv4RouteListCreateWithDictionary(routes, dict, rank_assertion_cf, 0); my_CFRelease(&rank_assertion_cf); if (r == NULL) { fprintf(stderr, "IPv4RouteListCreateWithDictionary failed\n"); @@ -8937,7 +9793,7 @@ make_IPv4RouteList_for_test(IPv4RouteListRef list, CFStringRef descr; descr = IPv4RouteListCopyDescription(r); - SCLog(TRUE, LOG_NOTICE, CFSTR("Adding %@"), descr); + SCPrint(TRUE, stdout, CFSTR("Adding %@\n"), descr); CFRelease(descr); } ret = IPv4RouteListAddRouteList(list, 1, r, rank); @@ -9106,9 +9962,8 @@ main(int argc, char **argv) if (argc > 1) { S_IPMonitor_debug = strtoul(argv[1], NULL, 0); } - S_scopedroute = (argc < 3); for (test = ipv4_tests; *test != NULL; test++) { - if (routelist_build_test(*test) == FALSE) { + if (!routelist_build_test(*test)) { fprintf(stderr, "%s failed\n", (*test)->name); exit(1); } @@ -9136,7 +9991,7 @@ main(int argc, char **argv) #endif /* TEST_IPV4_ROUTELIST */ -#ifdef TEST_IPV6_ROUTELIST +#if TEST_IPV6_ROUTELIST typedef struct { const char * addr; @@ -9589,8 +10444,7 @@ make_IPv6RouteList_for_test(IPv6RouteListRef list, = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank_assertion); } } - r = IPv6RouteListCreateWithDictionary(routes, dict, - rank_assertion_cf); + r = IPv6RouteListCreateWithDictionary(routes, dict, rank_assertion_cf, 0); my_CFRelease(&rank_assertion_cf); if (r == NULL) { fprintf(stderr, "IPv6RouteListCreateWithDictionary failed\n"); @@ -9606,7 +10460,7 @@ make_IPv6RouteList_for_test(IPv6RouteListRef list, CFStringRef descr; descr = IPv6RouteListCopyDescription(r); - SCLog(TRUE, LOG_NOTICE, CFSTR("Adding %@"), descr); + SCPrint(TRUE, stdout, CFSTR("Adding %@\n"), descr); CFRelease(descr); } ret = IPv6RouteListAddRouteList(list, 1, r, rank); @@ -9773,9 +10627,8 @@ main(int argc, char **argv) if (argc > 1) { S_IPMonitor_debug = strtoul(argv[1], NULL, 0); } - S_scopedroute_v6 = (argc < 3); for (test = ipv6_tests; *test != NULL; test++) { - if (routelist_build_test(*test) == FALSE) { + if (!routelist_build_test(*test)) { fprintf(stderr, "%s failed\n", (*test)->name); exit(1); } @@ -9803,3 +10656,250 @@ main(int argc, char **argv) #endif /* TEST_IPV6_ROUTELIST */ +#ifdef TEST_DNS_ORDER + +#define kProtocolFlagsIPv4v6 (kProtocolFlagsIPv4 | kProtocolFlagsIPv6) + +#define V4_ADDR_LOOP CFSTR("127.0.0.1") +#define V4_ADDR_1 CFSTR("192.168.1.1") +#define V4_ADDR_2 CFSTR("192.168.1.2") +#define V4_ADDR_3 CFSTR("8.8.8.8") +#define V4_ADDR_4 CFSTR("8.8.4.4") + +#define V6_ADDR_LOOP CFSTR("::1") +#define V6_ADDR_1 CFSTR("fe80::0123:4567:89ab:cdef%en0") +#define V6_ADDR_2 CFSTR("fd00::2acf:e9ff:fe14:8c59") +#define V6_ADDR_3 CFSTR("2001:4860:4860::8888") + +typedef struct { + const char * name; + const ProtocolFlags flags; + const CFStringRef server_addrs[]; +} DNSOrderTest, * DNSOrderTestRef; + +static DNSOrderTest test0a = { + "test0a", + kProtocolFlagsIPv4, + { + V4_ADDR_1, V4_ADDR_2, V4_ADDR_3, V4_ADDR_4, NULL + } +}; + +static DNSOrderTest test0b = { + "test0b", + kProtocolFlagsIPv6, + { + V6_ADDR_1, V6_ADDR_2, V6_ADDR_3, NULL + } +}; + +static DNSOrderTest test1a = { + "test1a", + kProtocolFlagsIPv4v6, + { + V4_ADDR_1, V6_ADDR_1, NULL + } +}; + +static DNSOrderTest test2a = { + "test2a", + kProtocolFlagsIPv4v6, + { + V4_ADDR_1, V6_ADDR_2, NULL + } +}; + +static DNSOrderTest test3a = { + "test3a", + kProtocolFlagsIPv4v6, + { + V4_ADDR_1, V6_ADDR_3, NULL + } +}; + +static DNSOrderTest test1b = { + "test1b", + kProtocolFlagsIPv4v6, + { + V4_ADDR_3, V6_ADDR_1, NULL + } +}; + +static DNSOrderTest test2b = { + "test2b", + kProtocolFlagsIPv4v6, + { + V4_ADDR_3, V6_ADDR_2, NULL + } +}; + +static DNSOrderTest test3b = { + "test3b", + kProtocolFlagsIPv4v6, + { + V4_ADDR_3, V6_ADDR_3, NULL + } +}; + +static DNSOrderTest test1c = { + "test1c", + kProtocolFlagsIPv4v6, + { + V6_ADDR_1, V4_ADDR_1, NULL + } +}; + +static DNSOrderTest test2c = { + "test2c", + kProtocolFlagsIPv4v6, + { + V6_ADDR_2, V4_ADDR_1, NULL + } +}; + +static DNSOrderTest test3c = { + "test3c", + kProtocolFlagsIPv4v6, + { + V6_ADDR_3, V4_ADDR_1, NULL + } +}; + +static DNSOrderTest test1d = { + "test1d", + kProtocolFlagsIPv4v6, + { + V6_ADDR_1, V4_ADDR_3, NULL + } +}; + +static DNSOrderTest test2d = { + "test2d", + kProtocolFlagsIPv4v6, + { + V6_ADDR_2, V4_ADDR_3, NULL + } +}; + +static DNSOrderTest test3d = { + "test3d", + kProtocolFlagsIPv4v6, + { + V6_ADDR_3, V4_ADDR_3, NULL + } +}; + +static DNSOrderTest test4 = { + "test4", + kProtocolFlagsIPv4v6, + { + V4_ADDR_LOOP, V4_ADDR_3, V6_ADDR_2, NULL + } +}; + +static DNSOrderTest test5 = { + "test5", + kProtocolFlagsIPv4v6, + { + V4_ADDR_3, V6_ADDR_LOOP, V6_ADDR_2, NULL + } +}; + +static DNSOrderTest test6 = { + "test6", + kProtocolFlagsIPv4v6, + { + V4_ADDR_1, V4_ADDR_2, V4_ADDR_3, V4_ADDR_4, V6_ADDR_1, V6_ADDR_2, V6_ADDR_3, NULL + } +}; + +static DNSOrderTest test7 = { + "test7", + kProtocolFlagsIPv4v6, + { + V4_ADDR_1, V6_ADDR_1, V4_ADDR_3, V6_ADDR_2, NULL + } +}; + +static DNSOrderTestRef dns_order_tests[] = { + &test0a, &test0b, + &test1a, &test2a, &test3a, + &test1b, &test2b, &test3b, + &test1c, &test2c, &test3c, + &test1d, &test2d, &test3d, + &test4, + &test5, + &test6, + &test7, + NULL +}; + +#define EMPHASIS_CHARS "=================" + +static void +apply_order(CFArrayRef servers, ProtocolFlags flags) +{ + CFArrayRef ordered_servers; + + ordered_servers = order_dns_servers(servers, flags); + if (ordered_servers != NULL) { + SCPrint(TRUE, stdout, CFSTR("After :\n%@\n"), ordered_servers); + CFRelease(ordered_servers); + } else { + printf("FAIL: No ordered servers\n"); + } + + return; +} + +static void +apply_test(DNSOrderTestRef test) +{ + CFMutableArrayRef servers; + + printf("\n" EMPHASIS_CHARS "> '%s' Begin <" EMPHASIS_CHARS "\n\n", test->name); + + servers = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + for (int i = 0; test->server_addrs[i] != NULL; i++) { + CFStringRef server_addr = test->server_addrs[i]; + + CFArrayAppendValue(servers, server_addr); + } + + SCPrint(TRUE, stdout, CFSTR("Before :\n%@\n"), servers); + + apply_order(servers, test->flags); + + CFRelease(servers); + + return; +} + +int +main(int argc, char **argv) +{ + _sc_log = FALSE; + _sc_verbose = (argc > 1) ? TRUE : FALSE; + S_IPMonitor_debug = kDebugFlag1 | kDebugFlag2 | kDebugFlag4; + if (argc > 1) { + S_IPMonitor_debug = (uint32)strtoul(argv[1], NULL, 0); + } + + for (DNSOrderTestRef * test = dns_order_tests; *test != NULL; test++) { + apply_test(*test); + } + + { + char cmd[128]; + + printf("\nChecking for leaks\n"); + sprintf(cmd, "leaks %d 2>&1", getpid()); + fflush(stdout); + (void)system(cmd); + } + + exit(0); + return (0); +} + +#endif /* TEST_DNS_ORDER */ diff --git a/src/configd/Plugins/IPMonitor/ip_plugin.h b/src/configd/Plugins/IPMonitor/ip_plugin.h index 86579941d..83970e2d5 100644 --- a/src/configd/Plugins/IPMonitor/ip_plugin.h +++ b/src/configd/Plugins/IPMonitor/ip_plugin.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012-2014 Apple Inc. All Rights Reserved. + * Copyright (c) 2012-2017 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,9 +29,10 @@ #ifndef _IP_PLUGIN_H #define _IP_PLUGIN_H +#include #include +#include #include -#include #ifdef TEST_IPV4_ROUTELIST #define TEST_ROUTELIST @@ -47,15 +48,16 @@ #define kIsNULL CFSTR("IsNULL") /* CFBoolean */ -#ifdef TEST_ROUTELIST -#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) - -#else /* TEST_ROUTELIST */ +#ifndef my_log + #ifdef TEST_ROUTELIST + #define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) + #else /* TEST_ROUTELIST */ + #define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) + #endif /* TEST_ROUTELIST */ +#endif // !my_log -#define my_log(__level, fmt, ...) SCLoggerLog(my_log_get_logger(), __level, CFSTR(fmt), ## __VA_ARGS__) -SCLoggerRef my_log_get_logger(); - -#endif /* TEST_ROUTELIST */ +os_log_t +__log_IPMonitor(void); boolean_t cfstring_to_ip(CFStringRef str, struct in_addr * ip_p); @@ -70,7 +72,13 @@ const char * my_if_indextoname(unsigned int idx, char if_name[IFNAMSIZ]); boolean_t -service_contains_protocol(CFDictionaryRef service, int af); +service_is_routable(CFDictionaryRef service_dict, int af); + +boolean_t +service_is_scoped_only(CFDictionaryRef service_dict); + +boolean_t +check_if_service_expensive(CFStringRef serviceID); CFDictionaryRef ipv4_dict_create(CFDictionaryRef state_dict); diff --git a/src/configd/Plugins/IPMonitor/nat64-configuration.c b/src/configd/Plugins/IPMonitor/nat64-configuration.c new file mode 100644 index 000000000..b44479f44 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/nat64-configuration.c @@ -0,0 +1,668 @@ +/* + * Copyright (c) 2017-2019 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 + * + * April 17, 2017 Allan Nathanson + * - initial revision + */ + + +#include "nat64-configuration.h" + +#include +#include +#include +#include +#if TEST_NAT64_CONFIGURATION +static Boolean G_set_prefixes_force_failure; +#define my_if_nametoindex if_nametoindex +#else +#include "ip_plugin.h" +#endif + +#define INET6 1 + +#include +#include +#include +#include +#include +#include +#include +#include + + +/** + ** Support functions + **/ +static dispatch_queue_t +nat64_dispatch_queue(void) +{ + static dispatch_once_t once; + static dispatch_queue_t q; + + dispatch_once(&once, ^{ + q = dispatch_queue_create("nat64 prefix request queue", NULL); + }); + + return q; +} + +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; + + // pass NAT64 prefixes to the kernel + memset(&req, 0, sizeof(req)); + strlcpy(req.ifnat64_name, if_name, sizeof(req.ifnat64_name)); + + if (num_prefixes == 0) { + SC_log(LOG_NOTICE, "%s: nat64 prefix unavailable", if_name); + } + + for (int32_t i = 0; i < num_prefixes; i++) { + char prefix_str[NW_NAT64_PREFIX_STR_LENGTH] = {0}; + + nw_nat64_write_prefix_to_string(&prefixes[i], prefix_str, sizeof(prefix_str)); + SC_log(LOG_NOTICE, "%s: nat64 prefix[%d] = %s", if_name, i, prefix_str); + + if (i < NAT64_MAX_NUM_PREFIXES) { + req.ifnat64_prefixes[i].prefix_len = prefixes[i].length; + memcpy(&req.ifnat64_prefixes[i].ipv6_prefix, + &prefixes[i].data, + MIN(sizeof(req.ifnat64_prefixes[i].ipv6_prefix), sizeof(prefixes[i].data))); // MIN(16, 12) + } + } + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s == -1) { + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + return (FALSE); + } + ret = ioctl(s, SIOCSIFNAT64PREFIX, &req); + close(s); + if (ret == -1) { + if ((errno != ENOENT) || (num_prefixes != 0)) { + SC_log(LOG_ERR, "%s: ioctl(SIOCSIFNAT64PREFIX) failed: %s", if_name, strerror(errno)); + } + return (FALSE); + } + + SC_log(LOG_NOTICE, "%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) +{ +#if TEST_NAT64_CONFIGURATION +#pragma unused(interface) +#pragma unused(num_prefixes) +#pragma unused(prefixes) +#pragma unused(start_time) + return; +#else /* TEST_NAT64_CONFIGURATION */ + + 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_NOTICE, "%@: PLAT discovery complete %@", + interface, plat_dict); + CFRelease(plat_dict); + } else { + (void)SCDynamicStoreRemoveValue(NULL, key); + } + CFRelease(key); +#endif /* TEST_NAT64_CONFIGURATION */ + return; +} + +static nw_nat64_prefixes_resolver_t +_nat64_resolver_create(unsigned int if_index) +{ + nw_interface_t interface; + nw_parameters_t params; + nw_nat64_prefixes_resolver_t resolver; + + params = nw_parameters_create(); + interface = nw_interface_create_with_index(if_index); + if (interface == NULL) { + SC_log(LOG_NOTICE, + "nw_interface_create_with_index(%u) failed", + if_index); + return (NULL); + } + nw_parameters_require_interface(params, interface); + nw_parameters_set_required_address_family(params, AF_INET6); + nw_release(interface); + resolver = nw_nat64_prefixes_resolver_create(params); + nw_release(params); + return (resolver); +} + +/** + ** NAT64PrefixRequest + **/ +struct NAT64PrefixRequest; +typedef struct NAT64PrefixRequest NAT64PrefixRequest, * NAT64PrefixRequestRef; +#define NAT64PrefixRequest_LIST_ENTRY LIST_ENTRY(NAT64PrefixRequest) +#define NAT64PrefixRequest_LIST_HEAD LIST_HEAD(NAT64PrefixRequestHead, \ + NAT64PrefixRequest) +static NAT64PrefixRequest_LIST_HEAD S_request_head; +static struct NAT64PrefixRequestHead * S_request_head_p = &S_request_head; + +typedef CF_ENUM(uint16_t, RequestFlags) { + kRequestFlagsNone = 0x0000, + kRequestFlagsValid = 0x0001, +}; + +struct NAT64PrefixRequest { + NAT64PrefixRequest_LIST_ENTRY link; + nw_nat64_prefixes_resolver_t resolver; + const char * if_name; + CFStringRef if_name_cf; + unsigned int if_index; + unsigned int retain_count; + RequestFlags flags; +}; + +static Boolean +NAT64PrefixRequestFlagsIsSet(NAT64PrefixRequestRef request, RequestFlags flags) +{ + return ((request->flags & flags) != 0); +} + +static void +NAT64PrefixRequestFlagsSet(NAT64PrefixRequestRef request, RequestFlags flags) +{ + request->flags |= flags; +} + +static void +NAT64PrefixRequestFlagsClear(NAT64PrefixRequestRef request, RequestFlags flags) +{ + request->flags &= ~flags; +} + +static NAT64PrefixRequestRef +NAT64PrefixRequestFindInterface(CFStringRef if_name_cf) +{ + NAT64PrefixRequestRef scan; + + LIST_FOREACH(scan, S_request_head_p, link) { + if (CFEqual(if_name_cf, scan->if_name_cf)) { + return (scan); + } + } + return (NULL); +} + +static void +NAT64PrefixRequestRetain(NAT64PrefixRequestRef request) +{ + request->retain_count++; + SC_log(LOG_DEBUG, "%s: %s %p %u", + request->if_name, __FUNCTION__, + request, request->retain_count); + return; +} + +static NAT64PrefixRequestRef +NAT64PrefixRequestCreate(CFStringRef if_name_cf) +{ + unsigned int if_index; + char * if_name; + NAT64PrefixRequestRef request; + + if_name = _SC_cfstring_to_cstring(if_name_cf, NULL, 0, + kCFStringEncodingASCII); + if (if_name == NULL) { + SC_log(LOG_ERR, + "%@: could not convert interface name", + if_name_cf); + return (NULL); + } + if_index = my_if_nametoindex(if_name); + if (if_index == 0) { + SC_log(LOG_NOTICE, + "%s: interface does not exist", if_name); + CFAllocatorDeallocate(NULL, if_name); + return (NULL); + } + request = malloc(sizeof(*request)); + SC_log(LOG_DEBUG, "%@: %s %p", if_name_cf, __FUNCTION__, request); + bzero(request, sizeof(*request)); + request->if_name_cf = CFRetain(if_name_cf); + request->if_name = if_name; + request->if_index = if_index; + LIST_INSERT_HEAD(S_request_head_p, request, link); + NAT64PrefixRequestFlagsSet(request, kRequestFlagsValid); + NAT64PrefixRequestRetain(request); + return (request); +} + +static void +NAT64PrefixRequestStopResolver(NAT64PrefixRequestRef request) +{ + if (request->resolver != NULL) { + SC_log(LOG_DEBUG, "%s: %s", + request->if_name, __FUNCTION__); + nw_nat64_prefixes_resolver_cancel(request->resolver); + nw_release(request->resolver); + request->resolver = NULL; + } + return; +} + +static void +NAT64PrefixRequestInvalidate(NAT64PrefixRequestRef request) +{ + SC_log(LOG_DEBUG, "%s: %s", request->if_name, __FUNCTION__); + NAT64PrefixRequestStopResolver(request); + if (NAT64PrefixRequestFlagsIsSet(request, kRequestFlagsValid)) { + NAT64PrefixRequestFlagsClear(request, kRequestFlagsValid); + LIST_REMOVE(request, link); + } + return; +} + +static void +NAT64PrefixRequestRelease(NAT64PrefixRequestRef request) +{ + if (request->retain_count == 0) { + SC_log(LOG_ERR, "%s: retain count is zero %p", + __FUNCTION__, request); + return; + } + request->retain_count--; + SC_log(LOG_DEBUG, + "%s: %s %p %u", + request->if_name, __FUNCTION__, request, request->retain_count); + if (request->retain_count != 0) { + return; + } + NAT64PrefixRequestInvalidate(request); + SC_log(LOG_DEBUG, "%s %s: deallocate %p", + request->if_name, __FUNCTION__, request); + if (request->if_name_cf != NULL) { + CFRelease(request->if_name_cf); + request->if_name_cf = NULL; + } + if (request->if_name != NULL) { + CFAllocatorDeallocate(NULL, (void *)request->if_name); + request->if_name = NULL; + } + free(request); + return; +} + +static void +NAT64PrefixRequestStart(NAT64PrefixRequestRef request) +{ + dispatch_block_t cancel_handler; + nw_nat64_copy_prefixes_block_t handler; + nw_nat64_prefixes_resolver_t resolver; + CFAbsoluteTime start_time; + + SC_log(LOG_INFO, "%s: %s", request->if_name, __FUNCTION__); + if (request->resolver != NULL) { + SC_log(LOG_DEBUG, "%s %s: resolver is already active", + request->if_name, __FUNCTION__); + return; + } + resolver = _nat64_resolver_create(request->if_index); + if (resolver == NULL) { + return; + } + NAT64PrefixRequestRetain(request); + cancel_handler = ^{ + SC_log(LOG_DEBUG, "%s: NAT64 resolver cancelled", + request->if_name); + NAT64PrefixRequestRelease(request); + return; + }; + start_time = CFAbsoluteTimeGetCurrent(); + handler = ^(int32_t num_prefixes, nw_nat64_prefix_t *prefixes) { + Boolean remove_resolver = FALSE; + + if (!NAT64PrefixRequestFlagsIsSet(request, + kRequestFlagsValid)) { + SC_log(LOG_INFO, "%s: NAT64 request is stale %p", + request->if_name, request); + return; + } + if (prefixes != NULL) { + /* set prefixes on the interface */ + _nat64_prefix_set(request->if_name, + num_prefixes, prefixes); + remove_resolver = TRUE; + } else { + SC_log(LOG_ERR, "%s: NAT64 no prefixes", + request->if_name); + } + _nat64_prefix_post(request->if_name_cf, + num_prefixes, prefixes, start_time); +#if TEST_NAT64_CONFIGURATION + if (G_set_prefixes_force_failure) { + remove_resolver = TRUE; + } +#endif /* TEST_NAT64_CONFIGURATION */ + if (remove_resolver) { + /* remove resolver */ + NAT64PrefixRequestInvalidate(request); + NAT64PrefixRequestRelease(request); + return; + } + }; + nw_nat64_prefixes_resolver_set_cancel_handler(resolver, cancel_handler); + nw_nat64_prefixes_resolver_set_update_handler(resolver, + nat64_dispatch_queue(), + handler); + nw_nat64_prefixes_resolver_start(resolver); + request->resolver = resolver; + return; +} + +/** + ** Set iterators + **/ +static void +_nat64_process_prefix_request(const void *value, void *context) +{ +#pragma unused(context) + CFStringRef interface = (CFStringRef)value; + NAT64PrefixRequestRef request; + + request = NAT64PrefixRequestFindInterface(interface); + if (request != NULL) { + return; + } + + /* start a new request */ + request = NAT64PrefixRequestCreate(interface); + if (request != NULL) { + NAT64PrefixRequestStart(request); + } + return; +} + +static void +_nat64_process_prefix_update(const void *value, void *context) +{ +#pragma unused(context) + CFStringRef interface = (CFStringRef)value; + NAT64PrefixRequestRef request; + + request = NAT64PrefixRequestFindInterface(interface); + if (request == NULL) { + SC_log(LOG_DEBUG, "%@ %s: no existing request", + interface, __FUNCTION__); + return; + } + + /* destroy the old one, start a new one */ + SC_log(LOG_INFO, "%@: %s", interface, __FUNCTION__); + NAT64PrefixRequestInvalidate(request); + NAT64PrefixRequestRelease(request); + + /* start a new request */ + request = NAT64PrefixRequestCreate(interface); + if (request != NULL) { + NAT64PrefixRequestStart(request); + } + return; +} + +static void +_nat64_process_cancel_request(const void * value, void * context) +{ +#pragma unused(context) + CFStringRef interface = (CFStringRef)value; + NAT64PrefixRequestRef request; + + /* if there's an in-flight request, remove it */ + request = NAT64PrefixRequestFindInterface(interface); + if (request == NULL) { + /* no resolver */ + SC_log(LOG_DEBUG, "%@ %s: no active NAT64 request", + interface, __FUNCTION__); + return; + } + SC_log(LOG_DEBUG, "%s %s: removing NAT64 request", + request->if_name, __FUNCTION__); + _nat64_prefix_set(request->if_name, 0, NULL); + NAT64PrefixRequestInvalidate(request); + NAT64PrefixRequestRelease(request); + return; +} + + +#pragma mark - +#pragma mark NAT64 prefix functions (for IPMonitor) + + +__private_extern__ +Boolean +is_nat64_prefix_request(CFStringRef change, CFStringRef *interface) +{ + CFArrayRef components; + static CFStringRef prefix = NULL; + Boolean yn = FALSE; + static dispatch_once_t once; + + dispatch_once(&once, ^{ + prefix = SCDynamicStoreKeyCreateNetworkInterface(NULL, kSCDynamicStoreDomainState); + }); + + *interface = NULL; + if (!CFStringHasPrefix(change, prefix) || + !CFStringHasSuffix(change, kSCEntNetNAT64PrefixRequest)) { + return FALSE; + } + + components = CFStringCreateArrayBySeparatingStrings(NULL, change, CFSTR("/")); + if (CFArrayGetCount(components) == 5) { + *interface = CFArrayGetValueAtIndex(components, 3); + CFRetain(*interface); + yn = TRUE; + } + CFRelease(components); + + return yn; +} + + +__private_extern__ void +nat64_prefix_request_add_pattern(CFMutableArrayRef patterns) +{ + CFStringRef pattern; + + pattern = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + kSCCompAnyRegex, + kSCEntNetNAT64PrefixRequest); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); + return; +} + +static void +nat64_configuration_update_locked(CFSetRef requests, CFSetRef updates, + CFSetRef cancellations) +{ + if (cancellations != NULL) { + CFSetApplyFunction(cancellations, + _nat64_process_cancel_request, + NULL); + } + // for any interface that changed, refresh the nat64 prefix + if (updates != NULL) { + CFSetApplyFunction(updates, _nat64_process_prefix_update, NULL); + } + + // for any requested interface, query the nat64 prefix + if (requests != NULL) { + CFSetApplyFunction(requests, _nat64_process_prefix_request, + NULL); + } + return; +} + +__private_extern__ +void +nat64_configuration_update(CFSetRef requests, CFSetRef updates, + CFSetRef cancellations) +{ + dispatch_block_t update_block; + + if (requests != NULL) { + CFRetain(requests); + } + if (updates != NULL) { + CFRetain(updates); + } + if (cancellations != NULL) { + CFRetain(cancellations); + } + update_block = ^{ + SC_log(LOG_DEBUG, + "NAT64 requests %@ updates %@ cancellations %@", + requests, updates, cancellations); + nat64_configuration_update_locked(requests, updates, + cancellations); + if (requests != NULL) { + CFRelease(requests); + } + if (updates != NULL) { + CFRelease(updates); + } + if (cancellations != NULL) { + CFRelease(cancellations); + } + }; + dispatch_async(nat64_dispatch_queue(), update_block); + return; +} + +#if TEST_NAT64_CONFIGURATION +int +main(int argc, char * argv[]) +{ + CFStringRef if_name_cf; + CFMutableSetRef set; + + set = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); + for (int i = 1; i < argc; i++) { + if_name_cf = CFStringCreateWithCString(NULL, + argv[i], + kCFStringEncodingASCII); + CFSetAddValue(set, if_name_cf); + CFRelease(if_name_cf); + } + if (CFSetGetCount(set) == 0) { + fprintf(stderr, "nothing to do\n"); + exit(0); + } + SC_log(LOG_NOTICE, "Starting %@", set); + nat64_configuration_update(set, NULL, NULL); + sleep(2); + + SC_log(LOG_NOTICE, "Starting 2 %@", set); + nat64_configuration_update(set, NULL, NULL); + sleep(2); + + SC_log(LOG_NOTICE, "Updating"); + nat64_configuration_update(NULL, set, NULL); + sleep(2); + + SC_log(LOG_NOTICE, "Cancelling"); + nat64_configuration_update(NULL, NULL, set); + sleep(2); + + G_set_prefixes_force_failure = TRUE; + SC_log(LOG_NOTICE, "Starting (with forced failure) %@", set); + nat64_configuration_update(set, NULL, NULL); + sleep(2); + + SC_log(LOG_NOTICE, "Starting (with forced failure 2) %@", set); + nat64_configuration_update(set, NULL, NULL); + + dispatch_main(); + exit(0); + return (0); +} +#endif /* TEST_NAT64_CONFIGURATION */ diff --git a/src/configd/SystemConfiguration.fproj/moh.h b/src/configd/Plugins/IPMonitor/nat64-configuration.h similarity index 68% rename from src/configd/SystemConfiguration.fproj/moh.h rename to src/configd/Plugins/IPMonitor/nat64-configuration.h index 6af6760a1..aa6ebb2ba 100644 --- a/src/configd/SystemConfiguration.fproj/moh.h +++ b/src/configd/Plugins/IPMonitor/nat64-configuration.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002, 2003, 2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2017-2019 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,44 +17,32 @@ * 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 * + * @APPLE_LICENSE_HEADER_END@ */ -#ifndef _MOH_H -#define _MOH_H +#ifndef _NAT64_CONFIGURATION_H +#define _NAT64_CONFIGURATION_H +#include #include #include + __BEGIN_DECLS -int -MOHInit ( - int *ref, - CFStringRef deviceName - ); - -int -MOHDispose ( - int ref - ); - -int -MOHExec (int ref, - uint32_t link, - uint32_t cmd, - void *request, - size_t requestLen, - void **reply, - size_t *replyLen - ); +Boolean +is_nat64_prefix_request (CFStringRef change, + CFStringRef *interface); + +void +nat64_prefix_request_add_pattern (CFMutableArrayRef patterns); + +void +nat64_configuration_update (CFSetRef updates, + CFSetRef requests, + CFSetRef cancellations); __END_DECLS -#endif /* _MOH_H */ +#endif /* _NAT64_CONFIGURATION_H */ diff --git a/src/configd/Plugins/IPMonitor/proxy-configuration.c b/src/configd/Plugins/IPMonitor/proxy-configuration.c index 006028d14..9116f422d 100644 --- a/src/configd/Plugins/IPMonitor/proxy-configuration.c +++ b/src/configd/Plugins/IPMonitor/proxy-configuration.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2014 Apple Inc. All rights reserved. + * Copyright (c) 2011-2017 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@ */ @@ -239,6 +239,7 @@ add_supplemental_proxies(CFMutableArrayRef proxies, CFDictionaryRef services, CF static CFComparisonResult compareBySearchOrder(const void *val1, const void *val2, void *context) { +#pragma unused(context) CFDictionaryRef proxy1 = (CFDictionaryRef)val1; CFDictionaryRef proxy2 = (CFDictionaryRef)val2; CFNumberRef num1; @@ -248,13 +249,13 @@ compareBySearchOrder(const void *val1, const void *val2, void *context) num1 = CFDictionaryGetValue(proxy1, PROXY_MATCH_ORDER_KEY); if (!isA_CFNumber(num1) || - !CFNumberGetValue(num1, kCFNumberIntType, &order1)) { + !CFNumberGetValue(num1, kCFNumberSInt32Type, &order1)) { order1 = DEFAULT_MATCH_ORDER; } num2 = CFDictionaryGetValue(proxy2, PROXY_MATCH_ORDER_KEY); if (!isA_CFNumber(num2) || - !CFNumberGetValue(num2, kCFNumberIntType, &order2)) { + !CFNumberGetValue(num2, kCFNumberSInt32Type, &order2)) { order2 = DEFAULT_MATCH_ORDER; } @@ -264,8 +265,8 @@ compareBySearchOrder(const void *val1, const void *val2, void *context) CFDictionaryGetValueIfPresent(proxy2, ORDER_KEY, (const void **)&num2) && isA_CFNumber(num1) && isA_CFNumber(num2) && - CFNumberGetValue(num1, kCFNumberIntType, &order1) && - CFNumberGetValue(num2, kCFNumberIntType, &order2)) { + CFNumberGetValue(num1, kCFNumberSInt32Type, &order1) && + CFNumberGetValue(num2, kCFNumberSInt32Type, &order2)) { if (order1 == order2) { return kCFCompareEqualTo; } else { @@ -295,6 +296,7 @@ isSupplementalProxy(CFDictionaryRef proxy) static CFArrayRef copy_supplemental_proxies(CFArrayRef proxies, Boolean skip) { +#pragma unused(skip) CFIndex i; CFIndex n_proxies; CFMutableArrayRef supplemental = NULL; @@ -389,8 +391,9 @@ copy_app_layer_vpn_proxies(CFDictionaryRef services, CFArrayRef order, CFDiction CFDictionaryRef proxy; CFDictionaryRef service; CFStringRef serviceID; - CFDictionaryRef vpn; - CFStringRef vpn_key; + CFNumberRef serviceSpecificIdentifier; + int serviceIdentifier = 0; + CFStringRef serviceIdentifierString; serviceID = CFArrayGetValueAtIndex(order, i); service = CFDictionaryGetValue(services, serviceID); @@ -405,21 +408,22 @@ copy_app_layer_vpn_proxies(CFDictionaryRef services, CFArrayRef order, CFDiction continue; } - vpn_key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - serviceID, - kSCEntNetVPN); - vpn = CFDictionaryGetValue(services_info, vpn_key); - CFRelease(vpn_key); - - if (!isA_CFDictionary(vpn) || !CFDictionaryContainsKey(vpn, kSCPropNetVPNAppRules)) { - // if not App Layer vpn + serviceSpecificIdentifier = CFDictionaryGetValue(proxy, kSCPropNetProxiesServiceSpecific); + if (!isA_CFNumber(serviceSpecificIdentifier) || + !CFNumberGetValue(serviceSpecificIdentifier, kCFNumberIntType, &serviceIdentifier) || + serviceIdentifier == 0) { + // if not a service-specific proxy configuration continue; } + serviceIdentifierString = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%u"), serviceIdentifier); + if (serviceIdentifierString == NULL) { + continue; + } if ((app_layer_proxies != NULL) && - CFDictionaryContainsKey(app_layer_proxies, serviceID)) { - // if we've already processed this [app_layer_proxies] interface + CFDictionaryContainsKey(app_layer_proxies, serviceIdentifierString)) { + // if we've already processed this [app_layer_proxies] identifier + CFRelease(serviceIdentifierString); continue; } @@ -427,13 +431,15 @@ copy_app_layer_vpn_proxies(CFDictionaryRef services, CFArrayRef order, CFDiction newProxy = CFDictionaryCreateMutableCopy(NULL, 0, proxy); CFDictionaryRemoveValue(newProxy, kSCPropNetProxiesSupplementalMatchDomains); CFDictionaryRemoveValue(newProxy, kSCPropNetProxiesSupplementalMatchOrders); + CFDictionaryRemoveValue(newProxy, kSCPropNetProxiesServiceSpecific); if (app_layer_proxies == NULL) { app_layer_proxies = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); } - CFDictionarySetValue(app_layer_proxies, serviceID, newProxy); + CFDictionarySetValue(app_layer_proxies, serviceIdentifierString, newProxy); + CFRelease(serviceIdentifierString); CFRelease(newProxy); } @@ -537,7 +543,7 @@ add_default_proxy(CFMutableArrayRef proxies, // ensure that the default proxy has a search order if (!isA_CFNumber(order) || - !CFNumberGetValue(order, kCFNumberIntType, &myOrder)) { + !CFNumberGetValue(order, kCFNumberSInt32Type, &myOrder)) { myOrder = DEFAULT_MATCH_ORDER; order = CFNumberCreate(NULL, kCFNumberIntType, &myOrder); CFDictionarySetValue(myDefault, PROXY_MATCH_ORDER_KEY, order); diff --git a/src/configd/Plugins/IPMonitor/proxy-configuration.h b/src/configd/Plugins/IPMonitor/proxy-configuration.h index e86bd535d..39b02dd2b 100644 --- a/src/configd/Plugins/IPMonitor/proxy-configuration.h +++ b/src/configd/Plugins/IPMonitor/proxy-configuration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2013, 2016 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,7 +29,7 @@ #include -CFBooleanRef G_supplemental_proxies_follow_dns; +extern CFBooleanRef G_supplemental_proxies_follow_dns; __BEGIN_DECLS diff --git a/src/configd/Plugins/IPMonitor/proxyAgent.h b/src/configd/Plugins/IPMonitor/proxyAgent.h new file mode 100644 index 000000000..ecd5e6b60 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/proxyAgent.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2015 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 PROXY_AGENT_H +#define PROXY_AGENT_H + + +#import "configAgent.h" + +@interface ProxyAgent : ConfigAgent + +@end + +#endif /* PROXY_AGENT_H */ diff --git a/src/configd/Plugins/IPMonitor/proxyAgent.m b/src/configd/Plugins/IPMonitor/proxyAgent.m new file mode 100644 index 000000000..96f17e6b4 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/proxyAgent.m @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015, 2016 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@ + */ + +#import "configAgent.h" + +@interface ProxyAgent:ConfigAgent + +@property (nonatomic) AgentType internalAgentType; +@property (nonatomic) NSString *internalAgentName; +@property (nonatomic) AgentSubType internalAgentSubType; + +@end + +@implementation ProxyAgent + +@synthesize agentUUID; +@synthesize agentDescription; + ++ (NSString *)agentType +{ + return @kConfigAgentTypeProxy; +} + +- (instancetype)initWithParameters:(NSDictionary *)parameters +{ + self = [super initWithParameters:parameters]; + if (self) { + NSString *intf = [parameters valueForKey:@kEntityName]; + NSNumber *subType = [parameters valueForKey:@kAgentSubType]; + NSString *type = [[self class] agentType]; + + _internalAgentName = [NSString stringWithFormat:@"%@-%@", type, intf]; + _internalAgentSubType = [subType unsignedIntegerValue]; + _internalAgentType = kAgentTypeProxy; + + agentDescription = _internalAgentName; + agentUUID = [super createUUIDForName:agentDescription]; + if (agentUUID == nil) { + agentUUID = [NSUUID UUID]; + } + } + + return self; +} + +- (AgentType)getAgentType +{ + return _internalAgentType; +} + +- (NSString *)getAgentName +{ + return _internalAgentName; +} + +- (AgentSubType)getAgentSubType +{ + return _internalAgentSubType; +} + +- (NSUUID *)getAgentUUID +{ + return agentUUID; +} + +@end \ No newline at end of file diff --git a/src/configd/Plugins/IPMonitor/routelist_output_filter.sh b/src/configd/Plugins/IPMonitor/routelist_output_filter.sh index 90cb275cc..e53f71ca0 100644 --- a/src/configd/Plugins/IPMonitor/routelist_output_filter.sh +++ b/src/configd/Plugins/IPMonitor/routelist_output_filter.sh @@ -1,9 +1,16 @@ #!/bin/sh sed -e 's/^\(Process:.*\[\)[0-9][0-9]*/\1XXXX/' \ - -e 's/^\(Load Address:.*0x\)[0-9a-f][0-9a-f]*/\1XXXX/' \ + -e 's/^\(Load Address:.*\)[0-9a-f][0-9a-f]*/\10xXXXX/' \ + -e '/^Version:.*/d' \ + -e '/^Analysis Tool:.*/d' \ + -e '/^----$/d' \ -e 's/^\(Parent Process:.*\[\)[0-9][0-9]*/\1XXXX/' \ -e 's/^\(Date\/Time: *\)[0-9].*/\1XXXX/' \ -e '/Process [0-9][0-9]*: [0-9][0-9]* nodes malloced/d' \ -e 's/^\(Process \)[0-9][0-9]*:\(.*\)/\1XXXX\2/' \ -e 's/^\(Path: \)\(.*$\)/\1XXXX/' \ - -e 's/^\(OS Version: \)\(.*$\)/\1XXXX/' + -e 's/^\(OS Version: \)\(.*$\)/\1XXXX/' \ + -e '/^Load Address:.*/d' \ + -e '/^Launch Time:.*/d' \ + -e '/^Physical footprint:.*/d' \ + -e '/^Physical footprint (peak):.*/d' diff --git a/src/configd/Plugins/IPMonitor/serviceIDNumber.c b/src/configd/Plugins/IPMonitor/serviceIDNumber.c new file mode 100644 index 000000000..240748d32 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/serviceIDNumber.c @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2019 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@ + */ + +/* + * serviceID_number.c + * - assigns numbers to serviceID strings + */ + +#include +#include +#include + +#include "serviceIDNumber.h" +#include + +#if TEST_SERVICEID_NUMBER +#include +#endif /* TEST_SERVICEID_NUMBER */ + + +/* dictionary to hold serviceIDNumber: key is the serviceID */ +static CFMutableDictionaryRef S_serviceID_to_number_dict; + +/* dictionary to hold serviceID: key is the serviceIDNumber */ +static CFMutableDictionaryRef S_number_to_serviceID_dict; + +static Boolean +serviceIDNumberEqual(const void * ptr1, const void * ptr2) +{ + return (((serviceIDNumber)ptr1) == ((serviceIDNumber)ptr2)); +} + +static CFStringRef +serviceIDNumberCopyDescription(const void * ptr) +{ + return CFStringCreateWithFormat(NULL, NULL, CFSTR("%ld"), + (serviceIDNumber)ptr); +} + +static CFHashCode +serviceIDNumberHash(const void * ptr) { + return (CFHashCode)((serviceIDNumber)ptr); +} + +static const CFDictionaryValueCallBacks kserviceIDNumberValueCallBacks = { + 0, NULL, NULL, serviceIDNumberCopyDescription, serviceIDNumberEqual +}; + +static const CFDictionaryKeyCallBacks kserviceIDNumberKeyCallBacks = { + 0, NULL, NULL, serviceIDNumberCopyDescription, serviceIDNumberEqual, + serviceIDNumberHash +}; + +/** + ** S_serviceID_numbers + **/ + +__private_extern__ Boolean +serviceIDNumberGetIfPresent(CFStringRef serviceID, serviceIDNumber *sidn) +{ + Boolean has_number; + const void * val; + + has_number = CFDictionaryGetValueIfPresent(S_serviceID_to_number_dict, + serviceID, &val); + if (has_number) { + *sidn = (serviceIDNumber)val; + } + return (has_number); +} + +/* + * Function: serviceIDNumberGet + * Purpose: + * Return the currently assigned serviceIDNumber for the given serviceID. + * If one is already assigned, return that. If one isn't assigned, check + * the next integer value after 'current_sidn', but skip zero. + * If that number is assigned, pick the next one. + */ +static serviceIDNumber S_current_sidn; + +__private_extern__ serviceIDNumber +serviceIDNumberGet(CFStringRef serviceID) +{ + serviceIDNumber sidn; + + if (serviceIDNumberGetIfPresent(serviceID, &sidn)) { + return (sidn); + } + while (1) { + /* assign a number to the serviceID */ + S_current_sidn++; + if (S_current_sidn == kserviceIDNumberZero) { + /* skip zero */ + S_current_sidn++; + } + /* if it's in use, skip to the next value */ + if (CFDictionaryContainsKey(S_number_to_serviceID_dict, + (const void *)S_current_sidn)) { + continue; + } + /* it's not in use, use it */ + sidn = S_current_sidn; + CFDictionarySetValue(S_serviceID_to_number_dict, + serviceID, (const void *)sidn); + CFDictionarySetValue(S_number_to_serviceID_dict, + (const void *)sidn, serviceID); + break; + } + return (sidn); +} + + +__private_extern__ void +serviceIDNumberRemove(CFStringRef serviceID) +{ + const void * val; + + if (CFDictionaryGetValueIfPresent(S_serviceID_to_number_dict, serviceID, + &val)) { +#if TEST_SERVICEID_NUMBER + SCPrint(TRUE, stdout, CFSTR("Removing %@ %ld\n"), + serviceID, (serviceIDNumber)val); +#endif + CFDictionaryRemoveValue(S_serviceID_to_number_dict, serviceID); + CFDictionaryRemoveValue(S_number_to_serviceID_dict, val); + } +} + +__private_extern__ void +serviceIDNumberInit(void) +{ + S_serviceID_to_number_dict + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kserviceIDNumberValueCallBacks); + S_number_to_serviceID_dict + = CFDictionaryCreateMutable(NULL, 0, + &kserviceIDNumberKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); +} + +#if TEST_SERVICEID_NUMBER + +static CFStringRef +my_CFUUIDStringCreate(CFAllocatorRef alloc) +{ + CFUUIDRef uuid; + CFStringRef uuid_str; + + uuid = CFUUIDCreate(alloc); + uuid_str = CFUUIDCreateString(alloc, uuid); + CFRelease(uuid); + return (uuid_str); +} + +int +main() +{ +#define N_LIST 10 + CFStringRef serviceID_list[N_LIST]; + + serviceIDNumberInit(); + for (int i = 0; i < N_LIST; i++) { + CFStringRef serviceID = my_CFUUIDStringCreate(NULL); + serviceIDNumber sidn; + + /* force a collision */ + S_current_sidn = -1; + + sidn = serviceIDNumberGet(serviceID); + SCPrint(TRUE, stdout, CFSTR("%d: %@ %ld\n"), + i, serviceID, sidn); + serviceID_list[i] = serviceID; + + } + for (int i = 0; i < N_LIST; i++) { + CFStringRef serviceID = serviceID_list[i]; + serviceIDNumber sidn; + + if (!serviceIDNumberGetIfPresent(serviceID, &sidn)) { + SCPrint(TRUE, stderr, CFSTR("Failed to find %@\n"), + serviceID); + exit(1); + } + SCPrint(TRUE, stdout, CFSTR("%@ => %ld\n"), serviceID, sidn); + } + { + serviceIDNumber sidn; + + if (serviceIDNumberGetIfPresent(CFSTR("blah"), &sidn)) { + fprintf(stderr, + "Shouldn't have been able to look that up\n"); + exit(1); + } + } + + for (int i = 0; i < N_LIST / 2; i++) { + CFStringRef serviceID = serviceID_list[i]; + serviceIDNumber sidn; + + serviceIDNumberRemove(serviceID); + if (serviceIDNumberGetIfPresent(serviceID, &sidn)) { + SCPrint(TRUE, stderr, + CFSTR("Found %@, but shouldn't have\n"), + serviceID); + exit(1); + } + } + + for (int i = 0; i < N_LIST; i++) { + CFStringRef serviceID = serviceID_list[i]; + serviceIDNumber sidn; + + sidn = serviceIDNumberGet(serviceID); + SCPrint(TRUE, stdout, CFSTR("%d: %@ %ld\n"), + i, serviceID, sidn); + } + exit(0); +} +#endif /* TEST_SERVICEID_NUMBER */ diff --git a/src/configd/Plugins/IPMonitor/serviceIDNumber.h b/src/configd/Plugins/IPMonitor/serviceIDNumber.h new file mode 100644 index 000000000..1d0202198 --- /dev/null +++ b/src/configd/Plugins/IPMonitor/serviceIDNumber.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2019 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@ + */ + +/* + * serviceID_number.h + * - assigns numbers to serviceID strings + */ + +#ifndef _SERVICEID_NUMBER_H +#define _SERVICEID_NUMBER_H + +#include +#include + +/* + * Type: serviceIDNumber + * Purpose: + * A compact way to represent a serviceID that doesn't involve needing + * to worry about memory allocation or large comparisions. + */ +typedef u_long serviceIDNumber, *serviceIDNumberRef; + +/* + * Const: kserviceIDNumberZero + * + * Purpose: + * The zero value for serviceIDNumber. It will never be returned, + * it is a reserved value. + */ +#define kserviceIDNumberZero (serviceIDNumber)(0) + +/* + * Function: serviceIDNumberGetIfPresent + * + * Purpose: + * Returns TRUE and the serviceIDNumber for the given serviceID, if it + * is present, FALSE otherwise. + */ +Boolean +serviceIDNumberGetIfPresent(CFStringRef serviceID, serviceIDNumberRef sidn); + +/* + * Function: serviceIDNumberGet + * + * Purpose: + * Returns a unique serviceIDNumber for the given serviceID. + */ +serviceIDNumber +serviceIDNumberGet(CFStringRef serviceID); + +/* + * Function: serviceIDNumberRemove + * + * Purpose: + * Removes the assigned serviceIDNumber for the given serviceID. + */ +void +serviceIDNumberRemove(CFStringRef serviceID); + + +/* + * Function: serviceIDNumberInit + * + * Purpose: + * Initialize the serviceID number database. + */ +void +serviceIDNumberInit(void); + +#endif /* _SERVICEID_NUMBER_H */ diff --git a/src/configd/Plugins/IPMonitor/set-hostname.c b/src/configd/Plugins/IPMonitor/set-hostname.c index 5003bd15a..b97697ee4 100644 --- a/src/configd/Plugins/IPMonitor/set-hostname.c +++ b/src/configd/Plugins/IPMonitor/set-hostname.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -42,21 +42,24 @@ #include #ifdef MAIN -#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) #else // MAIN #include "ip_plugin.h" #endif // MAIN static SCDynamicStoreRef store = NULL; +static CFRunLoopRef rl = NULL; static CFRunLoopSourceRef rls = NULL; +static dispatch_queue_t queue = NULL; + +static int notify_token = -1; static struct timeval ptrQueryStart; static SCNetworkReachabilityRef ptrTarget = NULL; -static Boolean _verbose = FALSE; - #define HOSTNAME_NOTIFY_KEY "com.apple.system.hostname" +#define SET_HOSTNAME_QUEUE "com.apple.config.set-hostname" CFStringRef copy_dhcp_hostname(CFStringRef serviceID); @@ -76,7 +79,7 @@ set_hostname(CFStringRef hostname) new_name, sizeof(new_name), kCFStringEncodingUTF8) == NULL) { - my_log(LOG_ERR, "could not convert [new] hostname"); + my_log(LOG_NOTICE, "could not convert [new] hostname"); new_name[0] = '\0'; } @@ -212,8 +215,10 @@ ptr_query_stop() return; } + my_log(LOG_INFO, "hostname: ptr query stop"); + SCNetworkReachabilitySetCallback(ptrTarget, NULL, NULL); - SCNetworkReachabilityUnscheduleFromRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + SCNetworkReachabilityUnscheduleFromRunLoop(ptrTarget, rl, kCFRunLoopDefaultMode); CFRelease(ptrTarget); ptrTarget = NULL; @@ -221,21 +226,66 @@ ptr_query_stop() } +/* Return a ptr record if the sharing pref name is a matching FQDN */ +static CFStringRef +hostname_match_full(CFArrayRef hosts, CFIndex count, CFStringRef nameToMatch) +{ + CFIndex i; + CFStringRef matchedHostName = NULL; + + for (i = 0; i < count; i++) { + CFStringRef tempHostName; + + tempHostName = CFArrayGetValueAtIndex(hosts, i); + if (CFStringCompare(tempHostName, nameToMatch, kCFCompareCaseInsensitive) == 0) { + matchedHostName = tempHostName; + break; + } + } + return matchedHostName; +} + + +/* Return a ptr record if the sharing pref name matches DNS record's first label */ +static CFStringRef +hostname_match_first_label(CFArrayRef hosts, CFIndex count, CFStringRef nameToMatch) +{ + CFIndex i; + CFStringRef matchedHostName = NULL; + + for (i = 0; i < count; i++) { + CFArrayRef fqdnSeparated; + CFStringRef tempHostName; + + tempHostName = CFArrayGetValueAtIndex(hosts, i); + fqdnSeparated = CFStringCreateArrayBySeparatingStrings(NULL, tempHostName, CFSTR(".")); + if (fqdnSeparated != NULL) { + CFStringRef firstLabel; + Boolean matchFound; + + firstLabel = CFArrayGetValueAtIndex(fqdnSeparated, 0); + matchFound = (CFStringCompare(firstLabel, nameToMatch, kCFCompareCaseInsensitive) == 0); + CFRelease(fqdnSeparated); + if (matchFound) { + matchedHostName = tempHostName; + break; + } + } + } + return matchedHostName; +} + + static void ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) { +#pragma unused(info) CFStringRef hostname = NULL; struct timeval ptrQueryComplete; struct timeval ptrQueryElapsed; (void) gettimeofday(&ptrQueryComplete, NULL); timersub(&ptrQueryComplete, &ptrQueryStart, &ptrQueryElapsed); - if (_verbose) { - my_log(LOG_DEBUG, "ptr query complete%s (query time = %ld.%3.3d)", - (flags & kSCNetworkReachabilityFlagsReachable) ? "" : ", host not found", - ptrQueryElapsed.tv_sec, - ptrQueryElapsed.tv_usec / 1000); - } // use reverse DNS name, if available @@ -248,38 +298,89 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f */ hosts = SCNetworkReachabilityCopyResolvedAddress(target, &error_num); if (hosts != NULL) { - if (CFArrayGetCount(hosts) > 0) { + CFIndex count = CFArrayGetCount(hosts); + if (count > 0) { + CFStringRef computerName; + CFStringRef localHostName; + + my_log(LOG_INFO, "hostname: ptr query complete (query time = %ld.%3.3d)", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); + + // first, check if ComputerName is dns-clean + computerName = _SCPreferencesCopyComputerName(NULL, NULL); + if (computerName != NULL) { + if (_SC_CFStringIsValidDNSName(computerName)) { + CFRange dotsCheck; + + dotsCheck = CFStringFind(computerName, CFSTR("."), 0); + if (dotsCheck.length == 0) { + hostname = hostname_match_first_label(hosts, count, computerName); + } else { + hostname = hostname_match_full(hosts, count, computerName); + } + } + CFRelease(computerName); + } + + // if no match, check LocalHostName against the first label of FQDN + localHostName = (hostname == NULL) ? SCDynamicStoreCopyLocalHostName(store) : NULL; + if (localHostName != NULL) { + hostname = hostname_match_first_label(hosts, count, localHostName); + CFRelease(localHostName); + } + + // if no match, use the first of the returned names + if (hostname == NULL) { + hostname = CFArrayGetValueAtIndex(hosts, 0); + } - hostname = CFArrayGetValueAtIndex(hosts, 0); - my_log(LOG_DEBUG, "hostname (reverse DNS query) = %@", hostname); + my_log(LOG_INFO, "hostname (reverse DNS query) = %@", hostname); set_hostname(hostname); + } else { + my_log(LOG_INFO, "hostname: ptr query complete w/no hosts (query time = %ld.%3.3d)", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); } CFRelease(hosts); if (hostname != NULL) { goto done; } + } else { + // if kSCNetworkReachabilityFlagsReachable and hosts == NULL + // it means the PTR request has not come back yet + // we must wait for this callback to be called again + my_log(LOG_INFO, "hostname: ptr query reply w/no hosts (query time = %ld.%3.3d)", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); + return; } + } else { + my_log(LOG_INFO, "hostname: ptr query complete, host not found (query time = %ld.%3.3d)", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); } // get local (multicast DNS) name, if available hostname = SCDynamicStoreCopyLocalHostName(store); if (hostname != NULL) { - CFMutableStringRef localName; - - my_log(LOG_DEBUG, "hostname (multicast DNS) = %@", hostname); - localName = CFStringCreateMutableCopy(NULL, 0, hostname); - assert(localName != NULL); - CFStringAppend(localName, CFSTR(".local")); - set_hostname(localName); - CFRelease(localName); + CFMutableStringRef localHostName; + + my_log(LOG_INFO, "hostname (multicast DNS) = %@", hostname); + localHostName = CFStringCreateMutableCopy(NULL, 0, hostname); + assert(localHostName != NULL); + CFStringAppend(localHostName, CFSTR(".local")); + set_hostname(localHostName); + CFRelease(localHostName); CFRelease(hostname); goto done; } // use "localhost" if not other name is available + my_log(LOG_INFO, "hostname (localhost)"); set_hostname(CFSTR("localhost")); done : @@ -287,7 +388,7 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f ptr_query_stop(); #ifdef MAIN - CFRunLoopStop(CFRunLoopGetCurrent()); + CFRunLoopStop(rl); #endif // MAIN return; @@ -330,8 +431,11 @@ ptr_query_start(CFStringRef address) return FALSE; } + my_log(LOG_INFO, "hostname: ptr query start"); + + (void) gettimeofday(&ptrQueryStart, NULL); (void) SCNetworkReachabilitySetCallback(ptrTarget, ptr_query_callback, NULL); - (void) SCNetworkReachabilityScheduleWithRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + (void) SCNetworkReachabilityScheduleWithRunLoop(ptrTarget, rl, kCFRunLoopDefaultMode); return TRUE; } @@ -340,6 +444,8 @@ ptr_query_start(CFStringRef address) static void update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) { +#pragma unused(changedKeys) +#pragma unused(info) CFStringRef address = NULL; CFStringRef hostname = NULL; CFStringRef serviceID = NULL; @@ -354,7 +460,7 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) hostname = copy_prefs_hostname(store); if (hostname != NULL) { - my_log(LOG_DEBUG, "hostname (prefs) = %@", hostname); + my_log(LOG_INFO, "hostname (prefs) = %@", hostname); set_hostname(hostname); goto done; } @@ -370,7 +476,7 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) hostname = copy_dhcp_hostname(serviceID); if (hostname != NULL) { - my_log(LOG_DEBUG, "hostname (DHCP) = %@", hostname); + my_log(LOG_INFO, "hostname (DHCP) = %@", hostname); set_hostname(hostname); goto done; } @@ -379,13 +485,19 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) address = copy_primary_ip(store, serviceID); if (address != NULL) { - Boolean ok; + boolean_t isExpensive; // start reverse DNS query using primary IP address - ok = ptr_query_start(address); - if (ok) { - // if query started - goto done; + // if primary service is not expensive + isExpensive = check_if_service_expensive(serviceID); + if (!isExpensive) { + Boolean ok; + + ok = ptr_query_start(address); + if (ok) { + // if query started + goto done; + } } } @@ -395,14 +507,14 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) hostname = SCDynamicStoreCopyLocalHostName(store); if (hostname != NULL) { - CFMutableStringRef localName; - - my_log(LOG_DEBUG, "hostname (multicast DNS) = %@", hostname); - localName = CFStringCreateMutableCopy(NULL, 0, hostname); - assert(localName != NULL); - CFStringAppend(localName, CFSTR(".local")); - set_hostname(localName); - CFRelease(localName); + CFMutableStringRef localHostName; + + my_log(LOG_INFO, "hostname (multicast DNS) = %@", hostname); + localHostName = CFStringCreateMutableCopy(NULL, 0, hostname); + assert(localHostName != NULL); + CFStringAppend(localHostName, CFSTR(".local")); + set_hostname(localHostName); + CFRelease(localHostName); goto done; } @@ -424,13 +536,13 @@ __private_extern__ void load_hostname(Boolean verbose) { +#pragma unused(verbose) CFStringRef key; CFMutableArrayRef keys = NULL; + dispatch_block_t notify_block; + Boolean ok; CFMutableArrayRef patterns = NULL; - - if (verbose) { - _verbose = TRUE; - } + uint32_t status; /* initialize a few globals */ @@ -442,25 +554,18 @@ load_hostname(Boolean verbose) goto error; } + queue = dispatch_queue_create(SET_HOSTNAME_QUEUE, NULL); + if (queue == NULL) { + my_log(LOG_ERR, + "dispatch_queue_create() failed"); + goto error; + } + /* establish notification keys and patterns */ keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - /* ...watch for primary service / interface changes */ - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetIPv4); - CFArrayAppendValue(keys, key); - CFRelease(key); - - /* ...watch for DNS configuration changes */ - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetDNS); - CFArrayAppendValue(keys, key); - CFRelease(key); - /* ...watch for (per-service) DHCP option changes */ key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainState, @@ -480,31 +585,74 @@ load_hostname(Boolean verbose) CFRelease(key); /* register the keys/patterns */ - if (!SCDynamicStoreSetNotificationKeys(store, keys, patterns)) { + ok = SCDynamicStoreSetNotificationKeys(store, keys, patterns); + CFRelease(keys); + CFRelease(patterns); + if (!ok) { my_log(LOG_ERR, "SCDynamicStoreSetNotificationKeys() failed: %s", SCErrorString(SCError())); goto error; } + rl = CFRunLoopGetCurrent(); rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); - if (!rls) { + if (rls == NULL) { my_log(LOG_ERR, "SCDynamicStoreCreateRunLoopSource() failed: %s", SCErrorString(SCError())); goto error; } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); + CFRunLoopAddSource(rl, rls, kCFRunLoopDefaultMode); + + /* ...watch for primary service/interface and DNS configuration changes */ + notify_block = ^{ + CFArrayRef changes; + CFStringRef key; + + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetDNS); + changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); + (*update_hostname)(store, changes, NULL); + CFRelease(changes); + CFRelease(key); + + return; + }; + status = notify_register_dispatch(_SC_NOTIFY_NETWORK_CHANGE, + ¬ify_token, + queue, + ^(int token){ +#pragma unused(token) + CFRunLoopPerformBlock(rl, + kCFRunLoopDefaultMode, + notify_block); + CFRunLoopWakeUp(rl); + }); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, "notify_register_dispatch() failed: %u", status); + goto error; + } - CFRelease(keys); - CFRelease(patterns); return; error : - if (keys != NULL) CFRelease(keys); - if (patterns != NULL) CFRelease(patterns); - if (store != NULL) CFRelease(store); + if (rls != NULL) { + CFRunLoopRemoveSource(rl, rls, kCFRunLoopDefaultMode); + CFRelease(rls); + rls = NULL; + } + if (store != NULL) { + CFRelease(store); + store = NULL; + } + if (queue != NULL) { + dispatch_release(queue); + queue = NULL; + } + return; } @@ -519,7 +667,6 @@ main(int argc, char **argv) _sc_log = FALSE; if ((argc > 1) && (strcmp(argv[1], "-d") == 0)) { _sc_verbose = TRUE; - _verbose = TRUE; argv++; argc--; } diff --git a/src/configd/Plugins/IPMonitor/smb-configuration.c b/src/configd/Plugins/IPMonitor/smb-configuration.c index f93a62902..2bb434aac 100644 --- a/src/configd/Plugins/IPMonitor/smb-configuration.c +++ b/src/configd/Plugins/IPMonitor/smb-configuration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2014 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -49,31 +49,34 @@ #include // for __CFStringGetInstallationEncodingAndRegion() #include #include -#include // for SCLog(), SCPrint() +#include #ifdef MAIN -#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) #else // MAIN #include "ip_plugin.h" #endif // MAIN -#define HW_MODEL_LEN 64 // Note: must be >= NETBIOS_NAME_LEN (below) +#define HW_MODEL_LEN 64 // Note: must be >= NETBIOS_NAME_LEN (below) -#define NETBIOS_NAME_LEN 16 +#define NETBIOS_NAME_LEN 16 -#define SMB_STARTUP_DELAY 60.0 -#define SMB_DEBOUNCE_DELAY 5.0 +#define SMB_STARTUP_DELAY 60.0 +#define SMB_DEBOUNCE_DELAY 5.0 +#define SMB_CONFIGURATION_QUEUE "com.apple.config.smb-configuration" static SCDynamicStoreRef store = NULL; +static CFRunLoopRef rl = NULL; static CFRunLoopSourceRef rls = NULL; +static dispatch_queue_t queue = NULL; + +static int notify_token = -1; static struct timeval ptrQueryStart; static SCNetworkReachabilityRef ptrTarget = NULL; static CFRunLoopTimerRef timer = NULL; -static Boolean _verbose = FALSE; - static CFAbsoluteTime boottime(void) @@ -103,7 +106,7 @@ static CFStringRef copy_default_name(void) { CFStringRef model; - size_t n; + CFIndex n; CFMutableStringRef str; // get HW model name @@ -450,8 +453,10 @@ ptr_query_stop() return; } + my_log(LOG_INFO, "NetBIOS name: ptr query stop"); + SCNetworkReachabilitySetCallback(ptrTarget, NULL, NULL); - SCNetworkReachabilityUnscheduleFromRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + SCNetworkReachabilityUnscheduleFromRunLoop(ptrTarget, rl, kCFRunLoopDefaultMode); CFRelease(ptrTarget); ptrTarget = NULL; @@ -462,6 +467,7 @@ ptr_query_stop() static void ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) { +#pragma unused(info) CFDictionaryRef dict; CFStringRef name; CFMutableDictionaryRef newDict; @@ -470,12 +476,10 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f (void) gettimeofday(&ptrQueryComplete, NULL); timersub(&ptrQueryComplete, &ptrQueryStart, &ptrQueryElapsed); - if (_verbose) { - my_log(LOG_DEBUG, "ptr query complete%s (query time = %ld.%3.3d)", - (flags & kSCNetworkReachabilityFlagsReachable) ? "" : ", host not found", - ptrQueryElapsed.tv_sec, - ptrQueryElapsed.tv_usec / 1000); - } + my_log(LOG_INFO, "NetBIOS name: ptr query complete%s (query time = %ld.%3.3d)", + (flags & kSCNetworkReachabilityFlagsReachable) ? "" : ", host not found", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); // get network configuration dict = smb_copy_global_configuration(store); @@ -483,7 +487,7 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f // use NetBIOS name from network configuration (if available) name = CFDictionaryGetValue(dict, kSCPropNetSMBNetBIOSName); if ((name != NULL) && _SC_CFStringIsValidNetBIOSName(name)) { - my_log(LOG_DEBUG, "NetBIOS name (network configuration) = %@", name); + my_log(LOG_INFO, "NetBIOS name (network configuration) = %@", name); goto setDict; } @@ -522,7 +526,7 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f } if (name != NULL) { if (_SC_CFStringIsValidNetBIOSName(name)) { - my_log(LOG_DEBUG, "NetBIOS name (reverse DNS query) = %@", name); + my_log(LOG_INFO, "NetBIOS name (reverse DNS query) = %@", name); goto setName; } CFRelease(name); @@ -532,7 +536,7 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f name = SCDynamicStoreCopyLocalHostName(store); if (name != NULL) { if (_SC_CFStringIsValidNetBIOSName(name)) { - my_log(LOG_DEBUG, "NetBIOS name (multicast DNS) = %@", name); + my_log(LOG_INFO, "NetBIOS name (multicast DNS) = %@", name); goto setName; } CFRelease(name); @@ -541,7 +545,7 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f // use "default" name name = copy_default_name(); if (name != NULL) { - my_log(LOG_DEBUG, "NetBIOS name (default) = %@", name); + my_log(LOG_INFO, "NetBIOS name (default) = %@", name); goto setName; } @@ -564,7 +568,7 @@ ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags f ptr_query_stop(); #ifdef MAIN - CFRunLoopStop(CFRunLoopGetCurrent()); + CFRunLoopStop(rl); #endif // MAIN return; @@ -607,16 +611,20 @@ ptr_query_start(CFStringRef address) return FALSE; } + my_log(LOG_INFO, "NetBIOS name: ptr query start"); + + (void) gettimeofday(&ptrQueryStart, NULL); (void) SCNetworkReachabilitySetCallback(ptrTarget, ptr_query_callback, NULL); - (void) SCNetworkReachabilityScheduleWithRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + (void) SCNetworkReachabilityScheduleWithRunLoop(ptrTarget, rl, kCFRunLoopDefaultMode); return TRUE; } static void -smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) +smb_update_configuration(CFRunLoopTimerRef _timer, void *info) { +#pragma unused(_timer) CFStringRef address = NULL; CFDictionaryRef dict; CFStringRef name; @@ -629,7 +637,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) // use NetBIOS name from network configuration (if available) name = CFDictionaryGetValue(dict, kSCPropNetSMBNetBIOSName); if ((name != NULL) && _SC_CFStringIsValidNetBIOSName(name)) { - my_log(LOG_DEBUG, "NetBIOS name (network configuration) = %@", name); + my_log(LOG_INFO, "NetBIOS name (network configuration) = %@", name); goto set; } @@ -662,7 +670,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) if (_SC_CFStringIsValidNetBIOSName(name)) { CFMutableDictionaryRef newDict; - my_log(LOG_DEBUG, "NetBIOS name (multicast DNS) = %@", name); + my_log(LOG_INFO, "NetBIOS name (multicast DNS) = %@", name); newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); CFRelease(dict); @@ -678,7 +686,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) if (name != NULL) { CFMutableDictionaryRef newDict; - my_log(LOG_DEBUG, "NetBIOS name (default) = %@", name); + my_log(LOG_INFO, "NetBIOS name (default) = %@", name); newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); CFRelease(dict); @@ -710,6 +718,8 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) static void configuration_changed(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) { +#pragma unused(changedKeys) +#pragma unused(info) CFRunLoopTimerContext context = { 0, (void *)store, CFRetain, CFRelease, NULL }; CFAbsoluteTime time_boot; CFAbsoluteTime time_now ; @@ -738,7 +748,7 @@ configuration_changed(SCDynamicStoreRef store, CFArrayRef changedKeys, void *inf 0, smb_update_configuration, &context); - CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopDefaultMode); + CFRunLoopAddTimer(rl, timer, kCFRunLoopDefaultMode); return; } @@ -748,15 +758,21 @@ __private_extern__ void load_smb_configuration(Boolean verbose) { +#pragma unused(verbose) CFStringRef key; CFMutableArrayRef keys = NULL; + dispatch_block_t notify_block; + Boolean ok; CFMutableArrayRef patterns = NULL; - - if (verbose) { - _verbose = TRUE; - } + uint32_t status; /* initialize a few globals */ + queue = dispatch_queue_create(SMB_CONFIGURATION_QUEUE, NULL); + if (queue == NULL) { + my_log(LOG_ERR, + "dispatch_queue_create() failed"); + goto error; + } store = SCDynamicStoreCreate(NULL, CFSTR("smb-configuration"), configuration_changed, NULL); if (store == NULL) { @@ -771,20 +787,6 @@ load_smb_configuration(Boolean verbose) keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - /* ...watch for primary service / interface changes */ - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetIPv4); - CFArrayAppendValue(keys, key); - CFRelease(key); - - /* ...watch for DNS configuration changes */ - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetDNS); - CFArrayAppendValue(keys, key); - CFRelease(key); - /* ...watch for SMB configuration changes */ key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, @@ -803,31 +805,74 @@ load_smb_configuration(Boolean verbose) CFRelease(key); /* register the keys/patterns */ - if (!SCDynamicStoreSetNotificationKeys(store, keys, patterns)) { + ok = SCDynamicStoreSetNotificationKeys(store, keys, patterns); + CFRelease(keys); + CFRelease(patterns); + if (!ok) { my_log(LOG_ERR, "SCDynamicStoreSetNotificationKeys() failed: %s", SCErrorString(SCError())); goto error; } + rl = CFRunLoopGetCurrent(); rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); - if (!rls) { + if (rls == NULL) { my_log(LOG_ERR, "SCDynamicStoreCreateRunLoopSource() failed: %s", SCErrorString(SCError())); goto error; } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); + CFRunLoopAddSource(rl, rls, kCFRunLoopDefaultMode); + + /* ...watch for primary service/interface and DNS configuration changes */ + notify_block = ^{ + CFArrayRef changes; + CFStringRef key; + + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetDNS); + changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); + (*configuration_changed)(store, changes, NULL); + CFRelease(changes); + CFRelease(key); + + return; + }; + status = notify_register_dispatch(_SC_NOTIFY_NETWORK_CHANGE, + ¬ify_token, + queue, + ^(int token){ +#pragma unused(token) + CFRunLoopPerformBlock(rl, + kCFRunLoopDefaultMode, + notify_block); + CFRunLoopWakeUp(rl); + }); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, "notify_register_dispatch() failed: %u", status); + goto error; + } - CFRelease(keys); - CFRelease(patterns); return; error : - if (keys != NULL) CFRelease(keys); - if (patterns != NULL) CFRelease(patterns); - if (store != NULL) CFRelease(store); + if (rls != NULL) { + CFRunLoopRemoveSource(rl, rls, kCFRunLoopDefaultMode); + CFRelease(rls); + rls = NULL; + } + if (store != NULL) { + CFRelease(store); + store = NULL; + } + if (queue != NULL) { + dispatch_release(queue); + queue = NULL; + } + return; } @@ -846,7 +891,6 @@ main(int argc, char **argv) _sc_log = FALSE; if ((argc > 1) && (strcmp(argv[1], "-d") == 0)) { _sc_verbose = TRUE; - _verbose = TRUE; argv++; argc--; } diff --git a/src/configd/Plugins/IPMonitor/test_ipv4_routelist_reference.txt b/src/configd/Plugins/IPMonitor/test_ipv4_routelist_reference.txt index 5735e655f..e0e92102d 100644 --- a/src/configd/Plugins/IPMonitor/test_ipv4_routelist_reference.txt +++ b/src/configd/Plugins/IPMonitor/test_ipv4_routelist_reference.txt @@ -1,41 +1,55 @@ =================> RouteList Build 'test1' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.19 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.19 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.19 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.19 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.19 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.19 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.19 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.13 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.13 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -45,43 +59,63 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.13 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.13 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.19 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.19 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.19 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.19 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.19 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.19 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.19 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -91,42 +125,60 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test1': PASSED <================= =================> RouteList Build 'test2' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.13 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.13 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -136,38 +188,56 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.13 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.13 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -177,62 +247,88 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test2': PASSED <================= =================> RouteList Build 'test3' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.13 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.13 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en0 Ifa 192.168.2.10 - 1. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 - 2. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.2.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.2.10 + 3. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 + 4. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.20 - 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 - 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.20 + 3. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 + 4. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 - 1. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 - 2. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 + 3. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 + 4. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -248,58 +344,84 @@ Routes are = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 -} -Adding = { +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +} +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 - 1. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 - 2. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 + 3. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 + 4. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.20 - 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 - 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.20 + 3. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 + 4. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en0 Ifa 192.168.2.10 - 1. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 - 2. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.2.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.2.10 + 3. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 + 4. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.13 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.13 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -315,37 +437,53 @@ Routes are = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test3': PASSED <================= =================> RouteList Build 'test4' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 - 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 4. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 - 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 4. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -356,33 +494,47 @@ Routes are = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 - 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 4. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 - 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 4. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -393,41 +545,57 @@ Routes are = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test4': PASSED <================= =================> RouteList Build 'test5' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 - 1. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 + 2. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 + 3. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 - 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 4. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 - 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 4. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -440,37 +608,55 @@ Routes are = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 -} -Adding = { +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 - 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 4. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.11 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.11 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.12 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.12 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 - 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 4. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 - 1. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 + 2. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 + 3. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -483,195 +669,287 @@ Routes are = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test5': PASSED <================= =================> RouteList Build 'test6' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 1. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 + 2. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 4. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 } -Adding = { - 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] +Adding = { + 0. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] + 1. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] + 2. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Adding = { - 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Adding = { + 0. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] + 1. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] + 2. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +} +Adding = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 1. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 + 2. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 4. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test6': PASSED <================= =================> RouteList Build 'test7' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 1. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 + 2. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 4. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 } -Adding = { - 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] +Adding = { + 0. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] + 1. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] + 2. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Adding = { - 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Adding = { + 0. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] + 1. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] + 2. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +} +Adding = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 1. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 + 2. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 4. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 - 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 - 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test7': PASSED <================= =================> RouteList Build 'test8' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test8': PASSED <================= =================> RouteList Build 'test9' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -681,23 +959,35 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Adding = { + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +} +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -707,27 +997,39 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test9': PASSED <================= =================> RouteList Build 'test10' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -737,23 +1039,35 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Adding = { + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +} +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -763,27 +1077,39 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test10': PASSED <================= =================> RouteList Build 'test11' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -793,23 +1119,35 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Adding = { + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +} +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 - 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 1. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 + 2. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 + 3. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 4. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -819,187 +1157,245 @@ Routes are = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test11': PASSED <================= =================> RouteList Build 'test12' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test12': PASSED <================= =================> RouteList Build 'test13' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test13': PASSED <================= =================> RouteList Build 'test14' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] - 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } routes1 and routes2 are the same =================> RouteList Build 'test14': PASSED <================= =================> RouteList Build 'test15' <================= -Adding = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 [last] +Adding = { + 0. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] } -Routes are = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Routes are = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Adding = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 [last] +Adding = { + 0. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] } -Routes are = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Routes are = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } routes1 and routes2 are the same =================> RouteList Build 'test15': PASSED <================= =================> RouteList Build 'test16' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 - 1. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 2. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 3. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 4. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 5. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 6. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 7. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 8. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 9. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -10. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -11. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -12. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -13. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -14. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -15. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -16. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -17. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -18. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -19. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -20. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -21. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -22. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -23. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -24. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -25. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -26. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -27. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -28. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -29. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -30. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -31. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -32. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -33. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -34. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -35. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -36. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -37. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -38. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -39. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -40. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -41. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -42. Net 17.151.63.82/32 Ifp en0 !Ifp utun0 -43. Net 17.151.63.81/32 Ifp en0 !Ifp utun0 -44. Net 17.151.63.80/32 !Ifp utun0 -45. Net 17.1.0.0/16 !Ifp utun0 -46. Net 17.2.0.0/24 !Ifp utun0 -47. Net 10.0.0.0/24 !Ifp utun0 -} -Routes are = { + 1. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 + 2. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 + 3. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 4. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +21. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +22. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +28. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +29. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +30. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.151.63.82/32 Ifp en0 !Ifp utun0 +45. Net 17.151.63.81/32 Ifp en0 !Ifp utun0 +46. Net 17.151.63.80/32 !Ifp utun0 +47. Net 17.1.0.0/16 !Ifp utun0 +48. Net 17.2.0.0/24 !Ifp utun0 +49. Net 10.0.0.0/24 !Ifp utun0 +} +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -1050,63 +1446,71 @@ Routes are = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 - 1. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 2. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 3. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 4. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 5. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 6. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 7. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 8. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 - 9. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -10. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -11. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -12. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -13. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -14. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -15. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -16. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -17. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -18. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -19. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -20. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -21. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -22. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -23. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -24. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -25. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -26. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -27. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -28. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -29. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -30. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -31. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -32. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -33. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -34. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -35. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -36. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -37. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -38. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -39. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -40. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -41. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -42. Net 17.151.63.82/32 Ifp en0 !Ifp utun0 -43. Net 17.151.63.81/32 Ifp en0 !Ifp utun0 -44. Net 17.151.63.80/32 !Ifp utun0 -45. Net 17.1.0.0/16 !Ifp utun0 -46. Net 17.2.0.0/24 !Ifp utun0 -47. Net 10.0.0.0/24 !Ifp utun0 -} -Adding = { - 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 + 2. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 + 3. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 4. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +21. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +22. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +28. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +29. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +30. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.151.63.82/32 Ifp en0 !Ifp utun0 +45. Net 17.151.63.81/32 Ifp en0 !Ifp utun0 +46. Net 17.151.63.80/32 !Ifp utun0 +47. Net 17.1.0.0/16 !Ifp utun0 +48. Net 17.2.0.0/24 !Ifp utun0 +49. Net 10.0.0.0/24 !Ifp utun0 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -1157,68 +1561,90 @@ Routes are = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test16': PASSED <================= =================> RouteList Build 'test17' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] - 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] - 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] + 3. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 4. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] - 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] - 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 1. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] + 2. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] + 3. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 4. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 - 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 1. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { +Routes are = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } routes1 and routes2 are the same =================> RouteList Build 'test17': PASSED <================= =================> RouteList Build 'test18' <================= -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 - 1. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 - 2. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 - 3. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 - 4. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 - 5. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 - 6. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 - 7. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 - 8. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 - 9. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -10. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -11. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -12. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -13. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -} -Routes are = { + 1. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 + 3. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 + 4. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +12. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +13. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +14. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +15. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +} +Routes are = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -1233,24 +1659,28 @@ Routes are = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } -Adding = { +Adding = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 - 1. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 - 2. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 - 3. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 - 4. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 - 5. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 - 6. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 - 7. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 - 8. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 - 9. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -10. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -11. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -12. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -13. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -} -Routes are = { + 1. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 + 2. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 + 3. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 + 4. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +12. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +13. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +14. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +15. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +} +Routes are = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -1265,12 +1695,14 @@ Routes are = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } routes1 and routes2 are the same =================> RouteList Build 'test18': PASSED <================= =================> Apply 'test1', 'test2' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1280,6 +1712,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1290,7 +1728,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test2') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1300,11 +1744,17 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } =================> Apply 'test1', 'test2' End <================= =================> Apply 'test2', 'test1' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1314,6 +1764,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1324,7 +1780,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test1') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1334,11 +1796,17 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } =================> Apply 'test2', 'test1' End <================= =================> Apply 'test1', 'test3' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1348,6 +1816,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1358,7 +1832,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test3') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -1374,8 +1854,16 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] @@ -1383,10 +1871,12 @@ Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test1', 'test3' End <================= =================> Apply 'test3', 'test1' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -1402,6 +1892,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1418,7 +1914,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test1') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1428,6 +1930,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] @@ -1436,11 +1944,15 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test3', 'test1' End <================= =================> Apply 'test1', 'test4' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1450,6 +1962,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1460,7 +1978,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test4') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -1471,6 +1995,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1481,6 +2009,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -1491,10 +2025,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test1', 'test4' End <================= =================> Apply 'test4', 'test1' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -1505,6 +2043,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -1516,7 +2058,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test1') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1526,6 +2072,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -1537,6 +2089,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1546,10 +2102,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test4', 'test1' End <================= =================> Apply 'test1', 'test5' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1559,6 +2121,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1569,7 +2137,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test5') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -1582,6 +2156,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1592,6 +2172,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -1604,10 +2190,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test1', 'test5' End <================= =================> Apply 'test5', 'test1' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -1620,6 +2212,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -1633,7 +2231,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test1') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1643,6 +2247,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -1656,6 +2266,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1665,10 +2281,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test5', 'test1' End <================= =================> Apply 'test1', 'test6' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1678,6 +2300,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1688,17 +2316,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test6') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1709,42 +2351,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test1', 'test6' End <================= =================> Apply 'test6', 'test1' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test1') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1754,17 +2426,31 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1774,10 +2460,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test6', 'test1' End <================= =================> Apply 'test1', 'test7' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1787,6 +2479,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1797,17 +2495,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test7') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1818,42 +2530,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test1', 'test7' End <================= =================> Apply 'test7', 'test1' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test1') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1863,17 +2605,31 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1883,10 +2639,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test7', 'test1' End <================= =================> Apply 'test1', 'test8' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1896,6 +2658,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1906,27 +2674,43 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test8') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test1', 'test8' End <================= =================> Apply 'test8', 'test1' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1934,7 +2718,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test1') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1944,14 +2732,22 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test8', 'test1' End <================= =================> Apply 'test1', 'test9' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1961,6 +2757,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -1971,7 +2773,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test9') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -1981,6 +2789,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -1988,16 +2802,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] =================> Apply 'test1', 'test9' End <================= =================> Apply 'test9', 'test1' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2007,6 +2829,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -2017,7 +2845,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test1') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2027,6 +2861,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -2034,16 +2874,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test9', 'test1' End <================= =================> Apply 'test1', 'test10' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2053,6 +2901,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2063,7 +2917,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test10') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -2073,6 +2933,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -2080,16 +2946,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test1', 'test10' End <================= =================> Apply 'test10', 'test1' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -2099,6 +2973,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -2109,7 +2989,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test1') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2119,6 +3005,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -2126,16 +3018,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test10', 'test1' End <================= =================> Apply 'test1', 'test11' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2145,6 +3045,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2155,7 +3061,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test11') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -2165,6 +3077,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -2172,16 +3090,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test1', 'test11' End <================= =================> Apply 'test11', 'test1' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -2191,6 +3117,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -2201,7 +3133,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test1') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2211,6 +3149,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -2218,16 +3162,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test11', 'test1' End <================= =================> Apply 'test1', 'test12' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2237,6 +3189,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2247,27 +3205,43 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test12') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test1', 'test12' End <================= =================> Apply 'test12', 'test1' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2275,7 +3249,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test1') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2285,14 +3263,22 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test12', 'test1' End <================= =================> Apply 'test1', 'test13' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2302,6 +3288,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2312,27 +3304,43 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test13') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test1', 'test13' End <================= =================> Apply 'test13', 'test1' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2340,7 +3348,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test1') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2350,14 +3362,22 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test13', 'test1' End <================= =================> Apply 'test1', 'test14' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2367,6 +3387,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2377,10 +3403,18 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test14') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2390,20 +3424,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test1', 'test14' End <================= =================> Apply 'test14', 'test1' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test1') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2413,9 +3459,17 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -2424,10 +3478,16 @@ Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test14', 'test1' End <================= =================> Apply 'test1', 'test15' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2437,6 +3497,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2447,8 +3513,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -2459,15 +3533,27 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test1', 'test15' End <================= =================> Apply 'test15', 'test1' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test1') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2477,8 +3563,16 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -2488,10 +3582,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test15', 'test1' End <================= =================> Apply 'test1', 'test16' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2501,6 +3601,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2511,7 +3617,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test16') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -2562,6 +3674,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2569,6 +3685,10 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -2616,10 +3736,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test1', 'test16' End <================= =================> Apply 'test16', 'test1' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -2670,6 +3792,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2721,7 +3847,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test1') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2731,6 +3861,12 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -2779,16 +3915,22 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test16', 'test1' End <================= =================> Apply 'test1', 'test17' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2798,6 +3940,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2808,13 +3956,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test17') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2822,19 +3980,29 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test1', 'test17' End <================= =================> Apply 'test17', 'test1' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2842,7 +4010,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test1') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2852,20 +4024,32 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test17', 'test1' End <================= =================> Apply 'test1', 'test18' Begin <================= -Old routes ('test1') = = { +Old routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2875,6 +4059,12 @@ Old routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -2885,7 +4075,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test18') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -2900,6 +4096,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -2910,24 +4108,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test1', 'test18' End <================= =================> Apply 'test18', 'test1' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -2942,22 +4148,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test1') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test1') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2967,10 +4177,18 @@ New Routes ('test1') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -2980,10 +4198,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test18', 'test1' End <================= =================> Apply 'test2', 'test3' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -2993,6 +4217,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3003,7 +4233,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test3') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -3019,8 +4255,16 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] @@ -3028,10 +4272,12 @@ Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test2', 'test3' End <================= =================> Apply 'test3', 'test2' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -3047,6 +4293,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3063,7 +4315,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test2') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3073,6 +4331,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] @@ -3081,11 +4345,15 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test3', 'test2' End <================= =================> Apply 'test2', 'test4' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3095,6 +4363,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3105,7 +4379,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test4') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -3116,6 +4396,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3126,6 +4410,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -3136,10 +4426,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test2', 'test4' End <================= =================> Apply 'test4', 'test2' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -3150,6 +4444,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -3161,7 +4459,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test2') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3171,6 +4473,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -3182,6 +4490,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3191,10 +4503,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test4', 'test2' End <================= =================> Apply 'test2', 'test5' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3204,6 +4522,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3214,7 +4538,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test5') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -3227,6 +4557,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3237,6 +4573,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -3249,10 +4591,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test2', 'test5' End <================= =================> Apply 'test5', 'test2' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -3265,6 +4613,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -3278,7 +4632,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test2') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3288,6 +4648,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -3301,6 +4667,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3310,10 +4682,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test5', 'test2' End <================= =================> Apply 'test2', 'test6' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3323,6 +4701,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3333,17 +4717,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test6') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3354,42 +4752,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test2', 'test6' End <================= =================> Apply 'test6', 'test2' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test2') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3399,17 +4827,31 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3419,10 +4861,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test6', 'test2' End <================= =================> Apply 'test2', 'test7' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3432,6 +4880,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3442,17 +4896,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test7') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3463,42 +4931,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test2', 'test7' End <================= =================> Apply 'test7', 'test2' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test2') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3508,17 +5006,31 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3528,10 +5040,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test7', 'test2' End <================= =================> Apply 'test2', 'test8' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3541,6 +5059,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3551,27 +5075,43 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test8') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test2', 'test8' End <================= =================> Apply 'test8', 'test2' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3579,7 +5119,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test2') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3589,14 +5133,22 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test8', 'test2' End <================= =================> Apply 'test2', 'test9' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3606,6 +5158,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3616,7 +5174,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test9') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3626,6 +5190,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3633,16 +5203,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] =================> Apply 'test2', 'test9' End <================= =================> Apply 'test9', 'test2' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3652,6 +5230,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -3662,7 +5246,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test2') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3672,6 +5262,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -3679,16 +5275,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test9', 'test2' End <================= =================> Apply 'test2', 'test10' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3698,6 +5302,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3708,7 +5318,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test10') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -3718,6 +5334,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3725,16 +5347,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test2', 'test10' End <================= =================> Apply 'test10', 'test2' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -3744,6 +5374,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -3754,7 +5390,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test2') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3764,6 +5406,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -3771,16 +5419,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test10', 'test2' End <================= =================> Apply 'test2', 'test11' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3790,6 +5446,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3800,7 +5462,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test11') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -3810,6 +5478,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -3817,16 +5491,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test2', 'test11' End <================= =================> Apply 'test11', 'test2' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -3836,6 +5518,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -3846,7 +5534,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test2') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3856,6 +5550,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -3863,16 +5563,24 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test11', 'test2' End <================= =================> Apply 'test2', 'test12' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3882,6 +5590,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3892,27 +5606,43 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test12') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test2', 'test12' End <================= =================> Apply 'test12', 'test2' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3920,7 +5650,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test2') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3930,14 +5664,22 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test12', 'test2' End <================= =================> Apply 'test2', 'test13' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3947,6 +5689,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3957,27 +5705,43 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test13') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test2', 'test13' End <================= =================> Apply 'test13', 'test2' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -3985,7 +5749,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test2') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -3995,14 +5763,22 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test13', 'test2' End <================= =================> Apply 'test2', 'test14' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4012,6 +5788,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4022,10 +5804,18 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test14') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4035,20 +5825,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test2', 'test14' End <================= =================> Apply 'test14', 'test2' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test2') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4058,9 +5860,17 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -4069,10 +5879,16 @@ Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test14', 'test2' End <================= =================> Apply 'test2', 'test15' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4082,6 +5898,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4092,8 +5914,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4104,15 +5934,27 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test2', 'test15' End <================= =================> Apply 'test15', 'test2' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test2') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4122,8 +5964,16 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4133,10 +5983,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test15', 'test2' End <================= =================> Apply 'test2', 'test16' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4146,6 +6002,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4156,7 +6018,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test16') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -4207,6 +6075,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4214,6 +6086,10 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -4261,10 +6137,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test2', 'test16' End <================= =================> Apply 'test16', 'test2' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -4315,6 +6193,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4366,7 +6248,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test2') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4376,6 +6262,12 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -4424,16 +6316,22 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test16', 'test2' End <================= =================> Apply 'test2', 'test17' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4443,6 +6341,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4453,13 +6357,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test17') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4467,19 +6381,29 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test2', 'test17' End <================= =================> Apply 'test17', 'test2' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4487,7 +6411,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test2') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4497,20 +6425,32 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test17', 'test2' End <================= =================> Apply 'test2', 'test18' Begin <================= -Old routes ('test2') = = { +Old routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4520,6 +6460,12 @@ Old routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4530,7 +6476,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test18') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -4545,6 +6497,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4555,24 +6509,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test2', 'test18' End <================= =================> Apply 'test18', 'test2' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -4587,22 +6549,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test2') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test2') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -4612,10 +6578,18 @@ New Routes ('test2') = = { 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +10. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +13. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4625,10 +6599,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[10]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test18', 'test2' End <================= =================> Apply 'test3', 'test4' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -4644,6 +6624,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4660,7 +6646,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test4') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -4671,6 +6663,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4687,6 +6683,12 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -4697,10 +6699,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test3', 'test4' End <================= =================> Apply 'test4', 'test3' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -4711,6 +6717,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -4722,7 +6732,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test3') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -4738,6 +6752,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -4749,6 +6769,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4764,10 +6788,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test4', 'test3' End <================= =================> Apply 'test3', 'test5' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -4783,6 +6813,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4799,7 +6835,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test5') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -4812,6 +6854,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4828,6 +6876,12 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -4840,10 +6894,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test3', 'test5' End <================= =================> Apply 'test5', 'test3' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -4856,6 +6916,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -4869,7 +6935,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test3') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -4885,6 +6957,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -4898,6 +6976,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4913,10 +6997,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test5', 'test3' End <================= =================> Apply 'test3', 'test6' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -4932,6 +7022,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -4948,17 +7044,31 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test6') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -4975,42 +7085,72 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test3', 'test6' End <================= =================> Apply 'test6', 'test3' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test3') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5026,17 +7166,31 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5052,10 +7206,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test6', 'test3' End <================= =================> Apply 'test3', 'test7' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5071,6 +7231,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5087,17 +7253,31 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test7') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5114,42 +7294,72 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test3', 'test7' End <================= =================> Apply 'test7', 'test3' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test3') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5165,17 +7375,31 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5191,10 +7415,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test7', 'test3' End <================= =================> Apply 'test3', 'test8' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5210,6 +7440,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5226,13 +7462,23 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test8') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 @@ -5243,16 +7489,22 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test3', 'test8' End <================= =================> Apply 'test8', 'test3' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5260,7 +7512,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test3') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5276,6 +7532,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5286,10 +7548,12 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test8', 'test3' End <================= =================> Apply 'test3', 'test9' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5305,6 +7569,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5321,7 +7591,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test9') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -5331,6 +7607,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5345,6 +7627,12 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -5352,10 +7640,16 @@ Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test3', 'test9' End <================= =================> Apply 'test9', 'test3' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -5365,6 +7659,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -5375,7 +7675,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test3') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5391,6 +7697,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -5399,6 +7711,12 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5412,10 +7730,16 @@ Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test9', 'test3' End <================= =================> Apply 'test3', 'test10' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5431,6 +7755,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5447,7 +7777,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test10') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -5457,6 +7793,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5471,6 +7813,12 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -5478,10 +7826,16 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test3', 'test10' End <================= =================> Apply 'test10', 'test3' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -5491,6 +7845,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -5501,7 +7861,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test3') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5517,6 +7883,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -5525,6 +7897,12 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5538,10 +7916,16 @@ Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test10', 'test3' End <================= =================> Apply 'test3', 'test11' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5557,6 +7941,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5573,7 +7963,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test11') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -5583,6 +7979,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5597,6 +7999,12 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -5604,10 +8012,16 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test3', 'test11' End <================= =================> Apply 'test11', 'test3' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -5617,6 +8031,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -5627,7 +8047,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test3') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5643,6 +8069,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -5651,6 +8083,12 @@ Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -5664,10 +8102,16 @@ Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test11', 'test3' End <================= =================> Apply 'test3', 'test12' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5683,6 +8127,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5699,13 +8149,23 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test12') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 @@ -5716,16 +8176,22 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test3', 'test12' End <================= =================> Apply 'test12', 'test3' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5733,7 +8199,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test3') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5749,6 +8219,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5759,10 +8235,12 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test12', 'test3' End <================= =================> Apply 'test3', 'test13' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5778,6 +8256,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5794,13 +8278,23 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test13') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 @@ -5811,16 +8305,22 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test3', 'test13' End <================= =================> Apply 'test13', 'test3' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5828,7 +8328,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test3') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5844,6 +8348,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5854,10 +8364,12 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test13', 'test3' End <================= =================> Apply 'test3', 'test14' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5873,6 +8385,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5889,10 +8407,18 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test14') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5908,20 +8434,32 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test3', 'test14' End <================= =================> Apply 'test14', 'test3' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test3') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5937,9 +8475,17 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 @@ -5954,10 +8500,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test14', 'test3' End <================= =================> Apply 'test3', 'test15' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -5973,6 +8525,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -5989,8 +8547,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -6007,15 +8573,27 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test3', 'test15' End <================= =================> Apply 'test15', 'test3' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test3') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6031,8 +8609,16 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -6048,10 +8634,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test15', 'test3' End <================= =================> Apply 'test3', 'test16' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6067,6 +8659,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -6083,7 +8681,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test16') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -6134,6 +8738,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6147,6 +8755,10 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -6194,10 +8806,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test3', 'test16' End <================= =================> Apply 'test16', 'test3' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -6248,6 +8862,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -6299,7 +8917,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test3') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6315,6 +8937,12 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -6363,6 +8991,8 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 @@ -6375,10 +9005,14 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test16', 'test3' End <================= =================> Apply 'test3', 'test17' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6394,6 +9028,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -6410,13 +9050,23 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test17') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6430,19 +9080,29 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test3', 'test17' End <================= =================> Apply 'test17', 'test3' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -6450,7 +9110,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test3') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6466,10 +9130,18 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 @@ -6482,10 +9154,14 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test17', 'test3' End <================= =================> Apply 'test3', 'test18' Begin <================= -Old routes ('test3') = = { +Old routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6501,6 +9177,12 @@ Old routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -6517,7 +9199,13 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 -New Routes ('test18') = = { +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -6532,6 +9220,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -6548,24 +9238,32 @@ Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Remove old[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test3', 'test18' End <================= =================> Apply 'test18', 'test3' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -6580,22 +9278,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test3') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test3') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] @@ -6611,10 +9313,18 @@ New Routes ('test3') = = { 12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] 13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +15. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +16. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +17. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +18. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +19. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +20. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -6630,10 +9340,16 @@ Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Add new[15]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[16]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[17]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[18]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[19]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[20]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.3.30 [SCOPED] =================> Apply 'test18', 'test3' End <================= =================> Apply 'test4', 'test5' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6644,6 +9360,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -6655,7 +9375,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test5') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6668,15 +9392,27 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] =================> Apply 'test4', 'test5' End <================= =================> Apply 'test5', 'test4' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6689,6 +9425,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -6702,7 +9444,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test4') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6713,15 +9461,25 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 =================> Apply 'test5', 'test4' End <================= =================> Apply 'test4', 'test6' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6732,6 +9490,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -6743,17 +9505,29 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test6') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6765,42 +9539,70 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test4', 'test6' End <================= =================> Apply 'test6', 'test4' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test4') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6811,17 +9613,29 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6832,10 +9646,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test6', 'test4' End <================= =================> Apply 'test4', 'test7' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6846,6 +9664,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -6857,17 +9679,29 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test7') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6879,42 +9713,70 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test4', 'test7' End <================= =================> Apply 'test7', 'test4' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test4') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6925,17 +9787,29 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6946,10 +9820,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test7', 'test4' End <================= =================> Apply 'test4', 'test8' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -6960,6 +9838,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -6971,13 +9853,21 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test8') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -6989,22 +9879,34 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test4', 'test8' End <================= =================> Apply 'test8', 'test4' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -7012,7 +9914,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test4') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7023,6 +9929,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -7030,6 +9940,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7040,10 +9954,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test8', 'test4' End <================= =================> Apply 'test4', 'test9' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7054,6 +9972,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7065,7 +9987,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test9') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -7075,6 +10001,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7084,6 +10016,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -7091,10 +10027,16 @@ Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test4', 'test9' End <================= =================> Apply 'test9', 'test4' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -7104,6 +10046,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -7114,7 +10062,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test4') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7125,6 +10079,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -7133,6 +10091,12 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7141,10 +10105,14 @@ Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test9', 'test4' End <================= =================> Apply 'test4', 'test10' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7155,6 +10123,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7166,7 +10138,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test10') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -7176,6 +10152,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7185,6 +10167,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -7192,10 +10178,16 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test4', 'test10' End <================= =================> Apply 'test10', 'test4' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -7205,6 +10197,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -7215,7 +10213,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test4') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7226,6 +10230,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -7234,6 +10242,12 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7242,10 +10256,14 @@ Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test10', 'test4' End <================= =================> Apply 'test4', 'test11' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7256,6 +10274,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7267,7 +10289,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test11') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -7277,6 +10303,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7286,6 +10318,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -7293,10 +10329,16 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test4', 'test11' End <================= =================> Apply 'test11', 'test4' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -7306,6 +10348,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -7316,7 +10364,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test4') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7327,6 +10381,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -7335,6 +10393,12 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7343,10 +10407,14 @@ Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test11', 'test4' End <================= =================> Apply 'test4', 'test12' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7357,6 +10425,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7368,13 +10440,21 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test12') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7386,22 +10466,34 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test4', 'test12' End <================= =================> Apply 'test12', 'test4' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -7409,7 +10501,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test4') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7420,6 +10516,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -7427,6 +10527,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7437,10 +10541,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test12', 'test4' End <================= =================> Apply 'test4', 'test13' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7451,6 +10559,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7462,13 +10574,21 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test13') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7480,22 +10600,34 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test4', 'test13' End <================= =================> Apply 'test13', 'test4' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -7503,7 +10635,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test4') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7514,6 +10650,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -7521,6 +10661,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7531,10 +10675,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test13', 'test4' End <================= =================> Apply 'test4', 'test14' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7545,6 +10693,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7556,10 +10708,16 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test14') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7569,19 +10727,29 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test4', 'test14' End <================= =================> Apply 'test14', 'test4' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test4') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7592,8 +10760,14 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7602,10 +10776,14 @@ Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test14', 'test4' End <================= =================> Apply 'test4', 'test15' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7616,6 +10794,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7627,8 +10809,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7640,15 +10828,25 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test4', 'test15' End <================= =================> Apply 'test15', 'test4' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test4') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7659,8 +10857,14 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7671,10 +10875,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test15', 'test4' End <================= =================> Apply 'test4', 'test16' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7685,6 +10893,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -7696,7 +10908,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test16') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -7747,6 +10963,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7758,6 +10978,10 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -7808,10 +11032,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test4', 'test16' End <================= =================> Apply 'test16', 'test4' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -7862,6 +11090,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -7913,7 +11145,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test4') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7924,6 +11160,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -7975,6 +11215,10 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -7985,10 +11229,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test16', 'test4' End <================= =================> Apply 'test4', 'test17' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -7999,6 +11247,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -8010,13 +11262,21 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test17') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8028,22 +11288,34 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test4', 'test17' End <================= =================> Apply 'test17', 'test4' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -8051,7 +11323,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test4') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -8062,6 +11338,10 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -8069,6 +11349,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8079,10 +11363,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test17', 'test4' End <================= =================> Apply 'test4', 'test18' Begin <================= -Old routes ('test4') = = { +Old routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -8093,6 +11381,10 @@ Old routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 @@ -8104,7 +11396,11 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test18') = = { +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -8119,6 +11415,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8130,24 +11428,30 @@ Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Remove old[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test4', 'test18' End <================= =================> Apply 'test18', 'test4' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -8162,22 +11466,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test4') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test4') = = { 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 @@ -8188,10 +11496,16 @@ New Routes ('test4') = = { 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +10. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +12. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +13. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8202,10 +11516,14 @@ Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 +Add new[13]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test18', 'test4' End <================= =================> Apply 'test5', 'test6' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8218,6 +11536,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8231,17 +11555,31 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test6') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8255,42 +11593,72 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test5', 'test6' End <================= =================> Apply 'test6', 'test5' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test5') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8303,17 +11671,31 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8326,10 +11708,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test6', 'test5' End <================= =================> Apply 'test5', 'test7' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8342,6 +11730,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8355,17 +11749,31 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test7') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8379,42 +11787,72 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test5', 'test7' End <================= =================> Apply 'test7', 'test5' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test5') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8427,17 +11865,31 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8450,10 +11902,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test7', 'test5' End <================= =================> Apply 'test5', 'test8' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8466,6 +11924,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8479,13 +11943,23 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test8') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8499,22 +11973,36 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test5', 'test8' End <================= =================> Apply 'test8', 'test5' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -8522,7 +12010,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test5') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8535,6 +12027,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -8542,6 +12040,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8554,10 +12056,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test8', 'test5' End <================= =================> Apply 'test5', 'test9' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8570,6 +12078,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8583,7 +12097,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test9') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -8593,6 +12113,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8604,6 +12130,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -8611,10 +12143,16 @@ Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test5', 'test9' End <================= =================> Apply 'test9', 'test5' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -8624,6 +12162,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -8634,7 +12178,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test5') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8647,6 +12197,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -8655,6 +12211,12 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8665,10 +12227,16 @@ Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test9', 'test5' End <================= =================> Apply 'test5', 'test10' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8681,6 +12249,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8694,7 +12268,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test10') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -8704,6 +12284,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8715,6 +12301,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -8722,10 +12314,16 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test5', 'test10' End <================= =================> Apply 'test10', 'test5' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -8735,6 +12333,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -8745,7 +12349,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test5') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8758,6 +12368,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -8766,6 +12382,12 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8776,10 +12398,16 @@ Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test10', 'test5' End <================= =================> Apply 'test5', 'test11' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8792,6 +12420,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8805,7 +12439,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test11') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -8815,6 +12455,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8826,6 +12472,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -8833,10 +12485,16 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test5', 'test11' End <================= =================> Apply 'test11', 'test5' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -8846,6 +12504,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -8856,7 +12520,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test5') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8869,6 +12539,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -8877,6 +12553,12 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8887,10 +12569,16 @@ Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test11', 'test5' End <================= =================> Apply 'test5', 'test12' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8903,6 +12591,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -8916,13 +12610,23 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test12') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -8936,22 +12640,36 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test5', 'test12' End <================= =================> Apply 'test12', 'test5' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -8959,7 +12677,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test5') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -8972,6 +12694,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -8979,6 +12707,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -8991,10 +12723,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test12', 'test5' End <================= =================> Apply 'test5', 'test13' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9007,6 +12745,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -9020,13 +12764,23 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test13') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -9040,22 +12794,36 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test5', 'test13' End <================= =================> Apply 'test13', 'test5' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -9063,7 +12831,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test5') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9076,6 +12848,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -9083,6 +12861,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -9095,10 +12877,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test13', 'test5' End <================= =================> Apply 'test5', 'test14' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9111,6 +12899,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -9124,10 +12918,18 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test14') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -9139,19 +12941,31 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test5', 'test14' End <================= =================> Apply 'test14', 'test5' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test5') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9164,8 +12978,16 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -9176,10 +12998,16 @@ Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test14', 'test5' End <================= =================> Apply 'test5', 'test15' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9192,6 +13020,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -9205,8 +13039,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -9220,15 +13062,27 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test5', 'test15' End <================= =================> Apply 'test15', 'test5' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test5') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9241,8 +13095,16 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -9255,10 +13117,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test15', 'test5' End <================= =================> Apply 'test5', 'test16' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9271,6 +13139,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -9284,7 +13158,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test16') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -9335,6 +13215,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -9348,6 +13232,12 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -9398,10 +13288,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test5', 'test16' End <================= =================> Apply 'test16', 'test5' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -9452,6 +13346,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -9503,7 +13401,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test5') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9516,6 +13418,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -9567,6 +13475,10 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -9579,10 +13491,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test16', 'test5' End <================= =================> Apply 'test5', 'test17' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9595,6 +13513,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -9608,13 +13532,23 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test17') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -9628,22 +13562,36 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test5', 'test17' End <================= =================> Apply 'test17', 'test5' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -9651,7 +13599,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test5') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9664,6 +13616,12 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -9671,6 +13629,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -9683,10 +13645,16 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test17', 'test5' End <================= =================> Apply 'test5', 'test18' Begin <================= -Old routes ('test5') = = { +Old routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9699,6 +13667,12 @@ Old routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 @@ -9712,7 +13686,13 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] -New Routes ('test18') = = { +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -9727,6 +13707,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] @@ -9740,24 +13722,32 @@ Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Remove old[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test5', 'test18' End <================= =================> Apply 'test18', 'test5' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -9772,22 +13762,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test5') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test5') = = { 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] @@ -9800,10 +13794,18 @@ New Routes ('test5') = = { 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] 11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +12. Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +13. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +14. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +15. Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +17. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 @@ -9816,155 +13818,245 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[14]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[15]: Net 255.255.255.255/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] =================> Apply 'test18', 'test5' End <================= =================> Apply 'test6', 'test7' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test7') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] =================> Apply 'test6', 'test7' End <================= =================> Apply 'test7', 'test6' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test6') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] =================> Apply 'test7', 'test6' End <================= =================> Apply 'test6', 'test8' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test8') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test6', 'test8' End <================= =================> Apply 'test8', 'test6' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -9972,17 +14064,29 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test6') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -9990,42 +14094,70 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test8', 'test6' End <================= =================> Apply 'test6', 'test9' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test9') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -10035,17 +14167,31 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -10055,10 +14201,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test6', 'test9' End <================= =================> Apply 'test9', 'test6' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -10068,6 +14220,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -10078,17 +14236,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test6') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -10099,42 +14271,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test9', 'test6' End <================= =================> Apply 'test6', 'test10' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test10') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -10144,17 +14346,31 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -10164,10 +14380,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test6', 'test10' End <================= =================> Apply 'test10', 'test6' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -10177,6 +14399,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -10187,17 +14415,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test6') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -10208,42 +14450,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test10', 'test6' End <================= =================> Apply 'test6', 'test11' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test11') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -10253,17 +14525,31 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -10273,10 +14559,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test6', 'test11' End <================= =================> Apply 'test11', 'test6' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -10286,6 +14578,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -10296,17 +14594,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test6') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -10317,75 +14629,125 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test11', 'test6' End <================= =================> Apply 'test6', 'test12' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test12') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test6', 'test12' End <================= =================> Apply 'test12', 'test6' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -10393,17 +14755,29 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test6') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -10411,75 +14785,123 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test12', 'test6' End <================= =================> Apply 'test6', 'test13' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test13') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test6', 'test13' End <================= =================> Apply 'test13', 'test6' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -10487,17 +14909,29 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test6') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -10505,190 +14939,318 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test13', 'test6' End <================= =================> Apply 'test6', 'test14' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test14') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test6', 'test14' End <================= =================> Apply 'test14', 'test6' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test6') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test14', 'test6' End <================= =================> Apply 'test6', 'test15' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test6', 'test15' End <================= =================> Apply 'test15', 'test6' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test6') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test15', 'test6' End <================= =================> Apply 'test6', 'test16' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test16') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -10739,17 +15301,29 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -10800,10 +15374,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test6', 'test16' End <================= =================> Apply 'test16', 'test6' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -10854,6 +15432,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -10905,17 +15487,29 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test6') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -10967,75 +15561,123 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test16', 'test6' End <================= =================> Apply 'test6', 'test17' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test17') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test6', 'test17' End <================= =================> Apply 'test17', 'test6' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -11043,17 +15685,29 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test6') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -11061,42 +15715,70 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test17', 'test6' End <================= =================> Apply 'test6', 'test18' Begin <================= -Old routes ('test6') = = { +Old routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test18') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -11111,35 +15793,47 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 -Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test6', 'test18' End <================= =================> Apply 'test18', 'test6' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -11154,105 +15848,163 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test6') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test6') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 - 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 - 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +12. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +16. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 -Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test18', 'test6' End <================= =================> Apply 'test7', 'test8' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test8') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test7', 'test8' End <================= =================> Apply 'test8', 'test7' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -11260,17 +16012,29 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test7') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -11278,42 +16042,70 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test8', 'test7' End <================= =================> Apply 'test7', 'test9' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test9') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -11323,17 +16115,31 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -11343,10 +16149,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test7', 'test9' End <================= =================> Apply 'test9', 'test7' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -11356,6 +16168,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -11366,17 +16184,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test7') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -11387,42 +16219,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test9', 'test7' End <================= =================> Apply 'test7', 'test10' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test10') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -11432,17 +16294,31 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -11452,10 +16328,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test7', 'test10' End <================= =================> Apply 'test10', 'test7' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -11465,6 +16347,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -11475,17 +16363,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test7') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -11496,42 +16398,72 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test10', 'test7' End <================= =================> Apply 'test7', 'test11' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test11') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -11541,17 +16473,31 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -11561,10 +16507,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test7', 'test11' End <================= =================> Apply 'test11', 'test7' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -11574,6 +16526,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -11584,17 +16542,31 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test7') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -11605,75 +16577,125 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test11', 'test7' End <================= =================> Apply 'test7', 'test12' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test12') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test7', 'test12' End <================= =================> Apply 'test12', 'test7' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -11681,17 +16703,29 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test7') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -11699,75 +16733,123 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test12', 'test7' End <================= =================> Apply 'test7', 'test13' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test13') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test7', 'test13' End <================= =================> Apply 'test13', 'test7' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -11775,17 +16857,29 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test7') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -11793,190 +16887,318 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test13', 'test7' End <================= =================> Apply 'test7', 'test14' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test14') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test7', 'test14' End <================= =================> Apply 'test14', 'test7' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test7') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test14', 'test7' End <================= =================> Apply 'test7', 'test15' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test7', 'test15' End <================= =================> Apply 'test15', 'test7' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test7') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test15', 'test7' End <================= =================> Apply 'test7', 'test16' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test16') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -12027,17 +17249,29 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -12088,10 +17322,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test7', 'test16' End <================= =================> Apply 'test16', 'test7' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -12142,6 +17380,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12193,17 +17435,29 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test7') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -12255,75 +17509,123 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test16', 'test7' End <================= =================> Apply 'test7', 'test17' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test17') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test7', 'test17' End <================= =================> Apply 'test17', 'test7' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12331,17 +17633,29 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test7') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -12349,42 +17663,70 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test17', 'test7' End <================= =================> Apply 'test7', 'test18' Begin <================= -Old routes ('test7') = = { +Old routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 -} -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +} +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -New Routes ('test18') = = { +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -12399,35 +17741,47 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 -Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 -Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Remove old[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Remove old[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Remove old[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test7', 'test18' End <================= =================> Apply 'test18', 'test7' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -12442,56 +17796,82 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test7') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test7') = = { 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] - 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 - 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 - 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 - 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 3. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 5. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 7. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 8. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 + 9. Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +10. Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +11. Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +12. Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +13. Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +14. Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +15. Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +16. Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +17. Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 -Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +Add new[8]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 -Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] -Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 -Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Add new[9]: Net 169.254.0.0/16 Ifp fw0 Ifa 169.254.11.33 [last] +Add new[10]: Net 224.0.0.0/4 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 224.0.0.0/4 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[12]: Net 224.0.0.0/4 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[13]: Net 224.0.0.0/4 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en2 Ifa 17.255.98.164 +Add new[15]: Net 255.255.255.255/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[16]: Net 255.255.255.255/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[17]: Net 255.255.255.255/32 Ifp fw0 Ifa 169.254.11.33 [last] [SCOPED] =================> Apply 'test18', 'test7' End <================= =================> Apply 'test8', 'test9' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12499,7 +17879,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test9') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -12509,6 +17893,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -12516,6 +17906,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -12525,10 +17919,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test8', 'test9' End <================= =================> Apply 'test9', 'test8' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -12538,6 +17938,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -12548,13 +17954,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test8') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -12565,22 +17981,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test9', 'test8' End <================= =================> Apply 'test8', 'test10' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12588,7 +18018,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test10') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -12598,6 +18032,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -12605,6 +18045,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -12614,10 +18058,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test8', 'test10' End <================= =================> Apply 'test10', 'test8' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -12627,6 +18077,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -12637,13 +18093,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test8') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -12654,22 +18120,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test10', 'test8' End <================= =================> Apply 'test8', 'test11' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12677,7 +18157,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test11') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -12687,6 +18171,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -12694,6 +18184,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -12703,10 +18197,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test8', 'test11' End <================= =================> Apply 'test11', 'test8' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -12716,6 +18216,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -12726,13 +18232,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test8') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -12743,22 +18259,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test11', 'test8' End <================= =================> Apply 'test8', 'test12' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12766,24 +18296,36 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test12') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } =================> Apply 'test8', 'test12' End <================= =================> Apply 'test12', 'test8' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12791,24 +18333,36 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test8') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } =================> Apply 'test12', 'test8' End <================= =================> Apply 'test8', 'test13' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12816,24 +18370,36 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test13') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } =================> Apply 'test8', 'test13' End <================= =================> Apply 'test13', 'test8' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12841,24 +18407,36 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test8') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } =================> Apply 'test13', 'test8' End <================= =================> Apply 'test8', 'test14' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12866,54 +18444,84 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test14') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test8', 'test14' End <================= =================> Apply 'test14', 'test8' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test8') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test14', 'test8' End <================= =================> Apply 'test8', 'test15' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12921,8 +18529,14 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -12930,39 +18544,63 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test8', 'test15' End <================= =================> Apply 'test15', 'test8' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test8') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test15', 'test8' End <================= =================> Apply 'test8', 'test16' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -12970,7 +18608,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test16') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -13021,10 +18663,16 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -13072,10 +18720,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test8', 'test16' End <================= =================> Apply 'test16', 'test8' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -13126,6 +18776,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -13177,13 +18831,21 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test8') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -13232,19 +18894,27 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test16', 'test8' End <================= =================> Apply 'test8', 'test17' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -13252,30 +18922,46 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test17') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test8', 'test17' End <================= =================> Apply 'test17', 'test8' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -13283,30 +18969,46 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test8') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test17', 'test8' End <================= =================> Apply 'test8', 'test18' Begin <================= -Old routes ('test8') = = { +Old routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -13314,7 +19016,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test18') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -13329,6 +19035,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -13336,24 +19044,30 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test8', 'test18' End <================= =================> Apply 'test18', 'test8' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -13368,42 +19082,56 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test8') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test8') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test18', 'test8' End <================= =================> Apply 'test9', 'test10' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13413,6 +19141,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13423,7 +19157,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test10') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -13433,11 +19173,17 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } =================> Apply 'test9', 'test10' End <================= =================> Apply 'test10', 'test9' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -13447,6 +19193,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -13457,7 +19209,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test9') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13467,11 +19225,17 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } =================> Apply 'test10', 'test9' End <================= =================> Apply 'test9', 'test11' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13481,6 +19245,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13491,7 +19261,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test11') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -13501,11 +19277,17 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } =================> Apply 'test9', 'test11' End <================= =================> Apply 'test11', 'test9' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -13515,6 +19297,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -13525,7 +19313,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test9') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13535,11 +19329,17 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } =================> Apply 'test11', 'test9' End <================= =================> Apply 'test9', 'test12' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13549,6 +19349,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13559,13 +19365,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test12') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13576,22 +19392,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test9', 'test12' End <================= =================> Apply 'test12', 'test9' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -13599,7 +19429,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test9') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13609,6 +19443,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -13616,6 +19456,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13625,10 +19469,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test12', 'test9' End <================= =================> Apply 'test9', 'test13' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13638,6 +19488,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13648,13 +19504,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test13') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13665,22 +19531,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test9', 'test13' End <================= =================> Apply 'test13', 'test9' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -13688,7 +19568,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test9') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13698,6 +19582,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -13705,6 +19595,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13714,10 +19608,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test13', 'test9' End <================= =================> Apply 'test9', 'test14' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13727,6 +19627,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13737,10 +19643,18 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test14') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13749,19 +19663,27 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] =================> Apply 'test9', 'test14' End <================= =================> Apply 'test14', 'test9' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test9') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13771,6 +19693,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13780,10 +19708,14 @@ Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test14', 'test9' End <================= =================> Apply 'test9', 'test15' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13793,6 +19725,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13803,8 +19741,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13815,15 +19761,27 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test9', 'test15' End <================= =================> Apply 'test15', 'test9' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test9') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13833,8 +19791,16 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13844,10 +19810,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test15', 'test9' End <================= =================> Apply 'test9', 'test16' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -13857,6 +19829,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -13867,7 +19845,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test16') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -13918,6 +19902,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -13928,6 +19916,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -13978,10 +19972,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test9', 'test16' End <================= =================> Apply 'test16', 'test9' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -14032,6 +20030,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -14083,7 +20085,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test9') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14093,6 +20099,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -14144,6 +20156,10 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -14153,10 +20169,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test16', 'test9' End <================= =================> Apply 'test9', 'test17' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14166,6 +20188,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -14176,13 +20204,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test17') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -14193,22 +20231,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test9', 'test17' End <================= =================> Apply 'test17', 'test9' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -14216,7 +20268,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test9') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14226,6 +20282,12 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -14233,6 +20295,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -14242,10 +20308,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test17', 'test9' End <================= =================> Apply 'test9', 'test18' Begin <================= -Old routes ('test9') = = { +Old routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14255,6 +20327,12 @@ Old routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] @@ -14265,7 +20343,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test18') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -14280,6 +20364,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -14290,24 +20376,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test9', 'test18' End <================= =================> Apply 'test18', 'test9' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -14322,22 +20416,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test9') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test9') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14347,10 +20445,18 @@ New Routes ('test9') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +10. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +11. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +13. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +14. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] @@ -14360,10 +20466,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [first] +Add new[10]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[13]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] =================> Apply 'test18', 'test9' End <================= =================> Apply 'test10', 'test11' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14373,6 +20485,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14383,7 +20501,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test11') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -14393,11 +20517,17 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } =================> Apply 'test10', 'test11' End <================= =================> Apply 'test11', 'test10' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -14407,6 +20537,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14417,7 +20553,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test10') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14427,11 +20569,17 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } =================> Apply 'test11', 'test10' End <================= =================> Apply 'test10', 'test12' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14441,6 +20589,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14451,13 +20605,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test12') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14468,22 +20632,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test10', 'test12' End <================= =================> Apply 'test12', 'test10' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -14491,7 +20669,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test10') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14501,6 +20683,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -14508,6 +20696,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -14517,10 +20709,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test12', 'test10' End <================= =================> Apply 'test10', 'test13' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14530,6 +20728,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14540,13 +20744,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test13') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14557,22 +20771,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test10', 'test13' End <================= =================> Apply 'test13', 'test10' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -14580,7 +20808,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test10') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14590,6 +20822,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -14597,6 +20835,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -14606,10 +20848,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test13', 'test10' End <================= =================> Apply 'test10', 'test14' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14619,6 +20867,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14629,10 +20883,18 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test14') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14641,19 +20903,27 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] =================> Apply 'test10', 'test14' End <================= =================> Apply 'test14', 'test10' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test10') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14663,6 +20933,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14672,10 +20948,14 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test14', 'test10' End <================= =================> Apply 'test10', 'test15' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14685,6 +20965,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14695,8 +20981,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14707,15 +21001,27 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test10', 'test15' End <================= =================> Apply 'test15', 'test10' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test10') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14725,8 +21031,16 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -14736,10 +21050,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test15', 'test10' End <================= =================> Apply 'test10', 'test16' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14749,6 +21069,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -14759,7 +21085,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test16') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -14810,6 +21142,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -14820,6 +21156,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -14870,10 +21212,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test10', 'test16' End <================= =================> Apply 'test16', 'test10' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -14924,6 +21270,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -14975,7 +21325,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test10') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -14985,6 +21339,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -15036,6 +21396,10 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15045,10 +21409,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test16', 'test10' End <================= =================> Apply 'test10', 'test17' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -15058,6 +21428,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15068,13 +21444,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test17') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15085,22 +21471,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test10', 'test17' End <================= =================> Apply 'test17', 'test10' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -15108,7 +21508,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test10') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -15118,6 +21522,12 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -15125,6 +21535,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15134,10 +21548,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test17', 'test10' End <================= =================> Apply 'test10', 'test18' Begin <================= -Old routes ('test10') = = { +Old routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -15147,6 +21567,12 @@ Old routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15157,7 +21583,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test18') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -15172,6 +21604,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15182,24 +21616,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test10', 'test18' End <================= =================> Apply 'test18', 'test10' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -15214,22 +21656,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test10') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test10') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] @@ -15239,10 +21685,18 @@ New Routes ('test10') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15252,10 +21706,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test18', 'test10' End <================= =================> Apply 'test11', 'test12' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15265,6 +21725,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15275,13 +21741,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test12') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15292,22 +21768,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test11', 'test12' End <================= =================> Apply 'test12', 'test11' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -15315,7 +21805,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test11') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15325,6 +21819,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -15332,6 +21832,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15341,10 +21845,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test12', 'test11' End <================= =================> Apply 'test11', 'test13' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15354,6 +21864,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15364,13 +21880,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test13') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15381,22 +21907,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test11', 'test13' End <================= =================> Apply 'test13', 'test11' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -15404,7 +21944,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test11') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15414,6 +21958,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -15421,6 +21971,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15430,10 +21984,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test13', 'test11' End <================= =================> Apply 'test11', 'test14' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15443,6 +22003,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15453,10 +22019,18 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test14') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15465,19 +22039,27 @@ Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] =================> Apply 'test11', 'test14' End <================= =================> Apply 'test14', 'test11' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test11') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15487,6 +22069,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15496,10 +22084,14 @@ Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test14', 'test11' End <================= =================> Apply 'test11', 'test15' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15509,6 +22101,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15519,8 +22117,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15531,15 +22137,27 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test11', 'test15' End <================= =================> Apply 'test15', 'test11' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test11') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15549,8 +22167,16 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15560,10 +22186,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test15', 'test11' End <================= =================> Apply 'test11', 'test16' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15573,6 +22205,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15583,7 +22221,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test16') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -15634,6 +22278,10 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15644,6 +22292,12 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -15694,10 +22348,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test11', 'test16' End <================= =================> Apply 'test16', 'test11' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -15748,6 +22406,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -15799,7 +22461,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test11') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15809,6 +22475,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -15860,6 +22532,10 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15869,10 +22545,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test16', 'test11' End <================= =================> Apply 'test11', 'test17' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15882,6 +22564,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15892,13 +22580,23 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test17') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -15909,22 +22607,36 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test11', 'test17' End <================= =================> Apply 'test17', 'test11' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -15932,7 +22644,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test11') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15942,6 +22658,12 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -15949,6 +22671,10 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -15958,10 +22684,16 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test17', 'test11' End <================= =================> Apply 'test11', 'test18' Begin <================= -Old routes ('test11') = = { +Old routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -15971,6 +22703,12 @@ Old routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 @@ -15981,7 +22719,13 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 -New Routes ('test18') = = { +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -15996,6 +22740,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] @@ -16006,24 +22752,32 @@ Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Remove old[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Remove old[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test11', 'test18' End <================= =================> Apply 'test18', 'test11' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -16038,22 +22792,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test11') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test11') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] @@ -16063,10 +22821,18 @@ New Routes ('test11') = = { 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 + 9. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +10. Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +11. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +12. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +13. Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +14. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 @@ -16076,16 +22842,26 @@ Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 +Add new[10]: Net 224.0.0.0/4 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[11]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[12]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 +Add new[13]: Net 255.255.255.255/32 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] =================> Apply 'test18', 'test11' End <================= =================> Apply 'test12', 'test13' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16093,24 +22869,36 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test13') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } =================> Apply 'test12', 'test13' End <================= =================> Apply 'test13', 'test12' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16118,24 +22906,36 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test12') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } =================> Apply 'test13', 'test12' End <================= =================> Apply 'test12', 'test14' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16143,54 +22943,84 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test14') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test12', 'test14' End <================= =================> Apply 'test14', 'test12' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test12') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test14', 'test12' End <================= =================> Apply 'test12', 'test15' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16198,8 +23028,14 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -16207,39 +23043,63 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test12', 'test15' End <================= =================> Apply 'test15', 'test12' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test12') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test15', 'test12' End <================= =================> Apply 'test12', 'test16' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16247,7 +23107,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test16') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -16298,10 +23162,16 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -16349,10 +23219,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test12', 'test16' End <================= =================> Apply 'test16', 'test12' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -16403,6 +23275,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16454,13 +23330,21 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test12') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -16509,19 +23393,27 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test16', 'test12' End <================= =================> Apply 'test12', 'test17' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16529,30 +23421,46 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test17') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test12', 'test17' End <================= =================> Apply 'test17', 'test12' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16560,30 +23468,46 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test12') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test17', 'test12' End <================= =================> Apply 'test12', 'test18' Begin <================= -Old routes ('test12') = = { +Old routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16591,7 +23515,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] -New Routes ('test18') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -16606,6 +23534,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] @@ -16613,24 +23543,30 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test12', 'test18' End <================= =================> Apply 'test18', 'test12' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -16645,48 +23581,66 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test12') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test12') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] =================> Apply 'test18', 'test12' End <================= =================> Apply 'test13', 'test14' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16694,54 +23648,84 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test14') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test13', 'test14' End <================= =================> Apply 'test14', 'test13' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test13') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test14', 'test13' End <================= =================> Apply 'test13', 'test15' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16749,8 +23733,14 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -16758,39 +23748,63 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test13', 'test15' End <================= =================> Apply 'test15', 'test13' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test13') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test15', 'test13' End <================= =================> Apply 'test13', 'test16' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -16798,7 +23812,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test16') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -16849,10 +23867,16 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -16900,10 +23924,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test13', 'test16' End <================= =================> Apply 'test16', 'test13' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -16954,6 +23980,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17005,13 +24035,21 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test13') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -17060,19 +24098,27 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test16', 'test13' End <================= =================> Apply 'test13', 'test17' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17080,30 +24126,46 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test17') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test13', 'test17' End <================= =================> Apply 'test17', 'test13' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17111,30 +24173,46 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test13') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test17', 'test13' End <================= =================> Apply 'test13', 'test18' Begin <================= -Old routes ('test13') = = { +Old routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17142,7 +24220,11 @@ Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] -New Routes ('test18') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -17157,6 +24239,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] @@ -17164,24 +24248,30 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test13', 'test18' End <================= =================> Apply 'test18', 'test13' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -17196,84 +24286,122 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test13') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test13') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] =================> Apply 'test18', 'test13' End <================= =================> Apply 'test14', 'test15' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test14', 'test15' End <================= =================> Apply 'test15', 'test14' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test14') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test15', 'test14' End <================= =================> Apply 'test14', 'test16' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test16') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -17324,10 +24452,16 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -17378,10 +24512,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test14', 'test16' End <================= =================> Apply 'test16', 'test14' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -17432,6 +24570,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17483,10 +24625,16 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test14') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -17538,47 +24686,71 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test16', 'test14' End <================= =================> Apply 'test14', 'test17' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test17') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test14', 'test17' End <================= =================> Apply 'test17', 'test14' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17586,10 +24758,16 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test14') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -17597,21 +24775,31 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test17', 'test14' End <================= =================> Apply 'test14', 'test18' Begin <================= -Old routes ('test14') = = { +Old routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] -New Routes ('test18') = = { +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -17626,28 +24814,34 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test14', 'test18' End <================= =================> Apply 'test18', 'test14' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -17662,40 +24856,54 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test14') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test14') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] + 3. Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] + 4. Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 224.0.0.0/4 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 255.255.255.255/32 Ifp en1 Ifa 10.0.0.20 [last] =================> Apply 'test18', 'test14' End <================= =================> Apply 'test15', 'test16' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test16') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -17746,8 +24954,14 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -17798,10 +25012,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test15', 'test16' End <================= =================> Apply 'test16', 'test15' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -17852,6 +25070,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17903,8 +25125,14 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -17956,39 +25184,63 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test16', 'test15' End <================= =================> Apply 'test15', 'test17' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test17') = = { +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] -} -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +} +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test15', 'test17' End <================= =================> Apply 'test17', 'test15' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -17996,8 +25248,14 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -18005,15 +25263,25 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test17', 'test15' End <================= =================> Apply 'test15', 'test18' Begin <================= -Old routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -} -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 -New Routes ('test18') = = { +Old routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +} +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -18028,26 +25296,32 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } -Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Remove old[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test15', 'test18' End <================= =================> Apply 'test18', 'test15' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -18062,32 +25336,42 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test15') = = { - 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test15') = = { + 0. Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] + 1. Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] + 2. Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 -Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 169.254.0.0/16 Ifp en0 Ifa 169.254.22.44 [last] +Add new[1]: Net 224.0.0.0/4 Ifp en0 Ifa 169.254.22.44 [last] +Add new[2]: Net 255.255.255.255/32 Ifp en0 Ifa 169.254.22.44 [last] =================> Apply 'test18', 'test15' End <================= =================> Apply 'test16', 'test17' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -18138,6 +25422,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -18189,13 +25477,21 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test17') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -18244,19 +25540,27 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test16', 'test17' End <================= =================> Apply 'test17', 'test16' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -18264,7 +25568,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test16') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -18315,10 +25623,16 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 @@ -18366,10 +25680,12 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test17', 'test16' End <================= =================> Apply 'test16', 'test18' Begin <================= -Old routes ('test16') = = { +Old routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -18420,6 +25736,10 @@ Old routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -18471,7 +25791,11 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 -New Routes ('test18') = = { +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -18486,6 +25810,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -18537,24 +25863,30 @@ Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test16', 'test18' End <================= =================> Apply 'test18', 'test16' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -18569,22 +25901,26 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test16') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test16') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 @@ -18635,10 +25971,16 @@ New Routes ('test16') = = { 47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +50. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +51. Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +52. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +53. Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] @@ -18689,16 +26031,24 @@ Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[50]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[51]: Net 224.0.0.0/4 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[52]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[53]: Net 255.255.255.255/32 Ifp utun0 Ifa 17.153.46.24 [SCOPED] =================> Apply 'test18', 'test16' End <================= =================> Apply 'test17', 'test18' Begin <================= -Old routes ('test17') = = { +Old routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 @@ -18706,7 +26056,11 @@ Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] -New Routes ('test18') = = { +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +New Routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -18721,6 +26075,8 @@ New Routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] @@ -18728,24 +26084,30 @@ Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Remove old[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Remove old[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Remove old[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 =================> Apply 'test17', 'test18' End <================= =================> Apply 'test18', 'test17' Begin <================= -Old routes ('test18') = = { +Old routes ('test18') = = { 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 @@ -18760,52 +26122,67 @@ Old routes ('test18') = = { 11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +14. Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +15. Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 } Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 -IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 -New Routes ('test17') = = { +Add new[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Add new[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 +New Routes ('test17') = = { 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] + 6. Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 + 7. Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] + 8. Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 + 9. Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] } Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Remove old[14]: Net 224.0.0.0/4 Ifp en0 Ifa 192.168.130.16 +Remove old[15]: Net 255.255.255.255/32 Ifp en0 Ifa 192.168.130.16 Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 224.0.0.0/4 Ifp en0 Ifa 10.0.0.10 +Add new[7]: Net 224.0.0.0/4 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] +Add new[8]: Net 255.255.255.255/32 Ifp en0 Ifa 10.0.0.10 +Add new[9]: Net 255.255.255.255/32 Ifp en1 Ifa 192.168.2.50 [last] [SCOPED] =================> Apply 'test18', 'test17' End <================= Checking for leaks Process: test_ipv4_routelist [XXXX] Path: XXXX -Load Address: 0xXXXX Identifier: test_ipv4_routelist -Version: 0 Code Type: X86-64 Parent Process: sh [XXXX] Date/Time: XXXX OS Version: XXXX Report Version: 7 +Analysis Tool Version: Xcode 11.0 (11M275m) -leaks Report Version: 2.0 + +leaks Report Version: 4.0 Process XXXX 0 leaks for 0 total leaked bytes. + diff --git a/src/configd/Plugins/IPMonitor/test_ipv6_routelist_reference.txt b/src/configd/Plugins/IPMonitor/test_ipv6_routelist_reference.txt index 4a7c27d58..34fb3308f 100644 --- a/src/configd/Plugins/IPMonitor/test_ipv6_routelist_reference.txt +++ b/src/configd/Plugins/IPMonitor/test_ipv6_routelist_reference.txt @@ -579,17 +579,17 @@ New Routes ('test4') = = { !Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] !Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] !Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 =================> Apply 'test1', 'test4' End <================= =================> Apply 'test4', 'test1' Begin <================= @@ -618,17 +618,17 @@ Old routes ('test4') = = { !Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] !Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] !Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 New Routes ('test1') = = { 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] @@ -870,17 +870,17 @@ New Routes ('test4') = = { !Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] !Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] !Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 =================> Apply 'test2', 'test4' End <================= =================> Apply 'test4', 'test2' Begin <================= @@ -909,17 +909,17 @@ Old routes ('test4') = = { !Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] !Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] !Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 New Routes ('test2') = = { 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] @@ -1081,17 +1081,17 @@ New Routes ('test4') = = { !Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] !Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] !Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 =================> Apply 'test3', 'test4' End <================= =================> Apply 'test4', 'test3' Begin <================= @@ -1120,17 +1120,17 @@ Old routes ('test4') = = { !Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] !Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] !Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 New Routes ('test3') = = { 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] @@ -1275,17 +1275,17 @@ Old routes ('test4') = = { !Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] !Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] !Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 New Routes ('test5') = = { 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] @@ -1370,31 +1370,32 @@ Remove old[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun Remove old[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 !Remove old[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] !Remove old[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] -IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 -IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 =================> Apply 'test5', 'test4' End <================= Checking for leaks Process: test_ipv6_routelist [XXXX] Path: XXXX -Load Address: 0xXXXX Identifier: test_ipv6_routelist -Version: 0 Code Type: X86-64 Parent Process: sh [XXXX] Date/Time: XXXX OS Version: XXXX Report Version: 7 +Analysis Tool Version: Xcode 11.0 (11M275m) -leaks Report Version: 2.0 + +leaks Report Version: 4.0 Process XXXX 0 leaks for 0 total leaked bytes. + diff --git a/src/configd/Plugins/InterfaceNamer/Info.plist b/src/configd/Plugins/InterfaceNamer/Info.plist index 69e28dbed..d354d5a3e 100644 --- a/src/configd/Plugins/InterfaceNamer/Info.plist +++ b/src/configd/Plugins/InterfaceNamer/Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable InterfaceNamer CFBundleIdentifier - com.apple.SystemConfiguration.InterfaceNamer + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,10 +17,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 diff --git a/src/configd/Plugins/InterfaceNamer/ifnamer.c b/src/configd/Plugins/InterfaceNamer/ifnamer.c index faa4a06c0..010f3f845 100644 --- a/src/configd/Plugins/InterfaceNamer/ifnamer.c +++ b/src/configd/Plugins/InterfaceNamer/ifnamer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2014 Apple Inc. All rights reserved. + * Copyright (c) 2001-2019 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 @@ -70,7 +75,6 @@ #include #include #include -#include #include @@ -78,11 +82,17 @@ #include #include -#include // for SCLog(), SCPrint() +#include #include +#include "SCNetworkConfigurationInternal.h" +#include "plugin_shared.h" +#if !TARGET_OS_IPHONE +#include "InterfaceNamerControlPrefs.h" +#endif // !TARGET_OS_IPHONE #include #include +#include #include #include #include @@ -104,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) @@ -115,7 +126,7 @@ enum { #define WAIT_STACK_TIMEOUT_DEFAULT 300.0 #define WAIT_QUIET_TIMEOUT_KEY "WaitQuietTimeout" -#define WAIT_QUIET_TIMEOUT_DEFAULT 60.0 +#define WAIT_QUIET_TIMEOUT_DEFAULT 240.0 /* * S_connect @@ -130,12 +141,6 @@ static io_connect_t S_connect = MACH_PORT_NULL; */ static CFMutableArrayRef S_dblist = NULL; -/* - * S_debug - * A boolean that enables additional logging. - */ -static boolean_t S_debug = FALSE; - /* * S_iflist * An array of SCNetworkInterface's representing the @@ -150,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 @@ -157,6 +172,14 @@ static io_iterator_t S_iter = MACH_PORT_NULL; */ static IONotificationPortRef S_notify = NULL; +/* + * S_preconfigured + * An array of CFData(WatchedInfo) objects representing those + * pre-configured interfaces that have been connected to the + * system. + */ +static CFMutableArrayRef S_preconfigured = NULL; + /* S_prev_active_list * An array of CFDictionary's representing the previously * named interfaces. @@ -186,6 +209,28 @@ 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; + +/* + * + * Note: this global must only be updated on trustRequired_queue() + */ +static CFIndex S_trustedHostCount = 0; + +/* + * 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 @@ -202,15 +247,6 @@ static CFRunLoopTimerRef S_timer = NULL; static double S_stack_timeout = WAIT_STACK_TIMEOUT_DEFAULT; static double S_quiet_timeout = WAIT_QUIET_TIMEOUT_DEFAULT; -#if !TARGET_OS_EMBEDDED -/* - * S_vproc_transaction - * The vproc transaction used to keep launchd from sending us - * a SIGKILL before we've had a chance to set the platform UUID - */ -vproc_transaction_t S_vproc_transaction = NULL; -#endif // !TARGET_OS_EMBEDDED - /* * Virtual network interface configuration * S_prefs : SCPreferences to configuration @@ -223,6 +259,23 @@ static CFArrayRef S_bonds = NULL; static CFArrayRef S_bridges = NULL; static CFArrayRef S_vlans = NULL; +/* + * Logging + */ +__private_extern__ +os_log_t +__log_InterfaceNamer(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "InterfaceNamer"); + } + + return log; +} + + static void addTimestamp(CFMutableDictionaryRef dict, CFStringRef key) { @@ -242,6 +295,7 @@ addTimestamp(CFMutableDictionaryRef dict, CFStringRef key) static CFComparisonResult if_unit_compare(const void *val1, const void *val2, void *context) { +#pragma unused(context) CFComparisonResult res; CFNumberRef type1; CFNumberRef type2; @@ -263,21 +317,6 @@ if_unit_compare(const void *val1, const void *val2, void *context) return (CFNumberCompare(unit1, unit2, NULL)); } -static void -reportIssue(const char *signature, CFStringRef issue) -{ - asl_object_t m; - - m = asl_new(ASL_TYPE_MSG); - asl_set(m, "com.apple.message.domain", "com.apple.SystemConfiguration." MY_PLUGIN_NAME); - asl_set(m, "com.apple.message.signature", signature); - asl_set(m, "com.apple.message.result", "failure"); - SCLOG(NULL, m, ~ASL_LEVEL_ERR, CFSTR("%s\n%@"), signature, issue); - asl_release(m); - - return; -} - static void writeInterfaceList(CFArrayRef if_list) { @@ -290,11 +329,9 @@ 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) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesCreate failed, %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesCreate() failed: %s", SCErrorString(SCError())); return; } @@ -309,7 +346,6 @@ writeInterfaceList(CFArrayRef if_list) // if new hardware if ((old_model != NULL) && (cur_list != NULL)) { CFStringRef history; - CFStringRef issue; // if interface list was created on other hardware history = CFStringCreateWithFormat(NULL, NULL, @@ -319,40 +355,22 @@ writeInterfaceList(CFArrayRef if_list) SCPreferencesSetValue(prefs, history, cur_list); CFRelease(history); - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": Hardware model changed\n" - MY_PLUGIN_NAME ": created on \"%@\"\n" - MY_PLUGIN_NAME ": now on \"%@\""), - old_model, - new_model); - - issue = CFStringCreateWithFormat(NULL, NULL, - CFSTR("%@ --> %@"), - old_model, - new_model); - reportIssue("Hardware model changed", issue); - CFRelease(issue); - } - - if (!SCPreferencesSetValue(prefs, MODEL, new_model)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesSetValue failed, %s"), - SCErrorString(SCError())); - goto done; + SC_log(LOG_NOTICE, "Hardware model changed\n" + " created on \"%@\"\n" + " now on \"%@\"", + old_model, + new_model); } - } - if (!SCPreferencesSetValue(prefs, INTERFACES, if_list)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesSetValue failed, %s"), - SCErrorString(SCError())); - goto done; + SCPreferencesSetValue(prefs, MODEL, new_model); } + SCPreferencesSetValue(prefs, INTERFACES, if_list); + if (!SCPreferencesCommitChanges(prefs)) { - SCLog((SCError() != EROFS), LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesCommitChanges failed, %s"), - SCErrorString(SCError())); + if (SCError() != EROFS) { + SC_log(LOG_NOTICE, "SCPreferencesCommitChanges() failed: %s", SCErrorString(SCError())); + } goto done; } @@ -362,6 +380,41 @@ done: return; } +static CFPropertyListRef +restoreNIPrefsFromBackup(SCPreferencesRef prefs, CFStringRef current_model) +{ + CFPropertyListRef if_list; + CFStringRef key; + + key = CFStringCreateWithFormat(NULL, 0, CFSTR("%@:%@"), INTERFACES, current_model); + if_list = SCPreferencesGetValue(prefs, key); + if_list = isA_CFArray(if_list); + if (if_list != NULL) { + /* Write the previously backed up Interface list for this hardware */ + writeInterfaceList(if_list); + + /* Synchronize the prefs */ + SCPreferencesSynchronize(prefs); + + /* Re-fetch the interface list */ + if_list = SCPreferencesGetValue(prefs, INTERFACES); + if_list = isA_CFArray(if_list); + if (if_list != NULL) { + /* We do not need the old interface list any more */ + SCPreferencesRemoveValue(prefs, key); + if (!SCPreferencesCommitChanges(prefs)) { + if (SCError() != EROFS) { + SC_log(LOG_NOTICE, "SCPreferencesCommitChanges() failed: %s", SCErrorString(SCError())); + } + if_list = NULL; + } + } + } + + CFRelease(key); + return if_list; +} + static CF_RETURNS_RETAINED CFMutableArrayRef readInterfaceList() { @@ -370,11 +423,9 @@ readInterfaceList() CFMutableArrayRef plist = NULL; SCPreferencesRef prefs = NULL; - prefs = SCPreferencesCreate(NULL, MY_PLUGIN_ID, NETWORK_INTERFACES_PREFS); - if (!prefs) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesCreate failed, %s"), - SCErrorString(SCError())); + 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); } @@ -387,8 +438,9 @@ readInterfaceList() new_model = _SC_hw_model(FALSE); if (!_SC_CFEqual(old_model, new_model)) { - // if interface list was created on other hardware - if_list = NULL; + /* if interface list was created on other hardware, + Restore if a backup interface list is present */ + if_list = restoreNIPrefsFromBackup(prefs, new_model); } } @@ -448,13 +500,15 @@ previouslyActiveInterfaces() return active; } +static void +updateInterfaces(void); + static void 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); @@ -483,9 +537,8 @@ updateBondInterfaceConfiguration(SCPreferencesRef prefs) S_bonds = interfaces; if (!_SCBondInterfaceUpdateConfiguration(prefs)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": _SCBondInterfaceUpdateConfiguration failed, %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "_SCBondInterfaceUpdateConfiguration() failed: %s", + SCErrorString(SCError())); } return; @@ -513,9 +566,8 @@ updateBridgeInterfaceConfiguration(SCPreferencesRef prefs) S_bridges = interfaces; if (!_SCBridgeInterfaceUpdateConfiguration(prefs)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": _SCBridgeInterfaceUpdateConfiguration failed, %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "_SCBridgeInterfaceUpdateConfiguration() failed: %s", + SCErrorString(SCError())); } return; @@ -542,9 +594,8 @@ updateVLANInterfaceConfiguration(SCPreferencesRef prefs) S_vlans = interfaces; if (!_SCVLANInterfaceUpdateConfiguration(prefs)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": _SCVLANInterfaceUpdateConfiguration failed, %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "_SCVLANInterfaceUpdateConfiguration() failed: %s", + SCErrorString(SCError())); } return; @@ -552,9 +603,10 @@ updateVLANInterfaceConfiguration(SCPreferencesRef prefs) static void updateVirtualNetworkInterfaceConfiguration(SCPreferencesRef prefs, - SCPreferencesNotification notificationType, + SCPreferencesNotification notificationType, void *info) { +#pragma unused(info) if ((notificationType & kSCPreferencesNotificationApply) != kSCPreferencesNotificationApply) { return; } @@ -584,17 +636,16 @@ updateVirtualNetworkInterfaceConfiguration(SCPreferencesRef prefs, // we are finished with current prefs, wait for changes SCPreferencesSynchronize(prefs); + return; } -#if !TARGET_OS_EMBEDDED - -#define BT_PAN_NAME "Bluetooth PAN" -#define BT_PAN_MAC BT_PAN_NAME " (MAC)" +#if TARGET_OS_OSX static void updateBTPANInformation(const void *value, void *context) { +#pragma unused(context) CFDataRef addr; CFDictionaryRef dict = (CFDictionaryRef)value; CFStringRef if_name; @@ -619,19 +670,19 @@ updateBTPANInformation(const void *value, void *context) return; } - CFDictionaryAddValue(S_state, CFSTR("_" BT_PAN_NAME "_"), if_name); + CFDictionaryAddValue(S_state, kInterfaceNamerKey_BT_PAN_Name, if_name); addr = CFDictionaryGetValue(dict, CFSTR(kIOMACAddress)); if (isA_CFData(addr)) { - CFDictionaryAddValue(S_state, CFSTR("_" BT_PAN_MAC "_"), addr); + CFDictionaryAddValue(S_state, kInterfaceNamerKey_BT_PAN_Mac, addr); } return; } -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX static CFDictionaryRef -createInterfaceDict(SCNetworkInterfaceRef interface) +createInterfaceDict(SCNetworkInterfaceRef interface, CFArrayRef matchingMACs) { CFMutableDictionaryRef new_if; CFTypeRef val; @@ -688,6 +739,10 @@ createInterfaceDict(SCNetworkInterfaceRef interface) CFDictionarySetValue(new_if, CFSTR(kSCNetworkInterfaceActive), kCFBooleanTrue); + if (matchingMACs != NULL) { + CFDictionarySetValue(new_if, CFSTR(kSCNetworkInterfaceMatchingMACs), matchingMACs); + } + return new_if; } @@ -930,15 +985,13 @@ 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) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOMasterPort returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOMasterPort returned 0x%x", kr); goto error; } @@ -1090,14 +1143,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); @@ -1105,7 +1159,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)) { @@ -1133,9 +1236,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; @@ -1144,34 +1247,49 @@ 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); - if (n > 1) { - CFStringRef issue; + insertInterface(S_dblist, interface, db_dict_match); + if (db_dict_match != NULL) { + CFRelease(db_dict_match); + } - issue = CFStringCreateWithFormat(NULL, NULL, - CFSTR("n = %d, %@"), - n, - interface); - reportIssue("Multiple interfaces updated", issue); - CFRelease(issue); + if (n > 1) { + SC_log(LOG_ERR, "Multiple interfaces updated (n = %d, %@)", n, interface); } return; @@ -1264,9 +1382,7 @@ copyInterfaceForIORegistryEntryID(uint64_t entryID) kr = IOMasterPort(bootstrap_port, &masterPort); if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOMasterPort returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOMasterPort returned 0x%x", kr); goto error; } @@ -1274,19 +1390,16 @@ copyInterfaceForIORegistryEntryID(uint64_t entryID) IORegistryEntryIDMatching(entryID), &iterator); if ((kr != KERN_SUCCESS) || (iterator == MACH_PORT_NULL)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOServiceGetMatchingServices(0x%llx) returned 0x%x/%d"), - entryID, - kr, - iterator); + SC_log(LOG_NOTICE, "IOServiceGetMatchingServices(0x%llx) returned 0x%x/%d", + entryID, + kr, + iterator); goto error; } entry = IOIteratorNext(iterator); if (entry == MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IORegistryEntryIDMatching(0x%llx) failed"), - entryID); + SC_log(LOG_NOTICE, "IORegistryEntryIDMatching(0x%llx) failed", entryID); goto error; } @@ -1355,17 +1468,13 @@ copyInterfaceForIOKitPath(CFStringRef if_path) kr = IOMasterPort(bootstrap_port, &masterPort); if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOMasterPort returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOMasterPort returned 0x%x", kr); goto error; } _SC_cfstring_to_cstring(if_path, path, sizeof(path), kCFStringEncodingASCII); entry = IORegistryEntryFromPath(masterPort, path); if (entry == MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IORegistryEntryFromPath(%@) failed"), - if_path); + SC_log(LOG_NOTICE, "IORegistryEntryFromPath(%@) failed", if_path); goto error; } @@ -1406,8 +1515,7 @@ displayInterface(SCNetworkInterfaceRef interface) type = _SCNetworkInterfaceGetIOInterfaceType(interface); addr = SCNetworkInterfaceGetHardwareAddressString(interface); - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": %s%@%sType: %@, %s%@%sMAC address: %@"), + SC_log(LOG_INFO, " %s%@%sType: %@, %s%@%sMAC address: %@", (name != NULL) ? "BSD Name: " : "", (name != NULL) ? name : CFSTR(""), (name != NULL) ? ", " : "", @@ -1415,7 +1523,7 @@ displayInterface(SCNetworkInterfaceRef interface) (unit != NULL) ? "Unit: " : "", (unit != NULL) ? (CFTypeRef)unit : (CFTypeRef)CFSTR(""), (unit != NULL) ? ", " : "", - addr); + (addr != NULL) ? addr : CFSTR("?")); } static Boolean @@ -1481,161 +1589,1151 @@ builtinCount(CFArrayRef if_list, CFIndex last, CFNumberRef if_type) return n; } -static __inline__ boolean_t -isQuiet(void) + +#pragma mark - +#pragma mark Interface monitoring (e.g. watch for "detach") + + +typedef struct WatchedInfo *WatchedInfoRef; + +typedef void (*InterfaceUpdateCallBack) ( + CFDataRef watched, + natural_t messageType, + void *messageArgument +); + +typedef struct { + SCNetworkInterfaceRef interface; + io_service_t interface_node; + io_object_t notification; + InterfaceUpdateCallBack callback; +} WatchedInfo; + +static void +watcherRelease(CFDataRef watched); + +static void +updateWatchedInterface(void *refCon, io_service_t service, natural_t messageType, void *messageArgument) { - return (S_quiet == MACH_PORT_NULL); +#pragma unused(service) +#pragma unused(messageArgument) + switch (messageType) { + case kIOMessageServiceIsTerminated : { // if [watched] interface yanked + CFDataRef watched = (CFDataRef)refCon; + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + CFRetain(watched); + watchedInfo->callback(watched, messageType, messageArgument); + watcherRelease(watched); + CFRelease(watched); + break; + } + + default : + return; + } + + return; } -static void -nameInterfaces(CFMutableArrayRef if_list) +static CFDataRef +watcherCreate(SCNetworkInterfaceRef interface, InterfaceUpdateCallBack callback) { - CFIndex i; - CFIndex n = CFArrayGetCount(if_list); + uint64_t entryID; + io_service_t interface_node; + kern_return_t kr; + CFDictionaryRef matching; + CFMutableDataRef watched; + WatchedInfo *watchedInfo; + + // get the IORegistry node + entryID = _SCNetworkInterfaceGetIORegistryEntryID(interface); + matching = IORegistryEntryIDMatching(entryID); + interface_node = IOServiceGetMatchingService(kIOMasterPortDefault, matching); + if (interface_node == MACH_PORT_NULL) { + // interface no longer present + return NULL; + } - for (i = 0; i < n; i++) { - uint64_t entryID; - SCNetworkInterfaceRef interface; - SCNetworkInterfaceRef new_interface; - CFStringRef path; - CFStringRef str; - CFNumberRef type; - CFNumberRef unit; - CFIndex where; + // create [locked/trusted] interface watcher + watched = CFDataCreateMutable(NULL, sizeof(WatchedInfo)); + CFDataSetLength(watched, sizeof(WatchedInfo)); + watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + memset(watchedInfo, 0, sizeof(*watchedInfo)); - interface = CFArrayGetValueAtIndex(if_list, i); - path = _SCNetworkInterfaceGetIOPath(interface); - type = _SCNetworkInterfaceGetIOInterfaceType(interface); - unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface); - entryID = _SCNetworkInterfaceGetIORegistryEntryID(interface); + // retain interface + watchedInfo->interface = CFRetain(interface); - if (unit != NULL) { - if (S_debug) { - CFStringRef if_name; - - if_name = SCNetworkInterfaceGetBSDName(interface); - if ((if_name == NULL) || !CFDictionaryContainsKey(S_state, if_name)) { - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": Interface already has a unit number")); - displayInterface(interface); - } - } + // ... and the interface node + watchedInfo->interface_node = interface_node; - // update the list of interfaces that were previously named - if ((S_prev_active_list != NULL) - && lookupInterfaceByAddress(S_prev_active_list, interface, &where) != NULL) { - CFArrayRemoveValueAtIndex(S_prev_active_list, where); - } + // ... and set the callback + watchedInfo->callback = callback; - replaceInterface(interface); - } else { - CFDictionaryRef dbdict; - boolean_t is_builtin; - kern_return_t kr; - int retries = 0; + kr = IOServiceAddInterestNotification(S_notify, // IONotificationPortRef + watchedInfo->interface_node, // io_service_t + kIOGeneralInterest, // interestType + updateWatchedInterface, // IOServiceInterestCallback + (void *)watched, // refCon + &watchedInfo->notification); // notification + if (kr != KERN_SUCCESS) { + SC_log(LOG_ERR, + "IOServiceAddInterestNotification() failed, kr = 0x%x", + kr); + watcherRelease(watched); + CFRelease(watched); + return NULL; + } - dbdict = lookupInterfaceByAddress(S_dblist, interface, NULL); - if (dbdict != NULL) { - unit = CFDictionaryGetValue(dbdict, CFSTR(kIOInterfaceUnit)); - CFRetain(unit); + return watched; +} - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": Interface assigned unit %@ (from database)"), - unit); - } +static void +watcherRelease(CFDataRef watched) +{ + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); - if ((dbdict == NULL) && !isQuiet()) { - // if new interface, wait until quiet before naming - addTimestamp(S_state, path); - continue; - } + // release watcher + if (watchedInfo->notification != IO_OBJECT_NULL) { + IOObjectRelease(watchedInfo->notification); + watchedInfo->notification = IO_OBJECT_NULL; + } - is_builtin = _SCNetworkInterfaceIsBuiltin(interface); + // release interface node + if (watchedInfo->interface_node != IO_OBJECT_NULL) { + IOObjectRelease(watchedInfo->interface_node); + watchedInfo->interface_node = IO_OBJECT_NULL; + } - if (dbdict == NULL) { - dbdict = lookupMatchingInterface(interface, - S_dblist, - if_list, - i + 1, - is_builtin ? kCFBooleanTrue : kCFBooleanFalse); - if (dbdict != NULL) { - unit = CFDictionaryGetValue(dbdict, CFSTR(kIOInterfaceUnit)); - CFRetain(unit); + // release interface + if (watchedInfo->interface != NULL) { + CFRelease(watchedInfo->interface); + watchedInfo->interface = NULL; + } - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": Interface assigned unit %@ (updating database)"), - unit); - } - } + return; +} - if ((dbdict != NULL) && (S_prev_active_list != NULL)) { - // update the list of interfaces that were previously named - where = CFArrayGetFirstIndexOfValue(S_prev_active_list, - CFRangeMake(0, CFArrayGetCount(S_prev_active_list)), - dbdict); - if (where != kCFNotFound) { - CFArrayRemoveValueAtIndex(S_prev_active_list, where); - } - } - if (dbdict == NULL) { - int next_unit = 0; +#pragma mark - +#pragma mark Locked device support [macOS] - if (is_builtin) { - // built-in interface, try to use the reserved slots - next_unit = builtinCount(if_list, i, type); - // But, before claiming a reserved slot we check to see if the - // slot had previously been used. If so, and if the slot had been - // assigned to the same type of interface, then we will perform a - // replacement (e.g. assume that this was a board swap). But, if - // the new interface is a different type then we assume that the - // built-in configuration has changed and allocate a new unit from - // the non-reserved slots. +#if !TARGET_OS_IPHONE +static void +shareLocked(void) +{ + CFIndex n; - unit = CFNumberCreate(NULL, kCFNumberIntType, &next_unit); - if (!builtinAvailable(interface, unit)) { - // if [built-in] unit not available - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": Interface not assigned [built-in] unit %@"), - unit); - CFRelease(unit); - unit = NULL; - } - } + 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); + } - if (unit == NULL) { - // not built-in (or built-in unit not available), allocate from - // the non-reserved slots - next_unit = builtinCount(if_list, n, type); + CFDictionarySetValue(S_state, kInterfaceNamerKey_LockedInterfaces, locked); + CFRelease(locked); + } else { + CFDictionaryRemoveValue(S_state, kInterfaceNamerKey_LockedInterfaces); + } - unit = getHighestUnitForType(type); - if (unit != NULL) { - int high_unit; + updateStore(); - CFNumberGetValue(unit, kCFNumberIntType, &high_unit); - if (high_unit >= next_unit) { - next_unit = high_unit + 1; - } - } + return; +} - unit = CFNumberCreate(NULL, kCFNumberIntType, &next_unit); - } +static boolean_t +blockNewInterfaces() +{ + static boolean_t allow = TRUE; + static dispatch_once_t once; - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": Interface assigned unit %@ (%s)"), - unit, - is_builtin ? "built-in" : "next available"); - } + dispatch_once(&once, ^{ + allow = InterfaceNamerControlPrefsAllowNewInterfaces(); + }); - retry : + return !allow; +} -#ifdef USE_REGISTRY_ENTRY_ID - kr = registerInterfaceWithIORegistryEntryID(S_connect, - entryID, - unit, - (dbdict == NULL) ? kIONetworkStackRegisterInterfaceWithLowestUnit - : kIONetworkStackRegisterInterfaceWithUnit); +static boolean_t +isConsoleLocked() +{ + CFArrayRef console_sessions; + boolean_t locked = FALSE; + io_registry_entry_t root; + + root = IORegistryGetRootEntry(kIOMasterPortDefault); + console_sessions = IORegistryEntryCreateCFProperty(root, + CFSTR(kIOConsoleUsersKey), + NULL, + 0); + if (isA_CFArray(console_sessions)) { + CFIndex n; + + n = CFArrayGetCount(console_sessions); + for (CFIndex i = 0; i < n; i++) { + CFBooleanRef isLocked; + CFBooleanRef isLoginDone; + CFBooleanRef onConsole; + CFDictionaryRef session; + + session = CFArrayGetValueAtIndex(console_sessions, i); + if (!isA_CFDictionary(session)) { + // if not dictionary + continue; + } + + if (!CFDictionaryGetValueIfPresent(session, + CFSTR(kIOConsoleSessionOnConsoleKey), + (const void **)&onConsole) || + !isA_CFBoolean(onConsole) || + !CFBooleanGetValue(onConsole)) { + // if not "on console" session + continue; + } + + if ((n > 1) && + CFDictionaryGetValueIfPresent(session, + CFSTR(kIOConsoleSessionLoginDoneKey), + (const void **)&isLoginDone) && + isA_CFBoolean(isLoginDone) && + !CFBooleanGetValue(isLoginDone)) { + // if @ loginwindow + SC_log(LOG_INFO, "multiple sessions, console @ loginwindow"); + locked = TRUE; + goto done; + } + + if (CFDictionaryGetValueIfPresent(session, + CFSTR(kIOConsoleSessionScreenIsLockedKey), + (const void **)&isLocked) && + isA_CFBoolean(isLocked) && + CFBooleanGetValue(isLocked)) { + // if screen locked + SC_log(LOG_INFO, "console screen locked"); + locked = TRUE; + goto done; + } + } + } + + SC_log(LOG_INFO, "console not locked"); + + done : + + if (console_sessions != NULL) { + CFRelease(console_sessions); + } + IOObjectRelease(root); + + 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) + + CFIndex n; + + 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(); + } + + 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 Boolean +haveLockdown() +{ + void * volatile fn_WeakFunction = (void *)&(lockdown_is_host_trusted); + Boolean haveLibrary; + + haveLibrary = (fn_WeakFunction != NULL) ? TRUE : FALSE; + return haveLibrary; +} + +static void +shareExcluded() +{ + CFIndex n; + + n = (S_trustRequired != NULL) ? CFArrayGetCount(S_trustRequired) : 0; + if ((n > 0) && !S_trustedHostAttached) { + CFMutableArrayRef excluded; + + // 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); + } + + 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 changed = FALSE; + CFStringRef error = NULL; + CFIndex n; + Boolean trusted; + + /* + * determine whether the device has "trusted" the host (or other device) + */ + trusted = lockdown_is_host_trusted(MY_PLUGIN_ID, NULL, &error); + n = (S_trustRequired != NULL) ? CFArrayGetCount(S_trustRequired) : 0; + if ((S_trustedHostCount != n) || (S_trustedHostAttached != trusted)) { + changed = TRUE; + } + + SC_log(LOG_INFO, "%@, trusted = %s%s%@, %ld interface%s)%s", + reason, + trusted ? "Yes" : "No", + (error != NULL) ? ", error = " : "", + (error != NULL) ? error : CFSTR(""), + n, + (n == 1) ? "" : "s", + changed ? " *" : ""); + + if (changed) { + S_trustedHostAttached = trusted; + S_trustedHostCount = n; + CFRunLoopPerformBlock(rl, kCFRunLoopDefaultMode, ^{ + shareExcluded(); + }); + CFRunLoopWakeUp(rl); + } + + if (error != NULL) { + CFRelease(error); + } + + 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 Boolean +isWatchedInterface(SCNetworkInterfaceRef interface) +{ + Boolean found = FALSE; + CFIndex n; + + n = (S_trustRequired != NULL) ? CFArrayGetCount(S_trustRequired) : 0; + for (CFIndex i = 0; i < n; i++) { + CFDataRef watched = CFArrayGetValueAtIndex(S_trustRequired, i); + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + if (CFEqual((watchedInfo->interface), interface)) { + found = TRUE; + break; + } + } + + return found; +} + +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) && !isWatchedInterface(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 "Host attached" + watchTrustedStatus(kLockdownNotificationHostAttached, + CFSTR("Host attached")); + + // watch for "Host detached" + watchTrustedStatus(kLockdownNotificationHostDetached, + CFSTR("Host detached")); + + // watch for "Trusted host attached" + watchTrustedStatus(kLockdownNotificationTrustedHostAttached, + CFSTR("Trusted Host attached")); + + // watch for "Trusted PDP attached" + watchTrustedStatus(kLockdownNotificationTrustedPTPAttached, + CFSTR("Trusted PTP attached")); + }); + + CFRetain(rl); + dispatch_async(trustRequired_queue(), ^{ + trustRequiredNotification_update(rl, CFSTR("TrustRequired interface added")); + CFRelease(rl); + }); + } + + return; +} +#endif // TARGET_OS_IPHONE + + +#pragma mark - +#pragma mark Pre-configured interface support + + +static void +sharePreconfigured() +{ + CFIndex n; + + n = (S_preconfigured != NULL) ? CFArrayGetCount(S_preconfigured) : 0; + if (n > 0) { + CFMutableArrayRef preconfigured; + + preconfigured = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex i = 0; i < n; i++) { + CFStringRef bsdName; + CFDataRef watched = CFArrayGetValueAtIndex(S_preconfigured, i); + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + bsdName = SCNetworkInterfaceGetBSDName(watchedInfo->interface); + CFArrayAppendValue(preconfigured, bsdName); + } + + CFDictionarySetValue(S_state, kInterfaceNamerKey_PreConfiguredInterfaces, preconfigured); + CFRelease(preconfigured); + } else { + CFDictionaryRemoveValue(S_state, kInterfaceNamerKey_PreConfiguredInterfaces); + } + + updateStore(); + + return; +} + +static void +preconfiguredInterfaceUpdated(CFDataRef watched, natural_t messageType, void *messageArgument) +{ + Boolean updated = FALSE; + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + +#pragma unused(messageArgument) + switch (messageType) { + case kIOMessageServiceIsTerminated : { // if [locked] interface yanked + SC_log(LOG_INFO, "[pre-configured] interface removed: %@", + SCNetworkInterfaceGetBSDName(watchedInfo->interface)); + + if (S_preconfigured != NULL) { + CFIndex i; + CFIndex n = CFArrayGetCount(S_preconfigured); + + i = CFArrayGetFirstIndexOfValue(S_preconfigured, CFRangeMake(0, n), watched); + if (i != kCFNotFound) { + CFArrayRemoveValueAtIndex(S_preconfigured, i); + if (CFArrayGetCount(S_preconfigured) == 0) { + CFRelease(S_preconfigured); + S_preconfigured = NULL; + } + updated = TRUE; + } + } + + break; + } + + default : + return; + } + + if (updated) { + sharePreconfigured(); + } + + return; +} + +static void +updatePreConfiguredInterfaces(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 (_SCNetworkInterfaceIsApplePreconfigured(interface)) { + CFDataRef watched; + + watched = watcherCreate(interface, preconfiguredInterfaceUpdated); + if (watched != NULL) { + SC_log(LOG_INFO, "watching [pre-configured] interface: %@", + SCNetworkInterfaceGetBSDName(interface)); + + if (S_preconfigured == NULL) { + S_preconfigured = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + CFArrayAppendValue(S_preconfigured, watched); + updated = TRUE; + } + } + } + + if (updated) { + sharePreconfigured(); + } + + return; +} + + +#pragma mark - +#pragma mark Interface naming + + +static __inline__ boolean_t +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) +{ + CFIndex i; + CFIndex n = CFArrayGetCount(if_list); + + for (i = 0; i < n; i++) { + uint64_t entryID; + SCNetworkInterfaceRef interface; + SCNetworkInterfaceRef new_interface; + CFStringRef path; + CFNumberRef type; + CFNumberRef unit; + CFIndex where; + + interface = CFArrayGetValueAtIndex(if_list, i); + path = _SCNetworkInterfaceGetIOPath(interface); + type = _SCNetworkInterfaceGetIOInterfaceType(interface); + unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface); + entryID = _SCNetworkInterfaceGetIORegistryEntryID(interface); + + if (unit != NULL) { + CFStringRef if_name; + + if_name = SCNetworkInterfaceGetBSDName(interface); + if ((if_name == NULL) || !CFDictionaryContainsKey(S_state, if_name)) { + SC_log(LOG_INFO, "Interface already has a unit number"); + displayInterface(interface); + } + + // update the list of interfaces that were previously named + if ((S_prev_active_list != NULL) + && lookupInterfaceByAddress(S_prev_active_list, interface, &where) != NULL) { + CFArrayRemoveValueAtIndex(S_prev_active_list, where); + } + + replaceInterface(interface); + } else { + CFDictionaryRef dbdict; + boolean_t is_builtin; + kern_return_t kr; + int retries = 0; + + dbdict = lookupInterfaceByAddress(S_dblist, interface, NULL); + if (dbdict != NULL) { + unit = CFDictionaryGetValue(dbdict, CFSTR(kIOInterfaceUnit)); + CFRetain(unit); + + SC_log(LOG_INFO, "Interface assigned unit %@ (from database)", unit); + } + + if ((dbdict == NULL) && !isQuiet()) { + // if new interface, wait until quiet before naming + addTimestamp(S_state, path); + continue; + } + + is_builtin = _SCNetworkInterfaceIsBuiltin(interface); + + if (dbdict == NULL) { + dbdict = lookupMatchingInterface(interface, + S_dblist, + 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 ((unit == NULL) && + !is_builtin && + (dbdict != NULL) && + blockNewInterfaces() && + !_SCNetworkInterfaceIsApplePreconfigured(interface) && + isConsoleLocked()) { + 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 = %@, addr = %@", + path, + (addr != NULL) ? addr : CFSTR("?")); + watchLockedInterface(interface); + continue; + } +#endif // !TARGET_OS_IPHONE + + if ((unit == NULL) && (dbdict != NULL)) { + unit = CFDictionaryGetValue(dbdict, CFSTR(kIOInterfaceUnit)); + CFRetain(unit); + + SC_log(LOG_INFO, "Interface assigned unit %@ (updating database w/new interface)", unit); + } + } + + if ((dbdict != NULL) && (S_prev_active_list != NULL)) { + // update the list of interfaces that were previously named + where = CFArrayGetFirstIndexOfValue(S_prev_active_list, + CFRangeMake(0, CFArrayGetCount(S_prev_active_list)), + dbdict); + if (where != kCFNotFound) { + CFArrayRemoveValueAtIndex(S_prev_active_list, where); + } + } + + if (dbdict == NULL) { + int next_unit = 0; + + if (is_builtin) { + // built-in interface, try to use the reserved slots + next_unit = builtinCount(if_list, i, type); + + // But, before claiming a reserved slot we check to see if the + // slot had previously been used. If so, and if the slot had been + // assigned to the same type of interface, then we will perform a + // replacement (e.g. assume that this was a board swap). But, if + // the new interface is a different type then we assume that the + // built-in configuration has changed and allocate a new unit from + // the non-reserved slots. + + unit = CFNumberCreate(NULL, kCFNumberIntType, &next_unit); + if (!builtinAvailable(interface, unit)) { + // if [built-in] unit not available + SC_log(LOG_INFO, "Interface not assigned [built-in] unit %@", unit); + CFRelease(unit); + unit = NULL; + } + } + +#if !TARGET_OS_IPHONE + if (!is_builtin && + (unit == NULL) && + blockNewInterfaces() && + !_SCNetworkInterfaceIsApplePreconfigured(interface) && + isConsoleLocked()) { + 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 = %@, addr = %@", + path, + (addr != NULL) ? addr : CFSTR("?")); + watchLockedInterface(interface); + continue; + } +#endif // !TARGET_OS_IPHONE + + if (unit == NULL) { + // not built-in (or built-in unit not available), allocate from + // the non-reserved slots + next_unit = builtinCount(if_list, n, type); + + unit = getHighestUnitForType(type); + if (unit != NULL) { + int high_unit; + + CFNumberGetValue(unit, kCFNumberIntType, &high_unit); + if (high_unit >= next_unit) { + next_unit = high_unit + 1; + } + } + + unit = CFNumberCreate(NULL, kCFNumberIntType, &next_unit); + } + + SC_log(LOG_INFO, "Interface assigned unit %@ (%s)", + unit, + is_builtin ? "built-in" : "next available"); + } + + retry : + +#ifdef USE_REGISTRY_ENTRY_ID + kr = registerInterfaceWithIORegistryEntryID(S_connect, + entryID, + unit, + (dbdict == NULL) ? kIONetworkStackRegisterInterfaceWithLowestUnit + : kIONetworkStackRegisterInterfaceWithUnit); new_interface = copyNamedInterfaceForIORegistryEntryID(entryID); #else // USE_REGISTRY_ENTRY_ID kr = registerInterfaceWithIOServicePath(S_connect, @@ -1651,29 +2749,17 @@ nameInterfaces(CFMutableArrayRef if_list) signature = (dbdict == NULL) ? "failed to name new interface" : "failed to name known interface"; - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": %s, kr=0x%x\n" - MY_PLUGIN_NAME ": path = %@\n" - MY_PLUGIN_NAME ": id = 0x%llx\n" - MY_PLUGIN_NAME ": unit = %@"), - signature, - kr, - path, - entryID, - unit); - - if (S_debug) { - displayInterface(interface); - } + SC_log(LOG_NOTICE, "%s, kr=0x%x\n" + " path = %@\n" + " id = 0x%llx\n" + " unit = %@", + signature, + kr, + path, + entryID, + unit); - // report issue w/MessageTracer - str = CFStringCreateWithFormat(NULL, NULL, - CFSTR("kr=0x%x, path=%@, unit=%@"), - kr, - path, - unit); - reportIssue(signature, str); - CFRelease(str); + displayInterface(interface); if ((dbdict != NULL) && (retries++ < 5)) { usleep(50 * 1000); // sleep 50ms between attempts @@ -1684,15 +2770,14 @@ nameInterfaces(CFMutableArrayRef if_list) CFNumberRef new_unit; if (retries > 0) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": %s interface named after %d %s\n" - MY_PLUGIN_NAME ": path = %@\n" - MY_PLUGIN_NAME ": unit = %@"), - (dbdict == NULL) ? "New" : "Known", - retries, - (retries == 1) ? "try" : "tries", - path, - unit); + SC_log(LOG_INFO, "%s interface named after %d %s\n" + " path = %@\n" + " unit = %@", + (dbdict == NULL) ? "New" : "Known", + retries, + (retries == 1) ? "try" : "tries", + path, + unit); #ifdef SHOW_NAMING_FAILURE str = CFStringCreateWithFormat(NULL, @@ -1715,17 +2800,13 @@ nameInterfaces(CFMutableArrayRef if_list) } new_unit = _SCNetworkInterfaceGetIOInterfaceUnit(new_interface); - if (CFEqual(unit, new_unit) == FALSE) { - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME - ": interface type %@ assigned " - "unit %@ instead of %@"), - type, new_unit, unit); - } - if (S_debug) { - displayInterface(new_interface); + if (!CFEqual(unit, new_unit)) { + SC_log(LOG_INFO, "interface type %@ assigned unit %@ instead of %@", + type, new_unit, unit); } + displayInterface(new_interface); + // update if_list (with the interface name & unit) CFArraySetValueAtIndex(if_list, i, new_interface); CFRelease(new_interface); @@ -1736,8 +2817,7 @@ nameInterfaces(CFMutableArrayRef if_list) // update the list of [built-in] interfaces that were previously named if (lookupInterfaceByUnit(S_prev_active_list, interface, &where) != NULL) { - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": and updated database (new address)")); + SC_log(LOG_DEBUG, " and updated database (new address)"); CFArrayRemoveValueAtIndex(S_prev_active_list, where); } } @@ -1750,6 +2830,30 @@ nameInterfaces(CFMutableArrayRef if_list) } #if !TARGET_OS_IPHONE + +#define INSTALL_ENVIRONMENT "__OSINSTALL_ENVIRONMENT" + +static Boolean +isRecoveryOS() +{ + static Boolean isRecovery = FALSE; + static dispatch_once_t once; + + /* + * We check to see if the __OSINSTALL_ENVIRONMENT env var is present. If + * so, then we are most likely booted into the Recovery OS with no [Aqua] + * "SCMonitor" [UserEventAgent] plugin. + */ + dispatch_once(&once, ^{ + if (getenv(INSTALL_ENVIRONMENT) != NULL) { + isRecovery = TRUE; + } + + }); + + return isRecovery; +} + static void updateNetworkConfiguration(CFArrayRef if_list) { @@ -1759,23 +2863,30 @@ 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) { - SCLog(TRUE, LOG_ERR, CFSTR(MY_PLUGIN_NAME ": No current set")); - goto done; + SC_log(LOG_INFO, "No current set, adding default"); + set = _SCNetworkSetCreateDefault(prefs); + if (set == NULL) { + SC_log(LOG_NOTICE, "_SCNetworkSetCreateDefault() failed: %s", SCErrorString(SCError())); + goto done; + } } - n = CFArrayGetCount(if_list); + n = (if_list != NULL) ? CFArrayGetCount(if_list) : 0; for (i = 0; i < n; i++) { SCNetworkInterfaceRef interface; interface = CFArrayGetValueAtIndex(if_list, i); if (SCNetworkSetEstablishDefaultInterfaceConfiguration(set, interface)) { - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": adding default configuration for %@"), - SCNetworkInterfaceGetBSDName(interface)); + SC_log(LOG_INFO, "adding default configuration for %@", + SCNetworkInterfaceGetBSDName(interface)); do_commit = TRUE; } } @@ -1785,17 +2896,13 @@ updateNetworkConfiguration(CFArrayRef if_list) ok = SCPreferencesCommitChanges(prefs); if (!ok) { - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": updateNetworkConfiguration: SCPreferencesCommitChanges() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesCommitChanges() failed: %s", SCErrorString(SCError())); goto done; } ok = SCPreferencesApplyChanges(prefs); if (!ok) { - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": updateNetworkConfiguration: SCPreferencesApplyChanges() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesApplyChanges() failed: %s", SCErrorString(SCError())); goto done; } } @@ -1834,6 +2941,20 @@ updateInterfaces() nameInterfaces(S_iflist); } + /* + * Update the list of [Apple] pre-configured interfaces + */ + updatePreConfiguredInterfaces(S_iflist); + +#if TARGET_OS_IPHONE + /* + * Update the list of "trust required" interfaces + */ + if (haveLockdown()) { + updateTrustRequiredInterfaces(S_iflist); + } +#endif // TARGET_OS_IPHONE + if (isQuiet()) { /* * The registry [matching] has quiesced so let's @@ -1847,8 +2968,7 @@ updateInterfaces() updateVirtualNetworkInterfaceConfiguration(NULL, kSCPreferencesNotificationApply, NULL); #if !TARGET_OS_IPHONE - if (access("/usr/libexec/UserEventAgent", X_OK) == -1 - && errno == ENOENT) { + if (isRecoveryOS()) { /* * We are most likely booted into the Recovery OS with no "SCMonitor" * UserEventAgent plugin running so let's make sure we update the @@ -1866,35 +2986,32 @@ updateInterfaces() } if (S_prev_active_list != NULL) { - if (S_debug) { - CFIndex i; - CFIndex n; + CFIndex i; + CFIndex n; - n = CFArrayGetCount(S_prev_active_list); - if (n > 0) { - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": Interface%s not [yet] active"), - (n > 1) ? "s" : ""); - } - for (i = 0; i < n; i++) { - CFDictionaryRef if_dict; - CFStringRef name; - CFNumberRef type; - CFNumberRef unit; - - if_dict = CFArrayGetValueAtIndex(S_prev_active_list, i); - name = CFDictionaryGetValue(if_dict, CFSTR(kIOBSDNameKey)); - type = CFDictionaryGetValue(if_dict, CFSTR(kIOInterfaceType)); - unit = CFDictionaryGetValue(if_dict, CFSTR(kIOInterfaceUnit)); - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": %s%@%sType: %@, Unit: %@"), - (name != NULL) ? "BSD Name: " : "", - (name != NULL) ? name : CFSTR(""), - (name != NULL) ? ", " : "", - type, - unit); - } + n = CFArrayGetCount(S_prev_active_list); + if (n > 0) { + SC_log(LOG_INFO, "Interface%s not [yet] active", + (n > 1) ? "s" : ""); + } + for (i = 0; i < n; i++) { + CFDictionaryRef if_dict; + CFStringRef name; + CFNumberRef type; + CFNumberRef unit; + + if_dict = CFArrayGetValueAtIndex(S_prev_active_list, i); + name = CFDictionaryGetValue(if_dict, CFSTR(kIOBSDNameKey)); + type = CFDictionaryGetValue(if_dict, CFSTR(kIOInterfaceType)); + unit = CFDictionaryGetValue(if_dict, CFSTR(kIOInterfaceUnit)); + SC_log(LOG_INFO, " %s%@%sType: %@, Unit: %@", + (name != NULL) ? "BSD Name: " : "", + (name != NULL) ? name : CFSTR(""), + (name != NULL) ? ", " : "", + type, + unit); } + CFRelease(S_prev_active_list); S_prev_active_list = NULL; } @@ -1905,8 +3022,7 @@ updateInterfaces() * were used during the previous boot. */ addTimestamp(S_state, CFSTR("*RELEASE*")); - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": last boot interfaces have been named")); + SC_log(LOG_INFO, "last boot interfaces have been named"); updateStore(); CFRelease(S_prev_active_list); S_prev_active_list = NULL; @@ -1916,178 +3032,11 @@ updateInterfaces() return; } -#if !TARGET_OS_EMBEDDED -static CFComparisonResult -compareMacAddress(const void *val1, const void *val2, void *context) -{ - CFDataRef mac1 = (CFDataRef)val1; - CFDataRef mac2 = (CFDataRef)val2; - CFIndex n1; - CFIndex n2; - CFComparisonResult res; - - n1 = CFDataGetLength(mac1); - n2 = CFDataGetLength(mac2); - if (n1 < n2) { - res = kCFCompareLessThan; - } else if (n2 > n1) { - res = kCFCompareGreaterThan; - } else { - res = bcmp(CFDataGetBytePtr(mac1), CFDataGetBytePtr(mac2), n1); - } - - return res; -} - -static CFStringRef -copyEthernetUUID() -{ - CFDataRef addr; - CFMutableArrayRef addrs = NULL; - CFStringRef guid = NULL; - CFIndex i; - CFIndex n; - - addrs = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - n = (S_dblist != NULL) ? CFArrayGetCount(S_dblist) : 0; - for (i = 0; i < n; i++) { - CFBooleanRef builtin; - CFDictionaryRef dict; - CFStringRef type; - - dict = CFArrayGetValueAtIndex(S_dblist, i); - type = CFDictionaryGetValue(dict, CFSTR(kSCNetworkInterfaceType)); - if (!isA_CFString(type) || !CFEqual(type, kSCNetworkInterfaceTypeEthernet)) { - continue; - } - builtin = CFDictionaryGetValue(dict, CFSTR(kIOBuiltin)); - if (!isA_CFBoolean(builtin) || !CFBooleanGetValue(builtin)) { - continue; - } - addr = CFDictionaryGetValue(dict, CFSTR(kIOMACAddress)); - if (!isA_CFData(addr) || (CFDataGetLength(addr) != ETHER_ADDR_LEN)) { - continue; - } - CFArrayAppendValue(addrs, addr); - } - - if (CFArrayGetCount(addrs) == 0) { - // if no ethernet interfaces, look for wireless - for (i = 0; i < n; i++) { - CFDictionaryRef dict; - CFStringRef type; - - dict = CFArrayGetValueAtIndex(S_dblist, i); - type = CFDictionaryGetValue(dict, CFSTR(kSCNetworkInterfaceType)); - if (!isA_CFString(type) || !CFEqual(type, kSCNetworkInterfaceTypeIEEE80211)) { - continue; - } - addr = CFDictionaryGetValue(dict, CFSTR(kIOMACAddress)); - if (!isA_CFData(addr) || (CFDataGetLength(addr) != ETHER_ADDR_LEN)) { - continue; - } - CFArrayAppendValue(addrs, addr); - } - } - - n = CFArrayGetCount(addrs); - switch (n) { - case 0 : - // if no network interfaces - break; - default : - // sort by MAC address - CFArraySortValues(addrs, CFRangeMake(0, n), compareMacAddress, NULL); - - // fall through - case 1 : { - CFUUIDBytes bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - CFUUIDRef uuid; - - // set GUID - addr = CFArrayGetValueAtIndex(addrs, 0); - bcopy(CFDataGetBytePtr(addr), - (void *)&bytes + sizeof(bytes) - ETHER_ADDR_LEN, - ETHER_ADDR_LEN); - uuid = CFUUIDCreateFromUUIDBytes(NULL, bytes); - guid = CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": setting platform UUID [MAC] = %@"), - guid); - break; - } - } - - if (addrs != NULL) CFRelease(addrs); - return guid; -} - -#ifndef kIOPlatformUUIDKey -#define kIOPlatformUUIDKey "IOPlatformUUID" -#endif -static void -updatePlatformUUID() -{ - CFStringRef guid = NULL; - kern_return_t kr; - io_registry_entry_t platform; - - platform = IORegistryEntryFromPath(kIOMasterPortDefault, kIODeviceTreePlane ":/"); - if (platform == MACH_PORT_NULL) { - goto done; - } - - guid = IORegistryEntryCreateCFProperty(platform, CFSTR(kIOPlatformUUIDKey), NULL, 0); - if (guid != NULL) { - // if GUID already defined - goto done; - } - - guid = copyEthernetUUID(); - if (guid == NULL) { - CFUUIDRef uuid; - - uuid = CFUUIDCreate(NULL); - guid = CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - - SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": setting platform UUID [random] = %@"), - guid); - } - -if (getenv("DO_NOT_SET_PLATFORM_UUID") == NULL) { - kr = IORegistryEntrySetCFProperty(platform, CFSTR(kIOPlatformUUIDKey), guid); - if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IORegistryEntrySetCFProperty(platform UUID) failed, kr=0x%x"), - kr); - } -} - - addTimestamp(S_state, CFSTR("*PLATFORM-UUID*")); - updateStore(); - - done : - - if (S_vproc_transaction != NULL) { - vproc_transaction_end(NULL, S_vproc_transaction); - S_vproc_transaction = NULL; - } - - if (platform != MACH_PORT_NULL) IOObjectRelease(platform); - if (guid != NULL) CFRelease(guid); - return; -} -#endif // !TARGET_OS_EMBEDDED - static void interfaceArrivalCallback(void *refcon, io_iterator_t iter) { - io_object_t obj; +#pragma unused(refcon) + io_object_t obj; while ((obj = IOIteratorNext(iter)) != MACH_PORT_NULL) { SCNetworkInterfaceRef interface; @@ -2104,6 +3053,7 @@ interfaceArrivalCallback(void *refcon, io_iterator_t iter) } updateInterfaces(); + return; } @@ -2119,6 +3069,7 @@ interfaceArrivalCallback(void *refcon, io_iterator_t iter) static void stackCallback(void *refcon, io_iterator_t iter) { +#pragma unused(refcon) kern_return_t kr; io_object_t stack; @@ -2129,15 +3080,12 @@ stackCallback(void *refcon, io_iterator_t iter) kr = IOServiceOpen(stack, mach_task_self(), 0, &S_connect); if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOServiceOpen returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOServiceOpen returned 0x%x", kr); goto error; } addTimestamp(S_state, CFSTR("*STACK*")); - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": IONetworkStack found")); + SC_log(LOG_INFO, "IONetworkStack found"); if (S_stack != MACH_PORT_NULL) { IOObjectRelease(S_stack); @@ -2155,6 +3103,7 @@ stackCallback(void *refcon, io_iterator_t iter) updateInterfaces(); error: + if (stack != MACH_PORT_NULL) { IOObjectRelease(stack); } @@ -2168,20 +3117,20 @@ quietCallback(void *refcon, natural_t messageType, void *messageArgument) { +#pragma unused(refcon) +#pragma unused(service) if (messageArgument != NULL) { // if not yet quiet return; } if (messageType == kIOMessageServiceBusyStateChange) { - addTimestamp(S_state, CFSTR("*QUIET*")); - SCLog(S_debug, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": IOKit quiet")); + addTimestamp(S_state, kInterfaceNamerKey_Quiet); + SC_log(LOG_INFO, "IOKit quiet"); } if (S_connect == MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": No network stack object")); + SC_log(LOG_ERR, "No network stack object"); return; } @@ -2199,15 +3148,16 @@ quietCallback(void *refcon, // grab (and name) any additional interfaces. interfaceArrivalCallback((void *)S_notify, S_iter); -#if !TARGET_OS_EMBEDDED - updatePlatformUUID(); -#endif // !TARGET_OS_EMBEDDED + if (messageType == kIOMessageServiceBusyStateChange) { + addTimestamp(S_state, CFSTR("*QUIET&NAMED*")); + updateStore(); + } return; } static void -iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, CFMutableStringRef snapshot, int *count) +iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, int *count) { kern_return_t kr = kIOReturnSuccess;; io_object_t obj; @@ -2231,9 +3181,7 @@ iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, CFMutableStringRef kr = IORegistryEntryGetName(obj, name); if (kr != kIOReturnSuccess) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": captureBusy IORegistryEntryGetName returned 0x%x"), - kr); + SC_log(LOG_NOTICE, "IORegistryEntryGetName() returned 0x%x", kr); goto next; } @@ -2249,9 +3197,7 @@ iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, CFMutableStringRef case kIOReturnNotFound : break; default : - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": captureBusy IORegistryEntryGetLocationInPlane returned 0x%x"), - kr); + SC_log(LOG_NOTICE, "IORegistryEntryGetLocationInPlane() returned 0x%x", kr); CFRelease(str); goto next; } @@ -2261,9 +3207,7 @@ iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, CFMutableStringRef kr = IOServiceGetBusyStateAndTime(obj, &state, &busy_state, &accumulated_busy_time); if (kr != kIOReturnSuccess) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": captureBusy IOServiceGetBusyStateAndTime returned 0x%x"), - kr); + SC_log(LOG_NOTICE, "IOServiceGetBusyStateAndTime() returned 0x%x", kr); goto next; } @@ -2276,36 +3220,31 @@ iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, CFMutableStringRef CFStringRef path; if ((*count)++ == 0) { - CFStringAppend(snapshot, CFSTR("Busy services :")); + SC_log(LOG_ERR, "Busy services :"); } path = CFStringCreateByCombiningStrings(NULL, newNodes, CFSTR("/")); - CFStringAppendFormat(snapshot, NULL, - CFSTR("\n %@ [%s%s%s%d, %lld ms]"), - path, - (state & kIOServiceRegisteredState) ? "" : "!registered, ", - (state & kIOServiceMatchedState) ? "" : "!matched, ", - (state & kIOServiceInactiveState) ? "inactive, " : "", - busy_state, - accumulated_busy_time / kMillisecondScale); + SC_log(LOG_ERR, " %@ [%s%s%s%d, %lld ms]", + path, + (state & kIOServiceRegisteredState) ? "" : "!registered, ", + (state & kIOServiceMatchedState) ? "" : "!matched, ", + (state & kIOServiceInactiveState) ? "inactive, " : "", + busy_state, + accumulated_busy_time / kMillisecondScale); CFRelease(path); } kr = IORegistryIteratorEnterEntry(iterator); if (kr != kIOReturnSuccess) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": captureBusy IORegistryIteratorEnterEntry returned 0x%x"), - kr); + SC_log(LOG_NOTICE, "IORegistryIteratorEnterEntry() returned 0x%x", kr); goto next; } - iterateRegistryBusy(iterator, newNodes, snapshot, count); + iterateRegistryBusy(iterator, newNodes, count); kr = IORegistryIteratorExitEntry(iterator); if (kr != kIOReturnSuccess) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": captureBusy IORegistryIteratorExitEntry returned 0x%x"), - kr); + SC_log(LOG_NOTICE, "IORegistryIteratorExitEntry() returned 0x%x", kr); } next : @@ -2317,60 +3256,55 @@ iterateRegistryBusy(io_iterator_t iterator, CFArrayRef nodes, CFMutableStringRef return; } -static CF_RETURNS_RETAINED CFStringRef +static void captureBusy() { int count = 0; io_iterator_t iterator = MACH_PORT_NULL; kern_return_t kr; - CFMutableStringRef snapshot; - - snapshot = CFStringCreateMutable(NULL, 0); kr = IORegistryCreateIterator(kIOMasterPortDefault, kIOServicePlane, 0, &iterator); if (kr != kIOReturnSuccess) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": captureBusy IORegistryCreateIterator returned 0x%x"), - kr); - return snapshot; + SC_log(LOG_NOTICE, "IORegistryCreateIterator() returned 0x%x", kr); + return; } - iterateRegistryBusy(iterator, NULL, snapshot, &count); + iterateRegistryBusy(iterator, NULL, &count); if (count == 0) { - CFStringAppend(snapshot, CFSTR("w/no busy services")); + SC_log(LOG_ERR, "w/no busy services"); } IOObjectRelease(iterator); - return snapshot; } static void timerCallback(CFRunLoopTimerRef timer, void *info) { - CFStringRef snapshot; - +#pragma unused(timer) +#pragma unused(info) // We've been waiting for IOKit to quiesce and it just // hasn't happenned. Time to just move on! - addTimestamp(S_state, CFSTR("*TIMEOUT*")); + addTimestamp(S_state, kInterfaceNamerKey_Timeout); // log busy nodes - snapshot = captureBusy(); - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": timed out waiting for IOKit to quiesce\n%@"), - snapshot); - reportIssue("timed out waiting for IOKit to quiesce", snapshot); - CFRelease(snapshot); + SC_log(LOG_ERR, "timed out waiting for IOKit to quiesce"); + captureBusy(); quietCallback((void *)S_notify, MACH_PORT_NULL, 0, NULL); + + addTimestamp(S_state, CFSTR("*TIMEOUT&NAMED*")); + updateStore(); + return; } static Boolean setup_IOKit(CFBundleRef bundle) { +#pragma unused(bundle) uint32_t busy; kern_return_t kr; mach_port_t masterPort = MACH_PORT_NULL; @@ -2402,24 +3336,20 @@ setup_IOKit(CFBundleRef bundle) // notifications of new devices or state changes. kr = IOMasterPort(bootstrap_port, &masterPort); if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOMasterPort returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOMasterPort returned 0x%x", kr); goto done; } S_notify = IONotificationPortCreate(masterPort); if (S_notify == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IONotificationPortCreate failed")); + SC_log(LOG_ERR, "IONotificationPortCreate failed"); goto done; } // watch IOKit matching activity root = IORegistryEntryFromPath(masterPort, kIOServicePlane ":/"); if (root == MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IORegistryEntryFromPath failed")); + SC_log(LOG_ERR, "IORegistryEntryFromPath failed"); goto done; } @@ -2430,17 +3360,13 @@ setup_IOKit(CFBundleRef bundle) (void *)S_notify, // refCon &S_quiet); // notification if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOServiceAddInterestNotification returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOServiceAddInterestNotification returned 0x%x", kr); goto done; } kr = IOServiceGetBusyState(root, &busy); if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOServiceGetBusyState returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOServiceGetBusyState returned 0x%x", kr); goto done; } @@ -2453,8 +3379,7 @@ setup_IOKit(CFBundleRef bundle) timerCallback, NULL); if (S_timer == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": CFRunLoopTimerCreate failed")); + SC_log(LOG_ERR, "CFRunLoopTimerCreate failed"); goto done; } @@ -2468,9 +3393,7 @@ setup_IOKit(CFBundleRef bundle) (void *)S_notify, // refCon &S_stack); // notification if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOServiceAddMatchingNotification returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOServiceAddMatchingNotification returned 0x%x", kr); goto done; } @@ -2486,9 +3409,7 @@ setup_IOKit(CFBundleRef bundle) (void *)S_notify, // refCon &S_iter); // notification if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": IOServiceAddMatchingNotification returned 0x%x"), - kr); + SC_log(LOG_ERR, "IOServiceAddMatchingNotification returned 0x%x", kr); goto done; } @@ -2524,7 +3445,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, @@ -2532,7 +3453,7 @@ setup_IOKit(CFBundleRef bundle) updateBTPANInformation, NULL); } -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX ok = TRUE; @@ -2550,20 +3471,18 @@ setup_IOKit(CFBundleRef bundle) static Boolean 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) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesCreate() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_ERR, "SCPreferencesCreate() failed: %s", + SCErrorString(SCError())); return FALSE; } // register for change notifications. if (!SCPreferencesSetCallback(S_prefs, updateVirtualNetworkInterfaceConfiguration, NULL)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesSetCallBack() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_ERR, "SCPreferencesSetCallBack() failed: %s", SCErrorString(SCError())); CFRelease(S_prefs); return FALSE; } @@ -2571,9 +3490,7 @@ setup_Virtual(CFBundleRef bundle) // schedule if (!SCPreferencesScheduleWithRunLoop(S_prefs, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) { if (SCError() != kSCStatusNoStoreServer) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": SCPreferencesScheduleWithRunLoop() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_ERR, "SCPreferencesScheduleWithRunLoop() failed: %s", SCErrorString(SCError())); CFRelease(S_prefs); return FALSE; } @@ -2599,8 +3516,7 @@ exec_InterfaceNamer(void *arg) if (!isA_CFNumber(num) || !CFNumberGetValue(num, kCFNumberDoubleType, &S_stack_timeout) || (S_stack_timeout <= 0.0)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": " WAIT_STACK_TIMEOUT_KEY " value error")); + SC_log(LOG_NOTICE, WAIT_STACK_TIMEOUT_KEY " value error"); S_stack_timeout = WAIT_STACK_TIMEOUT_DEFAULT; } } @@ -2610,8 +3526,7 @@ exec_InterfaceNamer(void *arg) if (!isA_CFNumber(num) || !CFNumberGetValue(num, kCFNumberDoubleType, &S_quiet_timeout) || (S_quiet_timeout <= 0.0)) { - SCLog(TRUE, LOG_ERR, - CFSTR(MY_PLUGIN_NAME ": " WAIT_QUIET_TIMEOUT_KEY " value error")); + SC_log(LOG_NOTICE, WAIT_QUIET_TIMEOUT_KEY " value error"); S_quiet_timeout = WAIT_QUIET_TIMEOUT_DEFAULT; } } @@ -2627,12 +3542,6 @@ exec_InterfaceNamer(void *arg) goto error; } -#if !TARGET_OS_EMBEDDED - // keep launchd from SIGKILL'ing us until after the platform-uuid has - // been updated - S_vproc_transaction = vproc_transaction_begin(NULL); -#endif // !TARGET_OS_EMBEDDED - goto done; error : @@ -2680,13 +3589,10 @@ __private_extern__ void load_InterfaceNamer(CFBundleRef bundle, Boolean bundleVerbose) { +#pragma unused(bundleVerbose) pthread_attr_t tattr; pthread_t tid; - if (bundleVerbose) { - S_debug = TRUE; - } - CFRetain(bundle); // released in exec_InterfaceNamer pthread_attr_init(&tattr); @@ -2710,8 +3616,6 @@ main(int argc, char ** argv) _sc_log = FALSE; _sc_verbose = (argc > 1) ? TRUE : FALSE; - S_debug = _sc_verbose; - bundle = CFBundleGetMainBundle(); CFRetain(bundle); // released in exec_InterfaceNamer @@ -2721,47 +3625,7 @@ main(int argc, char ** argv) exit(0); return 0; } -#endif /* MAIN */ - -#ifdef TEST_PLATFORM_UUID -int -main(int argc, char ** argv) -{ - CFStringRef guid; - CFArrayRef interfaces; - - _sc_log = FALSE; - _sc_verbose = (argc > 1) ? TRUE : FALSE; - - S_dblist = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - interfaces = SCNetworkInterfaceCopyAll(); - if (interfaces != NULL) { - CFIndex i; - CFIndex n; - - n = CFArrayGetCount(interfaces); - for (i = 0; i < n; i++) { - CFDictionaryRef dict; - SCNetworkInterfaceRef interface; - - interface = CFArrayGetValueAtIndex(interfaces, i); - dict = createInterfaceDict(interface); - CFArrayAppendValue(S_dblist, dict); - CFRelease(dict); - } - CFRelease(interfaces); - } - - guid = copyEthernetUUID(); - SCPrint(TRUE, stdout, CFSTR("copyEthernetUUID() = %@\n"), (guid != NULL) ? guid : CFSTR("NULL")); - if (guid != NULL) CFRelease(guid); - - updatePlatformUUID(); - CFRelease(S_dblist); - exit(0); - return 0; -} -#endif /* TEST_PLATFORM_UUID */ +#endif /* MAIN */ #ifdef TEST_SNAPSHOT int diff --git a/src/configd/Plugins/KernelEventMonitor/Info.plist b/src/configd/Plugins/KernelEventMonitor/Info.plist index a56faba2c..8e3020d91 100644 --- a/src/configd/Plugins/KernelEventMonitor/Info.plist +++ b/src/configd/Plugins/KernelEventMonitor/Info.plist @@ -2,12 +2,14 @@ + Builtin + CFBundleDevelopmentRegion English CFBundleExecutable KernelEventMonitor CFBundleIdentifier - com.apple.SystemConfiguration.KernelEventMonitor + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,16 +17,14 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 Requires com.apple.SystemConfiguration.InterfaceNamer - Builtin - diff --git a/src/configd/Plugins/KernelEventMonitor/ev_dlil.c b/src/configd/Plugins/KernelEventMonitor/ev_dlil.c index 03b6834f5..27cbe055b 100644 --- a/src/configd/Plugins/KernelEventMonitor/ev_dlil.c +++ b/src/configd/Plugins/KernelEventMonitor/ev_dlil.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2006, 2009, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2019 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,44 +29,41 @@ */ #include "eventmon.h" -#include "cache.h" #include "ev_dlil.h" #include "ev_extra.h" -#ifndef kSCEntNetIdleRoute -#define kSCEntNetIdleRoute CFSTR("IdleRoute") -#endif /* kSCEntNetIdleRoute */ +static CFStringRef +create_interface_cfstring(const char * if_name) +{ + CFStringRef interface; + + interface = CFStringCreateWithCString(NULL, if_name, + kCFStringEncodingUTF8); + return (interface); +} static CFStringRef -create_interface_key(const char * if_name) +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); } static CFMutableDictionaryRef -copy_entity(CFStringRef key) +copy_mutable_dictionary(CFDictionaryRef dict) { - CFDictionaryRef dict; - CFMutableDictionaryRef newDict = NULL; + CFMutableDictionaryRef newDict; - dict = cache_SCDynamicStoreCopyValue(store, key); - if (dict != NULL) { - if (isA_CFDictionary(dict) != NULL) { - newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - } - CFRelease(dict); + if (isA_CFDictionary(dict) != NULL) { + newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); } - if (newDict == NULL) { + else { newDict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, @@ -75,17 +72,39 @@ copy_entity(CFStringRef key) return (newDict); } +static CFMutableDictionaryRef +copy_entity(CFStringRef key) +{ + CFDictionaryRef dict; + CFMutableDictionaryRef newDict = NULL; + + dict = SCDynamicStoreCopyValue(store, key); + newDict = copy_mutable_dictionary(dict); + if (dict != NULL) { + CFRelease(dict); + } + return (newDict); +} + static void interface_update_status(const char *if_name, + CFStringRef interface, CFBooleanRef active, boolean_t attach, - CFBooleanRef expensive) + CFBooleanRef expensive, boolean_t only_if_different) { CFStringRef key = NULL; - CFMutableDictionaryRef newDict = NULL; + CFMutableDictionaryRef newDict; + CFDictionaryRef oldDict; + + key = create_interface_key(interface); + oldDict = SCDynamicStoreCopyValue(store, key); + if (oldDict != NULL && isA_CFDictionary(oldDict) == NULL) { + CFRelease(oldDict); + oldDict = NULL; + } + newDict = copy_mutable_dictionary(oldDict); - key = create_interface_key(if_name); - newDict = copy_entity(key); /* if new status available, update cache */ if (active != NULL) { CFDictionarySetValue(newDict, kSCPropNetLinkActive, active); @@ -93,7 +112,7 @@ interface_update_status(const char *if_name, CFDictionaryRemoveValue(newDict, kSCPropNetLinkActive); } - if (attach == TRUE) { + if (attach) { /* the interface was attached, remove stale state */ CFDictionaryRemoveValue(newDict, kSCPropNetLinkDetaching); } @@ -104,32 +123,42 @@ interface_update_status(const char *if_name, CFDictionaryRemoveValue(newDict, kSCPropNetLinkExpensive); } - /* update status */ + /* update the SCDynamicStore */ if (CFDictionaryGetCount(newDict) > 0) { - cache_SCDynamicStoreSetValue(store, key, newDict); + /* set the value */ + if (!only_if_different + || oldDict == NULL + || !CFEqual(oldDict, newDict)) { + SC_log(LOG_DEBUG, "Update interface link status: %s: %@", if_name, newDict); + SCDynamicStoreSetValue(store, key, newDict); + } } else { - cache_SCDynamicStoreRemoveValue(store, key); + /* remove the value */ + if (oldDict != NULL) { + SC_log(LOG_DEBUG, "Update interface link status: %s: ", if_name); + } + SCDynamicStoreRemoveValue(store, key); } CFRelease(key); CFRelease(newDict); + if (oldDict != NULL) { + CFRelease(oldDict); + } return; } #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); } @@ -139,14 +168,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); @@ -156,11 +188,14 @@ interface_update_quality_metric(const char *if_name, /* update status */ if (CFDictionaryGetCount(newDict) > 0) { - cache_SCDynamicStoreSetValue(store, key, newDict); + SC_log(LOG_DEBUG, "Update interface link quality: %s: %@", if_name, newDict); + SCDynamicStoreSetValue(store, key, newDict); } else { - cache_SCDynamicStoreRemoveValue(store, key); + SC_log(LOG_DEBUG, "Update interface link quality: %s: ", if_name); + SCDynamicStoreRemoveValue(store, key); } + CFRelease(interface); CFRelease(key); CFRelease(newDict); return; @@ -177,21 +212,23 @@ link_update_quality_metric(const char *if_name) sock = dgram_socket(AF_INET); if (sock == -1) { - SCLog(TRUE, LOG_NOTICE, CFSTR("socket_get_link_quality: socket open failed, %s"), strerror(errno)); goto done; } - bzero((char *)&ifr, sizeof(ifr)); + memset((char *)&ifr, 0, sizeof(ifr)); snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", if_name); if (ioctl(sock, SIOCGIFLINKQUALITYMETRIC, (caddr_t)&ifr) != -1) { quality = ifr.ifr_link_quality_metric; } -done: + done: + interface_update_quality_metric(if_name, quality); - if (sock != -1) + + if (sock != -1) { close(sock); + } return; } @@ -200,17 +237,14 @@ done: #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); } @@ -225,12 +259,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); @@ -250,7 +286,9 @@ interface_update_link_issues(const char *if_name, CFDictionarySetValue(newDict, kSCPropNetLinkIssuesTimeStamp, timeStamp); CFRelease(timeStamp); - cache_SCDynamicStoreSetValue(store, key, newDict); + SC_log(LOG_DEBUG, "Update interface link issues: %s: %@", if_name, newDict); + SCDynamicStoreSetValue(store, key, newDict); + CFRelease(interface); CFRelease(newDict); CFRelease(key); return; @@ -262,65 +300,90 @@ __private_extern__ void interface_detaching(const char *if_name) { + CFStringRef interface; CFStringRef key; CFMutableDictionaryRef newDict; - key = create_interface_key(if_name); + SC_log(LOG_DEBUG, "Detach interface: %s", 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); + 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; - key = create_interface_key(if_name); - cache_SCDynamicStoreRemoveValue(store, key); + SC_log(LOG_DEBUG, "Remove interface: %s", if_name); + + interface = create_interface_cfstring(if_name); + + key = create_interface_key(interface); + SCDynamicStoreRemoveValue(store, key); + CFRelease(key); + + key = create_nat64_key(interface); + SCDynamicStoreRemoveValue(store, key); CFRelease(key); #ifdef KEV_DL_LINK_QUALITY_METRIC_CHANGED - key = create_linkquality_key(if_name); - cache_SCDynamicStoreRemoveValue(store, key); + key = create_linkquality_key(interface); + SCDynamicStoreRemoveValue(store, key); CFRelease(key); #endif /* KEV_DL_LINK_QUALITY_METRIC_CHANGED */ #ifdef KEV_DL_ISSUES - key = create_link_issues_key(if_name); - cache_SCDynamicStoreRemoveValue(store, key); + key = create_link_issues_key(interface); + 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) +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; + CFBooleanRef expensive = NULL; struct ifmediareq ifm; int sock; sock = dgram_socket(AF_INET); if (sock == -1) { - SCLog(TRUE, LOG_NOTICE, CFSTR("link_update_status: socket open failed, %s"), strerror(errno)); return; } /* get "Link" */ - bzero((char *)&ifm, sizeof(ifm)); - (void) strncpy(ifm.ifm_name, if_name, sizeof(ifm.ifm_name)); + memset((char *)&ifm, 0, sizeof(ifm)); + (void) strlcpy(ifm.ifm_name, if_name, sizeof(ifm.ifm_name)); - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) { + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)&ifm) == -1) { /* if media status not available for this interface */ goto update; } @@ -343,68 +406,191 @@ link_update_status(const char *if_name, boolean_t attach) update: - /* get "Expensive" */ - expensive = interface_update_expensive(if_name); + if ((active == NULL) || CFBooleanGetValue(active)) { + /* + * if link status not available or active (link UP), + * set "Expensive" + */ + expensive = interface_update_expensive(if_name); + } /* update status */ - interface_update_status(if_name, active, attach, expensive); + interface_update_status(if_name, interface, active, attach, expensive, only_if_different); close(sock); return; } __private_extern__ void -link_add(const char *if_name) +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; + + interface = create_interface_cfstring(if_name); + key = create_interface_key(interface); + dict = SCDynamicStoreCopyValue(store, key); + if (dict != NULL) { + /* it's already present, don't update */ + CFRelease(dict); + goto done; + } + S_link_update_status(if_name, interface, FALSE, FALSE); + dict = SCDynamicStoreCopyValue(store, key); + if (dict != NULL) { + /* our action made it appear */ + messages_add_msg_with_arg("added missing link status", if_name); + CFRelease(dict); + } + done: + CFRelease(interface); + CFRelease(key); + return; +} + +__private_extern__ +CFMutableArrayRef +interfaceListCopy(void) { - CFStringRef interface; CFStringRef cacheKey; CFDictionaryRef dict; - CFMutableDictionaryRef newDict = NULL; - CFArrayRef ifList; - CFMutableArrayRef newIFList = NULL; - - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); - cacheKey = SCDynamicStoreKeyCreateNetworkInterface(NULL, - kSCDynamicStoreDomainState); - - dict = cache_SCDynamicStoreCopyValue(store, cacheKey); - if (dict) { - if (isA_CFDictionary(dict)) { - newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - ifList = CFDictionaryGetValue(newDict, kSCPropNetInterfaces); - if (isA_CFArray(ifList)) { - newIFList = CFArrayCreateMutableCopy(NULL, 0, ifList); + CFMutableArrayRef ret_ifList = NULL; + + cacheKey = SCDynamicStoreKeyCreateNetworkInterface(NULL, + kSCDynamicStoreDomainState); + dict = SCDynamicStoreCopyValue(store, cacheKey); + CFRelease(cacheKey); + if (dict != NULL) { + if (isA_CFDictionary(dict) != NULL) { + CFArrayRef ifList; + + ifList = CFDictionaryGetValue(dict, kSCPropNetInterfaces); + if (isA_CFArray(ifList) != NULL) { + ret_ifList = CFArrayCreateMutableCopy(NULL, 0, ifList); } } CFRelease(dict); } + if (ret_ifList == NULL) { + ret_ifList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + return (ret_ifList); +} - if (!newDict) { - newDict = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); + +__private_extern__ +void +interfaceListUpdate(CFArrayRef ifList) +{ + CFStringRef cacheKey; + CFDictionaryRef dict; + + cacheKey = SCDynamicStoreKeyCreateNetworkInterface(NULL, + kSCDynamicStoreDomainState); + dict = SCDynamicStoreCopyValue(store, cacheKey); + if (dict != NULL && isA_CFDictionary(dict) == NULL) { + CFRelease(dict); + dict = NULL; } + if (dict == NULL) { + dict = CFDictionaryCreate(NULL, + (const void * *)&kSCPropNetInterfaces, + (const void * *)&ifList, + 1, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + SCDynamicStoreSetValue(store, cacheKey, dict); + CFRelease(dict); - if (!newIFList) { - newIFList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } + else { + CFMutableDictionaryRef newDict; - if (CFArrayContainsValue(newIFList, - CFRangeMake(0, CFArrayGetCount(newIFList)), - interface) == FALSE) { - CFArrayAppendValue(newIFList, interface); - CFDictionarySetValue(newDict, kSCPropNetInterfaces, newIFList); + newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); + CFRelease(dict); + CFDictionarySetValue(newDict, kSCPropNetInterfaces, ifList); + SCDynamicStoreSetValue(store, cacheKey, newDict); + CFRelease(newDict); } - cache_SCDynamicStoreSetValue(store, cacheKey, newDict); - link_update_status(if_name, TRUE); + CFRelease(cacheKey); + return; +} + + +__private_extern__ +Boolean +interfaceListAddInterface(CFMutableArrayRef ifList, const char * if_name) +{ + Boolean added = FALSE; + CFStringRef interface; + + interface = create_interface_cfstring(if_name); + if (!CFArrayContainsValue(ifList, + CFRangeMake(0, CFArrayGetCount(ifList)), + interface)) { + /* interface was added, prime the link-specific values */ + added = TRUE; + CFArrayAppendValue(ifList, interface); + link_update_status(if_name, TRUE, FALSE); #ifdef KEV_DL_LINK_QUALITY_METRIC_CHANGED - link_update_quality_metric(if_name); + link_update_quality_metric(if_name); #endif /* KEV_DL_LINK_QUALITY_METRIC_CHANGED */ - CFRelease(cacheKey); + } + else { + /* only update the link status if it is different */ + link_update_status(if_name, FALSE, TRUE); + } CFRelease(interface); - if (newDict) CFRelease(newDict); - if (newIFList) CFRelease(newIFList); + return (added); +} + + +static Boolean +interfaceListRemoveInterface(CFMutableArrayRef ifList, const char * if_name) +{ + CFStringRef interface; + CFIndex where; + + interface = create_interface_cfstring(if_name); + where = CFArrayGetFirstIndexOfValue(ifList, + CFRangeMake(0, CFArrayGetCount(ifList)), + interface); + CFRelease(interface); + if (where != kCFNotFound) { + CFArrayRemoveValueAtIndex(ifList, where); + interface_remove(if_name); + } + return (where != kCFNotFound); +} + + +__private_extern__ +void +link_add(const char *if_name) +{ + CFMutableArrayRef ifList; + + ifList = interfaceListCopy(); + if (interfaceListAddInterface(ifList, if_name)) { + /* interface was added, update the global list */ + messages_add_msg_with_arg("link_add", if_name); + interfaceListUpdate(ifList); + config_new_interface(if_name); + } + CFRelease(ifList); return; } @@ -413,51 +599,34 @@ __private_extern__ void link_remove(const char *if_name) { - CFStringRef interface; - CFStringRef cacheKey; - CFDictionaryRef dict; - CFMutableDictionaryRef newDict = NULL; - CFArrayRef ifList; - CFMutableArrayRef newIFList = NULL; - CFIndex i; - - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); - cacheKey = SCDynamicStoreKeyCreateNetworkInterface(NULL, - kSCDynamicStoreDomainState); - - dict = cache_SCDynamicStoreCopyValue(store, cacheKey); - if (dict) { - if (isA_CFDictionary(dict)) { - newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - ifList = CFDictionaryGetValue(newDict, kSCPropNetInterfaces); - if (isA_CFArray(ifList)) { - newIFList = CFArrayCreateMutableCopy(NULL, 0, ifList); - } - } - CFRelease(dict); - } + CFMutableArrayRef ifList; - if (!newIFList || - ((i = CFArrayGetFirstIndexOfValue(newIFList, - CFRangeMake(0, CFArrayGetCount(newIFList)), - interface)) == kCFNotFound) - ) { - /* we're not tracking this interface */ - goto done; + ifList = interfaceListCopy(); + if (interfaceListRemoveInterface(ifList, if_name)) { + /* interface was removed, update the global list */ + interfaceListUpdate(ifList); } + CFRelease(ifList); + return; +} - CFArrayRemoveValueAtIndex(newIFList, i); - CFDictionarySetValue(newDict, kSCPropNetInterfaces, newIFList); - cache_SCDynamicStoreSetValue(store, cacheKey, newDict); - - interface_remove(if_name); - done: +__private_extern__ +void +interface_update_delegation(const char *if_name) +{ + CFStringRef interface; + CFStringRef key; - CFRelease(cacheKey); + interface = create_interface_cfstring(if_name); + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + interface, + kSCEntNetInterfaceDelegation); + SC_log(LOG_DEBUG, "Post interface delegation change: %s", if_name); + SCDynamicStoreNotifyValue(store, key); + CFRelease(key); CFRelease(interface); - if (newDict) CFRelease(newDict); - if (newIFList) CFRelease(newIFList); return; } @@ -476,7 +645,7 @@ socket_reference_count(const char* if_name) { return (ref); } - bzero((char *)&ifr, sizeof(ifr)); + memset((char *)&ifr, 0, sizeof(ifr)); snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", if_name); if (ioctl(s, SIOCGIFGETRTREFCNT, (caddr_t)&ifr) != -1) { @@ -493,28 +662,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); - cache_SCDynamicStoreNotifyValue(store, key); + SC_log(LOG_DEBUG, "Post interface idle: %s", if_name); + SCDynamicStoreNotifyValue(store, key); CFRelease(key); - CFRelease(if_name_cf); + CFRelease(interface); return; } #endif // KEV_DL_IF_IDLE_ROUTE_REFCNT diff --git a/src/configd/Plugins/KernelEventMonitor/ev_dlil.h b/src/configd/Plugins/KernelEventMonitor/ev_dlil.h index ae3b00128..1deda21e1 100644 --- a/src/configd/Plugins/KernelEventMonitor/ev_dlil.h +++ b/src/configd/Plugins/KernelEventMonitor/ev_dlil.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002, 2004, 2005, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2015, 2019 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@ */ @@ -36,6 +36,8 @@ __BEGIN_DECLS void interface_detaching (const char *if_name); +void interface_update_delegation (const char *if_name); + void interface_update_idle_state (const char *if_name); void interface_update_link_issues (const char *if_name, @@ -51,7 +53,18 @@ void link_add (const char *if_name); void link_remove (const char *if_name); -void link_update_status (const char *if_name, boolean_t attach); +void link_update_status (const char *if_name, boolean_t attach, boolean_t only_if_different); + +void link_update_status_if_missing (const char * if_name); + +CFMutableArrayRef +interfaceListCopy(void); + +void +interfaceListUpdate(CFArrayRef ifList); + +Boolean +interfaceListAddInterface(CFMutableArrayRef ifList, const char * if_name); __END_DECLS diff --git a/src/configd/Plugins/KernelEventMonitor/ev_extra.m b/src/configd/Plugins/KernelEventMonitor/ev_extra.m index 9b8379908..3af8018e0 100644 --- a/src/configd/Plugins/KernelEventMonitor/ev_extra.m +++ b/src/configd/Plugins/KernelEventMonitor/ev_extra.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2013-2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,16 +29,26 @@ */ -#include -#include -#include - #include "eventmon.h" #include "ev_extra.h" + +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR +static Boolean +haveMobileWiFi() +{ + void * volatile fn_WeakFunction = (void *)&(WiFiManagerClientCreate); + Boolean haveFramework; + + haveFramework = (fn_WeakFunction != NULL) ? TRUE : FALSE; + return haveFramework; +} +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR + + static CFBooleanRef -is_expensive(SCNetworkInterfaceRef interface) +is_expensive(SCNetworkInterfaceRef _Nonnull interface) { CFBooleanRef expensive = NULL; CFStringRef interfaceType; @@ -78,11 +88,17 @@ ifexpensive_set(int s, const char * name, uint32_t expensive) { #if defined(SIOCSIFEXPENSIVE) && !defined(MAIN) struct ifreq ifr; + int ret; - bzero(&ifr, sizeof(ifr)); + memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); ifr.ifr_expensive = expensive; - return (ioctl(s, SIOCSIFEXPENSIVE, &ifr)); + ret = ioctl(s, SIOCSIFEXPENSIVE, &ifr); + if ((ret == -1) && (errno != EPERM)) { + SC_log(LOG_ERR, "%s: ioctl(SIOCSIFEXPENSIVE) failed: %s", name, strerror(errno)); + } + + return ret; #else // defined(SIOCSIFEXPENSIVE) && !defined(MAIN) return 0; #endif // defined(SIOCSIFEXPENSIVE) && !defined(MAIN) @@ -125,7 +141,14 @@ interface_update_expensive(const char *if_name) int dgram_socket(int domain) { - return (socket(domain, SOCK_DGRAM, 0)); + int s; + + s = socket(domain, SOCK_DGRAM, 0); + if (s == -1) { + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + } + + return s; } int diff --git a/src/configd/Plugins/KernelEventMonitor/ev_ipv4.c b/src/configd/Plugins/KernelEventMonitor/ev_ipv4.c index bb5d6f157..55c4cf294 100644 --- a/src/configd/Plugins/KernelEventMonitor/ev_ipv4.c +++ b/src/configd/Plugins/KernelEventMonitor/ev_ipv4.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2014 Apple Inc. All rights reserved. + * Copyright (c) 2002-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,19 +29,8 @@ */ #include "eventmon.h" -#include "cache.h" #include "ev_ipv4.h" -#ifndef kSCEntNetIPv4ARPCollision -#define kSCEntNetIPv4ARPCollision CFSTR("IPv4ARPCollision") -#endif /* kSCEntNetIPv4ARPCollision */ - -#if !TARGET_OS_IPHONE -#ifndef kSCEntNetIPv4PortInUse -#define kSCEntNetIPv4PortInUse CFSTR("PortInUse") -#endif /* kSCEntNetIPv4PortInUse */ -#endif /* !TARGET_OS_IPHONE */ - #define IP_FORMAT "%d.%d.%d.%d" #define IP_CH(ip, i) (((u_char *)(ip))[i]) #define IP_LIST(ip) IP_CH(ip,0),IP_CH(ip,1),IP_CH(ip,2),IP_CH(ip,3) @@ -80,7 +69,7 @@ copyIF(CFStringRef key, CFMutableDictionaryRef oldIFs, CFMutableDictionaryRef ne if (CFDictionaryGetValueIfPresent(newIFs, key, (const void **)&dict)) { newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); } else { - dict = cache_SCDynamicStoreCopyValue(store, key); + dict = SCDynamicStoreCopyValue(store, key); if (dict) { CFDictionarySetValue(oldIFs, key, dict); if (isA_CFDictionary(dict)) { @@ -116,9 +105,17 @@ updateStore(const void *key, const void *value, void *context) if (!dict || !CFEqual(dict, newDict)) { if (CFDictionaryGetCount(newDict) > 0) { - cache_SCDynamicStoreSetValue(store, key, newDict); + SC_log(LOG_DEBUG, "Update interface configuration: %@: %@", key, newDict); + SCDynamicStoreSetValue(store, key, newDict); } else if (dict) { - cache_SCDynamicStoreRemoveValue(store, key); + CFDictionaryRef oldDict; + + oldDict = SCDynamicStoreCopyValue(store, key); + if (oldDict != NULL) { + SC_log(LOG_DEBUG, "Update interface configuration: %@: ", key); + CFRelease(oldDict); + } + SCDynamicStoreRemoveValue(store, key); } network_changed = TRUE; } @@ -151,7 +148,7 @@ ipv4_interface_update(struct ifaddrs *ifap, const char *if_name) if (!ifap) { if (getifaddrs(&ifap_temp) == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("getifaddrs() failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno)); goto error; } ifap = ifap_temp; @@ -260,7 +257,8 @@ ipv4_arp_collision(const char *if_name, struct in_addr ip_addr, int hw_len, cons CFStringAppendFormat(key, NULL, CFSTR("%s%02x"), (i == 0) ? "/" : ":", hw_addr_bytes[i]); } - cache_SCDynamicStoreNotifyValue(store, key); + SC_log(LOG_DEBUG, "Post ARP collision: %@", key); + SCDynamicStoreNotifyValue(store, key); CFRelease(key); CFRelease(prefix); CFRelease(if_name_cf); @@ -281,14 +279,15 @@ ipv4_port_in_use(uint16_t port, pid_t req_pid) kSCEntNetIPv4, kSCEntNetIPv4PortInUse, port, req_pid); - cache_SCDynamicStoreNotifyValue(store, key); + SC_log(LOG_DEBUG, "Post port-in-use: %@", key); + SCDynamicStoreNotifyValue(store, key); CFRelease(key); return; } #endif /* !TARGET_OS_IPHONE */ static void -interface_notify_entity(const char * if_name, CFStringRef entity) +interface_notify_entity(const char * if_name, const char * type, CFStringRef entity) { CFStringRef if_name_cf; CFStringRef key; @@ -300,7 +299,8 @@ interface_notify_entity(const char * if_name, CFStringRef entity) if_name_cf, entity); CFRelease(if_name_cf); - cache_SCDynamicStoreNotifyValue(store, key); + SC_log(LOG_DEBUG, "Post %s: %@", type, key); + SCDynamicStoreNotifyValue(store, key); CFRelease(key); return; } @@ -308,13 +308,13 @@ interface_notify_entity(const char * if_name, CFStringRef entity) __private_extern__ void ipv4_router_arp_failure(const char * if_name) { - interface_notify_entity(if_name, kSCEntNetIPv4RouterARPFailure); + interface_notify_entity(if_name, "Router ARP failure", kSCEntNetIPv4RouterARPFailure); return; } __private_extern__ void ipv4_router_arp_alive(const char * if_name) { - interface_notify_entity(if_name, kSCEntNetIPv4RouterARPAlive); + interface_notify_entity(if_name, "Router ARP alive", kSCEntNetIPv4RouterARPAlive); return; } diff --git a/src/configd/Plugins/KernelEventMonitor/ev_ipv6.c b/src/configd/Plugins/KernelEventMonitor/ev_ipv6.c index 08114b270..4b3e6bc70 100644 --- a/src/configd/Plugins/KernelEventMonitor/ev_ipv6.c +++ b/src/configd/Plugins/KernelEventMonitor/ev_ipv6.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2007, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2011, 2013, 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@ */ @@ -30,7 +30,6 @@ #include "eventmon.h" -#include "cache.h" #include "ev_ipv6.h" #define s6_addr16 __u6_addr.__u6_addr16 @@ -41,6 +40,9 @@ #endif #endif /* NOTYET */ +#ifndef kSCEntNetIPv6DuplicatedAddress +#define kSCEntNetIPv6DuplicatedAddress CFSTR("IPv6DuplicatedAddress") +#endif /* kSCEntNetIPv6DuplicatedAddress */ static void appendAddress(CFMutableDictionaryRef dict, CFStringRef key, struct sockaddr_in6 *sin6) @@ -48,7 +50,7 @@ appendAddress(CFMutableDictionaryRef dict, CFStringRef key, struct sockaddr_in6 CFStringRef addr; CFArrayRef addrs; CFMutableArrayRef newAddrs; - char str[64]; + char str[INET6_ADDRSTRLEN]; addrs = CFDictionaryGetValue(dict, key); if (addrs) { @@ -58,7 +60,7 @@ appendAddress(CFMutableDictionaryRef dict, CFStringRef key, struct sockaddr_in6 } if (inet_ntop(AF_INET6, (const void *)&sin6->sin6_addr, str, sizeof(str)) == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("inet_ntop() failed: %s"), strerror(errno)); + SC_log(LOG_INFO, "inet_ntop() failed: %s", strerror(errno)); str[0] = '\0'; } @@ -104,7 +106,7 @@ appendPrefixLen(CFMutableDictionaryRef dict, struct sockaddr_in6 *sin6) CFArrayRef prefixLens; CFMutableArrayRef newPrefixLens; - register int byte; + register size_t byte; register int bit; int plen = 0; @@ -193,7 +195,7 @@ copyIF(CFStringRef key, CFMutableDictionaryRef oldIFs, CFMutableDictionaryRef ne if (CFDictionaryGetValueIfPresent(newIFs, key, (const void **)&dict)) { newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); } else { - dict = cache_SCDynamicStoreCopyValue(store, key); + dict = SCDynamicStoreCopyValue(store, key); if (dict) { CFDictionarySetValue(oldIFs, key, dict); if (isA_CFDictionary(dict)) { @@ -232,9 +234,17 @@ updateStore(const void *key, const void *value, void *context) if (!dict || !CFEqual(dict, newDict)) { if (CFDictionaryGetCount(newDict) > 0) { - cache_SCDynamicStoreSetValue(store, key, newDict); + SC_log(LOG_DEBUG, "Update interface configuration: %@: %@", key, newDict); + SCDynamicStoreSetValue(store, key, newDict); } else if (dict) { - cache_SCDynamicStoreRemoveValue(store, key); + CFDictionaryRef oldDict; + + oldDict = SCDynamicStoreCopyValue(store, key); + if (oldDict != NULL) { + SC_log(LOG_DEBUG, "Update interface configuration: %@: ", key); + CFRelease(oldDict); + } + SCDynamicStoreRemoveValue(store, key); } network_changed = TRUE; } @@ -268,7 +278,7 @@ interface_update_ipv6(struct ifaddrs *ifap, const char *if_name) if (!ifap) { if (getifaddrs(&ifap_temp) == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("getifaddrs() failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno)); goto error; } ifap = ifap_temp; @@ -295,7 +305,6 @@ interface_update_ipv6(struct ifaddrs *ifap, const char *if_name) if (sock == -1) { sock = dgram_socket(AF_INET6); if (sock == -1) { - SCLog(TRUE, LOG_NOTICE, CFSTR("interface_update_ipv6: socket open failed, %s"), strerror(errno)); goto error; } } @@ -326,14 +335,12 @@ interface_update_ipv6(struct ifaddrs *ifap, const char *if_name) } } - bzero((char *)&ifr6, sizeof(ifr6)); - strncpy(ifr6.ifr_name, ifa->ifa_name, sizeof(ifr6.ifr_name)); + memset((char *)&ifr6, 0, sizeof(ifr6)); + strlcpy(ifr6.ifr_name, ifa->ifa_name, sizeof(ifr6.ifr_name)); ifr6.ifr_addr = *sin6; if (ioctl(sock, SIOCGIFAFLAG_IN6, &ifr6) == -1) { /* if flags not available for this address */ - SCLog(TRUE, - (errno != EADDRNOTAVAIL) ? LOG_NOTICE : LOG_DEBUG, - CFSTR("interface_update_ipv6: ioctl failed, %s"), + SC_log((errno != EADDRNOTAVAIL) ? LOG_NOTICE : LOG_DEBUG, "ioctl() failed: %s", strerror(errno)); } @@ -402,3 +409,70 @@ interface_update_ipv6(struct ifaddrs *ifap, const char *if_name) return; } + +__private_extern__ +void +ipv6_duplicated_address(const char * if_name, const struct in6_addr * addr, + int hw_len, const void * hw_addr) +{ + uint8_t * hw_addr_bytes = (uint8_t *)hw_addr; + int i; + CFStringRef if_name_cf; + CFMutableStringRef key; + char ntopbuf[INET6_ADDRSTRLEN]; + CFStringRef prefix; + + if_name_cf = CFStringCreateWithCString(NULL, if_name, + kCFStringEncodingASCII); + prefix = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + if_name_cf, + kSCEntNetIPv6DuplicatedAddress); + ntopbuf[0] = '\0'; + (void)inet_ntop(AF_INET6, addr, ntopbuf, sizeof(ntopbuf)); + key = CFStringCreateMutableCopy(NULL, 0, prefix); + CFStringAppendFormat(key, NULL, CFSTR("/%s"), ntopbuf); + for (i = 0; i < hw_len; i++) { + CFStringAppendFormat(key, NULL, CFSTR("%s%02x"), + (i == 0) ? "/" : ":", hw_addr_bytes[i]); + } + SCDynamicStoreNotifyValue(store, key); + CFRelease(key); + CFRelease(prefix); + CFRelease(if_name_cf); +} + +__private_extern__ +void +nat64_prefix_request(const char *if_name) +{ + CFStringRef if_name_cf; + CFStringRef key; + + if_name_cf = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingASCII); + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + if_name_cf, + kSCEntNetNAT64PrefixRequest); + CFRelease(if_name_cf); + SC_log(LOG_DEBUG, "Post NAT64 prefix request: %@", key); + SCDynamicStoreNotifyValue(store, key); + CFRelease(key); +} + +__private_extern__ void +ipv6_router_expired(const char *if_name) +{ + CFStringRef if_name_cf; + CFStringRef key; + + if_name_cf = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingASCII); + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + if_name_cf, + kSCEntNetIPv6RouterExpired); + CFRelease(if_name_cf); + SC_log(LOG_DEBUG, "Post IPv6 Router Expired: %@", key); + SCDynamicStoreNotifyValue(store, key); + CFRelease(key); +} diff --git a/src/configd/Plugins/KernelEventMonitor/ev_ipv6.h b/src/configd/Plugins/KernelEventMonitor/ev_ipv6.h index a00925524..88f810ea3 100644 --- a/src/configd/Plugins/KernelEventMonitor/ev_ipv6.h +++ b/src/configd/Plugins/KernelEventMonitor/ev_ipv6.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002, 2004, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2002, 2004, 2011, 2012, 2015, 2017 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@ */ @@ -36,7 +36,11 @@ __BEGIN_DECLS -void interface_update_ipv6 (struct ifaddrs *ifap, const char *if_name); +void interface_update_ipv6(struct ifaddrs *ifap, const char *if_name); +void ipv6_duplicated_address(const char * if_name, const struct in6_addr * addr, + int hw_len, const void * hw_addr); +void nat64_prefix_request(const char *if_name); +void ipv6_router_expired(const char *if_name); __END_DECLS diff --git a/src/configd/Plugins/KernelEventMonitor/eventmon.c b/src/configd/Plugins/KernelEventMonitor/eventmon.c index 8249a917b..9e0a245d2 100644 --- a/src/configd/Plugins/KernelEventMonitor/eventmon.c +++ b/src/configd/Plugins/KernelEventMonitor/eventmon.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2019 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@ */ @@ -54,152 +54,128 @@ */ #include "eventmon.h" -#include "cache.h" #include "ev_dlil.h" #include "ev_ipv4.h" #include "ev_ipv6.h" #include - -// from ip_fw2.c -#define KEV_LOG_SUBCLASS 10 - -static const char *inetEventName[] = { - "", - "INET address added", - "INET address changed", - "INET address deleted", - "INET destination address changed", - "INET broadcast address changed", - "INET netmask changed", - "INET ARP collision", - "INET port in use", -}; - -static const char *dlEventName[] = { - "", - "KEV_DL_SIFFLAGS", - "KEV_DL_SIFMETRICS", - "KEV_DL_SIFMTU", - "KEV_DL_SIFPHYS", - "KEV_DL_SIFMEDIA", - "KEV_DL_SIFGENERIC", - "KEV_DL_ADDMULTI", - "KEV_DL_DELMULTI", - "KEV_DL_IF_ATTACHED", - "KEV_DL_IF_DETACHING", - "KEV_DL_IF_DETACHED", - "KEV_DL_LINK_OFF", - "KEV_DL_LINK_ON", - "KEV_DL_PROTO_ATTACHED", - "KEV_DL_PROTO_DETACHED", - "KEV_DL_LINK_ADDRESS_CHANGED", - "KEV_DL_WAKEFLAGS_CHANGED", -#ifdef KEV_DL_IF_IDLE_ROUTE_REFCNT - "KEV_DL_IF_IDLE_ROUTE_REFCNT", -#endif -#ifdef KEV_DL_IFCAP_CHANGED - "KEV_DL_IFCAP_CHANGED", -#endif -#ifdef KEV_DL_LINK_QUALITY_METRIC_CHANGED - "KEV_DL_LINK_QUALITY_METRIC_CHANGED", -#endif -#ifdef KEV_DL_NODE_PRESENCE - "KEV_DL_NODE_PRESENCE" -#endif -#ifdef KEV_DL_NODE_ABSENCE - "KEV_DL_NODE_ABSENCE" -#endif -#ifdef KEV_DL_MASTER_ELECTED - "KEV_DL_MASTER_ELECTED" -#endif -#ifdef KEV_DL_ISSUES - "KEV_DL_ISSUES", -#endif -#ifdef KEV_DL_IFDELEGATE_CHANGED - "KEV_DL_IFDELEGATE_CHANGED", -#endif -}; - -static const char *inet6EventName[] = { - "", - "KEV_INET6_NEW_USER_ADDR", - "KEV_INET6_CHANGED_ADDR", - "KEV_INET6_ADDR_DELETED", - "KEV_INET6_NEW_LL_ADDR", - "KEV_INET6_NEW_RTADV_ADDR", - "KEV_INET6_DEFROUTER" -}; - -#ifdef KEV_ND6_SUBCLASS -static const char *nd6EventNameString[] = { - "", - "KEV_ND6_RA" -}; -#endif // KEV_ND6_SUBCLASS +#include +#include +#include +#include static dispatch_queue_t S_kev_queue; static dispatch_source_t S_kev_source; -__private_extern__ Boolean network_changed = FALSE; -__private_extern__ SCDynamicStoreRef store = NULL; -__private_extern__ Boolean _verbose = FALSE; +__private_extern__ Boolean network_changed = FALSE; +__private_extern__ SCDynamicStoreRef store = NULL; +__private_extern__ Boolean _verbose = FALSE; -__private_extern__ -int -dgram_socket(int domain) + +__private_extern__ os_log_t +__log_KernelEventMonitor(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "KernelEventMonitor"); + } + + return log; +} + + +#define MESSAGES_MAX 100 +static CFMutableArrayRef S_messages; +static Boolean S_messages_modified; + +static void +messages_init(void) { - return (socket(domain, SOCK_DGRAM, 0)); + S_messages = CFArrayCreateMutable(NULL, + 0, + &kCFTypeArrayCallBacks); + return; } -static int -ifflags_set(int s, char * name, short flags) +static void +messages_free(void) { - struct ifreq ifr; - int ret; - - bzero(&ifr, sizeof(ifr)); - strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - ret = ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr); - if (ret == -1) { - return (ret); - } - ifr.ifr_flags |= flags; - return (ioctl(s, SIOCSIFFLAGS, &ifr)); + if (S_messages != NULL) { + CFRelease(S_messages); + S_messages = NULL; + } + return; } -static int -ifflags_clear(int s, char * name, short flags) +static Boolean +messages_should_add_message(void) { - struct ifreq ifr; - int ret; - - bzero(&ifr, sizeof(ifr)); - strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - ret = ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr); - if (ret == -1) { - return (ret); - } - ifr.ifr_flags &= ~flags; - return (ioctl(s, SIOCSIFFLAGS, &ifr)); + if (S_messages == NULL + || CFArrayGetCount(S_messages) >= MESSAGES_MAX) { + return (FALSE); + } + return (TRUE); } static void -mark_if_up(char * name) +messages_add_message(CFStringRef message) { - int s = dgram_socket(AF_INET); - if (s == -1) - return; - ifflags_set(s, name, IFF_UP); - close(s); + if (messages_should_add_message()) { + CFArrayAppendValue(S_messages, message); + S_messages_modified = TRUE; + } + return; +} + +__private_extern__ void +messages_add_msg_with_arg(const char * msg, const char * arg) +{ + if (messages_should_add_message()) { + CFStringRef str; + + str = CFStringCreateWithFormat(NULL, NULL, + CFSTR("%12.8f: %s %s"), + CFAbsoluteTimeGetCurrent(), + msg, arg); + messages_add_message(str); + CFRelease(str); + } + return; } static void -mark_if_down(char * name) +messages_post(void) { - int s = dgram_socket(AF_INET); - if (s == -1) - return; - ifflags_clear(s, name, IFF_UP); - close(s); + if (S_messages != NULL && S_messages_modified) { + SCDynamicStoreSetValue(NULL, + CFSTR("Plugin:KernelEventMonitor"), + S_messages); + S_messages_modified = FALSE; + } + return; +} + +static void +check_interface_link_status(const char * if_name) +{ + if (S_messages == NULL) { + return; /* we're not in early boot of system */ + } + link_update_status_if_missing(if_name); + return; +} + +__private_extern__ +int +dgram_socket(int domain) +{ + int s; + + s = socket(domain, SOCK_DGRAM, 0); + if (s == -1) { + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + } + + return s; } static void @@ -210,7 +186,7 @@ post_network_changed(void) status = notify_post(_SC_NOTIFY_NETWORK_CHANGE); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_post() failed: error=%u"), status); + SC_log(LOG_NOTICE, "notify_post() failed: error=%u", status); } network_changed = FALSE; @@ -222,16 +198,15 @@ post_network_changed(void) static void logEvent(CFStringRef evStr, struct kern_event_msg *ev_msg) { - int i; - int j; + int i; + uint32_t j; if (!_verbose) { return; } - SCLog(TRUE, LOG_DEBUG, CFSTR("%@ event:"), evStr); - SCLog(TRUE, LOG_DEBUG, - CFSTR(" Event size=%d, id=%d, vendor=%d, class=%d, subclass=%d, code=%d"), + SC_log(LOG_DEBUG, "%@ event:", evStr); + SC_log(LOG_DEBUG, " Event size=%d, id=%d, vendor=%d, class=%d, subclass=%d, code=%d", ev_msg->total_size, ev_msg->id, ev_msg->vendor_code, @@ -239,35 +214,8 @@ logEvent(CFStringRef evStr, struct kern_event_msg *ev_msg) ev_msg->kev_subclass, ev_msg->event_code); for (i = 0, j = KEV_MSG_HEADER_SIZE; j < ev_msg->total_size; i++, j+=4) { - SCLog(TRUE, LOG_DEBUG, CFSTR(" Event data[%2d] = %08x"), i, ev_msg->event_data[i]); - } -} - -static const char * -inetEventNameString(uint32_t event_code) -{ - if (event_code < sizeof(inetEventName) / sizeof(inetEventName[0])) { - return (inetEventName[event_code]); - } - return ("New Apple network INET subcode"); -} - -static const char * -inet6EventNameString(uint32_t event_code) -{ - if (event_code < sizeof(inet6EventName) / sizeof(inet6EventName[0])) { - return (inet6EventName[event_code]); - } - return ("New Apple network INET6 subcode"); -} - -static const char * -dlEventNameString(uint32_t event_code) -{ - if (event_code < sizeof(dlEventName) / sizeof(dlEventName[0])) { - return (dlEventName[event_code]); + SC_log(LOG_DEBUG, " Event data[%2d] = %08x", i, ev_msg->event_data[i]); } - return ("New Apple network DL subcode"); } static void @@ -282,15 +230,13 @@ static uint8_t info_zero[DLIL_MODARGLEN]; static void processEvent_Apple_Network(struct kern_event_msg *ev_msg) { - const char * eventName = NULL; - int dataLen = (ev_msg->total_size - KEV_MSG_HEADER_SIZE); - void * event_data = &ev_msg->event_data[0]; - Boolean handled = TRUE; - char ifr_name[IFNAMSIZ]; + size_t dataLen = (ev_msg->total_size - KEV_MSG_HEADER_SIZE); + void * event_data = &ev_msg->event_data[0]; + char ifr_name[IFNAMSIZ]; + Boolean handled = TRUE; switch (ev_msg->kev_subclass) { case KEV_INET_SUBCLASS : { - eventName = inetEventNameString(ev_msg->event_code); switch (ev_msg->event_code) { case KEV_INET_NEW_ADDR : case KEV_INET_CHANGED_ADDR : @@ -306,7 +252,12 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process IPv4 address change: %s: %d", (char *)ifr_name, ev_msg->event_code); ipv4_interface_update(NULL, ifr_name); + if (ev_msg->event_code + != KEV_INET_ADDR_DELETED) { + check_interface_link_status(ifr_name); + } break; } case KEV_INET_ARPCOLLISION : { @@ -319,6 +270,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process ARP collision: %s", (char *)ifr_name); ipv4_arp_collision(ifr_name, ev->ia_ipaddr, ev->hw_len, @@ -333,6 +285,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) handled = FALSE; break; } + SC_log(LOG_INFO, "Process port-in-use: %hu, %u", ev->port, ev->req_pid); ipv4_port_in_use(ev->port, ev->req_pid); break; } @@ -346,6 +299,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process router ARP failure: %s", (char *)ifr_name); ipv4_router_arp_failure(ifr_name); break; } @@ -358,19 +312,19 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process router ARP alive: %s", (char *)ifr_name); ipv4_router_arp_alive(ifr_name); break; } default : - handled = FALSE; break; } break; } + case KEV_INET6_SUBCLASS : { struct kev_in6_data * ev; - eventName = inet6EventNameString(ev_msg->event_code); ev = (struct kev_in6_data *)event_data; switch (ev_msg->event_code) { case KEV_INET6_NEW_USER_ADDR : @@ -378,25 +332,45 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) case KEV_INET6_ADDR_DELETED : case KEV_INET6_NEW_LL_ADDR : case KEV_INET6_NEW_RTADV_ADDR : - case KEV_INET6_DEFROUTER : if (dataLen < sizeof(*ev)) { handled = FALSE; break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process IPv6 address change: %s: %d", (char *)ifr_name, ev_msg->event_code); interface_update_ipv6(NULL, ifr_name); + if (ev_msg->event_code == KEV_INET6_NEW_USER_ADDR + && (ev->ia6_flags & IN6_IFF_DUPLICATED) != 0) { + ipv6_duplicated_address(ifr_name, + &ev->ia_addr.sin6_addr, + ETHER_ADDR_LEN, + &ev->ia_mac); + } + if (ev_msg->event_code + != KEV_INET6_ADDR_DELETED) { + check_interface_link_status(ifr_name); + } + break; + + case KEV_INET6_REQUEST_NAT64_PREFIX : + if (dataLen < sizeof(*ev)) { + handled = FALSE; + break; + } + copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process NAT64 prefix request: %s", (char *)ifr_name); + nat64_prefix_request(ifr_name); break; default : - handled = FALSE; break; } break; } + case KEV_DL_SUBCLASS : { struct net_event_data * ev; - eventName = dlEventNameString(ev_msg->event_code); ev = (struct net_event_data *)event_data; switch (ev_msg->event_code) { case KEV_DL_IF_ATTACHED : @@ -408,6 +382,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface attach: %s", (char *)ifr_name); link_add(ifr_name); break; @@ -420,6 +395,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface detach: %s", (char *)ifr_name); link_remove(ifr_name); break; @@ -432,6 +408,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface detaching: %s", (char *)ifr_name); interface_detaching(ifr_name); break; @@ -446,11 +423,11 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) } copy_if_name(&protoEvent->link_data, ifr_name, sizeof(ifr_name)); - if (protoEvent->proto_remaining_count == 0) { - mark_if_down(ifr_name); - } else { - mark_if_up(ifr_name); - } + SC_log(LOG_INFO, "Process protocol %s: %s (pf=%d, n=%d)", + (ev_msg->event_code == KEV_DL_PROTO_ATTACHED) ? "attach" : "detach", + (char *)ifr_name, + protoEvent->proto_family, + protoEvent->proto_remaining_count); break; } @@ -464,11 +441,26 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface idle: %s", (char *)ifr_name); interface_update_idle_state(ifr_name); break; } #endif // KEV_DL_IF_IDLE_ROUTE_REFCNT + case KEV_DL_IFDELEGATE_CHANGED: { + /* + * interface delegation changed + */ + if (dataLen < sizeof(*ev)) { + handled = FALSE; + break; + } + copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface delegation change: %s", (char *)ifr_name); + interface_update_delegation(ifr_name); + break; + } + case KEV_DL_LINK_OFF : case KEV_DL_LINK_ON : /* @@ -479,7 +471,10 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); - link_update_status(ifr_name, FALSE); + SC_log(LOG_INFO, "Process interface link %s: %s", + (ev_msg->event_code == KEV_DL_LINK_ON) ? "up" : "down", + (char *)ifr_name); + link_update_status(ifr_name, FALSE, FALSE); break; #ifdef KEV_DL_LINK_QUALITY_METRIC_CHANGED @@ -492,11 +487,14 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface quality: %s (q=%d)", + (char *)ifr_name, + lqm_data->link_quality_metric); interface_update_quality_metric(ifr_name, lqm_data->link_quality_metric); break; } -#endif // KEV_DL_LINK_QUALITY_METRIC_CHANGED +#endif // KEV_DL_LINK_QUALITY_METRIC_CHANGED #ifdef KEV_DL_ISSUES case KEV_DL_ISSUES: { @@ -508,69 +506,101 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(ev, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process interface link issues: %s", + (char *)ifr_name); interface_update_link_issues(ifr_name, issues->timestamp, issues->modid, DLIL_MODIDLEN, issues->info, - (bcmp(issues->info, info_zero, DLIL_MODIDLEN) != 0) - ?DLIL_MODARGLEN - :0); + (bcmp(issues->info, info_zero, DLIL_MODARGLEN) != 0) + ? DLIL_MODARGLEN + : 0); break; } #endif // KEV_DL_ISSUES - case KEV_DL_SIFFLAGS : - case KEV_DL_SIFMETRICS : - case KEV_DL_SIFMTU : - case KEV_DL_SIFPHYS : - case KEV_DL_SIFMEDIA : - case KEV_DL_SIFGENERIC : - case KEV_DL_ADDMULTI : - case KEV_DL_DELMULTI : - case KEV_DL_LINK_ADDRESS_CHANGED : - case KEV_DL_WAKEFLAGS_CHANGED : -#ifdef KEV_DL_IFCAP_CHANGED - case KEV_DL_IFCAP_CHANGED : -#endif // KEV_DL_IFCAP_CHANGED - break; - default : - handled = FALSE; break; } break; } + +#ifdef KEV_NETPOLICY_SUBCLASS + case KEV_NETPOLICY_SUBCLASS : { + break; + } +#endif // KEV_NETPOLICY_SUBCLASS + +#ifdef KEV_SOCKET_SUBCLASS + case KEV_SOCKET_SUBCLASS : { + break; + } +#endif // KEV_SOCKET_SUBCLASS + #ifdef KEV_ND6_SUBCLASS case KEV_ND6_SUBCLASS : { - eventName = nd6EventNameString(ev_msg->event_code); + struct kev_nd6_event * ev; + + ev = (struct kev_nd6_event *)event_data; switch (ev_msg->event_code) { - case KEV_KEV_ND6_RA : + case KEV_ND6_ADDR_DETACHED : + case KEV_ND6_ADDR_DEPRECATED : + case KEV_ND6_ADDR_EXPIRED : + if (dataLen < sizeof(*ev)) { + handled = FALSE; break; - - default : + } + copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process ND6 address change: %s: %d", (char *)ifr_name, ev_msg->event_code); + interface_update_ipv6(NULL, ifr_name); + break; + case KEV_ND6_RTR_EXPIRED : + if (dataLen < sizeof(*ev)) { handled = FALSE; break; + } + copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + SC_log(LOG_INFO, "Process IPv6 router expired: %s: %d", (char *)ifr_name, ev_msg->event_code); + ipv6_router_expired(ifr_name); + break; + default : + break; } break; } #endif // KEV_ND6_SUBCLASS + +#ifdef KEV_NECP_SUBCLASS + case KEV_NECP_SUBCLASS : { + break; + } +#endif // KEV_NECP_SUBCLASS + +#ifdef KEV_NETAGENT_SUBCLASS + case KEV_NETAGENT_SUBCLASS : { + break; + } +#endif // KEV_NETAGENT_SUBCLASS + +#ifdef KEV_LOG_SUBCLASS case KEV_LOG_SUBCLASS : { break; } +#endif // KEV_LOG_SUBCLASS + +#ifdef KEV_NETEVENT_SUBCLASS + case KEV_NETEVENT_SUBCLASS : { + break; + } +#endif // KEV_NETEVENT_SUBCLASS + default : - handled = FALSE; break; } - if (handled == FALSE) { - CFStringRef evStr; - - evStr = CFStringCreateWithCString(NULL, - (eventName != NULL) ? eventName : "New Apple network subclass", - kCFStringEncodingASCII); - logEvent(evStr, ev_msg); - CFRelease(evStr); + if (!handled) { + logEvent(CFSTR("Error processing (Apple network subclass)"), ev_msg); } return; } @@ -578,25 +608,25 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) static Boolean eventCallback(int so) { - ssize_t status; union { char bytes[1024]; struct kern_event_msg ev_msg1; // first kernel event } buf; struct kern_event_msg *ev_msg = &buf.ev_msg1; ssize_t offset = 0; + ssize_t status; status = recv(so, &buf, sizeof(buf), 0); if (status == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("recv() failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "recv() failed: %s", strerror(errno)); return FALSE; } - cache_open(); + _SCDynamicStoreCacheOpen(store); while (offset < status) { - if ((offset + ev_msg->total_size) > status) { - SCLog(TRUE, LOG_NOTICE, CFSTR("missed SYSPROTO_EVENT event, buffer not big enough")); + if ((offset + (ssize_t)ev_msg->total_size) > status) { + SC_log(LOG_NOTICE, "missed SYSPROTO_EVENT event, buffer not big enough"); break; } @@ -606,97 +636,161 @@ eventCallback(int so) case KEV_NETWORK_CLASS : processEvent_Apple_Network(ev_msg); break; - case KEV_IOKIT_CLASS : - case KEV_SYSTEM_CLASS : - case KEV_APPLESHARE_CLASS : - case KEV_FIREWALL_CLASS : - case KEV_IEEE80211_CLASS : - break; + default : - /* unrecognized (Apple) event class */ - logEvent(CFSTR("New (Apple) class"), ev_msg); break; } break; default : - /* unrecognized vendor code */ - logEvent(CFSTR("New vendor"), ev_msg); break; } offset += ev_msg->total_size; ev_msg = (struct kern_event_msg *)(void *)&buf.bytes[offset]; } - cache_write(store); - cache_close(); + _SCDynamicStoreCacheCommitChanges(store); + _SCDynamicStoreCacheClose(store); post_network_changed(); + messages_post(); return TRUE; } -static void -prime(void) +__private_extern__ void +config_new_interface(const char * ifname) { - struct ifaddrs *ifap = NULL; - struct ifaddrs *scan; - int sock = -1; - - SCLog(_verbose, LOG_DEBUG, CFSTR("prime() called")); - - cache_open(); + xpc_object_t if_list; - sock = dgram_socket(AF_INET); - if (sock == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("could not get interface list, socket() failed: %s"), strerror(errno)); - goto done; + if (ifname == NULL) { + network_config_check_interface_settings(NULL); + return; } + if_list = xpc_array_create(NULL, 0); + xpc_array_set_string(if_list, XPC_ARRAY_APPEND, ifname); + network_config_check_interface_settings(if_list); + xpc_release(if_list); + return; +} + +static void +update_interfaces(const char * msg, Boolean first_time) +{ + Boolean added = FALSE; + struct ifaddrs * ifap = NULL; + CFMutableArrayRef ifList = NULL; + struct ifaddrs * scan; if (getifaddrs(&ifap) == -1) { - SCLog(TRUE, - LOG_ERR, - CFSTR("could not get interface info, getifaddrs() failed: %s"), - strerror(errno)); + messages_add_msg_with_arg("getifaddrs", strerror(errno)); + SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno)); goto done; } /* update list of interfaces & link status */ + ifList = interfaceListCopy(); for (scan = ifap; scan != NULL; scan = scan->ifa_next) { if (scan->ifa_addr == NULL || scan->ifa_addr->sa_family != AF_LINK) { continue; } /* get the per-interface link/media information */ - link_add(scan->ifa_name); + if (interfaceListAddInterface(ifList, scan->ifa_name)) { + messages_add_msg_with_arg(msg, scan->ifa_name); + added = TRUE; + if (!first_time) { + config_new_interface(scan->ifa_name); + } + } } - /* - * update IPv4 network addresses already assigned to - * the interfaces. - */ - ipv4_interface_update(ifap, NULL); + /* update the global list if an interface was added */ + if (added) { + interfaceListUpdate(ifList); + } + CFRelease(ifList); - /* - * update IPv6 network addresses already assigned to - * the interfaces. - */ - interface_update_ipv6(ifap, NULL); + /* update IPv4/IPv6 addresses that are already assigned */ + if (first_time) { + ipv4_interface_update(ifap, NULL); + interface_update_ipv6(ifap, NULL); + } freeifaddrs(ifap); done: - if (sock != -1) - close(sock); + if (first_time) { + /* tell networkd to get the interface list itself */ + config_new_interface(NULL); + } + return; +} + +#define TIMER_INTERVAL (6LL * NSEC_PER_SEC) +#define MAX_TIMER_COUNT 20 + +static void +check_for_new_interfaces(void * context); + +static void +schedule_timer(void) +{ + dispatch_after_f(dispatch_time(DISPATCH_TIME_NOW, TIMER_INTERVAL), + S_kev_queue, + NULL, + check_for_new_interfaces); + return; +} + +static void +check_for_new_interfaces(void * context) +{ +#pragma unused(context) + static int count; + char msg[32]; + + count++; + + /* update KEV driven content in case a message got dropped */ + snprintf(msg, sizeof(msg), "update %d (of %d)", count, MAX_TIMER_COUNT); + _SCDynamicStoreCacheOpen(store); + update_interfaces(msg, FALSE); + _SCDynamicStoreCacheCommitChanges(store); + _SCDynamicStoreCacheClose(store); + messages_post(); + + /* schedule the next timer, if needed */ + if (count < MAX_TIMER_COUNT) { + schedule_timer(); + } + else { + messages_free(); + } - cache_write(store); - cache_close(); + return; +} + +static void +prime(void) +{ + SC_log(LOG_DEBUG, "prime() called"); + + _SCDynamicStoreCacheOpen(store); + messages_init(); + update_interfaces("prime", TRUE); + _SCDynamicStoreCacheCommitChanges(store); + _SCDynamicStoreCacheClose(store); network_changed = TRUE; post_network_changed(); + messages_post(); /* start handling kernel events */ dispatch_resume(S_kev_source); + /* schedule polling timer */ + schedule_timer(); + return; } @@ -709,6 +803,21 @@ prime_KernelEventMonitor() return; } +static Boolean +initialize_store(void) +{ + store = SCDynamicStoreCreate(NULL, + CFSTR("Kernel Event Monitor plug-in"), + NULL, + NULL); + if (store == NULL) { + SC_log(LOG_ERR, "SCDynamicStoreCreate() failed: %s", SCErrorString(SCError())); + return (FALSE); + } + return (TRUE); +} + + __private_extern__ void load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) @@ -721,17 +830,11 @@ load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) _verbose = TRUE; } - SCLog(_verbose, LOG_DEBUG, CFSTR("load() called")); - SCLog(_verbose, LOG_DEBUG, CFSTR(" bundle ID = %@"), CFBundleGetIdentifier(bundle)); + SC_log(LOG_DEBUG, "load() called"); + SC_log(LOG_DEBUG, " bundle ID = %@", CFBundleGetIdentifier(bundle)); - /* open a "configd" session to allow cache updates */ - store = SCDynamicStoreCreate(NULL, - CFSTR("Kernel Event Monitor plug-in"), - NULL, - NULL); - if (store == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCDnamicStoreCreate() failed: %s"), SCErrorString(SCError())); - SCLog(TRUE, LOG_ERR, CFSTR("kernel event monitor disabled.")); + if (!initialize_store()) { + SC_log(LOG_ERR, "kernel event monitor disabled"); return; } @@ -743,13 +846,13 @@ load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) kev_req.kev_class = KEV_NETWORK_CLASS; kev_req.kev_subclass = KEV_ANY_SUBCLASS; status = ioctl(so, SIOCSKEVFILT, &kev_req); - if (status) { - SCLog(TRUE, LOG_ERR, CFSTR("could not establish event filter, ioctl() failed: %s"), strerror(errno)); + if (status != 0) { + SC_log(LOG_ERR, "could not establish event filter, ioctl() failed: %s", strerror(errno)); (void) close(so); so = -1; } } else { - SCLog(TRUE, LOG_ERR, CFSTR("could not open event socket, socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "could not open event socket, socket() failed: %s", strerror(errno)); } if (so != -1) { @@ -757,14 +860,14 @@ load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) status = ioctl(so, FIONBIO, &yes); if (status) { - SCLog(TRUE, LOG_ERR, CFSTR("could not set non-blocking io, ioctl() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "could not set non-blocking io, ioctl() failed: %s", strerror(errno)); (void) close(so); so = -1; } } if (so == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("kernel event monitor disabled.")); + SC_log(LOG_ERR, "kernel event monitor disabled"); CFRelease(store); return; } @@ -776,14 +879,13 @@ load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) close(so); }); dispatch_source_set_event_handler(S_kev_source, ^{ - Boolean ok; + Boolean ok; ok = eventCallback(so); if (!ok) { - SCLog(TRUE, LOG_ERR, CFSTR("kernel event monitor disabled.")); + SC_log(LOG_ERR, "kernel event monitor disabled"); dispatch_source_cancel(S_kev_source); } - }); // NOTE: dispatch_resume() will be called in prime() diff --git a/src/configd/Plugins/KernelEventMonitor/eventmon.h b/src/configd/Plugins/KernelEventMonitor/eventmon.h index 9bce032d2..569e04244 100644 --- a/src/configd/Plugins/KernelEventMonitor/eventmon.h +++ b/src/configd/Plugins/KernelEventMonitor/eventmon.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002, 2004, 2005, 2007, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2002-2017 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@ */ @@ -63,7 +63,18 @@ extern Boolean _verbose; __BEGIN_DECLS -int dgram_socket (int domain); +os_log_t +__log_KernelEventMonitor (void); + +int +dgram_socket (int domain); + +void +messages_add_msg_with_arg (const char *msg, + const char *arg); + +void +config_new_interface (const char *ifname); __END_DECLS diff --git a/src/configd/Plugins/LinkConfiguration/Info.plist b/src/configd/Plugins/LinkConfiguration/Info.plist index d7742b077..68baee0df 100644 --- a/src/configd/Plugins/LinkConfiguration/Info.plist +++ b/src/configd/Plugins/LinkConfiguration/Info.plist @@ -2,12 +2,14 @@ + Builtin + CFBundleDevelopmentRegion English CFBundleExecutable LinkConfiguration CFBundleIdentifier - com.apple.SystemConfiguration.LinkConfiguration + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,16 +17,14 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 Requires com.apple.SystemConfiguration.InterfaceNamer - Builtin - diff --git a/src/configd/Plugins/LinkConfiguration/linkconfig.c b/src/configd/Plugins/LinkConfiguration/linkconfig.c index aa11307f7..39f84f6d1 100644 --- a/src/configd/Plugins/LinkConfiguration/linkconfig.c +++ b/src/configd/Plugins/LinkConfiguration/linkconfig.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2007, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2011, 2013, 2015-2019 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@ */ @@ -37,21 +37,34 @@ #include #include -#include -#include -#include +#define SC_LOG_HANDLE __log_LinkConfiguration +#define SC_LOG_HANDLE_TYPE static +#include "SCNetworkConfigurationInternal.h" #include // for _SCDPluginExecCommand -#include "SCNetworkConfigurationInternal.h" +static CFMutableDictionaryRef baseSettings = NULL; +static CFStringRef interfacesKey = NULL; +static SCDynamicStoreRef store = NULL; +static CFRunLoopSourceRef rls = NULL; +static CFMutableDictionaryRef wantSettings = NULL; -static CFMutableDictionaryRef baseSettings = NULL; -static CFStringRef interfacesKey = NULL; -static SCDynamicStoreRef store = NULL; -static CFRunLoopSourceRef rls = NULL; -static CFMutableDictionaryRef wantSettings = NULL; -static Boolean _verbose = FALSE; +#pragma mark - +#pragma mark Logging + + +static os_log_t +__log_LinkConfiguration(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "LinkConfiguration"); + } + + return log; +} #pragma mark - @@ -110,21 +123,21 @@ _SCNetworkInterfaceSetCapabilities(SCNetworkInterfaceRef interface, return TRUE; } - bzero((char *)&ifr, sizeof(ifr)); + memset((char *)&ifr, 0, sizeof(ifr)); (void)_SC_cfstring_to_cstring(interfaceName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII); ifr.ifr_curcap = cap_current; ifr.ifr_reqcap = cap_requested; sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); return FALSE; } ret = ioctl(sock, SIOCSIFCAP, (caddr_t)&ifr); (void)close(sock); if (ret == -1) { - SCLog(TRUE, LOG_DEBUG, CFSTR("ioctl(SIOCSIFCAP) failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "%@: ioctl(SIOCSIFCAP) failed: %s", interfaceName, strerror(errno)); return FALSE; } #endif // SIOCSIFCAP @@ -195,7 +208,7 @@ _SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, interfaceName = SCNetworkInterfaceGetBSDName(interface); if (interfaceName == NULL) { /* if no BSD interface name */ - SCLog(_verbose, LOG_INFO, CFSTR("no BSD interface name for %@"), interface); + SC_log(LOG_INFO, "no BSD interface name for %@", interface); _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -203,7 +216,7 @@ _SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, /* get current & available options */ if (!SCNetworkInterfaceCopyMediaOptions(interface, ¤t, NULL, &available, FALSE)) { /* could not get current media options */ - SCLog(_verbose, LOG_INFO, CFSTR("no media options for %@"), interfaceName); + SC_log(LOG_INFO, "no media options for %@", interfaceName); return FALSE; } @@ -233,7 +246,7 @@ _SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, if (!CFArrayContainsValue(available, CFRangeMake(0, CFArrayGetCount(available)), requested)) { /* if requested settings not currently available */ - SCLog(_verbose, LOG_INFO, CFSTR("requested media settings unavailable for %@"), interfaceName); + SC_log(LOG_INFO, "requested media settings unavailable for %@", interfaceName); goto done; } @@ -245,28 +258,28 @@ _SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); goto done; } - bzero((char *)&ifm, sizeof(ifm)); + memset((char *)&ifm, 0, sizeof(ifm)); (void)_SC_cfstring_to_cstring(interfaceName, ifm.ifm_name, sizeof(ifm.ifm_name), kCFStringEncodingASCII); - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) { - SCLog(TRUE, LOG_DEBUG, CFSTR("ioctl(SIOCGIFMEDIA) failed: %s"), strerror(errno)); + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)&ifm) == -1) { + SC_log(LOG_ERR, "%@: ioctl(SIOCGIFXMEDIA) failed: %s", interfaceName, strerror(errno)); goto done; } - bzero((char *)&ifr, sizeof(ifr)); - bcopy(ifm.ifm_name, ifr.ifr_name, sizeof(ifr.ifr_name)); + memset((char *)&ifr, 0, sizeof(ifr)); + memcpy(ifr.ifr_name, ifm.ifm_name, sizeof(ifr.ifr_name)); ifr.ifr_media = ifm.ifm_current & ~(IFM_NMASK|IFM_TMASK|IFM_OMASK|IFM_GMASK); ifr.ifr_media |= newOptions; - SCLog(_verbose, LOG_INFO, CFSTR("old media settings: 0x%8.8x (0x%8.8x)"), ifm.ifm_current, ifm.ifm_active); - SCLog(_verbose, LOG_INFO, CFSTR("new media settings: 0x%8.8x"), ifr.ifr_media); + SC_log(LOG_INFO, "old media settings: 0x%8.8x (0x%8.8x)", ifm.ifm_current, ifm.ifm_active); + SC_log(LOG_INFO, "new media settings: 0x%8.8x", ifr.ifr_media); if (ioctl(sock, SIOCSIFMEDIA, (caddr_t)&ifr) == -1) { - SCLog(TRUE, LOG_DEBUG, CFSTR("%@: ioctl(SIOCSIFMEDIA) failed: %s"), interfaceName, strerror(errno)); + SC_log(LOG_ERR, "%@: ioctl(SIOCSIFMEDIA) failed: %s", interfaceName, strerror(errno)); goto done; } @@ -291,25 +304,24 @@ _SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, static void ifconfig_exit(pid_t pid, int status, struct rusage *rusage, void *context) { +#pragma unused(pid) +#pragma unused(rusage) char *if_name = (char *)context; if (WIFEXITED(status)) { if (WEXITSTATUS(status) != 0) { - SCLog(TRUE, LOG_ERR, - CFSTR("ifconfig %s failed, exit status = %d"), - if_name, - WEXITSTATUS(status)); + SC_log(LOG_NOTICE, "ifconfig %s failed, exit status = %d", + if_name, + WEXITSTATUS(status)); } } else if (WIFSIGNALED(status)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("ifconfig %s: terminated w/signal = %d"), - if_name, - WTERMSIG(status)); + SC_log(LOG_NOTICE, "ifconfig %s: terminated w/signal = %d", + if_name, + WTERMSIG(status)); } else { - SCLog(TRUE, LOG_DEBUG, - CFSTR("ifconfig %s: exit status = %d"), - if_name, - status); + SC_log(LOG_NOTICE, "ifconfig %s: exit status = %d", + if_name, + status); } CFAllocatorDeallocate(NULL, if_name); @@ -323,12 +335,17 @@ Boolean _SCNetworkInterfaceSetMTU(SCNetworkInterfaceRef interface, CFDictionaryRef options) { - CFStringRef interfaceName; - int mtu_cur = -1; - int mtu_max = -1; - int mtu_min = -1; - int requested; - CFNumberRef val; + CFArrayRef bridge_members = NULL; + Boolean bridge_updated = FALSE; + CFStringRef interfaceName; + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + CFStringRef interfaceType; + int mtu_cur = -1; + int mtu_max = -1; + int mtu_min = -1; + Boolean ok = TRUE; + int requested; + CFNumberRef val; interfaceName = SCNetworkInterfaceGetBSDName(interface); if (interfaceName == NULL) { @@ -372,27 +389,60 @@ _SCNetworkInterfaceSetMTU(SCNetworkInterfaceRef interface, return FALSE; } + interfaceType = SCNetworkInterfaceGetInterfaceType(interface); + if (CFEqual(interfaceType, kSCNetworkInterfaceTypeBridge)) { + bridge_members = SCBridgeInterfaceGetMemberInterfaces(interface); + if ((bridge_members != NULL) && (CFArrayGetCount(bridge_members) == 0)) { + /* if no members */ + bridge_members = NULL; + } + if (bridge_members != NULL) { + SCNetworkInterfaceRef member0; + + /* temporarily, remove all bridge members */ + CFRetain(bridge_members); + ok = SCBridgeInterfaceSetMemberInterfaces(interface, NULL); + if (!ok) { + goto done; + } + + /* and update the (bridge) configuration */ + ok = _SCBridgeInterfaceUpdateConfiguration(interfacePrivate->prefs); + if (!ok) { + goto done; + } + + /* switch from updating the MTU of the bridge to the first member */ + member0 = CFArrayGetValueAtIndex(bridge_members, 0); + interfaceName = SCNetworkInterfaceGetBSDName(member0); + + bridge_updated = TRUE; + } + } + #ifdef USE_SIOCSIFMTU { struct ifreq ifr; int ret; int sock; - bzero((char *)&ifr, sizeof(ifr)); + memset((char *)&ifr, 0, sizeof(ifr)); (void)_SC_cfstring_to_cstring(interfaceName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII); ifr.ifr_mtu = requested; sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); - return FALSE; + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + ok = FALSE; + goto done; } ret = ioctl(sock, SIOCSIFMTU, (caddr_t)&ifr); (void)close(sock); if (ret == -1) { - SCLog(TRUE, LOG_DEBUG, CFSTR("ioctl(SIOCSIFMTU) failed: %s"), strerror(errno)); - return FALSE; + SC_log(LOG_ERR, "%@: ioctl(SIOCSIFMTU) failed: %s", interfaceName, strerror(errno)); + ok = FALSE; + goto done; } } #else /* !USE_SIOCSIFMTU */ @@ -415,12 +465,26 @@ _SCNetworkInterfaceSetMTU(SCNetworkInterfaceRef interface, free(ifconfig_argv[3]); if (pid <= 0) { - return FALSE; + ok = FALSE; + goto done; } } #endif /* !USE_SIOCSIFMTU */ - return TRUE; + done : + + if (bridge_members != NULL) { + /* restore bridge members */ + (void) SCBridgeInterfaceSetMemberInterfaces(interface, bridge_members); + CFRelease(bridge_members); + + if (bridge_updated) { + /* and update the (bridge) configuration */ + (void) _SCBridgeInterfaceUpdateConfiguration(interfacePrivate->prefs); + } + } + + return ok; } @@ -447,7 +511,7 @@ parse_component(CFStringRef key, CFStringRef prefix) CFMutableStringRef comp; CFRange range; - if (CFStringHasPrefix(key, prefix) == FALSE) { + if (!CFStringHasPrefix(key, prefix)) { return NULL; } comp = CFStringCreateMutableCopy(NULL, 0, key); @@ -597,6 +661,7 @@ updateLink(CFStringRef interfaceName, CFDictionaryRef options) static void linkConfigChangedCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *arg) { +#pragma unused(arg) CFDictionaryRef changes; CFIndex i; CFIndex n; @@ -612,7 +677,7 @@ linkConfigChangedCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void changes = SCDynamicStoreCopyMultiple(store, changedKeys, NULL); - n = CFArrayGetCount(changedKeys); + n = (changes != NULL) ? CFArrayGetCount(changedKeys) : 0; for (i = 0; i < n; i++) { CFStringRef key; CFDictionaryRef info; @@ -621,11 +686,13 @@ linkConfigChangedCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void info = CFDictionaryGetValue(changes, key); if (CFEqual(key, interfacesKey)) { - CFArrayRef interfaces; + if (isA_CFDictionary(info) != NULL) { + CFArrayRef interfaces; - interfaces = CFDictionaryGetValue(info, kSCPropNetInterfaces); - if (isA_CFArray(interfaces)) { - updateInterfaces(interfaces); + interfaces = CFDictionaryGetValue(info, kSCPropNetInterfaces); + if (isA_CFArray(interfaces)) { + updateInterfaces(interfaces); + } } } else { CFStringRef interfaceName; @@ -638,7 +705,9 @@ linkConfigChangedCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void } } - CFRelease(changes); + if (changes != NULL) { + CFRelease(changes); + } return; } @@ -648,17 +717,14 @@ __private_extern__ void load_LinkConfiguration(CFBundleRef bundle, Boolean bundleVerbose) { +#pragma unused(bundleVerbose) CFStringRef key; CFMutableArrayRef keys = NULL; Boolean ok; CFMutableArrayRef patterns = NULL; - if (bundleVerbose) { - _verbose = TRUE; - } - - SCLog(_verbose, LOG_DEBUG, CFSTR("load() called")); - SCLog(_verbose, LOG_DEBUG, CFSTR(" bundle ID = %@"), CFBundleGetIdentifier(bundle)); + SC_log(LOG_DEBUG, "load() called"); + SC_log(LOG_DEBUG, " bundle ID = %@", CFBundleGetIdentifier(bundle)); /* initialize a few globals */ @@ -677,7 +743,7 @@ load_LinkConfiguration(CFBundleRef bundle, Boolean bundleVerbose) linkConfigChangedCallback, NULL); if (store == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreCreate() failed: %s"), SCErrorString(SCError())); + SC_log(LOG_ERR, "SCDynamicStoreCreate() failed: %s", SCErrorString(SCError())); goto error; } @@ -706,6 +772,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, @@ -713,23 +780,22 @@ 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); CFRelease(keys); CFRelease(patterns); if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStoreSetNotificationKeys() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCDynamicStoreSetNotificationKeys() failed: %s", + SCErrorString(SCError())); goto error; } rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); if (rls == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStoreCreateRunLoopSource() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCDynamicStoreCreateRunLoopSource() failed: %s", + SCErrorString(SCError())); goto error; } diff --git a/src/configd/Plugins/Logger/Info-Embedded.plist b/src/configd/Plugins/Logger/Info-Embedded.plist deleted file mode 100644 index 19134ec94..000000000 --- a/src/configd/Plugins/Logger/Info-Embedded.plist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Logger - CFBundleIdentifier - com.apple.SystemConfiguration.Logger - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - com.apple.SystemConfiguration.Logger - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.14.4 - CFBundleSignature - ???? - CFBundleVersion - 1.14 - Enabled - - Verbose - - LOG_ALL - - LOG_IO_SYSTEMPOWER_EVENTS - - LOG_NETWORK_KERNEL_EVENTS - - LOG_NETWORK_INFORMATION - - LOG_NOTIFY_DNS_CONFIGURATION - - LOG_NOTIFY_NETWORK_CHANGE - - LOG_SC_NETWORKCHANGE - - LOG_SC_PRIMARYSERVICE - - LOG_SC_REACHABILITY - - LOG_SC_REACHABILITY_HOSTS - - mail.me.com - - Requires - - com.apple.SystemConfiguration.SCNetworkReachability - - - diff --git a/src/configd/Plugins/Logger/Info.plist b/src/configd/Plugins/Logger/Info.plist deleted file mode 100644 index f8ba81749..000000000 --- a/src/configd/Plugins/Logger/Info.plist +++ /dev/null @@ -1,66 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Logger - CFBundleIdentifier - com.apple.SystemConfiguration.Logger - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - com.apple.SystemConfiguration.Logger - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.14.4 - CFBundleSignature - ???? - CFBundleVersion - 1.14 - Enabled - - Verbose - - LOG_ALL - - LOG_IO_SYSTEMPOWER_EVENTS - - LOG_IO_WAKEUUID_EVENTS - - LOG_NETWORK_KERNEL_EVENTS - - LOG_NETWORK_INFORMATION - - LOG_NOTIFY_DNS_CONFIGURATION - - LOG_NOTIFY_NETWORK_CHANGE - - LOG_NOTIFY_SMB_CONFIGURATION - - LOG_NOTIFY_UTMPX_CHANGE - - LOG_SC_BTMM_CONFIGURATION - - LOG_SC_CONSOLEUSER - - LOG_SC_DIRECTORYSERVICES_SEARCHPOLICY - - LOG_SC_NETWORKCHANGE - - LOG_SC_PRIMARYSERVICE - - LOG_SC_REACHABILITY - - LOG_SC_REACHABILITY_HOSTS - - mail.me.com - - Requires - - com.apple.SystemConfiguration.SCNetworkReachability - - - diff --git a/src/configd/Plugins/Logger/logger.c b/src/configd/Plugins/Logger/logger.c deleted file mode 100644 index ebd68a02b..000000000 --- a/src/configd/Plugins/Logger/logger.c +++ /dev/null @@ -1,2055 +0,0 @@ -/* - * Copyright (c) 2005-2014 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 15, 2005 Allan Nathanson - * - initial revision - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#ifndef TARGET_OS_EMBEDDED -#include -#include -#endif // !TARGET_OS_EMBEDDED - - -/* generic MessageTracer keys */ -#define MSGTRACER_KEY_DOMAIN "com.apple.message.domain" -#define MSGTRACER_KEY_SIG "com.apple.message.signature" -#define MSGTRACER_KEY_UUID "com.apple.message.uuid" -#define MSGTRACER_KEY_VALUE1 "com.apple.message.value" - - -#define MY_ASL_FACILITY "com.apple.SystemConfiguration.Logger" -#define MY_MSGTRACER_DOMAIN "com.apple.network.log" - - -static asl_object_t log_msg = NULL; -static io_connect_t power = MACH_PORT_NULL; -static Boolean verbose = FALSE; - - -static char * -elapsed() -{ - static char str[128]; - struct tm tm_diff; - struct tm tm_now; - struct timeval tv_diff; - struct timeval tv_now; - static struct timeval tv_then = { 0, 0 }; - - (void)gettimeofday(&tv_now, NULL); - - (void)localtime_r(&tv_now.tv_sec, &tm_now); - - timersub(&tv_now, &tv_then, &tv_diff); - (void)localtime_r(&tv_diff.tv_sec, &tm_diff); -#ifdef MAIN - sprintf(str, "%2d:%02d:%02d.%03d (+%ld.%03d)", - tm_now.tm_hour, - tm_now.tm_min, - tm_now.tm_sec, - tv_now.tv_usec / 1000, - tv_diff.tv_sec, - tv_diff.tv_usec / 1000); -#else - sprintf(str, ".%03d (+%ld.%03d)", - tv_now.tv_usec / 1000, - tv_diff.tv_sec, - tv_diff.tv_usec / 1000); -#endif - - tv_then = tv_now; - return str; -} - - -#pragma mark - -#pragma mark [Network] Kernel Events - - -static CFStringRef -copyInterfaceFlags(const char *if_name) -{ - const char * iff_up = "? "; - struct ifreq ifr; - const char *ifm_active = "? "; - int sock; - CFStringRef str = NULL; - - sock = socket(AF_INET, SOCK_DGRAM, 0); - if (sock == -1) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("socket() failed")); - return NULL; - } - - bzero((char *)&ifr, sizeof(ifr)); - (void) strlcpy(ifr.ifr_name, if_name, sizeof(ifr.ifr_name)); - if (ioctl(sock, SIOCGIFFLAGS, (caddr_t)&ifr) == 0) { - struct ifmediareq ifm; - - iff_up = (ifr.ifr_flags & IFF_UP) ? "yes" : "no "; - - bzero((char *)&ifm, sizeof(ifm)); - (void) strncpy(ifm.ifm_name, if_name, sizeof(ifm.ifm_name)); - if ((ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == 0) && - (ifm.ifm_count > 0) && - (ifm.ifm_status & IFM_AVALID)) { - ifm_active = (ifm.ifm_status & IFM_ACTIVE) ? "yes" : "no "; - } - - str = CFStringCreateWithFormat(NULL, - NULL, - CFSTR("\n%-5s: IFF_UP = %s IFM_ACTIVE = %s"), - if_name, - iff_up, - ifm_active); - } - - (void)close(sock); - - return str; -} - - -static int -prefixLength(struct sockaddr_in6 *sin6) -{ - register u_int8_t *name = &sin6->sin6_addr.s6_addr[0]; - register int byte; - register int bit; - int plen = 0; - - for (byte = 0; byte < sizeof(struct in6_addr); byte++, plen += 8) { - if (name[byte] != 0xff) { - break; - } - } - - if (byte == sizeof(struct in6_addr)) { - return plen; - } - - for (bit = 7; bit != 0; bit--, plen++) { - if (!(name[byte] & (1 << bit))) { - break; - } - } - - for (; bit != 0; bit--) { - if (name[byte] & (1 << bit)) { - return 0; - } - } - - byte++; - for (; byte < sizeof(struct in6_addr); byte++) { - if (name[byte]) { - return 0; - } - } - - return plen; -} - - -static void -KernelEvent_notification(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) -{ - int so = CFSocketGetNative(s); - size_t status; - union { - char bytes[1024]; - struct kern_event_msg ev_msg1; // first kernel event - } buf; - struct kern_event_msg *ev_msg = &buf.ev_msg1; - size_t offset = 0; - - status = recv(so, &buf, sizeof(buf), 0); - if (status == -1) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("recv() failed: %s"), strerror(errno)); - CFSocketInvalidate(s); - return; - } - - while (offset < status) { - if ((offset + ev_msg->total_size) > status) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("missed SYSPROTO_EVENT event, buffer not big enough")); - break; - } - - switch (ev_msg->vendor_code) { - case KEV_VENDOR_APPLE : - switch (ev_msg->kev_class) { - case KEV_NETWORK_CLASS : { - void *event_data = &ev_msg->event_data[0]; - - switch (ev_msg->kev_subclass) { - case KEV_DL_SUBCLASS : { - struct net_event_data *ev; - char if_name[IFNAMSIZ]; - - ev = (struct net_event_data *)event_data; - - snprintf(if_name, IFNAMSIZ, "%s%d", - ev->if_name, - ev->if_unit); - - switch (ev_msg->event_code) { - case KEV_DL_IF_ATTACHED : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: attached"), - elapsed(), - if_name); - break; - } - case KEV_DL_IF_DETACHING : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: detaching"), - elapsed(), - if_name); - break; - } - case KEV_DL_IF_DETACHED : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: detached"), - elapsed(), - if_name); - break; - } - case KEV_DL_LINK_OFF : { - CFStringRef str; - - str = verbose ? copyInterfaceFlags(if_name) : NULL; - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: link down%@"), - elapsed(), - if_name, - str != NULL ? str : CFSTR("")); - if (str != NULL) CFRelease(str); - break; - } - case KEV_DL_LINK_ON : { - CFStringRef str; - - str = verbose ? copyInterfaceFlags(if_name) : NULL; - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: link up%@"), - elapsed(), - if_name, - str != NULL ? str : CFSTR("")); - if (str != NULL) CFRelease(str); - break; - } - default : - break; - } - break; - } - case KEV_INET_SUBCLASS : { - char addr[128]; - struct kev_in_data *ev; - char if_name[IFNAMSIZ]; - char mask[128]; - - ev = (struct kev_in_data *)event_data; - - snprintf(if_name, IFNAMSIZ, "%s%d", - ev->link_data.if_name, - ev->link_data.if_unit); - - switch (ev_msg->event_code) { - case KEV_INET_NEW_ADDR : - case KEV_INET_CHANGED_ADDR : - case KEV_INET_ADDR_DELETED : { - struct sockaddr_in sin; - - bzero(&sin, sizeof(sin)); - sin.sin_len = sizeof(sin); - sin.sin_family = AF_INET; - sin.sin_addr = ev->ia_addr; - _SC_sockaddr_to_string((struct sockaddr *)&sin, addr, sizeof(addr)); - - bzero(&sin, sizeof(sin)); - sin.sin_len = sizeof(sin); - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = ntohl(ev->ia_subnetmask); - _SC_sockaddr_to_string((struct sockaddr *)&sin, mask, sizeof(mask)); - break; - } - default : - break; - } - - switch (ev_msg->event_code) { - case KEV_INET_NEW_ADDR : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: IPv4 address added (%s/%s)"), - elapsed(), - if_name, - addr, - mask); - break; - } - case KEV_INET_CHANGED_ADDR : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: IPv4 address changed (%s/%s)"), - elapsed(), - if_name, - addr, - mask); - break; - } - case KEV_INET_ADDR_DELETED : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: IPv4 address removed (%s/%s)"), - elapsed(), - if_name, - addr, - mask); - break; - } - default : - break; - } - break; - } - case KEV_INET6_SUBCLASS : { - char addr[128]; - struct kev_in6_data *ev; - char if_name[IFNAMSIZ]; - int plen = 0; - - ev = (struct kev_in6_data *)event_data; - - snprintf(if_name, IFNAMSIZ, "%s%d", - ev->link_data.if_name, - ev->link_data.if_unit); - - switch (ev_msg->event_code) { - case KEV_INET6_NEW_USER_ADDR : - case KEV_INET6_NEW_LL_ADDR : - case KEV_INET6_CHANGED_ADDR : - case KEV_INET6_ADDR_DELETED : { - _SC_sockaddr_to_string((struct sockaddr *)&ev->ia_addr, addr, sizeof(addr)); - plen = prefixLength(&ev->ia_prefixmask); - break; - } - default : - break; - } - - switch (ev_msg->event_code) { - case KEV_INET6_NEW_USER_ADDR : - case KEV_INET6_NEW_LL_ADDR : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: IPv6 address added (%s/%d)"), - elapsed(), - if_name, - addr, - plen); - break; - } - case KEV_INET6_CHANGED_ADDR : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: IPv6 address changed (%s/%d)"), - elapsed(), - if_name, - addr, - plen); - break; - } - case KEV_INET6_ADDR_DELETED : { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s kernel event: %s: IPv6 address removed"), - elapsed(), - if_name); - break; - } - default : - break; - } - break; - } - default : - break; - } - break; - } - default : - break; - } - break; - default : - /* unrecognized vendor code */ - break; - } - offset += ev_msg->total_size; - ev_msg = (struct kern_event_msg *)(void *)&buf.bytes[offset]; - } - - return; -} - - -static void -add_KernelEvent_notification() -{ - CFSocketRef es; - CFSocketContext es_context = { 0, NULL, NULL, NULL, NULL }; - struct kev_request kev_req; - CFRunLoopSourceRef rls; - int so; - int yes = 1; - - /* Open an event socket */ - so = socket(PF_SYSTEM, SOCK_RAW, SYSPROTO_EVENT); - if (so == -1) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("socket() failed")); - return; - } - - /* establish filter to return all events */ - kev_req.vendor_code = KEV_VENDOR_APPLE; - kev_req.kev_class = KEV_NETWORK_CLASS; - kev_req.kev_subclass = KEV_ANY_SUBCLASS; - if (ioctl(so, SIOCSKEVFILT, &kev_req) == -1) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("ioctl(, SIOCSKEVFILT, ) failed")); - (void)close(so); - return; - } - - if (ioctl(so, FIONBIO, &yes) == -1) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("ioctl(, FIONBIO, ) failed")); - (void)close(so); - return; - } - - /* Create a CFSocketRef for the PF_SYSTEM kernel event socket */ - es = CFSocketCreateWithNative(NULL, - so, - kCFSocketReadCallBack, - KernelEvent_notification, - &es_context); - - /* Create and add a run loop source for the event socket */ - rls = CFSocketCreateRunLoopSource(NULL, es, -1); - CFRelease(es); - - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - return; -} - - -#pragma mark - -#pragma mark Power Management Events - - -static void -power_notification(void *refcon, io_service_t service, natural_t messageType, void *messageArgument) -{ - switch (messageType) { - case kIOMessageCanDevicePowerOff : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: can device power off?"), - elapsed()); - break; - case kIOMessageDeviceWillPowerOff : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: device will power off"), - elapsed()); - break; - case kIOMessageDeviceWillNotPowerOff : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: device will not power off"), - elapsed()); - break; - case kIOMessageDeviceHasPoweredOn : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: device has powered on"), - elapsed()); - break; - case kIOMessageCanSystemPowerOff : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: can system power off?"), - elapsed()); - break; - case kIOMessageSystemWillPowerOff : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system will power off"), - elapsed()); - break; - case kIOMessageSystemWillNotPowerOff : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system will not power off"), - elapsed()); - break; - case kIOMessageCanSystemSleep : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: can system sleep?"), - elapsed()); - /* - * Idle sleep is about to kick in, but applications have - * a chance to allow sleep (by calling IOAllowPowerChange) - * or to prevent sleep (by calling IOCancelPowerChange). - */ - IOAllowPowerChange(power, (long)messageArgument); - break; - case kIOMessageSystemWillSleep : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system will sleep"), - elapsed()); - IOAllowPowerChange(power, (long)messageArgument); - break; - case kIOMessageSystemWillNotSleep : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system will not sleep"), - elapsed()); - break; - case kIOMessageSystemHasPoweredOn : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system has powered on"), - elapsed()); - break; - case kIOMessageSystemWillRestart : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system will restart"), - elapsed()); - break; - case kIOMessageSystemWillPowerOn : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: system will power on"), - elapsed()); - break; - default : - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s IORegisterForSystemPower: message=%08lx"), - elapsed(), - (long unsigned int)messageType); - break; - } - - return; -} - - -static void -add_power_notification() -{ - io_object_t iterator; - IONotificationPortRef notify; - - power = IORegisterForSystemPower(0, ¬ify, power_notification, &iterator); - if (power == MACH_PORT_NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("IORegisterForSystemPower() failed")); - return; - } - - CFRunLoopAddSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(notify), - kCFRunLoopCommonModes); - - return; -} - - -#ifdef kIOPMMessageSleepWakeUUIDChange -static void -wake_uuid_notification(void *refcon, io_service_t service, natural_t messageType, void *messageArgument) -{ - CFStringRef wake_uuid = NULL; - - if (messageType == kIOPMMessageSleepWakeUUIDChange) { - if (messageArgument == kIOPMMessageSleepWakeUUIDSet) { - wake_uuid = IORegistryEntryCreateCFProperty(service, CFSTR(kIOPMSleepWakeUUIDKey), NULL, 0); - } - - if (wake_uuid != NULL) { - char uuid[256]; - - _SC_cfstring_to_cstring(wake_uuid, uuid, sizeof(uuid), kCFStringEncodingUTF8); - asl_set(log_msg, MSGTRACER_KEY_DOMAIN, MY_MSGTRACER_DOMAIN); - asl_set(log_msg, MSGTRACER_KEY_UUID , uuid); - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s wake UUID notification: UUID set (%@)"), - elapsed(), - wake_uuid); - - CFRelease(wake_uuid); - } else { - asl_unset(log_msg, MSGTRACER_KEY_DOMAIN); - asl_unset(log_msg, MSGTRACER_KEY_UUID); - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s wake UUID notification: UUID not set"), - elapsed()); - } - } - - return; -} - - -static void -add_wake_uuid_notification() -{ - kern_return_t kr; - io_object_t notification = IO_OBJECT_NULL; - IONotificationPortRef notifyPort; - io_service_t service; - - notifyPort = IONotificationPortCreate(kIOMasterPortDefault); - service = IORegistryEntryFromPath(kIOMasterPortDefault, - kIOPowerPlane ":/IOPowerConnection/IOPMrootDomain"); - kr = IOServiceAddInterestNotification(notifyPort, - service, - kIOGeneralInterest, - wake_uuid_notification, - NULL, // refCon - ¬ification); - if (kr != KERN_SUCCESS) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, - CFSTR("IOServiceAddInterestNotification() failed, kr=0x%x"), - kr); - return; - } - - CFRunLoopAddSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(notifyPort), - kCFRunLoopDefaultMode); - - wake_uuid_notification(NULL, - service, - kIOPMMessageSleepWakeUUIDChange, - kIOPMMessageSleepWakeUUIDSet); - - return; -} -#endif // kIOPMMessageSleepWakeUUIDChange - - -#pragma mark - -#pragma mark SCDynamicStore "network" Events - - -static void -NetworkChange_notification(SCDynamicStoreRef store, CFArrayRef changedKeys, void *context) -{ - CFIndex i; - CFIndex nk; - CFMutableStringRef str; - - str = CFStringCreateMutable(NULL, 0); - CFStringAppendFormat(str, - NULL, - CFSTR("%s SCDynamicStore \"network\" notification"), - elapsed()); - - nk = CFArrayGetCount(changedKeys); - for (i = 0; i < nk; i++) { - CFArrayRef components; - CFStringRef key; - CFIndex nc; - - key = CFArrayGetValueAtIndex(changedKeys, i); - - components = CFStringCreateArrayBySeparatingStrings(NULL, key, CFSTR("/")); - if (components == NULL) { - CFStringAppendFormat(str, NULL, CFSTR("\n%@"), key); - continue; - } - - nc = CFArrayGetCount(components); - switch (nc) { - case 5 : { - CFStringRef entity_id; - - entity_id = CFArrayGetValueAtIndex(components, 4); - if (CFEqual(entity_id, kSCEntNetLink)) { - CFDictionaryRef dict; - const char *val = "?"; - - dict = SCDynamicStoreCopyValue(store, key); - if (dict != NULL) { - CFBooleanRef link; - - link = CFDictionaryGetValue(dict, kSCPropNetLinkActive); - if (link != NULL) { - val = CFBooleanGetValue(link) ? "up" : "down"; - } - - CFRelease(dict); - } - CFStringAppendFormat(str, NULL, CFSTR("\n%@ (%s)"), key, val); - } else if (CFEqual(entity_id, kSCEntNetIPv4) || - CFEqual(entity_id, kSCEntNetIPv6) || - CFEqual(entity_id, kSCEntNetDNS)) { - CFDictionaryRef dict; - - dict = SCDynamicStoreCopyValue(store, key); - if (dict != NULL) { - CFStringRef val; - - val = _SCCopyDescription(dict, NULL); - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : %@"), key, val); - CFRelease(val); - CFRelease(dict); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : removed"), key); - } - } else if (CFEqual(entity_id, kSCEntNetAirPort)) { - CFDictionaryRef dict; - - dict = SCDynamicStoreCopyValue(store, key); - if (dict != NULL) { - CFStringRef ssid_str; - - ssid_str = CFDictionaryGetValue(dict, CFSTR("SSID_STR")); - if (ssid_str != NULL) { - CFDataRef bssid; - - bssid = CFDictionaryGetValue(dict, CFSTR("BSSID")); - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : SSID: %@ BSSID: %s"), - key, - ssid_str, - (bssid != NULL) ? ether_ntoa((struct ether_addr *)CFDataGetBytePtr(bssid)) : ""); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : no SSID"), key); - } - CFRelease(dict); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : removed"), key); - } - } else if (CFEqual(entity_id, kSCEntNetService)) { - CFDictionaryRef dict; - CFStringRef rank = kSCNetworkServicePrimaryRankDefault; - - dict = SCDynamicStoreCopyValue(store, key); - if ((dict == NULL) || - !CFDictionaryGetValueIfPresent(dict, - kSCPropNetServicePrimaryRank, - (const void **)&rank)) { - rank = kSCNetworkServicePrimaryRankDefault; - } - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : Rank = %@"), key, rank); - if (dict != NULL) CFRelease(dict); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@"), key); - } - break; - } - - case 4 : { - static CFStringRef rank_setup_prefix = NULL; - static CFStringRef rank_state_prefix = NULL; - - if (rank_setup_prefix == NULL) { - rank_setup_prefix = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - CFSTR(""), - NULL); - rank_state_prefix = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - CFSTR(""), - NULL); - } - - if (CFStringHasPrefix(key, rank_setup_prefix) || - CFStringHasPrefix(key, rank_state_prefix)) { - CFDictionaryRef dict; - CFStringRef rank = kSCNetworkServicePrimaryRankDefault; - - dict = SCDynamicStoreCopyValue(store, key); - if ((dict == NULL) || - !CFDictionaryGetValueIfPresent(dict, - kSCPropNetServicePrimaryRank, - (const void **)&rank)) { - rank = kSCNetworkServicePrimaryRankDefault; - } - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : Rank = %@"), key, rank); - if (dict != NULL) CFRelease(dict); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@"), key); - } - break; - } - - case 2 : - if (CFEqual(CFArrayGetValueAtIndex(components, 1), - CFSTR(kIOPMSystemPowerCapabilitiesKeySuffix))) { - CFNumberRef num; - - num = SCDynamicStoreCopyValue(store, key); - if (num != NULL) { - IOPMSystemPowerStateCapabilities capabilities; - - if (isA_CFNumber(num) && - CFNumberGetValue(num, kCFNumberSInt32Type, &capabilities)) { - CFStringAppendFormat(str, NULL, CFSTR("\n%@ (0x%x)"), key, capabilities); - } - - CFRelease(num); - } - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@"), key); - } - break; - - default : - CFStringAppendFormat(str, NULL, CFSTR("\n%@"), key); - break; - } - - CFRelease(components); - } - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, CFSTR("%@"), str); - CFRelease(str); - return; -} - - -static void -add_NetworkChange_keys(CFMutableArrayRef keys, - CFMutableArrayRef patterns, - CFStringRef entity, - Boolean doGlobal, - Boolean doService, - Boolean doInterface) -{ - CFStringRef key; - CFStringRef pattern; - - if (doGlobal) { - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainSetup, entity); - CFArrayAppendValue(keys, key); - CFRelease(key); - - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, entity); - CFArrayAppendValue(keys, key); - CFRelease(key); - } - - if (doService) { - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainSetup, kSCCompAnyRegex, entity); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, entity); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - } - - if (doInterface) { - pattern = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, entity); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - } - - return; -} - - -static void -add_NetworkChange_notification() -{ - CFStringRef dns_key; - CFStringRef key; - CFMutableArrayRef keys; - Boolean ok; - CFMutableArrayRef patterns; - SCDynamicStoreRef store; - CFRunLoopSourceRef rls; - - store = SCDynamicStoreCreate(NULL, CFSTR("Logger.bundle-NetworkChange"), NetworkChange_notification, NULL); - if (store == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreate() failed")); - return; - } - - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - // Interface list - - key = SCDynamicStoreKeyCreateNetworkInterface(NULL, kSCDynamicStoreDomainState); - CFArrayAppendValue(keys, key); - CFRelease(key); - - // IPv4 - - add_NetworkChange_keys(keys, patterns, kSCEntNetIPv4, TRUE, TRUE, TRUE); - - // IPv6 - - add_NetworkChange_keys(keys, patterns, kSCEntNetIPv6, TRUE, TRUE, TRUE); - - // PPP, VPN - - add_NetworkChange_keys(keys, patterns, kSCEntNetPPP, FALSE, TRUE, TRUE); - add_NetworkChange_keys(keys, patterns, kSCEntNetVPN, FALSE, TRUE, TRUE); - add_NetworkChange_keys(keys, patterns, kSCEntNetL2TP, FALSE, TRUE, TRUE); - add_NetworkChange_keys(keys, patterns, kSCEntNetPPTP, FALSE, TRUE, TRUE); - add_NetworkChange_keys(keys, patterns, kSCEntNetIPSec, FALSE, TRUE, TRUE); - - // Link - - add_NetworkChange_keys(keys, patterns, kSCEntNetLink, FALSE, FALSE, TRUE); - - // AirPort (e.g. BSSID) - - add_NetworkChange_keys(keys, patterns, kSCEntNetAirPort, FALSE, FALSE, TRUE); - - // DNS - - add_NetworkChange_keys(keys, patterns, kSCEntNetDNS, TRUE, TRUE, TRUE); - - dns_key = CFStringCreateWithCString(NULL, - dns_configuration_notify_key(), - kCFStringEncodingASCII); - key = CFStringCreateWithFormat(NULL, NULL, CFSTR("Notify:%@"), dns_key); - CFRelease(dns_key); - CFArrayAppendValue(keys, key); - CFRelease(key); - - // Proxies - - key = SCDynamicStoreKeyCreateProxies(NULL); - CFArrayAppendValue(keys, key); - CFRelease(key); - - // Rank - - add_NetworkChange_keys(keys, patterns, NULL, FALSE, TRUE, FALSE); // per-service - add_NetworkChange_keys(keys, patterns, kSCEntNetService, FALSE, FALSE, TRUE); // per-interface - - // ComputerName, LocalHostName - - key = SCDynamicStoreKeyCreateComputerName(NULL); - CFArrayAppendValue(keys, key); - CFRelease(key); - - key = SCDynamicStoreKeyCreateHostNames(NULL); - CFArrayAppendValue(keys, key); - CFRelease(key); - - // Power Management - - key = SCDynamicStoreKeyCreate(NULL, CFSTR("%@%@"), - kSCDynamicStoreDomainState, - CFSTR(kIOPMSystemPowerCapabilitiesKeySuffix)); - CFArrayAppendValue(keys, key); - CFRelease(key); - - - // Setup monitoring - - ok = SCDynamicStoreSetNotificationKeys(store, keys, patterns); - CFRelease(keys); - CFRelease(patterns); - if (!ok) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed")); - CFRelease(store); - return; - } - - rls = SCDynamicStoreCreateRunLoopSource(NULL, store, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(store); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(store); - return; -} - - -static void -PrimaryService_notification(SCDynamicStoreRef store, CFArrayRef changedKeys, void *context) -{ - CFDictionaryRef entity; - CFStringRef key; - static CFStringRef oldPrimary = NULL; - CFStringRef newPrimary = NULL; - - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); - entity = SCDynamicStoreCopyValue(store, key); - CFRelease(key); - if (isA_CFDictionary(entity) && - CFDictionaryGetValueIfPresent(entity, - kSCDynamicStorePropNetPrimaryService, - (const void **)&newPrimary) && - isA_CFString(newPrimary)) { - CFRetain(newPrimary); - } else { - newPrimary = NULL; - } - - if (!_SC_CFEqual(oldPrimary, newPrimary)) { - if (newPrimary != NULL) { - CFStringRef newInterface; - - newInterface = CFDictionaryGetValue(entity, kSCDynamicStorePropNetPrimaryInterface); - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s Primary service: %@ (%@)"), - elapsed(), - newPrimary, - newInterface != NULL ? newInterface : CFSTR("?")); - } else { - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s Primary service: removed"), - elapsed()); - } - } - - if (oldPrimary != NULL) CFRelease(oldPrimary); - oldPrimary = newPrimary; - - if (entity != NULL) CFRelease(entity); - return; -} - - -static void -add_PrimaryService_notification() -{ - CFStringRef key; - CFMutableArrayRef keys; - Boolean ok; - SCDynamicStoreRef store; - CFRunLoopSourceRef rls; - - store = SCDynamicStoreCreate(NULL, CFSTR("Logger.bundle-PrimaryService"), PrimaryService_notification, NULL); - if (store == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreate() failed")); - return; - } - - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); - CFArrayAppendValue(keys, key); - CFRelease(key); - - ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); - CFRelease(keys); - if (!ok) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed")); - CFRelease(store); - return; - } - - rls = SCDynamicStoreCreateRunLoopSource(NULL, store, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(store); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(store); - return; -} - - -#pragma mark - -#pragma mark Reachability Events - - -static void -reachability_notification(SCNetworkReachabilityRef ref, SCNetworkReachabilityFlags flags, void *info) -{ - CFStringRef hostname = (CFStringRef)info; - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s reachability changed: %@: flags=0x%08x"), - elapsed(), - hostname, - flags); - return; -} - - -static void -add_reachability_notification(CFArrayRef hosts) -{ - SCNetworkReachabilityContext context = { 0, NULL, CFRetain, CFRelease, CFCopyDescription }; - CFIndex i; - CFIndex n; - SCNetworkReachabilityRef target; - - struct watch { - in_addr_t addr; - CFStringRef name; - } watchAddresses[] = { { 0, CFSTR("0.0.0.0") }, - { IN_LINKLOCALNETNUM, CFSTR("169.254.0.0") }, - { (u_int32_t)0xe00000fb, CFSTR("224.0.0.251") }, - }; - - for (i = 0; i < sizeof(watchAddresses)/sizeof(watchAddresses[0]); i++) { - struct sockaddr_in sin; - - bzero(&sin, sizeof(sin)); - sin.sin_len = sizeof(sin); - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = htonl(watchAddresses[i].addr); - - target = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&sin); - if (target == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCNetworkReachabilityCreateWithAddress() failed")); - return; - } - - context.info = (void *)watchAddresses[i].name; - if (!SCNetworkReachabilitySetCallback(target, reachability_notification, &context)) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCNetworkReachabilitySetCallback() failed")); - CFRelease(target); - return; - } - - if (!SCNetworkReachabilityScheduleWithRunLoop(target, CFRunLoopGetCurrent(), kCFRunLoopCommonModes)) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCNetworkReachabilityScheduleWithRunLoop() failed")); - CFRelease(target); - return; - } - - CFRelease(target); - } - - n = (hosts != NULL) ? CFArrayGetCount(hosts) : 0; - for (i = 0; i < n; i++) { - CFStringRef host; - char *nodename; - - host = CFArrayGetValueAtIndex(hosts, i); - if (!isA_CFString(host) || (CFStringGetLength(host) == 0)) { - continue; - } - - nodename = _SC_cfstring_to_cstring(host, NULL, 0, kCFStringEncodingUTF8); - target = SCNetworkReachabilityCreateWithName(NULL, nodename); - CFAllocatorDeallocate(NULL, nodename); - if (target == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCNetworkReachabilityCreateWithName() failed")); - return; - } - - context.info = (void *)host; - if (!SCNetworkReachabilitySetCallback(target, reachability_notification, &context)) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCNetworkReachabilitySetCallback() failed")); - CFRelease(target); - return; - } - - if (!SCNetworkReachabilityScheduleWithRunLoop(target, CFRunLoopGetCurrent(), kCFRunLoopCommonModes)) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCNetworkReachabilityScheduleWithRunLoop() failed")); - CFRelease(target); - return; - } - - CFRelease(target); - } - - return; -} - - -#pragma mark - -#pragma mark Console User/Information Events - - -#if !TARGET_OS_EMBEDDED -static void -console_notification(SCDynamicStoreRef store, CFArrayRef changedKeys, void *context) -{ - gid_t gid; - CFArrayRef info; - CFMutableStringRef str = CFStringCreateMutable(NULL, 0); - uid_t uid; - CFStringRef user; - - CFStringAppendFormat(str, - NULL, - CFSTR("%s SCDynamicStore console notification"), - elapsed()); - - user = SCDynamicStoreCopyConsoleUser(store, &uid, &gid); - if (user != NULL) { - CFStringAppendFormat(str, NULL, CFSTR("\nconsole user = %@"), user); - CFRelease(user); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\nno console user")); - } - - info = SCDynamicStoreCopyConsoleInformation(store); - if (info != NULL) { - CFIndex i; - CFIndex n; - - n = CFArrayGetCount(info); - for (i = 0; i < n; i++) { - CFDictionaryRef session; - CFNumberRef sessionID; - CFStringRef sessionUserName; - CFBooleanRef sessionOnConsole; - - session = CFArrayGetValueAtIndex(info, i); - sessionID = CFDictionaryGetValue(session, kSCConsoleSessionID); - sessionUserName = CFDictionaryGetValue(session, kSCConsoleSessionUserName); - sessionOnConsole = CFDictionaryGetValue(session, kSCConsoleSessionOnConsole); - - CFStringAppendFormat(str, NULL, CFSTR("\n%ld : id=%@, user=%@, console=%s"), - i, - sessionID, - sessionUserName != NULL ? sessionUserName : CFSTR("?"), - sessionOnConsole != NULL ? CFBooleanGetValue(sessionOnConsole) ? "yes" : "no" : "?"); - } - - CFRelease(info); - } - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, CFSTR("%@"), str); - CFRelease(str); - return; -} - - -static void -add_console_notification() -{ - CFStringRef key; - CFMutableArrayRef keys; - Boolean ok; - SCDynamicStoreRef store; - CFRunLoopSourceRef rls; - - store = SCDynamicStoreCreate(NULL, CFSTR("Logger.bundle-console"), console_notification, NULL); - if (store == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreate() failed")); - return; - } - - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - key = SCDynamicStoreKeyCreateConsoleUser(NULL); - CFArrayAppendValue(keys, key); - CFRelease(key); - - ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); - CFRelease(keys); - if (!ok) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed")); - CFRelease(store); - return; - } - - rls = SCDynamicStoreCreateRunLoopSource(NULL, store, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(store); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(store); - return; -} -#endif // !TARGET_OS_EMBEDDED - - -#pragma mark - -#pragma mark Directory Services Events - - -//#include -#ifndef kDSStdNotifySearchPolicyChanged -#define kDSStdNotifySearchPolicyChanged "com.apple.DirectoryService.NotifyTypeStandard:SearchPolicyChanged" -#endif - - -#if !TARGET_OS_EMBEDDED -static void -directoryServices_notification(SCDynamicStoreRef store, CFArrayRef changedKeys, void *context) -{ - CFIndex i; - CFIndex n; - CFMutableStringRef str = CFStringCreateMutable(NULL, 0); - - CFStringAppendFormat(str, - NULL, - CFSTR("%s SCDynamicStore DirectoryServices notification"), - elapsed()); - - n = CFArrayGetCount(changedKeys); - for (i = 0; i < n; i++) { - CFStringRef key; - - key = CFArrayGetValueAtIndex(changedKeys, i); - CFStringAppendFormat(str, NULL, CFSTR("\n%@"), key); - } - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, CFSTR("%@"), str); - CFRelease(str); - return; -} - - -static void -add_DirectoryServices_notification() -{ - CFStringRef key; - CFMutableArrayRef keys; - Boolean ok; - SCDynamicStoreRef store; - CFRunLoopSourceRef rls; - - store = SCDynamicStoreCreate(NULL, CFSTR("Logger.bundle-directoryServices"), directoryServices_notification, NULL); - if (store == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreate() failed")); - return; - } - - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - key = CFSTR(kDSStdNotifySearchPolicyChanged); - CFArrayAppendValue(keys, key); -// CFRelease(key); - - ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); - CFRelease(keys); - if (!ok) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed")); - CFRelease(store); - return; - } - - rls = SCDynamicStoreCreateRunLoopSource(NULL, store, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(store); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(store); - return; -} -#endif // !TARGET_OS_EMBEDDED - - -#pragma mark - -#pragma mark DNS Configuration Events - - -static void -dnsinfo_notification(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s dnsinfo notification"), - elapsed()); - - return; -} - - -static void -add_dnsinfo_notification() -{ - const char *key; - CFMachPortRef mp; - mach_port_t notify_port; - int notify_token; - CFRunLoopSourceRef rls; - uint32_t status; - - key = dns_configuration_notify_key(); - status = notify_register_mach_port(key, ¬ify_port, 0, ¬ify_token); - if (status != NOTIFY_STATUS_OK) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("notify_register_mach_port() failed")); - return; - } - - mp = _SC_CFMachPortCreateWithPort("Logger/dns_configuration", notify_port, dnsinfo_notification, NULL); - if (mp == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("CFMachPortCreateWithPort() failed")); - (void)notify_cancel(notify_token); - return; - } - - rls = CFMachPortCreateRunLoopSource(NULL, mp, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(mp); - (void)notify_cancel(notify_token); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(mp); - return; -} - - -#pragma mark - -#pragma mark Network Information Events - - -static void -nwi_notification(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s network_information notification"), - elapsed()); - - return; -} - - -static void -add_nwi_notification() -{ - const char *key; - CFMachPortRef mp; - mach_port_t notify_port; - int notify_token; - CFRunLoopSourceRef rls; - uint32_t status; - - key = nwi_state_get_notify_key(); - status = notify_register_mach_port(key, ¬ify_port, 0, ¬ify_token); - if (status != NOTIFY_STATUS_OK) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("notify_register_mach_port() failed")); - return; - } - - mp = _SC_CFMachPortCreateWithPort("Logger/nwi", notify_port, nwi_notification, NULL); - if (mp == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("CFMachPortCreateWithPort() failed")); - (void)notify_cancel(notify_token); - return; - } - - rls = CFMachPortCreateRunLoopSource(NULL, mp, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(mp); - (void)notify_cancel(notify_token); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(mp); - return; -} - - -#pragma mark - -#pragma mark Network Configuration Change Events - - -static void -network_notification(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s network_change notification"), - elapsed()); - - return; -} - - -static void -add_network_notification() -{ - CFMachPortRef mp; - mach_port_t notify_port; - int notify_token; - CFRunLoopSourceRef rls; - uint32_t status; - - status = notify_register_mach_port(_SC_NOTIFY_NETWORK_CHANGE, - ¬ify_port, - 0, - ¬ify_token); - if (status != NOTIFY_STATUS_OK) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("notify_register_mach_port() failed")); - return; - } - - mp = _SC_CFMachPortCreateWithPort("Logger/network_change", notify_port, network_notification, NULL); - if (mp == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("CFMachPortCreateWithPort() failed")); - (void)notify_cancel(notify_token); - return; - } - - rls = CFMachPortCreateRunLoopSource(NULL, mp, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(mp); - (void)notify_cancel(notify_token); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(mp); - return; -} - - -#pragma mark - -#pragma mark SMB Configuration Events - - -#define SMBCONFIGURATION_NOTIFY_KEY "com.apple.system.SystemConfiguration.smb_configuration" - - -#if !TARGET_OS_EMBEDDED -static void -smbconf_notification(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, - CFSTR("%s smb.conf notification"), - elapsed()); - - return; -} - - -static void -add_smbconf_notification() -{ - CFMachPortRef mp; - mach_port_t notify_port; - int notify_token; - CFRunLoopSourceRef rls; - uint32_t status; - - status = notify_register_mach_port(SMBCONFIGURATION_NOTIFY_KEY, - ¬ify_port, - 0, - ¬ify_token); - if (status != NOTIFY_STATUS_OK) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("notify_register_mach_port() failed")); - return; - } - - mp = _SC_CFMachPortCreateWithPort("Logger/smb_configuration", notify_port, smbconf_notification, NULL); - if (mp == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("CFMachPortCreateWithPort() failed")); - (void)notify_cancel(notify_token); - return; - } - - rls = CFMachPortCreateRunLoopSource(NULL, mp, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(mp); - (void)notify_cancel(notify_token); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(mp); - return; -} -#endif // !TARGET_OS_EMBEDDED - - -#pragma mark - -#pragma mark pututxline Events - - -#ifndef TARGET_OS_EMBEDDED -static const char * -ut_time(struct utmpx *utmpx) -{ - static char str[16]; - struct tm tm; - - (void)localtime_r(&utmpx->ut_tv.tv_sec, &tm); - snprintf(str, sizeof(str), "%2d:%02d:%02d.%03d", - tm.tm_hour, - tm.tm_min, - tm.tm_sec, - utmpx->ut_tv.tv_usec / 1000); - - return str; -} - - -static const char * -ut_id(struct utmpx *utmpx) -{ - char *cp; - static char str[16]; - - cp = utmpx->ut_id + sizeof(utmpx->ut_id); - while(--cp >= utmpx->ut_id && isprint(*cp)) {} - if(cp < utmpx->ut_id) { - snprintf(str, sizeof(str), "%-4.4s", utmpx->ut_id); - } else { - snprintf(str, sizeof(str), - "0x%2.2x%2.2x%2.2x%2.2x", - utmpx->ut_id[0], - utmpx->ut_id[1], - utmpx->ut_id[2], - utmpx->ut_id[3]); - } - - return str; -} - - -static const char * -ut_pid(struct utmpx *utmpx) -{ - static char pid[16]; - - snprintf(pid, sizeof(pid), "%d", utmpx->ut_pid); - - return pid; -} - - -static void -pututxline_notification(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - CFMutableStringRef str = CFStringCreateMutable(NULL, 0); - struct utmpx *utmpx; - utmpx_t utx; - - CFStringAppendFormat(str, - NULL, - CFSTR("%s pututxline notification"), - elapsed()); - - utx = _openutx(NULL); - while ((utmpx = _getutxent(utx)) != NULL) { - const char * entry_id = NULL; - const char * entry_line = NULL; - const char * entry_pid = NULL; - const char * entry_tv = NULL; - const char * entry_type; - const char * entry_user = NULL; - char line[128]; - int n; - - switch (utmpx->ut_type) { - case BOOT_TIME : // Time of a system boot. - entry_type = "Boot"; - entry_tv = ut_time(utmpx); - break; - case DEAD_PROCESS : // A session leader exited. - entry_type = "Dead process"; - entry_id = ut_id (utmpx); - entry_pid = ut_pid (utmpx); - entry_tv = ut_time(utmpx); - break; - case EMPTY : // No valid user accounting information. - continue; - case INIT_PROCESS : // A process spawned by init(8). - entry_type = "Init process"; - entry_id = ut_id (utmpx); - entry_pid = ut_pid (utmpx); - entry_tv = ut_time(utmpx); - break; - case LOGIN_PROCESS : // The session leader of a logged-in user. - entry_type = "Login"; - entry_id = ut_id (utmpx); - entry_user = utmpx->ut_user; - entry_pid = ut_pid (utmpx); - entry_tv = ut_time(utmpx); - break; - case NEW_TIME : // Time after system clock change. - entry_type = "New time"; - entry_tv = ut_time(utmpx); - break; - case OLD_TIME : // Time before system clock change. - entry_type = "Old time"; - entry_tv = ut_time(utmpx); - break; - case RUN_LVL : // Run level. Provided for compatibility, not used. - entry_type = "Run level"; - break; - case USER_PROCESS : // A user process. - entry_type = "User Process"; - entry_id = ut_id (utmpx); - entry_user = utmpx->ut_user; - entry_line = utmpx->ut_line; - entry_pid = ut_pid (utmpx); - entry_tv = ut_time(utmpx); - break; - case SHUTDOWN_TIME : // Time of system shutdown - entry_type = "Shutdown time"; - entry_tv = ut_time(utmpx); - break; - default : - entry_type = "Unknown"; - break; - } - - snprintf(line, sizeof(line), - // type time id=0x12345678 pid=12345 user=abcdefgh line - "\n%-13s %2s%12s %3s%-10s %4s%-5s %5s%-8s %5s%s", - entry_type, - entry_tv != NULL ? "@ " : "", - entry_tv != NULL ? entry_tv : "", // hh:mm:ss.ddd - entry_id != NULL ? "id=" : "", - entry_id != NULL ? entry_id : "", // 0x12345678 - entry_pid != NULL ? "pid=" : "", - entry_pid != NULL ? entry_pid : "", // ##### - entry_user != NULL ? "user=" : "", - entry_user != NULL ? entry_user : "", // <=256 chars - entry_line != NULL ? "line=" : "", - entry_line != NULL ? entry_line : "" // <= 32 chars - ); - - n = (int)strlen(line) - 1; - while ((n > 0) && (line[n] == ' ')) { - line[n] = '\0'; - --n; - } - - CFStringAppendFormat(str, NULL, CFSTR("%s"), line); - } - _endutxent(utx); - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, CFSTR("%@"), str); - CFRelease(str); - return; -} - - -static void -add_pututxline_notification() -{ - CFMachPortRef mp; - mach_port_t notify_port; - int notify_token; - CFRunLoopSourceRef rls; - uint32_t status; - - status = notify_register_mach_port(UTMPX_CHANGE_NOTIFICATION, ¬ify_port, 0, ¬ify_token); - if (status != NOTIFY_STATUS_OK) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("notify_register_mach_port() failed")); - return; - } - - mp = _SC_CFMachPortCreateWithPort("Logger/utmpx", notify_port, pututxline_notification, NULL); - if (mp == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("CFMachPortCreateWithPort() failed")); - (void)notify_cancel(notify_token); - return; - } - - rls = CFMachPortCreateRunLoopSource(NULL, mp, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(mp); - (void)notify_cancel(notify_token); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(mp); - return; -} -#endif // !TARGET_OS_EMBEDDED - - -#pragma mark - -#pragma mark BackToMyMac Status Events - - -#ifndef kDSStdNotifyBTMMStatusChanged -#define kDSStdNotifyBTMMStatusChanged "State:/Network/BackToMyMac" -#endif - - -#if !TARGET_OS_EMBEDDED -static void -BTMM_notification(SCDynamicStoreRef store, CFArrayRef changedKeys, void *context) -{ - CFIndex i; - CFIndex n; - CFMutableStringRef str = CFStringCreateMutable(NULL, 0); - - CFStringAppendFormat(str, - NULL, - CFSTR("%s SCDynamicStore Back to My Mac notification"), - elapsed()); - - n = CFArrayGetCount(changedKeys); - for (i = 0; i < n; i++) { - CFStringRef key; - CFDictionaryRef dict; - - key = CFArrayGetValueAtIndex(changedKeys, i); - dict = SCDynamicStoreCopyValue(store, key); - if (dict != NULL) { - CFStringRef val; - - val = _SCCopyDescription(dict, NULL); - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : %@"), key, val); - CFRelease(val); - CFRelease(dict); - } else { - CFStringAppendFormat(str, NULL, CFSTR("\n%@ : removed"), key); - } - } - - SCLOG(NULL, log_msg, ~ASL_LEVEL_INFO, CFSTR("%@"), str); - CFRelease(str); - return; -} - - -static void -add_BTMM_notification() -{ - CFStringRef key; - CFMutableArrayRef keys; - Boolean ok; - SCDynamicStoreRef store; - CFRunLoopSourceRef rls; - - store = SCDynamicStoreCreate(NULL, CFSTR("Logger.bundle-BackToMyMac"), BTMM_notification, NULL); - if (store == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreate() failed")); - return; - } - - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - key = CFSTR(kDSStdNotifyBTMMStatusChanged); - CFArrayAppendValue(keys, key); - - ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); - CFRelease(keys); - if (!ok) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed")); - CFRelease(store); - return; - } - - rls = SCDynamicStoreCreateRunLoopSource(NULL, store, -1); - if (rls == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCDynamicStoreCreateRunLoopSource() failed")); - CFRelease(store); - return; - } - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - CFRelease(store); - return; -} -#endif // !TARGET_OS_EMBEDDED - - -#pragma mark - - - -static __inline__ Boolean -bValFromDictionary(CFDictionaryRef dict, CFStringRef key) -{ - CFBooleanRef bVal; - Boolean result = FALSE; - - if ((dict != NULL) && - CFDictionaryGetValueIfPresent(dict, key, (const void **)&bVal) && - isA_CFBoolean(bVal)) { - result = CFBooleanGetValue(bVal); - } - - return result; -} - - -void -load(CFBundleRef bundle, Boolean bundleVerbose) -{ - CFDictionaryRef config; - Boolean log_all; - - verbose = bundleVerbose; - - log_msg = asl_new(ASL_TYPE_MSG); - asl_set(log_msg, ASL_KEY_FACILITY, MY_ASL_FACILITY); - - elapsed(); - - config = CFBundleGetInfoDictionary(bundle); - config = isA_CFDictionary(config); - log_all = bValFromDictionary(config, CFSTR("LOG_ALL")); - -#ifdef kIOPMMessageSleepWakeUUIDChange - if (log_all || bValFromDictionary(config, CFSTR("LOG_IO_WAKEUUID_EVENTS"))) { - add_wake_uuid_notification(); - } -#endif // kIOPMMessageSleepWakeUUIDChange - - if (log_all || bValFromDictionary(config, CFSTR("LOG_IO_SYSTEMPOWER_EVENTS"))) { - add_power_notification(); - } - - if (log_all || bValFromDictionary(config, CFSTR("LOG_NETWORK_KERNEL_EVENTS"))) { - add_KernelEvent_notification(); - } - - if (log_all || bValFromDictionary(config, CFSTR("LOG_NETWORK_INFORMATION"))) { - add_nwi_notification(); - } - - if (log_all || bValFromDictionary(config, CFSTR("LOG_NOTIFY_DNS_CONFIGURATION"))) { - add_dnsinfo_notification(); - } - - if (log_all || bValFromDictionary(config, CFSTR("LOG_NOTIFY_NETWORK_CHANGE"))) { - add_network_notification(); - } - -#if !TARGET_OS_EMBEDDED - if (log_all || bValFromDictionary(config, CFSTR("LOG_NOTIFY_SMB_CONFIGURATION"))) { - add_smbconf_notification(); - } -#endif // !TARGET_OS_EMBEDDED - -#ifndef TARGET_OS_EMBEDDED - if (log_all || bValFromDictionary(config, CFSTR("LOG_NOTIFY_UTMPX_CHANGE"))) { - add_pututxline_notification(); - } -#endif // !TARGET_OS_EMBEDDED - -#if !TARGET_OS_EMBEDDED - if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_BTMM_CONFIGURATION"))) { - add_BTMM_notification(); - } -#endif // !TARGET_OS_EMBEDDED - -#if !TARGET_OS_EMBEDDED - if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_CONSOLEUSER"))) { - add_console_notification(); - } -#endif // !TARGET_OS_EMBEDDED - -#if !TARGET_OS_EMBEDDED - if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_DIRECTORYSERVICES_SEARCHPOLICY"))) { - add_DirectoryServices_notification(); - } -#endif // !TARGET_OS_EMBEDDED - - if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_NETWORKCHANGE"))) { - add_NetworkChange_notification(); - } - - if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_PRIMARYSERVICE"))) { - add_PrimaryService_notification(); - } - - if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_REACHABILITY"))) { - CFArrayRef hosts = NULL; - - if ((config == NULL) || - !CFDictionaryGetValueIfPresent(config, CFSTR("LOG_SC_REACHABILITY_HOSTS"), (const void **)&hosts) || - !isA_CFArray(hosts) || - (CFArrayGetCount(hosts) == 0)) { - hosts = NULL; - } - - if (verbose) { - _sc_debug = TRUE; - } - - add_reachability_notification(hosts); - } - - return; -} - -#ifdef MAIN - -int -main(int argc, char **argv) -{ - _sc_log = FALSE; - _sc_verbose = (argc > 1) ? TRUE : FALSE; - _sc_debug = TRUE; - - load(CFBundleGetMainBundle(), (argc > 1) ? TRUE : FALSE); - CFRunLoopRun(); - /* not reached */ - exit(0); - return 0; -} - -#endif /* MAIN */ diff --git a/src/configd/Plugins/PreferencesMonitor/Info.plist b/src/configd/Plugins/PreferencesMonitor/Info.plist index bb78029e1..d4e8af912 100644 --- a/src/configd/Plugins/PreferencesMonitor/Info.plist +++ b/src/configd/Plugins/PreferencesMonitor/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable PreferencesMonitor CFBundleIdentifier - com.apple.SystemConfiguration.PreferencesMonitor + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 Builtin Requires diff --git a/src/configd/Plugins/PreferencesMonitor/prefsmon.c b/src/configd/Plugins/PreferencesMonitor/prefsmon.c index 22ace87a2..23d69a53c 100644 --- a/src/configd/Plugins/PreferencesMonitor/prefsmon.c +++ b/src/configd/Plugins/PreferencesMonitor/prefsmon.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2010, 2012-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010, 2012-2019 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -37,25 +37,37 @@ #include #include +#include #include #include #include +#define SC_LOG_HANDLE __log_PreferencesMonitor +#define SC_LOG_HANDLE_TYPE static #include #include #include +#include "plugin_shared.h" +#include /* globals */ -static SCPreferencesRef prefs = NULL; -static SCDynamicStoreRef store = NULL; +static SCPreferencesRef prefs = NULL; +static SCDynamicStoreRef store = NULL; -/* preferences "initialization" globals */ -static CFStringRef initKey = NULL; -static CFRunLoopSourceRef initRls = 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_interfaces= NULL; // of SCNetworkInterfaceRef +static CFMutableArrayRef preconfigured_names = NULL; // of CFStringRef (BSD name) + +/* KernelEventMonitor[.plugin] monitoring globals */ +static CFStringRef interfacesKey = NULL; /* SCDynamicStore (Setup:) */ static CFMutableDictionaryRef currentPrefs; /* current prefs */ @@ -63,20 +75,144 @@ static CFMutableDictionaryRef newPrefs; /* new prefs */ static CFMutableArrayRef unchangedPrefsKeys; /* new prefs keys which match current */ static CFMutableArrayRef removedPrefsKeys; /* old prefs keys to be removed */ -static Boolean rofs = FALSE; -static Boolean _verbose = FALSE; +static Boolean rofs = FALSE; +static Boolean restorePrefs = FALSE; + +#define MY_PLUGIN_NAME "PreferencesMonitor" +#define MY_PLUGIN_ID CFSTR("com.apple.SystemConfiguration." MY_PLUGIN_NAME) + + +static void +updateConfiguration(SCPreferencesRef prefs, + SCPreferencesNotification notificationType, + void *info); + + +static os_log_t +__log_PreferencesMonitor(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "PreferencesMonitor"); + } + + return log; +} +static Boolean +restorePreferences() +{ + Boolean ok = FALSE; + CFStringRef currentModel = NULL; + CFMutableStringRef modelPrefixStr = NULL; + CFArrayRef keyList = NULL; + CFIndex keyListCount; + CFIndex idx; + Boolean modified = FALSE; + int sc_status = kSCStatusFailed; + + while (TRUE) { + ok = SCPreferencesLock(prefs, TRUE); + if (ok) { + break; + } + + sc_status = SCError(); + if (sc_status == kSCStatusStale) { + SCPreferencesSynchronize(prefs); + } else { + SC_log(LOG_NOTICE, "Could not acquire network configuration lock: %s", + SCErrorString(sc_status)); + return FALSE; + } + } + + keyList = SCPreferencesCopyKeyList(prefs); + if (keyList == NULL) { + goto error; + } + + currentModel = _SC_hw_model(FALSE); + if (currentModel == NULL) { + goto error; + } + + /* Create "model:" string for prefix-check */ + modelPrefixStr = CFStringCreateMutableCopy(NULL, 0, currentModel); + CFStringAppend(modelPrefixStr, CFSTR(":")); + + keyListCount = CFArrayGetCount(keyList); + for (idx = 0; idx < keyListCount; idx++) { + CFStringRef existingKey = CFArrayGetValueAtIndex(keyList, idx); + CFStringRef key; + CFArrayRef splitKey = NULL; + CFPropertyListRef value; + + if (isA_CFString(existingKey) == NULL) { + continue; + } + + if (!CFStringHasPrefix(existingKey, modelPrefixStr)) { + continue; + } + + splitKey = CFStringCreateArrayBySeparatingStrings(NULL, existingKey, CFSTR(":")); + key = CFArrayGetValueAtIndex(splitKey, 1); + value = SCPreferencesGetValue(prefs, existingKey); + SCPreferencesSetValue(prefs, key, value); + SCPreferencesRemoveValue(prefs, existingKey); + modified = TRUE; + CFRelease(splitKey); + } + + if (modified) { + SCPreferencesRef ni_prefs = NULL; + ni_prefs = SCPreferencesCreate(NULL, MY_PLUGIN_ID, CFSTR("NetworkInterfaces.plist")); + if (ni_prefs == NULL) { + goto error; + } + + ok = _SCNetworkConfigurationCheckValidityWithPreferences(prefs, ni_prefs, NULL); + CFRelease(ni_prefs); + + //Commit the changes only if prefs files valid + if (ok) { + if (!SCPreferencesCommitChanges(prefs)) { + if (SCError() != EROFS) { + SC_log(LOG_NOTICE, "SCPreferencesCommitChanges() failed: %s", + SCErrorString(SCError())); + } + goto error; + + } + + (void) SCPreferencesApplyChanges(prefs); + } + } + +error: + (void) SCPreferencesUnlock(prefs); + + if (keyList != NULL) { + CFRelease(keyList); + } + if (modelPrefixStr != NULL) { + CFRelease(modelPrefixStr); + } + + return modified; +} + static Boolean establishNewPreferences() { - CFBundleRef bundle; SCNetworkSetRef current = NULL; CFStringRef new_model; Boolean ok = FALSE; int sc_status = kSCStatusFailed; SCNetworkSetRef set = NULL; - CFStringRef setName = NULL; Boolean updated = FALSE; while (TRUE) { @@ -89,9 +225,8 @@ establishNewPreferences() if (sc_status == kSCStatusStale) { SCPreferencesSynchronize(prefs); } else { - SCLog(TRUE, LOG_ERR, - CFSTR("Could not acquire network configuration lock: %s"), - SCErrorString(sc_status)); + SC_log(LOG_NOTICE, "Could not acquire network configuration lock: %s", + SCErrorString(sc_status)); return FALSE; } } @@ -156,32 +291,12 @@ establishNewPreferences() } if (set == NULL) { - set = SCNetworkSetCreate(prefs); + set = _SCNetworkSetCreateDefault(prefs); if (set == NULL) { ok = FALSE; sc_status = SCError(); goto done; } - - bundle = _SC_CFBundleGet(); - if (bundle != NULL) { - setName = CFBundleCopyLocalizedString(bundle, - CFSTR("DEFAULT_SET_NAME"), - CFSTR("Automatic"), - NULL); - } - - ok = SCNetworkSetSetName(set, (setName != NULL) ? setName : CFSTR("Automatic")); - if (!ok) { - sc_status = SCError(); - goto done; - } - - ok = SCNetworkSetSetCurrent(set); - if (!ok) { - sc_status = SCError(); - goto done; - } } ok = SCNetworkSetEstablishDefaultConfiguration(set); @@ -195,7 +310,7 @@ establishNewPreferences() if (ok) { ok = SCPreferencesCommitChanges(prefs); if (ok) { - SCLog(TRUE, LOG_NOTICE, CFSTR("New network configuration saved")); + SC_log(LOG_NOTICE, "New network configuration saved"); updated = TRUE; } else { sc_status = SCError(); @@ -215,119 +330,262 @@ establishNewPreferences() } if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("Could not establish network configuration: %s"), - SCErrorString(sc_status)); + if (sc_status == kSCStatusOK) { + SC_log(LOG_NOTICE, "Network configuration not updated"); + } else { + SC_log(LOG_NOTICE, "Could not establish network configuration: %s", + SCErrorString(sc_status)); + } } (void)SCPreferencesUnlock(prefs); - if (setName != NULL) CFRelease(setName); if (set != NULL) CFRelease(set); return updated; } -static Boolean -quiet(Boolean *timeout) +static void +watchSCDynamicStore() { - CFDictionaryRef dict; - Boolean _quiet = FALSE; - Boolean _timeout = FALSE; + CFMutableArrayRef keys; + Boolean ok; + CFRunLoopSourceRef rls; - // check if quiet - dict = SCDynamicStoreCopyValue(store, initKey); - if (dict != NULL) { - if (isA_CFDictionary(dict)) { - if (CFDictionaryContainsKey(dict, CFSTR("*QUIET*"))) { - _quiet = TRUE; - } - if (CFDictionaryContainsKey(dict, CFSTR("*TIMEOUT*"))) { - _timeout = TRUE; - } - } - CFRelease(dict); + /* + * watch for KernelEventMonitor[.bundle] changes (the list of + * active network interfaces) + */ + interfacesKey = SCDynamicStoreKeyCreateNetworkInterface(NULL, + kSCDynamicStoreDomainState); + + /* + * watch for InterfaceNamer[.bundle] changes (quiet, timeout, + * and the list of pre-configured interfaces) + */ + namerKey = SCDynamicStoreKeyCreate(NULL, + CFSTR("%@" "InterfaceNamer"), + kSCDynamicStoreDomainPlugin); + + rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); + if (rls == NULL) { + SC_log(LOG_NOTICE, "SCDynamicStoreCreateRunLoopSource() failed: %s", SCErrorString(SCError())); + haveConfiguration = TRUE; + return; } + CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); + CFRelease(rls); - if (timeout != NULL) { - *timeout = _timeout; + keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFArrayAppendValue(keys, interfacesKey); + CFArrayAppendValue(keys, namerKey); + ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); + CFRelease(keys); + if (!ok) { + SC_log(LOG_NOTICE, "SCDynamicStoreSetNotificationKeys() failed: %s", SCErrorString(SCError())); + haveConfiguration = TRUE; } - return _quiet; + + return; } -static void -watchQuietDisable() +static Boolean +previousConfigurationAvailable() { - if ((initKey == NULL) || (initRls == NULL)) { - return; + CFStringRef backupKey = NULL; + CFStringRef currentModel = NULL; + CFPropertyListRef properties = NULL; + + currentModel = _SC_hw_model(FALSE); + if (currentModel == NULL) { + goto done; + } + + /* Currently relying only if a backup of "Sets" is present */ + backupKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@:Sets"), currentModel); + properties = SCPreferencesGetValue(prefs, backupKey); + CFRelease(backupKey); +done: + return (properties != NULL); +} + + +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; } - (void) SCDynamicStoreSetNotificationKeys(store, NULL, NULL); + n = (interfaces != NULL) ? CFArrayGetCount(interfaces) : 0; + for (CFIndex i = 0; i < n; i++) { + CFStringRef bsdName = CFArrayGetValueAtIndex(interfaces, i); + SCNetworkInterfaceRef interface; - CFRunLoopSourceInvalidate(initRls); - CFRelease(initRls); - initRls = NULL; + for (int retry = 0; retry < 10; retry++) { + if (retry != 0) { + // add short delay (before retry) + usleep(20 * 1000); // 20ms + } - CFRelease(initKey); - initKey = NULL; + 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; + } - return; + 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; + break; + } + } + + // 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 -watchQuietEnable() +storeCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) { - CFArrayRef keys; - Boolean ok; +#pragma unused(info) + CFDictionaryRef dict; + Boolean quiet = FALSE; + Boolean timeout = FALSE; + Boolean updated = FALSE; - initKey = SCDynamicStoreKeyCreate(NULL, - CFSTR("%@" "InterfaceNamer"), - kSCDynamicStoreDomainPlugin); + /* + * Capture/process InterfaceNamer[.bundle] info + * 1. check if IORegistry "quiet", "timeout" + * 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; - initRls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), initRls, kCFRunLoopDefaultMode); + if (CFDictionaryContainsKey(dict, kInterfaceNamerKey_Quiet)) { + quiet = TRUE; + } + if (CFDictionaryContainsKey(dict, kInterfaceNamerKey_Timeout)) { + timeout = TRUE; + } - keys = CFArrayCreate(NULL, (const void **)&initKey, 1, &kCFTypeArrayCallBacks); - ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); - CFRelease(keys); - if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStoreSetNotificationKeys() failed: %s\n"), SCErrorString(SCError())); - watchQuietDisable(); - } + excluded = CFDictionaryGetValue(dict, kInterfaceNamerKey_ExcludedInterfaces); + excluded = isA_CFArray(excluded); + if (!_SC_CFEqual(excluded, excluded_names)) { + Boolean excluded_updated; - return; -} + excluded_updated = findInterfaces(excluded, &excluded_interfaces, &excluded_names); + if (excluded_updated) { + CFStringRef interfaces = CFSTR(""); + // report [updated] pre-configured interfaces + if (excluded_names != NULL) { + interfaces = CFStringCreateByCombiningStrings(NULL, excluded_names, CFSTR(",")); + } else { + CFRetain(interfaces); + } + SC_log(LOG_INFO, "excluded interface list changed: %@", interfaces); + CFRelease(interfaces); + updated = TRUE; + } + } + preconfigured = CFDictionaryGetValue(dict, kInterfaceNamerKey_PreConfiguredInterfaces); + preconfigured = isA_CFArray(preconfigured); + if (!_SC_CFEqual(preconfigured, preconfigured_names)) { + Boolean preconfigured_updated; -static void -watchQuietCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) -{ - Boolean _quiet; - Boolean _timeout = FALSE; + preconfigured_updated = findInterfaces(preconfigured, &preconfigured_interfaces, &preconfigured_names); + if (preconfigured_updated) { + CFStringRef interfaces = CFSTR(""); - _quiet = quiet(&_timeout); - if (_quiet -#if !TARGET_OS_IPHONE - || _timeout -#endif /* !TARGET_OS_IPHONE */ - ) { - watchQuietDisable(); + // report [updated] pre-configured interfaces + if (preconfigured_names != NULL) { + interfaces = CFStringCreateByCombiningStrings(NULL, preconfigured_names, CFSTR(",")); + } else { + CFRetain(interfaces); + } + SC_log(LOG_INFO, "pre-configured interface list changed: %@", interfaces); + CFRelease(interfaces); + + updated = TRUE; + } + } + } + + CFRelease(dict); } - if (_quiet || _timeout) { + if (!haveConfiguration && (quiet || timeout)) { static int logged = 0; + if (quiet +#if !TARGET_OS_IPHONE + || timeout +#endif /* !TARGET_OS_IPHONE */ + ) { + haveConfiguration = TRUE; + } + (void) establishNewPreferences(); - if (_timeout && (logged++ == 0)) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("Network configuration creation timed out waiting for IORegistry")); + + if (restorePrefs) { + (void) restorePreferences(); + restorePrefs = FALSE; + } + + if (timeout && (logged++ == 0)) { + SC_log(LOG_ERR, "Network configuration creation timed out waiting for IORegistry"); } } + if (updated && (changedKeys != NULL)) { + // if pre-configured interface list changed + updateConfiguration(prefs, kSCPreferencesNotificationApply, (void *)store); + } + return; } @@ -335,6 +593,7 @@ watchQuietCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) static void updateCache(const void *key, const void *value, void *context) { +#pragma unused(context) CFStringRef configKey = (CFStringRef)key; CFPropertyListRef configData = (CFPropertyListRef)value; CFPropertyListRef cacheData; @@ -387,10 +646,9 @@ flatten(SCPreferencesRef prefs, subset = SCPreferencesPathGetValue(prefs, link); if (!subset) { /* if error with link */ - SCLog(TRUE, LOG_ERR, - CFSTR("SCPreferencesPathGetValue(,%@,) failed: %s"), - link, - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesPathGetValue(,%@,) failed: %s", + link, + SCErrorString(SCError())); return; } } @@ -457,6 +715,261 @@ flatten(SCPreferencesRef prefs, } +static CF_RETURNS_RETAINED CFStringRef +copyInterfaceUUID(CFStringRef bsdName) +{ + union { + unsigned char sha256_bytes[CC_SHA256_DIGEST_LENGTH]; + CFUUIDBytes uuid_bytes; + } bytes; + CC_SHA256_CTX ctx; + char if_name[IF_NAMESIZE]; + CFUUIDRef uuid; + CFStringRef uuid_str; + + // start with interface name + memset(&if_name, 0, sizeof(if_name)); + (void) _SC_cfstring_to_cstring(bsdName, + if_name, + sizeof(if_name), + kCFStringEncodingASCII); + + // create SHA256 hash + memset(&bytes, 0, sizeof(bytes)); + CC_SHA256_Init(&ctx); + CC_SHA256_Update(&ctx, + if_name, + sizeof(if_name)); + CC_SHA256_Final(bytes.sha256_bytes, &ctx); + + // create UUID string + uuid = CFUUIDCreateFromUUIDBytes(NULL, bytes.uuid_bytes); + uuid_str = CFUUIDCreateString(NULL, uuid); + CFRelease(uuid); + + return uuid_str; +} + + +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, "excluding 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) +{ + Boolean ok; + CFRange range; + CFArrayRef services; + SCNetworkSetRef set; + Boolean updated = FALSE; + + range = CFRangeMake(0, + (preconfigured_names != NULL) ? CFArrayGetCount(preconfigured_names) : 0); + if (range.length == 0) { + // if no [pre-configured] interfaces + return; + } + + set = SCNetworkSetCopyCurrent(prefs); + if (set == NULL) { + // if no current set + return; + } + + /* + * Check for (and remove) any network services associated with + * a pre-configured interface from the prefs. + */ + services = SCNetworkServiceCopyAll(prefs); + 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(preconfigured_names, range, bsdName)) { + // if not preconfigured + continue; + } + + // remove [preconfigured] network service from the prefs + SC_log(LOG_NOTICE, "removing network service for %@", bsdName); + ok = SCNetworkServiceRemove(service); + if (!ok) { + SC_log(LOG_ERR, "SCNetworkServiceRemove() failed: %s", + SCErrorString(SCError())); + } + updated = TRUE; + } + + CFRelease(services); + } + + if (updated) { + // commit the updated prefs ... but don't apply + ok = SCPreferencesCommitChanges(prefs); + if (!ok) { + if (SCError() != EROFS) { + SC_log(LOG_ERR, "SCPreferencesCommitChanges() failed: %s", + SCErrorString(SCError())); + } + } + } + + /* + * Now, add a new network service for each pre-configured interface + */ + for (CFIndex i = 0; i < range.length; i++) { + CFStringRef bsdName; + SCNetworkInterfaceRef interface = CFArrayGetValueAtIndex(preconfigured_interfaces, i); + SCNetworkServiceRef service; + CFStringRef serviceID; + + bsdName = SCNetworkInterfaceGetBSDName(interface); + + // create network service + service = SCNetworkServiceCreate(prefs, interface); + if (service == NULL) { + SC_log(LOG_ERR, "could not create network service for \"%@\": %s", + bsdName, + SCErrorString(SCError())); + continue; + } + + // update network service to use a consistent serviceID + serviceID = copyInterfaceUUID(bsdName); + if (serviceID != NULL) { + ok = _SCNetworkServiceSetServiceID(service, serviceID); + CFRelease(serviceID); + if (!ok) { + SC_log(LOG_ERR, "_SCNetworkServiceSetServiceID() failed: %s", + SCErrorString(SCError())); + // ... and keep whatever random UUID was created for the service + } + } else { + SC_log(LOG_ERR, "could not create serviceID for \"%@\"", bsdName); + // ... and we'll use whatever random UUID was created for the service + } + + // establish [template] configuration + ok = SCNetworkServiceEstablishDefaultConfiguration(service); + if (!ok) { + SC_log(LOG_ERR, "could not establish network service for \"%@\": %s", + bsdName, + SCErrorString(SCError())); + SCNetworkServiceRemove(service); + CFRelease(service); + continue; + } + + // add network service to the current set + ok = SCNetworkSetAddService(set, service); + if (!ok) { + SC_log(LOG_ERR, "could not add service for \"%@\": %s", + bsdName, + SCErrorString(SCError())); + SCNetworkServiceRemove(service); + CFRelease(service); + continue; + } + + SC_log(LOG_INFO, "network service %@ added for \"%@\"", + SCNetworkServiceGetServiceID(service), + bsdName); + + CFRelease(service); + } + + CFRelease(set); + return; +} + + static void updateSCDynamicStore(SCPreferencesRef prefs) { @@ -540,7 +1053,7 @@ updateSCDynamicStore(SCPreferencesRef prefs) */ keys = SCPreferencesCopyKeyList(prefs); if ((keys == NULL) || (CFArrayGetCount(keys) == 0)) { - SCLog(TRUE, LOG_NOTICE, CFSTR("updateConfiguration(): no preferences.")); + SC_log(LOG_NOTICE, "updateConfiguration(): no preferences"); goto done; } @@ -554,9 +1067,8 @@ updateSCDynamicStore(SCPreferencesRef prefs) } if (!isA_CFDictionary(global)) { - SCLog(TRUE, LOG_ERR, - CFSTR("updateConfiguration(): %@ is not a dictionary."), - kSCPrefSystem); + SC_log(LOG_NOTICE, "updateConfiguration(): %@ is not a dictionary", + kSCPrefSystem); goto done; } @@ -575,9 +1087,8 @@ updateSCDynamicStore(SCPreferencesRef prefs) } if (!isA_CFString(current)) { - SCLog(TRUE, LOG_ERR, - CFSTR("updateConfiguration(): %@ is not a string."), - kSCPrefCurrentSet); + SC_log(LOG_NOTICE, "updateConfiguration(): %@ is not a string", + kSCPrefCurrentSet); goto done; } @@ -587,17 +1098,15 @@ updateSCDynamicStore(SCPreferencesRef prefs) set = SCPreferencesPathGetValue(prefs, current); if (!set) { /* if error with path */ - SCLog(TRUE, LOG_ERR, - CFSTR("%@ value (%@) not valid"), - kSCPrefCurrentSet, - current); + SC_log(LOG_NOTICE, "%@ value (%@) not valid", + kSCPrefCurrentSet, + current); goto done; } if (!isA_CFDictionary(set)) { - SCLog(TRUE, LOG_ERR, - CFSTR("updateConfiguration(): %@ is not a dictionary."), - current); + SC_log(LOG_NOTICE, "updateConfiguration(): %@ is not a dictionary", + current); goto done; } @@ -629,15 +1138,12 @@ updateSCDynamicStore(SCPreferencesRef prefs) /* Update the dynamic store */ #ifndef MAIN if (!SCDynamicStoreSetMultiple(store, newPrefs, removedPrefsKeys, NULL)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStoreSetMultiple() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCDynamicStoreSetMultiple() failed: %s", SCErrorString(SCError())); } #else // !MAIN - SCLog(TRUE, LOG_NOTICE, - CFSTR("SCDynamicStore\nset: %@\nremove: %@\n"), - newPrefs, - removedPrefsKeys); + SC_log(LOG_DEBUG, "SCDynamicStore\nset: %@\nremove: %@", + newPrefs, + removedPrefsKeys); #endif // !MAIN CFRelease(currentPrefs); @@ -656,8 +1162,7 @@ updateConfiguration(SCPreferencesRef prefs, SCPreferencesNotification notificationType, void *info) { - - +#pragma unused(info) #if !TARGET_OS_IPHONE if ((notificationType & kSCPreferencesNotificationCommit) == kSCPreferencesNotificationCommit) { SCNetworkSetRef current; @@ -665,17 +1170,23 @@ updateConfiguration(SCPreferencesRef prefs, current = SCNetworkSetCopyCurrent(prefs); if (current != NULL) { /* network configuration available, disable template creation */ - watchQuietDisable(); + haveConfiguration = TRUE; CFRelease(current); } } #endif /* !TARGET_OS_IPHONE */ if ((notificationType & kSCPreferencesNotificationApply) != kSCPreferencesNotificationApply) { - return; + goto done; } - SCLog(_verbose, LOG_DEBUG, CFSTR("updating configuration")); + SC_log(LOG_INFO, "updating configuration"); + + /* add any [Apple] pre-configured network services */ + updatePreConfiguredConfiguration(prefs); + + /* remove any excluded network services */ + excludeConfigurations(prefs); /* update SCDynamicStore (Setup:) */ updateSCDynamicStore(prefs); @@ -685,6 +1196,8 @@ updateConfiguration(SCPreferencesRef prefs, SCPreferencesSynchronize(prefs); } + done : + return; } @@ -693,7 +1206,7 @@ __private_extern__ void prime_PreferencesMonitor() { - SCLog(_verbose, LOG_DEBUG, CFSTR("prime() called")); + SC_log(LOG_DEBUG, "prime() called"); /* load the initial configuration from the database */ updateConfiguration(prefs, kSCPreferencesNotificationApply, (void *)store); @@ -706,24 +1219,18 @@ __private_extern__ void load_PreferencesMonitor(CFBundleRef bundle, Boolean bundleVerbose) { - Boolean initPrefs = TRUE; - - if (bundleVerbose) { - _verbose = TRUE; - } - - SCLog(_verbose, LOG_DEBUG, CFSTR("load() called")); - SCLog(_verbose, LOG_DEBUG, CFSTR(" bundle ID = %@"), CFBundleGetIdentifier(bundle)); +#pragma unused(bundle) +#pragma unused(bundleVerbose) + SC_log(LOG_DEBUG, "load() called"); + SC_log(LOG_DEBUG, " bundle ID = %@", CFBundleGetIdentifier(bundle)); /* open a SCDynamicStore session to allow cache updates */ store = SCDynamicStoreCreate(NULL, CFSTR("PreferencesMonitor.bundle"), - watchQuietCallback, + storeCallback, NULL); if (store == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStoreCreate() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCDynamicStoreCreate() failed: %s", SCErrorString(SCError())); goto error; } @@ -747,23 +1254,22 @@ load_PreferencesMonitor(CFBundleRef bundle, Boolean bundleVerbose) if (old_model != NULL && !_SC_CFEqual(old_model, new_model)) { // if new hardware need_update = TRUE; + restorePrefs = previousConfigurationAvailable(); } } - if (need_update == FALSE) { + if (!need_update) { SCNetworkSetRef current; current = SCNetworkSetCopyCurrent(prefs); if (current != NULL) { /* network configuration available, disable template creation */ - initPrefs = FALSE; + haveConfiguration = TRUE; CFRelease(current); } } } else { - SCLog(TRUE, LOG_ERR, - CFSTR("SCPreferencesCreate() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesCreate() failed: %s", SCErrorString(SCError())); goto error; } @@ -771,35 +1277,31 @@ load_PreferencesMonitor(CFBundleRef bundle, Boolean bundleVerbose) * register for change notifications. */ if (!SCPreferencesSetCallback(prefs, updateConfiguration, NULL)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCPreferencesSetCallBack() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesSetCallBack() failed: %s", SCErrorString(SCError())); goto error; } if (!SCPreferencesScheduleWithRunLoop(prefs, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCPreferencesScheduleWithRunLoop() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCPreferencesScheduleWithRunLoop() failed: %s", SCErrorString(SCError())); goto error; } /* - * if no preferences, initialize with a template (now or - * when IOKit has quiesced). + * watch InterfaceNamer and KernelEventMonitor changes to know when + * the IORegistry has quiesced (to create the initial configuration + * template), to track any pre-configured interfaces, and to ensure + * that we create a network service for any active interfaces. */ - if (initPrefs) { - watchQuietEnable(); - watchQuietCallback(store, NULL, NULL); - } + watchSCDynamicStore(); + storeCallback(store, NULL, NULL); return; error : - watchQuietDisable(); if (store != NULL) CFRelease(store); if (prefs != NULL) CFRelease(prefs); + haveConfiguration = TRUE; return; } diff --git a/src/configd/Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist b/src/configd/Plugins/QoSMarking/Info-Embedded.plist similarity index 52% rename from src/configd/Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist rename to src/configd/Plugins/QoSMarking/Info-Embedded.plist index 854a3972a..f554c12ef 100644 --- a/src/configd/Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist +++ b/src/configd/Plugins/QoSMarking/Info-Embedded.plist @@ -7,25 +7,31 @@ CFBundleDevelopmentRegion English CFBundleExecutable - SCNetworkReachability + QoSMarking CFBundleIdentifier - com.apple.SystemConfiguration.SCNetworkReachability + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - com.apple.SystemConfiguration.SCNetworkReachability + com.apple.SystemConfiguration.QoSMarking CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.13 - MachServices - - com.apple.SystemConfiguration.SCNetworkReachability_sim - - + 1.19 + 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/src/configd/Plugins/QoSMarking/Info.plist b/src/configd/Plugins/QoSMarking/Info.plist new file mode 100644 index 000000000..3c3a7268c --- /dev/null +++ b/src/configd/Plugins/QoSMarking/Info.plist @@ -0,0 +1,41 @@ + + + + + Builtin + + CFBundleDevelopmentRegion + English + CFBundleExecutable + QoSMarking + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + com.apple.SystemConfiguration.QoSMarking + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.19 + CFBundleSignature + ???? + CFBundleVersion + 1.19 + QoSMarking_AppleAudioVideoCalls_BundleIDs + + com.apple.datausage.telephony.ims + com.apple.facetime + com.apple.siri + + QoSMarking_AppleAudioVideoCalls_ExecutablePaths + + /System/Library/PrivateFrameworks/IDS.framework/identityservicesd.app/Contents/MacOS/identityservicesd + + Requires + + com.apple.SystemConfiguration.InterfaceNamer + com.apple.SystemConfiguration.PreferencesMonitor + + + diff --git a/src/configd/Plugins/QoSMarking/qos-marking.m b/src/configd/Plugins/QoSMarking/qos-marking.m new file mode 100644 index 000000000..de2afca12 --- /dev/null +++ b/src/configd/Plugins/QoSMarking/qos-marking.m @@ -0,0 +1,1233 @@ +/* + * Copyright (c) 2016-2019 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 + * + * March 1, 2016 Allan Nathanson + * - initial revision + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SC_LOG_HANDLE __log_QoSMarking +#include +#include +#include + +#import +#import +#import + +// define the QoSMarking.bundle Info.plist key containing [application] bundleIDs to be white-listed +#define kQoSMarkingBundleIdentifiersAppleAudioVideoCallsKey CFSTR("QoSMarking_AppleAudioVideoCalls_BundleIDs") + +// define the QoSMarking.bundle Info.plist key containing paths to be white-listed +#define kQoSMarkingExecutablePathsAppleAudioVideoCallsKey CFSTR("QoSMarking_AppleAudioVideoCalls_ExecutablePaths") + +// define the starting "order" value for any QoS Marking NEPolicy rules +#define QOS_MARKING_PRIORITY_BLOCK_AV_APPS 1000 +#define QOS_MARKING_PRIORITY_BLOCK_AV_PATHS 1500 +#define QOS_MARKING_PRIORITY_BLOCK_APPS 2000 + + +static CFStringRef interfacesKey = NULL; +static NSArray * qosMarkingAudioVideoCalls_bundleIDs = nil; +static NSArray * qosMarkingAudioVideoCalls_executablePaths = nil; + + +#pragma mark - +#pragma mark Logging + + +__private_extern__ os_log_t +__log_QoSMarking(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "QoSMarking"); + } + + return log; +} + + +#pragma mark - +#pragma mark QoSMarking support (system) + + +static void +qosMarkingSetPolicyRestriction(const char *ctl, BOOL yn) +{ + int restricted = yn ? 1 : 0; + int ret; + + ret = sysctlbyname(ctl, NULL, 0, &restricted, sizeof(restricted)); + if (ret != -1) { + SC_log(LOG_NOTICE, "QoS marking policy: sysctl %s=%d", ctl, restricted); + } else { + if (errno != ENOENT) { + SC_log(LOG_ERR, "sysctlbyname() failed: %s", strerror(errno)); + } + } + + return; +} + + +static void +qosMarkingSetHavePolicies(BOOL havePolicies) +{ + qosMarkingSetPolicyRestriction("net.qos.policy.restricted", havePolicies); + return; +} + + +static void +qosMarkingSetRestrictAVApps(BOOL restrictApps) +{ + qosMarkingSetPolicyRestriction("net.qos.policy.restrict_avapps", restrictApps); + return; +} + + +#pragma mark - +#pragma mark QoSMarking support (per-interface) + + +static BOOL +supportsQoSMarking(int s, const char *ifname) +{ + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGIFTYPE, (caddr_t)&ifr) == -1) { + SC_log(LOG_NOTICE, "%s: ioctl(SIOCGIFTYPE) failed: %s", + ifname, + strerror(errno)); + ifr.ifr_type.ift_type = 0; + ifr.ifr_type.ift_family = IFRTYPE_FAMILY_ANY; + ifr.ifr_type.ift_subfamily = IFRTYPE_SUBFAMILY_ANY; + } + +#if !TARGET_OS_IPHONE + if (ifr.ifr_type.ift_family == IFRTYPE_FAMILY_ETHERNET) { + return true; + } +#else // !TARGET_OS_IPHONE + if ((ifr.ifr_type.ift_family == IFRTYPE_FAMILY_ETHERNET) && + (ifr.ifr_type.ift_subfamily == IFRTYPE_SUBFAMILY_WIFI)) { + return true; + } +#endif // !TARGET_OS_IPHONE + + return false; +} + + +static void +qosMarkingSetEnabled(int s, const char *ifname, BOOL enabled) +{ + struct ifreq ifr; + int ret; + + memset(&ifr, 0, sizeof(ifr)); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + ifr.ifr_qosmarking_enabled = enabled ? 1 : 0; + ret = ioctl(s, SIOCSQOSMARKINGENABLED, &ifr); + if (ret == -1) { + SC_log(LOG_ERR, "%s: ioctl(SIOCSQOSMARKINGENABLED) failed: %s", + ifname, + strerror(errno)); + } + + return; +} + + +#pragma mark - +#pragma mark QoSMarking Policy support + + +@interface QoSMarkingController : NSObject + ++ (QoSMarkingController *)sharedController; +- (void)setInterfaces:(NSArray *)interfaces; +- (void)setPolicy:(NSDictionary *)policy forInterface:(NSString *)interface; + +@end + + +@interface QoSMarkingController() + +/* + * interfaces + * An array of network interface names on the system/device + */ +@property (nonatomic) NSArray * interfaces; + +/* + * policySessions + * A dictionary for the maintaining the QoS marking policies. + * + * Key : interface [name] + * Value : the NEPolicySession* for the interface + */ +@property (nonatomic) NSMutableDictionary * policySessions; + +/* + * requested + * A dictionary for the tracking the QoS marking policies. + * + * Key : interface [name] + * Value : the [requested] NSDictionary* "policy" for the interface + */ +@property (nonatomic) NSMutableDictionary * requested; + +/* + * enabled, enabledAV + * Dictionaries for tracking the "enabled" interfaces with QoS [AV] + * marking policies. + * + * Key : interface [name] + * Value : the enabled NSDictionary* "policy" for the interface + */ +@property (nonatomic) NSMutableDictionary * enabled; +@property (nonatomic) NSMutableDictionary * enabledAV; + +@end + + +@implementation QoSMarkingController + +- (NEPolicySession *)createPolicySession +{ + return [[NEPolicySession alloc] init]; +} + + +#pragma mark - + + +- (BOOL)qosMarkingPolicyEnabled:(NSDictionary *)policy forKey:(NSString *)key +{ + NSNumber * enabled; + + enabled = policy[key]; + if (enabled != nil) { + if (![enabled isKindOfClass:[NSNumber class]]) { + SC_log(LOG_ERR, "%@ not valid", key); + return false; + } + } else { + // assume "enabled" if no key + return true; + } + + return enabled.boolValue; +} + + +- (BOOL)qosMarkingIsEnabled:(NSDictionary *)policy +{ + return [self qosMarkingPolicyEnabled:policy + forKey:(NSString *)kSCPropNetQoSMarkingEnabled]; +} + + +- (BOOL)qosMarkingIsAppleAudioVideoCallsEnabled:(NSDictionary *)policy +{ + return [self qosMarkingPolicyEnabled:policy + forKey:(NSString *)kSCPropNetQoSMarkingAppleAudioVideoCalls]; +} + + +- (NSArray *)qosMarkingWhitelistedAppIdentifiers:(NSDictionary *)policy +{ + NSArray * appIDs; + + appIDs = policy[(NSString *)kSCPropNetQoSMarkingWhitelistedAppIdentifiers]; + if ((appIDs != nil) && ![appIDs isKindOfClass:[NSArray class]]) { + SC_log(LOG_ERR, "QoSMarkingWhitelistedAppIdentifier list not valid"); + return nil; + } + + for (NSString *appID in appIDs) { + if ((appID != nil) && + (![appID isKindOfClass:[NSString class]] || (appID.length == 0))) { + SC_log(LOG_ERR, "QoSMarkingWhitelistedAppIdentifier not valid"); + return nil; + } + } + + return appIDs; +} + + +#pragma mark - + + +- (NSUUID *)copyUUIDForSingleArch:(int)fd +{ + uint64_t bytes = 0; + struct mach_header header; + NSUUID * uuid = nil; + + if (read(fd, &header, sizeof(header)) != sizeof(header)) { + return nil; + } + + // Go past the 64 bit header if we have a 64 arch + if (header.magic == MH_MAGIC_64) { + if (lseek(fd, sizeof(uint32_t), SEEK_CUR) == -1) { + SC_log(LOG_ERR, "could not lseek() past 64 bit header"); + return nil; + } + } + + if(os_mul_overflow((uint64_t)header.ncmds, sizeof(struct load_command), &bytes) || + (bytes > header.sizeofcmds)) { + SC_log(LOG_ERR, "mach_header error with \".ncmds\" (%llu), \".sizeofcmds\" (%llu)", + (uint64_t)header.ncmds, + (uint64_t)header.sizeofcmds); + return nil; + } + + // Find LC_UUID in the load commands + for (size_t i = 0; i < header.ncmds; i++) { + struct load_command lcmd; + + if (read(fd, &lcmd, sizeof(lcmd)) != sizeof(lcmd)) { + SC_log(LOG_ERR, "could not read() load_command"); + break; + } + + if (lcmd.cmd == LC_UUID) { + struct uuid_command uuid_cmd; + + if (read(fd, uuid_cmd.uuid, sizeof(uuid_t)) != sizeof(uuid_t)) { + SC_log(LOG_ERR, "could not read() uuid_command"); + break; + } + + uuid = [[NSUUID alloc] initWithUUIDBytes:uuid_cmd.uuid]; + break; + } else { + if (lseek(fd, lcmd.cmdsize - sizeof(lcmd), SEEK_CUR) == -1) { + SC_log(LOG_ERR, "could not lseek() past load command"); + return nil; + } + } + } + + return uuid; +} + +#define MAX_NFAT_ARCH 32 + +- (NSArray *)copyUUIDsForFatBinary:(int)fd +{ + struct fat_arch * arches = NULL; + mach_msg_type_number_t count; + struct fat_header hdr; + struct host_basic_info hostinfo; + kern_return_t kr; + NSMutableArray * uuids = nil; + + // For a fat architecture, we need find the section that is closet to the host cpu + memset(&hostinfo, 0, sizeof(hostinfo)); + count = HOST_BASIC_INFO_COUNT; + kr = host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostinfo, &count); + if (kr != KERN_SUCCESS) { + SC_log(LOG_ERR, "host_info() failed: %d", kr); + return nil; + } + + if (read(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) { + SC_log(LOG_ERR, "could not read() fat_header"); + return nil; + } + + // Fat header info are always big-endian + hdr.nfat_arch = OSSwapInt32(hdr.nfat_arch); + if (hdr.nfat_arch > MAX_NFAT_ARCH) { + SC_log(LOG_ERR, "fat_header.nfat_arch (%d) > %d", hdr.nfat_arch, MAX_NFAT_ARCH); + return nil; + } + + arches = (struct fat_arch *)malloc(hdr.nfat_arch * sizeof(struct fat_arch)); + if (arches == NULL) { + // if we could not allocate space for architectures + return nil; + } + + uuids = [[NSMutableArray alloc] init]; + + for (size_t i = 0; i < hdr.nfat_arch; ++i) { + struct fat_arch arch; + + if (read(fd, &arch, sizeof(arch)) != sizeof(arch)) { + SC_log(LOG_ERR, "could not read() fat_arch"); + goto done; + } + arch.cputype = (int)OSSwapInt32(arch.cputype); + arch.offset = OSSwapInt32(arch.offset); + memcpy(&arches[i], &arch, sizeof(arch)); + } + + for (size_t i = 0; i < hdr.nfat_arch; ++i) { + struct fat_arch arch; + NSUUID * uuid; + + memcpy(&arch, &arches[i], sizeof(arch)); + + if (arch.offset == 0) { + SC_log(LOG_ERR, "invalid offset for arch %d", arch.cputype); + goto done; + } + + if (lseek(fd, arch.offset, SEEK_SET) == -1) { + SC_log(LOG_ERR, "could not lseek() to arch %d", arch.cputype); + goto done; + } + + uuid = [self copyUUIDForSingleArch:fd]; + if (uuid == nil) { + SC_log(LOG_ERR, "could not get uuid for arch %d", arch.cputype); + goto done; + } + + if (arch.cputype == hostinfo.cpu_type) { + [uuids insertObject:uuid atIndex:0]; + } else { + [uuids addObject:uuid]; + } + } + + done: + + if (arches != NULL) { + free(arches); + } + if (uuids.count == 0) { + uuids = nil; + } + return uuids; +} + +- (NSArray *)copyUUIDsForExecutable:(const char *)executablePath +{ + int fd; + uint32_t magic; + NSArray * uuids = nil; + + if (executablePath == NULL) { + return nil; + } + + fd = open(executablePath, O_RDONLY); + if (fd == -1) { + if (errno != ENOENT) { + SC_log(LOG_ERR, "open(\"%s\", O_RDONLY) failed: %s", executablePath, strerror(errno)); + } + + return nil; + } + + // Read the magic format to decide which path to take + if (read(fd, &magic, sizeof(magic)) != sizeof(magic)) { + SC_log(LOG_ERR, "read() no magic format: %s", executablePath); + goto done; + } + + // Rewind to the beginning + lseek(fd, 0, SEEK_SET); + switch (magic) { + case FAT_CIGAM: { + uuids = [self copyUUIDsForFatBinary:fd]; + break; + } + + case MH_MAGIC: + case MH_MAGIC_64: { + NSUUID * uuid; + + uuid = [self copyUUIDForSingleArch:fd]; + if (uuid == nil) { + SC_log(LOG_ERR, "%s: failed to get UUID for single arch", __FUNCTION__); + goto done; + } + + uuids = @[ uuid ]; + break; + } + + default: { + break; + } + } + + done: + + close(fd); + return uuids; +} + + +- (void)addWhitelistedPathPolicy:(NSString *)interface forPath:(NSString *)path order:(uint32_t)order +{ + NEPolicyCondition * allInterfacesCondition; + NEPolicyResult * result; + NEPolicyRouteRule * routeRule; + NEPolicySession * session; + NSArray * uuids; + + session = _policySessions[interface]; + if (session == nil) { + SC_log(LOG_ERR, "QoS marking policy: %@: no session", interface); + return; + } + + // create QoS route rule + routeRule = [NEPolicyRouteRule routeRuleWithAction:NEPolicyRouteRuleActionQoSMarking + forInterfaceName:interface]; + result = [NEPolicyResult routeRules:@[ routeRule ]]; + + // create "all interfaces" condition + allInterfacesCondition = [NEPolicyCondition allInterfaces]; + + uuids = [self copyUUIDsForExecutable:[path UTF8String]]; + if ((uuids == nil) || (uuids.count == 0)) { + SC_log(LOG_ERR, "QoS marking policy: %@: could not add path \"%@\"", + interface, + path); + return; + } + + for (NSUUID *uuid in uuids) { + NEPolicy * policy; + NSUInteger policyID; + NEPolicyCondition * uuidCondition; + + // create per-app bundleID-->UUID condition + uuidCondition = [NEPolicyCondition effectiveApplication:uuid]; + + // create and add policy + policy = [[NEPolicy alloc] initWithOrder:order + result:result + conditions:@[ uuidCondition, allInterfacesCondition ]]; + policyID = [session addPolicy:policy]; + if (policyID != 0) { + SC_log(LOG_NOTICE, "QoS marking policy: %@: %u: whitelist path \"%@\" (%@)", + interface, + order, + path, + uuid.UUIDString); + + } else { + SC_log(LOG_ERR, "QoS marking policy: %@: could not add whitelist policy for path \"%@\" (%@)", + interface, + path, + uuid.UUIDString); + } + } + + + return; +} + + +#pragma mark - + + +- (NSArray *)copyUUIDsForUUIDMapping:(xpc_object_t)mapping +{ + NSMutableArray * uuids = nil; + + if ((mapping != NULL) && + (xpc_get_type(mapping) == XPC_TYPE_ARRAY)) { + uuids = [NSMutableArray array]; + + xpc_array_apply(mapping, ^bool(size_t index, xpc_object_t value) { +#pragma unused(index) + if ((value != NULL) && + (xpc_get_type(value) == XPC_TYPE_UUID)) { + NSUUID * uuid; + + uuid = [[NSUUID alloc] initWithUUIDBytes:xpc_uuid_get_bytes(value)]; + [uuids addObject:uuid]; + } + return YES; + }); + + if (uuids.count == 0) { + uuids = nil; + } + } + + return uuids; +} + + +- (NSArray *)copyUUIDsForBundleID:(NSString *)bundleID +{ + NSArray * uuids; + xpc_object_t uuidsFromHelper; + + uuidsFromHelper = NEHelperCacheCopyAppUUIDMapping([bundleID UTF8String], NULL); + + uuids = [self copyUUIDsForUUIDMapping:uuidsFromHelper]; + return uuids; +} + + +- (void)addWhitelistedAppIdentifierPolicy:(NSString *)interface forApp:(NSString *)appBundleID order:(uint32_t)order +{ + NEPolicyCondition * allInterfacesCondition; + NEPolicyResult * result; + NEPolicyRouteRule * routeRule; + NEPolicySession * session; + NSArray * uuids; + + if ([appBundleID hasPrefix:@"/"]) { + if (_SC_isAppleInternal()) { + // special case executable path handling (if internal) + [self addWhitelistedPathPolicy:interface forPath:appBundleID order:order]; + } + + return; + } + + session = _policySessions[interface]; + if (session == nil) { + SC_log(LOG_ERR, "QoS marking policy: %@: no session", interface); + return; + } + + // create QoS route rule + routeRule = [NEPolicyRouteRule routeRuleWithAction:NEPolicyRouteRuleActionQoSMarking + forInterfaceName:interface]; + result = [NEPolicyResult routeRules:@[ routeRule ]]; + + // create "all interfaces" condition + allInterfacesCondition = [NEPolicyCondition allInterfaces]; + + uuids = [self copyUUIDsForBundleID:appBundleID]; + if ((uuids == nil) || (uuids.count == 0)) { + SC_log(LOG_ERR, "QoS marking policy: %@: could not add bundleID \"%@\"", + interface, + appBundleID); + return; + } + + for (NSUUID *uuid in uuids) { + NEPolicy * policy; + NSUInteger policyID; + NEPolicyCondition * uuidCondition; + + // create per-app bundleID-->UUID condition + uuidCondition = [NEPolicyCondition effectiveApplication:uuid]; + + // create and add policy + policy = [[NEPolicy alloc] initWithOrder:order + result:result + conditions:@[ uuidCondition, allInterfacesCondition ]]; + policyID = [session addPolicy:policy]; + if (policyID != 0) { + SC_log(LOG_NOTICE, "QoS marking policy: %@: %u: whitelist bundleID \"%@\" (%@)", + interface, + order, + appBundleID, + uuid.UUIDString); + + } else { + SC_log(LOG_ERR, "QoS marking policy: %@: could not add whitelist policy for bundleID \"%@\" (%@)", + interface, + appBundleID, + uuid.UUIDString); + } + } + + return; +} + + +#pragma mark - + + +- (instancetype)init +{ + self = [super init]; + if (self != nil) { + _interfaces = nil; + _policySessions = [NSMutableDictionary dictionary]; + _requested = [NSMutableDictionary dictionary]; + _enabled = [NSMutableDictionary dictionary]; + _enabledAV = [NSMutableDictionary dictionary]; + } + + return self; +} + + +/* + + Have QoS Whitelist AppleAVCalls | net.qos.policy. | Interface Interface Interface + Profile Enabled Apps(#) Enabled | restricted restrict_avapps | QoS Enabled NECP rules NECP AV rules + ======= ======= ========= ============ + ========== =============== + =========== ========== ============= +1 [N] | 0 0 | [Y] [N] [N] + | | +2 [Y] [N] [0] [N] | 0 0 | [N] [N] [N] +3 [Y] [N] [0] [Y] | 0 0 | [N] [N] [N] + | | +4 [Y] [N] [> 0] [N] | 0 0 | [N] [N] [N] +5 [Y] [N] [> 0] [Y] | 0 0 | [N] [N] [N] + | | +6 [Y] [Y] [0] [N] | 1 1 | [Y] [N] [N] +7 [Y] [Y] [0] [Y] | 1 0 | [Y] [N] [Y] + | | +8 [Y] [Y] [> 0] [N] | 1 1 | [Y] [Y] [N] +9 [Y] [Y] [> 0] [Y] | 1 0 | [Y] [Y] [Y] + + Notes (QoSMarking policy) : + * If "QoSEnabled" is not present, assume "Y" + * If "QoSMarkingAppleAudioVideoCalls" is not present, assume "Y" + * If "QoSMarkingWhitelistedAppIdentifiers" is not present (or empty), assume no whitelisted applications + + Notes (sysctl) : + * net.qos.policy.restricted should be "1" when NECP policies are present + * net.qos.policy.restrict_avapps should be "1" when "QoSMarkingAppleAudioVideoCalls" is "N" + + */ + +- (void)updatePolicy:(NSDictionary *)reqPolicy forInterface:(NSString *)interface +{ + // currently enabled settings + NSDictionary * nowPolicy = _enabled[interface]; + BOOL nowDisabled = false; + BOOL nowEnabled = false; + BOOL nowAppleAV = false; + + // requested settings + BOOL reqDefault = false; + BOOL reqDisabled = false; + BOOL reqEnabled = false; + BOOL reqAppleAV = false; + + if (nowPolicy != nil) { + if ([self qosMarkingIsEnabled:nowPolicy]) { + // if we have an enabled QoS marking policy + nowEnabled = true; + } else { + // if we have a disabled QoS marking policy + nowDisabled = true; + } + + nowAppleAV = [self qosMarkingIsAppleAudioVideoCallsEnabled:nowPolicy]; + } + + if (reqPolicy != nil) { + if ([self qosMarkingIsEnabled:reqPolicy]) { + // if QoS marking policy requested + reqEnabled = true; + } else { + // if QoS marking policy present (but disabled) + reqDisabled = true; + } + + reqAppleAV = [self qosMarkingIsAppleAudioVideoCallsEnabled:reqPolicy]; + } else { + reqDefault = true; + } + + if ((!nowEnabled && reqDefault ) || + ( nowEnabled != reqEnabled ) || + ( nowDisabled != reqDisabled) || + ( nowEnabled && reqEnabled && ![nowPolicy isEqual:reqPolicy])) { + int s; + + if (reqEnabled) { + // if we are transitioning to enabled or we have a policy + // change, ensure that we rebuild policies + nowPolicy = nil; + } else { + if ((nowPolicy != nil) && (reqPolicy == nil)) { + SC_log(LOG_NOTICE, "QoS marking policy: %@: remove", interface); + } + + // if QoS marking was enabled (for this interface), close session + [_policySessions removeObjectForKey:interface]; + + // QoS marking policy for this interface is no longer enabled + [_enabled removeObjectForKey:interface]; + [_enabledAV removeObjectForKey:interface]; + } + + // update QoSMarking enabled (per-interface) + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s != -1) { + BOOL enable = reqEnabled || reqDefault; + + SC_log(LOG_NOTICE, "QoS marking policy: %@: %s%s", + interface, + enable ? "enable" : "disable", + reqDefault ? " (default)" : ""); + qosMarkingSetEnabled(s, interface.UTF8String, enable); + close(s); + } else { + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + } + } + + if (reqEnabled) { + NSArray * curAppIDs; + NSArray * reqAppIDs; + BOOL update = FALSE; + + if (nowAppleAV != reqAppleAV) { + update = true; + } + + curAppIDs = [self qosMarkingWhitelistedAppIdentifiers:nowPolicy]; + reqAppIDs = [self qosMarkingWhitelistedAppIdentifiers:reqPolicy]; + if (![curAppIDs isEqual:reqAppIDs]) { + update = true; + } + + if (update) { + BOOL ok; + uint32_t order; + NEPolicySession * session; + + // QoS marking being (or still) enabled for this interface + if (_enabled.count == 0) { + // if we now have a profile requiring us to check NECP policies + qosMarkingSetHavePolicies(true); + } + + // the QoS marking policy for this interface is now enabled + _enabled[interface] = reqPolicy; + + SC_log(LOG_NOTICE, "QoS marking policy: %@: %s", + interface, + nowEnabled ? "update" : "add"); + + // prepare [new] per-interface NECP session + + session = _policySessions[interface]; + if ((session == nil) && ((reqAppIDs.count > 0) || reqAppleAV)) { + // if we need to add NECP policies + session = [self createPolicySession]; + if (session != nil) { + _policySessions[interface] = session; + } else { + SC_log(LOG_ERR, "%@: failed to create policy session", interface); + } + } + + // zap any previously stored policies + if (session != nil) { + ok = [session removeAllPolicies]; + if (!ok) { + SC_log(LOG_ERR, "%@: could not remove policies", interface); + } + } + + // if needed, add policies for any whitelisted applications + if ((session != nil) && (reqAppIDs.count > 0)) { + order = QOS_MARKING_PRIORITY_BLOCK_APPS; + for (NSString *app in reqAppIDs) { + [self addWhitelistedAppIdentifierPolicy:interface forApp:app order:order++]; + } + } + + if (reqAppleAV) { + if (_enabledAV.count == 0) { + // if we are enabling the marking of Apple AV application + // then we do not want to restrict handling of traffic that + // cannot be handled by NECP + qosMarkingSetRestrictAVApps(false); + } + + // the QoS [AV] marking policy for this interface is now enabled + _enabledAV[interface] = reqPolicy; + + if (session != nil) { + // if needed, add Apple audio/video application policies + + order = QOS_MARKING_PRIORITY_BLOCK_AV_APPS; + for (NSString *app in qosMarkingAudioVideoCalls_bundleIDs) { + [self addWhitelistedAppIdentifierPolicy:interface forApp:app order:order++]; + } + + order = QOS_MARKING_PRIORITY_BLOCK_AV_PATHS; + for (NSString *path in qosMarkingAudioVideoCalls_executablePaths) { + [self addWhitelistedPathPolicy:interface forPath:path order:order++]; + } + } + } else { + // the QoS [AV] marking policy for this interface is no longer enabled + [_enabledAV removeObjectForKey:interface]; + + if (_enabledAV.count == 0) { + // if we do not (no longer want to) be marking AV then restrict + // handling traffic that cannot be handled by NECP + qosMarkingSetRestrictAVApps(true); + } + } + + if (session != nil) { + ok = [session apply]; + if (!ok) { + SC_log(LOG_ERR, "%@: could not apply new policies", interface); + } + } + } + } + + // Restore "default" state if no policies + if (_enabled.count == 0) { + qosMarkingSetRestrictAVApps(false); + qosMarkingSetHavePolicies(false); + } +} + + +#pragma mark - +#pragma mark Update QoSMarking Policy Configuration per [SC] changes + + ++ (QoSMarkingController *)sharedController +{ + static QoSMarkingController * controller; + static dispatch_once_t once; + + dispatch_once(&once, ^{ + controller = [[QoSMarkingController alloc] init]; + }); + + return controller; +} + + +- (void)setInterfaces:(NSArray *)newInterfaces +{ + NSArray * curInterfaces; + int s; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s == -1) { + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); + return; + } + + curInterfaces = _interfaces; + _interfaces = newInterfaces; + + for (NSString *interface in newInterfaces) { + if (!supportsQoSMarking(s, interface.UTF8String)) { + // skip interfaces that do not support QoS marking + continue; + } + + if (![curInterfaces containsObject:interface]) { + NSDictionary * policy; + + // if new interface + policy = _requested[interface]; + [_requested removeObjectForKey:interface]; // make this look like a fresh "add" + [self setPolicy:policy forInterface:interface]; // and "set" the new policy + } + } + + close(s); + return; +} + + +- (void)setPolicy:(NSDictionary *)policy forInterface:(NSString *)interface +{ + if (policy != nil) { + if ([_interfaces containsObject:interface]) { + // set (update) per-interface policy + [self updatePolicy:policy forInterface:interface]; + } + + // track policy for future changes + [_requested setObject:policy forKey:interface]; + } else { + // remove (update) per-interface policy + [self updatePolicy:policy forInterface:interface]; + + // track policy for future changes + [_requested removeObjectForKey:interface]; + } + + return; +} + +@end + + +#pragma mark - +#pragma mark Update QoS Marking Policy Plugin + + +/* + * Function: parse_component + * Purpose: + * Given a string 'key' and a string prefix 'prefix', + * return the next component in the slash '/' separated + * key. + * + * Examples: + * 1. key = "a/b/c" prefix = "a/" + * returns "b" + * 2. key = "a/b/c" prefix = "a/b/" + * returns "c" + */ +static CF_RETURNS_RETAINED CFStringRef +parse_component(CFStringRef key, CFStringRef prefix) +{ + CFMutableStringRef comp; + CFRange range; + + if (!CFStringHasPrefix(key, prefix)) { + return NULL; + } + comp = CFStringCreateMutableCopy(NULL, 0, key); + CFStringDelete(comp, CFRangeMake(0, CFStringGetLength(prefix))); + range = CFStringFind(comp, CFSTR("/"), 0); + if (range.location == kCFNotFound) { + return comp; + } + range.length = CFStringGetLength(comp) - range.location; + CFStringDelete(comp, range); + return comp; +} + + + +static void +qosMarkingConfigChangedCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *arg) +{ +#pragma unused(arg) + CFDictionaryRef changes; + CFIndex n; + static CFStringRef prefix = NULL; + + if (prefix == NULL) { + prefix = SCDynamicStoreKeyCreate(NULL, + CFSTR("%@/%@/%@/"), + kSCDynamicStoreDomainSetup, + kSCCompNetwork, + kSCCompInterface); + } + + changes = SCDynamicStoreCopyMultiple(store, changedKeys, NULL); + + n = CFArrayGetCount(changedKeys); + for (CFIndex i = 0; i < n; i++) { + CFStringRef key; + + key = CFArrayGetValueAtIndex(changedKeys, i); + + if (CFEqual(key, interfacesKey)) { + CFDictionaryRef info; + + info = (changes != NULL) ? CFDictionaryGetValue(changes, key) : NULL; + if (isA_CFDictionary(info) != NULL) { + CFArrayRef interfaces; + + interfaces = CFDictionaryGetValue(info, kSCPropNetInterfaces); + if (isA_CFArray(interfaces)) { + @autoreleasepool { + QoSMarkingController * controller; + + controller = [QoSMarkingController sharedController]; + [controller setInterfaces:(__bridge NSArray *)interfaces]; + } + } + } + } else { + CFStringRef interface; + + interface = parse_component(key, prefix); + if (interface != NULL) { + CFDictionaryRef policy; + + policy = (changes != NULL) ? CFDictionaryGetValue(changes, key) : NULL; + @autoreleasepool { + QoSMarkingController * controller; + + controller = [QoSMarkingController sharedController]; + [controller setPolicy:(__bridge NSDictionary *)policy + forInterface:(__bridge NSString *)interface]; + } + CFRelease(interface); + } + } + } + + if (changes != NULL) { + CFRelease(changes); + } + + return; +} + + +static Boolean +haveNetworkExtensionFramework() +{ + Boolean haveFramework; + + haveFramework = ([NEPolicy class] != nil); + return haveFramework; +} + + +__private_extern__ +void +load_QoSMarking(CFBundleRef bundle, Boolean bundleVerbose) +{ +#pragma unused(bundleVerbose) + CFDictionaryRef dict; + CFStringRef key; + CFMutableArrayRef keys; + Boolean ok; + CFMutableArrayRef patterns; + CFRunLoopSourceRef rls; + SCDynamicStoreRef store; + + SC_log(LOG_DEBUG, "load() called"); + SC_log(LOG_DEBUG, " bundle ID = %@", CFBundleGetIdentifier(bundle)); + + if (!haveNetworkExtensionFramework()) { + return; + } + + // initialize a few globals + interfacesKey = SCDynamicStoreKeyCreateNetworkInterface(NULL, + kSCDynamicStoreDomainState); + + dict = CFBundleGetInfoDictionary(bundle); + if (isA_CFDictionary(dict)) { + CFArrayRef bundleIDs; + CFArrayRef paths; + + bundleIDs = CFDictionaryGetValue(dict, kQoSMarkingBundleIdentifiersAppleAudioVideoCallsKey); + bundleIDs = isA_CFArray(bundleIDs); + qosMarkingAudioVideoCalls_bundleIDs = (__bridge NSArray *)bundleIDs; + + paths = CFDictionaryGetValue(dict, kQoSMarkingExecutablePathsAppleAudioVideoCallsKey); + paths = isA_CFArray(paths); + qosMarkingAudioVideoCalls_executablePaths = (__bridge NSArray *)paths; + } + + // open a "configd" store to allow cache updates + store = SCDynamicStoreCreate(NULL, + CFSTR("QoS Marking Configuraton plug-in"), + qosMarkingConfigChangedCallback, + NULL); + if (store == NULL) { + SC_log(LOG_ERR, "SCDynamicStoreCreate() failed: %s", SCErrorString(SCError())); + goto error; + } + + // establish notification keys and patterns + keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + // ...watch for a change in the list of network interfaces + CFArrayAppendValue(keys, interfacesKey); + + // ...watch for (per-interface) QoS marking policy changes + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainSetup, + kSCCompAnyRegex, + kSCEntNetQoSMarkingPolicy); + CFArrayAppendValue(patterns, key); + CFRelease(key); + + // register the keys/patterns + ok = SCDynamicStoreSetNotificationKeys(store, keys, patterns); + CFRelease(keys); + CFRelease(patterns); + if (!ok) { + SC_log(LOG_NOTICE, "SCDynamicStoreSetNotificationKeys() failed: %s", + SCErrorString(SCError())); + goto error; + } + + rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); + if (rls == NULL) { + SC_log(LOG_NOTICE, "SCDynamicStoreCreateRunLoopSource() failed: %s", + SCErrorString(SCError())); + goto error; + } + + CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); + CFRelease(rls); + + error : + + if (store != NULL) CFRelease(store); + return; +} + + +#ifdef MAIN + + +#pragma mark - +#pragma mark Standalone test code + + +int +main(int argc, char **argv) +{ + _sc_log = FALSE; + _sc_verbose = (argc > 1) ? TRUE : FALSE; + + load_QoSMarking(CFBundleGetMainBundle(), (argc > 1) ? TRUE : FALSE); + CFRunLoopRun(); + // not reached + exit(0); + return 0; +} +#endif diff --git a/src/configd/Plugins/SCNetworkReachability/Info.plist b/src/configd/Plugins/SCNetworkReachability/Info.plist deleted file mode 100644 index 55ce144b6..000000000 --- a/src/configd/Plugins/SCNetworkReachability/Info.plist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Builtin - - CFBundleDevelopmentRegion - English - CFBundleExecutable - SCNetworkReachability - CFBundleIdentifier - com.apple.SystemConfiguration.SCNetworkReachability - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - com.apple.SystemConfiguration.SCNetworkReachability - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.14.4 - CFBundleSignature - ???? - CFBundleVersion - 1.14 - MachServices - - com.apple.SystemConfiguration.SCNetworkReachability - - - - diff --git a/src/configd/Plugins/SimulatorSupport/Info.plist b/src/configd/Plugins/SimulatorSupport/Info.plist index e6d9132b3..8b4c01b23 100644 --- a/src/configd/Plugins/SimulatorSupport/Info.plist +++ b/src/configd/Plugins/SimulatorSupport/Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable SimulatorSupport CFBundleIdentifier - com.apple.SystemConfiguration.SimulatorSupport + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,10 +17,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 diff --git a/src/configd/Plugins/SimulatorSupport/simulator_support.c b/src/configd/Plugins/SimulatorSupport/simulator_support.c index 529dcb884..4f5cf9b31 100644 --- a/src/configd/Plugins/SimulatorSupport/simulator_support.c +++ b/src/configd/Plugins/SimulatorSupport/simulator_support.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013 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@ */ @@ -29,28 +29,43 @@ */ +#include #include #include #include #include -#ifndef kDNSServiceCompMulticastDNS -#define kDNSServiceCompMulticastDNS "MulticastDNS" -#endif -#ifndef kDNSServiceCompPrivateDNS -#define kDNSServiceCompPrivateDNS "PrivateDNS" -#endif +#include -#include "cache.h" +#if TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC -static Boolean _verbose = FALSE; static CFMutableArrayRef mirror_keys = NULL; static CFMutableArrayRef mirror_patterns = NULL; static SCDynamicStoreRef store_host = NULL; static SCDynamicStoreRef store_sim = NULL; +#pragma mark - +#pragma mark Logging + + +/* + * Logging + */ +__private_extern__ os_log_t +__log_SimulatorSupport(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "SimulatorSupport"); + } + + return log; +} + + #pragma mark - #pragma mark iOS Simulator Support @@ -58,6 +73,7 @@ static SCDynamicStoreRef store_sim = NULL; static void mirror(SCDynamicStoreRef store, CFArrayRef changes, void *info) { +#pragma unused(store) CFDictionaryRef content_host; CFDictionaryRef content_sim; CFIndex i; @@ -80,7 +96,7 @@ mirror(SCDynamicStoreRef store, CFArrayRef changes, void *info) content_sim = SCDynamicStoreCopyMultiple(store_sim, changes, NULL); // update - cache_open(); + _SCDynamicStoreCacheOpen(store); for (i = 0; i < n; i++) { CFStringRef key; CFPropertyListRef val; @@ -89,21 +105,21 @@ mirror(SCDynamicStoreRef store, CFArrayRef changes, void *info) val = (content_host != NULL) ? CFDictionaryGetValue(content_host, key) : NULL; if (val != NULL) { // if "host" content changed - cache_SCDynamicStoreSetValue(store_sim, key, val); + SCDynamicStoreSetValue(store_sim, key, val); } else { // if no "host" content val = (content_sim != NULL) ? CFDictionaryGetValue(content_sim, key) : NULL; if (val != NULL) { // if we need to remove the "sim" content - cache_SCDynamicStoreRemoveValue(store_sim, key); + SCDynamicStoreRemoveValue(store_sim, key); } else { // if no "sim" content to remove, just notify - cache_SCDynamicStoreNotifyValue(store_sim, key); + SCDynamicStoreNotifyValue(store_sim, key); } } } - cache_write(store_sim); - cache_close(); + _SCDynamicStoreCacheCommitChanges(store_sim); + _SCDynamicStoreCacheClose(store); // cleanup if ((info == NULL) && (content_host != NULL)) { @@ -198,7 +214,7 @@ prime_SimulatorSupport() CFDictionaryRef content_host; CFIndex n; - SCLog(_verbose, LOG_DEBUG, CFSTR("prime() called")); + SC_log(LOG_DEBUG, "prime() called"); // copy current content from base OS store to _Sim store content_host = SCDynamicStoreCopyMultiple(store_host, mirror_keys, mirror_patterns); @@ -241,16 +257,13 @@ __private_extern__ void load_SimulatorSupport(CFBundleRef bundle, Boolean bundleVerbose) { +#pragma unused(bundleVerbose) Boolean ok; CFMutableDictionaryRef options; CFRunLoopSourceRef rls; - if (bundleVerbose) { - _verbose = TRUE; - } - - SCLog(_verbose, LOG_DEBUG, CFSTR("load() called")); - SCLog(_verbose, LOG_DEBUG, CFSTR(" bundle ID = %@"), CFBundleGetIdentifier(bundle)); + SC_log(LOG_DEBUG, "load() called"); + SC_log(LOG_DEBUG, " bundle ID = %@", CFBundleGetIdentifier(bundle)); // setup mirror_setup(); @@ -309,3 +322,5 @@ main(int argc, char **argv) return 0; } #endif + +#endif // TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC diff --git a/src/configd/Plugins/common/IPMonitorControlPrefs.c b/src/configd/Plugins/common/IPMonitorControlPrefs.c index c82153eeb..5d13253ba 100644 --- a/src/configd/Plugins/common/IPMonitorControlPrefs.c +++ b/src/configd/Plugins/common/IPMonitorControlPrefs.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013 Apple Inc. All rights reserved. + * Copyright (c) 2013, 2015-2019 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@ */ @@ -33,12 +33,14 @@ * - created */ +#include #include #include #include -#include #include "IPMonitorControlPrefs.h" +os_log_t __log_IPMonitor(void); + /* * kIPMonitorControlPrefsID * - identifies the IPMonitor preferences file that contains 'Verbose' @@ -65,12 +67,14 @@ IPMonitorControlPrefsGet(void) } static void -prefs_changed(__unused void * arg) +prefs_changed(void * arg) { +#pragma unused(arg) /* get the current value */ if (S_callback != NULL) { (*S_callback)(S_prefs); } + return; } @@ -103,7 +107,7 @@ enable_prefs_observer(CFRunLoopRef runloop) dispatch_queue_t queue; CFRunLoopSourceRef source; - bzero(&context, sizeof(context)); + memset(&context, 0, sizeof(context)); context.perform = prefs_changed; source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &context); CFRunLoopAddSource(runloop, source, kCFRunLoopCommonModes); @@ -127,6 +131,7 @@ enable_prefs_observer(CFRunLoopRef runloop) static void enable_prefs_observer(CFRunLoopRef runloop) { +#pragma unused(runloop) return; } @@ -137,6 +142,9 @@ IPMonitorControlPrefsChanged(SCPreferencesRef prefs, SCPreferencesNotification type, void * info) { +#pragma unused(prefs) +#pragma unused(type) +#pragma unused(info) prefs_changed(NULL); return; } @@ -149,11 +157,20 @@ IPMonitorControlPrefsInit(CFRunLoopRef runloop, kIPMonitorControlPrefsID); if (runloop != NULL && callback != NULL) { S_callback = callback; - SCPreferencesSetCallback(S_prefs, IPMonitorControlPrefsChanged, NULL); - SCPreferencesScheduleWithRunLoop(S_prefs, runloop, - kCFRunLoopCommonModes); + if (!SCPreferencesSetCallback(S_prefs, IPMonitorControlPrefsChanged, NULL)) { + SC_log(LOG_NOTICE, "SCPreferencesSetCallBack() failed: %s", SCErrorString(SCError())); + goto done; + } + + if (!SCPreferencesScheduleWithRunLoop(S_prefs, runloop, kCFRunLoopCommonModes)) { + SC_log(LOG_NOTICE, "SCPreferencesScheduleWithRunLoop() failed: %s", SCErrorString(SCError())); + (void) SCPreferencesSetCallback(S_prefs, NULL, NULL); + } + enable_prefs_observer(runloop); } + +done : return (S_prefs); } @@ -239,7 +256,7 @@ IPMonitorControlPrefsIsVerbose(void) __private_extern__ Boolean IPMonitorControlPrefsSetVerbose(Boolean verbose) { - if (verbose == FALSE) { + if (!verbose) { prefs_set_boolean(kVerbose, NULL); } else { @@ -271,7 +288,7 @@ main(int argc, char * argv[]) fprintf(stderr, "usage: %s ( on | off )\n", argv[0]); exit(1); } - if (success == FALSE) { + if (!success) { fprintf(stderr, "failed to save prefs\n"); exit(2); } diff --git a/src/configd/Plugins/common/IPMonitorControlPrefs.h b/src/configd/Plugins/common/IPMonitorControlPrefs.h index e34d378ff..b1b0002be 100644 --- a/src/configd/Plugins/common/IPMonitorControlPrefs.h +++ b/src/configd/Plugins/common/IPMonitorControlPrefs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Apple Inc. All rights reserved. + * Copyright (c) 2013, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -21,8 +21,8 @@ * @APPLE_LICENSE_HEADER_END@ */ -#ifndef _EAP8021X_EAPOLCONTROLPREFS_H -#define _EAP8021X_EAPOLCONTROLPREFS_H +#ifndef _IPMONITORCONTROLPREFS_H +#define _IPMONITORCONTROLPREFS_H /* * IPMonitorControlPrefs.h @@ -51,4 +51,4 @@ IPMonitorControlPrefsIsVerbose(void); Boolean IPMonitorControlPrefsSetVerbose(Boolean verbose); -#endif /* _COMMON_IPMONITORCONTROLPREFS_H */ +#endif /* _IPMONITORCONTROLPREFS_H */ diff --git a/src/configd/Plugins/common/InterfaceNamerControlPrefs.c b/src/configd/Plugins/common/InterfaceNamerControlPrefs.c new file mode 100644 index 000000000..43fb7c4f3 --- /dev/null +++ b/src/configd/Plugins/common/InterfaceNamerControlPrefs.c @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2017-2019 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@ + */ + +/* + * InterfaceNamerControlPrefs.c + * - definitions for accessing InterfaceNamer control preferences + */ + +/* + * Modification History + * + * January 12, 2017 Allan Nathanson (ajn@apple.com) + * - created + */ + +#include +#include +#include +#include +#include "InterfaceNamerControlPrefs.h" + +/* + * kInterfaceNamerControlPrefsID + * - identifies the InterfaceNamer preferences file that contains 'AllowNewInterfaces' + */ +#define kInterfaceNamerControlPrefsIDStr "com.apple.InterfaceNamer.control.plist" +#define kInterfaceNamerControlPrefsID CFSTR(kInterfaceNamerControlPrefsIDStr) + +/* + * kAllowNewInterfaces + * - indicates whether InterfaceNamer is allowed to create new interfaces + * while the screen is locked or not + */ +#define kAllowNewInterfaces CFSTR("AllowNewInterfaces") + +static SCPreferencesRef S_prefs; +static InterfaceNamerControlPrefsCallBack S_callback; + +static SCPreferencesRef +InterfaceNamerControlPrefsGet(void) +{ + if (S_prefs == NULL) { + InterfaceNamerControlPrefsInit(NULL, NULL); + } + + return (S_prefs); +} + +static void +prefs_changed(void * arg) +{ +#pragma unused(arg) + /* get the current value */ + if (S_callback != NULL) { + (*S_callback)(S_prefs); + } + + return; +} + +#if TARGET_OS_IPHONE +/* + * kInterfaceNamerControlManangedPrefsID + * - identifies the location of the managed preferences file + */ +#define kManagedPrefsDirStr "/Library/Managed Preferences/mobile/" +#define kInterfaceNamerControlManagedPrefsID CFSTR(kManagedPrefsDirStr \ + kInterfaceNamerControlPrefsIDStr) +static SCPreferencesRef S_managed_prefs; + +static SCPreferencesRef +InterfaceNamerControlManagedPrefsGet(void) +{ + if (S_managed_prefs == NULL) { + CFMutableDictionaryRef options; + + options = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionarySetValue(options, kSCPreferencesOptionRemoveWhenEmpty, kCFBooleanTrue); + S_managed_prefs = SCPreferencesCreateWithOptions(NULL, + CFSTR("InterfaceNamerControlPrefs"), + kInterfaceNamerControlManagedPrefsID, + NULL, + options); + CFRelease(options); + } + return (S_managed_prefs); +} + +static void +enable_prefs_observer(CFRunLoopRef runloop) +{ + CFRunLoopSourceContext context; + dispatch_queue_t queue; + CFRunLoopSourceRef source; + + memset(&context, 0, sizeof(context)); + context.perform = prefs_changed; + source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &context); + CFRunLoopAddSource(runloop, source, kCFRunLoopCommonModes); + queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + _scprefs_observer_watch(scprefs_observer_type_global, + kInterfaceNamerControlPrefsIDStr, + queue, + ^{ + if (source != NULL) { + CFRunLoopSourceSignal(source); + if (runloop != NULL) { + CFRunLoopWakeUp(runloop); + } + }; + }); + return; +} + +#else /* TARGET_OS_IPHONE */ + +static void +enable_prefs_observer(CFRunLoopRef runloop) +{ +#pragma unused(runloop) + return; +} + +#endif /* TARGET_OS_IPHONE */ + +static void +InterfaceNamerControlPrefsChanged(SCPreferencesRef prefs, + SCPreferencesNotification type, + void *info) +{ +#pragma unused(prefs) +#pragma unused(type) +#pragma unused(info) + prefs_changed(NULL); + return; +} + +__private_extern__ SCPreferencesRef +InterfaceNamerControlPrefsInit(CFRunLoopRef runloop, + InterfaceNamerControlPrefsCallBack callback) +{ + CFMutableDictionaryRef options; + + options = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionarySetValue(options, kSCPreferencesOptionRemoveWhenEmpty, kCFBooleanTrue); + S_prefs = SCPreferencesCreateWithOptions(NULL, + CFSTR("InterfaceNamerControlPrefs"), + kInterfaceNamerControlPrefsID, + NULL, + options); + CFRelease(options); + + if ((runloop != NULL) && (callback != NULL)) { + S_callback = callback; + if (!SCPreferencesSetCallback(S_prefs, InterfaceNamerControlPrefsChanged, NULL)) { + SC_log(LOG_NOTICE, "SCPreferencesSetCallBack() failed: %s", SCErrorString(SCError())); + goto done; + } + + if (!SCPreferencesScheduleWithRunLoop(S_prefs, runloop, kCFRunLoopCommonModes)) { + SC_log(LOG_NOTICE, "SCPreferencesScheduleWithRunLoop() failed: %s", SCErrorString(SCError())); + (void) SCPreferencesSetCallback(S_prefs, NULL, NULL); + } + + enable_prefs_observer(runloop); + } + + done : + return (S_prefs); +} + +static Boolean +InterfaceNamerControlPrefsSave(void) +{ + Boolean saved = FALSE; + + if (S_prefs != NULL) { + saved = SCPreferencesCommitChanges(S_prefs); + SCPreferencesSynchronize(S_prefs); + } + return (saved); +} + +static CFBooleanRef +prefs_get_boolean(CFStringRef key) +{ + CFBooleanRef b = NULL; + SCPreferencesRef prefs; + +#if TARGET_OS_IPHONE + prefs = InterfaceNamerControlManagedPrefsGet(); + if (prefs != NULL) { + b = SCPreferencesGetValue(prefs, key); + b = isA_CFBoolean(b); + if (b != NULL) { + return (b); + } + } +#endif /* TARGET_OS_IPHONE */ + + prefs = InterfaceNamerControlPrefsGet(); + if (prefs != NULL) { + b = SCPreferencesGetValue(prefs, key); + b = isA_CFBoolean(b); + } + return (b); +} + +static void +prefs_set_boolean(CFStringRef key, CFBooleanRef b) +{ + SCPreferencesRef prefs; + + prefs = InterfaceNamerControlPrefsGet(); + if (prefs != NULL) { + if (isA_CFBoolean(b) == NULL) { + SCPreferencesRemoveValue(prefs, key); + } + else { + SCPreferencesSetValue(prefs, key, b); + } + } + return; +} + +static void +InterfaceNamerControlPrefsRefresh(void) +{ + if (S_prefs != NULL) { + SCPreferencesSynchronize(S_prefs); + } +#if TARGET_OS_IPHONE + if (S_managed_prefs != NULL) { + SCPreferencesSynchronize(S_managed_prefs); + } +#endif /* TARGET_OS_IPHONE */ + return; +} + +/** + ** Get + **/ +__private_extern__ Boolean +InterfaceNamerControlPrefsAllowNewInterfaces(void) +{ + CFBooleanRef b; + Boolean allow = FALSE; + + b = prefs_get_boolean(kAllowNewInterfaces); + if (b != NULL) { + allow = CFBooleanGetValue(b); + } + /* flush the backing store */ + InterfaceNamerControlPrefsRefresh(); + return (allow); +} + +/** + ** Set + **/ +__private_extern__ Boolean +InterfaceNamerControlPrefsSetAllowNewInterfaces(Boolean allow) +{ + if (allow) { + prefs_set_boolean(kAllowNewInterfaces, kCFBooleanTrue); + } else { + prefs_set_boolean(kAllowNewInterfaces, NULL); + } + return (InterfaceNamerControlPrefsSave()); +} diff --git a/src/configd/Plugins/common/cache.h b/src/configd/Plugins/common/InterfaceNamerControlPrefs.h similarity index 53% rename from src/configd/Plugins/common/cache.h rename to src/configd/Plugins/common/InterfaceNamerControlPrefs.h index f8efe16a0..51daaeb71 100644 --- a/src/configd/Plugins/common/cache.h +++ b/src/configd/Plugins/common/InterfaceNamerControlPrefs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -21,43 +21,31 @@ * @APPLE_LICENSE_HEADER_END@ */ +#ifndef _INTERFACENAMERCONTROLPREFS_H +#define _INTERFACENAMERCONTROLPREFS_H + +/* + * InterfaceNamerControlPrefs.h + * - definitions for accessing InterfaceNamer control preferences + */ + /* * Modification History * - * May 1, 2003 Allan Nathanson - * - initial revision + * January 12, 2017 Allan Nathanson (ajn@apple.com) + * - created */ +typedef void (*InterfaceNamerControlPrefsCallBack)(SCPreferencesRef prefs); -#ifndef _CACHE_H -#define _CACHE_H - - -#include -#include - - -__BEGIN_DECLS - -void cache_open (void); - -CFPropertyListRef cache_SCDynamicStoreCopyValue (SCDynamicStoreRef store, - CFStringRef key); - -void cache_SCDynamicStoreSetValue (SCDynamicStoreRef store, - CFStringRef key, - CFPropertyListRef value); - -void cache_SCDynamicStoreRemoveValue (SCDynamicStoreRef store, - CFStringRef key); - -void cache_SCDynamicStoreNotifyValue (SCDynamicStoreRef store, - CFStringRef key); - -void cache_write (SCDynamicStoreRef store); +SCPreferencesRef +InterfaceNamerControlPrefsInit (CFRunLoopRef runloop, + InterfaceNamerControlPrefsCallBack callback); -void cache_close (void); +Boolean +InterfaceNamerControlPrefsAllowNewInterfaces (void); -__END_DECLS +Boolean +InterfaceNamerControlPrefsSetAllowNewInterfaces (Boolean verbose); -#endif /* _CACHE_H */ +#endif /* _INTERFACENAMERCONTROLPREFS_H */ diff --git a/src/configd/Plugins/common/cache.c b/src/configd/Plugins/common/cache.c deleted file mode 100644 index fe4e0dee9..000000000 --- a/src/configd/Plugins/common/cache.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2003, 2004, 2006, 2011 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 - * - * May 1, 2003 Allan Nathanson - * - initial revision - */ - - -#include -#include -#include // for SCLog() - -#include "cache.h" - - -static CFMutableDictionaryRef cached_keys = NULL; -static CFMutableDictionaryRef cached_set = NULL; -static CFMutableArrayRef cached_removals = NULL; -static CFMutableArrayRef cached_notifys = NULL; - - -__private_extern__ -void -cache_open(void) -{ - cached_keys = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - cached_set = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - cached_removals = CFArrayCreateMutable(NULL, - 0, - &kCFTypeArrayCallBacks); - cached_notifys = CFArrayCreateMutable(NULL, - 0, - &kCFTypeArrayCallBacks); - - return; -} - - -__private_extern__ -CFPropertyListRef -cache_SCDynamicStoreCopyValue(SCDynamicStoreRef store, CFStringRef key) -{ - CFPropertyListRef value; - - value = CFDictionaryGetValue(cached_set, key); - if (value) { - // if we have "set" a new value - return (CFRetain(value)); - } - - if (CFArrayContainsValue(cached_removals, - CFRangeMake(0, CFArrayGetCount(cached_removals)), - key)) { - // if we have "removed" the key - _SCErrorSet(kSCStatusNoKey); - return NULL; - } - - value = CFDictionaryGetValue(cached_keys, key); - if (value) { - // if we have a cached value - return (CFRetain(value)); - } - - value = SCDynamicStoreCopyValue(store, key); - if (value) { - CFDictionarySetValue(cached_keys, key, value); - } - - return value; -} - - -__private_extern__ -void -cache_SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFPropertyListRef value) -{ - CFIndex i; - - i = CFArrayGetFirstIndexOfValue(cached_removals, - CFRangeMake(0, CFArrayGetCount(cached_removals)), - key); - if (i != kCFNotFound) { - // if previously "removed" - CFArrayRemoveValueAtIndex(cached_removals, i); - } - - CFDictionarySetValue(cached_set, key, value); - - return; -} - -__private_extern__ -void -cache_SCDynamicStoreRemoveValue(SCDynamicStoreRef store, CFStringRef key) -{ - CFDictionaryRemoveValue(cached_set, key); - - if (!CFArrayContainsValue(cached_removals, - CFRangeMake(0, CFArrayGetCount(cached_removals)), - key)) { - CFArrayAppendValue(cached_removals, key); - } - - return; -} - - -__private_extern__ -void -cache_SCDynamicStoreNotifyValue(SCDynamicStoreRef store, CFStringRef key) -{ - if (!CFArrayContainsValue(cached_notifys, - CFRangeMake(0, CFArrayGetCount(cached_notifys)), - key)) { - CFArrayAppendValue(cached_notifys, key); - } - - return; -} - - -__private_extern__ -void -cache_write(SCDynamicStoreRef store) -{ - if ((CFDictionaryGetCount(cached_set) > 0) || - (CFArrayGetCount(cached_removals) > 0) || - (CFArrayGetCount(cached_notifys) > 0)) { - if (!SCDynamicStoreSetMultiple(store, - cached_set, - cached_removals, - cached_notifys)) { - SCLog(TRUE, - LOG_ERR, - CFSTR("SCDynamicStoreSetMultiple() failed: %s"), - SCErrorString(SCError())); - } - } - - return; -} - - -__private_extern__ -void -cache_close(void) -{ - CFRelease(cached_keys); - CFRelease(cached_set); - CFRelease(cached_removals); - CFRelease(cached_notifys); - - return; -} diff --git a/src/configd/Plugins/common/plugin_shared.h b/src/configd/Plugins/common/plugin_shared.h new file mode 100644 index 000000000..5fdad83cf --- /dev/null +++ b/src/configd/Plugins/common/plugin_shared.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016, 2018 Apple Computer, 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 + * + * September 8, 2016 Allan Nathanson + * - initial revision + */ + + +#ifndef _PLUGIN_SHARED_H +#define _PLUGIN_SHARED_H + + +#include + + +#pragma mark - +#pragma mark InterfaceNamer.bundle --> others + +/* + * Plugin:InterfaceNamer [SCDynamicStore] dictionary content + */ + +// IORegistry "quiet" (and timeout) +#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_") + +// BT-PAN network interfaces +#define BT_PAN_NAME "Bluetooth PAN" +#define kInterfaceNamerKey_BT_PAN_Name CFSTR("_" BT_PAN_NAME "_") +#define kInterfaceNamerKey_BT_PAN_Mac CFSTR("_" BT_PAN_NAME " (MAC)" "_") + + +#endif /* _PLUGIN_SHARED_H */ diff --git a/src/configd/SCMonitor/Info.plist b/src/configd/SCMonitor/Info.plist index 19d53f44d..4b358daea 100644 --- a/src/configd/SCMonitor/Info.plist +++ b/src/configd/SCMonitor/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.apple.SystemConfiguration.${EXECUTABLE_NAME} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 CFPlugInDynamicRegistration NO CFPlugInFactories diff --git a/src/configd/SCMonitor/English.lproj/Localizable.strings b/src/configd/SCMonitor/en.lproj/Localizable.strings similarity index 84% rename from src/configd/SCMonitor/English.lproj/Localizable.strings rename to src/configd/SCMonitor/en.lproj/Localizable.strings index 254469037da82dfcc7cc9eed965dc5cbdea2726e..1234856f1d9e5a586a7b612bb3ca50f21c77c13a 100644 GIT binary patch delta 43 zcmX@XbA*TK|G&vcnanm?9%JN?QBY-YV31Xqtk0~nS)b`XGc$vl!el` #include #include -#include #include + +#define SC_LOG_HANDLE __log_SCMonitor +#define SC_LOG_HANDLE_TYPE static #include #include + #include +#include #include #include #include "UserEventAgentInterface.h" @@ -78,8 +82,6 @@ typedef struct { Boolean debug; - asl_object_t log_msg; - CFStringRef configuration_action; CFRunLoopSourceRef monitorRls; @@ -106,6 +108,26 @@ typedef struct { static CFMutableDictionaryRef notify_to_instance = NULL; +#pragma mark - +#pragma mark Logging + + +/* + * Logging + */ +static os_log_t +__log_SCMonitor(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "SCMonitor"); + } + + return log; +} + + #pragma mark - #pragma mark Authorization @@ -122,9 +144,7 @@ getAuthorization(MyType *myInstance) flags, &myInstance->authorization); if (status != errAuthorizationSuccess) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("AuthorizationCreate() failed: status = %d"), - (int)status); + SC_log(LOG_ERR, "AuthorizationCreate() failed: status = %d", (int)status); } } @@ -185,6 +205,7 @@ freeAuthorization(MyType *myInstance) static void open_NetworkPrefPane(MyType *myInstance) { +#pragma unused(myInstance) AEDesc aeDesc = { typeNull, NULL }; CFArrayRef prefArray; CFURLRef prefURL; @@ -203,7 +224,7 @@ open_NetworkPrefPane(MyType *myInstance) strlen(NETWORK_PREF_CMD), &aeDesc); if (status != noErr) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: AECreateDesc() failed: %d"), (int)status); + SC_log(LOG_ERR, "AECreateDesc() failed: %d", (int)status); } prefSpec.appURL = NULL; @@ -214,7 +235,7 @@ open_NetworkPrefPane(MyType *myInstance) status = LSOpenFromURLSpec(&prefSpec, NULL); if (status != noErr) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: LSOpenFromURLSpec() failed: %d"), (int)status); + SC_log(LOG_ERR, "LSOpenFromURLSpec() failed: %d", (int)status); } CFRelease(prefArray); @@ -248,9 +269,9 @@ notify_remove(MyType *myInstance, Boolean cancel) status = CFUserNotificationCancel(myInstance->userNotification); if (status != 0) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("SCMonitor: CFUserNotificationCancel() failed, status=%d"), - (int)status); + SC_log(LOG_ERR, + "CFUserNotificationCancel() failed, status=%d", + (int)status); } } CFRelease(myInstance->userNotification); @@ -278,7 +299,7 @@ notify_reply(CFUserNotificationRef userNotification, CFOptionFlags response_flag } } if (myInstance == NULL) { - SCLOG(NULL, NULL, ASL_LEVEL_ERR, CFSTR("SCMonitor: can't find user notification")); + SC_log(LOG_ERR, "can't find user notification"); return; } @@ -348,7 +369,7 @@ notify_add(MyType *myInstance) CFDictionarySetValue(dict, kCFUserNotificationLocalizationURLKey, url); CFRelease(url); } else { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: can't find bundle")); + SC_log(LOG_ERR, "can't find bundle"); goto done; } @@ -374,7 +395,7 @@ notify_add(MyType *myInstance) CFStringRef message; CFStringRef name; -#define MESSAGE_1 "The \"%@\" network interface has not been set up. To set up this interface, use Network Preferences." +#define MESSAGE_1 "The “%@” network interface has not been set up. To set up this interface, use Network Preferences." format = CFBundleCopyLocalizedString(bundle, CFSTR("MESSAGE_1"), @@ -418,7 +439,7 @@ notify_add(MyType *myInstance) &error, dict); if (myInstance->userNotification == NULL) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: CFUserNotificationCreate() failed, %d"), (int)error); + SC_log(LOG_ERR, "CFUserNotificationCreate() failed: %d", (int)error); goto done; } @@ -428,7 +449,7 @@ notify_add(MyType *myInstance) notify_reply, 0); if (myInstance->userRls == NULL) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: CFUserNotificationCreateRunLoopSource() failed")); + SC_log(LOG_ERR, "CFUserNotificationCreateRunLoopSource() failed"); CFRelease(myInstance->userNotification); myInstance->userNotification = NULL; goto done; @@ -475,10 +496,12 @@ notify_configure(MyType *myInstance) set = SCNetworkSetCopyCurrent(prefs); if (set == NULL) { - set = SCNetworkSetCreate(prefs); + // if no "current" set, create new/default ("Automatic") set + set = _SCNetworkSetCreateDefault(prefs); if (set == NULL) { goto done; } + SC_log(LOG_DEBUG, "added new \"default\" set"); } for (i = 0; i < n; i++) { @@ -490,23 +513,23 @@ notify_configure(MyType *myInstance) CFStringRef name; name = SCNetworkInterfaceGetLocalizedDisplayName(interface); - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_NOTICE, CFSTR("add/update service for %@"), name); + SC_log(LOG_NOTICE, "add/update service for %@", name); } } ok = SCPreferencesCommitChanges(prefs); if (!ok) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("SCPreferencesCommitChanges() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_ERR, + "SCPreferencesCommitChanges() failed: %s", + SCErrorString(SCError())); goto done; } ok = SCPreferencesApplyChanges(prefs); if (!ok) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("SCPreferencesApplyChanges() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_ERR, + "SCPreferencesApplyChanges() failed: %s", + SCErrorString(SCError())); goto done; } @@ -529,6 +552,67 @@ notify_configure(MyType *myInstance) } +#pragma mark - + +static Boolean +onConsole() +{ + CFArrayRef console_sessions; + Boolean on = FALSE; + io_registry_entry_t root; + uid_t uid = geteuid(); + + root = IORegistryGetRootEntry(kIOMasterPortDefault); + console_sessions = IORegistryEntryCreateCFProperty(root, + CFSTR(kIOConsoleUsersKey), + NULL, + 0); + if (console_sessions != NULL) { + CFIndex n; + + n = isA_CFArray(console_sessions) ? CFArrayGetCount(console_sessions) : 0; + for (CFIndex i = 0; i < n; i++) { + CFBooleanRef bVal; + CFDictionaryRef session; + uint64_t sessionUID; + CFNumberRef val; + + session = CFArrayGetValueAtIndex(console_sessions, i); + if (!isA_CFDictionary(session)) { + // if not dictionary + continue; + } + + if (!CFDictionaryGetValueIfPresent(session, + CFSTR(kIOConsoleSessionUIDKey), + (const void **)&val) || + !isA_CFNumber(val) || + !CFNumberGetValue(val, kCFNumberSInt64Type, (void *)&sessionUID) || + (uid != sessionUID)) { + // if not my session + continue; + } + + if (CFDictionaryGetValueIfPresent(session, + CFSTR(kIOConsoleSessionOnConsoleKey), + (const void **)&bVal) && + isA_CFBoolean(bVal) && + CFBooleanGetValue(bVal)) { + // if "on console" session + on = TRUE; + } + + break; + } + + CFRelease(console_sessions); + } + IOObjectRelease(root); + + return on; +} + + #pragma mark - @@ -547,6 +631,10 @@ updateInterfaceList(MyType *myInstance) SCPreferencesRef prefs; SCNetworkSetRef set = NULL; + if (!onConsole()) { + return; + } + prefs = SCPreferencesCreate(NULL, CFSTR("SCMonitor"), NULL); if (prefs == NULL) { return; @@ -554,7 +642,8 @@ updateInterfaceList(MyType *myInstance) set = SCNetworkSetCopyCurrent(prefs); if (set == NULL) { - set = SCNetworkSetCreate(prefs); + // if no "current" set, create new/default ("Automatic") set + set = _SCNetworkSetCreateDefault(prefs); if (set == NULL) { goto done; } @@ -692,6 +781,8 @@ updateInterfaceList(MyType *myInstance) static void update_lan(SCDynamicStoreRef store, CFArrayRef changes, void * arg) { +#pragma unused(store) +#pragma unused(changes) MyType *myInstance = (MyType *)arg; updateInterfaceList(myInstance); @@ -709,9 +800,9 @@ watcher_add_lan(MyType *myInstance) store = SCDynamicStoreCreate(NULL, CFSTR("SCMonitor"), update_lan, &context); if (store == NULL) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("SCMonitor: SCDynamicStoreCreate() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_ERR, + "SCDynamicStoreCreate() failed: %s", + SCErrorString(SCError())); return; } @@ -719,7 +810,7 @@ watcher_add_lan(MyType *myInstance) // watch for changes to the list of network interfaces keys = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); - SCDynamicStoreSetNotificationKeys(store, NULL, keys); + SCDynamicStoreSetNotificationKeys(store, keys, NULL); CFRelease(keys); myInstance->monitorRls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); CFRunLoopAddSource(CFRunLoopGetCurrent(), @@ -802,6 +893,7 @@ add_node_watcher(MyType *myInstance, io_registry_entry_t node, io_registry_entry static void update_node(void *refCon, io_service_t service, natural_t messageType, void *messageArgument) { +#pragma unused(messageArgument) CFIndex i; CFDataRef myData = (CFDataRef)refCon; MyType *myInstance; @@ -822,7 +914,7 @@ update_node(void *refCon, io_service_t service, natural_t messageType, void *mes return; } - val = IORegistryEntryCreateCFProperty(service, CFSTR("Initializing"), NULL, 0); + val = IORegistryEntryCreateCFProperty(service, kSCNetworkInterfaceInitializingKey, NULL, 0); if (val != NULL) { initializing = (isA_CFBoolean(val) && CFBooleanGetValue(val)); CFRelease(val); @@ -888,7 +980,7 @@ add_node_watcher(MyType *myInstance, io_registry_entry_t node, io_registry_entry /* ALIGN: CF aligns to at least >8 bytes */ myNode = (MyNode *)(void *)CFDataGetBytePtr(myData); - bzero(myNode, sizeof(MyNode)); + memset(myNode, 0, sizeof(MyNode)); myNode->interface = interface; if (myNode->interface != MACH_PORT_NULL) { IOObjectRetain(myNode->interface); @@ -912,8 +1004,9 @@ add_node_watcher(MyType *myInstance, io_registry_entry_t node, io_registry_entry } CFArrayAppendValue(myInstance->notifyNodes, myData); } else { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("add_init_watcher IOServiceAddInterestNotification() failed, kr = 0x%x"), kr); + SC_log(LOG_ERR, + "add_init_watcher IOServiceAddInterestNotification() failed, kr = 0x%x", + kr); } CFRelease(myData); } @@ -948,7 +1041,7 @@ add_init_watcher(MyType *myInstance, io_registry_entry_t interface) case kIOReturnNoDevice : // if we have hit the root node break; default : - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("add_init_watcher IORegistryEntryGetParentEntry() failed, kr = 0x%x"), kr); + SC_log(LOG_ERR, "add_init_watcher IORegistryEntryGetParentEntry() failed, kr = 0x%x", kr); break; } if (node != interface) { @@ -1018,8 +1111,7 @@ watcher_add_serial(MyType *myInstance) myInstance->notifyPort = IONotificationPortCreate(kIOMasterPortDefault); if (myInstance->notifyPort == NULL) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("SCMonitor: IONotificationPortCreate failed")); + SC_log(LOG_ERR, "IONotificationPortCreate failed"); return; } @@ -1031,9 +1123,7 @@ watcher_add_serial(MyType *myInstance) (void *)myInstance, // refCon &myInstance->notifyIterator); // notification if (kr != KERN_SUCCESS) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, - CFSTR("SCMonitor : IOServiceAddMatchingNotification returned 0x%x"), - kr); + SC_log(LOG_ERR, "SCMonitor : IOServiceAddMatchingNotification returned 0x%x", kr); return; } @@ -1136,11 +1226,6 @@ watcher_add(MyType *myInstance) { CFBundleRef bundle; - if (myInstance->log_msg == NULL) { - myInstance->log_msg = asl_new(ASL_TYPE_MSG); - asl_set(myInstance->log_msg, ASL_KEY_FACILITY, MY_BUNDLE_ID); - } - bundle = CFBundleGetBundleWithIdentifier(CFSTR(MY_BUNDLE_ID)); if (bundle != NULL) { CFStringRef action; @@ -1196,8 +1281,6 @@ watcher_remove(MyType *myInstance) myInstance->interfaces_known = NULL; } - asl_release(myInstance->log_msg); - myInstance->log_msg = NULL; return; } @@ -1284,11 +1367,12 @@ static UserEventAgentInterfaceStruct UserEventAgentInterfaceFtbl = { void * UserEventAgentFactory(CFAllocatorRef allocator, CFUUIDRef typeID) { +#pragma unused(allocator) MyType *newOne = NULL; if (CFEqual(typeID, kUserEventAgentTypeID)) { newOne = (MyType *)malloc(sizeof(MyType)); - bzero(newOne, sizeof(*newOne)); + memset(newOne, 0, sizeof(*newOne)); newOne->_UserEventAgentInterface = &UserEventAgentInterfaceFtbl; newOne->_factoryID = (CFUUIDRef)CFRetain(kUserEventAgentFactoryID); CFPlugInAddInstanceForFactory(kUserEventAgentFactoryID); @@ -1308,7 +1392,7 @@ main(int argc, char **argv) _sc_log = FALSE; _sc_verbose = (argc > 1) ? TRUE : FALSE; - bzero(newOne, sizeof(*newOne)); + memset(newOne, 0, sizeof(*newOne)); myInstall(newOne); CFRunLoopRun(); exit(0); diff --git a/src/configd/SCTest-ObjC/test-objC.m b/src/configd/SCTest-ObjC/test-objC.m new file mode 100644 index 000000000..6fc524011 --- /dev/null +++ b/src/configd/SCTest-ObjC/test-objC.m @@ -0,0 +1,165 @@ +/* + * Copyright (c) 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, + * 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 + * + * April 21, 2015 Sushant Chavan + * - initial revision + */ + +/* + * A Objective-C test target to test SC APIs + */ + +#import +@import Foundation; +@import SystemConfiguration; +@import SystemConfiguration_Private; + +#define MY_APP_NAME CFSTR("SCTestObjC") +#define TARGET_HOST "www.apple.com" + + +#if !TARGET_OS_SIMULATOR +static void +test_SCDynamicStore() +{ + NSLog(@"\n\n*** SCDynamicStore ***\n\n"); + CFDictionaryRef dict; + CFStringRef intf; + CFStringRef key; + SCDynamicStoreRef store; + + store = SCDynamicStoreCreate(NULL, MY_APP_NAME, NULL, NULL); + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); + dict = SCDynamicStoreCopyValue(store, key); + intf = CFDictionaryGetValue(dict, kSCDynamicStorePropNetPrimaryInterface); + NSLog(@"- Primary Interface is %@\n", intf); + + CFRelease(store); + CFRelease(dict); + CFRelease(key); +} +#endif // !TARGET_OS_SIMULATOR + +#if !TARGET_OS_SIMULATOR +static void +test_SCNetworkConfiguration() +{ + NSLog(@"\n\n*** SCNetworkConfiguration ***\n\n"); + CFIndex count; + CFIndex idx; + CFArrayRef interfaces; + + interfaces = SCNetworkInterfaceCopyAll(); + count = CFArrayGetCount(interfaces); + NSLog(@"Network Interfaces:\n"); + for (idx=0; idx < count; idx++) { + SCNetworkInterfaceRef intf; + CFStringRef bsdName; + + intf = CFArrayGetValueAtIndex(interfaces, idx); + bsdName = SCNetworkInterfaceGetBSDName(intf); + NSLog(@"- %@", bsdName); + } + + CFRelease(interfaces); +} +#endif // !TARGET_OS_SIMULATOR + +void +test_SCNetworkReachability() +{ + NSLog(@"\n\n*** SCNetworkReachability ***\n\n"); + SCNetworkReachabilityFlags flags; + SCNetworkReachabilityRef target; + + target = SCNetworkReachabilityCreateWithName(NULL, TARGET_HOST); + (void)SCNetworkReachabilityGetFlags(target, &flags); + NSLog(@"- Reachability flags for "TARGET_HOST": %#x", flags); + + CFRelease(target); +} + +#if !TARGET_OS_SIMULATOR +static void +test_SCPreferences() +{ + NSLog(@"\n\n*** SCPreferences ***\n\n"); + CFIndex count; + CFIndex idx; + CFStringRef model = NULL; + SCPreferencesRef prefs; + CFArrayRef services; + + prefs = SCPreferencesCreate(NULL, MY_APP_NAME, NULL); + model = SCPreferencesGetValue(prefs, CFSTR("Model")); + if (model != NULL) { + NSLog(@"Current model is %@", model); + } + + services = SCNetworkServiceCopyAll(prefs); + count = CFArrayGetCount(services); + NSLog(@"Network Services:\n"); + for (idx = 0; idx < count; idx++) { + SCNetworkServiceRef serv; + CFStringRef servName; + + serv = CFArrayGetValueAtIndex(services, idx); + servName = SCNetworkServiceGetName(serv); + NSLog(@"- %@\n", servName); + } + + CFRelease(prefs); + CFRelease(services); +} +#endif // !TARGET_OS_SIMULATOR + +void +SCTest() +{ + +#if !TARGET_OS_SIMULATOR + test_SCDynamicStore(); +#endif // !TARGET_OS_SIMULATOR + +#if !TARGET_OS_SIMULATOR + test_SCNetworkConfiguration(); +#endif // !TARGET_OS_SIMULATOR + + test_SCNetworkReachability(); + +#if !TARGET_OS_SIMULATOR + test_SCPreferences(); +#endif // !TARGET_OS_SIMULATOR + +} + +int main(int argc, const char * argv[]) { +#pragma unused(argc, argv) + @autoreleasepool { + SCTest(); + } + return 0; +} diff --git a/src/configd/SCTest-Swift/main.swift b/src/configd/SCTest-Swift/main.swift new file mode 100644 index 000000000..312b1cc60 --- /dev/null +++ b/src/configd/SCTest-Swift/main.swift @@ -0,0 +1,164 @@ +/* +* Copyright (c) 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, +* 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 +* +* April 21, 2015 Sushant Chavan +* - initial revision +*/ + +/* +* A Swift test target to test SC APIs +*/ + +import Foundation +import SystemConfiguration +import SystemConfiguration_Private + +let target_host = "www.apple.com" +var application = "SCTest-Swift" as CFString + +#if !targetEnvironment(simulator) +func + test_SCDynamicStore () +{ + //SCDynamicStore APIs + NSLog("\n\n*** SCDynamicStore ***\n\n") + let key:CFString + let store:SCDynamicStore? + let dict:[String:String]? + let primaryIntf:String? + + store = SCDynamicStoreCreate(nil, application, nil, nil) + if store == nil { + NSLog("Error creating session: %s", SCErrorString(SCError())) + return + } + + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(nil, kSCDynamicStoreDomainState, kSCEntNetIPv4) + dict = SCDynamicStoreCopyValue(store, key) as? [String:String] + primaryIntf = dict?[kSCDynamicStorePropNetPrimaryInterface as String] + if (primaryIntf != nil) { + NSLog("Primary interface is %@", primaryIntf!) + } else { + NSLog("Primary interface is unavailable") + } +} +#endif // !targetEnvironment(simulator) + +#if !targetEnvironment(simulator) +func +test_SCNetworkConfiguration () +{ + //SCNetworkConfiguration APIs + NSLog("\n\n*** SCNetworkConfiguration ***\n\n") + let interfaceArray:[CFArray] + + NSLog("Network Interfaces:") + interfaceArray = SCNetworkInterfaceCopyAll() as! [CFArray] + for idx in 0...interfaceArray.count { + let interface = interfaceArray[idx] + if let bsdName = SCNetworkInterfaceGetBSDName(interface as! SCNetworkInterface) { + NSLog("- %@", bsdName as String) + } + } +} +#endif // !targetEnvironment(simulator) + +func +test_SCNetworkReachability () +{ + //SCNetworkReachability APIs + NSLog("\n\n*** SCNetworkReachability ***\n\n") + let target:SCNetworkReachability? + var flags:SCNetworkReachabilityFlags = SCNetworkReachabilityFlags.init(rawValue: 0) + + target = SCNetworkReachabilityCreateWithName(nil, target_host) + if target == nil { + NSLog("Error creating target: %s", SCErrorString(SCError())) + return + } + + SCNetworkReachabilityGetFlags(target!, &flags) + NSLog("SCNetworkReachability flags for %@ is %#x", String(target_host), flags.rawValue) +} + +#if !targetEnvironment(simulator) +func +test_SCPreferences () +{ + //SCPreferences APIs + NSLog("\n\n*** SCPreferences ***\n\n") + let prefs:SCPreferences? + let networkServices:[CFArray]? + + prefs = SCPreferencesCreate(nil, application, nil) + if prefs == nil { + NSLog("Error creating prefs: %s", SCErrorString(SCError())) + return + } + + if let model = SCPreferencesGetValue(prefs!, "Model" as CFString) { + NSLog("Current system model is %@", model as! String) + } + + networkServices = SCNetworkServiceCopyAll(prefs!) as? [CFArray] + if networkServices == nil { + NSLog("Error retrieving network services", SCErrorString(SCError())) + return + } + + NSLog("Network Services:") + for idx in 0...(networkServices?.count)! { + let service = networkServices?[idx] + if let serviceName = SCNetworkServiceGetName(service as! SCNetworkService) { + NSLog("- %@", serviceName as String) + } + + } +} +#endif // !targetEnvironment(simulator) + +func +my_main () +{ + +#if !targetEnvironment(simulator) + test_SCDynamicStore() +#endif // !targetEnvironment(simulator) + +#if !targetEnvironment(simulator) + test_SCNetworkConfiguration() +#endif // !targetEnvironment(simulator) + + test_SCNetworkReachability() + +#if !targetEnvironment(simulator) + test_SCPreferences() +#endif // !targetEnvironment(simulator) + +} + +// Run the test +my_main() diff --git a/src/configd/SystemConfiguration.fproj/AppWorkaround.plist b/src/configd/SystemConfiguration.fproj/AppWorkaround.plist deleted file mode 100644 index e4c15506a..000000000 --- a/src/configd/SystemConfiguration.fproj/AppWorkaround.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - kCSCheckFixVersion - 1 - kCSCheckFixUniversal - - 7408115 - - com.mackiev.3dweatherglobe - - 231 - 232 - - - 9022571 - - com.mackiev.3dweatherglobe - - 256 - - - - - diff --git a/src/configd/SystemConfiguration.fproj/BondConfiguration.c b/src/configd/SystemConfiguration.fproj/BondConfiguration.c index cb24adafb..1fe9ceb86 100644 --- a/src/configd/SystemConfiguration.fproj/BondConfiguration.c +++ b/src/configd/SystemConfiguration.fproj/BondConfiguration.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2019 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,11 +35,8 @@ #include #include -#include #include "SCNetworkConfigurationInternal.h" #include "SCPreferencesInternal.h" -#include -#include #include #include @@ -67,22 +64,22 @@ inet_dgram_socket() s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); } return s; } static int -siocgifmedia(int s, const char * ifname, int * status, int * active) +siocgifxmedia(int s, const char * ifname, int * status, int * active) { struct ifmediareq ifmr; *status = 0; *active = 0; - bzero(&ifmr, sizeof(ifmr)); - strncpy(ifmr.ifm_name, ifname, sizeof(ifmr.ifm_name)); - if (ioctl(s, SIOCGIFMEDIA, &ifmr) == -1) { + memset(&ifmr, 0, sizeof(ifmr)); + strlcpy(ifmr.ifm_name, ifname, sizeof(ifmr.ifm_name)); + if (ioctl(s, SIOCGIFXMEDIA, &ifmr) == -1) { return (-1); } if (ifmr.ifm_count != 0) { @@ -100,9 +97,9 @@ if_bond_status_req_copy(int s, const char * ifname) struct if_bond_status_req * ibsr_p; struct ifreq ifr; - bzero(&ifr, sizeof(ifr)); + memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); - bzero((char *)&ibr, sizeof(ibr)); + memset((char *)&ibr, 0, sizeof(ibr)); ibr.ibr_op = IF_BOND_OP_GET_STATUS; ibsr_p = &ibr.ibr_ibru.ibru_status; ibsr_p->ibsr_version = IF_BOND_STATUS_REQ_VERSION; @@ -153,7 +150,7 @@ add_interface(CFMutableArrayRef *interfaces, CFStringRef if_name, SCPreferencesR interface = _SCNetworkInterfaceCreateWithBSDName(NULL, if_name, kIncludeNoVirtualInterfaces); } - + if (interface != NULL) { CFArrayAppendValue(*interfaces, interface); CFRelease(interface); @@ -262,19 +259,17 @@ SCBondInterfaceCopyAll(SCPreferencesRef prefs) CFDictionaryRef dict; SCPreferencesRef ni_prefs; CFStringRef path; - - if ((prefs == NULL) || - (__SCPreferencesUsingDefaultPrefs(prefs) == TRUE)) { + + if (__SCPreferencesUsingDefaultPrefs(prefs)) { ni_prefs = NULL; - } - else { + } else { ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs); } - + context.bonds = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); context.prefs = prefs; context.ni_prefs = ni_prefs; - + path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/%@/%@"), @@ -369,7 +364,7 @@ SCBondInterfaceCopyAvailableMemberInterfaces(SCPreferencesRef prefs) } // identify available interfaces - interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(); + interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(FALSE); if (interfaces != NULL) { CFIndex i; CFIndex n; @@ -413,7 +408,7 @@ _SCBondInterfaceCopyActive(void) if (getifaddrs(&ifap) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, CFSTR("getifaddrs() failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno)); return NULL; } @@ -447,10 +442,9 @@ _SCBondInterfaceCopyActive(void) continue; } _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("if_bond_status_req_copy(%s) failed: %s"), - ifp->ifa_name, - strerror(errno)); + SC_log(LOG_NOTICE, "if_bond_status_req_copy(%s) failed: %s", + ifp->ifa_name, + strerror(errno)); CFRelease(bonds); bonds = NULL; goto done; @@ -508,7 +502,7 @@ _SCBondInterfaceCopyActive(void) SCBondInterfaceRef SCBondInterfaceCreate(SCPreferencesRef prefs) { - CFAllocatorRef allocator; + CFAllocatorRef allocator; SCBondInterfaceRef bond = NULL; CFIndex i; @@ -986,7 +980,7 @@ SCBondInterfaceSetMode(SCBondInterfaceRef bond, CFNumberRef mode) return FALSE; } - if (CFNumberGetValue(mode, kCFNumberIntType, &mode_num) == FALSE) { + if (!CFNumberGetValue(mode, kCFNumberIntType, &mode_num)) { _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -1068,7 +1062,7 @@ static pthread_once_t bondStatus_init = PTHREAD_ONCE_INIT; static CFStringRef __SCBondStatusCopyDescription(CFTypeRef cf) { - CFAllocatorRef allocator = CFGetAllocator(cf); + CFAllocatorRef allocator = CFGetAllocator(cf); CFMutableStringRef result; SCBondStatusPrivateRef statusPrivate = (SCBondStatusPrivateRef)cf; @@ -1129,10 +1123,10 @@ __SCBondStatusInitialize(void) static SCBondStatusRef -__SCBondStatusCreatePrivate(CFAllocatorRef allocator, - SCBondInterfaceRef bond, - CFDictionaryRef status_bond, - CFDictionaryRef status_interfaces) +__SCBondStatusCreatePrivate(CFAllocatorRef __nullable allocator, + SCBondInterfaceRef bond, + CFDictionaryRef status_bond, + CFDictionaryRef status_interfaces) { SCBondStatusPrivateRef statusPrivate; uint32_t size; @@ -1150,12 +1144,9 @@ __SCBondStatusCreatePrivate(CFAllocatorRef allocator, return NULL; } - /* establish the bond status */ - + /* initialize non-zero/NULL members */ statusPrivate->bond = CFRetain(bond); statusPrivate->status_bond = CFDictionaryCreateCopy(NULL, status_bond); - - statusPrivate->interfaces = NULL; statusPrivate->status_interfaces = CFDictionaryCreateCopy(NULL, status_interfaces); return (SCBondStatusRef)statusPrivate; @@ -1262,17 +1253,16 @@ SCBondInterfaceCopyStatus(SCBondInterfaceRef bond) if_name, sizeof(if_name), kCFStringEncodingASCII); - if (siocgifmedia(s, if_name, &bond_if_status, &bond_if_active) == -1) { + if (siocgifxmedia(s, if_name, &bond_if_status, &bond_if_active) == -1) { _SCErrorSet(errno); switch (errno) { case EBUSY : case ENXIO : break; default : - SCLog(TRUE, LOG_ERR, - CFSTR("siocgifmedia(%s) failed: %s"), - if_name, - strerror(errno)); + SC_log(LOG_NOTICE, "siocgifxmedia(%s) failed: %s", + if_name, + strerror(errno)); } goto done; } @@ -1324,16 +1314,15 @@ SCBondInterfaceCopyStatus(SCBondInterfaceRef bond) int status = 0; static lacp_system zeroes = { {0, 0, 0, 0, 0, 0}}; - if (siocgifmedia(s, scan_p->ibs_if_name, &status, &active) == -1) { + if (siocgifxmedia(s, scan_p->ibs_if_name, &status, &active) == -1) { switch (errno) { case EBUSY : case ENXIO : break; default : - SCLog(TRUE, LOG_ERR, - CFSTR("siocgifmedia(%s) failed: %s"), - if_name, - strerror(errno)); + SC_log(LOG_NOTICE, "siocgifxmedia(%s) failed: %s", + if_name, + strerror(errno)); break; } } @@ -1407,7 +1396,7 @@ __bond_set_mode(int s, CFStringRef bond_if, CFNumberRef mode) { struct if_bond_req breq; struct ifreq ifr; - int mode_num; + int mode_num; mode_num = IF_BOND_MODE_LACP; if (mode != NULL) { @@ -1415,22 +1404,21 @@ __bond_set_mode(int s, CFStringRef bond_if, CFNumberRef mode) } // bond interface - bzero(&ifr, sizeof(ifr)); + memset(&ifr, 0, sizeof(ifr)); (void) _SC_cfstring_to_cstring(bond_if, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII); ifr.ifr_data = (caddr_t)&breq; - bzero(&breq, sizeof(breq)); + memset(&breq, 0, sizeof(breq)); breq.ibr_op = IF_BOND_OP_SET_MODE; breq.ibr_ibru.ibru_int_val = mode_num; if (ioctl(s, SIOCSIFBOND, (caddr_t)&ifr) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("could not set mode to %@ on bond \"%@\": %s"), - mode, - bond_if, - strerror(errno)); + SC_log(LOG_ERR, "could not set mode to %@ on bond \"%@\": %s", + mode, + bond_if, + strerror(errno)); return FALSE; } @@ -1444,7 +1432,7 @@ __bond_add_interface(int s, CFStringRef bond_if, CFStringRef interface_if) struct ifreq ifr; // bond interface - bzero(&ifr, sizeof(ifr)); + memset(&ifr, 0, sizeof(ifr)); (void) _SC_cfstring_to_cstring(bond_if, ifr.ifr_name, sizeof(ifr.ifr_name), @@ -1452,7 +1440,7 @@ __bond_add_interface(int s, CFStringRef bond_if, CFStringRef interface_if) ifr.ifr_data = (caddr_t)&breq; // new bond member - bzero(&breq, sizeof(breq)); + memset(&breq, 0, sizeof(breq)); breq.ibr_op = IF_BOND_OP_ADD_INTERFACE; (void) _SC_cfstring_to_cstring(interface_if, breq.ibr_ibru.ibru_if_name, @@ -1462,11 +1450,10 @@ __bond_add_interface(int s, CFStringRef bond_if, CFStringRef interface_if) // add new bond member if (ioctl(s, SIOCSIFBOND, (caddr_t)&ifr) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("could not add interface \"%@\" to bond \"%@\": %s"), - interface_if, - bond_if, - strerror(errno)); + SC_log(LOG_ERR, "could not add interface \"%@\" to bond \"%@\": %s", + interface_if, + bond_if, + strerror(errno)); return FALSE; } @@ -1481,7 +1468,7 @@ __bond_remove_interface(int s, CFStringRef bond_if, CFStringRef interface_if) struct ifreq ifr; // bond interface - bzero(&ifr, sizeof(ifr)); + memset(&ifr, 0, sizeof(ifr)); (void) _SC_cfstring_to_cstring(bond_if, ifr.ifr_name, sizeof(ifr.ifr_name), @@ -1489,7 +1476,7 @@ __bond_remove_interface(int s, CFStringRef bond_if, CFStringRef interface_if) ifr.ifr_data = (caddr_t)&breq; // bond member to remove - bzero(&breq, sizeof(breq)); + memset(&breq, 0, sizeof(breq)); breq.ibr_op = IF_BOND_OP_REMOVE_INTERFACE; (void) _SC_cfstring_to_cstring(interface_if, breq.ibr_ibru.ibru_if_name, @@ -1499,11 +1486,10 @@ __bond_remove_interface(int s, CFStringRef bond_if, CFStringRef interface_if) // remove bond member if (ioctl(s, SIOCSIFBOND, (caddr_t)&ifr) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("could not remove interface \"%@\" from bond \"%@\": %s"), - interface_if, - bond_if, - strerror(errno)); + SC_log(LOG_ERR, "could not remove interface \"%@\" from bond \"%@\": %s", + interface_if, + bond_if, + strerror(errno)); return FALSE; } @@ -1652,7 +1638,7 @@ _SCBondInterfaceUpdateConfiguration(SCPreferencesRef prefs) a_bond = CFArrayGetValueAtIndex(active, j); a_bond_if = SCNetworkInterfaceGetBSDName(a_bond); a_bond_interfaces = SCBondInterfaceGetMemberInterfaces(a_bond); - a_bond_mode = SCBondInterfaceGetMode(a_bond); + a_bond_mode = SCBondInterfaceGetMode(a_bond); a_count = (a_bond_interfaces != NULL) ? CFArrayGetCount(a_bond_interfaces) : 0; if (CFEqual(c_bond_if, a_bond_if)) { diff --git a/src/configd/SystemConfiguration.fproj/BridgeConfiguration.c b/src/configd/SystemConfiguration.fproj/BridgeConfiguration.c index ee16a6905..e410d8e28 100644 --- a/src/configd/SystemConfiguration.fproj/BridgeConfiguration.c +++ b/src/configd/SystemConfiguration.fproj/BridgeConfiguration.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2009-2014 Apple Inc. All rights reserved. + * Copyright (c) 2009-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@ */ @@ -32,11 +32,8 @@ #include #include -#include #include "SCNetworkConfigurationInternal.h" #include "SCPreferencesInternal.h" -#include -#include #include #include @@ -67,7 +64,7 @@ inet_dgram_socket() s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); } return s; @@ -83,14 +80,14 @@ ifbifconf_copy(int s, const char * ifname) struct ifdrv ifd; uint32_t len = sizeof(struct ifbreq) * 16; - bzero(&ifd, sizeof(ifd)); - strncpy(ifd.ifd_name, ifname, sizeof(ifd.ifd_name)); + memset(&ifd, 0, sizeof(ifd)); + strlcpy(ifd.ifd_name, ifname, sizeof(ifd.ifd_name)); ifd.ifd_cmd = BRDGGIFS; buflen = sizeof(struct ifbifconf) + len; buf = malloc(buflen); while (buf != NULL) { - bzero(buf, buflen); + memset(buf, 0, buflen); ibc_p = (struct ifbifconf *)buf; ibc_p->ifbic_len = len; ibc_p->ifbic_buf = buf + sizeof(*ibc_p); @@ -139,7 +136,7 @@ add_interface(CFMutableArrayRef *interfaces, CFStringRef if_name, SCPreferencesR } if (interface == NULL) { interface = _SCNetworkInterfaceCreateWithBSDName(NULL, if_name, - kIncludeNoVirtualInterfaces); + kIncludeNoVirtualInterfaces); } if (interface != NULL) { @@ -249,17 +246,15 @@ SCBridgeInterfaceCopyAll(SCPreferencesRef prefs) SCPreferencesRef ni_prefs; CFStringRef path; - if ((prefs == NULL) || - (__SCPreferencesUsingDefaultPrefs(prefs) == TRUE)) { + if (__SCPreferencesUsingDefaultPrefs(prefs)) { ni_prefs = NULL; - } - else { + } else { ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs); } context.bridges = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); context.prefs = prefs; context.ni_prefs = ni_prefs; - + path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/%@/%@"), @@ -355,7 +350,7 @@ SCBridgeInterfaceCopyAvailableMemberInterfaces(SCPreferencesRef prefs) } // identify available interfaces - interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(); + interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(FALSE); if (interfaces != NULL) { CFIndex i; CFIndex n; @@ -399,7 +394,7 @@ _SCBridgeInterfaceCopyActive(void) if (getifaddrs(&ifap) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, CFSTR("getifaddrs() failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno)); return NULL; } @@ -444,10 +439,9 @@ _SCBridgeInterfaceCopyActive(void) continue; } _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("ifbifconf_copy(%s) failed: %s"), - ifp->ifa_name, - strerror(errno)); + SC_log(LOG_NOTICE, "ifbifconf_copy(%s) failed: %s", + ifp->ifa_name, + strerror(errno)); CFRelease(bridges); bridges = NULL; goto done; @@ -460,10 +454,8 @@ _SCBridgeInterfaceCopyActive(void) // add member interfaces if (ibc_p->ifbic_len > 0) { - int i; - // iterate over each member interface - for (i = 0; i < ibc_p->ifbic_len / sizeof(struct ifbreq); i++) { + for (size_t i = 0; i < ibc_p->ifbic_len / sizeof(struct ifbreq); i++) { struct ifbreq *ibr_p; CFStringRef member; @@ -711,15 +703,36 @@ SCBridgeInterfaceSetMemberInterfaces(SCBridgeInterfaceRef bridge, CFArrayRef mem return FALSE; } - if ((members != NULL) && !isA_CFArray(members)) { - _SCErrorSet(kSCStatusInvalidArgument); - return FALSE; + if (members != NULL) { + CFIndex n_members; + + if (!isA_CFArray(members)) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + + n_members = CFArrayGetCount(members); + for (CFIndex i = 0; i < n_members; i++) { + SCNetworkInterfaceRef member; + CFStringRef memberName; + + member = CFArrayGetValueAtIndex(members, i); + if (!isA_SCNetworkInterface(member)) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + + memberName = SCNetworkInterfaceGetBSDName(member); + if (memberName == NULL) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + } } if (interfacePrivate->prefs != NULL) { CFArrayRef available; CFArrayRef current; - CFIndex i; CFIndex n_available; CFIndex n_current; CFIndex n_members; @@ -732,7 +745,7 @@ SCBridgeInterfaceSetMemberInterfaces(SCBridgeInterfaceRef bridge, CFArrayRef mem n_available = (available != NULL) ? CFArrayGetCount(available) : 0; n_members = (members != NULL) ? CFArrayGetCount(members) : 0; - for (i = 0; i < n_members; i++) { + for (CFIndex i = 0; i < n_members; i++) { SCNetworkInterfaceRef member; member = CFArrayGetValueAtIndex(members, i); @@ -936,7 +949,7 @@ __bridge_add_interface(int s, CFStringRef bridge_if, CFStringRef interface_if) struct ifdrv ifd; // bridge interface - bzero(&ifd, sizeof(ifd)); + memset(&ifd, 0, sizeof(ifd)); (void) _SC_cfstring_to_cstring(bridge_if, ifd.ifd_name, sizeof(ifd.ifd_name), @@ -946,7 +959,7 @@ __bridge_add_interface(int s, CFStringRef bridge_if, CFStringRef interface_if) ifd.ifd_data = (caddr_t)&breq; // new bridge member - bzero(&breq, sizeof(breq)); + memset(&breq, 0, sizeof(breq)); (void) _SC_cfstring_to_cstring(interface_if, breq.ifbr_ifsname, sizeof(breq.ifbr_ifsname), @@ -955,14 +968,14 @@ __bridge_add_interface(int s, CFStringRef bridge_if, CFStringRef interface_if) // add new bridge member if (ioctl(s, SIOCSDRVSPEC, (caddr_t)&ifd) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("could not add interface \"%@\" to bridge \"%@\": %s"), - interface_if, - bridge_if, - strerror(errno)); + SC_log(LOG_ERR, "could not add interface \"%@\" to bridge \"%@\": %s", + interface_if, + bridge_if, + strerror(errno)); return FALSE; } + SC_log(LOG_INFO, "%@: added bridge member: %@", bridge_if, interface_if); return TRUE; } @@ -974,7 +987,7 @@ __bridge_remove_interface(int s, CFStringRef bridge_if, CFStringRef interface_if struct ifdrv ifd; // bridge interface - bzero(&ifd, sizeof(ifd)); + memset(&ifd, 0, sizeof(ifd)); (void) _SC_cfstring_to_cstring(bridge_if, ifd.ifd_name, sizeof(ifd.ifd_name), @@ -984,7 +997,7 @@ __bridge_remove_interface(int s, CFStringRef bridge_if, CFStringRef interface_if ifd.ifd_data = (caddr_t)&breq; // bridge member to remove - bzero(&breq, sizeof(breq)); + memset(&breq, 0, sizeof(breq)); (void) _SC_cfstring_to_cstring(interface_if, breq.ifbr_ifsname, sizeof(breq.ifbr_ifsname), @@ -993,14 +1006,48 @@ __bridge_remove_interface(int s, CFStringRef bridge_if, CFStringRef interface_if // remove bridge member if (ioctl(s, SIOCSDRVSPEC, (caddr_t)&ifd) == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, - CFSTR("could not add interface \"%@\" to bridge \"%@\": %s"), - interface_if, - bridge_if, - strerror(errno)); + SC_log(LOG_ERR, "could not remove interface \"%@\" from bridge \"%@\": %s", + interface_if, + bridge_if, + strerror(errno)); return FALSE; } + SC_log(LOG_INFO, "%@: removed bridge member: %@", bridge_if, interface_if); + return TRUE; +} + + +static Boolean +__bridge_set_mac(int s, CFStringRef bridge_if, CFDataRef macAddr) +{ + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); + (void) _SC_cfstring_to_cstring(bridge_if, + ifr.ifr_name, + sizeof(ifr.ifr_name), + kCFStringEncodingASCII); + ifr.ifr_addr.sa_len = CFDataGetLength(macAddr); + if (ifr.ifr_addr.sa_len > sizeof(ifr.ifr_addr.sa_data)) { + _SCErrorSet(kSCStatusInvalidArgument); + SC_log(LOG_ERR, "%@: maformed MAC address (%d > %lu)", + bridge_if, + ifr.ifr_addr.sa_len, + sizeof(ifr.ifr_addr.sa_data)); + return FALSE; + } + CFDataGetBytes(macAddr, CFRangeMake(0, ifr.ifr_addr.sa_len), (UInt8 *)ifr.ifr_addr.sa_data); + + if (ioctl(s, SIOCSIFLLADDR, &ifr) == -1) { + _SCErrorSet(errno); + SC_log(LOG_ERR, "%@: could not set MAC address: %s", + bridge_if, + strerror(errno)); + return FALSE; + } + + SC_log(LOG_INFO, "%@: updated MAC address: %{ private }@", bridge_if, macAddr); return TRUE; } #endif // IFT_BRIDGE @@ -1033,7 +1080,7 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) /* * remove any no-longer-configured bridge interfaces and - * any devices associated with a bridge that are no longer + * any members associated with a bridge that are no longer * associated with a bridge. */ for (i = 0; i < nActive; i++) { @@ -1075,7 +1122,7 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) CFRangeMake(0, c_count), a_interface)) { /* - * if this device is no longer part + * if this member is no longer part * of the bridge. */ if (s == -1) { @@ -1121,7 +1168,7 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) /* * add any newly-configured bridge interfaces and add any - * devices that should now be associated with the bridge. + * members that should now be associated with the bridge. */ for (i = 0; i < nConfig; i++) { SCBridgeInterfaceRef c_bridge; @@ -1130,6 +1177,7 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) CFIndex c_count; Boolean found = FALSE; CFIndex j; + Boolean setMAC = FALSE; c_bridge = CFArrayGetValueAtIndex(config, i); c_bridge_if = SCNetworkInterfaceGetBSDName(c_bridge); @@ -1149,16 +1197,13 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) if (CFEqual(c_bridge_if, a_bridge_if)) { CFIndex c; - Boolean if_list_change = FALSE; found = TRUE; - if (!_SC_CFEqual(c_bridge_interfaces, a_bridge_interfaces)) { - if_list_change = TRUE; - } - if (!if_list_change) { + if (_SC_CFEqual(c_bridge_interfaces, a_bridge_interfaces)) { break; // if no change } + if (s == -1) { s = inet_dgram_socket(); if (s == -1) { @@ -1167,13 +1212,10 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) goto done; } } - if (!if_list_change) { - break; // no if list changes - } /* - * ensure that the first device of the bridge matches, if - * not then we remove all current devices and add them + * ensure that the first member of the bridge matches, if + * not then we remove all current members and add them * back in the preferred order. */ if ((c_count > 0) && @@ -1199,11 +1241,15 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) } } - a_count = 0; // all active devices have been removed + a_count = 0; // all active members have been removed + } + + if (a_count == 0) { + setMAC = TRUE; } /* - * add any devices which are not currently associated + * add any members which are not currently associated * with the bridge interface. */ for (c = 0; c < c_count; c++) { @@ -1226,7 +1272,22 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) } /* - * if this member interface is not currently part of the bridge. + * if this is the first member interface, set the MAC address + * of the bridge. + */ + if (setMAC) { + CFDataRef macAddr; + + macAddr = _SCNetworkInterfaceGetHardwareAddress(c_interface); + if (!__bridge_set_mac(s, c_bridge_if, macAddr)) { + // if bridge MAC could not be set + ok = FALSE; + } + setMAC = FALSE; + } + + /* + * add the member interface to the bridge. */ c_interface_if = SCNetworkInterfaceGetBSDName(c_interface); if (!__bridge_add_interface(s, c_bridge_if, c_interface_if)) { @@ -1261,6 +1322,8 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) continue; } + setMAC = TRUE; + /* * add the member interfaces */ @@ -1276,6 +1339,24 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) continue; } + /* + * if this is the first member interface, set the MAC address + * of the bridge. + */ + if (setMAC) { + CFDataRef macAddr; + + macAddr = _SCNetworkInterfaceGetHardwareAddress(c_interface); + if (!__bridge_set_mac(s, c_bridge_if, macAddr)) { + // if bridge MAC could not be set + ok = FALSE; + } + setMAC = FALSE; + } + + /* + * add the member interface to the bridge. + */ c_interface_if = SCNetworkInterfaceGetBSDName(c_interface); if (!__bridge_add_interface(s, c_bridge_if, c_interface_if)) { // if member could not be added @@ -1283,7 +1364,6 @@ _SCBridgeInterfaceUpdateConfiguration(SCPreferencesRef prefs) } } } - } done : diff --git a/src/configd/SystemConfiguration.fproj/CaptiveNetwork.c b/src/configd/SystemConfiguration.fproj/CaptiveNetwork.c index 94577fe41..b6181673a 100644 --- a/src/configd/SystemConfiguration.fproj/CaptiveNetwork.c +++ b/src/configd/SystemConfiguration.fproj/CaptiveNetwork.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2009, 2010, 2012, 2013, 2015, 2018, 2019 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@ */ @@ -26,41 +26,27 @@ #include #include #include - #include - +#include #pragma mark - #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 * __loadCaptiveNetwork(void) { - static void *image = NULL; - if (NULL == image) { - const char *framework = "/System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork"; - struct stat statbuf; - const char *suffix = getenv("DYLD_IMAGE_SUFFIX"); - char path[MAXPATHLEN]; + static void *image = NULL; + static dispatch_once_t once; - strlcpy(path, framework, sizeof(path)); - if (suffix) strlcat(path, suffix, sizeof(path)); - if (0 <= stat(path, &statbuf)) { - image = dlopen(path, RTLD_LAZY | RTLD_LOCAL); - } else { - image = dlopen(framework, RTLD_LAZY | RTLD_LOCAL); - } - } - return (void *)image; -} + dispatch_once(&once, ^{ + image = _SC_dlopen("/System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork"); + }); + return image; +} Boolean CNSetSupportedSSIDs(CFArrayRef ssidArray) @@ -73,7 +59,6 @@ CNSetSupportedSSIDs(CFArrayRef ssidArray) return dyfunc ? dyfunc(ssidArray) : FALSE; } - Boolean CNMarkPortalOnline(CFStringRef interfaceName) { @@ -85,7 +70,6 @@ CNMarkPortalOnline(CFStringRef interfaceName) return dyfunc ? dyfunc(interfaceName) : FALSE; } - Boolean CNMarkPortalOffline(CFStringRef interfaceName) { @@ -108,16 +92,19 @@ CNCopySupportedInterfaces(void) return dyfunc ? dyfunc() : NULL; } - -#if TARGET_OS_IPHONE CFDictionaryRef CNCopyCurrentNetworkInfo(CFStringRef interfaceName) { +#if TARGET_OS_IPHONE && !TARGET_OS_IOSMAC 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/src/configd/SystemConfiguration.fproj/CaptiveNetwork.h b/src/configd/SystemConfiguration.fproj/CaptiveNetwork.h index 316c31bc7..36ab01e44 100644 --- a/src/configd/SystemConfiguration.fproj/CaptiveNetwork.h +++ b/src/configd/SystemConfiguration.fproj/CaptiveNetwork.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2009-2012 Apple Inc. All rights reserved. + * Copyright (c) 2009-2016, 2018, 2019 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,20 @@ * 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 +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN + /*! @header CaptiveNetwork @discussion The CaptiveNetwork API allows applications to interact @@ -71,7 +74,10 @@ __BEGIN_DECLS @result Returns TRUE if the operation succeeded, FALSE otherwise. */ Boolean -CNSetSupportedSSIDs (CFArrayRef ssidArray) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_0); +CNSetSupportedSSIDs (CFArrayRef ssidArray) + 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 @@ -83,7 +89,10 @@ CNSetSupportedSSIDs (CFArrayRef ssidArray) __OSX_AVAILABLE_STARTING(__MAC_10_8, @result Returns TRUE if the operation succeeded, FALSE otherwise. */ Boolean -CNMarkPortalOnline (CFStringRef interfaceName) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_0); +CNMarkPortalOnline (CFStringRef interfaceName) + 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 @@ -93,8 +102,10 @@ CNMarkPortalOnline (CFStringRef interfaceName) __OSX_AVAILABLE_STARTING(__MAC_1 @result Returns TRUE if the operation succeeded, FALSE otherwise. */ Boolean -CNMarkPortalOffline (CFStringRef interfaceName) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_0); - +CNMarkPortalOffline (CFStringRef interfaceName) + 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 @@ -103,32 +114,48 @@ CNMarkPortalOffline (CFStringRef interfaceName) __OSX_AVAILABLE_STARTING(__MAC_ Returns NULL if an error was encountered. You MUST release the returned value. */ -CFArrayRef -CNCopySupportedInterfaces (void) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_1); +CFArrayRef __nullable +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 - @discussion Returns the Network Info for the specified interface. - For example, Network Info dictionary will contain the following - keys, and values: + @discussion Returns the network information for the specified interface when the requesting application meets one of following 3 requirements -. + 1. application is using CoreLocation API and has user's authorization to access location. + 2. application has used NEHotspotConfiguration API to configure the current Wi-Fi network. + 3. application has active VPN configurations installed. + + - An application that is linked against iOS 12.0 SDK and above must have the "com.apple.developer.networking.wifi-info" entitlement. + - An application will receive a pseudo network information if it is linked against an SDK before iOS 13.0, and if it fails to meet any of the + above 3 requirements. + - An application will receive NULL if it is linked against iOS 13.0 SDK or above, and if it fails to meet any of the above 3 requirements.. + + Network Information dictionary will contain the following keys, and values:
 	@textblock
 	Keys                      : Values
@@ -138,14 +165,21 @@ extern const CFStringRef kCNNetworkInfoKeyBSSID			__OSX_AVAILABLE_STARTING(__MAC
 	kCNNetworkInfoKeyBSSID    : CFStringRef
 	@/textblock
 	
+ + Pseudo network information will contain "Wi-Fi" SSID and "00:00:00:00:00:00" BSSID. For China region, the SSID will be "WLAN". @param interfaceName Name of the interface you are interested in - @result Network Info dictionary associated with the interface. + @result Network Information dictionary associated with the interface. Returns NULL if an error was encountered. You MUST release the returned value. */ -CFDictionaryRef -CNCopyCurrentNetworkInfo (CFStringRef interfaceName) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_1); +CFDictionaryRef __nullable +CNCopyCurrentNetworkInfo (CFStringRef interfaceName) + API_AVAILABLE(ios(4.1)) + SPI_AVAILABLE(macos(10.6), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS +CF_ASSUME_NONNULL_END +CF_IMPLICIT_BRIDGING_DISABLED + #endif /* _CAPTIVENETWORK_H */ diff --git a/src/configd/SystemConfiguration.fproj/DHCP.c b/src/configd/SystemConfiguration.fproj/DHCP.c index aaf1ba0d5..88b8628dc 100644 --- a/src/configd/SystemConfiguration.fproj/DHCP.c +++ b/src/configd/SystemConfiguration.fproj/DHCP.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001, 2003-2005, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2001, 2003-2005, 2011, 2013, 2015, 2017 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@ */ @@ -101,7 +101,7 @@ S_application_path(CFStringRef applicationID) Boolean DHCPClientPreferencesSetApplicationOptions(CFStringRef applicationID, - UInt8 * options, + const UInt8 * options, CFIndex count) { CFMutableDictionaryRef dict = NULL; @@ -514,7 +514,7 @@ main(int argc, char * argv[]) printed = FALSE; } } - if (printed == FALSE) { + if (!printed) { print_data((void *)CFDataGetBytePtr(option), len); } if (serviceID) @@ -592,19 +592,13 @@ main(int argc, char * argv[]) count = argc - 3; options = malloc(count); - if (options == NULL) { - fprintf(stderr, "malloc failed %s\n", - strerror(errno)); - exit(1); - } for (i = 0; i < count; i++) { options[i] = atoi(argv[3 + i]); } } app_id = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), argv[2]); - if (DHCPClientPreferencesSetApplicationOptions(app_id, options, - count) == FALSE) { + if (!DHCPClientPreferencesSetApplicationOptions(app_id, options, count) { printf("operation failed\n"); } if (options) { diff --git a/src/configd/SystemConfiguration.fproj/DHCPClientPreferences.h b/src/configd/SystemConfiguration.fproj/DHCPClientPreferences.h index cac5fb266..e3fab4070 100644 --- a/src/configd/SystemConfiguration.fproj/DHCPClientPreferences.h +++ b/src/configd/SystemConfiguration.fproj/DHCPClientPreferences.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001, 2004, 2005, 2008 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,20 +17,20 @@ * 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 +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN + /*! @header DHCPClientPreferences @discussion The DHCPClientPreferences API allows applications to get and update DHCP preferences. @@ -54,9 +54,9 @@ __BEGIN_DECLS */ Boolean -DHCPClientPreferencesSetApplicationOptions (CFStringRef applicationID, - UInt8 *options, - CFIndex count) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +DHCPClientPreferencesSetApplicationOptions (CFStringRef applicationID, + const UInt8 * __nullable options, + CFIndex count) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function DHCPClientPreferencesCopyApplicationOptions @@ -71,11 +71,13 @@ DHCPClientPreferencesSetApplicationOptions (CFStringRef applicationID, When you are finished, use free() to release a non-NULL return value. */ -UInt8 * +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 -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ +CF_ASSUME_NONNULL_END +CF_IMPLICIT_BRIDGING_DISABLED + #endif /* _DHCPCLIENTPREFERENCES_H */ diff --git a/src/configd/SystemConfiguration.fproj/DeviceOnHold.c b/src/configd/SystemConfiguration.fproj/DeviceOnHold.c deleted file mode 100644 index 5b1f4372a..000000000 --- a/src/configd/SystemConfiguration.fproj/DeviceOnHold.c +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Copyright (c) 2002-2005 Apple Computer, 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 - * - * May 29, 2002 Roger Smith - * - initial revision - */ - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include "dy_framework.h" - -#include "moh_msg.h" -#include "moh.h" -#include "DeviceOnHold.h" - - -#define kIODeviceSupportsHoldKey "V92Modem" - - -typedef struct { - - /* base CFType information */ - CFRuntimeBase cfBase; - - /* device name (e.g. "modem") */ - CFStringRef name; - - int sock; - -} DeviceOnHoldPrivate, *DeviceOnHoldPrivateRef; - - -static CFStringRef -__DeviceOnHoldCopyDescription(CFTypeRef cf) -{ - CFAllocatorRef allocator = CFGetAllocator(cf); - CFMutableStringRef result; - - result = CFStringCreateMutable(allocator, 0); - CFStringAppendFormat(result, NULL, CFSTR(" {\n"), cf, allocator); - CFStringAppendFormat(result, NULL, CFSTR("}")); - - return result; -} - - -static void -__DeviceOnHoldDeallocate(CFTypeRef cf) -{ - DeviceOnHoldPrivateRef DeviceOnHoldPrivate = (DeviceOnHoldPrivateRef)cf; - - /* release resources */ - if (DeviceOnHoldPrivate->name) CFRelease(DeviceOnHoldPrivate->name); - if (DeviceOnHoldPrivate->sock != -1) { - - } - - return; -} - - -static CFTypeID __kDeviceOnHoldTypeID = _kCFRuntimeNotATypeID; - - -static const CFRuntimeClass __DeviceOnHoldClass = { - 0, // version - "DeviceOnHold", // className - NULL, // init - NULL, // copy - __DeviceOnHoldDeallocate, // dealloc - NULL, // equal - NULL, // hash - NULL, // copyFormattingDesc - __DeviceOnHoldCopyDescription // copyDebugDesc -}; - - -static pthread_once_t initialized = PTHREAD_ONCE_INIT; - -static void -__DeviceOnHoldInitialize(void) -{ - __kDeviceOnHoldTypeID = _CFRuntimeRegisterClass(&__DeviceOnHoldClass); - return; -} - - -static DeviceOnHoldPrivateRef -__DeviceOnHoldCreatePrivate(CFAllocatorRef allocator) -{ - DeviceOnHoldPrivateRef devicePrivate; - uint32_t size; - - /* initialize runtime */ - pthread_once(&initialized, __DeviceOnHoldInitialize); - - /* allocate session */ - size = sizeof(DeviceOnHoldPrivate) - sizeof(CFRuntimeBase); - devicePrivate = (DeviceOnHoldPrivateRef)_CFRuntimeCreateInstance(allocator, - __kDeviceOnHoldTypeID, - size, - NULL); - if (!devicePrivate) { - return NULL; - } - - devicePrivate->name = NULL; - devicePrivate->sock = -1; - - return devicePrivate; -} - - -CFTypeID -DeviceOnHoldGetTypeID(void) { - pthread_once(&initialized, __DeviceOnHoldInitialize); /* initialize runtime */ - return __kDeviceOnHoldTypeID; -} - - -/* - * TBD: We determine whether a device supports on hold capability by looking at - * the numeric property DeviceSupportsHold (1 - yes, 0 or no property - no). For - * the Apple Dash II internal modem we also use the property V92Modem to track - * this same capability. - */ - -Boolean -IsDeviceOnHoldSupported(CFStringRef deviceName, // "modem" - CFDictionaryRef options) -{ - CFMutableDictionaryRef deviceToMatch; - uint32_t deviceSupportsHoldValue; - kern_return_t kr; - static mach_port_t masterPort = MACH_PORT_NULL; - io_iterator_t matchingServices; - CFNumberRef num; - CFMutableDictionaryRef properties; - Boolean result = FALSE; - io_service_t service; - - if (CFStringCompare(deviceName, CFSTR("modem"), 0) == kCFCompareEqualTo) { - if (masterPort == MACH_PORT_NULL) { - kr = IOMasterPort(MACH_PORT_NULL, &masterPort); - if (kr != KERN_SUCCESS) { - return FALSE; - } - } - - deviceToMatch = IOServiceMatching("InternalModemSupport"); - if (deviceToMatch == NULL) { - return FALSE; - } - - kr = IOServiceGetMatchingServices(masterPort, deviceToMatch, &matchingServices); - if (kr != KERN_SUCCESS) { - return FALSE; - } - - for ( ; (service = IOIteratorNext(matchingServices)) ; IOObjectRelease(service)) { - io_string_t path; - - kr = IORegistryEntryGetPath(service, kIOServicePlane, path); - assert( kr == KERN_SUCCESS ); - - // grab a copy of the properties - kr = IORegistryEntryCreateCFProperties(service, &properties, kCFAllocatorDefault, kNilOptions); - assert( kr == KERN_SUCCESS ); - - num = CFDictionaryGetValue(properties, CFSTR(kIODeviceSupportsHoldKey)); - if (isA_CFNumber(num)) { - CFNumberGetValue(num, kCFNumberSInt32Type, &deviceSupportsHoldValue); - if (deviceSupportsHoldValue == 1) { - result = TRUE; - } - } - - CFRelease(properties); - } - - IOObjectRelease(matchingServices); - } - - // Note: The issue for the general case is how to go from the SystemConfiguration - // dynamic store to the actual driver. The devicesupportshold property is not - // copied the either of the setup/state descriptions so the caller would need - // to know the exact driver they are searching for. - - return result; -} - - -DeviceOnHoldRef -DeviceOnHoldCreate(CFAllocatorRef allocator, - CFStringRef deviceName, // "modem" - CFDictionaryRef options) -{ - DeviceOnHoldPrivateRef devicePrivate; - int status; - - if (CFStringCompare(deviceName, CFSTR("modem"), 0) != kCFCompareEqualTo) { - return NULL; - } - - devicePrivate = __DeviceOnHoldCreatePrivate(allocator); - if (!devicePrivate) { - return NULL; - } - - status = MOHInit(&devicePrivate->sock, deviceName); - if (status != 0) { - CFRelease(devicePrivate); - return NULL; - } - - devicePrivate->name = CFStringCreateCopy(NULL, deviceName); - - return (DeviceOnHoldRef)devicePrivate; -} - - - -int32_t -DeviceOnHoldGetStatus(DeviceOnHoldRef device) -{ - DeviceOnHoldPrivateRef devicePrivate = (DeviceOnHoldPrivateRef)device; - int err; - uint32_t link = 1; - void *replyBuf; - size_t replyBufLen; - int32_t result = -1; - - if (!device) { - return -1; - } - - if (devicePrivate->sock == -1) { - return -1; - } - - err = MOHExec(devicePrivate->sock, - link, - MOH_SESSION_GET_STATUS, - NULL, - 0, - &replyBuf, - &replyBufLen); - - if (err != 0) { - return -1; - } - - if (replyBufLen == sizeof(result)) { - result = *(int32_t *)replyBuf; - } - - if (replyBuf) CFAllocatorDeallocate(NULL, replyBuf); - return result; -} - - -Boolean -DeviceOnHoldSuspend(DeviceOnHoldRef device) -{ - DeviceOnHoldPrivateRef devicePrivate = (DeviceOnHoldPrivateRef)device; - int err; - uint32_t link = 1; - void *replyBuf; - size_t replyBufLen; - Boolean result = FALSE; - - if (!device) { - return FALSE; - } - - if (devicePrivate->sock == -1) { - return FALSE; - } - - err = MOHExec(devicePrivate->sock, - link, - MOH_PUT_SESSION_ON_HOLD, - NULL, - 0, - &replyBuf, - &replyBufLen); - - if (err != 0) { - return -1; - } - - if (replyBufLen == sizeof(result)) { - result = (*(int32_t *)replyBuf) ? TRUE : FALSE; - } - - if (replyBuf) CFAllocatorDeallocate(NULL, replyBuf); - return result; -} - - -Boolean -DeviceOnHoldResume(DeviceOnHoldRef device) -{ - DeviceOnHoldPrivateRef devicePrivate = (DeviceOnHoldPrivateRef)device; - int err; - uint32_t link = 1; - void *replyBuf; - size_t replyBufLen; - Boolean result = FALSE; - - if (!device) { - return FALSE; - } - - if (devicePrivate->sock == -1) { - return FALSE; - } - - err = MOHExec(devicePrivate->sock, - link, - MOH_RESUME_SESSION_ON_HOLD,NULL, - 0, - &replyBuf, - &replyBufLen); - - if (err != 0) { - return -1; - } - - if (replyBufLen == sizeof(result)) { - result = (*(int32_t *)replyBuf) ? TRUE : FALSE; - } - - if (replyBuf) CFAllocatorDeallocate(NULL, replyBuf); - return result; -} diff --git a/src/configd/SystemConfiguration.fproj/DeviceOnHold.h b/src/configd/SystemConfiguration.fproj/DeviceOnHold.h deleted file mode 100644 index 1f1a3612f..000000000 --- a/src/configd/SystemConfiguration.fproj/DeviceOnHold.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 2002, 2004, 2005 Apple Computer, 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 _DEVICEONHOLD_H -#define _DEVICEONHOLD_H - -#include -#include - - -/*! - @header DeviceOnHold - */ - - -/*! - @enum - @discussion Returned status codes from DeviceOnHoldGetStatus() - - @constant kDeviceIdle - @constant kDeviceConnecting - @constant kDeviceDataConnectionActive - @constant kDeviceDataConnectionOnHold - @constant kDeviceDisconnecting -*/ -enum -{ - kDeviceIdle = 0, - kDeviceConnecting, - kDeviceDataConnectionActive, - kDeviceDataConnectionOnHold, - kDeviceDisconnecting -}; - - -/*! - @typedef DeviceOnHoldRef - @discussion This is the handle to a specific device - which is used by the DeviceOnHold APIs. - */ -typedef const struct __DeviceOnHoldRef * DeviceOnHoldRef; - - -__BEGIN_DECLS - - -/*! - @function IsDeviceOnHoldSupported - @discussion Determines whether a device has the capability to have - a connection placed "on hold". - - This function determines whether the device specified supports - the "on hold" capabality. - - @param devname A CFStringRef that represents the device being queried. - @param options A CFDictionaryRef of various options for the device. - @result TRUE if device supports "on hold". - - */ -Boolean -IsDeviceOnHoldSupported ( - CFStringRef devname, // e.g. "modem" - CFDictionaryRef options - ); - -/*! - @function DeviceOnHoldCreate - @discussion Creates a DeviceOnHoldRef for the specified device supports. - - This function creates a DeviceOnHoldRef handle which will be used - in all subsequent calls to the "on hold" API's. - - @param allocator A CFAllocatorRef. - @param devname A CFStringRef that represents the device being queried. - @param options A CFDictionaryRef of various options for the device. - @result DeviceOnHoldRef to pass to subsequent device hold api's. - - */ -DeviceOnHoldRef -DeviceOnHoldCreate ( - CFAllocatorRef allocator, - CFStringRef devname, // e.g. "modem" - CFDictionaryRef options - ); - - -/*! - @function DeviceOnHoldGetStatus - @discussion Returns the "on hold" status of the device. - - @param deviceRef A DeviceOnHoldRef. - @result The status of device. - - */ -int32_t -DeviceOnHoldGetStatus ( - DeviceOnHoldRef deviceRef - ); - - -/*! - @function DeviceOnHoldSuspend - @discussion Tells the device to go "on hold". - - This function will signal the deviceRef to suspend operations - - @param deviceRef A DeviceOnHoldRef. - @result Boolean if call succeeded. - - */ -Boolean -DeviceOnHoldSuspend ( - DeviceOnHoldRef deviceRef - ); - -/*! - @function DeviceOnHoldResume - @discussion Tells the device to resume. - - This function will signal the deviceRef to resume operations - - @param deviceRef A DeviceOnHoldRef. - @result Boolean if call succeeded. - - */ -Boolean -DeviceOnHoldResume ( - DeviceOnHoldRef deviceRef - ); - -__END_DECLS - -#endif /* _DEVICEONHOLD_H */ - diff --git a/src/configd/SystemConfiguration.fproj/English.lproj/Localizable.strings b/src/configd/SystemConfiguration.fproj/English.lproj/Localizable.strings deleted file mode 100644 index 49e8abe7369bcfa1883f96e0239946f2a13b9f56..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1492 zcmezWkBdQ{L5qQlL4iSwL4m=KA(f$op`0O~p@<=yL4iSup%^Tp#Gt^S!H~m{&ydWJ z$WX$N$&k;G$Dqlez);Lk!cfGJ$&km8&QJ_BN1uUpP`%)Ql8Dbd} z7`z!$87di)88R3W!7fl>NMT52C}v0oyQl!}&SC}yhBUCB6c_@)5aM5mJG~iP86p{+ z89W#q89W*M7~&bc!L$oQJXmc2n090cW(Z~oXYgkTVsJrnJH$MYxrq$L48_o}OQE3; zJQ)HQf*Dd7l2Jk%pD!RfTp66fu>kUC5Q8fN$bXk(g8{t84UCcUke5U1|tSN21AAjXb3AX zfFOF_a0cgrJaA0Fas()sxH6P5WH6*M6fuD0N*FXrHU*M8L3S!IAiD-L6d)>brDISI z3}yhuFDO()7(5yL!RgzT!I2?=!Jom0As(F4Ll|5cg1~vz86{s5>tj_02L??%>4C62 z5M==|c0x)A{3#FNM}*nCFBundleExecutable SystemConfiguration CFBundleGetInfoString - 1.14 + 1.19 CFBundleIdentifier - com.apple.SystemConfiguration + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,10 +17,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 diff --git a/src/configd/SystemConfiguration.fproj/Info.plist b/src/configd/SystemConfiguration.fproj/Info.plist index ea4c184d7..5515f5bc0 100644 --- a/src/configd/SystemConfiguration.fproj/Info.plist +++ b/src/configd/SystemConfiguration.fproj/Info.plist @@ -7,9 +7,9 @@ CFBundleExecutable SystemConfiguration CFBundleGetInfoString - 1.14 + 1.19 CFBundleIdentifier - com.apple.SystemConfiguration + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,10 +17,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.14.4 + 1.19 CFBundleSignature ???? CFBundleVersion - 1.14 + 1.19 diff --git a/src/configd/SystemConfiguration.fproj/LinkConfiguration.c b/src/configd/SystemConfiguration.fproj/LinkConfiguration.c index f75743fe0..54989bf7d 100644 --- a/src/configd/SystemConfiguration.fproj/LinkConfiguration.c +++ b/src/configd/SystemConfiguration.fproj/LinkConfiguration.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2007, 2010, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2019 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@ */ @@ -42,10 +42,7 @@ #include #include // for IPV6_MMTU -#include -#include // for SCLog() #include "SCNetworkConfigurationInternal.h" // for __SCNetworkInterfaceCreatePrivate -#include #include #include @@ -83,9 +80,7 @@ static const struct { static CFIndex findCapability(CFStringRef capability) { - CFIndex i; - - for (i = 0; i < sizeof(capabilityMappings) / sizeof(capabilityMappings[0]); i++) { + for (size_t i = 0; i < sizeof(capabilityMappings) / sizeof(capabilityMappings[0]); i++) { if (CFEqual(capability, *capabilityMappings[i].name)) { return i; } @@ -105,9 +100,9 @@ __getCapabilities(CFStringRef interfaceName, Boolean ok = FALSE; int sock = -1; - bzero((void *)&ifr, sizeof(ifr)); + memset((void *)&ifr, 0, sizeof(ifr)); if (_SC_cfstring_to_cstring(interfaceName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII) == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("could not convert interface name")); + SC_log(LOG_NOTICE, "could not convert interface name"); _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -115,7 +110,7 @@ __getCapabilities(CFStringRef interfaceName, sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); return FALSE; } @@ -126,9 +121,7 @@ __getCapabilities(CFStringRef interfaceName, case ENXIO : break; default : - SCLog(TRUE, LOG_ERR, - CFSTR("ioctl(SIOCGIFCAP) failed: %s"), - strerror(errno)); + SC_log(LOG_NOTICE, "ioctl(SIOCGIFCAP) failed: %s", strerror(errno)); } goto done; } @@ -157,7 +150,6 @@ __SCNetworkInterfaceCreateCapabilities(SCNetworkInterfaceRef interface, { int cap_available = 0; int cap_current = capability_base; - CFIndex i; CFStringRef interfaceName; if (!isA_SCNetworkInterface(interface)) { @@ -185,7 +177,7 @@ __SCNetworkInterfaceCreateCapabilities(SCNetworkInterfaceRef interface, goto done; } - for (i = 0; i < sizeof(capabilityMappings) / sizeof(capabilityMappings[0]); i++) { + for (size_t i = 0; i < sizeof(capabilityMappings) / sizeof(capabilityMappings[0]); i++) { int cap_val; CFTypeRef val; @@ -221,7 +213,6 @@ SCNetworkInterfaceCopyCapability(SCNetworkInterfaceRef interface, int cap_current = 0; int cap_available = 0; int cap_val; - CFIndex i; CFStringRef interfaceName; CFTypeRef val = NULL; @@ -244,7 +235,7 @@ SCNetworkInterfaceCopyCapability(SCNetworkInterfaceRef interface, CFMutableDictionaryRef all = NULL; // if ALL capabilities requested - for (i = 0; i < sizeof(capabilityMappings) / sizeof(capabilityMappings[0]); i++) { + for (size_t i = 0; i < sizeof(capabilityMappings) / sizeof(capabilityMappings[0]); i++) { if ((cap_available & capabilityMappings[i].val) == capabilityMappings[i].val) { if (all == NULL) { all = CFDictionaryCreateMutable(NULL, @@ -262,6 +253,8 @@ SCNetworkInterfaceCopyCapability(SCNetworkInterfaceRef interface, val = all; } else { + CFIndex i; + i = findCapability(capability); if (i == kCFNotFound) { // if unknown capability @@ -404,28 +397,28 @@ __copyMediaList(CFStringRef interfaceName) int sock = -1; ifm = (struct ifmediareq *)CFAllocatorAllocate(NULL, sizeof(struct ifmediareq), 0); - bzero((void *)ifm, sizeof(*ifm)); + memset((void *)ifm, 0, sizeof(*ifm)); if (_SC_cfstring_to_cstring(interfaceName, ifm->ifm_name, sizeof(ifm->ifm_name), kCFStringEncodingASCII) == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("could not convert interface name")); + SC_log(LOG_NOTICE, "could not convert interface name"); goto done; } sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); goto done; } - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) { -// SCLog(TRUE, LOG_DEBUG, CFSTR("ioctl(SIOCGIFMEDIA) failed: %s"), strerror(errno)); + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)ifm) == -1) { +// SC_log(LOG_NOTICE, "ioctl(SIOCGIFXMEDIA) failed: %s", strerror(errno)); goto done; } if (ifm->ifm_count > 0) { ifm->ifm_ulist = (int *)CFAllocatorAllocate(NULL, ifm->ifm_count * sizeof(int), 0); - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) { - SCLog(TRUE, LOG_DEBUG, CFSTR("ioctl(SIOCGIFMEDIA) failed: %s"), strerror(errno)); + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)ifm) == -1) { + SC_log(LOG_NOTICE, "ioctl(SIOCGIFXMEDIA) failed: %s", strerror(errno)); goto done; } } @@ -907,9 +900,9 @@ _SCNetworkInterfaceIsPhysicalEthernet(SCNetworkInterfaceRef interface) } static Boolean -__getMTULimits(char ifr_name[IFNAMSIZ], - int *mtu_min, - int *mtu_max) +__getIOMTULimits(char ifr_name[IFNAMSIZ], + int *mtu_min, + int *mtu_max) { int ifType = 0; io_iterator_t io_iter = 0; @@ -1019,9 +1012,9 @@ SCNetworkInterfaceCopyMTU(SCNetworkInterfaceRef interface, return FALSE; } - bzero((void *)&ifr, sizeof(ifr)); + memset((void *)&ifr, 0, sizeof(ifr)); if (_SC_cfstring_to_cstring(interfaceName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII) == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("could not convert interface name")); + SC_log(LOG_NOTICE, "could not convert interface name"); _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -1029,13 +1022,13 @@ SCNetworkInterfaceCopyMTU(SCNetworkInterfaceRef interface, sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno)); + SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); return FALSE; } if (ioctl(sock, SIOCGIFMTU, (caddr_t)&ifr) == -1) { _SCErrorSet(errno); -// SCLog(TRUE, LOG_DEBUG, CFSTR("ioctl(SIOCGIFMTU) failed: %s"), strerror(errno)); +// SC_log(LOG_NOTICE, "ioctl(SIOCGIFMTU) failed: %s", strerror(errno)); goto done; } @@ -1058,7 +1051,40 @@ SCNetworkInterfaceCopyMTU(SCNetworkInterfaceRef interface, *mtu_max = devmtu_p->ifdm_max; } } else { - (void)__getMTULimits(ifr.ifr_name, mtu_min, mtu_max); + ok = __getIOMTULimits(ifr.ifr_name, mtu_min, mtu_max); + if (!ok) { + CFStringRef interfaceType; + + interfaceType = SCNetworkInterfaceGetInterfaceType(interface); + if (CFEqual(interfaceType, kSCNetworkInterfaceTypeBridge)) { + CFIndex i; + CFArrayRef members; + CFIndex n; + + members = SCBridgeInterfaceGetMemberInterfaces(interface); + n = (members != NULL) ? CFArrayGetCount(members) : 0; + if (n > 1) { + if (mtu_min) *mtu_min = IF_MINMTU; + if (mtu_max) *mtu_max = IF_MAXMTU; + } + for (i = 0; i < n; i++) { + SCNetworkInterfaceRef member; + int member_mtu_min; + int member_mtu_max; + + member = CFArrayGetValueAtIndex(members, i); + ok = SCNetworkInterfaceCopyMTU(member, NULL, &member_mtu_min, &member_mtu_max); + if (ok) { + if ((mtu_min != NULL) && (*mtu_min < member_mtu_min)) { + *mtu_min = member_mtu_min; // min MTU needs to be higher + } + if ((mtu_max != NULL) && (*mtu_max > member_mtu_max)) { + *mtu_max = member_mtu_max; // max MTU needs to be lower + } + } + } + } + } } if (mtu_min != NULL) { @@ -1131,7 +1157,7 @@ SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, } if (!SCNetworkInterfaceCopyMediaOptions(interface, NULL, NULL, &available, FALSE)) { - SCLog(_sc_debug, LOG_DEBUG, CFSTR("media type / options not available")); + SC_log(LOG_INFO, "media type / options not available"); goto checked; } @@ -1145,7 +1171,7 @@ SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, !CFArrayContainsValue(subtypes, CFRangeMake(0, CFArrayGetCount(subtypes)), subtype)) { - SCLog(_sc_debug, LOG_DEBUG, CFSTR("media type not valid")); + SC_log(LOG_INFO, "media type not valid"); _SCErrorSet(kSCStatusInvalidArgument); goto checked; } @@ -1155,7 +1181,7 @@ SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, !CFArrayContainsValue(subtype_options, CFRangeMake(0, CFArrayGetCount(subtype_options)), config_options)) { - SCLog(_sc_debug, LOG_DEBUG, CFSTR("media options not valid for \"%@\""), subtype); + SC_log(LOG_INFO, "media options not valid for \"%@\"", subtype); _SCErrorSet(kSCStatusInvalidArgument); goto checked; } @@ -1182,7 +1208,7 @@ SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, } ok = TRUE; } else { - SCLog(_sc_debug, LOG_DEBUG, CFSTR("media type must be specified with options")); + SC_log(LOG_INFO, "media type must be specified with options"); _SCErrorSet(kSCStatusInvalidArgument); } @@ -1211,7 +1237,7 @@ SCNetworkInterfaceSetMTU(SCNetworkInterfaceRef interface, } if (!SCNetworkInterfaceCopyMTU(interface, NULL, &mtu_min, &mtu_max)) { - SCLog(_sc_debug, LOG_DEBUG, CFSTR("MTU bounds not available")); + SC_log(LOG_INFO, "MTU bounds not available"); return FALSE; } @@ -1241,7 +1267,7 @@ SCNetworkInterfaceSetMTU(SCNetworkInterfaceRef interface, } ok = TRUE; } else { - SCLog(_sc_debug, LOG_DEBUG, CFSTR("MTU out of range")); + SC_log(LOG_INFO, "MTU out of range"); _SCErrorSet(kSCStatusInvalidArgument); } diff --git a/src/configd/SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap b/src/configd/SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap new file mode 100644 index 000000000..2ddaf4bf2 --- /dev/null +++ b/src/configd/SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap @@ -0,0 +1,21 @@ +framework module SystemConfiguration [extern_c] [system] { + umbrella header "SystemConfiguration.h" + + export * + module * { export * } + + explicit module CaptiveNetwork { + header "CaptiveNetwork.h" + export * + } + + explicit module DHCPClientPreferences { + header "DHCPClientPreferences.h" + export * + } + + explicit module SCDynamicStoreCopyDHCPInfo { + header "SCDynamicStoreCopyDHCPInfo.h" + export * + } +} diff --git a/src/configd/SystemConfiguration.fproj/Modules/SystemConfiguration.private.modulemap b/src/configd/SystemConfiguration.fproj/Modules/SystemConfiguration.private.modulemap new file mode 100644 index 000000000..c0352767c --- /dev/null +++ b/src/configd/SystemConfiguration.fproj/Modules/SystemConfiguration.private.modulemap @@ -0,0 +1,76 @@ +framework module SystemConfiguration_Private [extern_c] [system] { + umbrella header "SCPrivate.h" + + export * + module * { export * } + + explicit module SCDPlugin { + header "SCDPlugin.h" + export * + } + + explicit module SCNetworkInterfaceProvider { + header "SCNetworkInterfaceProvider.h" + export * + } + + explicit module SCDynamicStoreCopyDHCPInfo { + header "SCDynamicStoreCopyDHCPInfo.h" + export * + } + + explicit module SCNetworkSignature { + header "SCNetworkSignature.h" + export * + } + + explicit module SCNetworkSignaturePrivate { + header "SCNetworkSignaturePrivate.h" + export * + } + + explicit module SCPreferencesPathKey { + header "SCPreferencesPathKey.h" + export * + } + + explicit module SCValidation { + header "SCValidation.h" + export * + } + + explicit module SNHelperPrivate { + header "SNHelperPrivate.h" + export * + } + + explicit module VPNConfiguration { + header "VPNConfiguration.h" + export * + } + + explicit module VPNFlow { + header "VPNFlow.h" + export * + } + + explicit module VPNPrivate { + header "VPNPrivate.h" + export * + } + + explicit module VPNTunnel { + header "VPNTunnel.h" + export * + } + + explicit module VPNTunnelPrivate { + header "VPNTunnelPrivate.h" + export * + } + + explicit module scprefs_observer { + header "scprefs_observer.h" + export * + } +} diff --git a/src/configd/SystemConfiguration.fproj/NetworkConfiguration.plist b/src/configd/SystemConfiguration.fproj/NetworkConfiguration.plist index ab5faf314..8ff839eb3 100644 --- a/src/configd/SystemConfiguration.fproj/NetworkConfiguration.plist +++ b/src/configd/SystemConfiguration.fproj/NetworkConfiguration.plist @@ -317,18 +317,16 @@ VerboseLogging 0 - PPP-PPTP + PPP-Serial ACSPEnabled - 1 - CCPEnabled - 1 + 0 CommDisplayTerminalWindow 0 CommRedialCount 1 CommRedialEnabled - 0 + 1 CommRedialInterval 5 CommUseTerminalScript @@ -338,15 +336,15 @@ DisconnectOnFastUserSwitch 1 DisconnectOnIdle - 0 + 1 DisconnectOnIdleTimer 600 DisconnectOnLogout 1 DisconnectOnSleep - 0 + 1 IPCPCompressionVJ - 0 + 1 IdleReminder 0 IdleReminderTimer @@ -354,26 +352,18 @@ LCPEchoEnabled 1 LCPEchoFailure - 15 + 4 LCPEchoInterval - 20 + 10 Logfile /var/log/ppp.log VerboseLogging 0 - PPP-Serial + PPP-VLAN ACSPEnabled 0 - CommDisplayTerminalWindow - 0 - CommRedialCount - 1 - CommRedialEnabled - 1 - CommRedialInterval - 5 CommUseTerminalScript 0 DialOnDemand @@ -381,15 +371,13 @@ DisconnectOnFastUserSwitch 1 DisconnectOnIdle - 1 + 0 DisconnectOnIdleTimer - 600 + 1800 DisconnectOnLogout 1 DisconnectOnSleep 1 - IPCPCompressionVJ - 1 IdleReminder 0 IdleReminderTimer @@ -762,7 +750,7 @@ 1 - PPP-PPTP + PPP-Serial DNS @@ -782,7 +770,7 @@ 1 - PPP-Serial + PPP-VLAN DNS diff --git a/src/configd/SystemConfiguration.fproj/SCD.c b/src/configd/SystemConfiguration.fproj/SCD.c index 146329536..3fc0dc04d 100644 --- a/src/configd/SystemConfiguration.fproj/SCD.c +++ b/src/configd/SystemConfiguration.fproj/SCD.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2008, 2010-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010-2019 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,25 +34,22 @@ #include #include #include -#include #include #include +#include +#include -#include -#include -#include "SCD.h" #include "SCDynamicStoreInternal.h" +#include "SCD.h" #include "config.h" /* MiG generated file */ -// LIBASL SPI -extern asl_object_t _asl_server_control_query(void); - +#define INSTALL_ENVIRONMENT "__OSINSTALL_ENVIRONMENT" /* framework variables */ int _sc_debug = FALSE; /* non-zero if debugging enabled */ int _sc_verbose = FALSE; /* non-zero if verbose logging enabled */ int _sc_log = TRUE; /* 0 if SC messages should be written to stdout/stderr, - 1 if SC messages should be logged w/asl(3), + 1 if SC messages should be logged w/os_log(3), 2 if SC messages should be written to stdout/stderr AND logged */ @@ -70,7 +67,6 @@ __SCThreadSpecificDataFinalize(void *arg) __SCThreadSpecificDataRef tsd = (__SCThreadSpecificDataRef)arg; if (tsd != NULL) { - if (tsd->_asl != NULL) asl_release(tsd->_asl); if (tsd->_sc_store != NULL) CFRelease(tsd->_sc_store); CFAllocatorDeallocate(kCFAllocatorSystemDefault, tsd); } @@ -96,7 +92,6 @@ __SCGetThreadSpecificData() tsd = pthread_getspecific(tsDataKey); if (tsd == NULL) { tsd = CFAllocatorAllocate(kCFAllocatorSystemDefault, sizeof(__SCThreadSpecificData), 0); - tsd->_asl = NULL; tsd->_sc_error = kSCStatusOK; tsd->_sc_store = NULL; pthread_setspecific(tsDataKey, tsd); @@ -110,10 +105,6 @@ __SCGetThreadSpecificData() #pragma mark Logging -#define kASLModule "ASLModule" -#define kASLOption "ASLOption" -#define kLoggerID "LoggerID" - #define ENABLE_SC_FORMATTING #ifdef ENABLE_SC_FORMATTING // from @@ -379,78 +370,68 @@ _SCCopyDescription(CFTypeRef cf, CFDictionaryRef formatOptions) static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; -__private_extern__ Boolean -is_install_environment() { +Boolean +_SC_isInstallEnvironment() { static dispatch_once_t once; static Boolean is_install; - + dispatch_once(&once, ^{ is_install = (getenv(INSTALL_ENVIRONMENT) != NULL); }); - + return is_install; } -static void -__SCLog(asl_object_t asl, asl_object_t msg, int level, CFStringRef formatString, va_list formatArguments) + +os_log_t +_SC_LOG_DEFAULT(void) { - CFDataRef line; - CFArrayRef lines; - CFStringRef str; + static os_log_t log = NULL; - if (asl == NULL) { - __SCThreadSpecificDataRef tsd; + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", ""); + } - tsd = __SCGetThreadSpecificData(); - if (tsd->_asl == NULL) { - tsd->_asl = asl_open(NULL, (is_install_environment() ? INSTALL_FACILITY : NULL), 0); - asl_set_filter(tsd->_asl, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); - } - asl = tsd->_asl; + return log; +} + + +os_log_type_t +_SC_syslog_os_log_mapping(int level) +{ + if (level < 0) { + level = ~level; } - -#ifdef ENABLE_SC_FORMATTING - str = _CFStringCreateWithFormatAndArgumentsAux(NULL, - _SCCopyDescription, - NULL, - formatString, - formatArguments); -#else /* ENABLE_SC_FORMATTING */ - str = CFStringCreateWithFormatAndArguments (NULL, - NULL, - formatString, - formatArguments); -#endif /* !ENABLE_SC_FORMATTING */ - if (level >= 0) { - lines = CFStringCreateArrayBySeparatingStrings(NULL, str, CFSTR("\n")); - if (lines != NULL) { - CFIndex i; - CFIndex n = CFArrayGetCount(lines); - - for (i = 0; i < n; i++) { - line = CFStringCreateExternalRepresentation(NULL, - CFArrayGetValueAtIndex(lines, i), - kCFStringEncodingUTF8, - (UInt8)'?'); - if (line) { - asl_log(asl, msg, level, "%.*s", (int)CFDataGetLength(line), CFDataGetBytePtr(line)); - CFRelease(line); - } - } - CFRelease(lines); - } - } else { - line = CFStringCreateExternalRepresentation(NULL, - str, - kCFStringEncodingUTF8, - (UInt8)'?'); - if (line) { - asl_log(asl, msg, ~level, "%.*s", (int)CFDataGetLength(line), CFDataGetBytePtr(line)); - CFRelease(line); - } + switch (level) { + case LOG_EMERG : + case LOG_ALERT : + case LOG_CRIT : + return OS_LOG_TYPE_ERROR; + + case LOG_ERR : + case LOG_WARNING : + case LOG_NOTICE : + return OS_LOG_TYPE_DEFAULT; + + case LOG_INFO : + return OS_LOG_TYPE_INFO; + + case LOG_DEBUG : + return OS_LOG_TYPE_DEBUG; } - CFRelease(str); + + return OS_LOG_TYPE_DEFAULT; +}; + +static void +__SCLog(void *ret_addr, os_log_type_t type, const char *formatString, va_list formatArguments) +{ + os_log_with_args(_SC_LOG_DEFAULT(), + type, + formatString, + formatArguments, + ret_addr); return; } @@ -458,8 +439,9 @@ __SCLog(asl_object_t asl, asl_object_t msg, int level, CFStringRef formatString, static void __SCPrint(FILE *stream, CFStringRef formatString, va_list formatArguments, Boolean trace, Boolean addNL) { - CFDataRef line; + char *line; CFStringRef str; + CFIndex usedBufLen; #ifdef ENABLE_SC_FORMATTING str = _CFStringCreateWithFormatAndArgumentsAux(NULL, @@ -474,10 +456,12 @@ __SCPrint(FILE *stream, CFStringRef formatString, va_list formatArguments, Boole formatArguments); #endif /* !ENABLE_SC_FORMATTING */ - line = CFStringCreateExternalRepresentation(NULL, - str, - kCFStringEncodingUTF8, - (UInt8)'?'); + line =_SC_cfstring_to_cstring_ext(str, + NULL, + 0, + kCFStringEncodingUTF8, + (UInt8)'?', + &usedBufLen); CFRelease(str); if (!line) { return; @@ -493,63 +477,64 @@ __SCPrint(FILE *stream, CFStringRef formatString, va_list formatArguments, Boole (void)fprintf(stream, "%2d:%02d:%02d.%03d ", tm_now.tm_hour, tm_now.tm_min, tm_now.tm_sec, tv_now.tv_usec / 1000); } - (void)fwrite((const void *)CFDataGetBytePtr(line), (size_t)CFDataGetLength(line), 1, stream); + (void)fwrite((const void *)line, usedBufLen, 1, stream); if (addNL) { (void)fputc('\n', stream); } fflush (stream); pthread_mutex_unlock(&lock); - CFRelease(line); + CFAllocatorDeallocate(NULL, line); return; } void -SCLog(Boolean condition, int level, CFStringRef formatString, ...) +__SC_Log(int level, CFStringRef format_CF, os_log_t log, os_log_type_t type, const char *format, ...) { - va_list formatArguments; - va_list formatArguments_print; - Boolean log = FALSE; - Boolean print = FALSE; - - if (!condition) { - return; - } +#pragma unused(level) + Boolean do_log = FALSE; + Boolean do_print = FALSE; + va_list args_log; + va_list args_print; /* * Note: The following are the expected values for _sc_log * * 0 if SC messages should be written to stdout/stderr - * 1 if SC messages should be logged w/asl(3) + * 1 if SC messages should be logged w/os_log(3) * 2 if SC messages should be written to stdout/stderr AND logged */ if (_sc_log > 0) { - log = TRUE; // log requested - va_start(formatArguments, formatString); + do_log = TRUE; // log requested + va_start(args_log, format); if (_sc_log > 1) { - print = TRUE; // log AND print requested - va_copy(formatArguments_print, formatArguments); + do_print = TRUE; // log AND print requested + va_copy(args_print, args_log); } } else { - print = TRUE; // print requested - va_start(formatArguments_print, formatString); + do_print = TRUE; // print requested + va_start(args_print, format); } - if (log) { - __SCLog(NULL, NULL, level, formatString, formatArguments); - va_end(formatArguments); + if (do_log) { + os_log_with_args(log, + type, + format, + args_log, + __builtin_return_address(0)); + va_end(args_log); } - if (print) { - __SCPrint((LOG_PRI(level) > LOG_NOTICE) ? stderr : stdout, - formatString, - formatArguments_print, + if (do_print) { + __SCPrint(stdout, + format_CF, + args_print, (_sc_log > 0), // trace TRUE); // add newline - va_end(formatArguments_print); + va_end(args_print); } return; @@ -557,18 +542,22 @@ SCLog(Boolean condition, int level, CFStringRef formatString, ...) void -SCLOG(asl_object_t asl, asl_object_t msg, int level, CFStringRef formatString, ...) +SCLog(Boolean condition, int level, CFStringRef formatString, ...) { va_list formatArguments; va_list formatArguments_print; Boolean log = FALSE; Boolean print = FALSE; + if (!condition) { + return; + } + /* * Note: The following are the expected values for _sc_log * * 0 if SC messages should be written to stdout/stderr - * 1 if SC messages should be logged w/asl(3) + * 1 if SC messages should be logged w/os_log(3) * 2 if SC messages should be written to stdout/stderr AND logged */ @@ -586,15 +575,20 @@ SCLOG(asl_object_t asl, asl_object_t msg, int level, CFStringRef formatString, . } if (log) { - __SCLog(asl, msg, level, formatString, formatArguments); + const char *__format; + + __format = CFStringGetCStringPtr(formatString, kCFStringEncodingUTF8); + if (__format != NULL) { + os_log_type_t __type; + + __type = _SC_syslog_os_log_mapping(level); + __SCLog(__builtin_return_address(0), __type, __format, formatArguments); + } va_end(formatArguments); } if (print) { - if (level < 0) { - level = ~level; - } - __SCPrint((level > ASL_LEVEL_NOTICE) ? stderr : stdout, + __SCPrint((LOG_PRI(level) > LOG_NOTICE) ? stderr : stdout, formatString, formatArguments_print, (_sc_log > 0), // trace @@ -623,360 +617,6 @@ SCPrint(Boolean condition, FILE *stream, CFStringRef formatString, ...) } -void -SCTrace(Boolean condition, FILE *stream, CFStringRef formatString, ...) -{ - va_list formatArguments; - - if (!condition) { - return; - } - - va_start(formatArguments, formatString); - __SCPrint(stream, formatString, formatArguments, TRUE, FALSE); - va_end(formatArguments); - - return; -} - - -#pragma mark - -#pragma mark ASL Functions - - -static CFTypeID __kSCLoggerTypeID = _kCFRuntimeNotATypeID; - -typedef enum { - kModuleStatusEnabled, - kModuleStatusDisabled, - kModuleStatusDoesNotExist -} ModuleStatus; - -struct SCLogger -{ - CFRuntimeBase cf_base; - - char * loggerID; // LoggerID - SCLoggerFlags flags; - asl_object_t aslc; - asl_object_t aslm; - ModuleStatus module_status; - pthread_mutex_t lock; -}; - - -static void __SCLoggerDeallocate(CFTypeRef cf); -static const CFRuntimeClass __SCLoggerClass = { - 0, /* version */ - "SCLogger", /* className */ - NULL, /* init */ - NULL, /* copy */ - __SCLoggerDeallocate, /* deallocate */ - NULL, /* equal */ - NULL, /* hash */ - NULL, /* copyFormattingDesc */ - NULL /* copyDebugDesc */ -}; - - -#define DATETIMEBUFFERSIZE 32 - - -static pthread_once_t registerLoggerOnce = PTHREAD_ONCE_INIT; -static pthread_once_t defaultLoggerOnce = PTHREAD_ONCE_INIT; - -typedef enum { - kLoggerASLControlEnableModule, - kLoggerASLControlDisableModule, - kLoggerASLControlLogFileCheckpoint -} LoggerASLControl; - -static SCLoggerRef defaultLogger = NULL; -static SCLoggerRef __SCLoggerCreate(void); -static void __SCLoggerDefaultLoggerInit(); -static SCLoggerRef SCLoggerGetDefaultLogger(); -static void SCLoggerSetLoggerID(SCLoggerRef logger, CFStringRef loggerID); -static void SCLoggerSendMessageToModuleOnly(SCLoggerRef logger, Boolean isPrivate); -static void SCLoggerSendASLControl(SCLoggerRef logger, LoggerASLControl control); -static ModuleStatus GetModuleStatus(const char * loggerID); - -static void -__SCLoggerRegisterClass(void) -{ - if (__kSCLoggerTypeID == _kCFRuntimeNotATypeID) { - __kSCLoggerTypeID = _CFRuntimeRegisterClass(&__SCLoggerClass); - } - return; -} - -static SCLoggerRef -__SCLoggerAllocate(CFAllocatorRef allocator) -{ - SCLoggerRef state; - int size; - - pthread_once(®isterLoggerOnce, __SCLoggerRegisterClass); - - size = sizeof(*state) - sizeof(CFRuntimeBase); - state = (SCLoggerRef) _CFRuntimeCreateInstance(allocator, - __kSCLoggerTypeID, - size, - NULL); - bzero((void*)state + sizeof(CFRuntimeBase), size); - return (state); -} - -static void -__SCLoggerDeallocate(CFTypeRef cf) -{ - SCLoggerRef logger = (SCLoggerRef)cf; - - if (logger != NULL) { - // Rotate on close behavior - if (logger->module_status != kModuleStatusDoesNotExist) { - SCLoggerSendASLControl(logger, - kLoggerASLControlLogFileCheckpoint); - } - if (logger->loggerID != NULL) { - CFAllocatorDeallocate(NULL, logger->loggerID); - logger->loggerID = NULL; - } - if (logger->aslm != NULL) { - asl_release(logger->aslm); - logger->aslm = NULL; - } - if (logger->aslc != NULL) { - asl_release(logger->aslc); - logger->aslc = NULL; - } - } -} - -static SCLoggerRef -__SCLoggerCreate(void) -{ - SCLoggerRef tempLogger = NULL; - - tempLogger = __SCLoggerAllocate(kCFAllocatorDefault); - tempLogger->loggerID = NULL; - tempLogger->flags = kSCLoggerFlagsDefault; - tempLogger->aslc = asl_open(NULL, (is_install_environment() ? INSTALL_FACILITY : NULL), ASL_OPT_NO_DELAY); - tempLogger->aslm = asl_new(ASL_TYPE_MSG); - pthread_mutex_init(&(tempLogger->lock), NULL); - tempLogger->module_status = kModuleStatusDoesNotExist; - - return tempLogger; -} - -SCLoggerFlags -SCLoggerGetFlags(SCLoggerRef logger) -{ - return logger->flags; -} - -void -SCLoggerSetFlags(SCLoggerRef logger, SCLoggerFlags flags) -{ - if (logger == defaultLogger) { - return; - } - pthread_mutex_lock(&(logger->lock)); - if (flags != kSCLoggerFlagsNone) { - logger->module_status = GetModuleStatus(logger->loggerID); - if (logger->module_status == kModuleStatusDoesNotExist) { - goto done; - } - if ((flags & kSCLoggerFlagsFile) != 0) { - if ((logger->flags & kSCLoggerFlagsFile) == 0) { - // Enable the module if disabled - if (logger->module_status == kModuleStatusDisabled) { - SCLoggerSendASLControl(logger, kLoggerASLControlEnableModule); - } - // Setting ASL Filter level to debug - asl_set_filter(logger->aslc, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); - if (logger->loggerID != NULL) { - asl_set(logger->aslm, kLoggerID, - logger->loggerID); - } - } - } - else if ((logger->flags & kSCLoggerFlagsFile) != 0) { - asl_unset(logger->aslm, kLoggerID); - asl_set_filter(logger->aslc, ASL_FILTER_MASK_UPTO(ASL_LEVEL_NOTICE)); - SCLoggerSendMessageToModuleOnly(logger, false); - } - if ((flags & kSCLoggerFlagsDefault) != 0) { - if ((logger->flags & kSCLoggerFlagsDefault) == 0) { - SCLoggerSendMessageToModuleOnly(logger, false); - } - } - else if ((logger->flags & kSCLoggerFlagsDefault) != 0) { - SCLoggerSendMessageToModuleOnly(logger, true); - } - } - logger->flags = flags; - done: - pthread_mutex_unlock(&(logger->lock)); -} - - -static void -SCLoggerSetLoggerID(SCLoggerRef logger, CFStringRef loggerID) -{ - logger->loggerID - = _SC_cfstring_to_cstring(loggerID, NULL, 0, - kCFStringEncodingUTF8); - // Enable the module if disabled - logger->module_status = GetModuleStatus(logger->loggerID); - if (logger->module_status == kModuleStatusDisabled) { - SCLoggerSendASLControl(logger, kLoggerASLControlEnableModule); - } -} - -static ModuleStatus -GetModuleStatus(const char * loggerID) -{ - ModuleStatus moduleStatus = kModuleStatusDoesNotExist; - asl_object_t response = NULL; - const char* value = NULL; - - if (loggerID != NULL) { - response = _asl_server_control_query(); - if (response == NULL) { - goto done; - } - value = asl_get(response, loggerID); - if (value == NULL) { - moduleStatus = kModuleStatusDoesNotExist; - goto done; - } - - if (strcmp(value, "enabled") == 0) { - moduleStatus = kModuleStatusEnabled; - } - else { - moduleStatus = kModuleStatusDisabled; - } - } -done: - asl_release(response); - - return moduleStatus; -} - -static void -SCLoggerSendMessageToModuleOnly(SCLoggerRef logger, Boolean isPrivate) -{ - if (isPrivate) { - asl_set(logger->aslm, kASLModule, logger->loggerID); - } - else { - if (asl_get(logger->aslm, kASLModule) != NULL) { - asl_unset(logger->aslm, kASLModule); - } - } -} - -static void -SCLoggerSendASLControl(SCLoggerRef logger, LoggerASLControl control) -{ - SCLoggerRef defLogger = SCLoggerGetDefaultLogger(); - pthread_mutex_lock(&(defLogger->lock)); - - // this next line turns the asl_log()'s that follow into control messages - asl_set(defLogger->aslm, kASLOption, "control"); - - switch (control) { - case kLoggerASLControlEnableModule: - asl_log(defLogger->aslc, defLogger->aslm, - ASL_LEVEL_NOTICE, "@ %s enable 1", - logger->loggerID); - break; - case kLoggerASLControlDisableModule: - asl_log(defLogger->aslc, defLogger->aslm, - ASL_LEVEL_NOTICE, "@ %s enable 0", - logger->loggerID); - break; - case kLoggerASLControlLogFileCheckpoint: - asl_log(defLogger->aslc, defLogger->aslm, - ASL_LEVEL_NOTICE, "@ %s checkpoint", - logger->loggerID); - break; - default: - break; - } - - // turn off control mode - asl_unset(defLogger->aslm, kASLOption); - pthread_mutex_unlock(&defLogger->lock); - return; -} - -SCLoggerRef -SCLoggerCreate(CFStringRef loggerID) -{ - SCLoggerRef logger = NULL; - - logger = __SCLoggerCreate(); - if (loggerID != NULL) { - SCLoggerSetLoggerID(logger, loggerID); - } - SCLoggerSetFlags(logger, kSCLoggerFlagsDefault); - return logger; -} - -static void -__SCLoggerDefaultLoggerInit() -{ - if (defaultLogger == NULL) { - defaultLogger = __SCLoggerCreate(); - defaultLogger->flags = kSCLoggerFlagsDefault; - } -} - -static SCLoggerRef -SCLoggerGetDefaultLogger() -{ - pthread_once(&defaultLoggerOnce, __SCLoggerDefaultLoggerInit); - return defaultLogger; -} - -void -SCLoggerVLog(SCLoggerRef logger, int loglevel, CFStringRef formatString, - va_list args) -{ - asl_object_t aslc; - asl_object_t aslm; - - if (logger == NULL - || logger->module_status == kModuleStatusDoesNotExist) { - logger = SCLoggerGetDefaultLogger(); - } - pthread_mutex_lock(&(logger->lock)); - if (logger->flags == kSCLoggerFlagsNone) { - pthread_mutex_unlock(&(logger->lock)); - return; - } - aslc = logger->aslc; - aslm = logger->aslm; - __SCLog(aslc, aslm, loglevel, formatString, args); - pthread_mutex_unlock(&(logger->lock)); - return; -} - -void -SCLoggerLog(SCLoggerRef logger, int loglevel, CFStringRef formatString, ...) -{ - va_list args; - - va_start(args, formatString); - SCLoggerVLog(logger, loglevel, formatString, args); - va_end(args); - - return; -} - - #pragma mark - #pragma mark SC error handling / logging diff --git a/src/configd/SystemConfiguration.fproj/SCD.h b/src/configd/SystemConfiguration.fproj/SCD.h index 78a3c354b..c9feb4b7e 100644 --- a/src/configd/SystemConfiguration.fproj/SCD.h +++ b/src/configd/SystemConfiguration.fproj/SCD.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011 Apple Inc. All rights reserved. + * Copyright (c) 2011, 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,33 +17,80 @@ * 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 _SCD_H #define _SCD_H -#include +#include #include #include -#include #include typedef struct { - aslclient _asl; int _sc_error; SCDynamicStoreRef _sc_store; } __SCThreadSpecificData, *__SCThreadSpecificDataRef; - __BEGIN_DECLS + +#pragma mark - +#pragma mark [p]thread specific data + + __SCThreadSpecificDataRef __SCGetThreadSpecificData (void); + +#pragma mark - +#pragma mark ScheduleWithRunLoop/UnscheduleFromRunLoop + + +/* + * object / CFRunLoop management + */ +void +_SC_signalRunLoop (CFTypeRef obj, + CFRunLoopSourceRef rls, + CFArrayRef rlList); + +Boolean +_SC_isScheduled (CFTypeRef obj, + CFRunLoopRef runLoop, + CFStringRef runLoopMode, + CFMutableArrayRef rlList); + +void +_SC_schedule (CFTypeRef obj, + CFRunLoopRef runLoop, + CFStringRef runLoopMode, + CFMutableArrayRef rlList); + +Boolean +_SC_unschedule (CFTypeRef obj, + CFRunLoopRef runLoop, + CFStringRef runLoopMode, + CFMutableArrayRef rlList, + Boolean all); + + +#pragma mark - +#pragma mark Misc + + +char * +_SC_cfstring_to_cstring_ext (CFStringRef cfstr, + char *buf, + CFIndex bufLen, + CFStringEncoding encoding, + UInt8 lossByte, + CFIndex *usedBufLen); + __END_DECLS -#endif /* _SCD_H */ +#endif /* _SCD_H */ diff --git a/src/configd/SystemConfiguration.fproj/SCDAdd.c b/src/configd/SystemConfiguration.fproj/SCDAdd.c index 622549262..3c8650eb7 100644 --- a/src/configd/SystemConfiguration.fproj/SCDAdd.c +++ b/src/configd/SystemConfiguration.fproj/SCDAdd.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016, 2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ diff --git a/src/configd/SystemConfiguration.fproj/SCDCache.c b/src/configd/SystemConfiguration.fproj/SCDCache.c new file mode 100644 index 000000000..d3c627579 --- /dev/null +++ b/src/configd/SystemConfiguration.fproj/SCDCache.c @@ -0,0 +1,152 @@ +/* + * 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 + * + * Oct 1, 2018 Allan Nathanson + * - initial revision + */ + + +#ifdef SC_LOG_HANDLE +#include +os_log_t SC_LOG_HANDLE(void); +#endif //SC_LOG_HANDLE + +#include "SCDynamicStoreInternal.h" + + +Boolean +_SCDynamicStoreCacheIsActive(SCDynamicStoreRef store) +{ + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + + if (store == NULL) { + // sorry, you must provide a session + _SCErrorSet(kSCStatusNoStoreSession); + return FALSE; + } + + return storePrivate->cache_active; +} + + +static void +__SCDynamicStoreCacheRelease(SCDynamicStoreRef store) +{ + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + + if (storePrivate->cached_keys != NULL) { + CFRelease(storePrivate->cached_keys); + storePrivate->cached_keys = NULL; + } + if (storePrivate->cached_set != NULL) { + CFRelease(storePrivate->cached_set); + storePrivate->cached_set = NULL; + } + if (storePrivate->cached_removals != NULL) { + CFRelease(storePrivate->cached_removals); + storePrivate->cached_removals = NULL; + } + if (storePrivate->cached_notifys != NULL) { + CFRelease(storePrivate->cached_notifys); + storePrivate->cached_notifys = NULL; + } + + return; +} + + +Boolean +_SCDynamicStoreCacheOpen(SCDynamicStoreRef store) +{ + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + + if (store == NULL) { + // sorry, you must provide a session + _SCErrorSet(kSCStatusNoStoreSession); + return FALSE; + } + + __SCDynamicStoreCacheRelease(store); // if we are already using the cache, start clean + storePrivate->cache_active = TRUE; + + return TRUE; +} + + +Boolean +_SCDynamicStoreCacheCommitChanges(SCDynamicStoreRef store) +{ + Boolean ok = TRUE; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + + if (store == NULL) { + // sorry, you must provide a session + _SCErrorSet(kSCStatusNoStoreSession); + return FALSE; + } + + if (!storePrivate->cache_active) { + // if not using the cache + _SCErrorSet(kSCStatusFailed); + return FALSE; + } + + if ((storePrivate->cached_set != NULL) || + (storePrivate->cached_removals != NULL) || + (storePrivate->cached_notifys != NULL)) { + ok = SCDynamicStoreSetMultiple(store, + storePrivate->cached_set, + storePrivate->cached_removals, + storePrivate->cached_notifys); + __SCDynamicStoreCacheRelease(store); + } + + return ok; +} + + +Boolean +_SCDynamicStoreCacheClose(SCDynamicStoreRef store) +{ + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + + if (store == NULL) { + // sorry, you must provide a session + _SCErrorSet(kSCStatusNoStoreSession); + return FALSE; + } + + if (!storePrivate->cache_active) { + // if not using the cache + _SCErrorSet(kSCStatusFailed); + return FALSE; + } + + __SCDynamicStoreCacheRelease(store); + storePrivate->cache_active = FALSE; + + return TRUE; +} diff --git a/src/configd/SystemConfiguration.fproj/SCDConsoleUser.c b/src/configd/SystemConfiguration.fproj/SCDConsoleUser.c index 58cb1c6a3..35a2cc5bf 100644 --- a/src/configd/SystemConfiguration.fproj/SCDConsoleUser.c +++ b/src/configd/SystemConfiguration.fproj/SCDConsoleUser.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009, 2011, 2015 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -152,7 +152,7 @@ SCDynamicStoreCopyConsoleInformation(SCDynamicStoreRef store) info = CFDictionaryGetValue(dict, kSCPropUsersConsoleSessionInfo); info = isA_CFArray(info); - if (!info) { + if (info == NULL) { _SCErrorSet(kSCStatusNoKey); goto done; } diff --git a/src/configd/SystemConfiguration.fproj/SCDGet.c b/src/configd/SystemConfiguration.fproj/SCDGet.c index 06360505c..3f6b72d4c 100644 --- a/src/configd/SystemConfiguration.fproj/SCDGet.c +++ b/src/configd/SystemConfiguration.fproj/SCDGet.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016-2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ @@ -110,27 +105,29 @@ SCDynamicStoreCopyMultiple(SCDynamicStoreRef store, goto retry; } - /* clean up */ - if (xmlKeys != NULL) CFRelease(xmlKeys); - if (xmlPatterns != NULL) CFRelease(xmlPatterns); - if (sc_status != kSCStatusOK) { if (xmlDictRef != NULL) { (void) vm_deallocate(mach_task_self(), (vm_address_t)xmlDictRef, xmlDictLen); } _SCErrorSet(sc_status); - return NULL; + goto done; } /* un-serialize the dictionary */ if (!_SCUnserialize((CFPropertyListRef *)&dict, NULL, xmlDictRef, xmlDictLen)) { _SCErrorSet(kSCStatusFailed); - return NULL; + goto done; } expDict = _SCUnserializeMultiple(dict); CFRelease(dict); + done: + + /* clean up */ + if (xmlKeys != NULL) CFRelease(xmlKeys); + if (xmlPatterns != NULL) CFRelease(xmlPatterns); + return expDict; } @@ -164,6 +161,29 @@ SCDynamicStoreCopyValue(SCDynamicStoreRef store, CFStringRef key) return NULL; /* you must have an open session to play */ } + if (storePrivate->cache_active) { + if ((storePrivate->cached_set != NULL) && + CFDictionaryGetValueIfPresent(storePrivate->cached_set, key, (const void **)&data)) { + // if we have "set" a new value + return (CFRetain(data)); + } + + if ((storePrivate->cached_removals != NULL) && + CFArrayContainsValue(storePrivate->cached_removals, + CFRangeMake(0, CFArrayGetCount(storePrivate->cached_removals)), + key)) { + // if we have "removed" the key + _SCErrorSet(kSCStatusNoKey); + return NULL; + } + + if ((storePrivate->cached_keys != NULL) && + CFDictionaryGetValueIfPresent(storePrivate->cached_keys, key, (const void **)&data)) { + // if we have a cached value + return (CFRetain(data)); + } + } + /* serialize the key */ if (!_SCSerializeString(key, &utfKey, (void **)&myKeyRef, &myKeyLen)) { _SCErrorSet(kSCStatusFailed); @@ -205,5 +225,15 @@ SCDynamicStoreCopyValue(SCDynamicStoreRef store, CFStringRef key) return NULL; } + if (storePrivate->cache_active && (data != NULL)) { + if (storePrivate->cached_keys == NULL) { + storePrivate->cached_keys = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + CFDictionarySetValue(storePrivate->cached_keys, key, data); + } + return data; } diff --git a/src/configd/SystemConfiguration.fproj/SCDHostName.c b/src/configd/SystemConfiguration.fproj/SCDHostName.c index ed5989661..7fabbb656 100644 --- a/src/configd/SystemConfiguration.fproj/SCDHostName.c +++ b/src/configd/SystemConfiguration.fproj/SCDHostName.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2011, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2011, 2013-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,16 +34,32 @@ #include #include // for __CFStringGetUserDefaultEncoding -#include -#include -#include +#include "SCPreferencesInternal.h" #include "dy_framework.h" #pragma mark ComputerName -__private_extern__ CFStringRef +static CFStringEncoding +getNameEncoding(CFDictionaryRef dict) +{ + CFStringEncoding encoding; + CFNumberRef num; + + if (!CFDictionaryGetValueIfPresent(dict, + kSCPropSystemComputerNameEncoding, + (const void **)&num) || + !isA_CFNumber(num) || + !CFNumberGetValue(num, kCFNumberSInt32Type, &encoding)) { + encoding = CFStringGetSystemEncoding(); + } + + return encoding; +} + + +CFStringRef _SCPreferencesCopyComputerName(SCPreferencesRef prefs, CFStringEncoding *nameEncoding) { @@ -78,15 +94,7 @@ _SCPreferencesCopyComputerName(SCPreferencesRef prefs, } if (nameEncoding != NULL) { - CFNumberRef num; - - num = CFDictionaryGetValue(dict, - kSCPropSystemComputerNameEncoding); - if (isA_CFNumber(num)) { - CFNumberGetValue(num, kCFNumberIntType, nameEncoding); - } else { - *nameEncoding = CFStringGetSystemEncoding(); - } + *nameEncoding = getNameEncoding(dict); } } @@ -140,15 +148,7 @@ SCDynamicStoreCopyComputerName(SCDynamicStoreRef store, CFRetain(name); if (nameEncoding != NULL) { - CFNumberRef num; - - num = CFDictionaryGetValue(dict, - kSCPropSystemComputerNameEncoding); - if (isA_CFNumber(num)) { - CFNumberGetValue(num, kCFNumberIntType, nameEncoding); - } else { - *nameEncoding = CFStringGetSystemEncoding(); - } + *nameEncoding = getNameEncoding(dict); } _SCErrorSet(kSCStatusOK); @@ -233,6 +233,14 @@ SCPreferencesSetComputerName(SCPreferencesRef prefs, ok = SCPreferencesPathRemoveValue(prefs, path); } + if (ok) { + if (name != NULL) { + SC_log(LOG_NOTICE, "attempting to set the computer name to \"%@\"", name); + } else { + SC_log(LOG_NOTICE, "attempting to reset the computer name"); + } + } + CFRelease(path); CFRelease(newDict); @@ -325,6 +333,14 @@ SCPreferencesSetHostName(SCPreferencesRef prefs, ok = SCPreferencesPathRemoveValue(prefs, path); } + if (ok) { + if (name != NULL) { + SC_log(LOG_NOTICE, "attempting to set the host name to \"%@\"", name); + } else { + SC_log(LOG_NOTICE, "attempting to reset the host name"); + } + } + CFRelease(path); CFRelease(newDict); @@ -336,7 +352,7 @@ SCPreferencesSetHostName(SCPreferencesRef prefs, #pragma mark LocalHostName -__private_extern__ CFStringRef +CFStringRef _SCPreferencesCopyLocalHostName(SCPreferencesRef prefs) { CFDictionaryRef dict; @@ -433,7 +449,7 @@ SCDynamicStoreCopyLocalHostName(SCDynamicStoreRef store) Boolean _SC_stringIsValidDNSName(const char *name) { - int i; + size_t i; size_t len = strlen(name); char prev = '\0'; const char *scan; @@ -459,10 +475,7 @@ _SC_stringIsValidDNSName(const char *name) } else if (isalnum(ch) == 0) { switch (ch) { case '.': - if (prev == '.') { - /* no empty labels */ - return FALSE; - } + /* a label separator */ break; case '-': /* hyphens are OK within a label */ @@ -564,6 +577,14 @@ SCPreferencesSetLocalHostName(SCPreferencesRef prefs, ok = SCPreferencesPathRemoveValue(prefs, path); } + if (ok) { + if (name != NULL) { + SC_log(LOG_NOTICE, "attempting to set the local host name to \"%@\"", name); + } else { + SC_log(LOG_NOTICE, "attempting to reset the local host name"); + } + } + CFRelease(path); CFRelease(newDict); diff --git a/src/configd/SystemConfiguration.fproj/SCDList.c b/src/configd/SystemConfiguration.fproj/SCDList.c index 154c93554..c45e9f0e0 100644 --- a/src/configd/SystemConfiguration.fproj/SCDList.c +++ b/src/configd/SystemConfiguration.fproj/SCDList.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016, 2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierAdd.c b/src/configd/SystemConfiguration.fproj/SCDNotifierAdd.c index beb136482..42e580002 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierAdd.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierAdd.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016, 2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierCancel.c b/src/configd/SystemConfiguration.fproj/SCDNotifierCancel.c index 673f2a55a..e5cacde67 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierCancel.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierCancel.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2008-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008-2011, 2015-2017, 2019 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@ */ @@ -31,20 +31,15 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ Boolean SCDynamicStoreNotifyCancel(SCDynamicStoreRef store) { - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - kern_return_t status; - int sc_status; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + kern_return_t status; + int sc_status; if (store == NULL) { /* sorry, you must provide a session */ @@ -57,8 +52,15 @@ SCDynamicStoreNotifyCancel(SCDynamicStoreRef store) /* if no notifications have been registered */ return TRUE; case Using_NotifierInformViaRunLoop : - CFRunLoopSourceInvalidate(storePrivate->rls); - storePrivate->rls = NULL; + if (storePrivate->rls != NULL) { + CFRunLoopSourceRef rls; + + rls = storePrivate->rls; + storePrivate->rls = NULL; + + CFRunLoopSourceInvalidate(rls); + CFRelease(rls); + } return TRUE; case Using_NotifierInformViaDispatch : (void) SCDynamicStoreSetDispatchQueue(store, NULL); @@ -84,9 +86,6 @@ SCDynamicStoreNotifyCancel(SCDynamicStoreRef store) done : - /* set notifier inactive */ - storePrivate->notifyStatus = NotifierNotRegistered; - if (sc_status != kSCStatusOK) { _SCErrorSet(sc_status); return FALSE; diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierGetChanges.c b/src/configd/SystemConfiguration.fproj/SCDNotifierGetChanges.c index cb8b7cc9c..a0c41c23a 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierGetChanges.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierGetChanges.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2009-2011, 2016, 2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c b/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c index 4d81d957c..50abd52a1 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2008-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008-2019 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@ */ @@ -31,23 +31,178 @@ * - initial revision */ -#include -#include -#include -#include -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ +#include "SCD.h" -#if !TARGET_IPHONE_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 void +removeReceiveRight(SCDynamicStoreRef store, mach_port_t 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; +} + + +#define MAX_INVALID_RIGHT_RETRY 3 + +static mach_port_t +addNotifyPort(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; + int try = 0; + + /* 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)) { + usleep(50 * 1000); // sleep 50ms between attempts + goto retry_allocate; + } + goto fail; + } + +#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)); + goto fail; + } +#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)); + goto fail; + } + + if (oldNotify != MACH_PORT_NULL) { + SC_log(LOG_NOTICE, "oldNotify != MACH_PORT_NULL"); + } + +#ifdef DEBUG + SC_log(LOG_DEBUG, "+ establish notification request w/port=0x%x (%d) with SCDynamicStore server (%@)", + port, port, + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif /* DEBUG */ + + retry : + + __MACH_PORT_DEBUG(TRUE, "*** addNotifyPort", port); + kr = notifyviaport(storePrivate->server, port, 0, (int *)&sc_status); + + if (kr == MACH_SEND_INVALID_RIGHT) { + /* + * the notifyviaport() call was not able to pass/process + * the [notify port] send right. This was most likely due + * to the [SCDynamicStore] server having restarted. We + * handle this issue by removing the remaining receive + * right, reallocating the notify port, and retrying + * the operation. + */ + SC_log((try++ < MAX_INVALID_RIGHT_RETRY) ? LOG_INFO : LOG_ERR, + "SCDynamicStore callback notifyviaport() w/port 0x%x (%d) failed (try %d): %s", + port, port, + try, + mach_error_string(kr)); + + removeReceiveRight(store, port); + } + + if (__SCDynamicStoreCheckRetryAndHandleError(store, + kr, + &sc_status, + "SCDynamicStore callback notifyviaport()")) { + if (kr == MACH_SEND_INVALID_RIGHT) { + if (try <= MAX_INVALID_RIGHT_RETRY) { + goto retry_allocate; + } + goto fail; + } + goto retry; + } + + if (try > 0) { + SC_log(LOG_INFO, + "SCDynamicStore callback notifyviaport() succeeded after %d retr%s w/port 0x%x (%d)", + try, + (try == 1) ? "y" : "ies", + port, port); + } + + 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); + } + removeReceiveRight(store, port); + goto fail; + } + + if (sc_status != kSCStatusOK) { + /* something [else] didn't work */ + removeReceiveRight(store, port); + kr = sc_status; + goto fail; + } + + return port; + + fail : + + _SCErrorSet(kr); + return MACH_PORT_NULL; +} + + static CFStringRef notifyMPCopyDescription(const void *info) { @@ -63,20 +218,30 @@ 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; SCDynamicStoreRef store = (SCDynamicStoreRef)info; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; +#ifdef DEBUG + SC_log(LOG_DEBUG, "mach port callback, %ssignal RLS(%@)", + (msgid == MACH_NOTIFY_NO_SENDERS) ? "reconnect and " : "", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif /* DEBUG */ + if (msgid == MACH_NOTIFY_NO_SENDERS) { /* the server died, disable additional callbacks */ #ifdef DEBUG - SCLog(_sc_verbose, LOG_INFO, CFSTR(" rlsCallback(), notifier port closed")); + SC_log(LOG_DEBUG, " notifier port closed"); #endif /* DEBUG */ #ifdef DEBUG if (port != storePrivate->rlsNotifyPort) { - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("rlsCallback(), why is port != rlsNotifyPort?")); + SC_log(LOG_DEBUG, "why is port != rlsNotifyPort?"); } #endif /* DEBUG */ @@ -88,6 +253,7 @@ rlsCallback(CFMachPortRef port, void *msg, CFIndex size, void *info) if (storePrivate->rls != NULL) { CFRunLoopSourceSignal(storePrivate->rls); } + return; } @@ -99,139 +265,43 @@ rlsSchedule(void *info, CFRunLoopRef rl, CFStringRef mode) SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, - CFSTR("schedule notifications for mode %@"), - (rl != NULL) ? mode : CFSTR("libdispatch")); + SC_log(LOG_DEBUG, "schedule notifications for mode %@", mode); #endif /* DEBUG */ - if (storePrivate->rlList == NULL) { + if (storePrivate->rlsNotifyPort == NULL) { CFMachPortContext context = { 0 , (void *)store , CFRetain , 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 - SCLog(_sc_verbose, LOG_DEBUG, CFSTR(" activate callback runloop source")); + 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, 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) { - SCLog(TRUE, LOG_ERR, CFSTR("rlsSchedule 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). - */ - SCLog(TRUE, LOG_ERR, CFSTR("rlsSchedule mach_port_insert_right(): %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). - */ - SCLog(TRUE, LOG_ERR, CFSTR("rlsSchedule mach_port_request_notification(): %s"), mach_error_string(kr)); + port = addNotifyPort(store); + if (port == MACH_PORT_NULL) { return; } - if (oldNotify != MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("rlsSchedule(): oldNotify != MACH_PORT_NULL")); - } - - 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, 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, 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_DEBUG(TRUE, "*** rlsSchedule (after notifyviaport)", port); + __MACH_PORT_DEBUG(TRUE, "*** rlsSchedule (after addNotifyPort)", port); storePrivate->rlsNotifyPort = _SC_CFMachPortCreateWithPort("SCDynamicStore", port, rlsCallback, &context); - storePrivate->rlsNotifyRLS = CFMachPortCreateRunLoopSource(NULL, storePrivate->rlsNotifyPort, 0); - storePrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + if (rl != NULL) { + storePrivate->rlsNotifyRLS = CFMachPortCreateRunLoopSource(NULL, storePrivate->rlsNotifyPort, 0); + storePrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } } - if ((rl != NULL) && (storePrivate->rlsNotifyRLS != NULL)) { + if (storePrivate->rlsNotifyRLS != NULL) { + /* set notifier active */ + storePrivate->notifyStatus = Using_NotifierInformViaRunLoop; + if (!_SC_isScheduled(store, rl, mode, storePrivate->rlList)) { /* * if we are not already scheduled with this runLoop / runLoopMode @@ -255,12 +325,10 @@ rlsCancel(void *info, CFRunLoopRef rl, CFStringRef mode) SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, - CFSTR("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 @@ -281,12 +349,19 @@ rlsCancel(void *info, CFRunLoopRef rl, CFStringRef mode) kern_return_t kr; #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, CFSTR(" cancel callback runloop source")); + SC_log(LOG_DEBUG, " cancel callback runloop source"); #endif /* DEBUG */ __MACH_PORT_DEBUG((storePrivate->rlsNotifyPort != NULL), "*** rlsCancel", CFMachPortGetPort(storePrivate->rlsNotifyPort)); + if (storePrivate->rls != NULL) { + // Remove the reference we took on the rls. We do not invalidate + // the runloop source and let the client do it when appropriate. + CFRelease(storePrivate->rls); + storePrivate->rls = NULL; + } + if (storePrivate->rlList != NULL) { CFRelease(storePrivate->rlList); storePrivate->rlList = NULL; @@ -313,13 +388,13 @@ rlsCancel(void *info, CFRunLoopRef rl, CFStringRef mode) storePrivate->rlsNotifyPort = NULL; /* and, finally, remove our receive right */ -#ifdef HAVE_MACHPORT_GUARDS - (void) mach_port_destruct(mach_task_self(), mp, 0, store); -#else // HAVE_MACHPORT_GUARDS - (void) mach_port_mod_refs(mach_task_self(), mp, MACH_PORT_RIGHT_RECEIVE, -1); -#endif // HAVE_MACHPORT_GUARDS + removeReceiveRight(store, mp); } +#ifdef DEBUG + SC_log(LOG_DEBUG, " cancel notification request with SCDynamicStore server"); +#endif /* DEBUG */ + if (storePrivate->server != MACH_PORT_NULL) { kr = notifycancel(storePrivate->server, (int *)&sc_status); @@ -332,6 +407,9 @@ rlsCancel(void *info, CFRunLoopRef rl, CFStringRef mode) return; } } + + /* set notifier inactive */ + storePrivate->notifyStatus = NotifierNotRegistered; } return; @@ -341,7 +419,7 @@ rlsCancel(void *info, CFRunLoopRef rl, CFStringRef mode) static void rlsPerform(void *info) { - CFArrayRef changedKeys; + CFArrayRef changedKeys = NULL; void *context_info; void (*context_release)(const void *); SCDynamicStoreCallBack rlsFunction; @@ -349,7 +427,8 @@ rlsPerform(void *info) SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, CFSTR(" executing notification function")); + SC_log(LOG_DEBUG, "handling SCDynamicStore changes (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); #endif /* DEBUG */ changedKeys = SCDynamicStoreCopyNotifiedKeys(store); @@ -358,13 +437,9 @@ rlsPerform(void *info) if (changedKeys == NULL) { changedKeys = CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks); } - } else { - if (changedKeys == NULL) { - /* if no changes or something happened to the server */ - return; - } else if (CFArrayGetCount(changedKeys) == 0) { - goto done; - } + } else if ((changedKeys == NULL) || (CFArrayGetCount(changedKeys) == 0)) { + /* if no changes or something happened to the server */ + goto done; } rlsFunction = storePrivate->rlsFunction; @@ -377,7 +452,9 @@ rlsPerform(void *info) context_release = NULL; } if (rlsFunction != NULL) { + SC_log(LOG_DEBUG, "+ exec SCDynamicStore callout"); (*rlsFunction)(store, changedKeys, context_info); + SC_log(LOG_DEBUG, "+ done"); } if (context_release != NULL) { context_release(context_info); @@ -385,55 +462,12 @@ rlsPerform(void *info) done : - CFRelease(changedKeys); - return; -} - - -static CFTypeRef -rlsRetain(CFTypeRef cf) -{ - SCDynamicStoreRef store = (SCDynamicStoreRef)cf; - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - - switch (storePrivate->notifyStatus) { - case NotifierNotRegistered : - /* mark RLS active */ - storePrivate->notifyStatus = Using_NotifierInformViaRunLoop; - /* keep a reference to the store */ - CFRetain(store); - break; - case Using_NotifierInformViaRunLoop : - break; - default : - SCLog(TRUE, LOG_ERR, CFSTR("rlsRetain() error: notifyStatus=%d"), storePrivate->notifyStatus); - break; - } - - return cf; -} - - -static void -rlsRelease(CFTypeRef cf) -{ - SCDynamicStoreRef store = (SCDynamicStoreRef)cf; - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - - switch (storePrivate->notifyStatus) { - case NotifierNotRegistered : - break; - case Using_NotifierInformViaRunLoop : - /* mark RLS inactive */ - storePrivate->notifyStatus = NotifierNotRegistered; - storePrivate->rls = NULL; +#ifdef DEBUG + SC_log(LOG_DEBUG, "done"); +#endif /* DEBUG */ - /* release our reference to the store */ - CFRelease(store); - break; - default : - SCLog(TRUE, LOG_ERR, CFSTR("rlsRelease() error: notifyStatus=%d"), storePrivate->notifyStatus); - break; + if (changedKeys != NULL) { + CFRelease(changedKeys); } return; @@ -503,13 +537,11 @@ SCDynamicStoreCreateRunLoopSource(CFAllocatorRef allocator, return NULL; } - if (storePrivate->rls != NULL) { - CFRetain(storePrivate->rls); - } else { + if (storePrivate->rls == NULL) { CFRunLoopSourceContext context = { 0 // version , (void *)store // info - , rlsRetain // retain - , rlsRelease // release + , CFRetain // retain + , CFRelease // release , rlsCopyDescription // copyDescription , CFEqual // equal , CFHash // hash @@ -524,6 +556,10 @@ SCDynamicStoreCreateRunLoopSource(CFAllocatorRef allocator, } } + if (storePrivate->rls != NULL) { + CFRetain(storePrivate->rls); + } + return storePrivate->rls; } @@ -547,10 +583,16 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) if (queue == NULL) { if (storePrivate->dispatchQueue == NULL) { + // if not scheduled _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } +#ifdef DEBUG + SC_log(LOG_DEBUG, "unschedule notifications from dispatch queue (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif /* DEBUG */ + ok = TRUE; goto cleanup; } @@ -561,27 +603,34 @@ 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 (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#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 = addNotifyPort(store); + if (mp == MACH_PORT_NULL) { + // if we could not schedule the notification _SCErrorSet(kSCStatusFailed); +#ifdef DEBUG + SC_log(LOG_DEBUG, "addNotifyPort() failed (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif /* DEBUG */ goto cleanup; } @@ -605,10 +654,13 @@ 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) { - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStore dispatch_source_create() failed")); + SC_log(LOG_NOTICE, "dispatch_source_create() failed"); + + // remove our receive right + removeReceiveRight(store, mp); + _SCErrorSet(kSCStatusFailed); goto cleanup; } @@ -617,7 +669,8 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) kern_return_t kr; mach_msg_id_t msgid; union { - u_int8_t buf[sizeof(mach_msg_empty_t) + MAX_TRAILER_SIZE]; + u_int8_t buf1[sizeof(mach_msg_empty_rcv_t) + MAX_TRAILER_SIZE]; + u_int8_t buf2[sizeof(mach_no_senders_notification_t) + MAX_TRAILER_SIZE]; mach_msg_empty_rcv_t msg; mach_no_senders_notification_t no_senders; } notify_msg; @@ -630,13 +683,17 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) MACH_MSG_TIMEOUT_NONE, // timeout MACH_PORT_NULL); // notify if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStore notification handler, kr=0x%x"), - kr); + SC_log(LOG_NOTICE, "mach_msg() failed, kr=0x%x", kr); return; } 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 (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif /* DEBUG */ CFRetain(store); dispatch_group_async(group, queue, ^{ @@ -650,6 +707,14 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) }); dispatch_source_set_cancel_handler(source, ^{ + __MACH_PORT_DEBUG(TRUE, + "*** SCDynamicStoreSetDispatchQueue (before cancel)", + mp); + + // remove our receive right + removeReceiveRight(store, mp); + + // release source dispatch_release(source); }); @@ -671,9 +736,7 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) drainQueue = storePrivate->dispatchQueue; storePrivate->dispatchQueue = NULL; - rlsCancel((void*)store, NULL, NULL); - - if (drainGroup != NULL) { + if ((drainGroup != NULL) && (drainQueue != NULL)) { dispatch_group_notify(drainGroup, drainQueue, ^{ // release group/queue references dispatch_release(drainQueue); diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaFD.c b/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaFD.c index fc51afe20..a76c93f20 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaFD.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaFD.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2008-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2008-2011, 2013, 2015-2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ @@ -47,16 +42,15 @@ Boolean SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store, - int32_t identifier, - int *fd) + int32_t identifier, + int *fd) { - size_t n; - int sc_status; - int sock; - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - kern_return_t status; - char tmpdir[PATH_MAX]; - struct sockaddr_un un; + int fildes[2] = { -1, -1 }; + fileport_t fileport = MACH_PORT_NULL; + int ret; + int sc_status; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + kern_return_t status; if (store == NULL) { /* sorry, you must provide a session */ @@ -76,53 +70,30 @@ SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store, return FALSE; } - if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { + ret = pipe(fildes); + if (ret == -1) { _SCErrorSet(errno); - SCLog(TRUE, LOG_NOTICE, CFSTR("SCDynamicStoreNotifyFileDescriptor socket(): %s"), strerror(errno)); - return FALSE; - } - - /* establish a UNIX domain socket for server->client notification */ - - n = confstr(_CS_DARWIN_USER_TEMP_DIR, tmpdir, sizeof(tmpdir)); - if ((n <= 0) || (n >= sizeof(tmpdir))) { - (void) strlcpy(tmpdir, _PATH_TMP, sizeof(tmpdir)); + SC_log(LOG_ERR, "pipe() failed: %s", strerror(errno)); + goto fail; } - bzero(&un, sizeof(un)); - un.sun_family = AF_UNIX; - snprintf(un.sun_path, - sizeof(un.sun_path)-1, - "%s%s-%d-%d", - tmpdir, - "SCDynamicStoreNotifyFileDescriptor", - getpid(), - storePrivate->server); - - /* ensure that the path does not already exist */ - (void) unlink(un.sun_path); + /* + * send fildes[1], the sender's fd, to configd using a fileport and + * return fildes[0] to the caller. + */ - if (bind(sock, (struct sockaddr *)&un, sizeof(un)) == -1) { + fileport = MACH_PORT_NULL; + ret = fileport_makeport(fildes[1], &fileport); + if (ret < 0) { _SCErrorSet(errno); - SCLog(TRUE, LOG_NOTICE, CFSTR("SCDynamicStoreNotifyFileDescriptor bind(): %s"), strerror(errno)); - (void) unlink(un.sun_path); - (void) close(sock); - return FALSE; - } - - if (listen(sock, 0) == -1) { - _SCErrorSet(errno); - SCLog(TRUE, LOG_NOTICE, CFSTR("SCDynamicStoreNotifyFileDescriptor listen(): %s"), strerror(errno)); - (void) unlink(un.sun_path); - (void) close(sock); - return FALSE; + SC_log(LOG_ERR, "fileport_makeport() failed: %s", strerror(errno)); + goto fail; } retry : status = notifyviafd(storePrivate->server, - un.sun_path, - (mach_msg_type_number_t)strlen(un.sun_path), + fileport, identifier, (int *)&sc_status); @@ -135,31 +106,28 @@ SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store, if (status != KERN_SUCCESS) { _SCErrorSet(status); - return FALSE; + goto fail; } - (void) unlink(un.sun_path); - if (sc_status != kSCStatusOK) { _SCErrorSet(sc_status); - SCLog(TRUE, LOG_NOTICE, - CFSTR("SCDynamicStoreNotifyFileDescriptor server error: %s"), - SCErrorString(sc_status)); - (void) close(sock); - return FALSE; + goto fail; } - *fd = accept(sock, 0, 0); - if (*fd == -1) { - _SCErrorSet(errno); - SCLog(TRUE, LOG_NOTICE, CFSTR("SCDynamicStoreNotifyFileDescriptor accept(): %s"), strerror(errno)); - (void) close(sock); - return FALSE; - } - (void) close(sock); + /* the SCDynamicStore server now has a copy of the write side, close our reference */ + (void) close(fildes[1]); + + /* and keep the read side */ + *fd = fildes[0]; /* set notifier active */ storePrivate->notifyStatus = Using_NotifierInformViaFD; return TRUE; + + fail : + + if (fildes[0] != -1) close(fildes[0]); + if (fildes[1] != -1) close(fildes[1]); + return FALSE; } diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaSignal.c b/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaSignal.c deleted file mode 100644 index ddae17a94..000000000 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierInformViaSignal.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2000, 2001, 2004, 2005, 2009-2011 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 - * - * June 1, 2001 Allan Nathanson - * - public API conversion - * - * March 31, 2000 Allan Nathanson - * - initial revision - */ - -#include -#include - -#include -#include -#include "SCDynamicStoreInternal.h" -#include "config.h" /* MiG generated file */ - -Boolean -SCDynamicStoreNotifySignal(SCDynamicStoreRef store, pid_t pid, int sig) -{ - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - kern_return_t status; - int sc_status; - task_t task; - - if (store == NULL) { - /* sorry, you must provide a session */ - _SCErrorSet(kSCStatusNoStoreSession); - return FALSE; - } - - if (storePrivate->server == MACH_PORT_NULL) { - /* sorry, you must have an open session to play */ - _SCErrorSet(kSCStatusNoStoreServer); - return FALSE; - } - - if (storePrivate->notifyStatus != NotifierNotRegistered) { - /* sorry, you can only have one notification registered at once */ - _SCErrorSet(kSCStatusNotifierActive); - return FALSE; - } - - status = task_for_pid(mach_task_self(), pid, &task); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCDynamicStoreNotifySignal task_for_pid(): %s"), mach_error_string(status)); - _SCErrorSet(status); - return FALSE; - } - - retry : - - status = notifyviasignal(storePrivate->server, task, sig, (int *)&sc_status); - - if (__SCDynamicStoreCheckRetryAndHandleError(store, - status, - &sc_status, - "SCDynamicStoreNotifySignal notifyviasignal()")) { - goto retry; - } - - if (status != KERN_SUCCESS) { - _SCErrorSet(status); - return FALSE; - } - - /* set notifier active */ - storePrivate->notifyStatus = Using_NotifierInformViaSignal; - - return TRUE; -} diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierRemove.c b/src/configd/SystemConfiguration.fproj/SCDNotifierRemove.c index 20cc42354..83a4ea228 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierRemove.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierRemove.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016, 2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierSetKeys.c b/src/configd/SystemConfiguration.fproj/SCDNotifierSetKeys.c index 76222d17b..4f0c286c4 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierSetKeys.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierSetKeys.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2009-2011, 2013, 2016, 2017, 2019 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@ */ @@ -28,15 +28,9 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ - Boolean SCDynamicStoreSetNotificationKeys(SCDynamicStoreRef store, CFArrayRef keys, @@ -81,6 +75,7 @@ SCDynamicStoreSetNotificationKeys(SCDynamicStoreRef store, } } + retry : /* send the keys and patterns, fetch the associated result from the server */ diff --git a/src/configd/SystemConfiguration.fproj/SCDNotifierWait.c b/src/configd/SystemConfiguration.fproj/SCDNotifierWait.c index 751f47f33..51d496f9c 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotifierWait.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotifierWait.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2006, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2006, 2009-2011, 2015-2017, 2019 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@ */ @@ -31,13 +31,10 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ +#include + static mach_msg_id_t waitForMachMessage(mach_port_t port) @@ -56,7 +53,7 @@ waitForMachMessage(mach_port_t port) MACH_MSG_TIMEOUT_NONE, /* timeout */ MACH_PORT_NULL); /* notify */ if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_DEBUG, CFSTR("waitForMachMessage mach_msg(): %s"), mach_error_string(status)); + SC_log(LOG_NOTICE, "mach_msg() failed: %s", mach_error_string(status)); return -1; } @@ -95,7 +92,7 @@ SCDynamicStoreNotifyWait(SCDynamicStoreRef store) /* Allocating port (for server response) */ status = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port); if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreNotifyWait mach_port_allocate(): %s"), mach_error_string(status)); + SC_log(LOG_ERR, "mach_port_allocate() failed: %s", mach_error_string(status)); _SCErrorSet(status); return FALSE; } @@ -110,7 +107,7 @@ SCDynamicStoreNotifyWait(SCDynamicStoreRef store) * only happen if someone stomped on OUR port (so let's leave * the port alone). */ - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreNotifyWait mach_port_insert_right(): %s"), mach_error_string(status)); + SC_log(LOG_NOTICE, "mach_port_insert_right() failed: %s", mach_error_string(status)); _SCErrorSet(status); return FALSE; } @@ -129,13 +126,13 @@ SCDynamicStoreNotifyWait(SCDynamicStoreRef store) * only happen if someone stomped on OUR port (so let's leave * the port alone). */ - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreNotifyWait mach_port_request_notification(): %s"), mach_error_string(status)); + SC_log(LOG_NOTICE, "mach_port_request_notification() failed: %s", mach_error_string(status)); _SCErrorSet(status); return FALSE; } if (oldNotify != MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreNotifyWait(): oldNotify != MACH_PORT_NULL")); + SC_log(LOG_NOTICE, "oldNotify != MACH_PORT_NULL"); } retry : @@ -178,7 +175,7 @@ SCDynamicStoreNotifyWait(SCDynamicStoreRef store) if (msgid == MACH_NOTIFY_NO_SENDERS) { /* the server closed the notifier port */ #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("SCDynamicStoreNotifyWait notifier port closed, destroying port %d"), port); + SC_log(LOG_DEBUG, "notifier port closed, port %d", port); #endif /* DEBUG */ _SCErrorSet(kSCStatusNoStoreServer); return FALSE; @@ -187,7 +184,7 @@ SCDynamicStoreNotifyWait(SCDynamicStoreRef store) if (msgid == -1) { /* one of the mach routines returned an error */ #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("SCDynamicStoreNotifyWait communication with server failed, destroying port %d"), port); + SC_log(LOG_DEBUG, "communication with server failed, remove port right %d", port); #endif /* DEBUG */ (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE , -1); _SCErrorSet(kSCStatusNoStoreServer); diff --git a/src/configd/SystemConfiguration.fproj/SCDNotify.c b/src/configd/SystemConfiguration.fproj/SCDNotify.c index 2b21178e6..8d927d6f7 100644 --- a/src/configd/SystemConfiguration.fproj/SCDNotify.c +++ b/src/configd/SystemConfiguration.fproj/SCDNotify.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016-2019 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@ */ @@ -28,11 +28,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ @@ -63,6 +58,22 @@ SCDynamicStoreNotifyValue(SCDynamicStoreRef store, return FALSE; } + if (storePrivate->cache_active) { + if (storePrivate->cached_notifys == NULL) { + storePrivate->cached_notifys = CFArrayCreateMutable(NULL, + 0, + &kCFTypeArrayCallBacks); + } + + if (!CFArrayContainsValue(storePrivate->cached_notifys, + CFRangeMake(0, CFArrayGetCount(storePrivate->cached_notifys)), + key)) { + CFArrayAppendValue(storePrivate->cached_notifys, key); + } + + return TRUE; + } + /* serialize the key */ if (!_SCSerializeString(key, &utfKey, (void **)&myKeyRef, &myKeyLen)) { _SCErrorSet(kSCStatusFailed); diff --git a/src/configd/SystemConfiguration.fproj/SCDOpen.c b/src/configd/SystemConfiguration.fproj/SCDOpen.c index e03cfff0b..d43a2a1db 100644 --- a/src/configd/SystemConfiguration.fproj/SCDOpen.c +++ b/src/configd/SystemConfiguration.fproj/SCDOpen.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2006, 2008-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2008-2019 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@ */ @@ -40,16 +40,15 @@ #include #include -#include -#include -#include "SCD.h" #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ - +#include "SCD.h" static CFStringRef _sc_bundleID = NULL; static pthread_mutex_t _sc_lock = PTHREAD_MUTEX_INITIALIZER; static mach_port_t _sc_server = MACH_PORT_NULL; +static unsigned int _sc_store_cnt = 0; +static unsigned int _sc_store_max = 50; /* complain if SCDynamicStore objects exceeds this [soft-]limit */ static const char *notifyType[] = { @@ -58,12 +57,32 @@ static const char *notifyType[] = { "inform w/callback", "inform w/mach port", "inform w/fd", - "inform w/signal", "inform w/runLoop", "inform w/dispatch" }; +void +_SCDynamicStoreSetSessionWatchLimit(unsigned int limit) +{ + _sc_store_max = limit; + return; +} + + +__private_extern__ os_log_t +__log_SCDynamicStore(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "SCDynamicStore"); + } + + return log; +} + + static CFStringRef __SCDynamicStoreCopyDescription(CFTypeRef cf) { CFAllocatorRef allocator = CFGetAllocator(cf); @@ -90,9 +109,6 @@ __SCDynamicStoreCopyDescription(CFTypeRef cf) { case Using_NotifierInformViaFD : CFStringAppendFormat(result, NULL, CFSTR(", FD notifications")); break; - case Using_NotifierInformViaSignal : - CFStringAppendFormat(result, NULL, CFSTR(", BSD signal notifications")); - break; case Using_NotifierInformViaRunLoop : case Using_NotifierInformViaDispatch : if (storePrivate->notifyStatus == Using_NotifierInformViaRunLoop) { @@ -100,6 +116,7 @@ __SCDynamicStoreCopyDescription(CFTypeRef cf) { CFStringAppendFormat(result, NULL, CFSTR(" {callout = %p"), storePrivate->rlsFunction); CFStringAppendFormat(result, NULL, CFSTR(", info = %p"), storePrivate->rlsContext.info); CFStringAppendFormat(result, NULL, CFSTR(", rls = %p"), storePrivate->rls); + CFStringAppendFormat(result, NULL, CFSTR(", notify rls = %@" ), storePrivate->rlsNotifyRLS); } else if (storePrivate->notifyStatus == Using_NotifierInformViaDispatch) { CFStringAppendFormat(result, NULL, CFSTR(", dispatch notifications")); CFStringAppendFormat(result, NULL, CFSTR(" {callout = %p"), storePrivate->rlsFunction); @@ -107,9 +124,6 @@ __SCDynamicStoreCopyDescription(CFTypeRef cf) { CFStringAppendFormat(result, NULL, CFSTR(", queue = %p"), storePrivate->dispatchQueue); CFStringAppendFormat(result, NULL, CFSTR(", source = %p"), storePrivate->dispatchSource); } - if (storePrivate->rlsNotifyRLS != NULL) { - CFStringAppendFormat(result, NULL, CFSTR(", notify rls = %@" ), storePrivate->rlsNotifyRLS); - } CFStringAppendFormat(result, NULL, CFSTR("}")); break; default : @@ -166,6 +180,13 @@ __SCDynamicStoreDeallocate(CFTypeRef cf) if (storePrivate->name != NULL) CFRelease(storePrivate->name); if (storePrivate->options != NULL) CFRelease(storePrivate->options); + /* release any cached content */ + if (storePrivate->cache_active) { + _SCDynamicStoreCacheClose(store); + } + + _SC_ATOMIC_DEC(&_sc_store_cnt); + return; } @@ -240,25 +261,37 @@ __SCDynamicStoreInitialize(void) static mach_port_t __SCDynamicStoreServerPort(SCDynamicStorePrivateRef storePrivate, kern_return_t *status) { +#pragma unused(storePrivate) mach_port_t server = MACH_PORT_NULL; char *server_name; server_name = getenv("SCD_SERVER"); +#ifndef DEBUG + /* + * only allow the SCDynamicStore server bootstrap name to be changed with + * DEBUG builds. For RELEASE builds, assume that no server is available. + */ + if (server_name != NULL) { + *status = BOOTSTRAP_UNKNOWN_SERVICE; + return MACH_PORT_NULL; + } +#endif /* DEBUG */ + if (server_name == NULL) { server_name = SCD_SERVER; } -#if defined(BOOTSTRAP_PRIVILEGED_SERVER) && !TARGET_IPHONE_SIMULATOR +#if defined(BOOTSTRAP_PRIVILEGED_SERVER) && !TARGET_OS_SIMULATOR *status = bootstrap_look_up2(bootstrap_port, server_name, &server, 0, BOOTSTRAP_PRIVILEGED_SERVER); -#else // defined(BOOTSTRAP_PRIVILEGED_SERVER) && !TARGET_IPHONE_SIMULATOR +#else // defined(BOOTSTRAP_PRIVILEGED_SERVER) && !TARGET_OS_SIMULATOR *status = bootstrap_look_up(bootstrap_port, server_name, &server); -#endif // defined(BOOTSTRAP_PRIVILEGED_SERVER) && !TARGET_IPHONE_SIMULATOR +#endif // defined(BOOTSTRAP_PRIVILEGED_SERVER) && !TARGET_OS_SIMULATOR switch (*status) { case BOOTSTRAP_SUCCESS : @@ -272,9 +305,9 @@ __SCDynamicStoreServerPort(SCDynamicStorePrivateRef storePrivate, kern_return_t break; default : #ifdef DEBUG - SCLog(_sc_verbose, LOG_DEBUG, - CFSTR("SCDynamicStoreCreate[WithOptions] bootstrap_look_up() failed: status=%s"), - bootstrap_strerror(*status)); + SC_log(LOG_INFO, "bootstrap_look_up() failed: status=%s (%d)", + bootstrap_strerror(*status), + *status); #endif /* DEBUG */ break; } @@ -289,13 +322,13 @@ __SCDynamicStoreCreatePrivate(CFAllocatorRef allocator, SCDynamicStoreCallBack callout, SCDynamicStoreContext *context) { + unsigned int n; uint32_t size; SCDynamicStorePrivateRef storePrivate; /* initialize runtime */ pthread_once(&initialized, __SCDynamicStoreInitialize); - /* allocate session */ size = sizeof(SCDynamicStorePrivate) - sizeof(CFRuntimeBase); storePrivate = (SCDynamicStorePrivateRef)_CFRuntimeCreateInstance(allocator, @@ -307,61 +340,35 @@ __SCDynamicStoreCreatePrivate(CFAllocatorRef allocator, return NULL; } + /* initialize non-zero/NULL members */ + /* client side of the "configd" session */ storePrivate->name = (name != NULL) ? CFRetain(name) : NULL; - storePrivate->options = NULL; - - /* server side of the "configd" session */ - storePrivate->server = MACH_PORT_NULL; - storePrivate->serverNullSession = FALSE; - - /* flags */ - storePrivate->useSessionKeys = FALSE; /* Notification status */ storePrivate->notifyStatus = NotifierNotRegistered; /* "client" information associated with SCDynamicStoreCreateRunLoopSource() */ - storePrivate->rlList = NULL; - storePrivate->rls = NULL; storePrivate->rlsFunction = callout; - storePrivate->rlsContext.info = NULL; - storePrivate->rlsContext.retain = NULL; - storePrivate->rlsContext.release = NULL; - storePrivate->rlsContext.copyDescription = NULL; - if (context) { - bcopy(context, &storePrivate->rlsContext, sizeof(SCDynamicStoreContext)); + if (context != NULL) { + memcpy(&storePrivate->rlsContext, context, sizeof(SCDynamicStoreContext)); if (context->retain != NULL) { storePrivate->rlsContext.info = (void *)(*context->retain)(context->info); } } - storePrivate->rlsNotifyPort = NULL; - storePrivate->rlsNotifyRLS = NULL; - - /* "client" information associated with SCDynamicStoreSetDispatchQueue() */ - storePrivate->dispatchGroup = NULL; - storePrivate->dispatchQueue = NULL; - storePrivate->dispatchSource = NULL; - - /* "client" information associated with SCDynamicStoreSetDisconnectCallBack() */ - storePrivate->disconnectFunction = NULL; - storePrivate->disconnectForceCallBack = FALSE; - - /* "server" information associated with SCDynamicStoreSetNotificationKeys() */ - storePrivate->keys = NULL; - storePrivate->patterns = NULL; - - /* "server" information associated with SCDynamicStoreNotifyMachPort(); */ - storePrivate->notifyPort = MACH_PORT_NULL; - storePrivate->notifyPortIdentifier = 0; /* "server" information associated with SCDynamicStoreNotifyFileDescriptor(); */ storePrivate->notifyFile = -1; - storePrivate->notifyFileIdentifier = 0; - /* "server" information associated with SCDynamicStoreNotifySignal(); */ - storePrivate->notifySignal = 0; - storePrivate->notifySignalTask = TASK_NULL; + /* watch for excessive SCDynamicStore usage */ + n = _SC_ATOMIC_INC(&_sc_store_cnt); + if (n > _sc_store_max) { + if (_sc_store_max > 0) { + SC_log(LOG_ERR, "SCDynamicStoreCreate(): number of SCDynamicStore objects now exceeds %u", n - 1); + _sc_store_max = (_sc_store_max < 5000) ? (_sc_store_max * 2) : 0; + _SC_crash_once("Excessive number of SCDynamicStore objects", NULL, NULL); + } + } return storePrivate; } @@ -370,16 +377,15 @@ __SCDynamicStoreCreatePrivate(CFAllocatorRef allocator, static void updateServerPort(SCDynamicStorePrivateRef storePrivate, mach_port_t *server, int *sc_status_p) { + mach_port_t old_port; + pthread_mutex_lock(&_sc_lock); + old_port = _sc_server; if (_sc_server != MACH_PORT_NULL) { if (*server == _sc_server) { - mach_port_t old_port; - // if the server we tried returned the error, save the old port, // [re-]lookup the name to the server, and deallocate the original // send [or dead name] right - - old_port = _sc_server; _sc_server = __SCDynamicStoreServerPort(storePrivate, sc_status_p); (void)mach_port_deallocate(mach_task_self(), old_port); } else { @@ -388,9 +394,17 @@ updateServerPort(SCDynamicStorePrivateRef storePrivate, mach_port_t *server, int } else { _sc_server = __SCDynamicStoreServerPort(storePrivate, sc_status_p); } + *server = _sc_server; pthread_mutex_unlock(&_sc_lock); +#ifdef DEBUG + SC_log(LOG_DEBUG, "updateServerPort (%@): 0x%x (%d) --> 0x%x (%d)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?"), + old_port, old_port, + *server, *server); +#endif // DEBUG + return; } @@ -398,15 +412,15 @@ updateServerPort(SCDynamicStorePrivateRef storePrivate, mach_port_t *server, int static Boolean __SCDynamicStoreAddSession(SCDynamicStorePrivateRef storePrivate) { - kern_return_t kr = KERN_SUCCESS; - CFDataRef myName; /* serialized name */ - xmlData_t myNameRef; - CFIndex myNameLen; - CFDataRef myOptions = NULL; /* serialized options */ - xmlData_t myOptionsRef = NULL; - CFIndex myOptionsLen = 0; - int sc_status = kSCStatusFailed; - mach_port_t server; + kern_return_t kr = KERN_SUCCESS; + CFDataRef myName; /* serialized name */ + xmlData_t myNameRef; + CFIndex myNameLen; + CFDataRef myOptions = NULL; /* serialized options */ + xmlData_t myOptionsRef = NULL; + CFIndex myOptionsLen = 0; + int sc_status = kSCStatusFailed; + mach_port_t server; if (!_SCSerializeString(storePrivate->name, &myName, (void **)&myNameRef, &myNameLen)) { goto done; @@ -448,6 +462,11 @@ __SCDynamicStoreAddSession(SCDynamicStorePrivateRef storePrivate) storePrivate->server = server; sc_status = kSCStatusOK; } else { + if (kr == KERN_INVALID_RIGHT) { + // We can get KERN_INVALID_RIGHT if the server dies and we try to + // add a send right to a stale (now dead) port name + kr = MACH_SEND_INVALID_DEST; + } storePrivate->server = MACH_PORT_NULL; } } else { @@ -483,16 +502,13 @@ __SCDynamicStoreAddSession(SCDynamicStorePrivateRef storePrivate) case kSCStatusOK : return TRUE; case BOOTSTRAP_UNKNOWN_SERVICE : - SCLog(TRUE, - (kr == KERN_SUCCESS) ? LOG_DEBUG : LOG_ERR, - CFSTR("SCDynamicStore server not available")); + SC_log((kr == KERN_SUCCESS) ? LOG_INFO : LOG_ERR, "SCDynamicStore server not available"); sc_status = kSCStatusNoStoreServer; break; default : - SCLog(TRUE, - (kr == KERN_SUCCESS) ? LOG_DEBUG : LOG_ERR, - CFSTR("SCDynamicStoreAddSession configopen(): %s"), - SCErrorString(sc_status)); + SC_log((kr == KERN_SUCCESS) ? LOG_INFO : LOG_ERR, "configopen() failed: %d: %s", + sc_status, + SCErrorString(sc_status)); break; } @@ -554,20 +570,47 @@ __SCDynamicStoreCheckRetryAndHandleError(SCDynamicStoreRef store, return FALSE; } - if ((status == MACH_SEND_INVALID_DEST) || (status == MIG_SERVER_DIED)) { - /* the server's gone, remove the session's dead name right */ - (void) mach_port_deallocate(mach_task_self(), storePrivate->server); - storePrivate->server = MACH_PORT_NULL; + switch (status) { + case MACH_SEND_INVALID_DEST : + case MACH_SEND_INVALID_RIGHT : + case MIG_SERVER_DIED : + /* + * the server's gone, remove the session's send (or dead name) right + */ +#ifdef DEBUG + SC_log(LOG_DEBUG, "__SCDynamicStoreCheckRetryAndHandleError(%s): %@: 0x%x (%d) --> 0x%x (%d)", + log_str, + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?"), + storePrivate->server, storePrivate->server, + MACH_PORT_NULL, MACH_PORT_NULL); +#endif // DEBUG + (void) mach_port_deallocate(mach_task_self(), storePrivate->server); + storePrivate->server = MACH_PORT_NULL; + + /* reconnect */ + if (__SCDynamicStoreReconnect(store)) { + /* retry needed */ + return TRUE; + } else { + status = SCError(); + } + ;; - /* reconnect */ - if (__SCDynamicStoreReconnect(store)) { - /* retry needed */ - return TRUE; - } - } else { - /* an unexpected error, leave the [session] port alone */ - SCLog(TRUE, LOG_ERR, CFSTR("%s: %s"), log_str, mach_error_string(status)); - storePrivate->server = MACH_PORT_NULL; + default : + /* + * an unexpected error, leave the [session] port alone + */ +#ifdef DEBUG + SC_log(LOG_DEBUG, "__SCDynamicStoreCheckRetryAndHandleError(%s): %@: unexpected status=%s (0x%x)", + log_str, + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?"), + mach_error_string(status), + status); +#endif // DEBUG + + SC_log(LOG_NOTICE, "%s: %s", log_str, mach_error_string(status)); + storePrivate->server = MACH_PORT_NULL; + ;; } *sc_status = status; @@ -597,6 +640,7 @@ pushDisconnect(SCDynamicStoreRef store) context_info = storePrivate->rlsContext.info; context_release = NULL; } + SC_log(LOG_DEBUG, "exec SCDynamicStore disconnect callout"); (*disconnectFunction)(store, context_info); if (context_release) { context_release(context_info); @@ -616,6 +660,11 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) CFArrayRef rlList = NULL; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; +#ifdef DEBUG + SC_log(LOG_DEBUG, "SCDynamicStore: reconnect notifications (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif // DEBUG + // save old SCDynamicStore [notification] state notifyStatus = storePrivate->notifyStatus; @@ -627,6 +676,7 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) if (storePrivate->rlList != NULL) { rlList = CFArrayCreateCopy(NULL, storePrivate->rlList); } + break; case Using_NotifierInformViaDispatch : dispatchQueue = storePrivate->dispatchQueue; if (dispatchQueue != NULL) dispatch_retain(dispatchQueue); @@ -638,9 +688,7 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) // cancel [old] notifications if (!SCDynamicStoreNotifyCancel(store)) { // if we could not cancel / reconnect - SCLog(TRUE, LOG_DEBUG, - CFSTR("__SCDynamicStoreReconnectNotifications: SCDynamicStoreNotifyCancel() failed: %s"), - SCErrorString(SCError())); + SC_log(LOG_NOTICE, "SCDynamicStoreNotifyCancel() failed: %s", SCErrorString(SCError())); } // set notification keys & patterns @@ -649,9 +697,9 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) storePrivate->keys, storePrivate->patterns); if (!ok) { - SCLog((SCError() != BOOTSTRAP_UNKNOWN_SERVICE), - LOG_ERR, - CFSTR("__SCDynamicStoreReconnectNotifications: SCDynamicStoreSetNotificationKeys() failed")); + if (SCError() != BOOTSTRAP_UNKNOWN_SERVICE) { + SC_log(LOG_NOTICE, "SCDynamicStoreSetNotificationKeys() failed"); + } goto done; } } @@ -662,11 +710,16 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) CFIndex n; CFRunLoopSourceRef rls; +#ifdef DEBUG + SC_log(LOG_DEBUG, "SCDynamicStore: reconnecting w/CFRunLoop (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif // DEBUG + rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); if (rls == NULL) { - SCLog((SCError() != BOOTSTRAP_UNKNOWN_SERVICE), - LOG_ERR, - CFSTR("__SCDynamicStoreReconnectNotifications: SCDynamicStoreCreateRunLoopSource() failed")); + if (SCError() != BOOTSTRAP_UNKNOWN_SERVICE) { + SC_log(LOG_NOTICE, "SCDynamicStoreCreateRunLoopSource() failed"); + } ok = FALSE; break; } @@ -683,11 +736,17 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) break; } case Using_NotifierInformViaDispatch : + +#ifdef DEBUG + SC_log(LOG_DEBUG, "SCDynamicStore: reconnecting w/dispatch queue (%@)", + (storePrivate->name != NULL) ? storePrivate->name : CFSTR("?")); +#endif // DEBUG + ok = SCDynamicStoreSetDispatchQueue(store, dispatchQueue); if (!ok) { - SCLog((SCError() != BOOTSTRAP_UNKNOWN_SERVICE), - LOG_ERR, - CFSTR("__SCDynamicStoreReconnectNotifications: SCDynamicStoreSetDispatchQueue() failed")); + if (SCError() != BOOTSTRAP_UNKNOWN_SERVICE) { + SC_log(LOG_NOTICE, "SCDynamicStoreSetDispatchQueue() failed"); + } goto done; } break; @@ -713,10 +772,9 @@ __SCDynamicStoreReconnectNotifications(SCDynamicStoreRef store) } if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStore server %s, notification (%s) not restored"), - (SCError() == BOOTSTRAP_UNKNOWN_SERVICE) ? "shutdown" : "failed", - notifyType[notifyStatus]); + SC_log(LOG_NOTICE, "SCDynamicStore server %s, notification (%s) not restored", + (SCError() == BOOTSTRAP_UNKNOWN_SERVICE) ? "shutdown" : "failed", + notifyType[notifyStatus]); } // inform the client @@ -786,6 +844,7 @@ SCDynamicStoreGetTypeID(void) { return __kSCDynamicStoreTypeID; } + Boolean SCDynamicStoreSetDisconnectCallBack(SCDynamicStoreRef store, SCDynamicStoreDisconnectCallBack callout) diff --git a/src/configd/SystemConfiguration.fproj/SCDPlugin.c b/src/configd/SystemConfiguration.fproj/SCDPlugin.c index 926500f98..ff6bb8468 100644 --- a/src/configd/SystemConfiguration.fproj/SCDPlugin.c +++ b/src/configd/SystemConfiguration.fproj/SCDPlugin.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2006, 2013 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2002-2006, 2013, 2015, 2017, 2018 Apple Computer, 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@ */ @@ -110,6 +110,7 @@ unblockSignal() static void reaper(int sigraised) { +#pragma unused(sigraised) /* * block additional SIGCHLD's until current children have * been reaped. @@ -129,6 +130,10 @@ reaper(int sigraised) static void childrenReaped(CFMachPortRef port, void *msg, CFIndex size, void *info) { +#pragma unused(port) +#pragma unused(msg) +#pragma unused(size) +#pragma unused(info) pid_t pid = 0; childInfoRef reapedChildren = NULL; @@ -214,12 +219,13 @@ childrenReaped(CFMachPortRef port, void *msg, CFIndex size, void *info) static CFStringRef childReapedMPCopyDescription(const void *info) { +#pragma unused(info) return CFStringCreateWithFormat(NULL, NULL, CFSTR("")); } void -_SCDPluginExecInit() +_SCDPluginExecInit(void) { struct sigaction act; CFMachPortContext context = { 0 @@ -316,17 +322,28 @@ _SCDPluginExecCommand2(SCDPluginExecCallBack callout, gid_t egid; uid_t euid; - int i; int status; if (setup != NULL) { (setup)(pid, setupContext); } else { + int fd; + int i; + /* close any open FDs */ for (i = getdtablesize()-1; i>=0; i--) close(i); - open(_PATH_DEVNULL, O_RDWR, 0); - dup(0); - dup(0); + + /* stdin, stdout, stderr */ + fd = open(_PATH_DEVNULL, O_RDWR, 0); + if (fd != -1) { + (void) dup2(fd, STDIN_FILENO); + (void) dup2(fd, STDOUT_FILENO); + (void) dup2(fd, STDERR_FILENO); + if ((fd != STDIN_FILENO) && (fd != STDOUT_FILENO) && (fd != STDERR_FILENO)) { + (void) close(fd); + } + + } } egid = getegid(); @@ -368,7 +385,7 @@ _SCDPluginExecCommand2(SCDPluginExecCallBack callout, // create child process info child = CFAllocatorAllocate(NULL, sizeof(struct childInfo), 0); - bzero(child, sizeof(struct childInfo)); + memset(child, 0, sizeof(struct childInfo)); child->pid = pid; child->callout = callout; child->context = context; diff --git a/src/configd/SystemConfiguration.fproj/SCDPlugin.h b/src/configd/SystemConfiguration.fproj/SCDPlugin.h index f64ac1314..90fd1ecb1 100644 --- a/src/configd/SystemConfiguration.fproj/SCDPlugin.h +++ b/src/configd/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 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/src/configd/SystemConfiguration.fproj/SCDPrivate.c b/src/configd/SystemConfiguration.fproj/SCDPrivate.c index 882729b81..485d12289 100644 --- a/src/configd/SystemConfiguration.fproj/SCDPrivate.c +++ b/src/configd/SystemConfiguration.fproj/SCDPrivate.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2019 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -31,9 +31,7 @@ * - initial revision */ -//#define DO_NOT_CRASH -//#define DO_NOT_INFORM - +#define SC_LOG_HANDLE _SC_LOG_DEFAULT #include #include #include @@ -56,12 +54,13 @@ #include #include -#include - -#if TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR #include -#endif // TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR + +/* CrashReporter "Application Specific Information" */ +#include #define N_QUICK 32 @@ -70,8 +69,8 @@ #pragma mark Miscellaneous -char * -_SC_cfstring_to_cstring(CFStringRef cfstr, char *buf, CFIndex bufLen, CFStringEncoding encoding) +__private_extern__ char * +_SC_cfstring_to_cstring_ext(CFStringRef cfstr, char *buf, CFIndex bufLen, CFStringEncoding encoding, UInt8 lossByte, CFIndex *usedBufLen) { CFIndex converted; CFIndex last = 0; @@ -86,7 +85,7 @@ _SC_cfstring_to_cstring(CFStringRef cfstr, char *buf, CFIndex bufLen, CFStringEn converted = CFStringGetBytes(cfstr, CFRangeMake(0, len), encoding, - 0, + lossByte, FALSE, NULL, 0, @@ -117,17 +116,29 @@ _SC_cfstring_to_cstring(CFStringRef cfstr, char *buf, CFIndex bufLen, CFStringEn (void)CFStringGetBytes(cfstr, CFRangeMake(0, len), encoding, - 0, + lossByte, FALSE, (UInt8 *)buf, bufLen, &last); buf[last] = '\0'; + if (usedBufLen != NULL) { + *usedBufLen = last; + } + return buf; } +char * +_SC_cfstring_to_cstring(CFStringRef cfstr, char *buf, CFIndex bufLen, CFStringEncoding encoding) +{ + return _SC_cfstring_to_cstring_ext(cfstr, buf, bufLen, encoding, 0, NULL); + +} + + void _SC_sockaddr_to_string(const struct sockaddr *address, char *buf, size_t bufLen) { @@ -140,7 +151,7 @@ _SC_sockaddr_to_string(const struct sockaddr *address, char *buf, size_t bufLen) addr.sa = address; - bzero(buf, bufLen); + memset(buf, 0, bufLen); switch (address->sa_family) { case AF_INET : (void)inet_ntop(addr.sin->sin_family, @@ -157,7 +168,7 @@ _SC_sockaddr_to_string(const struct sockaddr *address, char *buf, size_t bufLen) size_t n; n = strlen(buf); - if ((n+IF_NAMESIZE+1) <= (int)bufLen) { + if ((n+IF_NAMESIZE+1) <= bufLen) { buf[n++] = '%'; if_indextoname(addr.sin6->sin6_scope_id, &buf[n]); } @@ -190,7 +201,7 @@ _SC_string_to_sockaddr(const char *str, sa_family_t af, void *buf, size_t bufLen addr.buf = buf; } - bzero(addr.buf, bufLen); + memset(addr.buf, 0, bufLen); if (((af == AF_UNSPEC) || (af == AF_INET)) && (bufLen >= sizeof(struct sockaddr_in)) && inet_aton(str, &addr.sin->sin_addr) == 1) { @@ -206,7 +217,7 @@ _SC_string_to_sockaddr(const char *str, sa_family_t af, void *buf, size_t bufLen addr.sin6->sin6_len = sizeof(struct sockaddr_in6); addr.sin6->sin6_family = AF_INET6; - p = strchr(buf, '%'); + p = strchr(str, '%'); if (p != NULL) { addr.sin6->sin6_scope_id = if_nametoindex(p + 1); } @@ -240,6 +251,7 @@ _SC_sendMachMessage(mach_port_t port, mach_msg_id_t msg_id) mach_msg_option_t options; kern_return_t status; + memset(&msg, 0, sizeof(msg)); msg.header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); msg.header.msgh_size = sizeof(msg); msg.header.msgh_remote_port = port; @@ -253,7 +265,7 @@ _SC_sendMachMessage(mach_port_t port, mach_msg_id_t msg_id) MACH_PORT_NULL, /* rcv_name */ 0, /* timeout */ MACH_PORT_NULL); /* notify */ - if (status != MACH_MSG_SUCCESS) { + if ((status == MACH_SEND_INVALID_DEST) || (status == MACH_SEND_TIMED_OUT)) { mach_msg_destroy(&msg.header); } @@ -282,16 +294,17 @@ _SC_trimDomain(CFStringRef domain) CFSTR("."), CFRangeMake(0, length), kCFCompareAnchored|kCFCompareBackwards, - NULL))) { - CFMutableStringRef trimmed; - - trimmed = CFStringCreateMutableCopy(NULL, 0, domain); - CFStringTrim(trimmed, CFSTR(".")); - domain = (CFStringRef)trimmed; - length = CFStringGetLength(domain); - } else { - CFRetain(domain); - } + NULL)) + ) { + CFMutableStringRef trimmed; + + trimmed = CFStringCreateMutableCopy(NULL, 0, domain); + CFStringTrim(trimmed, CFSTR(".")); + domain = (CFStringRef)trimmed; + length = CFStringGetLength(domain); + } else { + CFRetain(domain); + } if (length == 0) { CFRelease(domain); @@ -317,10 +330,10 @@ _SC_hw_model(Boolean trim) int ret; // get HW model name - bzero(&hwModel, sizeof(hwModel)); + memset(&hwModel, 0, sizeof(hwModel)); ret = sysctl(mib, sizeof(mib) / sizeof(mib[0]), &hwModel, &n, NULL, 0); if (ret != 0) { - SCLog(TRUE, LOG_ERR, CFSTR("sysctl() CTL_HW/HW_MODEL failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "sysctl() CTL_HW/HW_MODEL failed: %s", strerror(errno)); return; } hwModel[sizeof(hwModel) - 1] = '\0'; @@ -351,6 +364,31 @@ _SC_hw_model(Boolean trim) #pragma mark Serialization +static kern_return_t +__CFDataCopyVMData(CFDataRef data, void **dataRef, CFIndex *dataLen) +{ + kern_return_t kr; + + vm_address_t vm_address; + vm_size_t vm_size; + + vm_address = (vm_address_t)CFDataGetBytePtr(data); + vm_size = (vm_size_t)CFDataGetLength(data); + kr = vm_allocate(mach_task_self(), &vm_address, vm_size, VM_FLAGS_ANYWHERE); + if (kr != KERN_SUCCESS) { + *dataRef = NULL; + *dataLen = 0; + return kr; + } + + memcpy((void *)vm_address, (char *)CFDataGetBytePtr(data), vm_size); + *dataRef = (void *)vm_address; + *dataLen = vm_size; + + return kr; +} + + Boolean _SCSerialize(CFPropertyListRef obj, CFDataRef *xml, void **dataRef, CFIndex *dataLen) { @@ -367,7 +405,7 @@ _SCSerialize(CFPropertyListRef obj, CFDataRef *xml, void **dataRef, CFIndex *dat 0, NULL); if (myXml == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCSerialize() failed")); + SC_log(LOG_NOTICE, "CFPropertyListCreateData() failed"); if (xml != NULL) { *xml = NULL; } @@ -385,24 +423,14 @@ _SCSerialize(CFPropertyListRef obj, CFDataRef *xml, void **dataRef, CFIndex *dat *dataLen = CFDataGetLength(myXml); } } else { - mach_msg_type_number_t len; - kern_return_t status; - - status = vm_read(mach_task_self(), - (vm_address_t)CFDataGetBytePtr(myXml), // address - (vm_size_t) CFDataGetLength(myXml), // size - (void *)dataRef, - &len); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCSerialize(): %s"), mach_error_string(status)); - CFRelease(myXml); - *dataRef = NULL; - *dataLen = 0; - return FALSE; - } + kern_return_t kr; - *dataLen = len; + kr = __CFDataCopyVMData(myXml, dataRef, dataLen); CFRelease(myXml); + if (kr != KERN_SUCCESS) { + SC_log(LOG_NOTICE, "__CFDataCreateVMData() failed: %s", mach_error_string(kr)); + return FALSE; + } } return TRUE; @@ -423,7 +451,7 @@ _SCUnserialize(CFPropertyListRef *obj, CFDataRef xml, void *dataRef, CFIndex dat status = vm_deallocate(mach_task_self(), (vm_address_t)dataRef, dataLen); if (status != KERN_SUCCESS) { - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("_SCUnserialize(): %s"), mach_error_string(status)); + SC_log(LOG_NOTICE, "vm_deallocate() failed: %s", mach_error_string(status)); /* non-fatal???, proceed */ } } else { @@ -432,7 +460,7 @@ _SCUnserialize(CFPropertyListRef *obj, CFDataRef xml, void *dataRef, CFIndex dat if (*obj == NULL) { if (error != NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCUnserialize(): %@"), error); + SC_log(LOG_NOTICE, "CFPropertyListCreateWithData() failed: %@", error); CFRelease(error); } _SCErrorSet(kSCStatusFailed); @@ -460,7 +488,7 @@ _SCSerializeString(CFStringRef str, CFDataRef *data, void **dataRef, CFIndex *da myData = CFStringCreateExternalRepresentation(NULL, str, kCFStringEncodingUTF8, 0); if (myData == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCSerializeString() failed")); + SC_log(LOG_NOTICE, "CFStringCreateExternalRepresentation() failed"); if (data != NULL) { *data = NULL; } @@ -478,25 +506,14 @@ _SCSerializeString(CFStringRef str, CFDataRef *data, void **dataRef, CFIndex *da *dataLen = CFDataGetLength(myData); } } else { - mach_msg_type_number_t len; - kern_return_t status; - - *dataLen = CFDataGetLength(myData); - status = vm_read(mach_task_self(), - (vm_address_t)CFDataGetBytePtr(myData), // address - *dataLen, // size - (void *)dataRef, - &len); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCSerializeString(): %s"), mach_error_string(status)); - CFRelease(myData); - *dataRef = NULL; - *dataLen = 0; - return FALSE; - } + kern_return_t kr; - *dataLen = len; + kr = __CFDataCopyVMData(myData, dataRef, dataLen); CFRelease(myData); + if (kr != KERN_SUCCESS) { + SC_log(LOG_NOTICE, "__CFDataCreateVMData() failed: %s", mach_error_string(kr)); + return FALSE; + } } return TRUE; @@ -515,7 +532,7 @@ _SCUnserializeString(CFStringRef *str, CFDataRef utf8, void *dataRef, CFIndex da status = vm_deallocate(mach_task_self(), (vm_address_t)dataRef, dataLen); if (status != KERN_SUCCESS) { - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("_SCUnserializeString(): %s"), mach_error_string(status)); + SC_log(LOG_NOTICE, "vm_deallocate() failed: %s", mach_error_string(status)); /* non-fatal???, proceed */ } } else { @@ -523,7 +540,7 @@ _SCUnserializeString(CFStringRef *str, CFDataRef utf8, void *dataRef, CFIndex da } if (*str == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCUnserializeString() failed")); + SC_log(LOG_NOTICE, "CFStringCreateFromExternalRepresentation() failed"); return FALSE; } @@ -534,29 +551,19 @@ _SCUnserializeString(CFStringRef *str, CFDataRef utf8, void *dataRef, CFIndex da Boolean _SCSerializeData(CFDataRef data, void **dataRef, CFIndex *dataLen) { - mach_msg_type_number_t len; - kern_return_t status; + kern_return_t kr; if (!isA_CFData(data)) { /* if not a CFData */ return FALSE; } - *dataLen = CFDataGetLength(data); - status = vm_read(mach_task_self(), - (vm_address_t)CFDataGetBytePtr(data), // address - *dataLen, // size - (void *)dataRef, - &len); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, CFSTR("_SCSerializeData(): %s"), mach_error_string(status)); - *dataRef = NULL; - *dataLen = 0; + kr = __CFDataCopyVMData(data, dataRef, dataLen); + if (kr != KERN_SUCCESS) { + SC_log(LOG_NOTICE, "__CFDataCreateVMData() failed: %s", mach_error_string(kr)); return FALSE; } - *dataLen = len; - return TRUE; } @@ -569,7 +576,7 @@ _SCUnserializeData(CFDataRef *data, void *dataRef, CFIndex dataLen) *data = CFDataCreate(NULL, dataRef, dataLen); status = vm_deallocate(mach_task_self(), (vm_address_t)dataRef, dataLen); if (status != KERN_SUCCESS) { - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("_SCUnserializeData(): %s"), mach_error_string(status)); + SC_log(LOG_NOTICE, "vm_deallocate() failed: %s", mach_error_string(status)); _SCErrorSet(kSCStatusFailed); return FALSE; } @@ -598,7 +605,7 @@ _SCSerializeMultiple(CFDictionaryRef dict) values = CFAllocatorAllocate(NULL, nElements * sizeof(CFTypeRef), 0); pLists = CFAllocatorAllocate(NULL, nElements * sizeof(CFDataRef), 0); } - bzero(pLists, nElements * sizeof(CFDataRef)); + memset(pLists, 0, nElements * sizeof(CFDataRef)); CFDictionaryGetKeysAndValues(dict, keys, values); for (i = 0; i < nElements; i++) { @@ -656,7 +663,7 @@ _SCUnserializeMultiple(CFDictionaryRef dict) values = CFAllocatorAllocate(NULL, nElements * sizeof(CFTypeRef), 0); pLists = CFAllocatorAllocate(NULL, nElements * sizeof(CFTypeRef), 0); } - bzero(pLists, nElements * sizeof(CFTypeRef)); + memset(pLists, 0, nElements * sizeof(CFTypeRef)); CFDictionaryGetKeysAndValues(dict, keys, values); for (i = 0; i < nElements; i++) { @@ -693,6 +700,64 @@ _SCUnserializeMultiple(CFDictionaryRef dict) } +#pragma mark - + + +CFPropertyListRef +_SCCreatePropertyListFromResource(CFURLRef url) +{ + CFDictionaryRef dict = NULL; + SInt64 fileLen = 0; + Boolean ok; + CFReadStreamRef readStream; + CFNumberRef val = NULL; + + if (!CFURLCopyResourcePropertyForKey(url, kCFURLFileSizeKey, &val, NULL) || + (val == NULL)) { + // if size not available + SC_log(LOG_NOTICE, "CFURLCopyResourcePropertyForKey() size not available: %@", url); + return NULL; + } + + ok = CFNumberGetValue(val, kCFNumberSInt64Type, &fileLen); + CFRelease(val); + if (!ok || (fileLen == 0)) { + // if empty or size too large + SC_log(LOG_INFO, "_SCCreatePropertyListFromResource() improper size: %@", url); + return NULL; + } + + readStream = CFReadStreamCreateWithFile(NULL, url); + if (readStream != NULL) { + if (CFReadStreamOpen(readStream)) { + UInt8 *buffer; + CFIndex dataLen; + + buffer = CFAllocatorAllocate(NULL, (CFIndex)fileLen, 0); + dataLen = CFReadStreamRead(readStream, buffer, (CFIndex)fileLen); + if (dataLen == (CFIndex)fileLen) { + CFDataRef data; + + data = CFDataCreateWithBytesNoCopy(NULL, buffer, (CFIndex)fileLen, kCFAllocatorNull); + if (data != NULL) { + dict = CFPropertyListCreateWithData(NULL, + data, + kCFPropertyListImmutable, + NULL, + NULL); + CFRelease(data); + } + } + CFAllocatorDeallocate(NULL, buffer); + CFReadStreamClose(readStream); + } + CFRelease(readStream); + } + + return dict; +} + + #pragma mark - #pragma mark CFRunLoop scheduling @@ -853,7 +918,6 @@ _SC_unschedule(CFTypeRef obj, CFRunLoopRef runLoop, CFStringRef runLoopMode, CFM #define SYSTEMCONFIGURATION_BUNDLE_ID CFSTR("com.apple.SystemConfiguration") -#define SYSTEMCONFIGURATION_FRAMEWORK_PATH "/System/Library/Frameworks/SystemConfiguration.framework" #define SYSTEMCONFIGURATION_FRAMEWORK_PATH_LEN (sizeof(SYSTEMCONFIGURATION_FRAMEWORK_PATH) - 1) #define SUFFIX_SYM "~sym" @@ -868,15 +932,19 @@ _SC_CFBundleGet(void) static CFBundleRef bundle = NULL; char *env; size_t len; + CFURLRef url; if (bundle != NULL) { - return bundle; + goto done; } bundle = CFBundleGetBundleWithIdentifier(SYSTEMCONFIGURATION_BUNDLE_ID); if (bundle != NULL) { CFRetain(bundle); // we want to hold a reference to the bundle - return bundle; + goto done; + } else { + SC_log(LOG_NOTICE, "could not get CFBundle for \"%@\". Trying harder...", + SYSTEMCONFIGURATION_BUNDLE_ID); } // if appropriate (e.g. when debugging), try a bit harder @@ -884,144 +952,177 @@ _SC_CFBundleGet(void) env = getenv("DYLD_FRAMEWORK_PATH"); len = (env != NULL) ? strlen(env) : 0; - // trim any trailing slashes - while (len > 1) { - if (env[len - 1] != '/') { - break; + if (len > 0) { /* We are debugging */ + + // trim any trailing slashes + while (len > 1) { + if (env[len - 1] != '/') { + break; + } + len--; + } + + // if DYLD_FRAMEWORK_PATH is ".../xxx~sym" than try ".../xxx~dst" + if ((len > SUFFIX_SYM_LEN) && + (strncmp(&env[len - SUFFIX_SYM_LEN], SUFFIX_SYM, SUFFIX_SYM_LEN) == 0) && + ((len + SYSTEMCONFIGURATION_FRAMEWORK_PATH_LEN) < MAXPATHLEN)) { + char path[MAXPATHLEN]; + + strlcpy(path, env, sizeof(path)); + strlcpy(&path[len - SUFFIX_SYM_LEN], SUFFIX_DST, sizeof(path) - (len - SUFFIX_SYM_LEN)); + strlcat(&path[len], SYSTEMCONFIGURATION_FRAMEWORK_PATH, sizeof(path) - len); + + url = CFURLCreateFromFileSystemRepresentation(NULL, + (UInt8 *)path, + len + SYSTEMCONFIGURATION_FRAMEWORK_PATH_LEN, + TRUE); + bundle = CFBundleCreate(NULL, url); + CFRelease(url); } - len--; } - // if DYLD_FRAMEWORK_PATH is ".../xxx~sym" than try ".../xxx~dst" - if ((len > SUFFIX_SYM_LEN) && - (strncmp(&env[len - SUFFIX_SYM_LEN], SUFFIX_SYM, SUFFIX_SYM_LEN) == 0) && - ((len + SYSTEMCONFIGURATION_FRAMEWORK_PATH_LEN) < MAXPATHLEN)) { - char path[MAXPATHLEN]; - CFURLRef url; + if (bundle == NULL) { /* Try a more "direct" route to get the bundle */ - strlcpy(path, env, sizeof(path)); - strlcpy(&path[len - SUFFIX_SYM_LEN], SUFFIX_DST, sizeof(path) - (len - SUFFIX_SYM_LEN)); - strlcat(&path[len], SYSTEMCONFIGURATION_FRAMEWORK_PATH, sizeof(path) - len); + url = CFURLCreateWithFileSystemPath(NULL, + CFSTR(SYSTEMCONFIGURATION_FRAMEWORK_PATH), + kCFURLPOSIXPathStyle, + TRUE); - url = CFURLCreateFromFileSystemRepresentation(NULL, - (UInt8 *)path, - len + SYSTEMCONFIGURATION_FRAMEWORK_PATH_LEN, - TRUE); bundle = CFBundleCreate(NULL, url); CFRelease(url); } if (bundle == NULL) { - static Boolean warned = FALSE; - - SCLog(!warned, LOG_WARNING, - CFSTR("_SC_CFBundleGet(), could not get CFBundle for \"%@\""), - SYSTEMCONFIGURATION_BUNDLE_ID); - warned = TRUE; + SC_log(LOG_ERR, "could not get CFBundle for \"%@\"", SYSTEMCONFIGURATION_BUNDLE_ID); } +done: return bundle; } +/* + * cachedInfo + * + * bundleID-tableName + * + * ... property list from non-localized bundle URL + * + * + */ +static CFMutableDictionaryRef cachedInfo = NULL; + + +static dispatch_queue_t +_SC_CFBundleCachedInfoQueue() +{ + static dispatch_once_t once; + static dispatch_queue_t q; + + dispatch_once(&once, ^{ + q = dispatch_queue_create("_SC_CFBundleCachedInfo", NULL); + }); + + return q; +} + + +static CFStringRef +_SC_CFBundleCachedInfoCopyTableKey(CFBundleRef bundle, CFStringRef tableName) +{ + CFStringRef bundleID; + CFStringRef tableKey; + + bundleID = CFBundleGetIdentifier(bundle); + tableKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@: %@"), bundleID, tableName); + return tableKey; +} + + +static CFDictionaryRef +_SC_CFBundleCachedInfoCopyTable(CFBundleRef bundle, CFStringRef tableName) +{ + __block CFDictionaryRef dict = NULL; + + dispatch_sync(_SC_CFBundleCachedInfoQueue(), ^{ + if (cachedInfo != NULL) { + CFStringRef tableKey; + + tableKey = _SC_CFBundleCachedInfoCopyTableKey(bundle, tableName); + dict = CFDictionaryGetValue(cachedInfo, tableKey); + if (dict != NULL) { + CFRetain(dict); + } + CFRelease(tableKey); + } + }); + + return dict; +} + + +static void +_SC_CFBundleCachedInfoSaveTable(CFBundleRef bundle, CFStringRef tableName, CFDictionaryRef table) +{ + + dispatch_sync(_SC_CFBundleCachedInfoQueue(), ^{ + CFStringRef tableKey; + + tableKey = _SC_CFBundleCachedInfoCopyTableKey(bundle, tableName); + SC_log(LOG_DEBUG, "Caching %@", tableKey); + + if (cachedInfo == NULL) { + cachedInfo = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + CFDictionarySetValue(cachedInfo, tableKey, table); + CFRelease(tableKey); + }); + + return; +} + + CFStringRef _SC_CFBundleCopyNonLocalizedString(CFBundleRef bundle, CFStringRef key, CFStringRef value, CFStringRef tableName) { - CFDataRef data = NULL; - SInt32 errCode = 0; - Boolean ok; - CFURLRef resourcesURL; CFStringRef str = NULL; + CFDictionaryRef table = NULL; CFURLRef url; - if ((tableName == NULL) || CFEqual(tableName, CFSTR(""))) tableName = CFSTR("Localizable"); - - /* - * First, try getting the requested string using a manually constructed - * URL to /Resources/English.lproj/.strings. Do this - * because CFBundleCopyResourceURLForLocalization() uses CFPreferences - * to get the preferred localizations, CFPreferences talks to - * OpenDirectory, and OpenDirectory tries to obtain the platform UUID. - * On machines where the platform UUID is set by InterfaceNamer, a - * deadlock can occur if InterfaceNamer calls - * CFBundleCopyResourceURLForLocalization() before setting the - * platform UUID in the kernel. - */ - resourcesURL = CFBundleCopyResourcesDirectoryURL(bundle); - if (resourcesURL != NULL) { - CFStringRef fileName = CFStringCreateWithFormat( - NULL, NULL, CFSTR("%@.strings"), tableName); - CFURLRef enlproj = CFURLCreateCopyAppendingPathComponent( - NULL, resourcesURL, CFSTR("English.lproj"), true); - url = CFURLCreateCopyAppendingPathComponent( - NULL, enlproj, fileName, false); - CFRelease(enlproj); - CFRelease(fileName); - CFRelease(resourcesURL); - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated" - ok = CFURLCreateDataAndPropertiesFromResource(NULL, - url, - &data, - NULL, - NULL, - &errCode); -#pragma GCC diagnostic pop - if (!ok) { - /* - * Failed to get the data using a manually-constructed URL - * for the given strings table. Fall back to using - * CFBundleCopyResourceURLForLocalization() below. - */ - data = NULL; - } - CFRelease(url); + if ((tableName == NULL) || CFEqual(tableName, CFSTR(""))) { + tableName = CFSTR("Localizable"); } - if (data == NULL) { + table = _SC_CFBundleCachedInfoCopyTable(bundle, tableName); + if (table == NULL) { url = CFBundleCopyResourceURLForLocalization(bundle, tableName, CFSTR("strings"), NULL, - CFSTR("English")); + CFSTR("en")); if (url != NULL) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated" - ok = CFURLCreateDataAndPropertiesFromResource(NULL, - url, - &data, - NULL, - NULL, - &errCode); -#pragma GCC diagnostic pop - if (!ok) { - data = NULL; - } + table = _SCCreatePropertyListFromResource(url); CFRelease(url); + if (table != NULL) { + _SC_CFBundleCachedInfoSaveTable(bundle, tableName, table); + } + } else { + SC_log(LOG_ERR, "failed to get resource url: {bundle:%@, table: %@}", bundle, tableName); } } - if (data != NULL) { - CFDictionaryRef table; - - table = CFPropertyListCreateWithData(NULL, - data, - kCFPropertyListImmutable, - NULL, - NULL); - if (table != NULL) { - if (isA_CFDictionary(table)) { - str = CFDictionaryGetValue(table, key); - if (str != NULL) { - CFRetain(str); - } + if (table != NULL) { + if (isA_CFDictionary(table)) { + str = CFDictionaryGetValue(table, key); + if (str != NULL) { + CFRetain(str); } - - CFRelease(table); } - CFRelease(data); + CFRelease(table); } if (str == NULL) { @@ -1043,17 +1144,16 @@ _SC_CFMachPortCreateWithPort(const char *portDescription, CFMachPortContext *context) { CFMachPortRef port; - Boolean shouldFree = FALSE; + Boolean shouldFree = FALSE; port = CFMachPortCreateWithPort(NULL, portNum, callout, context, &shouldFree); if ((port == NULL) || shouldFree) { + char *crash_info; CFStringRef err; - char *crash_info = NULL; - SCLog(TRUE, LOG_ERR, - CFSTR("%s: CFMachPortCreateWithPort() failed , port = %p"), - portDescription, - (void *)(uintptr_t)portNum); + SC_log(LOG_NOTICE, "%s: CFMachPortCreateWithPort() failed , port = %p", + portDescription, + (void *)(uintptr_t)portNum); if (port != NULL) { err = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s: CFMachPortCreateWithPort recycled, [old] port = %@"), @@ -1064,8 +1164,7 @@ _SC_CFMachPortCreateWithPort(const char *portDescription, portDescription); } crash_info = _SC_cfstring_to_cstring(err, NULL, 0, kCFStringEncodingASCII); - if (err != NULL) CFRelease(err); - + CFRelease(err); err = CFStringCreateWithFormat(NULL, NULL, @@ -1073,7 +1172,7 @@ _SC_CFMachPortCreateWithPort(const char *portDescription, getprogname()); _SC_crash(crash_info, CFSTR("CFMachPort error"), err); CFAllocatorDeallocate(NULL, crash_info); - if (err != NULL) CFRelease(err); + CFRelease(err); } return port; @@ -1190,7 +1289,7 @@ _SC_logMachPortStatus(void) mach_msg_type_number_t pi, pn, tn; CFMutableStringRef str; - SCLog(TRUE, LOG_NOTICE, CFSTR("----------")); + SC_log(LOG_DEBUG, "----------"); /* report on ALL mach ports associated with this task */ status = mach_port_names(mach_task_self(), &ports, &pn, &types, &tn); @@ -1217,7 +1316,7 @@ _SC_logMachPortStatus(void) *rp = '\0'; CFStringAppendFormat(str, NULL, CFSTR(" %d%s"), ports[pi], rights); } - SCLog(TRUE, LOG_NOTICE, CFSTR("Task ports (n=%d):%@"), pn, str); + SC_log(LOG_DEBUG, "Task ports (n=%d):%@", pn, str); CFRelease(str); } @@ -1225,13 +1324,111 @@ _SC_logMachPortStatus(void) } +__private_extern__ +kern_return_t +_SC_getMachPortReferences(mach_port_t port, + mach_port_type_t *pt, + mach_port_urefs_t *refs_send, + mach_port_urefs_t *refs_recv, + mach_port_status_t *recv_status, + mach_port_urefs_t *refs_once, + mach_port_urefs_t *refs_pset, + mach_port_urefs_t *refs_dead, + const char *err_prefix) +{ + kern_return_t status; + + status = mach_port_type(mach_task_self(), port, pt); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_type(..., 0x%x): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + + if ((refs_send != NULL) && ((*pt & MACH_PORT_TYPE_SEND) != 0)) { + status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, refs_send); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_SEND): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + } + + if ((refs_recv != NULL) && (recv_status != NULL) && ((*pt & MACH_PORT_TYPE_RECEIVE) != 0)) { + mach_msg_type_number_t count; + + status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, refs_recv); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_RECEIVE): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + + count = MACH_PORT_RECEIVE_STATUS_COUNT; + status = mach_port_get_attributes(mach_task_self(), + port, + MACH_PORT_RECEIVE_STATUS, + (mach_port_info_t)recv_status, + &count); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_get_attributes(..., 0x%x, MACH_PORT_RECEIVE_STATUS): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + } + + if ((refs_once != NULL) && ((*pt & MACH_PORT_TYPE_SEND_ONCE) != 0)) { + status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND_ONCE, refs_once); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_SEND_ONCE): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + } + + if ((refs_pset != NULL) && ((*pt & MACH_PORT_TYPE_PORT_SET) != 0)) { + status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_PORT_SET, refs_pset); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_PORT_SET): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + } + + if ((refs_dead != NULL) && ((*pt & MACH_PORT_TYPE_DEAD_NAME) != 0)) { + status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_DEAD_NAME, refs_dead); + if (status != KERN_SUCCESS) { + SC_log(LOG_DEBUG, "%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_DEAD_NAME): %s", + err_prefix, + port, + mach_error_string(status)); + return status; + } + } + + return KERN_SUCCESS; +} + + void _SC_logMachPortReferences(const char *str, mach_port_t port) { const char *blanks = " "; char buf[60]; mach_port_type_t pt; - mach_port_status_t recv_status = { 0 }; + mach_port_status_t recv_status = { .mps_nsrequest = 0, }; mach_port_urefs_t refs_send = 0; mach_port_urefs_t refs_recv = 0; mach_port_urefs_t refs_once = 0; @@ -1263,105 +1460,30 @@ _SC_logMachPortReferences(const char *str, mach_port_t port) } } - status = mach_port_type(mach_task_self(), port, &pt); + status = _SC_getMachPortReferences(port, + &pt, + &refs_send, + &refs_recv, + &recv_status, + &refs_once, + &refs_pset, + &refs_dead, + buf); if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_SEND): %s"), - buf, - port, - mach_error_string(status)); return; } - if ((pt & MACH_PORT_TYPE_SEND) != 0) { - status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, &refs_send); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_SEND): %s"), - buf, - port, - mach_error_string(status)); - return; - } - } - - if ((pt & MACH_PORT_TYPE_RECEIVE) != 0) { - mach_msg_type_number_t count; - - status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, &refs_recv); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_RECEIVE): %s"), - buf, - port, - mach_error_string(status)); - return; - } - - count = MACH_PORT_RECEIVE_STATUS_COUNT; - status = mach_port_get_attributes(mach_task_self(), - port, - MACH_PORT_RECEIVE_STATUS, - (mach_port_info_t)&recv_status, - &count); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_attributes(..., 0x%x, MACH_PORT_RECEIVE_STATUS): %s"), - buf, - port, - mach_error_string(status)); - return; - } - } - - if ((pt & MACH_PORT_TYPE_SEND_ONCE) != 0) { - status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND_ONCE, &refs_once); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_SEND_ONCE): %s"), - buf, - port, - mach_error_string(status)); - return; - } - } - - if ((pt & MACH_PORT_TYPE_PORT_SET) != 0) { - status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_PORT_SET, &refs_pset); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_PORT_SET): %s"), - buf, - port, - mach_error_string(status)); - return; - } - } - - if ((pt & MACH_PORT_TYPE_DEAD_NAME) != 0) { - status = mach_port_get_refs(mach_task_self(), port, MACH_PORT_RIGHT_DEAD_NAME, &refs_dead); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach_port_get_refs(..., 0x%x, MACH_PORT_RIGHT_DEAD_NAME): %s"), - buf, - port, - mach_error_string(status)); - return; - } - } - - SCLog(TRUE, LOG_NOTICE, - CFSTR("%smach port 0x%x (%d): send=%d, receive=%d, send once=%d, port set=%d, dead name=%d%s%s"), - buf, - port, - port, - refs_send, - refs_recv, - refs_once, - refs_pset, - refs_dead, - recv_status.mps_nsrequest ? ", no more senders" : "", - ((pt & MACH_PORT_TYPE_DEAD_NAME) != 0) ? ", dead name request" : ""); + SC_log(LOG_DEBUG, "%smach port 0x%x (%d): send=%d, receive=%d, send once=%d, port set=%d, dead name=%d%s%s", + buf, + port, + port, + refs_send, + refs_recv, + refs_once, + refs_pset, + refs_dead, + recv_status.mps_nsrequest ? ", no more senders" : "", + ((pt & MACH_PORT_TYPE_DEAD_NAME) != 0) ? ", dead name request" : ""); return; } @@ -1377,7 +1499,7 @@ _SC_copyBacktrace() n = backtrace(stack, sizeof(stack)/sizeof(stack[0])); if (n == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("backtrace() failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "backtrace() failed: %s", strerror(errno)); return NULL; } @@ -1398,114 +1520,62 @@ _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) +static void +_SC_ReportCrash(CFStringRef notifyHeader, CFStringRef notifyMessage) { - Boolean ok = FALSE; - -#if ! TARGET_IPHONE_SIMULATOR - static bool (*dyfunc_SimulateCrash)(pid_t, mach_exception_data_type_t, CFStringRef) = NULL; - static void *image = NULL; - - if ((dyfunc_SimulateCrash == NULL) && (image == NULL)) { - const char *framework = "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport"; - struct stat statbuf; - const char *suffix = getenv("DYLD_IMAGE_SUFFIX"); - char path[MAXPATHLEN]; - - strlcpy(path, framework, sizeof(path)); - if (suffix) strlcat(path, suffix, sizeof(path)); - if (0 <= stat(path, &statbuf)) { - image = dlopen(path, RTLD_LAZY | RTLD_LOCAL); - } else { - image = dlopen(framework, RTLD_LAZY | RTLD_LOCAL); - } - - if (image != NULL) { - dyfunc_SimulateCrash = dlsym(image, "SimulateCrash"); - } else { - image = (void *)0x1; // to ensure that we only dlopen() once - } - } - - if (dyfunc_SimulateCrash != NULL) { - CFStringRef str; - - str = CFStringCreateWithCString(NULL, crash_info, kCFStringEncodingUTF8); - ok = dyfunc_SimulateCrash(getpid(), 0xbad0005cull, str); - CFRelease(str); - } - -#if TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) - if (ok && (notifyHeader != NULL) && (notifyMessage != NULL)) { - static Boolean warned = FALSE; - - if (!warned) { - CFStringRef displayMessage; - - displayMessage = CFStringCreateWithFormat(NULL, - NULL, - CFSTR("%@\n\nPlease collect the crash report and file a Radar."), - notifyMessage); - CFUserNotificationDisplayNotice(0, - kCFUserNotificationStopAlertLevel, - NULL, - NULL, - NULL, - notifyHeader, - displayMessage, - NULL); - CFRelease(displayMessage); - warned = TRUE; - } +#if !TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +#pragma unused(notifyHeader) +#pragma unused(notifyMessage) +#endif // !TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + static Boolean warned = FALSE; + + if (!warned) { +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR + CFStringRef displayMessage; + + displayMessage = CFStringCreateWithFormat(NULL, + NULL, + CFSTR("%@\n\nPlease collect the crash report and file a Radar."), + notifyMessage); + CFUserNotificationDisplayNotice(0, + kCFUserNotificationStopAlertLevel, + NULL, + NULL, + NULL, + notifyHeader, + displayMessage, + NULL); + CFRelease(displayMessage); +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR + warned = TRUE; } -#endif // TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) -#endif /* ! TARGET_IPHONE_SIMULATOR */ - return ok; + return; } void _SC_crash(const char *crash_info, CFStringRef notifyHeader, CFStringRef notifyMessage) { - Boolean ok = FALSE; + if (_SC_isAppleInternal()) { + if (crash_info != NULL) { + CRSetCrashLogMessage(crash_info); + SC_log(LOG_NOTICE, "%s", crash_info); + } - if (crash_info != NULL) { -#if !TARGET_OS_IPHONE - CRSetCrashLogMessage(crash_info); -#else // !TARGET_OS_IPHONE - __crashreporter_info__ = crash_info; -#endif // !TARGET_OS_IPHONE + // simulate a crash report + os_log_with_type(SC_LOG_HANDLE(), OS_LOG_TYPE_FAULT, "%s", crash_info); - SCLog(TRUE, LOG_ERR, CFSTR("%s"), crash_info); - } + // report the crash to the user + if ((notifyHeader != NULL) && (notifyMessage != NULL)) { + _SC_ReportCrash(notifyHeader, notifyMessage); + } - if (_SC_isAppleInternal()) { - // simulate a crash report - ok = _SC_SimulateCrash(crash_info, notifyHeader, notifyMessage); -#ifndef DO_NOT_CRASH - if (!ok) { - // if we could not simulate a crash report, crash for real - __builtin_trap(); + if (crash_info != NULL) { + CRSetCrashLogMessage(NULL); } -#endif // DO_NOT_CRASH } -#if !TARGET_OS_IPHONE - CRSetCrashLogMessage(NULL); -#else // !TARGET_OS_IPHONE - __crashreporter_info__ = NULL; -#endif // !TARGET_OS_IPHONE return; } @@ -1530,7 +1600,7 @@ _SC_getconninfo(int socket, struct sockaddr_storage *src_addr, struct sockaddr_s } if (ioctl(socket, SIOCGCONNINFO, &request) != 0) { - SCLog(TRUE, LOG_WARNING, CFSTR("SIOCGCONNINFO failed: %s"), strerror(errno)); + SC_log(LOG_NOTICE, "SIOCGCONNINFO failed: %s", strerror(errno)); return FALSE; } diff --git a/src/configd/SystemConfiguration.fproj/SCDRemove.c b/src/configd/SystemConfiguration.fproj/SCDRemove.c index 8f95d37ce..78d56d68a 100644 --- a/src/configd/SystemConfiguration.fproj/SCDRemove.c +++ b/src/configd/SystemConfiguration.fproj/SCDRemove.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016-2019 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@ */ @@ -31,10 +31,6 @@ * - initial revision */ -#include -#include -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ @@ -65,6 +61,26 @@ SCDynamicStoreRemoveValue(SCDynamicStoreRef store, CFStringRef key) return FALSE; } + if (storePrivate->cache_active) { + if (storePrivate->cached_set != NULL) { + CFDictionaryRemoveValue(storePrivate->cached_set, key); + } + + if (storePrivate->cached_removals == NULL) { + storePrivate->cached_removals = CFArrayCreateMutable(NULL, + 0, + &kCFTypeArrayCallBacks); + } + + if (!CFArrayContainsValue(storePrivate->cached_removals, + CFRangeMake(0, CFArrayGetCount(storePrivate->cached_removals)), + key)) { + CFArrayAppendValue(storePrivate->cached_removals, key); + } + + return TRUE; + } + /* serialize the key */ if (!_SCSerializeString(key, &utfKey, (void **)&myKeyRef, &myKeyLen)) { _SCErrorSet(kSCStatusFailed); diff --git a/src/configd/SystemConfiguration.fproj/SCDSet.c b/src/configd/SystemConfiguration.fproj/SCDSet.c index 9eec2e897..7a4ea46f6 100644 --- a/src/configd/SystemConfiguration.fproj/SCDSet.c +++ b/src/configd/SystemConfiguration.fproj/SCDSet.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2006, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2009-2011, 2013, 2016-2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ @@ -174,6 +169,29 @@ SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFPropertyListR return FALSE; } + if (storePrivate->cache_active) { + if (storePrivate->cached_removals != NULL) { + CFIndex i; + + i = CFArrayGetFirstIndexOfValue(storePrivate->cached_removals, + CFRangeMake(0, CFArrayGetCount(storePrivate->cached_removals)), + key); + if (i != kCFNotFound) { + // if previously "removed" + CFArrayRemoveValueAtIndex(storePrivate->cached_removals, i); + } + } + + if (storePrivate->cached_set == NULL) { + storePrivate->cached_set = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + CFDictionarySetValue(storePrivate->cached_set, key, value); + return TRUE; + } + /* serialize the key */ if (!_SCSerializeString(key, &utfKey, (void **)&myKeyRef, &myKeyLen)) { _SCErrorSet(kSCStatusInvalidArgument); diff --git a/src/configd/SystemConfiguration.fproj/SCDSnapshot.c b/src/configd/SystemConfiguration.fproj/SCDSnapshot.c index 3c8ac059e..739743219 100644 --- a/src/configd/SystemConfiguration.fproj/SCDSnapshot.c +++ b/src/configd/SystemConfiguration.fproj/SCDSnapshot.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2005, 2009-2011, 2016, 2017, 2019 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@ */ @@ -31,11 +31,6 @@ * - initial revision */ -#include -#include - -#include -#include #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ diff --git a/src/configd/SystemConfiguration.fproj/SCDynamicStore.h b/src/configd/SystemConfiguration.fproj/SCDynamicStore.h index cc431f481..3fd8c0024 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStore.h +++ b/src/configd/SystemConfiguration.fproj/SCDynamicStore.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2008-2010 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,22 +17,21 @@ * 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 #include +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN /*! @header SCDynamicStore @@ -59,7 +58,7 @@ @discussion This is the handle to an open a dynamic store session with the system configuration daemon. */ -typedef const struct __SCDynamicStore * SCDynamicStoreRef; +typedef const struct CF_BRIDGED_TYPE(id) __SCDynamicStore * SCDynamicStoreRef; /*! @typedef SCDynamicStoreContext @@ -81,10 +80,10 @@ typedef const struct __SCDynamicStore * SCDynamicStoreRef; */ typedef struct { CFIndex version; - void * info; - const void *(*retain)(const void *info); - void (*release)(const void *info); - CFStringRef (*copyDescription)(const void *info); + void * __nullable info; + const void * __nonnull (* __nullable retain)(const void *info); + void (* __nullable release)(const void *info); + CFStringRef __nonnull (* __nullable copyDescription)(const void *info); } SCDynamicStoreContext; /*! @@ -107,9 +106,9 @@ typedef struct { @param info A C pointer to a user-specified block of data. */ typedef void (*SCDynamicStoreCallBack) ( - SCDynamicStoreRef store, - CFArrayRef changedKeys, - void *info + SCDynamicStoreRef store, + CFArrayRef changedKeys, + void * __nullable info ); @@ -120,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)); /*! @@ -142,13 +141,13 @@ SCDynamicStoreGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE @result Returns a reference to the new SCDynamicStore session. You must release the returned value. */ -SCDynamicStoreRef +SCDynamicStoreRef __nullable SCDynamicStoreCreate ( - CFAllocatorRef allocator, - CFStringRef name, - SCDynamicStoreCallBack callout, - SCDynamicStoreContext *context - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + CFStringRef name, + SCDynamicStoreCallBack __nullable callout, + SCDynamicStoreContext * __nullable context + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCreateWithOptions @@ -187,16 +186,16 @@ SCDynamicStoreCreate ( @result Returns a reference to the new SCDynamicStore session. You must release the returned value. */ -SCDynamicStoreRef +SCDynamicStoreRef __nullable SCDynamicStoreCreateWithOptions ( - CFAllocatorRef allocator, - CFStringRef name, - CFDictionaryRef storeOptions, - SCDynamicStoreCallBack callout, - SCDynamicStoreContext *context - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + CFStringRef name, + CFDictionaryRef __nullable storeOptions, + SCDynamicStoreCallBack __nullable callout, + SCDynamicStoreContext * __nullable context + ) 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 @@ -221,12 +220,12 @@ extern const CFStringRef kSCDynamicStoreUseSessionKeys __OSX_AVAILABLE_STARTING You must release the returned value. */ -CFRunLoopSourceRef +CFRunLoopSourceRef __nullable SCDynamicStoreCreateRunLoopSource ( - CFAllocatorRef allocator, - SCDynamicStoreRef store, - CFIndex order - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + SCDynamicStoreRef store, + CFIndex order + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetDispatchQueue @@ -240,9 +239,9 @@ SCDynamicStoreCreateRunLoopSource ( */ Boolean SCDynamicStoreSetDispatchQueue ( - SCDynamicStoreRef store, - dispatch_queue_t queue - ) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0/*SPI*/); + SCDynamicStoreRef store, + dispatch_queue_t __nullable queue + ) API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyKeyList @@ -255,11 +254,11 @@ SCDynamicStoreSetDispatchQueue ( encountered. You must release the returned value. */ -CFArrayRef +CFArrayRef __nullable SCDynamicStoreCopyKeyList ( - SCDynamicStoreRef store, - CFStringRef pattern - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringRef pattern + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreAddValue @@ -273,10 +272,10 @@ SCDynamicStoreCopyKeyList ( */ Boolean SCDynamicStoreAddValue ( - SCDynamicStoreRef store, - CFStringRef key, - CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringRef key, + CFPropertyListRef value + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreAddTemporaryValue @@ -295,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 @@ -306,11 +305,11 @@ SCDynamicStoreAddTemporaryValue ( key; NULL if no value was located or an error was encountered. You must release the returned value. */ -CFPropertyListRef +CFPropertyListRef __nullable SCDynamicStoreCopyValue ( - SCDynamicStoreRef store, - CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringRef key + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyMultiple @@ -325,12 +324,12 @@ SCDynamicStoreCopyValue ( NULL if an error was encountered. You must release the returned value. */ -CFDictionaryRef +CFDictionaryRef __nullable SCDynamicStoreCopyMultiple ( - SCDynamicStoreRef store, - CFArrayRef keys, - CFArrayRef patterns - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFArrayRef __nullable keys, + CFArrayRef __nullable patterns + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetValue @@ -343,10 +342,10 @@ SCDynamicStoreCopyMultiple ( */ Boolean SCDynamicStoreSetValue ( - SCDynamicStoreRef store, - CFStringRef key, - CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringRef key, + CFPropertyListRef value + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetMultiple @@ -359,11 +358,11 @@ SCDynamicStoreSetValue ( */ Boolean SCDynamicStoreSetMultiple ( - SCDynamicStoreRef store, - CFDictionaryRef keysToSet, - CFArrayRef keysToRemove, - CFArrayRef keysToNotify - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFDictionaryRef __nullable keysToSet, + CFArrayRef __nullable keysToRemove, + CFArrayRef __nullable keysToNotify + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreRemoveValue @@ -376,9 +375,9 @@ SCDynamicStoreSetMultiple ( */ Boolean SCDynamicStoreRemoveValue ( - SCDynamicStoreRef store, - CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringRef key + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreNotifyValue @@ -392,9 +391,9 @@ SCDynamicStoreRemoveValue ( */ Boolean SCDynamicStoreNotifyValue ( - SCDynamicStoreRef store, - CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringRef key + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetNotificationKeys @@ -410,10 +409,10 @@ SCDynamicStoreNotifyValue ( */ Boolean SCDynamicStoreSetNotificationKeys ( - SCDynamicStoreRef store, - CFArrayRef keys, - CFArrayRef patterns - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef store, + CFArrayRef __nullable keys, + CFArrayRef __nullable patterns + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyNotifiedKeys @@ -427,12 +426,14 @@ SCDynamicStoreSetNotificationKeys ( NULL if an error was encountered. You must release the returned value. */ -CFArrayRef +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 -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ +CF_ASSUME_NONNULL_END +CF_IMPLICIT_BRIDGING_DISABLED + #endif /* _SCDYNAMICSTORE_H */ diff --git a/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h b/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h index 66148ea92..8750ee897 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h +++ b/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001, 2002, 2004, 2005, 2008, 2012 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,21 +17,20 @@ * 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 +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN /*! @header SCDynamicStoreCopyDHCPInfo @@ -59,9 +58,9 @@ __BEGIN_DECLS A non-NULL return value must be released using CFRelease(). */ -CFDictionaryRef -SCDynamicStoreCopyDHCPInfo (SCDynamicStoreRef store, - CFStringRef serviceID) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +CFDictionaryRef __nullable +SCDynamicStoreCopyDHCPInfo (SCDynamicStoreRef __nullable store, + CFStringRef __nullable serviceID) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function DHCPInfoGetOptionData @@ -76,9 +75,9 @@ SCDynamicStoreCopyDHCPInfo (SCDynamicStoreRef store, The return value must NOT be released. */ -CFDataRef +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 @@ -92,8 +91,8 @@ DHCPInfoGetOptionData (CFDictionaryRef info, The return value must NOT be released. */ -CFDateRef -DHCPInfoGetLeaseStartTime (CFDictionaryRef info) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +CFDateRef __nullable +DHCPInfoGetLeaseStartTime (CFDictionaryRef info) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -109,10 +108,12 @@ DHCPInfoGetLeaseStartTime (CFDictionaryRef info) __OSX_AVAILABLE_STARTING(__MAC The return value must NOT be released. */ -CFDateRef -DHCPInfoGetLeaseExpirationTime (CFDictionaryRef info) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +CFDateRef __nullable +DHCPInfoGetLeaseExpirationTime (CFDictionaryRef info) API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ +CF_ASSUME_NONNULL_END +CF_IMPLICIT_BRIDGING_DISABLED + #endif /* _SCDYNAMICSTORECOPYDHCPINFO_H */ diff --git a/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h b/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h index 5b102b00a..886e7315a 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h +++ b/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2008 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,22 +17,21 @@ * 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 #include +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN /*! @header SCDynamicStoreCopySpecific @@ -58,11 +57,11 @@ __BEGIN_DECLS NULL if the name has not been set or if an error was encountered. You must release the returned value. */ -CFStringRef +CFStringRef __nullable SCDynamicStoreCopyComputerName ( - SCDynamicStoreRef store, - CFStringEncoding *nameEncoding - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store, + CFStringEncoding * __nullable nameEncoding + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyConsoleUser @@ -86,12 +85,12 @@ SCDynamicStoreCopyComputerName ( NULL if no user is logged in or if an error was encountered. You must release the returned value. */ -CFStringRef +CFStringRef __nullable SCDynamicStoreCopyConsoleUser ( - SCDynamicStoreRef store, - uid_t *uid, - gid_t *gid - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + SCDynamicStoreRef __nullable store, + uid_t * __nullable uid, + gid_t * __nullable gid + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreCopyLocalHostName @@ -103,10 +102,10 @@ SCDynamicStoreCopyConsoleUser ( NULL if the name has not been set or if an error was encountered. You must release the returned value. */ -CFStringRef +CFStringRef __nullable SCDynamicStoreCopyLocalHostName ( - SCDynamicStoreRef store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyLocation @@ -119,10 +118,10 @@ SCDynamicStoreCopyLocalHostName ( was encountered. You must release the returned value. */ -CFStringRef +CFStringRef __nullable SCDynamicStoreCopyLocation ( - SCDynamicStoreRef store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + SCDynamicStoreRef __nullable store + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreCopyProxies @@ -204,12 +203,14 @@ SCDynamicStoreCopyLocation ( was encountered. You must release the returned value. */ -CFDictionaryRef +CFDictionaryRef __nullable SCDynamicStoreCopyProxies ( - SCDynamicStoreRef store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + SCDynamicStoreRef __nullable store + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ +CF_ASSUME_NONNULL_END +CF_IMPLICIT_BRIDGING_DISABLED + #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */ diff --git a/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h b/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h index b3bc35149..648afea8e 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h +++ b/src/configd/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/src/configd/SystemConfiguration.fproj/SCDynamicStoreInternal.h b/src/configd/SystemConfiguration.fproj/SCDynamicStoreInternal.h index b81fbfc2a..aa4479a67 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStoreInternal.h +++ b/src/configd/SystemConfiguration.fproj/SCDynamicStoreInternal.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2009-2011, 2013, 2015-2019 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 _SCDYNAMICSTOREINTERNAL_H #define _SCDYNAMICSTOREINTERNAL_H -#include +#include #include #include #include @@ -32,9 +32,16 @@ #include #include #include +#include #include #include -#include + +#ifndef SC_LOG_HANDLE +#define SC_LOG_HANDLE __log_SCDynamicStore +#endif // SC_LOG_HANDLE +#include +#include +#include /* Define the status of any registered notification. */ @@ -43,7 +50,6 @@ typedef enum { Using_NotifierWait, Using_NotifierInformViaMachPort, Using_NotifierInformViaFD, - Using_NotifierInformViaSignal, Using_NotifierInformViaRunLoop, Using_NotifierInformViaDispatch } __SCDynamicStoreNotificationStatus; @@ -97,33 +103,43 @@ typedef struct { int notifyFile; int notifyFileIdentifier; - /* "server" information associated with SCDynamicStoreNotifySignal() */ - int notifySignal; - task_t notifySignalTask; + /* caching */ + Boolean cache_active; + CFMutableDictionaryRef cached_keys; + CFMutableDictionaryRef cached_set; + CFMutableArrayRef cached_removals; + CFMutableArrayRef cached_notifys; } SCDynamicStorePrivate, *SCDynamicStorePrivateRef; __BEGIN_DECLS +__private_extern__ +os_log_t +__log_SCDynamicStore (void); + SCDynamicStorePrivateRef __SCDynamicStoreCreatePrivate (CFAllocatorRef allocator, const CFStringRef name, 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/src/configd/SystemConfiguration.fproj/SCDynamicStoreKey.h b/src/configd/SystemConfiguration.fproj/SCDynamicStoreKey.h index 7e3fbc0e5..aa2827409 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStoreKey.h +++ b/src/configd/SystemConfiguration.fproj/SCDynamicStoreKey.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2002, 2004, 2005, 2008 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,20 +17,19 @@ * 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 +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN /*! @header SCDynamicStoreKey @@ -62,10 +61,10 @@ __BEGIN_DECLS */ CFStringRef SCDynamicStoreKeyCreate ( - CFAllocatorRef allocator, - CFStringRef fmt, + 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 @@ -87,10 +86,10 @@ SCDynamicStoreKeyCreate ( */ CFStringRef SCDynamicStoreKeyCreateNetworkGlobalEntity ( - CFAllocatorRef allocator, - CFStringRef domain, - CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + CFStringRef domain, + CFStringRef entity + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkInterface @@ -110,9 +109,9 @@ SCDynamicStoreKeyCreateNetworkGlobalEntity ( */ CFStringRef SCDynamicStoreKeyCreateNetworkInterface ( - CFAllocatorRef allocator, - CFStringRef domain - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + CFStringRef domain + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkInterfaceEntity @@ -136,11 +135,11 @@ SCDynamicStoreKeyCreateNetworkInterface ( */ CFStringRef SCDynamicStoreKeyCreateNetworkInterfaceEntity ( - CFAllocatorRef allocator, - CFStringRef domain, - CFStringRef ifname, - CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + CFStringRef domain, + CFStringRef ifname, + CFStringRef __nullable entity + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkServiceEntity @@ -165,11 +164,11 @@ SCDynamicStoreKeyCreateNetworkInterfaceEntity ( */ CFStringRef SCDynamicStoreKeyCreateNetworkServiceEntity ( - CFAllocatorRef allocator, - CFStringRef domain, - CFStringRef serviceID, - CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator, + CFStringRef domain, + CFStringRef serviceID, + CFStringRef __nullable entity + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateComputerName @@ -186,8 +185,8 @@ SCDynamicStoreKeyCreateNetworkServiceEntity ( */ CFStringRef SCDynamicStoreKeyCreateComputerName ( - CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateConsoleUser @@ -203,8 +202,8 @@ SCDynamicStoreKeyCreateComputerName ( */ CFStringRef SCDynamicStoreKeyCreateConsoleUser ( - CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + CFAllocatorRef __nullable allocator + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreKeyCreateHostNames @@ -221,8 +220,8 @@ SCDynamicStoreKeyCreateConsoleUser ( */ CFStringRef SCDynamicStoreKeyCreateHostNames ( - CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator + ) API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateLocation @@ -239,8 +238,8 @@ SCDynamicStoreKeyCreateHostNames ( */ CFStringRef SCDynamicStoreKeyCreateLocation ( - CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator + ) API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateProxies @@ -257,10 +256,12 @@ SCDynamicStoreKeyCreateLocation ( */ CFStringRef SCDynamicStoreKeyCreateProxies ( - CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFAllocatorRef __nullable allocator + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ +CF_ASSUME_NONNULL_END +CF_IMPLICIT_BRIDGING_DISABLED + #endif /* _SCDYNAMICSTOREKEY_H */ diff --git a/src/configd/SystemConfiguration.fproj/SCDynamicStorePrivate.h b/src/configd/SystemConfiguration.fproj/SCDynamicStorePrivate.h index 40acd63e9..847690868 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStorePrivate.h +++ b/src/configd/SystemConfiguration.fproj/SCDynamicStorePrivate.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2005, 2010, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2005, 2010, 2011, 2013, 2015, 2018, 2019 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,13 +17,15 @@ * 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 _SCDYNAMICSTOREPRIVATE_H #define _SCDYNAMICSTOREPRIVATE_H +#include +#include #include #include #include @@ -166,25 +168,6 @@ SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store, int32_t identifier, int *fd); -/*! - @function SCDynamicStoreNotifySignal - @discussion Requests that the specified BSD signal be sent to the process - with the indicated process id whenever a change has been detected - to one of the system configuration data entries associated with the - current session's notifier keys. - - Note: this function is not valid for "configd" plug-ins. - - @param store An SCDynamicStoreRef that should be used for communication with the server. - @param pid A UNIX process ID that should be signalled for any notifications. - @param sig A signal number to be used. - @result A boolean indicating the success (or failure) of the call. - */ -Boolean -SCDynamicStoreNotifySignal (SCDynamicStoreRef store, - pid_t pid, - int sig); - /*! @function SCDynamicStoreNotifyWait @discussion Waits for a change to be made to a value in the @@ -223,11 +206,32 @@ 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); + +Boolean +_SCDynamicStoreCacheIsActive (SCDynamicStoreRef store) + API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0)); + +Boolean +_SCDynamicStoreCacheOpen (SCDynamicStoreRef store) + API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0)); + +Boolean +_SCDynamicStoreCacheCommitChanges (SCDynamicStoreRef store) + API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0)); + +Boolean +_SCDynamicStoreCacheClose (SCDynamicStoreRef store) + API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0)); + +void +_SCDynamicStoreSetSessionWatchLimit (unsigned int limit) + API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0)); + __END_DECLS -#endif /* _SCDYNAMICSTOREPRIVATE_H */ +#endif /* _SCDYNAMICSTOREPRIVATE_H */ diff --git a/src/configd/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h b/src/configd/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h index 668ae5c6d..bbf1f2019 100644 --- a/src/configd/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h +++ b/src/configd/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/src/configd/SystemConfiguration.fproj/SCLocation.c b/src/configd/SystemConfiguration.fproj/SCLocation.c index 41449cdfe..13af773db 100644 --- a/src/configd/SystemConfiguration.fproj/SCLocation.c +++ b/src/configd/SystemConfiguration.fproj/SCLocation.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002, 2004, 2006, 2010, 2011 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@ */ @@ -33,14 +33,15 @@ #include #include - CFStringRef SCDynamicStoreKeyCreateLocation(CFAllocatorRef allocator) { +#pragma unused(allocator) return CFRetain(kSCDynamicStoreDomainSetup); } +#if !TARGET_OS_IPHONE CFStringRef SCDynamicStoreCopyLocation(SCDynamicStoreRef store) { @@ -67,8 +68,8 @@ SCDynamicStoreCopyLocation(SCDynamicStoreRef store) done : - if (dict) CFRelease(dict); return location; } +#endif // !TARGET_OS_IPHONE diff --git a/src/configd/SystemConfiguration.fproj/SCNetwork.c b/src/configd/SystemConfiguration.fproj/SCNetwork.c index 96ae844d7..1810defc8 100644 --- a/src/configd/SystemConfiguration.fproj/SCNetwork.c +++ b/src/configd/SystemConfiguration.fproj/SCNetwork.c @@ -1,15 +1,15 @@ /* - * 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@ - * + * * 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@ */ @@ -61,8 +61,8 @@ SCNetworkCheckReachabilityByAddress(const struct sockaddr *address, return FALSE; } - bzero(&ss, sizeof(ss)); - bcopy(address, &ss, addrlen); + memset(&ss, 0, sizeof(ss)); + memcpy(&ss, address, addrlen); ss.ss_len = addrlen; networkAddress = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&ss); diff --git a/src/configd/SystemConfiguration.fproj/SCNetwork.h b/src/configd/SystemConfiguration.fproj/SCNetwork.h index 1e0cf1980..4bdeb7ce7 100644 --- a/src/configd/SystemConfiguration.fproj/SCNetwork.h +++ b/src/configd/SystemConfiguration.fproj/SCNetwork.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2009 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,19 +17,21 @@ * 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 #include +CF_IMPLICIT_BRIDGING_ENABLED +CF_ASSUME_NONNULL_BEGIN /*! @header SCNetwork @@ -123,8 +125,8 @@ __BEGIN_DECLS Note: this API has been deprecated but you can get equivalent results with :
-	SCNetworkReachabiltyRef   target;
-	SCNetworkReachabiltyFlags flags = 0;
+	SCNetworkReachabilityRef   target;
+	SCNetworkReachabilityFlags flags = 0;
 	Boolean                   ok;
 
 	target = SCNetworkReachabilityCreateWithAddress(NULL, address);
@@ -144,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
@@ -175,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
@@ -192,8 +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
 
-#endif /* _SCNETWORK_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SCNETWORK_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConfiguration.h b/src/configd/SystemConfiguration.fproj/SCNetworkConfiguration.h
index 25b99feac..74d62d352 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConfiguration.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConfiguration.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2004-2011 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,22 +17,22 @@
  * 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 
 #include 
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
+
 /*!
 	@header SCNetworkConfiguration
 	@discussion The SCNetworkConfiguration API provides access to the
@@ -60,89 +60,106 @@
 	@discussion This is the type of a reference to an object that represents
 		a network interface.
  */
-typedef const struct __SCNetworkInterface * SCNetworkInterfaceRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkInterface * SCNetworkInterfaceRef;
 
 /*!
 	@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_STARTING(__MAC_10_4,__IPHONE_2_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
@@ -150,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)
@@ -170,7 +188,7 @@ typedef SCNetworkInterfaceRef SCBondInterfaceRef;
 	@discussion This is the type of a reference to an object that represents
 		the status of an Ethernet Bond interface.
  */
-typedef const struct __SCBondStatus *		SCBondStatusRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCBondStatus *		SCBondStatusRef;
 
 /*!
 	@enum Ethernet Bond Aggregation Status (kSCBondStatusDeviceAggregationStatus) codes
@@ -192,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)
@@ -230,39 +248,38 @@ typedef SCNetworkInterfaceRef SCVLANInterfaceRef;
 	@discussion This is the type of a reference to an object that represents
 		a network protocol.
  */
-typedef const struct __SCNetworkProtocol * SCNetworkProtocolRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkProtocol * SCNetworkProtocolRef;
 
 /* network "protocol" types */
 
-/*!
-	@const kSCNetworkProtocolTypeAppleTalk
- */
-extern const CFStringRef kSCNetworkProtocolTypeAppleTalk					__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);
-
 /*!
 	@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
@@ -276,7 +293,7 @@ extern const CFStringRef kSCNetworkProtocolTypeSMB						__OSX_AVAILABLE_STARTING
 	@discussion This is the type of a reference to an object that represents
 		a network service.
  */
-typedef const struct __SCNetworkService * SCNetworkServiceRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkService * SCNetworkServiceRef;
 
 
 /*!
@@ -291,7 +308,7 @@ typedef const struct __SCNetworkService * SCNetworkServiceRef;
 	@discussion This is the type of a reference to an object that represents
 		a network set.
  */
-typedef const struct __SCNetworkSet	* SCNetworkSetRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkSet	* SCNetworkSetRef;
 
 
 __BEGIN_DECLS
@@ -313,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
@@ -322,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
@@ -332,8 +351,9 @@ SCNetworkInterfaceCopyAll			(void)						__OSX_AVAILABLE_STARTING(__MAC_10_4,__IP
 	@result The list of SCNetworkInterface types supported by the interface;
 		NULL if no interface types are supported.
  */
-CFArrayRef /* of kSCNetworkInterfaceTypeXXX CFStringRef's */
-SCNetworkInterfaceGetSupportedInterfaceTypes	(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of kSCNetworkInterfaceTypeXXX CFStringRef's */ __nullable
+SCNetworkInterfaceGetSupportedInterfaceTypes	(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceGetSupportedProtocolTypes
@@ -343,8 +363,9 @@ SCNetworkInterfaceGetSupportedInterfaceTypes	(SCNetworkInterfaceRef		interface)
 	@result The list of SCNetworkProtocol types supported by the interface;
 		NULL if no protocol types are supported.
  */
-CFArrayRef /* of kSCNetworkProtocolTypeXXX CFStringRef's */
-SCNetworkInterfaceGetSupportedProtocolTypes	(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of kSCNetworkProtocolTypeXXX CFStringRef's */ __nullable
+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,9 +378,10 @@ SCNetworkInterfaceGetSupportedProtocolTypes	(SCNetworkInterfaceRef		interface)	_
 	@result A reference to the new SCNetworkInterface.
 		You must release the returned value.
  */
-SCNetworkInterfaceRef
+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
@@ -369,8 +391,9 @@ SCNetworkInterfaceCreateWithInterface		(SCNetworkInterfaceRef		interface,
 	@result The BSD name associated with the interface (e.g. "en0");
 		NULL if no BSD name is available.
  */
-CFStringRef
-SCNetworkInterfaceGetBSDName			(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkInterfaceGetBSDName			(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceGetConfiguration
@@ -380,8 +403,9 @@ SCNetworkInterfaceGetBSDName			(SCNetworkInterfaceRef		interface)	__OSX_AVAILABL
 		NULL if no configuration settings are associated with the interface
 		or an error was encountered.
  */
-CFDictionaryRef
-SCNetworkInterfaceGetConfiguration		(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFDictionaryRef __nullable
+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,9 +416,10 @@ SCNetworkInterfaceGetConfiguration		(SCNetworkInterfaceRef		interface)	__OSX_AVA
 		NULL if no configuration settings are associated with the interface
 		or an error was encountered.
  */
-CFDictionaryRef
+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
@@ -402,8 +427,9 @@ SCNetworkInterfaceGetExtendedConfiguration	(SCNetworkInterfaceRef		interface,
 	@param interface The network interface.
 	@result A string representing the hardware (MAC) address for the interface.
  */
-CFStringRef
-SCNetworkInterfaceGetHardwareAddressString	(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkInterfaceGetHardwareAddressString	(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceGetInterface
@@ -412,8 +438,9 @@ SCNetworkInterfaceGetHardwareAddressString	(SCNetworkInterfaceRef		interface)	__
 	@result The underlying network interface;
 		NULL if this is a leaf interface.
  */
-SCNetworkInterfaceRef
-SCNetworkInterfaceGetInterface			(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+SCNetworkInterfaceRef __nullable
+SCNetworkInterfaceGetInterface			(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceGetInterfaceType
@@ -421,8 +448,9 @@ SCNetworkInterfaceGetInterface			(SCNetworkInterfaceRef		interface)	__OSX_AVAILA
 	@param interface The network interface.
 	@result The interface type.
  */
-CFStringRef
-SCNetworkInterfaceGetInterfaceType		(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkInterfaceGetInterfaceType		(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceGetLocalizedDisplayName
@@ -432,8 +460,9 @@ SCNetworkInterfaceGetInterfaceType		(SCNetworkInterfaceRef		interface)	__OSX_AVA
 	@result A localized, display name for the interface;
 		NULL if no name is available.
  */
-CFStringRef
-SCNetworkInterfaceGetLocalizedDisplayName	(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkInterfaceGetLocalizedDisplayName	(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceSetConfiguration
@@ -444,7 +473,8 @@ SCNetworkInterfaceGetLocalizedDisplayName	(SCNetworkInterfaceRef		interface)	__O
  */
 Boolean
 SCNetworkInterfaceSetConfiguration		(SCNetworkInterfaceRef		interface,
-						 CFDictionaryRef		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
@@ -456,7 +486,8 @@ SCNetworkInterfaceSetConfiguration		(SCNetworkInterfaceRef		interface,
 Boolean
 SCNetworkInterfaceSetExtendedConfiguration	(SCNetworkInterfaceRef		interface,
 						 CFStringRef			extendedType,
-						 CFDictionaryRef		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 -
 
@@ -481,11 +512,12 @@ SCNetworkInterfaceSetExtendedConfiguration	(SCNetworkInterfaceRef		interface,
 	@result TRUE if requested information has been returned.
  */
 Boolean
-SCNetworkInterfaceCopyMediaOptions		(SCNetworkInterfaceRef		interface,
-						 CFDictionaryRef		*current,
-						 CFDictionaryRef		*active,
-						 CFArrayRef			*available,
-						 Boolean			filter)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/);
+SCNetworkInterfaceCopyMediaOptions		(SCNetworkInterfaceRef						interface,
+						 CFDictionaryRef		__nullable	* __nullable	current,
+						 CFDictionaryRef		__nullable	* __nullable	active,
+						 CFArrayRef			__nullable	* __nullable	available,
+						 Boolean					filter)		API_AVAILABLE(macos(10.5))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceCopyMediaSubTypes
@@ -496,8 +528,9 @@ SCNetworkInterfaceCopyMediaOptions		(SCNetworkInterfaceRef		interface,
 	@result An array of available media subtypes CFString's (e.g. 10BaseT/UTP,
 		100baseTX, etc).  NULL if no subtypes are available.
  */
-CFArrayRef
-SCNetworkInterfaceCopyMediaSubTypes		(CFArrayRef			available)	__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/);
+CFArrayRef __nullable
+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,9 +543,10 @@ SCNetworkInterfaceCopyMediaSubTypes		(CFArrayRef			available)	__OSX_AVAILABLE_ST
 		is returned as an array of CFString's (e.g. ,
 		).  NULL if no options are available.
  */
-CFArrayRef
+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
@@ -531,10 +565,11 @@ SCNetworkInterfaceCopyMediaSubTypeOptions	(CFArrayRef			available,
 	@result TRUE if requested information has been returned.
  */
 Boolean
-SCNetworkInterfaceCopyMTU			(SCNetworkInterfaceRef		interface,
-						 int				*mtu_cur,
-						 int				*mtu_min,
-						 int				*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
@@ -542,13 +577,16 @@ SCNetworkInterfaceCopyMTU			(SCNetworkInterfaceRef		interface,
 		media subtype and options.
 	@param interface The desired network interface.
 	@param subtype The desired media subtype (e.g. "autoselect", "100baseTX", ...).
+		If NULL, no specific media subtype will be requested.
 	@param options The desired media options (e.g. "half-duplex", "full-duplex", ...).
+		If NULL, no specific media options will be requested.
 	@result TRUE if the configuration was updated; FALSE if an error was encountered.
  */
 Boolean
-SCNetworkInterfaceSetMediaOptions		(SCNetworkInterfaceRef		interface,
-						 CFStringRef			subtype,
-						 CFArrayRef			options)	__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/);
+SCNetworkInterfaceSetMediaOptions		(SCNetworkInterfaceRef			interface,
+						 CFStringRef		__nullable	subtype,
+						 CFArrayRef		__nullable	options)	API_AVAILABLE(macos(10.5))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkInterfaceSetMTU
@@ -556,11 +594,13 @@ SCNetworkInterfaceSetMediaOptions		(SCNetworkInterfaceRef		interface,
 		requested MTU setting.
 	@param interface The desired network interface.
 	@param mtu The desired MTU setting for the interface.
+		If zero, the interface will use the default MTU setting.
 	@result TRUE if the configuration was updated; FALSE if an error was encountered.
  */
 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
@@ -583,7 +623,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)
@@ -600,7 +641,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
@@ -611,7 +652,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
@@ -620,8 +661,8 @@ SCBondInterfaceCopyAvailableMemberInterfaces	(SCPreferencesRef		prefs)		__OSX_AV
 	@result A reference to the new SCBondInterface.
 		You must release the returned value.
  */
-SCBondInterfaceRef
-SCBondInterfaceCreate				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+SCBondInterfaceRef __nullable
+SCBondInterfaceCreate				(SCPreferencesRef		prefs)		API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
 
 /*!
 	@function SCBondInterfaceRemove
@@ -630,7 +671,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
@@ -638,8 +679,8 @@ SCBondInterfaceRemove				(SCBondInterfaceRef		bond)		__OSX_AVAILABLE_STARTING(__
 	@param bond The SCBondInterface interface.
 	@result The list of interfaces.
  */
-CFArrayRef /* of SCNetworkInterfaceRef's */
-SCBondInterfaceGetMemberInterfaces		(SCBondInterfaceRef		bond)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+CFArrayRef /* of SCNetworkInterfaceRef's */ __nullable
+SCBondInterfaceGetMemberInterfaces		(SCBondInterfaceRef		bond)		API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
 
 /*!
 	@function SCBondInterfaceGetOptions
@@ -648,8 +689,8 @@ SCBondInterfaceGetMemberInterfaces		(SCBondInterfaceRef		bond)		__OSX_AVAILABLE_
 	@result The configuration settings associated with the Ethernet Bond interface;
 		NULL if no changes to the default configuration have been saved.
  */
-CFDictionaryRef
-SCBondInterfaceGetOptions			(SCBondInterfaceRef		bond)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+CFDictionaryRef __nullable
+SCBondInterfaceGetOptions			(SCBondInterfaceRef		bond)		API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
 
 /*!
 	@function SCBondInterfaceSetMemberInterfaces
@@ -661,7 +702,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
@@ -672,7 +713,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
@@ -683,7 +724,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 -
 
@@ -694,15 +735,15 @@ SCBondInterfaceSetOptions			(SCBondInterfaceRef		bond,
 	@result The status associated with the interface.
 		You must release the returned value.
  */
-SCBondStatusRef
-SCBondInterfaceCopyStatus			(SCBondInterfaceRef	bond)			__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+SCBondStatusRef __nullable
+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
@@ -711,8 +752,8 @@ SCBondStatusGetTypeID				(void)						__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHON
 	@param bondStatus The Ethernet Bond status.
 	@result The list of interfaces.
  */
-CFArrayRef /* of SCNetworkInterfaceRef's */
-SCBondStatusGetMemberInterfaces			(SCBondStatusRef	bondStatus)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+CFArrayRef __nullable /* of SCNetworkInterfaceRef's */
+SCBondStatusGetMemberInterfaces			(SCBondStatusRef	bondStatus)		API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
 
 /*!
 	@function SCBondStatusGetInterfaceStatus
@@ -727,9 +768,9 @@ SCBondStatusGetMemberInterfaces			(SCBondStatusRef	bondStatus)		__OSX_AVAILABLE_
 	      Bond is returned.  As long as one member interface is active
 	      then the bond should be operational.
  */
-CFDictionaryRef
-SCBondStatusGetInterfaceStatus			(SCBondStatusRef	bondStatus,
-						 SCNetworkInterfaceRef	interface)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+CFDictionaryRef __nullable
+SCBondStatusGetInterfaceStatus			(SCBondStatusRef			bondStatus,
+						 SCNetworkInterfaceRef	__nullable	interface)	API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
 
 /*!
 	@group Interface configuration (VLAN)
@@ -745,7 +786,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
@@ -755,7 +797,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
@@ -768,10 +811,11 @@ SCVLANInterfaceCopyAvailablePhysicalInterfaces	(void)						__OSX_AVAILABLE_START
 
 	Note: the tag must be in the range (1 <= tag <= 4094)
  */
-SCVLANInterfaceRef
+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
@@ -780,7 +824,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
@@ -788,8 +833,9 @@ SCVLANInterfaceRemove				(SCVLANInterfaceRef		vlan)		__OSX_AVAILABLE_STARTING(__
 	@param vlan The SCVLANInterface interface.
 	@result The list of interfaces.
  */
-SCNetworkInterfaceRef
-SCVLANInterfaceGetPhysicalInterface		(SCVLANInterfaceRef		vlan)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+SCNetworkInterfaceRef __nullable
+SCVLANInterfaceGetPhysicalInterface		(SCVLANInterfaceRef		vlan)		API_AVAILABLE(macos(10.5))
+												SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCVLANInterfaceGetTag
@@ -797,8 +843,9 @@ SCVLANInterfaceGetPhysicalInterface		(SCVLANInterfaceRef		vlan)		__OSX_AVAILABLE
 	@param vlan The SCVLANInterface interface.
 	@result The tag.
  */
-CFNumberRef
-SCVLANInterfaceGetTag				(SCVLANInterfaceRef		vlan)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+CFNumberRef __nullable
+SCVLANInterfaceGetTag				(SCVLANInterfaceRef		vlan)		API_AVAILABLE(macos(10.5))
+												SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCVLANInterfaceGetOptions
@@ -807,8 +854,9 @@ SCVLANInterfaceGetTag				(SCVLANInterfaceRef		vlan)		__OSX_AVAILABLE_STARTING(__
 	@result The configuration settings associated with the VLAN interface;
 		NULL if no changes to the default configuration have been saved.
  */
-CFDictionaryRef
-SCVLANInterfaceGetOptions			(SCVLANInterfaceRef		vlan)		__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/);
+CFDictionaryRef __nullable
+SCVLANInterfaceGetOptions			(SCVLANInterfaceRef		vlan)		API_AVAILABLE(macos(10.5))
+												SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCVLANInterfaceSetPhysicalInterfaceAndTag
@@ -823,7 +871,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
@@ -834,7 +883,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
@@ -845,7 +895,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));
 
 
 /* --------------------------------------------------------------------------------
@@ -864,7 +915,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
@@ -874,8 +926,9 @@ SCNetworkProtocolGetTypeID			(void)						__OSX_AVAILABLE_STARTING(__MAC_10_4,__I
 		NULL if no configuration settings are associated with the protocol
 		or an error was encountered.
  */
-CFDictionaryRef
-SCNetworkProtocolGetConfiguration		(SCNetworkProtocolRef		protocol)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFDictionaryRef __nullable
+SCNetworkProtocolGetConfiguration		(SCNetworkProtocolRef		protocol)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkProtocolGetEnabled
@@ -884,7 +937,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
@@ -892,8 +946,9 @@ SCNetworkProtocolGetEnabled			(SCNetworkProtocolRef		protocol)	__OSX_AVAILABLE_S
 	@param protocol The network protocol.
 	@result The protocol type.
  */
-CFStringRef
-SCNetworkProtocolGetProtocolType		(SCNetworkProtocolRef		protocol)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkProtocolGetProtocolType		(SCNetworkProtocolRef		protocol)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkProtocolSetConfiguration
@@ -904,7 +959,8 @@ SCNetworkProtocolGetProtocolType		(SCNetworkProtocolRef		protocol)	__OSX_AVAILAB
  */
 Boolean
 SCNetworkProtocolSetConfiguration		(SCNetworkProtocolRef		protocol,
-						 CFDictionaryRef		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
@@ -915,7 +971,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
@@ -933,7 +990,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
@@ -948,7 +1006,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
@@ -957,8 +1016,9 @@ SCNetworkServiceAddProtocolType			(SCNetworkServiceRef		service,
 	@result The list of SCNetworkService services associated with the preferences.
 		You must release the returned value.
  */
-CFArrayRef /* of SCNetworkServiceRef's */
-SCNetworkServiceCopyAll				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of SCNetworkServiceRef's */ __nullable
+SCNetworkServiceCopyAll				(SCPreferencesRef		prefs)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkServiceCopyProtocols
@@ -967,8 +1027,9 @@ SCNetworkServiceCopyAll				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(_
 	@result The list of SCNetworkProtocol protocols associated with the service.
 		You must release the returned value.
  */
-CFArrayRef /* of SCNetworkProtocolRef's */
-SCNetworkServiceCopyProtocols			(SCNetworkServiceRef		service)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of SCNetworkProtocolRef's */ __nullable
+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,9 +1039,10 @@ SCNetworkServiceCopyProtocols			(SCNetworkServiceRef		service)	__OSX_AVAILABLE_S
 	@result A reference to the new SCNetworkService.
 		You must release the returned value.
  */
-SCNetworkServiceRef
+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,9 +1054,10 @@ SCNetworkServiceCreate				(SCPreferencesRef		prefs,
 		error was encountered.
 		You must release the returned value.
  */
-SCNetworkServiceRef
+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
@@ -1006,7 +1069,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
@@ -1015,7 +1079,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
@@ -1024,8 +1089,9 @@ SCNetworkServiceGetEnabled			(SCNetworkServiceRef		service)	__OSX_AVAILABLE_STAR
 	@result A reference to the SCNetworkInterface associated with the service;
 		NULL if an error was encountered.
  */
-SCNetworkInterfaceRef
-SCNetworkServiceGetInterface			(SCNetworkServiceRef		service)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+SCNetworkInterfaceRef __nullable
+SCNetworkServiceGetInterface			(SCNetworkServiceRef		service)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkServiceGetName
@@ -1033,8 +1099,9 @@ SCNetworkServiceGetInterface			(SCNetworkServiceRef		service)	__OSX_AVAILABLE_ST
 	@param service The network service.
 	@result The [user specified] name.
  */
-CFStringRef
-SCNetworkServiceGetName				(SCNetworkServiceRef		service)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+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,9 +1112,10 @@ SCNetworkServiceGetName				(SCNetworkServiceRef		service)	__OSX_AVAILABLE_STARTI
 		NULL if this protocol has not been added or if an error was encountered.
 		You must release the returned value.
  */
-SCNetworkProtocolRef
+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
@@ -1055,8 +1123,9 @@ SCNetworkServiceCopyProtocol			(SCNetworkServiceRef		service,
 	@param service The network service.
 	@result The service identifier.
  */
-CFStringRef
-SCNetworkServiceGetServiceID			(SCNetworkServiceRef		service)	__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkServiceGetServiceID			(SCNetworkServiceRef		service)	API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkServiceRemove
@@ -1065,7 +1134,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
@@ -1077,7 +1147,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
@@ -1088,7 +1159,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
@@ -1104,7 +1176,8 @@ SCNetworkServiceSetEnabled			(SCNetworkServiceRef		service,
  */
 Boolean
 SCNetworkServiceSetName				(SCNetworkServiceRef		service,
-						 CFStringRef			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));
 
 
 /* --------------------------------------------------------------------------------
@@ -1123,7 +1196,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
@@ -1140,7 +1214,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
@@ -1152,7 +1227,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
@@ -1161,8 +1237,9 @@ SCNetworkSetContainsInterface			(SCNetworkSetRef		set,
 	@result The list of SCNetworkSet sets associated with the preferences.
 		You must release the returned value.
  */
-CFArrayRef /* of SCNetworkSetRef's */
-SCNetworkSetCopyAll				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of SCNetworkSetRef's */ __nullable
+SCNetworkSetCopyAll				(SCPreferencesRef		prefs)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkSetCopyCurrent
@@ -1170,8 +1247,9 @@ SCNetworkSetCopyAll				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC
 	@param prefs The "preferences" session.
 	@result The current set; NULL if no current set has been defined.
  */
-SCNetworkSetRef
-SCNetworkSetCopyCurrent				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+SCNetworkSetRef __nullable
+SCNetworkSetCopyCurrent				(SCPreferencesRef		prefs)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkSetCopyServices
@@ -1180,8 +1258,9 @@ SCNetworkSetCopyCurrent				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(_
 	@result The list of SCNetworkService services associated with the set.
 		You must release the returned value.
  */
-CFArrayRef /* of SCNetworkServiceRef's */
-SCNetworkSetCopyServices			(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of SCNetworkServiceRef's */ __nullable
+SCNetworkSetCopyServices			(SCNetworkSetRef		set)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkSetCreate
@@ -1190,8 +1269,9 @@ SCNetworkSetCopyServices			(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MA
 	@result A reference to the new SCNetworkSet.
 		You must release the returned value.
  */
-SCNetworkSetRef
-SCNetworkSetCreate				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+SCNetworkSetRef __nullable
+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,9 +1283,10 @@ SCNetworkSetCreate				(SCPreferencesRef		prefs)		__OSX_AVAILABLE_STARTING(__MAC_
 		error was encountered.
 		You must release the returned value.
  */
-SCNetworkSetRef
+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
@@ -1213,8 +1294,9 @@ SCNetworkSetCopy				(SCPreferencesRef		prefs,
 	@param set The network set.
 	@result The [user specified] name.
  */
-CFStringRef
-SCNetworkSetGetName				(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkSetGetName				(SCNetworkSetRef		set)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkSetGetSetID
@@ -1222,8 +1304,9 @@ SCNetworkSetGetName				(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC_10
 	@param set The network set.
 	@result The set identifier.
  */
-CFStringRef
-SCNetworkSetGetSetID				(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFStringRef __nullable
+SCNetworkSetGetSetID				(SCNetworkSetRef		set)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkSetGetServiceOrder
@@ -1235,8 +1318,9 @@ SCNetworkSetGetSetID				(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC_1
 		NULL if no service order has been specified or if an error
 		was encountered.
  */
-CFArrayRef /* of serviceID CFStringRef's */
-SCNetworkSetGetServiceOrder			(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+CFArrayRef /* of serviceID CFStringRef's */ __nullable
+SCNetworkSetGetServiceOrder			(SCNetworkSetRef		set)		API_AVAILABLE(macos(10.4))
+												SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCNetworkSetRemove
@@ -1245,7 +1329,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
@@ -1257,7 +1342,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
@@ -1267,7 +1353,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
@@ -1282,7 +1369,8 @@ SCNetworkSetSetCurrent				(SCNetworkSetRef		set)		__OSX_AVAILABLE_STARTING(__MAC
  */
 Boolean
 SCNetworkSetSetName				(SCNetworkSetRef		set,
-						 CFStringRef			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
@@ -1293,10 +1381,13 @@ 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
 
-#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
 #endif	/* _SCNETWORKCONFIGURATION_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c b/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c
index 3b215c129..c8db81ecf 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2004-2007, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2007, 2009, 2010-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@
  */
 
@@ -29,15 +29,26 @@
  */
 
 
-#include 
-#include 
-#include 
-#include 
+#include "SCPreferencesInternal.h"
+#include "SCNetworkConfigurationInternal.h"
 
 #include 
 #include 
 
 
+__private_extern__ os_log_t
+__log_SCNetworkConfiguration(void)
+{
+	static os_log_t	log	= NULL;
+
+	if (log == NULL) {
+		log = os_log_create("com.apple.SystemConfiguration", "SCNetworkConfiguration");
+	}
+
+	return log;
+}
+
+
 __private_extern__ CFDictionaryRef
 __getPrefsConfiguration(SCPreferencesRef prefs, CFStringRef path)
 {
@@ -190,16 +201,20 @@ __setPrefsEnabled(SCPreferencesRef      prefs,
 	return ok;
 }
 
+#if	TARGET_OS_OSX
+#define SYSTEMCONFIGURATION_RESOURCES_PATH	SYSTEMCONFIGURATION_FRAMEWORK_PATH "/Resources"
+#else
+#define SYSTEMCONFIGURATION_RESOURCES_PATH	SYSTEMCONFIGURATION_FRAMEWORK_PATH
+#endif	// TARGET_OS_OSX
+
+#define NETWORKCONFIGURATION_RESOURCE_FILE	"NetworkConfiguration.plist"
 
 static CFDictionaryRef
 __copyTemplates()
 {
 	CFBundleRef     bundle;
-	CFErrorRef	error		= NULL;
-	Boolean		ok;
 	CFDictionaryRef templates;
 	CFURLRef	url;
-	CFDataRef       xmlTemplates    = NULL;
 
 	bundle = _SC_CFBundleGet();
 	if (bundle == NULL) {
@@ -208,30 +223,26 @@ __copyTemplates()
 
 	url = CFBundleCopyResourceURL(bundle, CFSTR("NetworkConfiguration"), CFSTR("plist"), NULL);
 	if (url == NULL) {
-		return NULL;
+		SC_log(LOG_ERR, "failed to GET resource URL to \"%s\". Trying harder...", NETWORKCONFIGURATION_RESOURCE_FILE);
+		url = CFURLCreateWithFileSystemPath(NULL,
+						    CFSTR(SYSTEMCONFIGURATION_RESOURCES_PATH
+							  "/"
+							  NETWORKCONFIGURATION_RESOURCE_FILE),
+						    kCFURLPOSIXPathStyle,
+						    TRUE);
+
+		if (url == NULL) {
+			SC_log(LOG_ERR, "failed to CREATE resource URL to \"%s\"", SYSTEMCONFIGURATION_RESOURCES_PATH
+										   "/"
+										   NETWORKCONFIGURATION_RESOURCE_FILE);
+			return NULL;
+		}
 	}
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated"
-	ok = CFURLCreateDataAndPropertiesFromResource(NULL, url, &xmlTemplates, NULL, NULL, NULL);
-#pragma GCC diagnostic pop
+	templates = _SCCreatePropertyListFromResource(url);
 	CFRelease(url);
-	if (!ok || (xmlTemplates == NULL)) {
-		return NULL;
-	}
-
-	// convert the XML data into a property list
-	templates = CFPropertyListCreateWithData(NULL, xmlTemplates, kCFPropertyListImmutable, NULL, &error);
-	CFRelease(xmlTemplates);
-	if (templates == NULL) {
-		if (error != NULL) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("could not load SCNetworkConfiguration templates: %@"), error);
-			CFRelease(error);
-		}
-		return NULL;
-	}
 
-	if (!isA_CFDictionary(templates)) {
+	if ((templates != NULL) && !isA_CFDictionary(templates)) {
 		CFRelease(templates);
 		return NULL;
 	}
@@ -350,18 +361,16 @@ __createInterface(int s, CFStringRef interface)
 {
 	struct ifreq	ifr;
 
-	bzero(&ifr, sizeof(ifr));
+	memset(&ifr, 0, sizeof(ifr));
 	(void) _SC_cfstring_to_cstring(interface,
 				       ifr.ifr_name,
 				       sizeof(ifr.ifr_name),
 				       kCFStringEncodingASCII);
 
 	if (ioctl(s, SIOCIFCREATE, &ifr) == -1) {
-		SCLog(TRUE,
-		      LOG_ERR,
-		      CFSTR("could not create interface \"%@\": %s"),
-		      interface,
-		      strerror(errno));
+		SC_log(LOG_NOTICE, "could not create interface \"%@\": %s",
+		       interface,
+		       strerror(errno));
 		return FALSE;
 	}
 
@@ -374,18 +383,16 @@ __destroyInterface(int s, CFStringRef interface)
 {
 	struct ifreq	ifr;
 
-	bzero(&ifr, sizeof(ifr));
+	memset(&ifr, 0, sizeof(ifr));
 	(void) _SC_cfstring_to_cstring(interface,
 				       ifr.ifr_name,
 				       sizeof(ifr.ifr_name),
 				       kCFStringEncodingASCII);
 
 	if (ioctl(s, SIOCIFDESTROY, &ifr) == -1) {
-		SCLog(TRUE,
-		      LOG_ERR,
-		      CFSTR("could not destroy interface \"%@\": %s"),
-		      interface,
-		      strerror(errno));
+		SC_log(LOG_NOTICE, "could not destroy interface \"%@\": %s",
+		       interface,
+		       strerror(errno));
 		return FALSE;
 	}
 
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h b/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h
index 6562c217c..dc2f7bc26 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2004-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-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,25 +17,26 @@
  * 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 _SCNETWORKCONFIGURATIONINTERNAL_H
 #define _SCNETWORKCONFIGURATIONINTERNAL_H
 
-
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 
-#if	!TARGET_IPHONE_SIMULATOR
+#ifndef	SC_LOG_HANDLE
+#define	SC_LOG_HANDLE	__log_SCNetworkConfiguration
+#endif	// SC_LOG_HANDLE
+#include 
+#include 
+#include 
+#include "SCPreferencesPathKey.h"
 #include "IPMonitorControl.h"
-#endif	// !TARGET_IPHONE_SIMULATOR
+#include 
 
 
 typedef struct {
@@ -152,10 +153,12 @@ typedef struct {
 	CFStringRef		path;
 	uint64_t		entryID;
 	CFMutableDictionaryRef	overrides;
-	Boolean			modemIsV92;
 	CFStringRef		prefix;
+	Boolean			trustRequired;
 	CFNumberRef		type;
 	CFNumberRef		unit;
+	CFNumberRef		family;
+	CFNumberRef		subfamily;
 	struct {
 		CFStringRef	name;
 		CFNumberRef	vid;
@@ -163,7 +166,7 @@ typedef struct {
 	} usb;
 
 	// misc
-	int			sort_order;		// sort order for this interface
+	unsigned int		sort_order;		// sort order for this interface
 
 	// for BOND interfaces
 	Boolean			supportsBond;
@@ -188,10 +191,9 @@ typedef struct {
 		CFDictionaryRef		options;
 	} vlan;
 
-#if	!TARGET_IPHONE_SIMULATOR
 	// for interface rank assertions
 	IPMonitorControlRef	IPMonitorControl;
-#endif	// !TARGET_IPHONE_SIMULATOR
+
 } SCNetworkInterfacePrivate, *SCNetworkInterfacePrivateRef;
 
 
@@ -202,10 +204,11 @@ __BEGIN_DECLS
 #pragma mark SCNetworkInterface configuration (internal)
 
 Boolean
-__SCNetworkInterfaceMatchesName	(CFStringRef name, CFStringRef key);
+__SCNetworkInterfaceMatchesName			(CFStringRef		name,
+						 CFStringRef		key);
 
 CFArrayRef
-__SCNetworkInterfaceCopyAll_IONetworkInterface	(void);
+__SCNetworkInterfaceCopyAll_IONetworkInterface	(Boolean		keep_pre_configured);
 
 /*!
  @function __SCNetworkInterfaceCopyStorageEntity
@@ -216,7 +219,7 @@ __SCNetworkInterfaceCopyAll_IONetworkInterface	(void);
  You must release the returned value.
  */
 CFDictionaryRef
-__SCNetworkInterfaceCopyStorageEntity	(SCNetworkInterfaceRef		interface);
+__SCNetworkInterfaceCopyStorageEntity		(SCNetworkInterfaceRef	interface);
 
 /*!
  @function __SCNetworkInterfaceCopyStoredWithPreferences
@@ -228,7 +231,7 @@ __SCNetworkInterfaceCopyStorageEntity	(SCNetworkInterfaceRef		interface);
  */
 
 CFArrayRef  // SCNetworkInterfaceRef
-__SCNetworkInterfaceCopyStoredWithPreferences (SCPreferencesRef ni_prefs);
+__SCNetworkInterfaceCopyStoredWithPreferences	(SCPreferencesRef	ni_prefs);
 
 SCNetworkInterfacePrivateRef
 __SCNetworkInterfaceCreateCopy			(CFAllocatorRef		allocator,
@@ -240,12 +243,12 @@ __SCNetworkInterfaceCreateCopy			(CFAllocatorRef		allocator,
  @function __SCNetworkInterfaceCreateMappingUsingBSDName
  @discussion This function creates mapping of BSD name and network interface using
  preferences which point to the NetworkInterfaces.plist file.
- @param ni_prefs Preferences pointing to NetworkInterfaces.plist
+ @param interfaces An array of network interfaces to use for the mapping.
  @result BSD Mapping in a dictionary.
  You must release the returned value.
  */
 CFDictionaryRef
-__SCNetworkInterfaceCreateMappingUsingBSDName(CFArrayRef interfaces);
+__SCNetworkInterfaceCreateMappingUsingBSDName	(CFArrayRef		interfaces);
 
 SCNetworkInterfaceRef
 __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(CFAllocatorRef		allocator,
@@ -285,15 +288,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);
 
@@ -325,19 +319,22 @@ __SCNetworkInterfaceGetUserDefinedName(SCNetworkInterfaceRef interface);
  @result	TRUE if the interface configuration is active.
  */
 Boolean
-__SCNetworkInterfaceIsActive			(SCNetworkInterfaceRef		interface);
+__SCNetworkInterfaceIsActive			(SCNetworkInterfaceRef	interface);
 
 Boolean
 __SCNetworkInterfaceIsMember			(SCPreferencesRef	prefs,
 						 SCNetworkInterfaceRef	interface);
 
+Boolean
+__SCNetworkInterfaceEntityIsPPTP		(CFDictionaryRef	entity);
+
 Boolean
 __SCNetworkInterfaceIsValidExtendedConfigurationType
 						(SCNetworkInterfaceRef	interface,
 						 CFStringRef		extendedType,
 						 Boolean		requirePerInterface);
 
-CFDictionaryRef
+CFPropertyListRef
 __SCNetworkInterfaceGetTemplateOverrides	(SCNetworkInterfaceRef	interface,
 						 CFStringRef		overrideType);
 
@@ -378,7 +375,7 @@ __SCNetworkInterfaceSetDeepConfiguration	(SCNetworkSetRef	set,
  */
 void
 __SCNetworkInterfaceSetIOInterfaceUnit		(SCNetworkInterfaceRef interface,
-						 CFNumberRef unit);
+						 CFNumberRef		unit);
 
 Boolean
 __SCNetworkInterfaceSupportsVLAN		(CFStringRef		bsd_if);
@@ -399,6 +396,12 @@ Boolean
 __SCBridgeInterfaceSetMemberInterfaces		(SCBridgeInterfaceRef	bridge,
 						 CFArrayRef		members);
 
+void
+_SCNetworkInterfaceCacheOpen(void);
+
+void
+_SCNetworkInterfaceCacheClose(void);
+
 #pragma mark -
 #pragma mark SCNetworkProtocol configuration (internal)
 
@@ -428,6 +431,9 @@ __SCNetworkServiceCreatePrivate			(CFAllocatorRef		allocator,
 						 CFStringRef		serviceID,
 						 SCNetworkInterfaceRef	interface);
 
+Boolean
+__SCNetworkServiceExists			(SCNetworkServiceRef	service);
+
 Boolean
 __SCNetworkServiceExistsForInterface		(CFArrayRef		services,
 						 SCNetworkInterfaceRef	interface);
@@ -437,6 +443,10 @@ __SCNetworkServiceCreate			(SCPreferencesRef	prefs,
 						 SCNetworkInterfaceRef	interface,
 						 CFStringRef		userDefinedName);
 
+Boolean
+__SCNetworkServiceIsPPTP			(SCNetworkServiceRef	service);
+
+
 SCPreferencesRef
 __SCNetworkCreateDefaultNIPrefs			(CFStringRef		prefsID);
 
@@ -449,16 +459,34 @@ __SCNetworkCreateDefaultNIPrefs			(CFStringRef		prefsID);
  @result TRUE if add service to prefs is successful
  */
 Boolean
-__SCNetworkServiceMigrateNew			(SCPreferencesRef		prefs,
-						 SCNetworkServiceRef		service,
-						 CFDictionaryRef		bsdMapping,
-						 CFDictionaryRef		setMapping,
-						 CFDictionaryRef		serviceSetMapping);
+__SCNetworkServiceMigrateNew			(SCPreferencesRef	prefs,
+						 SCNetworkServiceRef	service,
+						 CFDictionaryRef	bsdMapping,
+						 CFDictionaryRef	setMapping,
+						 CFDictionaryRef	serviceSetMapping);
+
+void
+__SCNetworkServiceAddProtocolToService		(SCNetworkServiceRef		service,
+						 CFStringRef			protocolType,
+						 CFDictionaryRef		configuration,
+						 Boolean			enabled);
 
 #pragma mark -
 #pragma mark SCNetworkSet configuration (internal)
 
 
+Boolean
+__SCNetworkSetExists				(SCNetworkSetRef		set);
+
+
+#pragma mark -
+#pragma mark Logging
+
+
+os_log_t
+__log_SCNetworkConfiguration			(void);
+
+
 #pragma mark -
 #pragma mark Miscellaneous (internal)
 
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h b/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h
index 8d017e9dc..e1346b042 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005-2014 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,19 +169,19 @@ 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
 	@discussion Creates an SCNetworkInterface and associated with interface name
 		and SCDynamicStoreRef
-	@param the interface name
-	@param the SCDynamicStoreRef
+	@param store The SCDynamicStoreRef
+	@param bsdName The interface name
 	@result the SCNetworkInterface
  */
 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,29 +256,82 @@ _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
 	@discussion We allow caller to retrieve the rank on an interface.
-	@param the interface to get the rank
+	@param interface The interface to get the rank
 	@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
 	@discussion We allow caller to set an assertion on an interface.
 		The rank assertion lives as long as the SCNetworkInterfaceRef
 		remains valid.
-	@param the interface to set the rank assertion
-	@param the new rank to be set
+	@param interface The interface to set the rank assertion
+	@param newRank The new rank to be set
 	@result TRUE if operation is successful; FALSE if an error was encountered.
  */
 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,27 @@ _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
+	@discussion Returns the family type for the interface.
+	@param interface The network interface.
+	@result The family type (ift_family) associated with the interface;
+		NULL if no family type is available.
+ */
+CFNumberRef
+_SCNetworkInterfaceGetFamilyType			(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.12), ios(10.0));
+
+/*!
+	@function _SCNetworkInterfaceGetFamilySubType
+	@discussion Returns the family subtype for the interface.
+	@param interface The network interface.
+	@result The family subtype (ift_subfamily) associated with the interface;
+		NULL if no family subtype is available.
+ */
+CFNumberRef
+_SCNetworkInterfaceGetFamilySubType			(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.12), ios(10.0));
 
 /*!
 	@function _SCNetworkInterfaceGetHardwareAddress
@@ -320,7 +396,7 @@ _SCNetworkInterfaceGetConfigurationAction		(SCNetworkInterfaceRef		interface)	__
 		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
@@ -330,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
@@ -339,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
@@ -349,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
@@ -359,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
@@ -369,7 +445,16 @@ _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
+	@discussion Identifies if a network interface is internal/pre-configured.
+	@param interface The network interface.
+	@result TRUE if the interface is an internal/pre-configured.
+ */
+Boolean
+_SCNetworkInterfaceIsApplePreconfigured			(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.12), ios(10.0));
 
 /*!
 	@function _SCNetworkInterfaceIsBluetoothPAN
@@ -378,7 +463,7 @@ _SCNetworkInterfaceGetIORegistryEntryID			(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
@@ -387,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
@@ -396,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
@@ -405,27 +490,26 @@ _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
-	@discussion Identifies if the configuration of a network interface should be
-		hidden from any user interface (e.g. the "Network" pref pane).
+	@function _SCNetworkInterfaceIsCarPlay
+	@discussion Identifies if a network interface is a CarPlay device.
 	@param interface The network interface.
-	@result TRUE if the interface configuration should be hidden.
+	@result TRUE if the interface is a CarPlay device.
  */
 Boolean
-_SCNetworkInterfaceIsHiddenConfiguration		(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0);
+_SCNetworkInterfaceIsCarPlay				(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.15), ios(13.0));
 
 /*!
-	@function _SCNetworkInterfaceIsModemV92
-	@discussion Identifies if a modem network interface supports
-		v.92 (hold).
+	@function _SCNetworkInterfaceIsHiddenConfiguration
+	@discussion Identifies if the configuration of a network interface should be
+		hidden from any user interface (e.g. the "Network" pref pane).
 	@param interface The network interface.
-	@result TRUE if the interface is "v.92" modem.
+	@result TRUE if the interface configuration should be hidden.
  */
 Boolean
-_SCNetworkInterfaceIsModemV92				(SCNetworkInterfaceRef		interface)	__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0);
+_SCNetworkInterfaceIsHiddenConfiguration		(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.7), ios(4.0));
 
 /*!
 	@function _SCNetworkInterfaceIsTethered
@@ -434,7 +518,7 @@ _SCNetworkInterfaceIsModemV92				(SCNetworkInterfaceRef		interface)	__OSX_AVAILA
 	@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
@@ -443,7 +527,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
@@ -452,7 +546,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
@@ -462,7 +556,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
@@ -470,7 +564,8 @@ _SCNetworkInterfaceForceConfigurationRefresh		(CFStringRef			ifName)		__OSX_AVAI
 		about the currently requested capabilities, the active capabilities,
 		and the capabilities which are available.
 	@param interface The desired network interface.
-	@param capability The desired capability.
+	@param capability The desired capability;
+		NULL to return a CFDictionary of all capabilities.
 	@result a CFTypeRef representing the current value of requested
 		capability;
 		NULL if the capability is not available for this
@@ -479,7 +574,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
@@ -494,7 +589,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)
@@ -506,7 +616,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
@@ -516,7 +626,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
@@ -525,7 +635,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
@@ -536,7 +646,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)
@@ -549,7 +659,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
@@ -560,7 +670,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
@@ -570,7 +680,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
@@ -579,7 +689,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
@@ -588,7 +698,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
@@ -598,7 +708,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
@@ -610,7 +720,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
@@ -621,7 +731,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
@@ -632,7 +742,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 -
 
@@ -643,7 +753,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
@@ -653,7 +763,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 -
@@ -666,7 +776,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
@@ -676,7 +786,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 -
@@ -694,21 +804,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)	API_AVAILABLE(macos(10.11), ios(9.0));
+
+Boolean
+SCNetworkInterfaceSetDisableUntilNeeded			(SCNetworkInterfaceRef		interface,
+							 Boolean			disable)	API_AVAILABLE(macos(10.11), ios(9.0));
+
+
+CFDictionaryRef
+SCNetworkInterfaceGetQoSMarkingPolicy			(SCNetworkInterfaceRef		interface)	API_AVAILABLE(macos(10.13), ios(10.0));
+
+Boolean
+SCNetworkInterfaceSetQoSMarkingPolicy			(SCNetworkInterfaceRef		interface,
+							 CFDictionaryRef		policy)		API_AVAILABLE(macos(10.13), ios(10.0));
 
 
 #pragma mark -
@@ -726,6 +852,19 @@ isA_SCNetworkProtocol(CFTypeRef obj)
 	return (isA_CFType(obj, SCNetworkProtocolGetTypeID()));
 }
 
+/*!
+	@function _SCNetworkProtocolCompare
+	@discussion Compares two SCNetworkProtocol objects.
+	@param val1 The SCNetworkProtocol object.
+	@param val2 The SCNetworkProtocol object.
+	@param context Not used.
+	@result A comparison result.
+ */
+CFComparisonResult
+_SCNetworkProtocolCompare				(const void			*val1,
+							 const void			*val2,
+							 void				*context)	API_AVAILABLE(macos(10.13), ios(11.0));
+
 
 #pragma mark -
 #pragma mark SCNetworkService configuration (SPI)
@@ -753,7 +892,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
@@ -763,7 +902,7 @@ _SCNetworkServiceCompare				(const void			*val1,
 	      API in that queries and operations interact with the "active" service
 	      represented in the SCDynamicStore.  Only a limited subset of the
 	      SCNetworkService APIs are supported.
-	@param prefs The dynamic store session.
+	@param store The dynamic store session.
 	@param serviceID The unique identifier for the service.
 	@result A reference to the SCNetworkService represented in the SCDynamicStore;
 		NULL if the serviceID does not exist in the SCDynamicStore or if an
@@ -772,7 +911,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
@@ -783,7 +922,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
@@ -798,7 +937,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
@@ -807,7 +946,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
@@ -842,7 +981,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)
@@ -860,6 +999,19 @@ isA_SCNetworkSet(CFTypeRef obj)
 }
 
 
+/*!
+	@function _SCNetworkSetCompare
+	@discussion Compares two SCNetworkSet objects.
+	@param val1 The SCNetworkSet object.
+	@param val2 The SCNetworkSet object.
+	@param context Not used.
+	@result A comparison result.
+ */
+CFComparisonResult
+_SCNetworkSetCompare					(const void			*val1,
+							 const void			*val2,
+							 void				*context)	API_AVAILABLE(macos(10.13), ios(11.0));
+
 /*!
 	@function SCNetworkSetCopyAvailableInterfaces
 	@discussion Returns all available interfaces for the set.
@@ -869,7 +1021,17 @@ isA_SCNetworkSet(CFTypeRef obj)
 		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
+	@discussion Create a new [default] set in the configuration.
+	@param prefs The "preferences" session.
+	@result A reference to the new SCNetworkSet.
+		You must release the returned value.
+ */
+SCNetworkSetRef
+_SCNetworkSetCreateDefault				(SCPreferencesRef		prefs)		API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0));
 
 /*!
 	@function SCNetworkSetEstablishDefaultConfiguration
@@ -888,7 +1050,7 @@ SCNetworkSetCopyAvailableInterfaces			(SCNetworkSetRef		set)		__OSX_AVAILABLE_ST
 		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
@@ -909,7 +1071,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
@@ -922,7 +1084,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
@@ -935,11 +1097,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
@@ -961,7 +1123,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
@@ -970,7 +1132,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
@@ -979,7 +1141,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
@@ -997,7 +1159,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
@@ -1008,7 +1170,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
@@ -1019,7 +1181,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
@@ -1028,7 +1190,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
@@ -1036,9 +1198,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,
@@ -1051,7 +1213,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
@@ -1075,10 +1237,10 @@ _SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options)				__OSX_AVAI
 
 CF_RETURNS_RETAINED
 CFArrayRef
-_SCNetworkConfigurationPerformMigration(CFURLRef sourceDir,
-					CFURLRef currentDir,
-					CFURLRef targetDir,
-					CFDictionaryRef options)				__OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0);
+_SCNetworkConfigurationPerformMigration		(CFURLRef			sourceDir,
+						 CFURLRef			currentDir,
+						 CFURLRef			targetDir,
+						 CFDictionaryRef		options)	API_AVAILABLE(macos(10.10), ios(8.0));
 
 
 /*!
@@ -1092,30 +1254,43 @@ _SCNetworkConfigurationPerformMigration(CFURLRef sourceDir,
  */
 
 Boolean
-_SCNetworkConfigurationCheckValidity(CFURLRef configDir,
-				     CFDictionaryRef options)					__OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0);
+_SCNetworkConfigurationCheckValidity		(CFURLRef			configDir,
+						 CFDictionaryRef		options)	API_AVAILABLE(macos(10.10), ios(8.0));
+
+
+/*!
+ @function	_SCNetworkConfigurationCheckValidityWithPreferences
+ @discussion	Validates the specified preferences.plist against NetworkInterfaces.plist
+ @param prefs	the preferences ref pointing to the said preferences.plist
+ @param ni_prefs	the preferences ref pointing to the said NetworkInterfaces.plist
+ @result	TRUE if the configurations are valid against each other
+
+ */
+
+Boolean
+_SCNetworkConfigurationCheckValidityWithPreferences
+						(SCPreferencesRef		prefs,
+						 SCPreferencesRef		ni_prefs,
+						 CFDictionaryRef		options)	API_AVAILABLE(macos(10.11), ios(9.0));
 
 
 /*!
  @function _SCNetworkMigrationAreConfigurationsIdentical
  @discussion Compares the migration output between network configurations
 		with the expected output.
- @param configPref Preferences pointing toward preferences.plist file to
-		be compared with expected file.
- @param configNetworkInterfacePref Preferences pointing toward NetworkInterfaces.plist
-		file to be compared with expected file.
- @param expectedConfigPref Preferences pointing toward preferences.plist file
-		which is the expected result.
- @param expectedNetworkInterfacePref Preferences pointing toward NetworkInterfaces.plist
-		file which is the expected file.
+ @param configurationURL A URL pointing to the top-level directory of the
+		configuration to compare. This directory is expected to have
+		a Library/Preferences/SystemConfiguration subdirectoy.
+ @param expectedConfigurationURL A URL pointing to the top-level directory of
+		the expected configuration. This directory is expected to have
+		a Library/Preferences/SystemConfiguration subdirectoy.
  @result TRUE if configurations match with the expected configurations
 
  */
 
 Boolean
-_SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL,
-					       CFURLRef expectedConfigurationURL)
-							__OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0);
+_SCNetworkMigrationAreConfigurationsIdentical	(CFURLRef			configurationURL,
+						 CFURLRef			expectedConfigurationURL)	API_AVAILABLE(macos(10.10), ios(8.0));
 
 /*!
  @function	_SCNetworkConfigurationCopyMigrationRemovePaths
@@ -1123,12 +1298,13 @@ _SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL,
  @param targetPaths	the CFArray returned by _SCNetworkConfigurationPerformMigration
  @param targetDir	the CFURL passed to _SCNetworkConfigurationPerformMigration
  @result	An array of CFURL's; NULL if no paths need to be removed from the target filesystem
- 
+
 */
 
 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/src/configd/SystemConfiguration.fproj/SCNetworkConnection.c b/src/configd/SystemConfiguration.fproj/SCNetworkConnection.c
index 991457ff1..bd9be38a3 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConnection.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConnection.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2003-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2019 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,16 +35,15 @@
 //#define DEBUG_MACH_PORT_ALLOCATIONS
 
 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
-#include 
-#include 
+
+#include "SCNetworkConnectionInternal.h"
+#include "SCNetworkConfigurationInternal.h"
+#include "SCD.h"
+
 #include 
 #include 
 
@@ -79,9 +78,6 @@
 #define	PPPCONTROLLER_SERVER_PRIV	PPPCONTROLLER_SERVER
 #endif	// !PPPCONTROLLER_SERVER_PRIV
 
-
-#include "SCNetworkConnectionInternal.h"
-
 static int		debug			= 0;
 static pthread_once_t	initialized		= PTHREAD_ONCE_INIT;
 static pthread_mutex_t	scnc_lock		= PTHREAD_MUTEX_INITIALIZER;
@@ -140,13 +136,26 @@ typedef struct {
 	/* Flow Divert support info */
 	CFDictionaryRef			flow_divert_token_params;
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	/* NetworkExtension data structures */
 	ne_session_t			ne_session;
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 } SCNetworkConnectionPrivate, *SCNetworkConnectionPrivateRef;
 
 
+__private_extern__ os_log_t
+__log_SCNetworkConnection(void)
+{
+	static os_log_t	log	= NULL;
+
+	if (log == NULL) {
+		log = os_log_create("com.apple.SystemConfiguration", "SCNetworkConnection");
+	}
+
+	return log;
+}
+
+
 static __inline__ CFTypeRef
 isA_SCNetworkConnection(CFTypeRef obj)
 {
@@ -154,8 +163,8 @@ isA_SCNetworkConnection(CFTypeRef obj)
 }
 
 
-#if !TARGET_IPHONE_SIMULATOR
-Boolean
+#if	!TARGET_OS_SIMULATOR
+static Boolean
 __SCNetworkConnectionUseNetworkExtension(SCNetworkConnectionPrivateRef connectionPrivate)
 {
 	Boolean result = FALSE;
@@ -168,17 +177,27 @@ __SCNetworkConnectionUseNetworkExtension(SCNetworkConnectionPrivateRef connectio
 		 * In that case, we try to get the service type/subtype from the dynamic store.
 		 */
 		if (!result && SCError() == kSCStatusInvalidArgument) {
-			CFStringRef interfaceKey = SCDynamicStoreKeyCreateNetworkServiceEntity(kCFAllocatorDefault,
-											     kSCDynamicStoreDomainSetup,
-											     SCNetworkServiceGetServiceID(connectionPrivate->service),
-											     kSCEntNetInterface);
-			CFDictionaryRef interfaceDict = SCDynamicStoreCopyValue(NULL, interfaceKey);
+			CFStringRef	interfaceKey;
+			CFDictionaryRef	interfaceDict;
+			CFStringRef	serviceID;
+
+			serviceID = SCNetworkServiceGetServiceID(connectionPrivate->service);
+			interfaceKey = SCDynamicStoreKeyCreateNetworkServiceEntity(kCFAllocatorDefault,
+										   kSCDynamicStoreDomainSetup,
+										   serviceID,
+										   kSCEntNetInterface);
+			interfaceDict = SCDynamicStoreCopyValue(NULL, interfaceKey);
 			if (isA_CFDictionary(interfaceDict)) {
 				CFStringRef interfaceType = CFDictionaryGetValue(interfaceDict, kSCPropNetInterfaceType);
 				if (isA_CFString(interfaceType)) {
 					if (CFEqual(interfaceType, kSCNetworkInterfaceTypePPP)) {
 						CFStringRef interfaceSubType = CFDictionaryGetValue(interfaceDict, kSCPropNetInterfaceSubType);
-						result = (isA_CFString(interfaceSubType) && (CFEqual(interfaceSubType, kSCValNetInterfaceSubTypePPTP) || CFEqual(interfaceSubType, kSCValNetInterfaceSubTypeL2TP)));
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+						result = (isA_CFString(interfaceSubType) &&
+							  (CFEqual(interfaceSubType, kSCValNetInterfaceSubTypePPTP) ||
+							   CFEqual(interfaceSubType, kSCValNetInterfaceSubTypeL2TP)));
+#pragma GCC diagnostic pop
 					} else {
 						result = (CFEqual(interfaceType, kSCNetworkInterfaceTypeVPN) || CFEqual(interfaceType, kSCNetworkInterfaceTypeIPSec));
 					}
@@ -193,17 +212,18 @@ __SCNetworkConnectionUseNetworkExtension(SCNetworkConnectionPrivateRef connectio
 
 	return result;
 }
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 
-Boolean
+static Boolean
 __SCNetworkConnectionUsingNetworkExtension(SCNetworkConnectionPrivateRef connectionPrivate)
 {
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
     return (connectionPrivate->ne_session != NULL);
 #else
+#pragma unused(connectionPrivate)
 	return FALSE;
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 }
 
 
@@ -236,17 +256,13 @@ __SCNetworkConnectionDeallocate(CFTypeRef cf)
 	pthread_mutex_destroy(&connectionPrivate->lock);
 
 	if (connectionPrivate->client_audit_session != MACH_PORT_NULL) {
-		mach_port_mod_refs(mach_task_self(),
-				   connectionPrivate->client_audit_session,
-				   MACH_PORT_RIGHT_SEND,
-				   -1);
+		mach_port_deallocate(mach_task_self(),
+				     connectionPrivate->client_audit_session);
 	}
 
 	if (connectionPrivate->client_bootstrap_port != MACH_PORT_NULL) {
-		mach_port_mod_refs(mach_task_self(),
-				   connectionPrivate->client_bootstrap_port,
-				   MACH_PORT_RIGHT_SEND,
-				   -1);
+		mach_port_deallocate(mach_task_self(),
+				     connectionPrivate->client_bootstrap_port);
 	}
 
 	if (connectionPrivate->client_bundle_id != NULL) {
@@ -299,12 +315,12 @@ __SCNetworkConnectionDeallocate(CFTypeRef cf)
 		CFRelease(connectionPrivate->flow_divert_token_params);
 	}
 
-#if !TARGET_IPHONE_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_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 	return;
 }
@@ -380,49 +396,55 @@ __SCNetworkConnectionQueue()
 
 
 static void
-__SCNetworkConnectionCallBackRunLoopPerform(SCNetworkConnectionRef connection,
-					    CFRunLoopRef rl,
-					    CFStringRef rl_mode,
-					    SCNetworkConnectionCallBack rlsFunction,
-					    void (*context_release)(const void *),
-					    void *context_info)
+__SCNetworkConnectionNotify(SCNetworkConnectionRef	connection,
+			    SCNetworkConnectionCallBack	rlsFunction,
+			    SCNetworkConnectionStatus	nc_status,
+			    void			(*context_release)(const void *),
+			    void			*context_info)
+{
+	SC_log(LOG_DEBUG, "exec SCNetworkConnection callout");
+	(*rlsFunction)(connection, nc_status, context_info);
+	if ((context_release != NULL) && (context_info != NULL)) {
+		(*context_release)(context_info);
+	}
+
+	return;
+}
+
+
+static void
+__SCNetworkConnectionCallBackRunLoopPerform(SCNetworkConnectionRef		connection,
+					    CFRunLoopRef			rl,
+					    CFStringRef				rl_mode,
+					    SCNetworkConnectionCallBack		rlsFunction,
+					    void				(*context_release)(const void *),
+					    void				*context_info)
 {
-	SCNetworkConnectionStatus	nc_status	= kSCNetworkConnectionInvalid;
+	SCNetworkConnectionStatus	nc_status;
 
 	nc_status = SCNetworkConnectionGetStatus(connection);
-	CFRunLoopPerformBlock(rl, rl_mode,
-			      ^{
-				      (*rlsFunction)(connection, nc_status, context_info);
-				      if ((context_release != NULL) && (context_info != NULL)) {
-					      (*context_release)(context_info);
-				      }
-				      CFRelease(rl);
-				      CFRelease(rl_mode);
-				      CFRelease(connection);
-			      });
+	CFRunLoopPerformBlock(rl, rl_mode, ^{
+		__SCNetworkConnectionNotify(connection, rlsFunction, nc_status, context_release, context_info);
+		CFRelease(connection);
+	});
 	CFRunLoopWakeUp(rl);
 	return;
 }
 
 static void
-__SCNetworkConnectionCallBackDispatchPerform(SCNetworkConnectionRef connection,
-					     dispatch_queue_t q,
-					     SCNetworkConnectionCallBack rlsFunction,
-					     void (*context_release)(const void *),
-					     void *context_info)
+__SCNetworkConnectionCallBackDispatchPerform(SCNetworkConnectionRef		connection,
+					     dispatch_queue_t			q,
+					     SCNetworkConnectionCallBack	rlsFunction,
+					     void				(*context_release)(const void *),
+					     void				*context_info)
 {
-	SCNetworkConnectionStatus	nc_status	= kSCNetworkConnectionInvalid;
+	SCNetworkConnectionStatus	nc_status;
 
 	nc_status = SCNetworkConnectionGetStatus(connection);
-	dispatch_async(q,
-		       ^{
-			       (*rlsFunction)(connection, nc_status, context_info);
-			       if ((context_release != NULL) && (context_info != NULL)) {
-				       (*context_release)(context_info);
-			       }
-			       dispatch_release(q);
-			       CFRelease(connection);
-		       });
+	dispatch_async(q, ^{
+		__SCNetworkConnectionNotify(connection, rlsFunction, nc_status, context_release, context_info);
+		CFRelease(connection);
+	});
 	return;
 }
 
@@ -462,19 +484,16 @@ __SCNetworkConnectionCallBack(void *connection)
 		context_release	= NULL;
 	}
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		pthread_mutex_unlock(&connectionPrivate->lock);
 
 		nc_status = SCNetworkConnectionGetStatus(connection);
-		(*rlsFunction)(connection, nc_status, context_info);
-		if ((context_release != NULL) && (context_info != NULL)) {
-			(*context_release)(context_info);
-		}
+		__SCNetworkConnectionNotify(connection, rlsFunction, nc_status, context_release, context_info);
 		CFRelease(connection); /* This releases the reference that we took in the NESessionEventStatusChanged event handler */
 		return;
 	}
-#endif /* !TARGET_IPHONE_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)
@@ -496,10 +515,7 @@ __SCNetworkConnectionCallBack(void *connection)
 
 	if (!exec_async) {
 		nc_status = SCNetworkConnectionGetStatus(connection);
-		(*rlsFunction)(connection, nc_status, context_info);
-		if ((context_release != NULL) && (context_info != NULL)) {
-			(*context_release)(context_info);
-		}
+		__SCNetworkConnectionNotify(connection, rlsFunction, nc_status, context_release, context_info);
 		CFRelease(connection);
 		return;
 	}
@@ -508,11 +524,12 @@ __SCNetworkConnectionCallBack(void *connection)
 		assert(q != NULL);
 		dispatch_retain(q);
 		dispatch_async(__SCNetworkConnectionQueue(), ^{
-				       __SCNetworkConnectionCallBackDispatchPerform(connection,
-										    q,
-										    rlsFunction,
-										    context_release,
-										    context_info);
+		       __SCNetworkConnectionCallBackDispatchPerform(connection,
+								    q,
+								    rlsFunction,
+								    context_release,
+								    context_info);
+			dispatch_release(q);
 		});
 	} else {
 		assert(rl != NULL);
@@ -525,6 +542,8 @@ __SCNetworkConnectionCallBack(void *connection)
 								    rlsFunction,
 								    context_release,
 								    context_info);
+			CFRelease(rl);
+			CFRelease(rl_mode);
 		});
 	}
 
@@ -535,17 +554,21 @@ __SCNetworkConnectionCallBack(void *connection)
 static void
 __SCNetworkConnectionMachCallBack(CFMachPortRef port, void * msg, CFIndex size, void * info)
 {
+#pragma unused(port)
+#pragma unused(size)
 	mach_no_senders_notification_t	*buf			= msg;
 	mach_msg_id_t			msgid			= buf->not_header.msgh_id;
 	SCNetworkConnectionRef		connection		= (SCNetworkConnectionRef)info;
 
 	if (msgid == MACH_NOTIFY_NO_SENDERS) {
 		// re-establish notification
-		SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCNetworkConnectionMachCallBack: PPPController server died"));
+		SC_log(LOG_INFO, "PPPController server died");
 		(void)__SCNetworkConnectionReconnectNotifications(connection);
 	}
 
 	__SCNetworkConnectionCallBack(info);
+
+	return;
 }
 
 
@@ -576,7 +599,6 @@ __SCNetworkConnectionCreatePrivate(CFAllocatorRef		allocator,
 	SCNetworkConnectionPrivateRef	connectionPrivate	= NULL;
 	uint32_t			size;
 
-
 	/* initialize runtime */
 	pthread_once(&initialized, __SCNetworkConnectionInitialize);
 
@@ -587,36 +609,24 @@ __SCNetworkConnectionCreatePrivate(CFAllocatorRef		allocator,
 		goto fail;
 	}
 
-	/* zero the data structure */
-	bzero(((u_char*)connectionPrivate)+sizeof(CFRuntimeBase), size);
-
+	/* initialize non-zero/NULL members */
 	pthread_mutex_init(&connectionPrivate->lock, NULL);
-
-	/* save the service */
 	if (service != NULL) {
 		connectionPrivate->service = CFRetain(service);
 	}
-
-	connectionPrivate->client_audit_session = MACH_PORT_NULL;
-	connectionPrivate->client_bootstrap_port = MACH_PORT_NULL;
 	connectionPrivate->client_uid = geteuid();
 	connectionPrivate->client_gid = getegid();
 	connectionPrivate->client_pid = getpid();
-	connectionPrivate->client_bundle_id = NULL;
-	uuid_clear(connectionPrivate->client_uuid);
-
 	connectionPrivate->rlsFunction = callout;
-
 	if (context) {
-		bcopy(context, &connectionPrivate->rlsContext, sizeof(SCNetworkConnectionContext));
+		memcpy(&connectionPrivate->rlsContext, context, sizeof(SCNetworkConnectionContext));
 		if (context->retain != NULL) {
 			connectionPrivate->rlsContext.info = (void *)(*context->retain)(context->info);
 		}
 	}
-
 	connectionPrivate->type = kSCNetworkConnectionTypeUnknown;
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUseNetworkExtension(connectionPrivate)) {
 		CFStringRef serviceID = SCNetworkServiceGetServiceID(connectionPrivate->service);
 		if (serviceID != NULL) {
@@ -630,11 +640,13 @@ __SCNetworkConnectionCreatePrivate(CFAllocatorRef		allocator,
 		}
 
 		if (connectionPrivate->ne_session == NULL) {
-			SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnection failed to create an ne_session: service ID %@ is not a valid UUID"), serviceID);
+			SC_log(LOG_NOTICE,
+			       "SCNetworkConnection failed to create an ne_session: service ID %@ is not a valid UUID",
+			       serviceID);
 			goto fail;
 		}
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 	/* success, return the connection reference */
 	return connectionPrivate;
@@ -678,9 +690,8 @@ __SCNetworkConnectionServerPort(kern_return_t *status)
 			break;
 		default :
 #ifdef	DEBUG
-			SCLog(_sc_verbose, LOG_DEBUG,
-			      CFSTR("SCNetworkConnection bootstrap_look_up() failed: status=%s"),
-			      bootstrap_strerror(*status));
+			SC_log(LOG_DEBUG, "bootstrap_look_up() failed: status=%s",
+			       bootstrap_strerror(*status));
 #endif	// DEBUG
 			break;
 	}
@@ -719,12 +730,12 @@ __SCNetworkConnectionRefreshServerPort(mach_port_t current_server, int *mach_res
 	return new_server;
 }
 
-#if	((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) && (!TARGET_IPHONE_SIMULATOR || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 70000))
+#if	((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) && (!TARGET_OS_SIMULATOR || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 70000))
 #define	HAVE_PPPCONTROLLER_ATTACHWITHAUDITSESSION
 #endif
 
 
-#if	((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) && !TARGET_IPHONE_SIMULATOR
+#if	((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) && !TARGET_OS_SIMULATOR
 #define	HAVE_PPPCONTROLLER_ATTACHWITHPROXY
 #endif
 
@@ -778,7 +789,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate
 			// allocate port (for server response)
 			status = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, ¬ify_port);
 			if (status != KERN_SUCCESS) {
-				SCLog(TRUE, LOG_ERR, CFSTR("__SCNetworkConnectionSessionPort mach_port_allocate(): %s"), mach_error_string(status));
+				SC_log(LOG_ERR, "mach_port_allocate() failed: %s", mach_error_string(status));
 				sc_status = status;
 				goto done;
 			}
@@ -789,7 +800,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate
 							notify_port,
 							MACH_MSG_TYPE_MAKE_SEND);
 			if (status != KERN_SUCCESS) {
-				SCLog(TRUE, LOG_ERR, CFSTR("__SCNetworkConnectionSessionPort mach_port_insert_right(): %s"), mach_error_string(status));
+				SC_log(LOG_NOTICE, "mach_port_insert_right() failed: %s", mach_error_string(status));
 				mach_port_mod_refs(mach_task_self(), notify_port, MACH_PORT_RIGHT_RECEIVE, -1);
 				sc_status = status;
 				goto done;
@@ -847,10 +858,9 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate
 #endif	// HAVE_PPPCONTROLLER_ATTACHWITHPROXY
 			if (status == KERN_SUCCESS) {
 				if (sc_status != kSCStatusOK) {
-					SCLog(TRUE, LOG_DEBUG,
-					      CFSTR("__SCNetworkConnectionSessionPort : attach w/error, sc_status=%s%s"),
-					      SCErrorString(sc_status),
-					      (connectionPrivate->session_port != MACH_PORT_NULL) ? ", w/session_port!=MACH_PORT_NULL" : "");
+					SC_log(LOG_DEBUG, "attach w/error, sc_status=%s%s",
+					       SCErrorString(sc_status),
+					       (connectionPrivate->session_port != MACH_PORT_NULL) ? ", w/session_port!=MACH_PORT_NULL" : "");
 
 					if (connectionPrivate->session_port != MACH_PORT_NULL) {
 						__MACH_PORT_DEBUG(TRUE,
@@ -872,7 +882,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate
 			}
 
 			// our [cached] server port is not valid
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkConnectionSessionPort : !attach: %s"), SCErrorString(status));
+			SC_log(LOG_INFO, "!attach: %s", SCErrorString(status));
 			if (status == MACH_SEND_INVALID_DEST) {
 				// the server is not yet available
 				__MACH_PORT_DEBUG(TRUE, "*** __SCNetworkConnectionSessionPort notify_port (!dest)", notify_port);
@@ -934,14 +944,14 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate
 								MACH_MSG_TYPE_MAKE_SEND_ONCE,
 								&oldNotify);
 			if (status != KERN_SUCCESS) {
-				SCLog(TRUE, LOG_ERR, CFSTR("__SCNetworkConnectionSessionPort mach_port_request_notification(): %s"), mach_error_string(status));
+				SC_log(LOG_NOTICE, "mach_port_request_notification() failed: %s", mach_error_string(status));
 				mach_port_mod_refs(mach_task_self(), notify_port, MACH_PORT_RIGHT_RECEIVE, -1);
 				sc_status = status;
 				goto done;
 			}
 
 			if (oldNotify != MACH_PORT_NULL) {
-				SCLog(TRUE, LOG_ERR, CFSTR("__SCNetworkConnectionSessionPort(): oldNotify != MACH_PORT_NULL"));
+				SC_log(LOG_NOTICE, "oldNotify != MACH_PORT_NULL");
 			}
 
 			// create CFMachPort for SCNetworkConnection notification callback
@@ -985,14 +995,10 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate
 					  notify_port);
 			break;
 		case BOOTSTRAP_UNKNOWN_SERVICE :
-			SCLog(TRUE,
-			      (status == KERN_SUCCESS) ? LOG_DEBUG : LOG_ERR,
-			      CFSTR("PPPController not available"));
+			SC_log((status == KERN_SUCCESS) ? LOG_NOTICE : LOG_ERR, "PPPController not available");
 			break;
 		default :
-			SCLog(TRUE,
-			      (status == KERN_SUCCESS) ? LOG_DEBUG : LOG_ERR,
-			      CFSTR("__SCNetworkConnectionSessionPort pppcontroller_attach(): %s"),
+			SC_log((status == KERN_SUCCESS) ? LOG_NOTICE : LOG_ERR, "pppcontroller_attach() failed: %s",
 			      SCErrorString(sc_status));
 			break;
 	}
@@ -1083,18 +1089,18 @@ __SCNetworkConnectionReconnectNotifications(SCNetworkConnectionRef connection)
 
 			ok = SCNetworkConnectionScheduleWithRunLoop(connection, rl, rlMode);
 			if (!ok) {
-				SCLog((SCError() != BOOTSTRAP_UNKNOWN_SERVICE),
-				      LOG_ERR,
-				      CFSTR("__SCNetworkConnectionReconnectNotifications: SCNetworkConnectionScheduleWithRunLoop() failed"));
+				if (SCError() != BOOTSTRAP_UNKNOWN_SERVICE) {
+					SC_log(LOG_NOTICE, "SCNetworkConnectionScheduleWithRunLoop() failed");
+				}
 				goto done;
 			}
 		}
 	} else if (dispatchQueue != NULL) {
 		ok = SCNetworkConnectionSetDispatchQueue(connection, dispatchQueue);
 		if (!ok) {
-			SCLog((SCError() != BOOTSTRAP_UNKNOWN_SERVICE),
-			      LOG_ERR,
-			      CFSTR("__SCNetworkConnectionReconnectNotifications: SCNetworkConnectionSetDispatchQueue() failed"));
+			if (SCError() != BOOTSTRAP_UNKNOWN_SERVICE) {
+				SC_log(LOG_NOTICE, "SCNetworkConnectionSetDispatchQueue() failed");
+			}
 			goto done;
 		}
 	} else {
@@ -1112,9 +1118,8 @@ __SCNetworkConnectionReconnectNotifications(SCNetworkConnectionRef connection)
 	}
 
 	if (!ok) {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SCNetworkConnection server %s, notification not restored"),
-		      (SCError() == BOOTSTRAP_UNKNOWN_SERVICE) ? "shutdown" : "failed");
+		SC_log(LOG_NOTICE, "SCNetworkConnection server %s, notification not restored",
+		       (SCError() == BOOTSTRAP_UNKNOWN_SERVICE) ? "shutdown" : "failed");
 	}
 
 	return ok;
@@ -1138,7 +1143,7 @@ __SCNetworkConnectionNeedsRetry(SCNetworkConnectionRef	connection,
 		(void) mach_port_deallocate(mach_task_self(), connectionPrivate->session_port);
 	} else {
 		// we got an unexpected error, leave the [session] port alone
-		SCLog(TRUE, LOG_ERR, CFSTR("%s: %s"), error_label, mach_error_string(status));
+		SC_log(LOG_NOTICE, "%s: %s", error_label, mach_error_string(status));
 	}
 	connectionPrivate->session_port = MACH_PORT_NULL;
 	if ((status == MACH_SEND_INVALID_DEST) || (status == MIG_SERVER_DIED)) {
@@ -1230,6 +1235,12 @@ SCNetworkConnectionCreateWithService(CFAllocatorRef			allocator,
 		return FALSE;
 	}
 
+	if (__SCNetworkServiceIsPPTP(service)) {
+		SC_log(LOG_INFO, "PPTP VPNs are no longer supported");
+		_SCErrorSet(kSCStatusConnectionIgnore);
+		return FALSE;
+	}
+
 	connectionPrivate = __SCNetworkConnectionCreatePrivate(allocator, service, callout, context);
 	return (SCNetworkConnectionRef)connectionPrivate;
 }
@@ -1308,10 +1319,8 @@ SCNetworkConnectionSetClientInfo(SCNetworkConnectionRef	connection,
 
 	// save client audit session port
 	if (connectionPrivate->client_audit_session != MACH_PORT_NULL) {
-		mach_port_mod_refs(mach_task_self(),
-				   connectionPrivate->client_audit_session,
-				   MACH_PORT_RIGHT_SEND,
-				   -1);
+		mach_port_deallocate(mach_task_self(),
+				     connectionPrivate->client_audit_session);
 		connectionPrivate->client_audit_session = MACH_PORT_NULL;
 	}
 	connectionPrivate->client_audit_session = client_audit_session;
@@ -1319,7 +1328,7 @@ SCNetworkConnectionSetClientInfo(SCNetworkConnectionRef	connection,
 		mach_port_mod_refs(mach_task_self(),
 				   connectionPrivate->client_audit_session,
 				   MACH_PORT_RIGHT_SEND,
-				   1);
+				   +1);
 	}
 
 	// save client UID, GID, and PID
@@ -1363,10 +1372,8 @@ SCNetworkConnectionSetClientAuditInfo(SCNetworkConnectionRef	connection,
 	}
 
 	if (connectionPrivate->client_bootstrap_port != MACH_PORT_NULL) {
-		mach_port_mod_refs(mach_task_self(),
-				   connectionPrivate->client_bootstrap_port,
-				   MACH_PORT_RIGHT_SEND,
-				   -1);
+		mach_port_deallocate(mach_task_self(),
+				     connectionPrivate->client_bootstrap_port);
 		connectionPrivate->client_bootstrap_port = MACH_PORT_NULL;
 	}
 
@@ -1375,7 +1382,7 @@ SCNetworkConnectionSetClientAuditInfo(SCNetworkConnectionRef	connection,
 		mach_port_mod_refs(mach_task_self(),
 				   connectionPrivate->client_bootstrap_port,
 				   MACH_PORT_RIGHT_SEND,
-				   1);
+				   +1);
 	}
 
 	memcpy(&connectionPrivate->client_audit_token, &client_audit_token, sizeof(connectionPrivate->client_audit_token));
@@ -1415,7 +1422,7 @@ SCNetworkConnectionCopyStatistics(SCNetworkConnectionRef connection)
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		__block xpc_object_t xstats = NULL;
 		ne_session_t ne_session = connectionPrivate->ne_session;
@@ -1443,7 +1450,7 @@ SCNetworkConnectionCopyStatistics(SCNetworkConnectionRef connection)
 
 		return statistics;
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
     retry :
 
@@ -1528,7 +1535,7 @@ SCNetworkConnectionGetStatus(SCNetworkConnectionRef connection)
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		__block ne_session_status_t ne_status;
 		ne_session_t ne_session = connectionPrivate->ne_session;
@@ -1547,7 +1554,7 @@ SCNetworkConnectionGetStatus(SCNetworkConnectionRef connection)
 
 		return SCNetworkConnectionGetStatusFromNEStatus(ne_status);
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
     retry :
 
@@ -1619,7 +1626,7 @@ SCNetworkConnectionCopyExtendedStatus(SCNetworkConnectionRef connection)
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		__block CFDictionaryRef statusDictionary = NULL;
 		ne_session_t ne_session = connectionPrivate->ne_session;
@@ -1760,7 +1767,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef	connection,
 	if (debug > 0) {
 		CFMutableDictionaryRef	mdict = NULL;
 
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStart (%p)"), connectionPrivate);
+		SC_log(LOG_INFO, "SCNetworkConnectionStart (%p)", connectionPrivate);
 
 		if (userOptions != NULL) {
 			CFDictionaryRef		dict;
@@ -1807,7 +1814,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef	connection,
 			}
 		}
 
-		SCLog(TRUE, LOG_DEBUG, CFSTR("User options: %@"), mdict);
+		SC_log(LOG_INFO, "User options: %@", mdict);
 		if (mdict != NULL) CFRelease(mdict);
 	}
 
@@ -1819,7 +1826,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef	connection,
 	    connectionPrivate->flow_divert_token_params = NULL;
 	}
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		xpc_object_t xuser_options = NULL;
 
@@ -1828,7 +1835,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,
@@ -1848,6 +1855,9 @@ SCNetworkConnectionStart(SCNetworkConnectionRef	connection,
 			ne_session_start_with_options(connectionPrivate->ne_session, xuser_options);
 		}
 
+		/* make sure the xpc_message goes through */
+		ne_session_send_barrier(connectionPrivate->ne_session);
+
 		if (xuser_options != NULL) {
 			xpc_release(xuser_options);
 		}
@@ -1855,10 +1865,10 @@ SCNetworkConnectionStart(SCNetworkConnectionRef	connection,
 		ok = TRUE;
 		goto done;
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 	if (userOptions && !_SCSerialize(userOptions, &dataref, &data, &datalen)) {
-		return FALSE;
+		goto done;
 	}
 
     retry :
@@ -1884,7 +1894,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef	connection,
 	if (dataref)	CFRelease(dataref);
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStart (%p), return: %d"), connectionPrivate, sc_status);
+		SC_log(LOG_INFO, "SCNetworkConnectionStart (%p), return: %d", connectionPrivate, sc_status);
 	}
 
 	if (sc_status != kSCStatusOK) {
@@ -1917,18 +1927,20 @@ SCNetworkConnectionStop(SCNetworkConnectionRef	connection,
 	}
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStop (%p)"), connectionPrivate);
+		SC_log(LOG_INFO, "SCNetworkConnectionStop (%p)", connectionPrivate);
 	}
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		ne_session_stop(connectionPrivate->ne_session);
+		/* make sure the xpc_message goes through */
+		ne_session_send_barrier(connectionPrivate->ne_session);
 		ok = TRUE;
 		goto done;
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
     retry :
 
@@ -1946,7 +1958,7 @@ SCNetworkConnectionStop(SCNetworkConnectionRef	connection,
 	}
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStop (%p), return: %d"), connectionPrivate, sc_status);
+		SC_log(LOG_INFO, "SCNetworkConnectionStop (%p), return: %d", connectionPrivate, sc_status);
 	}
 
 	if (sc_status != kSCStatusOK) {
@@ -1979,18 +1991,18 @@ SCNetworkConnectionSuspend(SCNetworkConnectionRef connection)
 	}
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionSuspend (%p)"), connectionPrivate);
+		SC_log(LOG_INFO, "SCNetworkConnectionSuspend (%p)", connectionPrivate);
 	}
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !!TARGET_IPHONE_SIMULATOR
+#if	!!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		/* Suspend only applies to PPPSerial and PPPoE */
 		ok = TRUE;
 		goto done;
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
     retry :
 
@@ -2008,7 +2020,7 @@ SCNetworkConnectionSuspend(SCNetworkConnectionRef connection)
 	}
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionSuspend (%p), return: %d"), connectionPrivate, sc_status);
+		SC_log(LOG_INFO, "SCNetworkConnectionSuspend (%p), return: %d", connectionPrivate, sc_status);
 	}
 
 	if (sc_status != kSCStatusOK) {
@@ -2041,18 +2053,18 @@ SCNetworkConnectionResume(SCNetworkConnectionRef connection)
 	}
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionResume (%p)"), connectionPrivate);
+		SC_log(LOG_INFO, "SCNetworkConnectionResume (%p)", connectionPrivate);
 	}
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		/* Resume only applies to PPPSerial and PPPoE */
 		ok = TRUE;
 		goto done;
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
     retry :
 
@@ -2070,7 +2082,7 @@ SCNetworkConnectionResume(SCNetworkConnectionRef connection)
 	}
 
 	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionResume (%p), return: %d"), connectionPrivate, sc_status);
+		SC_log(LOG_INFO, "SCNetworkConnectionResume (%p), return: %d", connectionPrivate, sc_status);
 	}
 
 	if (sc_status != kSCStatusOK) {
@@ -2088,79 +2100,13 @@ SCNetworkConnectionResume(SCNetworkConnectionRef connection)
 }
 
 
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 Boolean
-SCNetworkConnectionRefreshOnDemandState(SCNetworkConnectionRef connection)
+SCNetworkConnectionRefreshOnDemandState(__unused SCNetworkConnectionRef connection)
 {
-	SCNetworkConnectionPrivateRef	connectionPrivate	= (SCNetworkConnectionPrivateRef)connection;
-	Boolean				ok			= FALSE;
-	uint32_t			retry			= 0;
-	int				sc_status		= kSCStatusFailed;
-	mach_port_t			server_port		= __SCNetworkConnectionGetCurrentServerPort();
-	kern_return_t			status			= KERN_SUCCESS;
-
-	if (!isA_SCNetworkConnection(connection)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return FALSE;
-	}
-
-	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionRefreshOnDemandState (%p)"), connectionPrivate);
-	}
-
-	pthread_mutex_lock(&connectionPrivate->lock);
-
-	while (TRUE) {
-		if (server_port == MACH_PORT_NULL) {
-			server_port = __SCNetworkConnectionRefreshServerPort(server_port, &sc_status);
-			if (server_port == MACH_PORT_NULL) {
-				// if server not available
-				if (sc_status == BOOTSTRAP_UNKNOWN_SERVICE) {
-					// wait up to 2.5 seconds for the [SCNetworkConnection] server
-					// to startup
-					if ((retry += 50) < 2500) {
-						usleep(50 * 1000);	// sleep 50ms between attempts
-						continue;
-					}
-				}
-				break;
-			}
-		}
-
-		status = pppcontroller_ondemand_refresh_state(server_port, &sc_status);
-		if (status == KERN_SUCCESS)
-			break;
-
-		if (status == MACH_SEND_INVALID_DEST) {
-			// the server is not yet available
-			SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionRefreshOnDemandState (!dest) (%p)"), connectionPrivate);
-		} else if (status == MIG_SERVER_DIED) {
-			// the server we were using is gone
-			SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionRefreshOnDemandState (!mig) (%p)"), connectionPrivate);
-		} else {
-			// if we got an unexpected error, don't retry
-			sc_status = status;
-			break;
-		}
-	}
-
-	if (debug > 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionRefreshOnDemandState (%p), return: %d/%d"), connectionPrivate, status, sc_status);
-	}
-
-	if (sc_status != kSCStatusOK) {
-		_SCErrorSet(sc_status);
-		goto done;
-	}
-
-	ok = TRUE;
-
-    done :
-
-	pthread_mutex_unlock(&connectionPrivate->lock);
-	return ok;
+	return FALSE;
 }
-#endif	/* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 
 CFDictionaryRef
@@ -2181,7 +2127,7 @@ SCNetworkConnectionCopyUserOptions(SCNetworkConnectionRef connection)
 
 	pthread_mutex_lock(&connectionPrivate->lock);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
 		__block xpc_object_t config = NULL;
 		ne_session_t ne_session = connectionPrivate->ne_session;
@@ -2209,7 +2155,7 @@ SCNetworkConnectionCopyUserOptions(SCNetworkConnectionRef connection)
 		}
 		return userOptions;
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
     retry :
 
@@ -2361,7 +2307,7 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef	connection,
 			mp = CFMachPortGetPort(connectionPrivate->notify_port);
 			source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, mp, 0, queue);
 			if (source == NULL) {
-				SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnection dispatch_source_create() failed"));
+				SC_log(LOG_NOTICE, "dispatch_source_create() failed");
 				_SCErrorSet(kSCStatusFailed);
 				goto done;
 			}
@@ -2391,9 +2337,8 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef	connection,
 					      MACH_MSG_TIMEOUT_NONE,	// timeout
 					      MACH_PORT_NULL);		// notify
 				if (kr != KERN_SUCCESS) {
-					SCLog(TRUE, LOG_ERR,
-					      CFSTR("SCDynamicStore notification handler, kr=0x%x"),
-					      kr);
+					SC_log(LOG_NOTICE, "SCDynamicStore notification handler, kr=0x%x", kr);
+					free(notify_msg);
 					return;
 				}
 
@@ -2429,7 +2374,7 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef	connection,
 		_SC_schedule(connection, runLoop, runLoopMode, connectionPrivate->rlList);
 	}
 
-#if !TARGET_IPHONE_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) {
@@ -2441,7 +2386,9 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef	connection,
 					CFRunLoopSourceSignal(connectionPrivate->rls);
 					_SC_signalRunLoop(connection, connectionPrivate->rls, connectionPrivate->rlList);
 				} else if (connectionPrivate->dispatchQueue != NULL) {
-					dispatch_async(connectionPrivate->dispatchQueue, ^{ __SCNetworkConnectionCallBack((void *)connection); });
+					dispatch_async(connectionPrivate->dispatchQueue, ^{
+						__SCNetworkConnectionCallBack((void *)connection);
+					});
 				}
 				pthread_mutex_unlock(&connectionPrivate->lock);
 			} else if (event == NESessionEventCanceled) {
@@ -2449,7 +2396,7 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef	connection,
 			}
 		});
 	}
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 	ok = TRUE;
 
@@ -2466,6 +2413,7 @@ __SCNetworkConnectionUnscheduleFromRunLoop(SCNetworkConnectionRef	connection,
 					   CFStringRef			runLoopMode,
 					   dispatch_queue_t		queue)
 {
+#pragma unused(queue)
 	SCNetworkConnectionPrivateRef	connectionPrivate	= (SCNetworkConnectionPrivateRef)connection;
 	dispatch_group_t		drainGroup		= NULL;
 	dispatch_queue_t		drainQueue		= NULL;
@@ -2539,9 +2487,9 @@ __SCNetworkConnectionUnscheduleFromRunLoop(SCNetworkConnectionRef	connection,
 		connectionPrivate->scheduled = FALSE;
 
 		if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) {
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 			ne_session_cancel(connectionPrivate->ne_session);
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 		} else {
 			mach_port_t session_port = __SCNetworkConnectionSessionPort(connectionPrivate);
 			if (session_port == MACH_PORT_NULL) {
@@ -2667,34 +2615,27 @@ SCNetworkConnectionTriggerOnDemandIfNeeded	(CFStringRef			hostName,
 						 int				timeout,
 						 int				trafficClass)
 {
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	__block Boolean triggeredOnDemand = FALSE;
 	struct proc_uniqidentifierinfo procu;
 	void *policy_match = NULL;
 	char *hostname = NULL;
-	CFIndex hostnameSize = 0;
 	pid_t pid = getpid();
 	uid_t uid = geteuid();
-	
+
 	/* Require hostName, require non-root user */
 	if (hostName == NULL || geteuid() == 0) {
 		goto done;
 	}
-	
-	hostnameSize = CFStringGetLength(hostName);
-	if (hostnameSize == 0) {
-		goto done;
-	}
-	
-	hostname = malloc(hostnameSize + 1);
-	CFStringGetCString(hostName, hostname, hostnameSize + 1, kCFStringEncodingUTF8);
-	
+
+	hostname = _SC_cfstring_to_cstring(hostName, NULL, 0, kCFStringEncodingUTF8);
+
 	if (proc_pidinfo(pid, PROC_PIDUNIQIDENTIFIERINFO, 1, &procu, sizeof(procu)) != sizeof(procu)) {
 		goto done;
 	}
-	
+
 	policy_match = ne_session_copy_policy_match(hostname, NULL, NULL, procu.p_uuid, procu.p_uuid, pid, uid, 0, trafficClass);
-	
+
 	NEPolicyServiceActionType action_type = ne_session_policy_match_get_service_action(policy_match);
 	if (action_type == NESessionPolicyActionTrigger ||
 	    (afterDNSFail && action_type == NESessionPolicyActionTriggerIfNeeded)) {
@@ -2704,7 +2645,7 @@ SCNetworkConnectionTriggerOnDemandIfNeeded	(CFStringRef			hostName,
 			if (start_options != NULL) {
 				xpc_dictionary_set_bool(start_options, NESessionStartOptionIsOnDemandKey, true);
 				xpc_dictionary_set_string(start_options, NESessionStartOptionMatchHostnameKey, hostname);
-				
+
 				ne_session_t new_session = ne_session_create(config_id, ne_session_policy_match_get_service_type(policy_match));
 				if (new_session != NULL) {
 					dispatch_semaphore_t wait_for_session = dispatch_semaphore_create(0);
@@ -2716,6 +2657,7 @@ SCNetworkConnectionTriggerOnDemandIfNeeded	(CFStringRef			hostName,
 								dispatch_retain(wait_for_session);
 								ne_session_set_event_handler(new_session, __SCNetworkConnectionQueue(),
 									^(ne_session_event_t event, void *event_data) {
+#pragma unused(event_data)
 										if (event == NESessionEventStatusChanged) {
 											dispatch_retain(wait_for_session);
 											ne_session_get_status(new_session, __SCNetworkConnectionQueue(),
@@ -2744,16 +2686,16 @@ SCNetworkConnectionTriggerOnDemandIfNeeded	(CFStringRef			hostName,
 					dispatch_release(wait_for_session);
 					ne_session_release(new_session);
 				}
-				
+
 				xpc_release(start_options);
 			}
 		}
 	}
 done:
 	if (hostname) {
-		free(hostname);
+		CFAllocatorDeallocate(NULL, hostname);
 	}
-	
+
 	if (policy_match) {
 		free(policy_match);
 	}
@@ -2885,133 +2827,18 @@ SCNetworkConnectionGetType(SCNetworkConnectionRef connection)
 }
 
 
-static Boolean
-validate_flow_properties(CFDictionaryRef flowProperties)
-{
-	CFStringRef			host_name_str;
-	CFDataRef			host_address_data;
-	CFNumberRef			host_port_num;
-
-	if (!isA_CFDictionary(flowProperties)) {
-		return FALSE;
-	}
-
-	/* Validate the host name if one was given */
-	host_name_str = CFDictionaryGetValue(flowProperties, kSCNetworkConnectionFlowPropertyHostName);
-	if (host_name_str != NULL && (!isA_CFString(host_name_str) || CFStringGetLength(host_name_str) == 0)) {
-		return FALSE;
-	}
-
-	/* Validate the address if one was given */
-	host_address_data = CFDictionaryGetValue(flowProperties, kSCNetworkConnectionFlowPropertyHostAddress);
-	if (host_address_data != NULL) {
-		struct sockaddr *sock_addr;
-
-		if (!isA_CFData(host_address_data) || CFDataGetLength(host_address_data) < sizeof(struct sockaddr)) {
-			return FALSE;
-		}
-
-		sock_addr = (struct sockaddr *)CFDataGetBytePtr(host_address_data);
-		if (CFDataGetLength(host_address_data) < sock_addr->sa_len) {
-			return FALSE;
-		}
-
-		if (sock_addr->sa_family == AF_INET) {
-			if (sock_addr->sa_len >= sizeof(struct sockaddr_in)) {
-				struct sockaddr_in *sa_in = (struct sockaddr_in *)(void *)sock_addr;
-				in_addr_t any = { INADDR_ANY };
-				if (memcmp(&sa_in->sin_addr, &any, sizeof(any)) == 0) {
-					return FALSE;
-				}
-			} else {
-				return FALSE;
-			}
-		} else if (sock_addr->sa_family == AF_INET6) {
-			if (sock_addr->sa_len >= sizeof(struct sockaddr_in6)) {
-				struct sockaddr_in6 *sa_in6 = (struct sockaddr_in6 *)(void *)sock_addr;
-				struct in6_addr any = IN6ADDR_ANY_INIT;
-				if (memcmp(&sa_in6->sin6_addr, &any, sizeof(any)) == 0) {
-					return FALSE;
-				}
-			}
-		}
-	}
-
-	/* We must have either a host name or an address */
-	if (host_name_str == NULL && host_address_data == NULL) {
-		return FALSE;
-	}
-
-	/* Validate the port */
-	host_port_num = CFDictionaryGetValue(flowProperties, kSCNetworkConnectionFlowPropertyHostPort);
-	if (host_port_num != NULL) {
-		int num;
-		if (!isA_CFNumber(host_port_num) || !CFNumberGetValue(host_port_num, kCFNumberIntType, &num)) {
-			return FALSE;
-		}
-
-		if (num == 0) {
-			return FALSE;
-		}
-	} else {
-		return FALSE;
-	}
-
-	return TRUE;
-}
-
-
 CFDataRef
 SCNetworkConnectionCopyFlowDivertToken(SCNetworkConnectionRef	connection,
 				       CFDictionaryRef		flowProperties)
 {
-	CFDictionaryRef			app_properties		= NULL;
-	SCNetworkConnectionPrivateRef	connectionPrivate	= (SCNetworkConnectionPrivateRef)connection;
-	CFDataRef			token			= NULL;
-
-	if (!isA_SCNetworkConnection(connection)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		goto done;
-	}
-
-	if (connectionPrivate->service == NULL) {
-		_SCErrorSet(kSCStatusConnectionNoService);
-		goto done;
-	}
-
-	if (connectionPrivate->type != kSCNetworkConnectionTypeAppLayerVPN) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		goto done;
-	}
-
-	if (!validate_flow_properties(flowProperties)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		goto done;
-	}
-
-	app_properties = VPNAppLayerCopyCachedAppProperties(connectionPrivate->client_audit_token,
-							    connectionPrivate->client_pid,
-							    connectionPrivate->client_uuid,
-							    connectionPrivate->client_bundle_id);
-	if (app_properties == NULL) {
-		SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionCopyFlowDivertToken: no cached app properties available"));
-		_SCErrorSet(kSCStatusFailed);
-		goto done;
-	}
-
-	token = VPNAppLayerCreateFlowDivertToken(connection, app_properties, flowProperties);
-
-done:
-	if (app_properties != NULL) {
-		CFRelease(app_properties);
-	}
-
-	return token;
+#pragma unused(connection, flowProperties)
+	_SCErrorSet(kSCStatusFailed);
+	return NULL;
 }
 
 
 int
-SCNetworkConnectionGetServiceIdentifier		(SCNetworkConnectionRef		connection)
+SCNetworkConnectionGetServiceIdentifier	(SCNetworkConnectionRef	connection)
 {
 	SCNetworkConnectionPrivateRef	connectionPrivate	= (SCNetworkConnectionPrivateRef)connection;
 	int				service_identifier	= -1;
@@ -3031,7 +2858,7 @@ SCNetworkConnectionGetServiceIdentifier		(SCNetworkConnectionRef		connection)
 }
 
 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 SCNetworkConnectionStatus
 SCNetworkConnectionGetStatusFromNEStatus(ne_session_status_t status)
 {
@@ -3051,7 +2878,7 @@ SCNetworkConnectionGetStatusFromNEStatus(ne_session_status_t status)
 
 	return kSCNetworkConnectionInvalid;
 }
-#endif /* !TARGET_IPHONE_SIMULATOR */
+#endif	/* !TARGET_OS_SIMULATOR */
 
 
 #pragma mark -
@@ -3255,7 +3082,7 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void)
 	if (onDemand_notify_token == -1) {
 		status = notify_register_check(kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY, &onDemand_notify_token);
 		if (status != NOTIFY_STATUS_OK) {
-			SCLog(TRUE, LOG_ERR, CFSTR("notify_register_check() failed, status=%d"), status);
+			SC_log(LOG_NOTICE, "notify_register_check() failed, status=%d", status);
 			onDemand_notify_token = -1;
 		}
 	}
@@ -3263,7 +3090,7 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void)
 	if (onDemand_notify_token != -1) {
 		status = notify_check(onDemand_notify_token, &changed);
 		if (status != NOTIFY_STATUS_OK) {
-			SCLog(TRUE, LOG_ERR, CFSTR("notify_check() failed, status=%d"), status);
+			SC_log(LOG_NOTICE, "notify_check() failed, status=%d", status);
 			(void)notify_cancel(onDemand_notify_token);
 			onDemand_notify_token = -1;
 		}
@@ -3272,7 +3099,7 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void)
 	if (changed && (onDemand_notify_token != -1)) {
 		status = notify_get_state(onDemand_notify_token, &triggersCount);
 		if (status != NOTIFY_STATUS_OK) {
-			SCLog(TRUE, LOG_ERR, CFSTR("notify_get_state() failed, status=%d"), status);
+			SC_log(LOG_NOTICE, "notify_get_state() failed, status=%d", status);
 			(void)notify_cancel(onDemand_notify_token);
 			onDemand_notify_token = -1;
 		}
@@ -3281,11 +3108,8 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void)
 	if (changed || onDemand_force_refresh) {
 		CFStringRef	key;
 
-		if (_sc_debug || (debug > 0)) {
-			SCLog(TRUE, LOG_INFO,
-			      CFSTR("OnDemand information %s"),
-			      (onDemand_configuration == NULL) ? "fetched" : "updated");
-		}
+		SC_log(LOG_INFO, "OnDemand information %s",
+		       (onDemand_configuration == NULL) ? "fetched" : "updated");
 
 		if (onDemand_configuration != NULL) {
 			CFRelease(onDemand_configuration);
@@ -3343,9 +3167,7 @@ __SCNetworkConnectionShouldNeverMatch(CFDictionaryRef trigger, CFStringRef hostN
 		exception = CFArrayGetValueAtIndex(exceptions, exceptionsIndex);
 		if (isA_CFString(exception) && _SC_domainEndsWithDomain(hostName, exception)) {
 			// found matching exception
-			if (_sc_debug || (debug > 0)) {
-				SCLog(TRUE, LOG_INFO, CFSTR("OnDemand match exception"));
-			}
+			SC_log(LOG_INFO, "OnDemand match exception");
 			return TRUE;
 		}
 	}
@@ -3492,8 +3314,7 @@ __SCNetworkConnectionCopyMatchingTriggerWithName(CFDictionaryRef	configuration,
 	CFDictionaryRef	result		= NULL;
 	int		sc_status	= kSCStatusOK;
 	CFArrayRef	triggers;
-	uint64_t	triggersCount	= 0;
-	int		triggersIndex;
+	CFIndex		triggersCount	= 0;
 	Boolean		usedOnDemandRetry = FALSE;
 
 	if (triggerNow != NULL) {
@@ -3506,7 +3327,7 @@ __SCNetworkConnectionCopyMatchingTriggerWithName(CFDictionaryRef	configuration,
 
 	triggers = CFDictionaryGetValue(configuration, kSCNetworkConnectionOnDemandTriggers);
 	triggersCount = isA_CFArray(triggers) ? CFArrayGetCount(triggers) : 0;
-	for (triggersIndex = 0; triggersIndex < triggersCount; triggersIndex++) {
+	for (CFIndex triggersIndex = 0; triggersIndex < triggersCount; triggersIndex++) {
 		CFStringRef	matched_domain	= NULL;
 		CFStringRef	matched_probe_string = NULL;
 		CFDictionaryRef	trigger;
@@ -3632,12 +3453,11 @@ __SCNetworkConnectionCopyTriggerWithService(CFDictionaryRef	configuration,
 					    CFStringRef		service_id)
 {
 	CFArrayRef	triggers;
-	uint64_t	triggersCount	= 0;
-	int		triggersIndex;
+	CFIndex		triggersCount;
 
 	triggers = CFDictionaryGetValue(configuration, kSCNetworkConnectionOnDemandTriggers);
 	triggersCount = isA_CFArray(triggers) ? CFArrayGetCount(triggers) : 0;
-	for (triggersIndex = 0; triggersIndex < triggersCount; triggersIndex++) {
+	for (CFIndex triggersIndex = 0; triggersIndex < triggersCount; triggersIndex++) {
 		CFDictionaryRef	trigger;
 		CFStringRef	trigger_service_id;
 
@@ -3658,70 +3478,6 @@ __SCNetworkConnectionCopyTriggerWithService(CFDictionaryRef	configuration,
 }
 
 
-__private_extern__ CFDictionaryRef
-__SCNetworkConnectionCopyTokenParameters(SCNetworkConnectionRef connection)
-{
-	SCNetworkConnectionPrivateRef	connectionPrivate	= (SCNetworkConnectionPrivateRef)connection;
-	CFDictionaryRef			parameters		= NULL;
-	uint8_t     			params_buffer[PPP_MACH_MAX_INLINE_DATA];
-	uint32_t    			params_buffer_len	= sizeof(params_buffer);
-	int				sc_status		= kSCStatusOK;
-	mach_port_t			session_port;
-	kern_return_t			status;
-
-	pthread_mutex_lock(&connectionPrivate->lock);
-
-	parameters = connectionPrivate->flow_divert_token_params;
-	if (parameters != NULL) {
-	    CFRetain(parameters);
-	    goto done;
-	}
-
-retry:
-	if (parameters != NULL) {
-		CFRelease(parameters);
-		parameters = NULL;
-	}
-
-	session_port = __SCNetworkConnectionSessionPort(connectionPrivate);
-	if (session_port == MACH_PORT_NULL) {
-		goto done;
-	}
-
-	status = pppcontroller_flow_divert_copy_token_parameters(session_port, params_buffer, ¶ms_buffer_len);
-	if (status == KERN_SUCCESS) {
-		if (params_buffer_len > 0) {
-			CFDataRef params_data = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault,
-									    params_buffer,
-									    params_buffer_len,
-									    kCFAllocatorNull);
-			parameters = CFPropertyListCreateWithData(kCFAllocatorDefault,
-								  params_data,
-								  kCFPropertyListImmutable,
-								  NULL,
-								  NULL);
-			CFRelease(params_data);
-		}
-	}
-
-	if (__SCNetworkConnectionNeedsRetry(connection, "__SCNetworkConnectionCopyTokenParameters()", status, &sc_status)) {
-		goto retry;
-	}
-
-	if (sc_status != kSCStatusOK) {
-		_SCErrorSet(sc_status);
-	}
-
-done:
-	if (parameters != NULL && connectionPrivate->flow_divert_token_params == NULL) {
-	    connectionPrivate->flow_divert_token_params = (CFDictionaryRef)CFRetain(parameters);
-	}
-
-	pthread_mutex_unlock(&connectionPrivate->lock);
-
-	return parameters;
-}
-
 Boolean
 __SCNetworkConnectionCopyOnDemandInfoWithName(SCDynamicStoreRef		*storeP,
 					      CFStringRef		hostName,
@@ -3730,6 +3486,7 @@ __SCNetworkConnectionCopyOnDemandInfoWithName(SCDynamicStoreRef		*storeP,
 					      SCNetworkConnectionStatus	*connectionStatus,
 					      CFStringRef		*vpnRemoteAddress)	/*  CFDictionaryRef *info */
 {
+#pragma unused(storeP)
 	CFDictionaryRef		configuration;
 	Boolean			ok		= FALSE;
 	int			sc_status	= kSCStatusOK;
@@ -3764,8 +3521,8 @@ __SCNetworkConnectionCopyOnDemandInfoWithName(SCDynamicStoreRef		*storeP,
 			if ((*connectionServiceID != NULL) && (CFStringGetLength(*connectionServiceID) > 0)) {
 				CFRetain(*connectionServiceID);
 			} else {
-				SCLog(TRUE, LOG_INFO, CFSTR("OnDemand%s configuration error, no serviceID"),
-				      onDemandRetry ? " (on retry)" : "");
+				SC_log(LOG_INFO, "OnDemand%s configuration error, no serviceID",
+				       onDemandRetry ? " (on retry)" : "");
 				*connectionServiceID = NULL;
 				ok = FALSE;
 			}
@@ -3777,8 +3534,8 @@ __SCNetworkConnectionCopyOnDemandInfoWithName(SCDynamicStoreRef		*storeP,
 			if ((*vpnRemoteAddress != NULL) && (CFStringGetLength(*vpnRemoteAddress) > 0)) {
 				CFRetain(*vpnRemoteAddress);
 			} else {
-				SCLog(TRUE, LOG_INFO, CFSTR("OnDemand%s configuration error, no server address"),
-				      onDemandRetry ? " (on retry)" : "");
+				SC_log(LOG_INFO, "OnDemand%s configuration error, no server address",
+				       onDemandRetry ? " (on retry)" : "");
 				*vpnRemoteAddress = NULL;
 				ok = FALSE;
 			}
@@ -3795,11 +3552,9 @@ __SCNetworkConnectionCopyOnDemandInfoWithName(SCDynamicStoreRef		*storeP,
 			}
 			sc_status = kSCStatusFailed;
 		} else {
-			if (_sc_debug || (debug > 0)) {
-				SCLog(TRUE, LOG_INFO, CFSTR("OnDemand%s match, connection status = %d"),
-				      onDemandRetry ? " (on retry)" : "",
-				      onDemandStatus);
-			}
+			SC_log(LOG_INFO, "OnDemand%s match, connection status = %d",
+			       onDemandRetry ? " (on retry)" : "",
+			       onDemandStatus);
 		}
 	}
 
@@ -3807,9 +3562,7 @@ __SCNetworkConnectionCopyOnDemandInfoWithName(SCDynamicStoreRef		*storeP,
 		CFRelease(trigger);
 	}
 
-//	if (_sc_debug || (debug > 0)) {
-//		SCLog(TRUE, LOG_INFO, CFSTR("OnDemand domain name(s) not matched"));
-//	}
+//	SC_log(LOG_INFO, "OnDemand domain name(s) not matched");
 
 	if (configuration != NULL) CFRelease(configuration);
 	if (!ok) {
@@ -3830,7 +3583,7 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef	selectionOption
 	if (notify_userprefs_token == -1) {
 		status = notify_register_check(k_NetworkConnect_Notification, ¬ify_userprefs_token);
 		if (status != NOTIFY_STATUS_OK) {
-			SCLog(TRUE, LOG_ERR, CFSTR("notify_register_check() failed, status=%d"), status);
+			SC_log(LOG_NOTICE, "notify_register_check() failed, status=%d", status);
 			(void)notify_cancel(notify_userprefs_token);
 			notify_userprefs_token = -1;
 		} else {
@@ -3842,7 +3595,7 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef	selectionOption
 	if (notify_userprefs_token != -1) {
 		status = notify_check(notify_userprefs_token, &prefsChanged);
 		if (status != NOTIFY_STATUS_OK) {
-			SCLog(TRUE, LOG_ERR, CFSTR("notify_check() failed, status=%d"), status);
+			SC_log(LOG_NOTICE, "notify_check() failed, status=%d", status);
 			(void)notify_cancel(notify_userprefs_token);
 			notify_userprefs_token = -1;
 		}
@@ -4002,8 +3755,8 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef	selectionOption
 		}
 
 		if (debug > 1) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionCopyUserPreferences %@"), success ? CFSTR("succeeded") : CFSTR("failed"));
-			SCLog(TRUE, LOG_DEBUG, CFSTR("Selection options: %@"), selectionOptions);
+			SC_log(LOG_INFO, "SCNetworkConnectionCopyUserPreferences %s", success ? "succeeded" : "failed");
+			SC_log(LOG_INFO, "Selection options: %@", selectionOptions);
 		}
 
 		return success;
@@ -4025,11 +3778,11 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef	selectionOption
 				// (4) Get the default set of user options for this service
 				success = SCNetworkConnectionPrivateCopyDefaultUserOptionsFromArray((CFArrayRef)userServices,
 												    userOptions);
-				if(success && (userOptions != NULL)) {
+				if (success) {
 					addPasswordFromKeychain(*serviceID, userOptions);
 				}
 			} else {
-				SCLog(TRUE, LOG_DEBUG, CFSTR("Error, userServices are not of type CFArray!"));
+				SC_log(LOG_INFO, "Error, userServices are not of type CFArray!");
 			}
 
 			CFRelease(userServices); // this is OK because SCNetworkConnectionPrivateISExpectedCFType() checks for NULL
@@ -4037,7 +3790,8 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef	selectionOption
 	}
 
 	if (debug > 1) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionCopyUserPreferences %@, no selection options"), success ? CFSTR("succeeded") : CFSTR("failed"));
+		SC_log(LOG_INFO, "SCNetworkConnectionCopyUserPreferences %@, no selection options",
+		       success ? CFSTR("succeeded") : CFSTR("failed"));
 	}
 
 	return success;
@@ -4051,7 +3805,6 @@ SCNetworkConnectionCopyUserPreferences(CFDictionaryRef	selectionOptions,
 {
 	Boolean	success	= FALSE;
 
-
 	/* initialize runtime */
 	pthread_once(&initialized, __SCNetworkConnectionInitialize);
 
@@ -4076,10 +3829,9 @@ SCNetworkConnectionCopyUserPreferences(CFDictionaryRef	selectionOptions,
 										&connectionStatus,
 										NULL);
 			if (debug > 1) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("SCNetworkConnectionCopyUserPreferences __SCNetworkConnectionCopyOnDemandInfoWithName returns %d w/status %d"),
-				      success,
-				      connectionStatus);
+				SC_log(LOG_INFO, "__SCNetworkConnectionCopyOnDemandInfoWithName: return %d, status %d",
+				       success,
+				       connectionStatus);
 			}
 
 			if (success) {
@@ -4142,7 +3894,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;
@@ -4191,18 +3943,16 @@ __SCNetworkConnectionIPv4AddressMatchesRoutes (struct sockaddr_in *addr_in, CFDi
 }
 
 
-void
+static void
 __SCNetworkConnectionMaskIPv6Address(struct in6_addr *addr, struct in6_addr *mask)
 {
-	int	i;
-
-	for (i = 0; i < sizeof(struct in6_addr); i++)
+	for (size_t i = 0; i < sizeof(struct in6_addr); i++)
 		addr->s6_addr[i] &= mask->s6_addr[i];
 }
 
 
 // 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;
@@ -4476,18 +4226,23 @@ SCNetworkConnectionSelectServiceWithOptions(SCNetworkConnectionRef connection, C
 		if (isA_CFDictionary(configuration)) {
 			found_trigger = __SCNetworkConnectionCopyTriggerWithService(configuration, service_id);
 			if (found_trigger != NULL) {
-				CFNumberRef status_num = CFDictionaryGetValue(found_trigger, kSCNetworkConnectionOnDemandStatus);
-				if (isA_CFNumber(status_num)) {
-					CFNumberGetValue(status_num, kCFNumberIntType, &on_demand_status);
+				CFNumberRef status_num;
+
+				if (!CFDictionaryGetValueIfPresent(found_trigger,
+								   kSCNetworkConnectionOnDemandStatus,
+								   (const void **) &status_num) ||
+				    !isA_CFNumber(status_num) ||
+				    !CFNumberGetValue(status_num, kCFNumberSInt32Type, &on_demand_status)) {
+					on_demand_status = kSCNetworkConnectionInvalid;
 				}
+
 				/*
 				 * If the trigger should be ignored, still use App Layer VPN if it is already connected or
 				 * is in the process of connecting.
 				 */
 				if (__SCNetworkConnectionShouldIgnoreTrigger(found_trigger) &&
-				    on_demand_status != kSCNetworkConnectionConnecting &&
-				    on_demand_status != kSCNetworkConnectionConnected)
-				{
+				    (on_demand_status != kSCNetworkConnectionConnecting) &&
+				    (on_demand_status != kSCNetworkConnectionConnected)) {
 					use_app_layer = FALSE;
 				}
 			}
@@ -4591,9 +4346,14 @@ SCNetworkConnectionSelectServiceWithOptions(SCNetworkConnectionRef connection, C
 		CFRetain(connectionPrivate->on_demand_info);
 
 		if (on_demand_status == kSCNetworkConnectionInvalid) {
-			CFNumberRef status_num = CFDictionaryGetValue(found_trigger, kSCNetworkConnectionOnDemandStatus);
-			if (isA_CFNumber(status_num)) {
-				CFNumberGetValue(status_num, kCFNumberIntType, &on_demand_status);
+			CFNumberRef	status_num;
+
+			if (!CFDictionaryGetValueIfPresent(found_trigger,
+							   kSCNetworkConnectionOnDemandStatus,
+							   (const void **) &status_num) ||
+			    !isA_CFNumber(status_num) ||
+			    !CFNumberGetValue(status_num, kCFNumberSInt32Type, &on_demand_status)) {
+				on_demand_status = kSCNetworkConnectionInvalid;
 			}
 		}
 
@@ -4686,7 +4446,6 @@ SCNetworkConnectionPrivateCopyDefaultServiceIDForDial(CFStringRef *serviceID)
 	CFPropertyListRef	lastServiceSelectedInIC = NULL;
 
 
-
 	// we found the service the user last had open in IC
 	if (lastServiceSelectedInIC != NULL) {
 		// make sure its a PPP service
@@ -5023,6 +4782,7 @@ copyPasswordFromKeychain(CFStringRef uniqueID)
 
 	return password;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(uniqueID)
 	return NULL;
 #endif	// !TARGET_OS_IPHONE
 }
@@ -5032,15 +4792,13 @@ __private_extern__
 char *
 __SCNetworkConnectionGetControllerPortName(void)
 {
-#if	((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 70000)) && !TARGET_IPHONE_SIMULATOR
+#if	((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 70000)) && !TARGET_OS_SIMULATOR
 	if (scnc_server_name == NULL){
 		if (!(sandbox_check(getpid(), "mach-lookup", SANDBOX_FILTER_GLOBAL_NAME | SANDBOX_CHECK_NO_REPORT, PPPCONTROLLER_SERVER_PRIV))){
 			scnc_server_name = PPPCONTROLLER_SERVER_PRIV;
-		}
-		else{
+		} else {
 			scnc_server_name = PPPCONTROLLER_SERVER;
 		}
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkConnectionGetControllerPortName() returns port: %s"), scnc_server_name);
 	}
 #else
 	scnc_server_name = PPPCONTROLLER_SERVER;
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConnection.h b/src/configd/SystemConfiguration.fproj/SCNetworkConnection.h
index 38f89f77e..7f058862b 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConnection.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConnection.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2003-2006, 2008-2010 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 
@@ -36,6 +33,8 @@
 #include 
 #include 
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
 
 /*!
 	@header SCNetworkConnection
@@ -56,7 +55,7 @@
 	@typedef SCNetworkConnectionRef
 	@discussion This is the handle to manage a connection-oriented service.
  */
-typedef const struct __SCNetworkConnection * SCNetworkConnectionRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkConnection * SCNetworkConnectionRef;
 
 
 /*!
@@ -79,10 +78,10 @@ typedef const struct __SCNetworkConnection * SCNetworkConnectionRef;
  */
 typedef struct {
 	CFIndex         version;
-	void *          info;
-	const void      *(*retain)(const void *info);
-	void            (*release)(const void *info);
-	CFStringRef     (*copyDescription)(const void *info);
+	void *          __nullable info;
+	const void      * __nonnull (* __nullable retain)(const void *info);
+	void            (* __nullable release)(const void *info);
+	CFStringRef     __nonnull (* __nullable copyDescription)(const void *info);
 } SCNetworkConnectionContext;
 
 
@@ -105,14 +104,13 @@ typedef struct {
 	@constant kSCNetworkConnectionDisconnecting
 		The network connection is disconnecting.
  */
-enum {
+typedef CF_ENUM(int32_t, SCNetworkConnectionStatus) {
 	kSCNetworkConnectionInvalid		=  -1,
 	kSCNetworkConnectionDisconnected	=  0,
 	kSCNetworkConnectionConnecting		=  1,
 	kSCNetworkConnectionConnected		=  2,
 	kSCNetworkConnectionDisconnecting	=  3
 };
-typedef int32_t SCNetworkConnectionStatus;
 
 
 /*!
@@ -159,7 +157,7 @@ typedef int32_t SCNetworkConnectionStatus;
 	@constant kSCNetworkConnectionPPPWaitingForRedial
 		PPP has found a busy server and is waiting for redial.
  */
-enum {
+typedef CF_ENUM(int32_t, SCNetworkConnectionPPPStatus) {
 	kSCNetworkConnectionPPPDisconnected		=  0,
 	kSCNetworkConnectionPPPInitializing		=  1,
 	kSCNetworkConnectionPPPConnectingLink		=  2,
@@ -175,8 +173,6 @@ enum {
 	kSCNetworkConnectionPPPSuspended		=  12,
 	kSCNetworkConnectionPPPWaitingForRedial		=  13
 };
-typedef int32_t SCNetworkConnectionPPPStatus;
-
 
 /*!
 	@typedef SCNetworkConnectionCallBack
@@ -187,9 +183,9 @@ typedef int32_t SCNetworkConnectionPPPStatus;
 	@param info Application-specific information.
  */
 typedef void (*SCNetworkConnectionCallBack)	(
-						SCNetworkConnectionRef          connection,
-						SCNetworkConnectionStatus       status,
-						void                            *info
+						SCNetworkConnectionRef				connection,
+						SCNetworkConnectionStatus			status,
+						void			    *	__nullable	info
 						);
 
 
@@ -217,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
@@ -225,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
 
@@ -235,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));
 
 
 /*!
@@ -255,10 +253,10 @@ SCNetworkConnectionGetTypeID			(void)			__OSX_AVAILABLE_STARTING(__MAC_10_3,__IP
  */
 Boolean
 SCNetworkConnectionCopyUserPreferences		(
-						CFDictionaryRef			selectionOptions,
-						CFStringRef			*serviceID,
-						CFDictionaryRef			*userOptions
-						)			__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/);
+						CFDictionaryRef				  __nullable	selectionOptions,
+						CFStringRef		__nonnull	* __nullable	serviceID,
+						CFDictionaryRef		__nonnull	* __nullable	userOptions
+						)			API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 
 /*!
@@ -282,13 +280,13 @@ SCNetworkConnectionCopyUserPreferences		(
 		callout.
 	@result Returns a reference to the new SCNetworkConnection.
  */
-SCNetworkConnectionRef
+SCNetworkConnectionRef __nullable
 SCNetworkConnectionCreateWithServiceID		(
-						CFAllocatorRef			allocator,
-						CFStringRef			serviceID,
-						SCNetworkConnectionCallBack	callout,
-						SCNetworkConnectionContext	*context
-						)			__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/);
+						CFAllocatorRef			__nullable	allocator,
+						CFStringRef					serviceID,
+						SCNetworkConnectionCallBack	__nullable	callout,
+						SCNetworkConnectionContext	* __nullable	context
+						)			API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 
 /*!
@@ -297,10 +295,10 @@ SCNetworkConnectionCreateWithServiceID		(
 	@param connection The SCNetworkConnection to obtain status from.
 	@result Returns the service ID associated with the SCNetworkConnection.
  */
-CFStringRef
+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));
 
 
 /*!
@@ -323,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));
 
 
 /*!
@@ -368,10 +366,10 @@ SCNetworkConnectionGetStatus			(
 	@result Returns the status dictionary.
 		If NULL is returned, the error can be retrieved using the SCError function.
  */
-CFDictionaryRef
+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));
 
 
 /*!
@@ -410,10 +408,10 @@ SCNetworkConnectionCopyExtendedStatus		(
 	@result Returns the statistics dictionary.
 		If NULL is returned, the error can be retrieved using the SCError function.
  */
-CFDictionaryRef
+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));
 
 
 /*!
@@ -462,10 +460,10 @@ SCNetworkConnectionCopyStatistics		(
  */
 Boolean
 SCNetworkConnectionStart			(
-						SCNetworkConnectionRef		connection,
-						CFDictionaryRef			userOptions,
-						Boolean				linger
-						)			__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/);
+						SCNetworkConnectionRef				connection,
+						CFDictionaryRef			__nullable	userOptions,
+						Boolean						linger
+						)			API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 
 /*!
@@ -491,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));
 
 
 /*!
@@ -504,10 +502,10 @@ SCNetworkConnectionStop				(
 		The dictionary can be empty if no user options were used.
 		If NULL is returned, the error can be retrieved using the SCError function.
  */
-CFDictionaryRef
+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));
 
 
 /*!
@@ -525,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));
 
 
 /*!
@@ -543,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));
 
 
 /*!
@@ -558,11 +556,13 @@ SCNetworkConnectionUnscheduleFromRunLoop	(
  */
 Boolean
 SCNetworkConnectionSetDispatchQueue		(
-						 SCNetworkConnectionRef		connection,
-						 dispatch_queue_t		queue
-						 )			__OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0/*SPI*/);
+						 SCNetworkConnectionRef				connection,
+						 dispatch_queue_t		__nullable	queue
+						 )			API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 __END_DECLS
 
-#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
-#endif /* _SCNETWORKCONNECTION_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SCNETWORKCONNECTION_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConnectionInternal.h b/src/configd/SystemConfiguration.fproj/SCNetworkConnectionInternal.h
index 9bef13bde..33c0378c0 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConnectionInternal.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConnectionInternal.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2012, 2013, 2016, 2017 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@
  */
 
@@ -26,12 +26,22 @@
 
 #include 
 
+#include 
+#include 
+
+#ifndef SC_LOG_HANDLE
+#define	SC_LOG_HANDLE	__log_SCNetworkConnection
+#endif	// SC_LOG_HANDLE
+#include 
+#include 
+#include 
+
 
 __BEGIN_DECLS
 
+os_log_t	__log_SCNetworkConnection(void);
 void		__SCNetworkConnectionForceOnDemandConfigurationRefresh(void);
 char *		__SCNetworkConnectionGetControllerPortName(void);
-CFDictionaryRef	__SCNetworkConnectionCopyTokenParameters(SCNetworkConnectionRef connection);
 
 __END_DECLS
 
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.c b/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.c
index 7b58f6252..28a32ad86 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2006-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2006-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,12 @@
  * 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@
  */
 
 #include 
 #include 
-#include 
-#include 		// for SCLog
 #include "SCNetworkConfigurationInternal.h"
 #include 
 #include 
@@ -158,6 +156,7 @@ __SCUserPreferencesCreatePrivate(CFAllocatorRef		allocator,
 		return NULL;
 	}
 
+	/* initialize non-zero/NULL members */
 	prefsPrivate->serviceID	= CFStringCreateCopy(NULL, serviceID);
 	prefsPrivate->prefsID	= CFStringCreateCopy(NULL, prefsID);
 
@@ -230,10 +229,10 @@ logCFPreferencesChange(CFStringRef serviceID, CFArrayRef newPreferences)
 	_SC_cfstring_to_cstring(str, dir, sizeof(dir), kCFStringEncodingUTF8);
 	CFRelease(str);
 
-	SCLog(TRUE, LOG_ERR, CFSTR("CFPreferences being updated, old/new in \"%s\""), dir);
+	SC_log(LOG_NOTICE, "CFPreferences being updated, old/new in \"%s\"", dir);
 
 	if (mkdir(dir, 0755) == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("logCFPreferencesChange mkdir() failed, error = %s"), SCErrorString(errno));
+		SC_log(LOG_NOTICE, "mkdir() failed: %s", SCErrorString(errno));
 		return;
 	}
 
@@ -247,7 +246,7 @@ logCFPreferencesChange(CFStringRef serviceID, CFArrayRef newPreferences)
 		strlcat(path, "/backtrace", sizeof(path));
 		fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644);
 		if (fd == -1) {
-			SCLog(TRUE, LOG_ERR, CFSTR("logCFPreferencesChange fopen() failed, error = %s"), SCErrorString(errno));
+			SC_log(LOG_NOTICE, "fopen() failed: %s", SCErrorString(errno));
 			CFRelease(trace);
 			return;
 		}
@@ -267,13 +266,13 @@ logCFPreferencesChange(CFStringRef serviceID, CFArrayRef newPreferences)
 		strlcat(path, "/old", sizeof(path));
 		fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644);
 		if (fd == -1) {
-			SCLog(TRUE, LOG_ERR, CFSTR("logCFPreferencesChange fopen() failed, error = %s"), SCErrorString(errno));
+			SC_log(LOG_NOTICE, "fopen() failed: %s", SCErrorString(errno));
 			CFRelease(oldPreferences);
 			return;
 		}
 		data = CFPropertyListCreateData(NULL, oldPreferences, kCFPropertyListXMLFormat_v1_0, 0, NULL);
 		if (data == NULL) {
-			SCLog(TRUE, LOG_ERR, CFSTR("logCFPreferencesChange CFPropertyListCreateData() failed"));
+			SC_log(LOG_NOTICE, "CFPropertyListCreateData() failed");
 			close(fd);
 			CFRelease(oldPreferences);
 			return;
@@ -293,12 +292,12 @@ logCFPreferencesChange(CFStringRef serviceID, CFArrayRef newPreferences)
 		strlcat(path, "/new", sizeof(path));
 		fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644);
 		if (fd == -1) {
-			SCLog(TRUE, LOG_ERR, CFSTR("logCFPreferencesChange fopen() failed, error = %s"), SCErrorString(errno));
+			SC_log(LOG_NOTICE, "fopen() failed: %s", SCErrorString(errno));
 			return;
 		}
 		data = CFPropertyListCreateData(NULL, newPreferences, kCFPropertyListXMLFormat_v1_0, 0, NULL);
 		if (data == NULL) {
-			SCLog(TRUE, LOG_ERR, CFSTR("logCFPreferencesChange CFPropertyListCreateData() failed"));
+			SC_log(LOG_NOTICE, "CFPropertyListCreateData() failed");
 			close(fd);
 			return;
 		}
@@ -497,6 +496,9 @@ removeCallout(CFStringRef	serviceID,
 	      void		*context2,
 	      void		*context3)
 {
+#pragma unused(serviceID)
+#pragma unused(context2)
+#pragma unused(context3)
 	CFStringRef	matchID	= (CFStringRef)context1;
 
 	if (current == NULL) {
@@ -538,6 +540,9 @@ setCurrentCallout(CFStringRef		serviceID,
 		  void			*context2,
 		  void			*context3)
 {
+#pragma unused(serviceID)
+#pragma unused(context2)
+#pragma unused(context3)
 	CFStringRef			matchID		= (CFStringRef)context1;
 	CFMutableDictionaryRef		newDict;
 
@@ -585,6 +590,9 @@ copyNameCallout(CFStringRef	serviceID,
 		void		*context2,
 		void		*context3)
 {
+#pragma unused(serviceID)
+#pragma unused(context2)
+#pragma unused(context3)
 	CFStringRef	matchID	= (CFStringRef)context1;
 	CFStringRef	*name	= (CFStringRef *)context3;
 
@@ -594,6 +602,10 @@ copyNameCallout(CFStringRef	serviceID,
 	}
 
 	if (isMatchingPrefsID(current, matchID)) {
+		if (*name != NULL) {
+			CFRelease(*name);
+			*name = NULL;
+		}
 		*name = CFDictionaryGetValue(current, kSCPropUserDefinedName);
 
 		// for backwards compatibility, we also check for the name in the PPP entity
@@ -652,6 +664,9 @@ setNameCallout(CFStringRef	serviceID,
 	       void		*context2,
 	       void		*context3)
 {
+#pragma unused(serviceID)
+#pragma unused(context2)
+#pragma unused(context3)
 	CFStringRef		matchID	= (CFStringRef)context1;
 	CFMutableDictionaryRef	newDict;
 	CFStringRef		newName	= (CFStringRef)context2;
@@ -727,6 +742,7 @@ copyInterfaceConfigurationCallout(CFStringRef		serviceID,
 				  void			*context2,
 				  void			*context3)
 {
+#pragma unused(serviceID)
 	CFDictionaryRef	*dict		= (CFDictionaryRef *)context3;
 	CFStringRef	interfaceType	= (CFStringRef)context2;
 	CFStringRef	matchID		= (CFStringRef)context1;
@@ -737,6 +753,10 @@ copyInterfaceConfigurationCallout(CFStringRef		serviceID,
 	}
 
 	if (isMatchingPrefsID(current, matchID)) {
+		if (*dict != NULL) {
+			CFRelease(*dict);
+			*dict = NULL;
+		}
 		*dict = CFDictionaryGetValue(current, interfaceType);
 		*dict = isA_CFDictionary(*dict);
 		if (*dict != NULL) {
@@ -793,11 +813,12 @@ SCUserPreferencesCopyInterfaceConfiguration(SCUserPreferencesRef	userPreferences
 
 static CF_RETURNS_RETAINED CFDictionaryRef
 setInterfaceConfigurationCallout(CFStringRef		serviceID,
-				  CFDictionaryRef	current,
-				  void			*context1,
-				  void			*context2,
-				  void			*context3)
+				 CFDictionaryRef	current,
+				 void			*context1,
+				 void			*context2,
+				 void			*context3)
 {
+#pragma unused(serviceID)
 	CFStringRef		interfaceType	= (CFStringRef)context2;
 	CFStringRef		matchID		= (CFStringRef)context1;
 	CFMutableDictionaryRef	newDict;
@@ -970,6 +991,8 @@ copyAllCallout(CFStringRef	serviceID,
 	       void		*context2,
 	       void		*context3)
 {
+#pragma unused(context1)
+#pragma unused(context2)
 	CFMutableArrayRef		*prefs		= (CFMutableArrayRef *)context3;
 	CFStringRef			prefsID;
 	SCUserPreferencesPrivateRef	userPrivate;
@@ -1035,6 +1058,8 @@ copyCurrentCallout(CFStringRef		serviceID,
 		   void			*context2,
 		   void			*context3)
 {
+#pragma unused(context1)
+#pragma unused(context2)
 	CFBooleanRef			isDefault;
 	CFStringRef			prefsID;
 	SCUserPreferencesPrivateRef	*userPrivate	= (SCUserPreferencesPrivateRef *)context3;
@@ -1099,6 +1124,9 @@ createCallout(CFStringRef	serviceID,
 	      void		*context2,
 	      void		*context3)
 {
+#pragma unused(serviceID)
+#pragma unused(context2)
+#pragma unused(context3)
 	CFMutableDictionaryRef		newDict;
 	CFStringRef			newPrefsID	= (CFStringRef)context1;
 
@@ -1328,6 +1356,8 @@ copyOptionsCallout(CFStringRef		serviceID,
 		   void			*context2,
 		   void			*context3)
 {
+#pragma unused(serviceID)
+#pragma unused(context2)
 	CFStringRef		matchID		= (CFStringRef)context1;
 	CFMutableDictionaryRef	*userOptions	= (CFMutableDictionaryRef *)context3;
 
@@ -1945,7 +1975,7 @@ SCUserPreferencesSetInterfacePassword(SCUserPreferencesRef		userPreferences,
 	CFDictionaryRef	config;
 	CFStringRef	description	= NULL;
 	CFStringRef	label		= NULL;
-	Boolean		ok	= FALSE;
+	Boolean		ok		= FALSE;
 
 	if (!checkUserPreferencesPassword(userPreferences, interface, passwordType)) {
 		return FALSE;
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h b/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h
index df77da33c..6de0e2f88 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2006, 2008, 2009, 2011-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2006, 2008, 2009, 2011-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,24 +17,25 @@
  * 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 _SCNETWORKCONNECTIONPRIVATE_H
 #define _SCNETWORKCONNECTIONPRIVATE_H
 
-#include 
+#include 
+#include 
 #include 
-#if !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 #include 
-#endif
+#endif	// !TARGET_OS_SIMULATOR
 #include 
 #include 
 #include 
 
 
-typedef const struct __SCUserPreferencesRef * SCUserPreferencesRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCUserPreferencesRef * SCUserPreferencesRef;
 
 
 __BEGIN_DECLS
@@ -44,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
@@ -100,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
@@ -122,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
@@ -136,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.
@@ -187,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
@@ -199,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
@@ -217,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
@@ -227,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
@@ -243,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
@@ -264,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
@@ -279,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));
 
 
 /*!
@@ -310,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
@@ -343,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")
@@ -353,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
@@ -485,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_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 SCNetworkConnectionStatus
-SCNetworkConnectionGetStatusFromNEStatus	(ne_session_status_t status)				__OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0);
-#endif /* !TARGET_IPHONE_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 -
@@ -553,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/src/configd/SystemConfiguration.fproj/SCNetworkInterface.c b/src/configd/SystemConfiguration.fproj/SCNetworkInterface.c
index f371ca06e..32c6c61f2 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkInterface.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkInterface.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2019 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  *
@@ -33,16 +33,13 @@
  */
 
 
-#include 
 #include 
 #include 
 #include 
-#include 
 #include "SCNetworkConfigurationInternal.h"
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
+#include "plugin_shared.h"
 
 #if	!TARGET_OS_IPHONE
 #include 
@@ -63,28 +60,36 @@
 #include 	// for kIOEthernetInterfaceClass
 #include 
 #include 
-#if	!TARGET_IPHONE_SIMULATOR
-#include 
-#endif	// !TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
+#include 
+#endif	// !TARGET_OS_SIMULATOR
 
 #include "dy_framework.h"
 
-#ifndef	kIODeviceSupportsHoldKey
-#define	kIODeviceSupportsHoldKey	"V92Modem"
-#endif
-
 #ifndef	kPCIThunderboltString
 #define kPCIThunderboltString		"PCI-Thunderbolt"
 #endif
 
+#if	TARGET_OS_OSX
+#ifndef	kUSBSupportsIPhoneOS
+#define kUSBSupportsIPhoneOS		"SupportsIPhoneOS"
+#endif	// !kUSBSupportsIPhoneOS
+#endif	// TARGET_OS_OSX
+
 #ifndef	kIOUserEthernetInterfaceRoleKey
 #define	kIOUserEthernetInterfaceRoleKey	"InterfaceRole"
 #endif
 
+#ifndef	kIOUSBHostInterfaceClassName
+#define kIOUSBHostInterfaceClassName	"IOUSBHostInterface"
+#endif
+
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -93,18 +98,25 @@
 #include 
 #include 
 #include 
-#include 
+#include 
+
+/* CrashReporter "Application Specific Information" */
+#include 
 
 
 static CFStringRef	copy_interface_string				(CFBundleRef bundle, CFStringRef key, Boolean localized);
+static CFStringRef	__SCNetworkInterfaceCopyDescription		(CFTypeRef cf);
 static CFStringRef	__SCNetworkInterfaceCopyFormattingDescription	(CFTypeRef cf, CFDictionaryRef formatOptions);
 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			(void);
+static CFArrayRef 	__SCNetworkInterfaceCacheCopy			(CFStringRef bsdName);
 
 
 enum {
-	kSortInternalModem,
+	kSortInternalModem	= 0,
 	kSortUSBModem,
 	kSortModem,
 	kSortBluetooth,
@@ -123,6 +135,7 @@ enum {
 	kSortBluetoothPAN_NAP,
 	kSortBluetoothPAN_U,
 	kSortThunderbolt,
+	kSortCarPlay,
 	kSortBond,
 	kSortBridge,
 	kSortVLAN,
@@ -130,6 +143,34 @@ enum {
 };
 
 
+static const char *sortOrderName[]	= {
+	"InternalModem",
+	"USBModem",
+	"Modem",
+	"Bluetooth",
+	"IrDA",
+	"SerialPort",
+	"WWAN",
+	"EthernetPPP",
+	"AirportPPP",
+	"Ethernet",
+	"FireWire",
+	"AirPort",
+	"OtherWireless",
+	"Tethered",
+	"WWANEthernet",
+	"BluetoothPAN_GN",
+	"BluetoothPAN_NAP",
+	"BluetoothPAN_U",
+	"Thunderbolt",
+	"CarPlay",
+	"Bond",
+	"Bridge",
+	"VLAN",
+	"Unknown"
+};
+
+
 const CFStringRef kSCNetworkInterfaceType6to4		= CFSTR("6to4");
 const CFStringRef kSCNetworkInterfaceTypeBluetooth	= CFSTR("Bluetooth");
 const CFStringRef kSCNetworkInterfaceTypeBond		= CFSTR("Bond");
@@ -152,103 +193,26 @@ const CFStringRef kSCNetworkInterfaceTypeWWAN		= CFSTR("WWAN");
 const CFStringRef kSCNetworkInterfaceTypeIPv4		= CFSTR("IPv4");
 
 static SCNetworkInterfacePrivate __kSCNetworkInterfaceIPv4	= {
-	INIT_CFRUNTIME_BASE(),			// cfBase
-	NULL,					// interface type
-	FALSE,					// active
-	NULL,					// name
-	NULL,					// localized name
-	NULL,					// localization key
-	NULL,					// localization arg1
-	NULL,					// localization arg2
-	NULL,					// [layered] interface
-	NULL,					// prefs
-	NULL,					// store
-	NULL,					// serviceID
-	NULL,					// unsaved
-	NULL,					// entity_device
-	NULL,					// entity_device_unique
-	NULL,					// entity_type
-	NULL,					// entity_subtype
-	NULL,					// supported_interface_types
-	NULL,					// supported_protocol_types
-	NULL,					// address
-	NULL,					// addressString
-	FALSE,					// builtin
-	NULL,					// configurationAction
-	FALSE,					// hidden
-	NULL,					// location
-	NULL,					// path
-	0,					// entryID
-	NULL,					// overrides
-	FALSE,					// modemIsV92
-	NULL,					// name prefix
-	NULL,					// type
-	NULL,					// unit
-	{ NULL, 0, 0 },				// usb { name, vid, pid }
-	kSortUnknown,				// sort_order
-	FALSE,					// supportsBond
-	{ NULL, NULL, NULL },			// bond { interfaces, mode, options }
-	FALSE,					// supportsBridge
-	{ NULL, NULL },				// bridge { interfaces, options }
-	FALSE,					// supportsVLAN
-	{ NULL, NULL, NULL },			// vlan { interface, tag, options }
-#if	!TARGET_IPHONE_SIMULATOR
-	NULL,					// IPMonitorControl
-#endif	// !TARGET_IPHONE_SIMULATOR
+	.cfBase		= INIT_CFRUNTIME_BASE(),	// cfBase
+	.sort_order	= kSortUnknown,			// sort_order
 };
 
 const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4	= (SCNetworkInterfaceRef)&__kSCNetworkInterfaceIPv4;
 
 static SCNetworkInterfacePrivate __kSCNetworkInterfaceLoopback	= {
-	INIT_CFRUNTIME_BASE(),			// cfBase
-	NULL,					// interface type
-	FALSE,					// active
-	NULL,					// name
-	NULL,					// localized name
-	NULL,					// localization key
-	NULL,					// localization arg1
-	NULL,					// localization arg2
-	NULL,					// [layered] interface
-	NULL,					// prefs
-	NULL,					// store
-	NULL,					// serviceID
-	NULL,					// unsaved
-	NULL,					// entity_device
-	NULL,					// entity_device_unique
-	NULL,					// entity_type
-	NULL,					// entity_subtype
-	NULL,					// supported_interface_types
-	NULL,					// supported_protocol_types
-	NULL,					// address
-	NULL,					// addressString
-	FALSE,					// builtin
-	NULL,					// configurationAction
-	FALSE,					// hidden
-	NULL,					// location
-	NULL,					// path
-	0,					// entryID
-	NULL,					// overrides
-	FALSE,					// modemIsV92
-	NULL,					// name prefix
-	NULL,					// type
-	NULL,					// unit
-	{ NULL, 0, 0 },				// usb { name, vid, pid }
-	kSortUnknown,				// sort_order
-	FALSE,					// supportsBond
-	{ NULL, NULL, NULL },			// bond { interfaces, mode, options }
-	FALSE,					// supportsBridge
-	{ NULL, NULL },				// bridge { interfaces, options }
-	FALSE,					// supportsVLAN
-	{ NULL, NULL, NULL },			// vlan { interface, tag, options }
-#if	!TARGET_IPHONE_SIMULATOR
-	NULL,					// IPMonitorControl
-#endif	// !TARGET_IPHONE_SIMULATOR
+	.cfBase		= INIT_CFRUNTIME_BASE(),	// cfBase
+	.sort_order	= kSortUnknown,			// sort_order
 };
 
 const SCNetworkInterfaceRef kSCNetworkInterfaceLoopback	= (SCNetworkInterfaceRef)&__kSCNetworkInterfaceLoopback;
 
 static CFMutableSetRef	vendor_interface_types	= NULL;
 
+// A thread-specific convenience cache of all interfaces matching a bsd name
+// Key: CFStringRef (BSD name)
+// Value: CFArrayRef (matching interfaces)
+static __thread CFMutableDictionaryRef S_interface_cache = NULL;
+
 #pragma mark -
 #pragma mark SCNetworkInterface configuration details
 
@@ -293,9 +257,12 @@ static const struct {
 	{ &kSCNetworkInterfaceTypeL2TP		, NULL                , FALSE,	doPPP,		&kSCValNetInterfaceSubTypeL2TP,		doNone					},
 	{ &kSCNetworkInterfaceTypeModem		, &kSCEntNetModem     , FALSE,	doPPP,		&kSCValNetInterfaceSubTypePPPSerial,    doNone					},
 	{ &kSCNetworkInterfaceTypePPP		, &kSCEntNetPPP       , FALSE,	doNone,		NULL,					doDNS|doIPv4|doIPv6|doProxies|doSMB	},
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
 	{ &kSCNetworkInterfaceTypePPTP		, NULL                , FALSE,	doPPP,		&kSCValNetInterfaceSubTypePPTP,		doNone					},
+#pragma GCC diagnostic pop
 	{ &kSCNetworkInterfaceTypeSerial	, &kSCEntNetModem     , FALSE,	doPPP,		&kSCValNetInterfaceSubTypePPPSerial,    doNone					},
-	{ &kSCNetworkInterfaceTypeVLAN		, &kSCEntNetEthernet  , TRUE ,	doNone,		NULL,					doDNS|doIPv4|doIPv6|doProxies|doSMB	},
+	{ &kSCNetworkInterfaceTypeVLAN		, &kSCEntNetEthernet  , TRUE ,	doNone,		&kSCValNetInterfaceSubTypePPPoE,	doDNS|doIPv4|doIPv6|doProxies|doSMB	},
 	{ &kSCNetworkInterfaceTypeVPN		, &kSCEntNetVPN       , FALSE,	doNone,		NULL,					doDNS|doIPv4|doIPv6|doProxies|doSMB	},
 	{ &kSCNetworkInterfaceTypeWWAN          , &kSCEntNetModem     , FALSE,	doPPP,		&kSCValNetInterfaceSubTypePPPSerial,    doNone					},
 	// =====================================  =================== ========== =============== ======================================= =========================================
@@ -333,16 +300,22 @@ static const CFRuntimeClass __SCNetworkInterfaceClass = {
 	__SCNetworkInterfaceEqual,			// equal
 	__SCNetworkInterfaceHash,			// hash
 	__SCNetworkInterfaceCopyFormattingDescription,	// copyFormattingDesc
-	NULL						// copyDebugDesc
+	__SCNetworkInterfaceCopyDescription		// copyDebugDesc
 };
 
 
 static pthread_once_t		initialized	= PTHREAD_ONCE_INIT;
 static pthread_once_t		iokit_quiet	= PTHREAD_ONCE_INIT;
+static pthread_mutex_t		lock		= PTHREAD_MUTEX_INITIALIZER;
 
 
 static mach_port_t		masterPort	= MACH_PORT_NULL;
 
+static CFStringRef
+__SCNetworkInterfaceCopyDescription(CFTypeRef cf)
+{
+	return __SCNetworkInterfaceCopyFormattingDescription(cf, NULL);
+}
 
 static CFStringRef
 __SCNetworkInterfaceCopyFormattingDescription(CFTypeRef cf, CFDictionaryRef formatOptions)
@@ -383,21 +356,25 @@ __SCNetworkInterfaceCopyFormattingDescription(CFTypeRef cf, CFDictionaryRef form
 		CFIndex			dataLen;
 		CFIndex			i;
 
-		CFStringAppendFormat(result, NULL, CFSTR(", address = 0x"));
+		CFStringAppendFormat(result, NULL, CFSTR(", address = "));
 
 		data    = CFDataGetBytePtr(interfacePrivate->address);
 		dataLen = CFDataGetLength(interfacePrivate->address);
 		for (i = 0; i < dataLen; i++) {
-			CFStringAppendFormat(result, NULL, CFSTR("%02x"), data[i]);
+			CFStringAppendFormat(result, NULL, CFSTR("%s%02x"),
+					     (i > 0) ? ":" : "",
+					     data[i]);
 		}
 	}
 	CFStringAppendFormat(result, NULL, CFSTR(", builtin = %s"), interfacePrivate->builtin ? "TRUE" : "FALSE");
 	if (interfacePrivate->hidden) {
 		CFStringAppendFormat(result, NULL, CFSTR(", hidden = TRUE"));
 	}
-	if (interfacePrivate->modemIsV92) {
-		CFStringAppendFormat(result, NULL, CFSTR(", v.92"));
+#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);
 	}
@@ -413,6 +390,12 @@ __SCNetworkInterfaceCopyFormattingDescription(CFTypeRef cf, CFDictionaryRef form
 	if (interfacePrivate->unit != NULL) {
 		CFStringAppendFormat(result, NULL, CFSTR(", unit = %@"), interfacePrivate->unit);
 	}
+	if (interfacePrivate->family != NULL) {
+		CFStringAppendFormat(result, NULL, CFSTR(", family = %@"), interfacePrivate->family);
+	}
+	if (interfacePrivate->subfamily != NULL) {
+		CFStringAppendFormat(result, NULL, CFSTR(", subfamily = %@"), interfacePrivate->subfamily);
+	}
 	if ((interfacePrivate->usb.vid != NULL) || (interfacePrivate->usb.pid != NULL)) {
 		int	pid	= 0;
 		int	vid	= 0;
@@ -439,9 +422,15 @@ __SCNetworkInterfaceCopyFormattingDescription(CFTypeRef cf, CFDictionaryRef form
 		CFStringAppendFormat(result, NULL, CFSTR(", action = %@"), interfacePrivate->configurationAction);
 	}
 	if (interfacePrivate->overrides != NULL) {
-		CFStringAppendFormat(result, formatOptions, CFSTR(", overrides = %p"), interfacePrivate->overrides);
+		CFStringRef	str;
+
+		str = _SCCopyDescription(interfacePrivate->overrides, formatOptions);
+		CFStringAppendFormat(result, formatOptions, CFSTR(", overrides = %@"), str);
+		CFRelease(str);
 	}
-	CFStringAppendFormat(result, NULL, CFSTR(", order = %d"), interfacePrivate->sort_order);
+	CFStringAppendFormat(result, NULL, CFSTR(", order = %d (%s)"),
+			     interfacePrivate->sort_order,
+			     interfacePrivate->sort_order <= kSortUnknown ? sortOrderName[interfacePrivate->sort_order] : "?");
 	if (interfacePrivate->prefs != NULL) {
 		CFStringAppendFormat(result, NULL, CFSTR(", prefs = %p"), interfacePrivate->prefs);
 	}
@@ -599,6 +588,12 @@ __SCNetworkInterfaceDeallocate(CFTypeRef cf)
 	if (interfacePrivate->unit != NULL)
 		CFRelease(interfacePrivate->unit);
 
+	if (interfacePrivate->family != NULL)
+		CFRelease(interfacePrivate->family);
+
+	if (interfacePrivate->subfamily != NULL)
+		CFRelease(interfacePrivate->subfamily);
+
 	if (interfacePrivate->usb.name != NULL)
 		CFRelease(interfacePrivate->usb.name);
 
@@ -631,10 +626,10 @@ __SCNetworkInterfaceDeallocate(CFTypeRef cf)
 
 	if (interfacePrivate->vlan.options != NULL)
 		CFRelease(interfacePrivate->vlan.options);
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	if (interfacePrivate->IPMonitorControl != NULL)
 		CFRelease(interfacePrivate->IPMonitorControl);
-#endif	// !TARGET_IPHONE_SIMULATOR
+#endif	// !TARGET_OS_SIMULATOR
 	return;
 }
 
@@ -753,9 +748,7 @@ __SCNetworkInterfaceInitialize(void)
 	// get mach port used to communication with IOKit
 	kr = IOMasterPort(MACH_PORT_NULL, &masterPort);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG,
-		      CFSTR("__SCNetworkInterfaceInitialize(), could not get IOMasterPort, kr = 0x%x"),
-		      kr);
+		SC_log(LOG_NOTICE, "could not get IOMasterPort, kr = 0x%x", kr);
 	}
 
 	return;
@@ -785,55 +778,11 @@ __SCNetworkInterfaceCreatePrivate(CFAllocatorRef	allocator,
 		return NULL;
 	}
 
-	interfacePrivate->interface_type		= NULL;
-	interfacePrivate->active			= FALSE;
-	interfacePrivate->name				= NULL;
-	interfacePrivate->localized_name		= NULL;
-	interfacePrivate->localized_key			= NULL;
-	interfacePrivate->localized_arg1		= NULL;
-	interfacePrivate->localized_arg2		= NULL;
-	interfacePrivate->interface			= (interface != NULL) ? CFRetain(interface) : NULL;
-	interfacePrivate->prefs				= (prefs     != NULL) ? CFRetain(prefs)     : NULL;
-	interfacePrivate->store				= NULL;
-	interfacePrivate->serviceID			= (serviceID != NULL) ? CFRetain(serviceID) : NULL;
-	interfacePrivate->unsaved			= NULL;
-	interfacePrivate->entity_device			= NULL;
-	interfacePrivate->entity_device_unique		= NULL;
-	interfacePrivate->entity_type			= NULL;
-	interfacePrivate->entity_subtype		= NULL;
-	interfacePrivate->supported_interface_types     = NULL;
-	interfacePrivate->supported_protocol_types      = NULL;
-	interfacePrivate->address			= NULL;
-	interfacePrivate->addressString			= NULL;
-	interfacePrivate->builtin			= FALSE;
-	interfacePrivate->configurationAction		= NULL;
-	interfacePrivate->hidden			= FALSE;
-	interfacePrivate->location			= NULL;
-	interfacePrivate->path				= NULL;
-	interfacePrivate->entryID			= 0;
-	interfacePrivate->overrides			= NULL;
-	interfacePrivate->modemIsV92			= FALSE;
-	interfacePrivate->prefix			= NULL;
-	interfacePrivate->type				= NULL;
-	interfacePrivate->unit				= NULL;
-	interfacePrivate->usb.name			= NULL;
-	interfacePrivate->usb.vid			= NULL;
-	interfacePrivate->usb.pid			= NULL;
-	interfacePrivate->sort_order			= kSortUnknown;
-
-	interfacePrivate->supportsBond			= FALSE;
-	interfacePrivate->bond.interfaces		= NULL;
-	interfacePrivate->bond.mode			= NULL;
-	interfacePrivate->bond.options			= NULL;
-
-	interfacePrivate->supportsBridge		= FALSE;
-	interfacePrivate->bridge.interfaces		= NULL;
-	interfacePrivate->bridge.options		= NULL;
-
-	interfacePrivate->supportsVLAN			= FALSE;
-	interfacePrivate->vlan.interface		= NULL;
-	interfacePrivate->vlan.tag			= NULL;
-	interfacePrivate->vlan.options			= NULL;
+	/* initialize non-zero/NULL members */
+	interfacePrivate->interface	= (interface != NULL) ? CFRetain(interface) : NULL;
+	interfacePrivate->prefs		= (prefs     != NULL) ? CFRetain(prefs)     : NULL;
+	interfacePrivate->serviceID	= (serviceID != NULL) ? CFRetain(serviceID) : NULL;
+	interfacePrivate->sort_order	= kSortUnknown;
 
 	return interfacePrivate;
 }
@@ -870,12 +819,12 @@ __SCNetworkInterfaceSupportsVLAN(CFStringRef bsd_if)
 	mib[5] = if_index;	/* ask for exactly one interface */
 
 	if (sysctl(mib, 6, NULL, &buf_len, NULL, 0) == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("sysctl() size failed: %s"), strerror(errno));
+		SC_log(LOG_NOTICE, "sysctl() size failed: %s", strerror(errno));
 		goto done;
 	}
 	buf = CFAllocatorAllocate(NULL, buf_len, 0);
 	if (sysctl(mib, 6, buf, &buf_len, NULL, 0) == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("sysctl() failed: %s"), strerror(errno));
+		SC_log(LOG_NOTICE, "sysctl() failed: %s", strerror(errno));
 		goto done;
 	}
 
@@ -904,6 +853,48 @@ __SCNetworkInterfaceSupportsVLAN(CFStringRef bsd_if)
 }
 
 
+static CFDataRef
+__SCCopyMacAddress(CFStringRef ifname)
+{
+	struct ifaddrs	*ifap;
+	char		ifname_c[IFNAMSIZ];
+	struct ifaddrs	*ifp;
+	CFDataRef	macAddress = NULL;
+
+	if(_SC_cfstring_to_cstring(ifname,
+				   ifname_c,
+				   sizeof(ifname_c),
+				   kCFStringEncodingUTF8) == NULL) {
+		return NULL;
+	}
+
+	if (getifaddrs(&ifap) == -1) {
+		_SCErrorSet(errno);
+		SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno));
+		return NULL;
+	}
+
+	for (ifp = ifap; ifp != NULL; ifp = ifp->ifa_next) {
+		struct sockaddr_dl	*sdl;
+
+		if(strcmp(ifname_c, ifp->ifa_name) != 0) {
+			continue;
+		}
+
+		/* ALIGN: cast ok, this should be aligned (getifaddrs). */
+		sdl = (struct sockaddr_dl *)(void *)ifp->ifa_addr;
+		if (sdl->sdl_family != AF_LINK) {
+			continue;
+		}
+
+		macAddress = CFDataCreate(NULL, (UInt8 *)LLADDR(sdl), sdl->sdl_alen);
+		break;
+	}
+	freeifaddrs(ifap);
+	return macAddress;
+}
+
+
 __private_extern__
 SCNetworkInterfacePrivateRef
 _SCBondInterfaceCreatePrivate(CFAllocatorRef	allocator,
@@ -919,6 +910,7 @@ _SCBondInterfaceCreatePrivate(CFAllocatorRef	allocator,
 	interfacePrivate->interface_type	= kSCNetworkInterfaceTypeBond;
 	interfacePrivate->entity_type		= kSCValNetInterfaceTypeEthernet;
 	interfacePrivate->entity_device		= CFStringCreateCopy(allocator, bond_if);
+	interfacePrivate->address		= __SCCopyMacAddress(interfacePrivate->entity_device);
 	interfacePrivate->builtin		= TRUE;
 	interfacePrivate->supportsVLAN		= __SCNetworkInterfaceSupportsVLAN(bond_if);
 	interfacePrivate->sort_order		= kSortBond;
@@ -949,6 +941,7 @@ _SCBridgeInterfaceCreatePrivate(CFAllocatorRef	allocator,
 	interfacePrivate->interface_type	= kSCNetworkInterfaceTypeBridge;
 	interfacePrivate->entity_type		= kSCValNetInterfaceTypeEthernet;
 	interfacePrivate->entity_device		= CFStringCreateCopy(allocator, bridge_if);
+	interfacePrivate->address		= __SCCopyMacAddress(interfacePrivate->entity_device);
 	interfacePrivate->builtin		= TRUE;
 	interfacePrivate->supportsVLAN		= __SCNetworkInterfaceSupportsVLAN(bridge_if);
 	interfacePrivate->sort_order		= kSortBridge;
@@ -978,6 +971,7 @@ _SCVLANInterfaceCreatePrivate(CFAllocatorRef		allocator,
 	interfacePrivate->interface_type        = kSCNetworkInterfaceTypeVLAN;
 	interfacePrivate->entity_type           = kSCValNetInterfaceTypeEthernet;
 	interfacePrivate->entity_device         = CFStringCreateCopy(allocator, vlan_if);
+	interfacePrivate->address		= __SCCopyMacAddress(interfacePrivate->entity_device);
 	interfacePrivate->builtin               = TRUE;
 	interfacePrivate->sort_order            = kSortVLAN;
 
@@ -1021,6 +1015,7 @@ split_path(CFStringRef path)
 CFComparisonResult
 _SCNetworkInterfaceCompare(const void *val1, const void *val2, void *context)
 {
+#pragma unused(context)
 	SCNetworkInterfacePrivateRef	dev1		= (SCNetworkInterfacePrivateRef)val1;
 	SCNetworkInterfacePrivateRef	dev2		= (SCNetworkInterfacePrivateRef)val2;
 	CFComparisonResult		res		= kCFCompareEqualTo;
@@ -1330,8 +1325,6 @@ pci_slot(io_registry_entry_t interface, CFTypeRef *pci_slot_name)
 
 	slot_name = IORegistryEntryCreateCFProperty(interface, CFSTR("AAPL,slot-name"), NULL, 0);
 	if (slot_name != NULL) {
-		CFIndex	i;
-
 		slot = CFStringCreateMutable(NULL, 0);
 		if (isA_CFString(slot_name)) {
 			if (pci_slot_name != NULL) *pci_slot_name = CFStringCreateCopy(NULL, slot_name);
@@ -1343,7 +1336,7 @@ pci_slot(io_registry_entry_t interface, CFTypeRef *pci_slot_name)
 					      kCFStringEncodingUTF8);
 		}
 
-		for (i = 0; i < sizeof(slot_prefixes)/sizeof(slot_prefixes[0]); i++) {
+		for (size_t i = 0; i < sizeof(slot_prefixes)/sizeof(slot_prefixes[0]); i++) {
 			CFIndex		len;
 
 			len = CFStringGetLength(slot_prefixes[i]);
@@ -1356,7 +1349,7 @@ pci_slot(io_registry_entry_t interface, CFTypeRef *pci_slot_name)
 			}
 		}
 
-		for (i = 0; i < sizeof(slot_mappings)/sizeof(slot_mappings[0]); i++) {
+		for (size_t i = 0; i < sizeof(slot_mappings)/sizeof(slot_mappings[0]); i++) {
 			if (CFStringCompare(slot,
 					    slot_mappings[i].name,
 					    kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
@@ -1384,7 +1377,7 @@ pci_slot(io_registry_entry_t interface, CFTypeRef *pci_slot_name)
 					if (*pci_slot_name != NULL) CFRelease(*pci_slot_name);
 					*pci_slot_name = parent_pci_slot_name;
 				} else {
-					CFRelease(parent_pci_slot_name);
+					if (parent_pci_slot_name != NULL) CFRelease(parent_pci_slot_name);
 				}
 			}
 
@@ -1395,7 +1388,7 @@ pci_slot(io_registry_entry_t interface, CFTypeRef *pci_slot_name)
 			// if we have hit the root node
 			break;
 		default :
-			SCLog(TRUE, LOG_DEBUG, CFSTR("pci_slot IORegistryEntryGetParentEntry() failed, kr = 0x%x"), kr);
+			SC_log(LOG_INFO, "IORegistryEntryGetParentEntry() failed, kr = 0x%x", kr);
 			break;
 	}
 
@@ -1406,6 +1399,7 @@ pci_slot(io_registry_entry_t interface, CFTypeRef *pci_slot_name)
 static CFComparisonResult
 compare_bsdNames(const void *val1, const void *val2, void *context)
 {
+#pragma unused(context)
 	CFStringRef	bsd1	= (CFStringRef)val1;
 	CFStringRef	bsd2	= (CFStringRef)val2;
 
@@ -1455,7 +1449,7 @@ pci_port(CFTypeRef slot_name, int ift, CFStringRef bsdName)
 
 	kr = IOServiceGetMatchingServices(masterPort, matching, &slot_iterator);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("pci_port IOServiceGetMatchingServices() failed, kr = 0x%x"), kr);
+		SC_log(LOG_INFO, "IOServiceGetMatchingServices() failed, kr = 0x%x", kr);
 		return MACH_PORT_NULL;
 	}
 
@@ -1470,7 +1464,7 @@ pci_port(CFTypeRef slot_name, int ift, CFStringRef bsdName)
 						   kIORegistryIterateRecursively,
 						   &child_iterator);
 		if (kr != kIOReturnSuccess) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("pci_port IORegistryEntryCreateIterator() failed, kr = 0x%x"), kr);
+			SC_log(LOG_INFO, "IORegistryEntryCreateIterator() failed, kr = 0x%x", kr);
 			CFRelease(port_names);
 			return MACH_PORT_NULL;
 		}
@@ -1591,7 +1585,7 @@ isBluetoothBuiltin(Boolean *haveController)
 					  &iter);
 	if ((kr != kIOReturnSuccess) || (iter == MACH_PORT_NULL)) {
 		if (kr != kIOReturnSuccess) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("isBluetoothBuiltin IOServiceGetMatchingServices() failed, kr = 0x%x"), kr);
+			SC_log(LOG_INFO, "IOServiceGetMatchingServices() failed, kr = 0x%x", kr);
 		}
 		*haveController = FALSE;
 		return FALSE;
@@ -1601,7 +1595,7 @@ isBluetoothBuiltin(Boolean *haveController)
 	hciController = IOIteratorNext(iter);
 	IOObjectRelease(iter);
 	if(hciController != MACH_PORT_NULL) {
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 		CFNumberRef	idVendor;
 
 		idVendor = IORegistryEntryCreateCFProperty(hciController, CFSTR(kUSBVendorID), NULL, 0);
@@ -1616,7 +1610,7 @@ isBluetoothBuiltin(Boolean *haveController)
 
 			CFRelease(idVendor);
 		}
-#endif	// !TARGET_IPHONE_SIMULATOR
+#endif	// !TARGET_OS_SIMULATOR
 
 		IOObjectRelease(hciController);
 	}
@@ -1653,24 +1647,39 @@ processUSBInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 		    io_registry_entry_t			bus,
 		    CFDictionaryRef			bus_dict)
 {
-#if	!TARGET_IPHONE_SIMULATOR
+#if	TARGET_OS_SIMULATOR
+#pragma unused(interfacePrivate)
+#pragma unused(interface)
+#endif	// TARGET_OS_SIMULATOR
+#pragma unused(interface_dict)
+#pragma unused(controller)
+#pragma unused(controller_dict)
+#pragma unused(bus)
+#pragma unused(bus_dict)
+#if	!TARGET_OS_SIMULATOR
 	// capture USB info
-	interfacePrivate->usb.name = IORegistryEntrySearchCFProperty(interface,
-								     kIOServicePlane,
-								     CFSTR(kUSBProductString),
-								     NULL,
-								     kIORegistryIterateRecursively | kIORegistryIterateParents);
-	interfacePrivate->usb.vid  = IORegistryEntrySearchCFProperty(interface,
-								     kIOServicePlane,
-								     CFSTR(kUSBVendorID),
-								     NULL,
-								     kIORegistryIterateRecursively | kIORegistryIterateParents);
-	interfacePrivate->usb.pid  = IORegistryEntrySearchCFProperty(interface,
-								     kIOServicePlane,
-								     CFSTR(kUSBProductID),
-								     NULL,
-								     kIORegistryIterateRecursively | kIORegistryIterateParents);
-#endif	// !TARGET_IPHONE_SIMULATOR
+	if (interfacePrivate->usb.name == NULL) {
+		interfacePrivate->usb.name = IORegistryEntrySearchCFProperty(interface,
+									     kIOServicePlane,
+									     CFSTR(kUSBProductString),
+									     NULL,
+									     kIORegistryIterateRecursively | kIORegistryIterateParents);
+	}
+	if (interfacePrivate->usb.vid == NULL) {
+		interfacePrivate->usb.vid  = IORegistryEntrySearchCFProperty(interface,
+									     kIOServicePlane,
+									     CFSTR(kUSBVendorID),
+									     NULL,
+									     kIORegistryIterateRecursively | kIORegistryIterateParents);
+	}
+	if (interfacePrivate->usb.pid == NULL) {
+		interfacePrivate->usb.pid  = IORegistryEntrySearchCFProperty(interface,
+									     kIOServicePlane,
+									     CFSTR(kUSBProductID),
+									     NULL,
+									     kIORegistryIterateRecursively | kIORegistryIterateParents);
+	}
+#endif	// !TARGET_OS_SIMULATOR
 
 	return;
 }
@@ -1771,9 +1780,6 @@ merge_override(SCNetworkInterfacePrivateRef	interfacePrivate,
 }
 
 
-#define	BT_PAN_NAME	"Bluetooth PAN"
-#define	BT_PAN_MAC	BT_PAN_NAME " (MAC)"
-
 static Boolean
 processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 			io_registry_entry_t		interface,
@@ -1796,7 +1802,7 @@ processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 	    CFNumberGetValue(num, kCFNumberIntType, &ift)) {
 		interfacePrivate->type = CFRetain(num);
 	} else {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("processNetworkInterface() failed, no interface type"));
+		SC_log(LOG_INFO, "no interface type: %@", interface_dict);
 		return FALSE;
 	}
 
@@ -1848,6 +1854,10 @@ processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 							interfacePrivate->interface_type	= kSCNetworkInterfaceTypeEthernet;
 							interfacePrivate->entity_type		= kSCValNetInterfaceTypeEthernet;
 							interfacePrivate->sort_order		= kSortBluetoothPAN_U;
+						} else if (CFEqual(val, CFSTR("CarPlay"))) {
+							interfacePrivate->interface_type	= kSCNetworkInterfaceTypeEthernet;
+							interfacePrivate->entity_type		= kSCValNetInterfaceTypeEthernet;
+							interfacePrivate->sort_order		= kSortCarPlay;
 						}
 					}
 
@@ -1855,6 +1865,25 @@ processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 				}
 			}
 
+#if	TARGET_OS_OSX
+			if (interfacePrivate->interface_type == NULL) {
+				val = IORegistryEntrySearchCFProperty(interface,
+								      kIOServicePlane,
+								      CFSTR(kUSBSupportsIPhoneOS),
+								      NULL,
+								      kIORegistryIterateRecursively | kIORegistryIterateParents);
+				if (val != NULL) {
+					if (isA_CFBoolean(val) && CFBooleanGetValue(val)) {
+						interfacePrivate->interface_type	= kSCNetworkInterfaceTypeEthernet;
+						interfacePrivate->entity_type		= kSCValNetInterfaceTypeEthernet;
+						interfacePrivate->sort_order		= kSortTethered;
+					}
+
+					CFRelease(val);
+				}
+			}
+#endif	// TARGET_OS_OSX
+
 			if (interfacePrivate->interface_type == NULL) {
 				str = IODictionaryCopyCFStringValue(bus_dict, CFSTR("name"));
 				if (str != NULL) {
@@ -1984,8 +2013,10 @@ processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 						io_registry_entry_t	node	= interface;
 
 						while (provider != NULL) {
-							if (CFEqual(provider, CFSTR("IOUSBDevice")) ||
-							    CFEqual(provider, CFSTR("IOUSBInterface"))) {
+#if	!TARGET_OS_SIMULATOR
+							if (CFEqual(provider, CFSTR(kIOUSBDeviceClassName)) ||
+							    CFEqual(provider, CFSTR(kIOUSBInterfaceClassName)) ||
+							    CFEqual(provider, CFSTR(kIOUSBHostInterfaceClassName))) {
 								// get USB info (if available)
 								processUSBInterface(interfacePrivate,
 										    interface,
@@ -2002,6 +2033,7 @@ processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 								}
 								break;
 							}
+#endif	// !TARGET_OS_SIMULATOR
 
 							if (node == interface) {
 								node = controller;
@@ -2082,7 +2114,7 @@ processNetworkInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 
 			break;
 		default :
-			SCLog(TRUE, LOG_DEBUG, CFSTR("processNetworkInterface() failed, unknown interface type = %d"), ift);
+			SC_log(LOG_INFO, "unknown interface type = %d", ift);
 			return FALSE;
 	}
 
@@ -2160,18 +2192,18 @@ set_connection_script(SCNetworkInterfacePrivateRef interfacePrivate, CFStringRef
 static Boolean
 is_valid_connection_script(CFStringRef script)
 {
-	char				ccl[MAXPATHLEN];
-	char				path[MAXPATHLEN];
-	NSSearchPathEnumerationState	state;
+	char					ccl[MAXPATHLEN];
+	char					path[MAXPATHLEN];
+	sysdir_search_path_enumeration_state	state;
 
 	(void) _SC_cfstring_to_cstring(script,
 				       ccl,
 				       sizeof(ccl),
 				       kCFStringEncodingUTF8);
 
-	state = NSStartSearchPathEnumeration(NSLibraryDirectory,
-					     NSLocalDomainMask|NSSystemDomainMask);
-	while ((state = NSGetNextSearchPathEnumeration(state, path))) {
+	state = sysdir_start_search_path_enumeration(SYSDIR_DIRECTORY_LIBRARY,
+						     SYSDIR_DOMAIN_MASK_LOCAL|SYSDIR_DOMAIN_MASK_SYSTEM);
+	while ((state = sysdir_get_next_search_path_enumeration(state, path))) {
 		size_t		n;
 		struct stat	statBuf;
 
@@ -2187,9 +2219,7 @@ is_valid_connection_script(CFStringRef script)
 				goto bundle;
 			}
 
-			SCLog(TRUE, LOG_DEBUG,
-			      CFSTR("processSerialInterface stat() failed: %s"),
-			      strerror(errno));
+			SC_log(LOG_INFO, "stat() failed: %s", strerror(errno));
 			continue;
 		}
 		if (S_ISREG(statBuf.st_mode)) {
@@ -2211,9 +2241,7 @@ is_valid_connection_script(CFStringRef script)
 					continue;
 				}
 
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("processSerialInterface stat() failed: %s"),
-				      strerror(errno));
+				SC_log(LOG_INFO, "stat() failed: %s", strerror(errno));
 				continue;
 			}
 		}
@@ -2319,22 +2347,6 @@ processSerialInterface(SCNetworkInterfacePrivateRef	interfacePrivate,
 		// Modem
 		interfacePrivate->interface_type	= kSCNetworkInterfaceTypeModem;
 		interfacePrivate->sort_order		= kSortModem;
-
-		// V.92 support
-		val = IORegistryEntrySearchCFProperty(interface,
-						      kIOServicePlane,
-						      CFSTR(kIODeviceSupportsHoldKey),
-						      NULL,
-						      kIORegistryIterateRecursively | kIORegistryIterateParents);
-		if (val != NULL) {
-			uint32_t	v92;
-
-			if (isA_CFNumber(val) &&
-			    CFNumberGetValue(val, kCFNumberSInt32Type, &v92)) {
-				interfacePrivate->modemIsV92 = (v92 == 1);
-			}
-			CFRelease(val);
-		}
 	}
 
 	// Entity (Type)
@@ -2552,6 +2564,28 @@ __SC_IORegistryEntryCopyPath(io_registry_entry_t entry, const io_name_t plane)
 	return str;
 }
 
+static CFMutableDictionaryRef
+copyIORegistryProperties(io_registry_entry_t reg_ent, const CFStringRef *reg_keys, CFIndex numKeys)
+{
+	CFIndex			idx = 0;
+	CFMutableDictionaryRef	reg_dict = NULL;
+	CFTypeRef		value = NULL;
+
+	reg_dict = CFDictionaryCreateMutable(NULL,
+					     0,
+					     &kCFTypeDictionaryKeyCallBacks ,
+					     &kCFTypeDictionaryValueCallBacks);
+
+	for (; idx < numKeys; idx++) {
+		value = IORegistryEntryCreateCFProperty(reg_ent, reg_keys[idx], NULL, 0);
+		if (value != NULL) {
+			CFDictionaryAddValue(reg_dict, reg_keys[idx], value);
+			CFRelease(value);
+		}
+	}
+
+	return reg_dict;
+}
 
 static SCNetworkInterfaceRef
 createInterface(io_registry_entry_t interface, processInterface func,
@@ -2567,6 +2601,29 @@ createInterface(io_registry_entry_t interface, processInterface func,
 	kern_return_t			kr;
 	CFTypeRef			val;
 
+	// Keys of interest
+	const CFStringRef interface_dict_keys[] = {
+		CFSTR(kIOInterfaceType),
+		CFSTR(kIOBuiltin),
+		CFSTR(kIOBSDNameKey),
+		CFSTR(kIOPrimaryInterface),
+		CFSTR(kIOInterfaceNamePrefix),
+		CFSTR(kIOInterfaceUnit),
+		CFSTR(kIOTTYDeviceKey),
+		CFSTR(kIOTTYBaseNameKey),
+		CFSTR(kIOSerialBSDTypeKey),
+		CFSTR(kIOLocation)
+	};
+
+	const CFStringRef controller_dict_keys[] = {
+		CFSTR(kIOFeatures),
+		CFSTR(kIOMACAddress)
+	};
+
+	const CFStringRef bus_dict_keys[] = {
+		CFSTR("name")
+	};
+
 	if (hidden_key != NULL) {
 		// check if hidden
 		val = IORegistryEntrySearchCFProperty(interface,
@@ -2580,45 +2637,36 @@ createInterface(io_registry_entry_t interface, processInterface func,
 		}
 	}
 
-	// get the dictionary associated with the [interface] node
-	kr = IORegistryEntryCreateCFProperties(interface, &interface_dict, NULL, kNilOptions);
-	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryCreateCFProperties() failed, kr = 0x%x"), kr);
-		goto done;
-	}
+	 interface_dict = copyIORegistryProperties(interface,
+						   interface_dict_keys,
+						   sizeof(interface_dict_keys)/sizeof(interface_dict_keys[0]));
 
 	// get the controller node
 	kr = IORegistryEntryGetParentEntry(interface, kIOServicePlane, &controller);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetParentEntry() failed, kr = 0x%x"), kr);
+		SC_log(LOG_INFO, "IORegistryEntryGetParentEntry() failed, kr = 0x%x", kr);
 		goto done;
 	}
 
-	// get the dictionary associated with the [controller] node
-	kr = IORegistryEntryCreateCFProperties(controller, &controller_dict, NULL, kNilOptions);
-	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryCreateCFProperties() failed, kr = 0x%x"), kr);
-		goto done;
-	}
+	controller_dict = copyIORegistryProperties(controller,
+						   controller_dict_keys,
+						   sizeof(controller_dict_keys)/sizeof(controller_dict_keys[0]));
 
 	// get the bus node
 	kr = IORegistryEntryGetParentEntry(controller, kIOServicePlane, &bus);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetParentEntry() failed, kr = 0x%x"), kr);
+		SC_log(LOG_INFO, "IORegistryEntryGetParentEntry() failed, kr = 0x%x", kr);
 		goto done;
 	}
 
-	// get the dictionary associated with the [bus] node
-	kr = IORegistryEntryCreateCFProperties(bus, &bus_dict, NULL, kNilOptions);
-	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryCreateCFProperties() failed, kr = 0x%x"), kr);
-		goto done;
-	}
+	bus_dict = copyIORegistryProperties(bus,
+					    bus_dict_keys,
+					    sizeof(bus_dict_keys)/sizeof(bus_dict_keys[0]));
 
 	// get the registry entry ID
 	kr = IORegistryEntryGetRegistryEntryID(interface, &entryID);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetRegistryEntryID() failed, kr = 0x%x"), kr);
+		SC_log(LOG_INFO, "IORegistryEntryGetRegistryEntryID() failed, kr = 0x%x", kr);
 		goto done;
 	}
 
@@ -2664,6 +2712,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;
@@ -2684,8 +2747,10 @@ createInterface(io_registry_entry_t interface, processInterface func,
 
 
 static CF_RETURNS_RETAINED CFArrayRef
-findMatchingInterfaces(CFDictionaryRef matching, processInterface func,
-		       CFStringRef hidden_key)
+findMatchingInterfaces(CFDictionaryRef	matching,
+		       processInterface	func,
+		       CFStringRef	hidden_key,
+		       Boolean		keep_pre_configured)
 {
 	CFMutableArrayRef	interfaces;
 	io_registry_entry_t	interface;
@@ -2701,7 +2766,7 @@ findMatchingInterfaces(CFDictionaryRef matching, processInterface func,
 
 	kr = IOServiceGetMatchingServices(masterPort, matching, &iterator);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("findMatchingInterfaces IOServiceGetMatchingServices() failed, kr = 0x%x"), kr);
+		SC_log(LOG_INFO, "IOServiceGetMatchingServices() failed, kr = 0x%x", kr);
 		return NULL;
 	}
 
@@ -2712,7 +2777,9 @@ findMatchingInterfaces(CFDictionaryRef matching, processInterface func,
 
 		match = createInterface(interface, func, hidden_key);
 		if (match != NULL) {
-			CFArrayAppendValue(interfaces, match);
+			if (keep_pre_configured || !_SCNetworkInterfaceIsApplePreconfigured(match)) {
+				CFArrayAppendValue(interfaces, match);
+			}
 			CFRelease(match);
 		}
 
@@ -2732,9 +2799,7 @@ findMatchingInterfaces(CFDictionaryRef matching, processInterface func,
 static CFIndex
 findConfiguration(CFStringRef interface_type)
 {
-	CFIndex i;
-
-	for (i = 0; i < sizeof(configurations)/sizeof(configurations[0]); i++) {
+	for (size_t i = 0; i < sizeof(configurations)/sizeof(configurations[0]); i++) {
 		if (CFEqual(interface_type, *configurations[i].interface_type)) {
 			return i;
 		}
@@ -2838,9 +2903,14 @@ __SCNetworkInterfaceIsValidExtendedConfigurationType(SCNetworkInterfaceRef	inter
 
 	/*
 	 * ???
-	 * Do we match specific/known extended configuration types (e.g. EAPOL)
-	 * and ensure that any non-standard extended configuration types be of
-	 * the form com.myCompany.myType?
+	 * Should we check/match and specifically allow known extended
+	 * configuration types (e.g. EAPOL)?
+	 *
+	 * Should we check/match and specifically block known internal
+	 * configuration types (e.g. QoSMarking)?
+	 *
+	 * Lastly, should we ensure that any non-standard extended configuration
+	 * types be of the form com.myCompany.myType?
 	 * ???
 	 */
 
@@ -2864,6 +2934,7 @@ typedef struct {
 static void
 __addExtendedConfigurationType(const void *key, const void *value, void *context)
 {
+#pragma unused(value)
 	CFStringRef			extendedType	= (CFStringRef)key;
 	extendedConfigurationRef	myContextRef	= (extendedConfigurationRef)context;
 
@@ -2885,6 +2956,27 @@ __addExtendedConfigurationType(const void *key, const void *value, void *context
 }
 
 
+static CFIndex
+findPerInterfaceConfiguration(SCNetworkInterfaceRef interface)
+{
+	CFIndex				interfaceIndex;
+	SCNetworkInterfacePrivateRef 	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
+
+	interfaceIndex = findConfiguration(interfacePrivate->interface_type);
+	if (interfaceIndex == kCFNotFound) {
+		// if per-service (not per interface) configuration
+		return kCFNotFound;
+	}
+
+	if (!configurations[interfaceIndex].per_interface_config) {
+		// if per-interface configuration not allowed
+		return kCFNotFound;
+	}
+
+	return interfaceIndex;
+}
+
+
 static CF_RETURNS_RETAINED CFArrayRef
 extendedConfigurationTypes(SCNetworkInterfaceRef interface)
 {
@@ -2909,15 +3001,9 @@ extendedConfigurationTypes(SCNetworkInterfaceRef interface)
 		goto done;
 	}
 
-	interfaceIndex = findConfiguration(interfacePrivate->interface_type);
+	interfaceIndex = findPerInterfaceConfiguration(interface);
 	if (interfaceIndex == kCFNotFound) {
-		// we don't allow per-service extended configurations
-		goto done;
-	}
-
-	if (!configurations[interfaceIndex].per_interface_config) {
-		// known interface type but we still don't allow
-		// per-service extended configurations
+		// if no per-interface configuration
 		goto done;
 	}
 
@@ -2978,42 +3064,23 @@ extendedConfigurationTypes(SCNetworkInterfaceRef interface)
 	return myContext.types;
 }
 
+static CFArrayRef
+stringCreateArray(CFStringRef str)
+{
+	return (CFArrayCreate(NULL, (const void **)&str, 1, &kCFTypeArrayCallBacks));
+}
 
 static CFArrayRef
-copyConfigurationPaths(SCNetworkInterfacePrivateRef	interfacePrivate,
-		       CFStringRef			extendedType)
+copyPerInterfaceConfigurationPaths(SCNetworkInterfacePrivateRef	interfacePrivate,
+				   CFStringRef			extendedType)
 {
-	CFMutableArrayRef		array;
+	CFMutableArrayRef		array = NULL;
 	CFIndex				i;
-	CFIndex				interfaceIndex;
 	CFIndex				n;
 	CFStringRef			path;
 	SCNetworkServiceRef		service;
 	CFArrayRef			sets;
 
-	array = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-
-	interfaceIndex = findConfiguration(interfacePrivate->interface_type);
-	if (interfaceIndex == kCFNotFound) {
-		// unknown interface type, use per-service configuration preferences
-		path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
-								      interfacePrivate->serviceID,	// service
-								      extendedType);			// entity
-		CFArrayAppendValue(array, path);
-		CFRelease(path);
-		return array;
-	}
-
-	if (!configurations[interfaceIndex].per_interface_config) {
-		// known interface type, per-service configuration preferences
-		path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
-								      interfacePrivate->serviceID,	// service
-								      extendedType);			// entity
-		CFArrayAppendValue(array, path);
-		CFRelease(path);
-		return array;
-	}
-
 	// known interface type, per-interface configuration preferences
 	//
 	// 1. look for all sets which contain the associated service
@@ -3041,20 +3108,53 @@ copyConfigurationPaths(SCNetworkInterfacePrivateRef	interfacePrivate,
 										   SCNetworkSetGetSetID(set),		// set
 										   interfacePrivate->entity_device,	// service
 										   extendedType);			// entity
+			if (array == NULL) {
+				array = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+			}
 			CFArrayAppendValue(array, path);
 			CFRelease(path);
 		}
 		CFRelease(services);
 	}
 
-	if (CFArrayGetCount(array) == 0) {
-		CFRelease(array);
-		array = NULL;
-	}
-
 	CFRelease(service);
 	if (sets != NULL) CFRelease(sets);
 	return array;
+
+}
+
+static CFArrayRef
+copyConfigurationPaths(SCNetworkInterfacePrivateRef	interfacePrivate,
+		       CFStringRef			extendedType)
+{
+	CFArrayRef	array		= NULL;
+	CFIndex		interfaceIndex;
+	CFStringRef	path;
+
+	interfaceIndex = findConfiguration(interfacePrivate->interface_type);
+	if (interfaceIndex == kCFNotFound) {
+		// unknown interface type, use per-service configuration preferences
+		path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
+								      interfacePrivate->serviceID,	// service
+								      extendedType);			// entity
+		array = stringCreateArray(path);
+		CFRelease(path);
+	}
+
+	else if (!configurations[interfaceIndex].per_interface_config) {
+		// known interface type, per-service configuration preferences
+		path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
+								      interfacePrivate->serviceID,	// service
+								      extendedType);			// entity
+		array = stringCreateArray(path);
+		CFRelease(path);
+	}
+
+	else if (interfacePrivate->serviceID != NULL) {
+		array = copyPerInterfaceConfigurationPaths(interfacePrivate, extendedType);
+	}
+
+	return (array);
 }
 
 
@@ -3099,6 +3199,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) {
@@ -3136,19 +3243,6 @@ __SCNetworkInterfaceCopyInterfaceEntity(SCNetworkInterfaceRef interface)
 			     kSCPropUserDefinedName,
 			     SCNetworkInterfaceGetLocalizedDisplayName(interface));
 
-	// note that this is a V.92 capable modem
-	if (CFEqual(interfacePrivate->interface_type, kSCNetworkInterfaceTypeModem) &&
-	    interfacePrivate->modemIsV92) {
-		int		one     = 1;
-		CFNumberRef     num;
-
-		num = CFNumberCreate(NULL, kCFNumberIntType, &one);
-		CFDictionarySetValue(entity,
-				     kSCPropNetInterfaceSupportsModemOnHold,
-				     num);
-		CFRelease(num);
-	}
-
 	return entity;
 }
 
@@ -3308,15 +3402,16 @@ copy_ppp_entity(CFStringRef bsdName)
 
 
 SCNetworkInterfaceRef
-_SCNetworkInterfaceCreateWithBSDName(CFAllocatorRef		allocator,
-				     CFStringRef		bsdName,
-				     UInt32			flags)
+_SCNetworkInterfaceCreateWithBSDName(CFAllocatorRef	allocator,
+				     CFStringRef	bsdName,
+				     UInt32		flags)
 {
+#pragma unused(allocator)
 	CFMutableDictionaryRef	entity	= NULL;
 	struct ifreq		ifr;
 	SCNetworkInterfaceRef	interface;
 
-	bzero(&ifr, sizeof(ifr));
+	memset(&ifr, 0, sizeof(ifr));
 	if (_SC_cfstring_to_cstring(bsdName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII) != NULL) {
 		int	s;
 
@@ -3371,7 +3466,7 @@ _SCNetworkInterfaceCopyPrefixFromBSDName(CFStringRef bsdName)
 	CFIndex length = 0;
 
 	if (isA_CFString(bsdName) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("_SCNetworkInterfaceCopyPrefixFromBSDName: bsdName is NULL or not of the correct type"));
+		SC_log(LOG_DEBUG, "no BSD name");
 		goto done;
 	}
 
@@ -3406,12 +3501,12 @@ __SCNetworkInterfaceUpdateBSDName(SCNetworkInterfaceRef interface, CFStringRef c
 	SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface;
 
 	if (isA_SCNetworkInterface(interface) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceUpdateBSDName: interface is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No interface");
 		goto done;
 	}
 
 	if (CFEqual(currentBSDName, newBSDName)) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceUpdateBSDName: bsdName (%@) is equal to interfacePrivate->entity_device (%@)"), currentBSDName, newBSDName);
+		// if no change
 		goto done;
 	}
 
@@ -3478,7 +3573,7 @@ __SCNetworkInterfaceSetIOInterfacePrefix (SCNetworkInterfaceRef interface,
 
 __private_extern__
 void
-__SCNetworkInterfaceSetIOInterfaceUnit (SCNetworkInterfaceRef interface,
+__SCNetworkInterfaceSetIOInterfaceUnit(SCNetworkInterfaceRef interface,
 				       CFNumberRef unit)
 {
 	SCNetworkInterfacePrivateRef interfacePrivate;
@@ -3496,7 +3591,7 @@ __SCNetworkInterfaceSetIOInterfaceUnit (SCNetworkInterfaceRef interface,
 		if (isA_CFString(interfacePrivate->entity_device) != NULL) {
 			CFStringRef interfaceNamePrefix = _SCNetworkInterfaceCopyPrefixFromBSDName(interfacePrivate->entity_device);
 			if (interfaceNamePrefix == NULL) {
-				SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceSetIOInterfaceUnit: interfaceNamePrefix is NULL"));
+				SC_log(LOG_INFO, "interfaceNamePrefix is NULL");
 			}
 			else {
 				__SCNetworkInterfaceSetIOInterfacePrefix(interface, interfaceNamePrefix);
@@ -3511,13 +3606,13 @@ __SCNetworkInterfaceSetIOInterfaceUnit (SCNetworkInterfaceRef interface,
 
 	// Update the BSD Name
 	if ((newBSDName == NULL) ||
-	    (__SCNetworkInterfaceUpdateBSDName(interface, oldBSDName, newBSDName) == FALSE)) {
-		SCLog(_sc_debug, LOG_DEBUG, CFSTR("__SCNetworkInterfaceSetIOInterfaceUnit: Update BSD Name Failed"));
+	    (!__SCNetworkInterfaceUpdateBSDName(interface, oldBSDName, newBSDName))) {
+		SC_log(LOG_INFO, "BSD name update failed");
 	}
 
 	// Update the path
-	if (__SCNetworkInterfaceUpdateIOPath(interface) == FALSE) {
-		SCLog(_sc_debug, LOG_DEBUG, CFSTR("__SCNetworkInterfaceSetIOInterfaceUnit: Update IO Path Failed"));
+	if (!__SCNetworkInterfaceUpdateIOPath(interface)) {
+		SC_log(LOG_INFO, "IOPath update failed");
 	}
 
 	CFRetain(unit);
@@ -3551,48 +3646,48 @@ __SCNetworkInterfaceCopyStorageEntity(SCNetworkInterfaceRef interface)
 	CFDictionaryRef info = NULL;
 	CFStringRef type = NULL;
 
-	if (interfacePrivate->active == TRUE) {
+	if (interfacePrivate->active) {
 		active = kCFBooleanTrue;
 	}
 
 	bsdName = SCNetworkInterfaceGetBSDName(interface);
-	if (isA_CFString(bsdName) == NULL) {
+	if (!isA_CFString(bsdName)) {
 		goto done;
 	}
 
 	builtin = interfacePrivate->builtin ? kCFBooleanTrue : kCFBooleanFalse;
 	interfaceNamePrefix = _SCNetworkInterfaceGetIOInterfaceNamePrefix(interface);
-	if (isA_CFString(interfaceNamePrefix) == NULL) {
+	if (!isA_CFString(interfaceNamePrefix)) {
 		goto done;
 	}
 
 	interfaceType = _SCNetworkInterfaceGetIOInterfaceType(interface);
-	if (isA_CFNumber(interfaceType) == NULL) {
+	if (!isA_CFNumber(interfaceType)) {
 		goto done;
 	}
 
 	interfaceUnit = _SCNetworkInterfaceGetIOInterfaceUnit(interface);
-	if (isA_CFNumber(interfaceUnit) == NULL) {
+	if (!isA_CFNumber(interfaceUnit)) {
 		goto done;
 	}
 
 	macAddress = _SCNetworkInterfaceGetHardwareAddress(interface);
-	if (isA_CFData(macAddress) == NULL) {
+	if (!isA_CFData(macAddress)) {
 		goto done;
 	}
 
 	pathMatch = _SCNetworkInterfaceGetIOPath(interface);
-	if (isA_CFString(pathMatch) == NULL) {
+	if (!isA_CFString(pathMatch)) {
 		goto done;
 	}
 
 	info = _SCNetworkInterfaceCopyInterfaceInfo(interface);
-	if (isA_CFDictionary(info) == NULL) {
+	if (!isA_CFDictionary(info)) {
 		goto done;
 	}
 
 	type = SCNetworkInterfaceGetInterfaceType(interface);
-	if (isA_CFString(type) == NULL) {
+	if (!isA_CFString(type)) {
 		goto done;
 	}
 
@@ -3658,7 +3753,7 @@ __SCNetworkInterfaceMatchesName(CFStringRef name, CFStringRef key)
 	CFStringRef	str;
 
 	if (bundle == NULL) {
-		// if no bundle
+		SC_log(LOG_NOTICE, "no bundle information to compare interface names");
 		return FALSE;
 	}
 
@@ -3696,10 +3791,10 @@ __SCNetworkInterfaceMatchesName(CFStringRef name, CFStringRef key)
 
 
 static SCNetworkInterfaceRef
-__SCNetworkInterfaceCreateWithStorageEntity (CFAllocatorRef allocator,
-					     CFDictionaryRef interface_entity,
-					     SCPreferencesRef prefs)
+__SCNetworkInterfaceCreateWithStorageEntity(CFAllocatorRef	allocator,
+					    CFDictionaryRef	interface_entity)
 {
+#pragma unused(allocator)
 	SCNetworkInterfacePrivateRef interfacePrivate = NULL;
 	CFBooleanRef    active = NULL;
 	CFStringRef     bsdName = NULL;
@@ -3721,7 +3816,7 @@ __SCNetworkInterfaceCreateWithStorageEntity (CFAllocatorRef allocator,
 	pthread_once(&initialized, __SCNetworkInterfaceInitialize);
 
 	if (isA_CFDictionary(interface_entity) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: interface_entity is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No interface entity");
 		goto done;
 	}
 	active = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceActive));
@@ -3730,68 +3825,65 @@ __SCNetworkInterfaceCreateWithStorageEntity (CFAllocatorRef allocator,
 	}
 	bsdName = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceBSDName));
 	if (isA_CFString(bsdName) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: bsdName is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No BSD name");
 		goto done;
 	}
 	ioBuiltin = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOBuiltin));
 	if (isA_CFBoolean(ioBuiltin) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioBuiltin is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No IOBuiltin property");
 		goto done;
 	}
 	ioInterfaceNamePrefix = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceNamePrefix));
 	if (isA_CFString(ioInterfaceNamePrefix) == NULL) {
 		ioInterfaceNamePrefix = _SCNetworkInterfaceCopyPrefixFromBSDName(bsdName);
 		if (ioInterfaceNamePrefix == NULL) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioInterfaceNamePrefix is NULL or not of the correct type"));
+			SC_log(LOG_INFO, "No BSD interface name prefix");
 			goto done;
 		}
-	}
-	else {
+	} else {
 		CFRetain(ioInterfaceNamePrefix);
 	}
 	ioInterfaceType = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceType));
 	if (isA_CFNumber(ioInterfaceType) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioInterfaceType is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No IOInterfaceType");
 		goto done;
 	}
-	if (CFNumberGetValue(ioInterfaceType, kCFNumberIntType, &ioInterfaceTypeNum) == FALSE) {
-		SCLog(TRUE, LOG_ERR, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: Count not extract value from ioInterfaceType"));
+	if (!CFNumberGetValue(ioInterfaceType, kCFNumberIntType, &ioInterfaceTypeNum)) {
+		SC_log(LOG_NOTICE, "Count not extract value from ioInterfaceType");
 	}
-
 	ioInterfaceUnit = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceUnit));
 	if (isA_CFNumber(ioInterfaceUnit) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioInterfaceUnit is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No IOInterfaceUnit");
 
 		goto done;
 	}
 	ioMACAddress = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOMACAddress));
 	if (isA_CFData(ioMACAddress) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioMACAddress is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No IOMACAddress");
 		goto done;
 	}
 	ioPathMatch = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOPathMatch));
 	if (isA_CFString(ioPathMatch) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioPathMatch is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No IOPathMatch");
 		goto done;
-	}
-	else {
+	} else {
 		// Check if Path contains the BSD Name in the end
 	}
 	SCNetworkInterfaceInfo = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceInfo));
 	if (isA_CFDictionary(SCNetworkInterfaceInfo) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: SCNetworkInterfaceInfo is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No SCNetworkInterfaceInfo");
 		goto done;
 	}
 	userDefinedName = CFDictionaryGetValue(SCNetworkInterfaceInfo, kSCPropUserDefinedName);
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 	usbProductName = CFDictionaryGetValue(SCNetworkInterfaceInfo, CFSTR(kUSBProductString));
 	idProduct = CFDictionaryGetValue(SCNetworkInterfaceInfo, CFSTR(kUSBProductID));
 	idVendor = CFDictionaryGetValue(SCNetworkInterfaceInfo, CFSTR(kUSBVendorID));
-#endif	// !TARGET_IPHONE_SIMULATOR
+#endif	// !TARGET_OS_SIMULATOR
 
 	type = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceType));
 	if (isA_CFString(type) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: type is NULL or not of the correct type"));
+		SC_log(LOG_INFO, "No SCNetworkInterfaceType");
 		goto done;
 	}
 
@@ -3812,20 +3904,18 @@ __SCNetworkInterfaceCreateWithStorageEntity (CFAllocatorRef allocator,
 
 	// Handling interface types to be seen in NetworkInterfaces.plist
 	CFIndex interfaceIndex;
-	
+
 	interfaceIndex = findConfiguration(type);
 	if (interfaceIndex != kCFNotFound) {
 		interfacePrivate->interface_type = *configurations[interfaceIndex].interface_type;
-	}
-	else {
+	} else {
 		interfacePrivate->interface_type = kSCNetworkInterfaceTypeEthernet;
 	}
-	
+
 	// Extracting entity type from value of interface type
 	if (ioInterfaceTypeNum == kInterfaceTypeEthernetValue) {
 		interfacePrivate->entity_type = kSCValNetInterfaceTypeEthernet; // kSCNetworkInterfaceTypeEthernet;
-	}
-	else if (ioInterfaceTypeNum == kInterfaceTypeFirewireValue) {
+	} else if (ioInterfaceTypeNum == kInterfaceTypeFirewireValue) {
 		interfacePrivate->entity_type = kSCValNetInterfaceTypeFireWire;
 	}
 done:
@@ -3837,11 +3927,77 @@ done:
 }
 
 
+__private_extern__
+void
+_SCNetworkInterfaceCacheOpen(void)
+{
+	if (!__SCNetworkInterfaceCacheIsOpen()) {
+		S_interface_cache = CFDictionaryCreateMutable(NULL,
+							      0,
+							      &kCFTypeDictionaryKeyCallBacks,
+							      &kCFTypeDictionaryValueCallBacks);
+		SC_log(LOG_DEBUG, "SCNetworkInterface cache (%p): open", S_interface_cache);
+	}
+}
+
+
+__private_extern__
+void
+_SCNetworkInterfaceCacheClose(void)
+{
+	if (__SCNetworkInterfaceCacheIsOpen()) {
+		SC_log(LOG_DEBUG, "SCNetworkInterface cache (%p): close", S_interface_cache);
+		CFRelease(S_interface_cache);
+		S_interface_cache = NULL;
+	}
+}
+
+
+static void
+__SCNetworkInterfaceCacheAdd(CFStringRef bsdName, CFArrayRef matchingInterfaces)
+{
+	if (__SCNetworkInterfaceCacheIsOpen() &&
+	    bsdName != NULL &&
+	    matchingInterfaces != NULL) {
+		SC_log(LOG_DEBUG, "SCNetworkInterface cache (%p): add %@", S_interface_cache, bsdName);
+		CFDictionaryAddValue(S_interface_cache, bsdName, matchingInterfaces);
+	}
+}
+
+
+static inline Boolean
+__SCNetworkInterfaceCacheIsOpen(void)
+{
+	return (S_interface_cache != NULL);
+}
+
+
+static CFArrayRef
+__SCNetworkInterfaceCacheCopy(CFStringRef bsdName)
+{
+	if (__SCNetworkInterfaceCacheIsOpen() &&
+	    bsdName != NULL) {
+		CFArrayRef matchingInterfaces = CFDictionaryGetValue(S_interface_cache, bsdName);
+		if (matchingInterfaces) {
+			CFRetain(matchingInterfaces);
+			SC_log(LOG_DEBUG, "SCNetworkInterface cache (%p): copy w/ match for %@", S_interface_cache, bsdName);
+		} else {
+			SC_log(LOG_DEBUG, "SCNetworkInterface cache (%p): copy w/ no match for %@", S_interface_cache, bsdName);
+		}
+
+		return matchingInterfaces;
+	}
+
+	return NULL;
+}
+
+
 SCNetworkInterfaceRef
-_SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
-				    CFDictionaryRef		interface_entity,
-				    SCNetworkServiceRef		service)
+_SCNetworkInterfaceCreateWithEntity(CFAllocatorRef	allocator,
+				    CFDictionaryRef	interface_entity,
+				    SCNetworkServiceRef	service)
 {
+#pragma unused(allocator)
 	SCNetworkInterfacePrivateRef	interfacePrivate	= NULL;
 	CFStringRef			ifDevice;
 	CFStringRef			ifName			= NULL;
@@ -3858,7 +4014,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 	if (service != NULL) {
 		servicePref = ((SCNetworkServicePrivateRef)service)->prefs;
 		useSystemInterfaces = ((__SCPreferencesUsingDefaultPrefs(servicePref)) &&
-                                       (__SCPreferencesGetLimitSCNetworkConfiguration(servicePref) == FALSE));
+				       (!__SCPreferencesGetLimitSCNetworkConfiguration(servicePref)));
 	}
 
 	ifType = CFDictionaryGetValue(interface_entity, kSCPropNetInterfaceType);
@@ -3904,16 +4060,25 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 			goto done;
 		}
 		if (useSystemInterfaces) {
-			if (_SC_cfstring_to_cstring(ifDevice, bsdName, sizeof(bsdName), kCFStringEncodingASCII) == NULL) {
-				goto done;
-			}
+			// Check to see if we already have the info in the cache
+			matching_interfaces = __SCNetworkInterfaceCacheCopy(ifDevice);
+			if (matching_interfaces == NULL) {
+				if (_SC_cfstring_to_cstring(ifDevice, bsdName, sizeof(bsdName), kCFStringEncodingASCII) == NULL) {
+					goto done;
+				}
 
-			matching = IOBSDNameMatching(masterPort, 0, bsdName);
-			if (matching == NULL) {
-				goto done;
+				matching = IOBSDNameMatching(masterPort, 0, bsdName);
+				if (matching == NULL) {
+					goto done;
+				}
+				matching_interfaces = findMatchingInterfaces(matching,
+									     processNetworkInterface,
+									     kSCNetworkInterfaceHiddenInterfaceKey,
+									     TRUE);
+
+				__SCNetworkInterfaceCacheAdd(ifDevice, matching_interfaces);
+				CFRelease(matching);
 			}
-			matching_interfaces = findMatchingInterfaces(matching, processNetworkInterface, kSCNetworkInterfaceHiddenInterfaceKey);
-			CFRelease(matching);
 		}
 	} else if (CFEqual(ifType, kSCValNetInterfaceTypePPP)) {
 		if (CFEqual(ifSubType, kSCValNetInterfaceSubTypePPPSerial)) {
@@ -3938,7 +4103,10 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 							      sizeof(match_keys)/sizeof(match_keys[0]),
 							      &kCFTypeDictionaryKeyCallBacks,
 							      &kCFTypeDictionaryValueCallBacks);
-				matching_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey);
+				matching_interfaces = findMatchingInterfaces(matching,
+									     processSerialInterface,
+									     kSCNetworkInterfaceHiddenPortKey,
+									     TRUE);
 				CFRelease(matching);
 			}
 			if (ifUnique == NULL) {
@@ -3972,16 +4140,22 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 								      sizeof(match_keys)/sizeof(match_keys[0]),
 								      &kCFTypeDictionaryKeyCallBacks,
 								      &kCFTypeDictionaryValueCallBacks);
-					matching_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey);
+					matching_interfaces = findMatchingInterfaces(matching,
+										     processSerialInterface,
+										     kSCNetworkInterfaceHiddenPortKey,
+										     TRUE);
 					CFRelease(matching);
 				}
 			}
 		} else if (CFEqual(ifSubType, kSCValNetInterfaceSubTypeL2TP)) {
 			interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
 													       kSCNetworkInterfaceTypeL2TP);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
 		} else if (CFEqual(ifSubType, kSCValNetInterfaceSubTypePPTP)) {
 			interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
 													       kSCNetworkInterfaceTypePPTP);
+#pragma GCC diagnostic pop
 		} else {
 			// XXX do we allow non-Apple variants of PPP??? XXX
 			interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
@@ -4114,7 +4288,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 					}
 				}
 				if (interfacePrivate == NULL) {
-					SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkInterfaceCreateWithEntity() failed, more than one interface matches %@"), ifDevice);
+					SC_log(LOG_NOTICE, "more than one interface matches %@", ifDevice);
 					interfacePrivate = (SCNetworkInterfacePrivateRef)CFArrayGetValueAtIndex(matching_interfaces, 0);
 				}
 				CFRetain(interfacePrivate);
@@ -4125,11 +4299,11 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 
     done :
 
-	if ((interfacePrivate == NULL) || (useSystemInterfaces == FALSE))  {
+	if ((interfacePrivate == NULL) || !useSystemInterfaces)  {
 		/*
 		 * if device not present on this system
 		 */
-		if (useSystemInterfaces == FALSE) {
+		if (!useSystemInterfaces) {
 			if (interfacePrivate != NULL) {
 				CFRelease(interfacePrivate);
 			}
@@ -4143,7 +4317,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 
 		// Using UserDefinedName to check the validity of preferences file
 		// when useSystemInterfaces is FALSE
-		if (useSystemInterfaces == FALSE) {
+		if (!useSystemInterfaces) {
 			CFStringRef userDefinedName = CFDictionaryGetValue(interface_entity, kSCPropUserDefinedName);
 			if (isA_CFString(userDefinedName) != NULL) {
 				CFRetain(userDefinedName);
@@ -4163,12 +4337,12 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 		if (CFEqual(ifType, kSCValNetInterfaceTypeEthernet)) {
 			CFStringRef	entity_hardware;
 			SCNetworkInterfaceRef virtualInterface;
-			
-			if ((useSystemInterfaces == FALSE) &&
+
+			if (!useSystemInterfaces &&
 			    (((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;
@@ -4211,7 +4385,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 		} else if (CFEqual(ifType, kSCValNetInterfaceTypeFireWire)) {
 			interfacePrivate->interface_type = kSCNetworkInterfaceTypeFireWire;
 			interfacePrivate->sort_order     = kSortFireWire;
-		} else if (CFEqual(ifType, kSCValNetInterfaceTypePPP)) {
+		} else if (CFEqual(ifType, kSCValNetInterfaceTypePPP) && (ifSubType != NULL)) {
 			if (CFEqual(ifSubType, kSCValNetInterfaceSubTypePPPoE)) {
 				CFStringRef	entity_hardware;
 
@@ -4248,7 +4422,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 					return NULL;
 				}
 			}
-		} else if (CFEqual(ifType, kSCValNetInterfaceTypeVPN)) {
+		} else if (CFEqual(ifType, kSCValNetInterfaceTypeVPN) && (ifSubType != NULL)) {
 			SCNetworkInterfaceRef	child;
 			CFRelease(interfacePrivate);
 			child = SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4, ifSubType);
@@ -4256,28 +4430,29 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 			if (interfacePrivate == NULL) {
 				return NULL;
 			}
-                } else if (CFEqual(ifType, kSCValNetInterfaceTypeIPSec)) {
-                        CFRelease(interfacePrivate);
-                        interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
-                                                                                                               kSCNetworkInterfaceTypeIPSec);
-                } else if (CFEqual(ifType, kSCValNetInterfaceType6to4)) {
-                        CFRelease(interfacePrivate);
-                        if (!isA_CFString(ifDevice)) {
-                                return NULL;
-                        }
-                        interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
-                                                                                                               kSCNetworkInterfaceType6to4);
-                } else if (CFEqual(ifType, kSCValNetInterfaceTypeLoopback)) {
-                        CFRelease(interfacePrivate);
-                        interfacePrivate = __SCNetworkInterfaceCreateCopy(NULL, kSCNetworkInterfaceLoopback, NULL, NULL);
-                } else if (CFStringFind(ifType, CFSTR("."), 0).location != kCFNotFound) {
+		} else if (CFEqual(ifType, kSCValNetInterfaceTypeIPSec)) {
+			CFRelease(interfacePrivate);
+			interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
+													       kSCNetworkInterfaceTypeIPSec);
+		} else if (CFEqual(ifType, kSCValNetInterfaceType6to4)) {
+			CFRelease(interfacePrivate);
+			if (!isA_CFString(ifDevice)) {
+				return NULL;
+			}
+			interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4,
+													       kSCNetworkInterfaceType6to4);
+		} else if (CFEqual(ifType, kSCValNetInterfaceTypeLoopback)) {
+			CFRelease(interfacePrivate);
+			interfacePrivate = __SCNetworkInterfaceCreateCopy(NULL, kSCNetworkInterfaceLoopback, NULL, NULL);
+		} else if (CFStringFind(ifType, CFSTR("."), 0).location != kCFNotFound) {
 			// if vendor interface
+			pthread_mutex_lock(&lock);
 			if (vendor_interface_types == NULL) {
 				vendor_interface_types = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
 			}
 			CFSetAddValue(vendor_interface_types, ifType);
-
 			interfacePrivate->interface_type = CFSetGetValue(vendor_interface_types, ifType);
+			pthread_mutex_unlock(&lock);
 		} else {
 			// if unknown interface
 			CFRelease(interfacePrivate);
@@ -4288,6 +4463,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) {
@@ -4366,7 +4546,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef		allocator,
 
 __private_extern__
 CFArrayRef
-__SCNetworkInterfaceCopyAll_IONetworkInterface(void)
+__SCNetworkInterfaceCopyAll_IONetworkInterface(Boolean keep_pre_configured)
 {
 	CFDictionaryRef		matching;
 	CFArrayRef		new_interfaces;
@@ -4374,7 +4554,10 @@ __SCNetworkInterfaceCopyAll_IONetworkInterface(void)
 	// get Ethernet, Firewire, Thunderbolt, and AirPort interfaces
 
 	matching = IOServiceMatching(kIONetworkInterfaceClass);
-	new_interfaces = findMatchingInterfaces(matching, processNetworkInterface, kSCNetworkInterfaceHiddenInterfaceKey);
+	new_interfaces = findMatchingInterfaces(matching,
+						processNetworkInterface,
+						kSCNetworkInterfaceHiddenInterfaceKey,
+						keep_pre_configured);
 	CFRelease(matching);
 
 	return new_interfaces;
@@ -4402,7 +4585,10 @@ __SCNetworkInterfaceCopyAll_Modem()
 				      sizeof(match_keys)/sizeof(match_keys[0]),
 				      &kCFTypeDictionaryKeyCallBacks,
 				      &kCFTypeDictionaryValueCallBacks);
-	new_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey);
+	new_interfaces = findMatchingInterfaces(matching,
+						processSerialInterface,
+						kSCNetworkInterfaceHiddenPortKey,
+						FALSE);
 	CFRelease(matching);
 
 	return new_interfaces;
@@ -4430,7 +4616,10 @@ __SCNetworkInterfaceCopyAll_RS232()
 				      sizeof(match_keys)/sizeof(match_keys[0]),
 				      &kCFTypeDictionaryKeyCallBacks,
 				      &kCFTypeDictionaryValueCallBacks);
-	new_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey);
+	new_interfaces = findMatchingInterfaces(matching,
+						processSerialInterface,
+						kSCNetworkInterfaceHiddenPortKey,
+						FALSE);
 	CFRelease(matching);
 
 	return new_interfaces;
@@ -4439,7 +4628,7 @@ __SCNetworkInterfaceCopyAll_RS232()
 
 #if	!TARGET_OS_IPHONE
 static void
-addBTPANInterface(SCPreferencesRef prefs, CFMutableArrayRef all_interfaces)
+addBTPANInterface(CFMutableArrayRef all_interfaces)
 {
 	CFIndex			i;
 	SCNetworkInterfaceRef	interface;
@@ -4493,14 +4682,16 @@ add_interfaces(CFMutableArrayRef all_interfaces, CFArrayRef new_interfaces)
 static void
 __waitForInterfaces()
 {
-	CFStringRef		key;
+	CFStringRef		key	= NULL;
 	CFArrayRef		keys;
 	Boolean			ok;
-	SCDynamicStoreRef	store;
+	SCDynamicStoreRef	store	= NULL;
+
+	CRSetCrashLogMessage("Waiting for IOKit to quiesce (or timeout)");
 
 	store = SCDynamicStoreCreate(NULL, CFSTR("SCNetworkInterfaceCopyAll"), NULL, NULL);
 	if (store == NULL) {
-		return;
+		goto done;
 	}
 
 	key = SCDynamicStoreKeyCreate(NULL, CFSTR("%@" "InterfaceNamer"), kSCDynamicStoreDomainPlugin);
@@ -4508,8 +4699,7 @@ __waitForInterfaces()
 	ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL);
 	CFRelease(keys);
 	if (!ok) {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SCDynamicStoreSetNotificationKeys() failed: %s"), SCErrorString(SCError()));
+		SC_log(LOG_NOTICE, "SCDynamicStoreSetNotificationKeys() failed: %s", SCErrorString(SCError()));
 		goto done;
 	}
 
@@ -4522,8 +4712,8 @@ __waitForInterfaces()
 		dict = SCDynamicStoreCopyValue(store, key);
 		if (dict != NULL) {
 			if (isA_CFDictionary(dict) &&
-			    (CFDictionaryContainsKey(dict, CFSTR("*QUIET*")) ||
-			     CFDictionaryContainsKey(dict, CFSTR("*TIMEOUT*")))) {
+			    (CFDictionaryContainsKey(dict, kInterfaceNamerKey_Quiet) ||
+			     CFDictionaryContainsKey(dict, kInterfaceNamerKey_Timeout))) {
 				quiet = TRUE;
 			}
 			CFRelease(dict);
@@ -4534,8 +4724,7 @@ __waitForInterfaces()
 
 		ok = SCDynamicStoreNotifyWait(store);
 		if (!ok) {
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("SCDynamicStoreNotifyWait() failed: %s"), SCErrorString(SCError()));
+			SC_log(LOG_NOTICE, "SCDynamicStoreNotifyWait() failed: %s", SCErrorString(SCError()));
 			goto done;
 		}
 
@@ -4547,8 +4736,10 @@ __waitForInterfaces()
 
     done :
 
-	CFRelease(key);
-	CFRelease(store);
+	CRSetCrashLogMessage(NULL);
+
+	if (key != NULL) CFRelease(key);
+	if (store != NULL) CFRelease(store);
 	return;
 }
 
@@ -4569,7 +4760,7 @@ _SCNetworkInterfaceCopyAllWithPreferences(SCPreferencesRef prefs)
 	all_interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 
 	// get Ethernet, Firewire, Thunderbolt, and AirPort interfaces
-	new_interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface();
+	new_interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(FALSE);
 	if (new_interfaces != NULL) {
 		add_interfaces(all_interfaces, new_interfaces);
 		CFRelease(new_interfaces);
@@ -4619,7 +4810,7 @@ _SCNetworkInterfaceCopyAllWithPreferences(SCPreferencesRef prefs)
 
 #if	!TARGET_OS_IPHONE
 		// add BT-PAN interface
-		addBTPANInterface(prefs, all_interfaces);
+		addBTPANInterface(all_interfaces);
 #endif	// !TARGET_OS_IPHONE
 
 		if (temp_preferences) CFRelease(prefs);
@@ -4670,9 +4861,6 @@ SCNetworkInterfaceGetSupportedInterfaceTypes(SCNetworkInterfaceRef interface)
 			if (configurations[i].supported_interfaces & doPPP) {
 				CFArrayAppendValue(interfacePrivate->supported_interface_types, kSCNetworkInterfaceTypePPP);
 			}
-			if (configurations[i].supported_interfaces & doPPTP) {
-				CFArrayAppendValue(interfacePrivate->supported_interface_types, kSCNetworkInterfaceTypePPTP);
-			}
 			if (configurations[i].supported_interfaces & doIPSec) {
 				CFArrayAppendValue(interfacePrivate->supported_interface_types, kSCNetworkInterfaceTypeIPSec);
 			}
@@ -4805,6 +4993,8 @@ SCNetworkInterfaceCreateWithInterface(SCNetworkInterfaceRef child, CFStringRef i
 		parentPrivate->interface_type = kSCNetworkInterfaceTypeL2TP;
 		parentPrivate->localized_key  = CFSTR("l2tp");
 		parentPrivate->entity_type    = kSCEntNetL2TP;			// interface config goes into "L2TP"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
 	} else if (CFEqual(interfaceType, kSCNetworkInterfaceTypePPTP)) {
 		if ((childIndex == kCFNotFound) ||
 		    ((configurations[childIndex].supported_interfaces & doPPTP) != doPPTP)) {
@@ -4814,6 +5004,7 @@ SCNetworkInterfaceCreateWithInterface(SCNetworkInterfaceRef child, CFStringRef i
 		parentPrivate->interface_type = kSCNetworkInterfaceTypePPTP;
 		parentPrivate->localized_key  = CFSTR("pptp");
 		parentPrivate->entity_type    = kSCEntNetPPTP;			// interface config goes into "PPTP"
+#pragma GCC diagnostic pop
 	} else if (CFEqual(interfaceType, kSCNetworkInterfaceType6to4)) {
 		if ((childIndex == kCFNotFound) ||
 		    ((configurations[childIndex].supported_interfaces & do6to4) != do6to4)) {
@@ -4881,12 +5072,14 @@ SCNetworkInterfaceCreateWithInterface(SCNetworkInterfaceRef child, CFStringRef i
 		}
 	} else if (CFStringFind(interfaceType, CFSTR("."), 0).location != kCFNotFound) {
 		// if custom interface type
+		pthread_mutex_lock(&lock);
 		if (vendor_interface_types == NULL) {
 			vendor_interface_types = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
 		}
 		CFSetAddValue(vendor_interface_types, interfaceType);
-
 		parentPrivate->interface_type = CFSetGetValue(vendor_interface_types, interfaceType);
+		pthread_mutex_unlock(&lock);
+
 		parentPrivate->entity_type    = parentPrivate->interface_type;	// interface config goes into a
 										// a dictionary with the same
 										// name as the interfaceType
@@ -4897,6 +5090,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);
 	}
@@ -5126,7 +5323,7 @@ SCNetworkInterfaceGetHardwareAddressString(SCNetworkInterfaceRef interface)
 	    (interfacePrivate->addressString == NULL)) {
 		uint8_t		*bp;
 		char		*cp;
-		CFIndex		n;
+		size_t		n;
 		char		mac[sizeof("xx:xx:xx:xx:xx:xx:xx:xx")];
 		char		*mac_p	= mac;
 
@@ -5134,7 +5331,7 @@ SCNetworkInterfaceGetHardwareAddressString(SCNetworkInterfaceRef interface)
 		n  = CFDataGetLength(interfacePrivate->address) * 3;
 
 		if (n > sizeof(mac)) {
-			mac_p = CFAllocatorAllocate(NULL, 0, n);
+			mac_p = CFAllocatorAllocate(NULL, n, 0);
 		}
 
 		for (cp = mac_p; n > 0; n -= 3) {
@@ -5178,7 +5375,7 @@ SCNetworkInterfaceGetInterfaceType(SCNetworkInterfaceRef interface)
 
 
 static CFStringRef
-copy_interface_string(CFBundleRef bundle, CFStringRef key, Boolean localized)
+copy_string_from_bundle(CFBundleRef bundle, CFStringRef key, Boolean localized)
 {
 	CFStringRef	str	= NULL;
 
@@ -5198,6 +5395,52 @@ copy_interface_string(CFBundleRef bundle, CFStringRef key, Boolean localized)
 }
 
 
+static CFStringRef
+copy_interface_string(CFBundleRef bundle, CFStringRef key, Boolean localized)
+{
+	static Boolean reported = FALSE;
+	CFStringRef	str	= NULL;
+
+	str = copy_string_from_bundle(bundle, key, localized);
+
+	if (str == NULL) {
+		SC_log(LOG_ERR, "Received NULL string for the interface key: {Bundle: %@, key: %@, localized: %d}", bundle,
+														    key,
+														    localized);
+		goto done;
+	}
+
+	if (CFEqual(str, key) && !reported) {
+		const CFStringRef knownStrKey = CFSTR("airport");
+		CFStringRef knownStrValue = NULL;
+
+		knownStrValue = copy_string_from_bundle(bundle, knownStrKey, localized);
+		if (knownStrValue == NULL || CFEqual(knownStrValue, knownStrKey)) {
+			/* We are here because we requested for a localized/non-localized string
+			   based on the localization key, but we were given the same key/NULL back,
+			   implying a bad...bad thing!
+			 */
+			SC_log(LOG_ERR, "Failed to retrieve the interface string: {Bundle: %@, key: %@, localized: %d}", bundle,
+															 knownStrKey,
+															 localized);
+
+#if	TARGET_OS_IPHONE
+			/* ...and we want to know about it! */
+			_SC_crash("Failed to retrieve interface string", NULL, NULL);
+#endif	//TARGET_OS_IPHONE
+			reported = TRUE;
+		}
+
+		if (knownStrValue != NULL) {
+			CFRelease(knownStrValue);
+		}
+	}
+
+done:
+	return str;
+}
+
+
 static CFStringRef
 copy_display_name(SCNetworkInterfaceRef interface, Boolean localized, Boolean oldLocalization)
 {
@@ -5327,19 +5570,19 @@ __private_extern__
 void
 __SCNetworkInterfaceSetUserDefinedName(SCNetworkInterfaceRef interface, CFStringRef name)
 {
-        SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface;
-        
-        if (!isA_SCNetworkInterface(interface)) {
-                return;
+	SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface;
+
+	if (!isA_SCNetworkInterface(interface)) {
+		return;
 	}
-        if (name != NULL) {
-                CFRetain(name);
+	if (name != NULL) {
+		CFRetain(name);
 	}
-        if (interfacePrivate->name != NULL) {
-                CFRelease(interfacePrivate->name);
+	if (interfacePrivate->name != NULL) {
+		CFRelease(interfacePrivate->name);
 	}
-        interfacePrivate->name = name;
-	
+	interfacePrivate->name = name;
+
 	if (name != NULL) {
 		CFRetain(name);
 	}
@@ -5401,11 +5644,11 @@ SCNetworkInterfaceGetLocalizedDisplayName(SCNetworkInterfaceRef interface)
 
 
 __private_extern__
-CFDictionaryRef
+CFPropertyListRef
 __SCNetworkInterfaceGetTemplateOverrides(SCNetworkInterfaceRef interface, CFStringRef overrideType)
 {
 	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
-	CFDictionaryRef			overrides		= NULL;
+	CFPropertyListRef		overrides		= NULL;
 
 	if (interfacePrivate->overrides != NULL) {
 		overrides = CFDictionaryGetValue(interfacePrivate->overrides, overrideType);
@@ -5574,6 +5817,7 @@ Boolean
 SCNetworkInterfaceSetConfiguration(SCNetworkInterfaceRef interface, CFDictionaryRef config)
 {
 	CFStringRef	defaultType;
+	Boolean		ok;
 
 	if (!isA_SCNetworkInterface(interface)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
@@ -5585,7 +5829,14 @@ SCNetworkInterfaceSetConfiguration(SCNetworkInterfaceRef interface, CFDictionary
 		return FALSE;
 	}
 
-	return __SCNetworkInterfaceSetConfiguration(interface, defaultType, config, FALSE);
+	ok = __SCNetworkInterfaceSetConfiguration(interface, defaultType, config, FALSE);
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkInterfaceSetConfiguration(): %@ -> %@",
+		       interface,
+		       config != NULL ? config : (CFDictionaryRef)CFSTR("NULL"));
+	}
+
+	return ok;
 }
 
 
@@ -5594,6 +5845,8 @@ SCNetworkInterfaceSetExtendedConfiguration(SCNetworkInterfaceRef	interface,
 					   CFStringRef			extendedType,
 					   CFDictionaryRef		config)
 {
+	Boolean		ok;
+
 	if (!isA_SCNetworkInterface(interface)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
@@ -5603,7 +5856,14 @@ SCNetworkInterfaceSetExtendedConfiguration(SCNetworkInterfaceRef	interface,
 		return FALSE;
 	}
 
-	return __SCNetworkInterfaceSetConfiguration(interface, extendedType, config, FALSE);
+	ok = __SCNetworkInterfaceSetConfiguration(interface, extendedType, config, FALSE);
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkInterfaceSetExtendedConfiguration(): %@ -> %@",
+		       interface,
+		       config != NULL ? config : (CFDictionaryRef)CFSTR("NULL"));
+	}
+
+	return ok;
 }
 
 
@@ -5611,10 +5871,6 @@ SCNetworkInterfaceSetExtendedConfiguration(SCNetworkInterfaceRef	interface,
 #pragma mark SCNetworkInterface [Refresh Configuration] API
 
 
-#ifndef kSCEntNetRefreshConfiguration
-#define kSCEntNetRefreshConfiguration	CFSTR("RefreshConfiguration")
-#endif	// kSCEntNetRefreshConfiguration
-
 Boolean
 _SCNetworkInterfaceForceConfigurationRefresh(CFStringRef ifName)
 {
@@ -5724,11 +5980,13 @@ SCNetworkInterfaceForceConfigurationRefresh(SCNetworkInterfaceRef interface)
 }
 
 
+#if	!TARGET_OS_IPHONE
 Boolean
 SCNetworkInterfaceRefreshConfiguration(CFStringRef ifName)
 {
 	return _SCNetworkInterfaceForceConfigurationRefresh(ifName);
 }
+#endif	// !TARGET_OS_IPHONE
 
 
 #pragma mark -
@@ -6799,6 +7057,103 @@ 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)
+#pragma unused(advisory)
+#pragma unused(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
@@ -6828,7 +7183,7 @@ _SCNetworkInterfaceCopyInterfaceInfo(SCNetworkInterfaceRef interface)
 
 	// add USB info
 	if ((interfacePrivate->usb.vid != NULL) || (interfacePrivate->usb.pid != NULL)) {
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 		if (interfacePrivate->usb.name != NULL) {
 			CFDictionaryAddValue(info, CFSTR(kUSBProductString), interfacePrivate->usb.name);
 		}
@@ -6838,7 +7193,7 @@ _SCNetworkInterfaceCopyInterfaceInfo(SCNetworkInterfaceRef interface)
 		if (interfacePrivate->usb.pid != NULL) {
 			CFDictionaryAddValue(info, CFSTR(kUSBProductID), interfacePrivate->usb.pid);
 		}
-#endif	// !TARGET_IPHONE_SIMULATOR
+#endif	// !TARGET_OS_SIMULATOR
 	}
 
 	if (CFDictionaryGetCount(info) == 0) {
@@ -6914,6 +7269,72 @@ _SCNetworkInterfaceGetIOInterfaceUnit(SCNetworkInterfaceRef interface)
 }
 
 
+static void
+update_ift_family(SCNetworkInterfaceRef interface)
+{
+	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
+
+	// note: family/subfamily are not in IORegistry, fetch with ioctl()
+
+	if ((interfacePrivate->family == NULL) && (interfacePrivate->subfamily == NULL)) {
+		CFStringRef	bsdName	= SCNetworkInterfaceGetBSDName(interface);
+		struct ifreq	ifr;
+
+		memset(&ifr, 0, sizeof(ifr));
+		if ((bsdName != NULL) &&
+		    _SC_cfstring_to_cstring(bsdName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII) != NULL) {
+			int	s;
+
+			s = socket(AF_INET, SOCK_DGRAM, 0);
+			if (s != -1) {
+				if (ioctl(s, SIOCGIFTYPE, (caddr_t)&ifr) == -1) {
+					ifr.ifr_type.ift_family = 0;
+					ifr.ifr_type.ift_subfamily = 0;
+				}
+				close(s);
+			}
+		}
+
+		interfacePrivate->family = CFNumberCreate(NULL,
+							  kCFNumberSInt32Type,
+							  &ifr.ifr_type.ift_family);
+		interfacePrivate->subfamily = CFNumberCreate(NULL,
+							     kCFNumberSInt32Type,
+							     &ifr.ifr_type.ift_subfamily);
+	}
+}
+
+
+CFNumberRef
+_SCNetworkInterfaceGetFamilyType(SCNetworkInterfaceRef interface)
+{
+	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
+
+	// note: family not in IORegistry, fetch with ioctl()
+
+	if (interfacePrivate->family == NULL) {
+		update_ift_family(interface);
+	}
+
+	return interfacePrivate->family;
+}
+
+
+CFNumberRef
+_SCNetworkInterfaceGetFamilySubType(SCNetworkInterfaceRef interface)
+{
+	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
+
+	// note: subfamily not in IORegistry, fetch with ioctl()
+
+	if (interfacePrivate->subfamily == NULL) {
+		update_ift_family(interface);
+	}
+
+	return interfacePrivate->subfamily;
+}
+
+
 CFStringRef
 _SCNetworkInterfaceGetIOPath(SCNetworkInterfaceRef interface)
 {
@@ -6951,11 +7372,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)
@@ -6974,7 +7404,7 @@ _SCNetworkInterfaceCopyBTPANInterface(void)
 
 		if (isA_CFDictionary(dict) &&
 		    CFDictionaryGetValueIfPresent(dict,
-						  CFSTR("_" BT_PAN_NAME "_"),
+						  kInterfaceNamerKey_BT_PAN_Name,
 						  (const void **)&if_name) &&
 		    isA_CFString(if_name)) {
 			CFMutableDictionaryRef	entity;
@@ -7001,7 +7431,7 @@ _SCNetworkInterfaceCopyBTPANInterface(void)
 		if ((interfacePrivate != NULL) &&
 		    (interfacePrivate->address == NULL) &&
 		    CFDictionaryGetValueIfPresent(dict,
-						  CFSTR("_" BT_PAN_MAC "_"),
+						  kInterfaceNamerKey_BT_PAN_Mac,
 						  (const void **)&addr) &&
 		    isA_CFData(addr)) {
 			interfacePrivate->address = CFRetain(addr);
@@ -7012,7 +7442,7 @@ _SCNetworkInterfaceCopyBTPANInterface(void)
 
 	return interface;
 }
-#endif	// !TARGET_OS_EMBEDDED
+#endif	// TARGET_OS_OSX
 
 
 CFStringRef
@@ -7060,7 +7490,7 @@ _SCNetworkInterfaceCopySlashDevPath(SCNetworkInterfaceRef interface)
 	// note: this "matching" dictionary will be consumed by the call to IOServiceGetMatchingServices
 	kr = IOServiceGetMatchingServices(masterPort, matching, &device_iterator);
 	if (kr != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("IOServiceGetMatchingServices() failed, kr = 0x%x"), kr);
+		SC_log(LOG_INFO, "IOServiceGetMatchingServices() failed, kr = 0x%x", kr);
 		goto done;
 	}
 
@@ -7125,6 +7555,54 @@ _SCNetworkInterfaceCopySlashDevPath(SCNetworkInterfaceRef interface)
 }
 
 
+#pragma mark -
+
+
+Boolean
+_SCNetworkInterfaceIsApplePreconfigured(SCNetworkInterfaceRef interface)
+{
+#if	TARGET_OS_SIMULATOR
+#pragma unused(interface)
+#else	// TARGET_OS_SIMULATOR
+	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
+
+	if (!_SCNetworkInterfaceIsHiddenConfiguration(interface)) {
+		// if not HiddenConfiguration
+		return FALSE;
+	}
+
+	if ((interfacePrivate->overrides == NULL) ||
+	    (!CFDictionaryContainsKey(interfacePrivate->overrides, kSCNetworkProtocolTypeIPv4) &&
+	     !CFDictionaryContainsKey(interfacePrivate->overrides, kSCNetworkProtocolTypeIPv6))) {
+		// if no [IPv4/IPv6] configuration overrides
+		return FALSE;
+	}
+
+	if (_SCNetworkInterfaceIsBuiltin(interface)) {
+		// if built-in (and overrides are present)
+		return TRUE;
+	}
+
+	if (_SCNetworkInterfaceIsCarPlay(interface)) {
+		// if CarPlay (and overrides are present)
+		return TRUE;
+	}
+
+	if (isA_CFNumber(interfacePrivate->usb.vid)) {
+		int		vid;
+
+		if (CFNumberGetValue(interfacePrivate->usb.vid, kCFNumberIntType, &vid) &&
+		    (vid == kIOUSBVendorIDAppleComputer)) {
+			// if Apple interface (and overrides are present)
+			return TRUE;
+		}
+	}
+#endif	// TARGET_OS_SIMULATOR
+
+	return FALSE;
+}
+
+
 Boolean
 _SCNetworkInterfaceIsBluetoothPAN(SCNetworkInterfaceRef interface)
 {
@@ -7153,20 +7631,20 @@ _SCNetworkInterfaceIsBluetoothP2P(SCNetworkInterfaceRef interface)
 
 
 Boolean
-_SCNetworkInterfaceIsHiddenConfiguration(SCNetworkInterfaceRef interface)
+_SCNetworkInterfaceIsCarPlay(SCNetworkInterfaceRef interface)
 {
 	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
 
-	return interfacePrivate->hidden;
+	return (interfacePrivate->sort_order == kSortCarPlay);
 }
 
 
 Boolean
-_SCNetworkInterfaceIsModemV92(SCNetworkInterfaceRef interface)
+_SCNetworkInterfaceIsHiddenConfiguration(SCNetworkInterfaceRef interface)
 {
 	SCNetworkInterfacePrivateRef	interfacePrivate	= (SCNetworkInterfacePrivateRef)interface;
 
-	return interfacePrivate->modemIsV92;
+	return interfacePrivate->hidden;
 }
 
 
@@ -7221,6 +7699,48 @@ _SCNetworkInterfaceIsThunderbolt(SCNetworkInterfaceRef interface)
 }
 
 
+#pragma mark -
+
+
+CFDictionaryRef
+SCNetworkInterfaceGetQoSMarkingPolicy(SCNetworkInterfaceRef interface)
+{
+	CFDictionaryRef	policy;
+
+	if (!isA_SCNetworkInterface(interface)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
+	}
+
+	policy = __SCNetworkInterfaceGetConfiguration(interface, kSCEntNetQoSMarkingPolicy);
+	if (policy == NULL) {
+		_SCErrorSet(kSCStatusOK);
+	}
+
+	return policy;
+}
+
+Boolean
+SCNetworkInterfaceSetQoSMarkingPolicy(SCNetworkInterfaceRef interface, CFDictionaryRef policy)
+{
+	Boolean		ok;
+
+	if (!isA_SCNetworkInterface(interface)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
+	ok = __SCNetworkInterfaceSetConfiguration(interface, kSCEntNetQoSMarkingPolicy, policy, FALSE);
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkInterfaceSetQoSMarkingPolicy(): %@ -> %@",
+		       interface,
+		       policy != NULL ? policy : (CFDictionaryRef)CFSTR("NULL"));
+	}
+
+	return ok;
+}
+
+
 #pragma mark -
 #pragma mark SCNetworkInterface [internal] SPIs
 
@@ -7232,6 +7752,7 @@ __SCNetworkInterfaceCreateCopy(CFAllocatorRef		allocator,
 			       SCPreferencesRef		prefs,
 			       CFStringRef		serviceID)
 {
+#pragma unused(allocator)
 	SCNetworkInterfacePrivateRef		oldPrivate	= (SCNetworkInterfacePrivateRef)interface;
 	SCNetworkInterfacePrivateRef		newPrivate;
 
@@ -7291,6 +7812,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);
 	}
@@ -7301,13 +7825,18 @@ __SCNetworkInterfaceCreateCopy(CFAllocatorRef		allocator,
 	if (oldPrivate->overrides != NULL) {
 		newPrivate->overrides		= CFDictionaryCreateMutableCopy(NULL, 0, oldPrivate->overrides);
 	}
-	newPrivate->modemIsV92			= oldPrivate->modemIsV92;
 	if (oldPrivate->type != NULL) {
 		newPrivate->type		= CFRetain(oldPrivate->type);
 	}
 	if (oldPrivate->unit != NULL) {
 		newPrivate->unit		= CFRetain(oldPrivate->unit);
 	}
+	if (oldPrivate->family != NULL) {
+		newPrivate->family		= CFRetain(oldPrivate->family);
+	}
+	if (oldPrivate->subfamily != NULL) {
+		newPrivate->subfamily		= CFRetain(oldPrivate->subfamily);
+	}
 	if (oldPrivate->usb.name != NULL) {
 		newPrivate->usb.name		= CFRetain(oldPrivate->usb.name);
 	}
@@ -7472,6 +8001,7 @@ __SCNetworkInterfaceSetDeepConfiguration(SCNetworkSetRef set, SCNetworkInterface
 	for (i = 0; interface != NULL; i++) {
 		CFStringRef	defaultType;
 		CFDictionaryRef interfaceConfiguration;
+		Boolean		ok;
 
 		interfaceConfiguration = (configs != NULL) ? CFArrayGetValueAtIndex(configs, i) : NULL;
 
@@ -7487,20 +8017,20 @@ __SCNetworkInterfaceSetDeepConfiguration(SCNetworkSetRef set, SCNetworkInterface
 			}
 			if (set == NULL) {
 				// if service is not associated with the set
-				if (!__SCNetworkInterfaceSetConfiguration(interface, defaultType, config, TRUE)) {
-					SCLog(TRUE, LOG_DEBUG,
-						  CFSTR("__SCNetworkInterfaceSetDeepConfiguration __SCNetworkInterfaceSetConfiguration() failed, interface=%@, type=%@"),
-						  interface,
-						  defaultType);
-				}
+				ok = __SCNetworkInterfaceSetConfiguration(interface, defaultType, config, TRUE);
 			} else {
 				// apply default configuration to this set
-				if (!__SCNetworkInterfaceSetDefaultConfiguration(set, interface, defaultType, config, TRUE)) {
-					SCLog(TRUE, LOG_DEBUG,
-						  CFSTR("__SCNetworkInterfaceSetDeepConfiguration __SCNetworkInterfaceSetDefaultConfiguration() failed, interface=%@, type=%@"),
-						  interface,
-						  defaultType);
-				}
+				ok = __SCNetworkInterfaceSetDefaultConfiguration(set, interface, defaultType, config, TRUE);
+			}
+			if (ok) {
+				SC_log(LOG_DEBUG, "__SCNetworkInterfaceSetDeepConfiguration(): %@, %@ -> %@",
+				       interface,
+				       defaultType,
+				       config != NULL ? config : (CFDictionaryRef)CFSTR("NULL"));
+			} else {
+				SC_log(LOG_INFO, "__SCNetworkInterfaceSetDeepConfiguration() failed, interface=%@, type=%@",
+				       interface,
+				       defaultType);
 			}
 
 			extendedTypes = extendedConfigurationTypes(interface);
@@ -7514,15 +8044,20 @@ __SCNetworkInterfaceSetDeepConfiguration(SCNetworkSetRef set, SCNetworkInterface
 
 					extendedType = CFArrayGetValueAtIndex(extendedTypes, j);
 					config = (interfaceConfiguration != NULL) ? CFDictionaryGetValue(interfaceConfiguration, extendedType)
-					: NULL;
+										  : NULL;
 					if (config == (CFDictionaryRef)kCFNull) {
 						config = NULL;
 					}
-					if (!__SCNetworkInterfaceSetConfiguration(interface, extendedType, config, TRUE)) {
-						SCLog(TRUE, LOG_DEBUG,
-						      CFSTR("__SCNetworkInterfaceSetDeepConfiguration __SCNetworkInterfaceSetConfiguration() failed, interface=%@, type=%@"),
-						      interface,
-						      defaultType);
+					ok = __SCNetworkInterfaceSetConfiguration(interface, extendedType, config, TRUE);
+					if (ok) {
+						SC_log(LOG_DEBUG, "__SCNetworkInterfaceSetDeepConfiguration(): %@, %@ -> %@",
+						       interface,
+						       extendedType,
+						       config != NULL ? config : (CFDictionaryRef)CFSTR("NULL"));
+					} else {
+						SC_log(LOG_INFO, "__SCNetworkInterfaceSetDeepConfiguration() failed, interface=%@, type=%@",
+						       interface,
+						       extendedType);
 					}
 				}
 
@@ -7559,7 +8094,7 @@ _SCNetworkInterfaceCopyActive(SCDynamicStoreRef store, CFStringRef bsdName)
 }
 
 
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 SCNetworkServicePrimaryRank
 SCNetworkInterfaceGetPrimaryRank(SCNetworkInterfaceRef interface)
 {
@@ -7611,11 +8146,141 @@ SCNetworkInterfaceSetPrimaryRank(SCNetworkInterfaceRef interface,
 						       ifName,
 						       newRank);
 }
-#else 	// !TARGET_IPHONE_SIMULATOR
+
+Boolean
+SCNetworkInterfaceGetDisableUntilNeeded(SCNetworkInterfaceRef interface)
+{
+	Boolean				disable_until_needed = FALSE;
+	CFNumberRef			disable_prop = NULL;
+	CFIndex				interfaceIndex;
+	SCNetworkInterfacePrivateRef 	interfacePrivate
+		= (SCNetworkInterfacePrivateRef)interface;
+	CFArrayRef			path_list;
+
+	if (interfacePrivate->prefs == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return (FALSE);
+	}
+	interfaceIndex = findPerInterfaceConfiguration(interface);
+	if (interfaceIndex == kCFNotFound) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return (FALSE);
+	}
+	path_list = copyPerInterfaceConfigurationPaths(interfacePrivate, NULL);
+	if (path_list != NULL) {
+		CFDictionaryRef	config;
+		CFStringRef	path = CFArrayGetValueAtIndex(path_list, 0);
+
+		config = __getPrefsConfiguration(interfacePrivate->prefs, path);
+		CFRelease(path_list);
+		if (config != NULL) {
+			int	disable = 0;
+
+			disable_prop = CFDictionaryGetValue(config, kSCPropDisableUntilNeeded);
+			disable_prop = isA_CFNumber(disable_prop);
+			if (disable_prop != NULL) {
+				if (CFNumberGetValue(disable_prop, kCFNumberIntType, &disable)) {
+					disable_until_needed = (disable != 0) ? TRUE : FALSE;
+				}
+				else {
+					/* invalid property, ignore it */
+					disable_prop = NULL;
+				}
+			}
+		}
+	}
+	if (disable_prop == NULL) {
+		disable_until_needed
+			= _SCNetworkInterfaceIsTethered(interface);
+	}
+	_SCErrorSet(kSCStatusOK);
+	return (disable_until_needed);
+}
+
+Boolean
+__SCNetworkInterfaceSetDisableUntilNeededValue(SCNetworkInterfaceRef interface, CFTypeRef disable)
+{
+	CFIndex				count;
+	CFIndex				i;
+	CFIndex				interfaceIndex;
+	SCNetworkInterfacePrivateRef 	interfacePrivate
+		= (SCNetworkInterfacePrivateRef)interface;
+	Boolean				ok = TRUE;
+	CFArrayRef			path_list;
+
+	if (interfacePrivate->prefs == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return (FALSE);
+	}
+	if ((disable != NULL) && !isA_CFNumber(disable)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return (FALSE);
+	}
+	interfaceIndex = findPerInterfaceConfiguration(interface);
+	if (interfaceIndex == kCFNotFound) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return (FALSE);
+	}
+	path_list = copyPerInterfaceConfigurationPaths(interfacePrivate, NULL);
+	if (path_list == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return (FALSE);
+	}
+	count = CFArrayGetCount(path_list);
+	for (i = 0; i < count; i++) {
+		CFDictionaryRef		config;
+		CFMutableDictionaryRef	new_config;
+		CFStringRef		path = CFArrayGetValueAtIndex(path_list, i);
+
+		config = __getPrefsConfiguration(interfacePrivate->prefs, path);
+		if (config != NULL) {
+			new_config
+				= CFDictionaryCreateMutableCopy(NULL, 0, config);
+		} else {
+			new_config
+				= CFDictionaryCreateMutable(NULL, 0,
+							    &kCFTypeDictionaryKeyCallBacks,
+							    &kCFTypeDictionaryValueCallBacks);
+		}
+		if (disable != NULL) {
+			CFDictionarySetValue(new_config, kSCPropDisableUntilNeeded, disable);
+		} else {
+			CFDictionaryRemoveValue(new_config, kSCPropDisableUntilNeeded);
+		}
+		ok = __setPrefsConfiguration(interfacePrivate->prefs,
+					     path,
+					     (CFDictionaryGetCount(new_config) > 0) ? new_config : NULL,
+					     FALSE);
+		CFRelease(new_config);
+		if (!ok) {
+			break;
+		}
+	}
+	CFRelease(path_list);
+	return (ok);
+}
+
+Boolean
+SCNetworkInterfaceSetDisableUntilNeeded(SCNetworkInterfaceRef interface, Boolean disable)
+{
+	Boolean		ok;
+	const int	one	= 1;
+	CFNumberRef     num;
+	const int	zero	= 0;
+
+	num = CFNumberCreate(NULL, kCFNumberIntType, disable ? &one : &zero);
+	ok = __SCNetworkInterfaceSetDisableUntilNeededValue(interface, num);
+	CFRelease(num);
+
+	return ok;
+}
+
+#else 	// !TARGET_OS_SIMULATOR
 
 SCNetworkServicePrimaryRank
 SCNetworkInterfaceGetPrimaryRank(SCNetworkInterfaceRef interface)
 {
+#pragma unused(interface)
 	return (kSCNetworkServicePrimaryRankDefault);
 }
 
@@ -7623,33 +8288,59 @@ Boolean
 SCNetworkInterfaceSetPrimaryRank(SCNetworkInterfaceRef interface,
 				 SCNetworkServicePrimaryRank newRank)
 {
+#pragma unused(interface)
+#pragma unused(newRank)
 	_SCErrorSet(kSCStatusInvalidArgument);
 	return (FALSE);
 }
 
-#endif	// !TARGET_IPHONE_SIMULATOR
+Boolean
+SCNetworkInterfaceGetDisableUntilNeeded(SCNetworkInterfaceRef interface)
+{
+#pragma unused(interface)
+	return (FALSE);
+}
+
+Boolean
+__SCNetworkInterfaceSetDisableUntilNeededValue(SCNetworkInterfaceRef interface, CFTypeRef disable)
+{
+#pragma unused(interface)
+#pragma unused(disable)
+	return (FALSE);
+}
+
+Boolean
+SCNetworkInterfaceSetDisableUntilNeeded(SCNetworkInterfaceRef interface, Boolean disable)
+{
+#pragma unused(interface)
+#pragma unused(disable)
+	_SCErrorSet(kSCStatusInvalidArgument);
+	return (FALSE);
+}
+
+#endif	// !TARGET_OS_SIMULATOR
 
 
 __private_extern__
 CFArrayRef  // SCNetworkInterfaceRef
-__SCNetworkInterfaceCopyStoredWithPreferences (SCPreferencesRef ni_prefs)
+__SCNetworkInterfaceCopyStoredWithPreferences(SCPreferencesRef ni_prefs)
 {
-	CFMutableArrayRef interfaceList = NULL;
+	CFStringRef		defaultNetworkInterfacePath	= NULL;
 	CFArrayRef		if_list;
-	SCNetworkInterfaceRef interfaceNamer = NULL;
-	CFStringRef defaultNetworkInterfacePath = NULL;
+	CFMutableArrayRef	interfaceList			= NULL;
+	SCNetworkInterfaceRef	interfaceNamer			= NULL;
 
 	/* initialize runtime */
 	pthread_once(&initialized, __SCNetworkInterfaceInitialize);
 
 	if (ni_prefs == NULL) {
 		defaultNetworkInterfacePath = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS);
+		assert(defaultNetworkInterfacePath != NULL);
 		ni_prefs = SCPreferencesCreate(NULL, CFSTR("SCNetworkInterface"), defaultNetworkInterfacePath);
 	}
 
 	if_list = SCPreferencesGetValue(ni_prefs, INTERFACES);
-
-	if (isA_CFArray(if_list) != NULL) {
+	if (isA_CFArray(if_list)) {
 		CFIndex	i;
 		CFIndex	n	= CFArrayGetCount(if_list);
 
@@ -7659,7 +8350,7 @@ __SCNetworkInterfaceCopyStoredWithPreferences (SCPreferencesRef ni_prefs)
 
 			dict = CFArrayGetValueAtIndex(if_list, i);
 			if (isA_CFDictionary(dict) != NULL) {
-				interfaceNamer = __SCNetworkInterfaceCreateWithStorageEntity(NULL, dict, ni_prefs);
+				interfaceNamer = __SCNetworkInterfaceCreateWithStorageEntity(NULL, dict);
 
 				if (interfaceNamer != NULL) {
 					CFArrayAppendValue(interfaceList, interfaceNamer);
@@ -7687,11 +8378,12 @@ __SCNetworkInterfaceSaveStoredWithPreferences(SCPreferencesRef prefs, CFArrayRef
 
 	if (prefs == NULL) {    // TODO: Get the default preferences on the system
 		defaultNetworkInterfacePath = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS);
+		assert(defaultNetworkInterfacePath != NULL);
 		prefs = SCPreferencesCreate(NULL, CFSTR("SCNetworkInterface"), defaultNetworkInterfacePath);
 	}
 
 	if (isA_CFArray(interfacesToSave) == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("interfacesToSave is NULL or not of correct type"));
+		SC_log(LOG_INFO, "No interfaces to save");
 		goto done;
 	}
 	SCPreferencesSetValue(prefs, INTERFACES, interfacesToSave);
@@ -7713,10 +8405,10 @@ __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(CFAllocatorRef allocator
 	CFArrayRef if_list;
 	SCNetworkInterfaceRef interface = NULL;
 	CFStringRef defaultNetworkInterfacePath;
-	
+
 	/* initialize runtime */
 	pthread_once(&initialized, __SCNetworkInterfaceInitialize);
-	
+
 	if (ni_prefs == NULL) {
 		defaultNetworkInterfacePath = CFStringCreateWithFormat(allocator, NULL, CFSTR("%@/%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS);
 		ni_prefs = SCPreferencesCreate(allocator, CFSTR("SCNetworkInterface"), defaultNetworkInterfacePath);
@@ -7725,33 +8417,33 @@ __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(CFAllocatorRef allocator
 	else {
 		CFRetain(ni_prefs);
 	}
-	
+
 	if_list = SCPreferencesGetValue(ni_prefs, INTERFACES);
-	
+
 	if (isA_CFArray(if_list) != NULL) {
 		CFIndex idx;
 		CFIndex count = CFArrayGetCount(if_list);
-		
+
 		for (idx = 0; idx < count; idx++) {
 			CFDictionaryRef dict;
 			CFStringRef tmp_bsdName;
-			
+
 			dict = CFArrayGetValueAtIndex(if_list, idx);
 			if (isA_CFDictionary(dict) == NULL) {
 				continue;
 			}
-			
+
 			tmp_bsdName = CFDictionaryGetValue(dict, CFSTR(kSCNetworkInterfaceBSDName));
 			if (tmp_bsdName == NULL) {
 				continue;
 			}
-			if (CFEqual(bsdName, tmp_bsdName) == TRUE) {
-				interface = __SCNetworkInterfaceCreateWithStorageEntity(allocator, dict, ni_prefs);
+			if (CFEqual(bsdName, tmp_bsdName)) {
+				interface = __SCNetworkInterfaceCreateWithStorageEntity(allocator, dict);
 				break;
 			}
 		}
 	}
-	
+
 	CFRelease(ni_prefs);
 	return interface;
 }
@@ -7766,9 +8458,8 @@ __SCNetworkInterfaceCreateMappingUsingBSDName(CFArrayRef interfaces)
 	CFIndex count;
 
 	count = CFArrayGetCount(interfaces);
-
 	if (count == 0) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateMappingUsingBSDName: Interface count is 0"));
+		SC_log(LOG_INFO, "No interfaces");
 		return NULL;
 	}
 	mappingBSDToInterface = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
@@ -7778,7 +8469,7 @@ __SCNetworkInterfaceCreateMappingUsingBSDName(CFArrayRef interfaces)
 
 		bsdName = SCNetworkInterfaceGetBSDName(interface);
 		if (isA_CFString(bsdName) == NULL) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateMappingUsingBSDName: BSDName is NULL or not of the correct type"));
+			SC_log(LOG_INFO, "No BSD name");
 			continue;
 		}
 		CFDictionaryAddValue(mappingBSDToInterface, bsdName, interface);
@@ -7786,8 +8477,28 @@ __SCNetworkInterfaceCreateMappingUsingBSDName(CFArrayRef interfaces)
 	if (CFDictionaryGetCount(mappingBSDToInterface) == 0) {
 		CFRelease(mappingBSDToInterface);
 		mappingBSDToInterface = NULL;
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateMappingUsingBSDName: Setting mappingBSDToInterface to NULL since it doesn't contain any data"));
+		SC_log(LOG_INFO, "No mappings");
 	}
 
 	return mappingBSDToInterface;
 }
+
+__private_extern__ Boolean
+__SCNetworkInterfaceEntityIsPPTP(CFDictionaryRef entity)
+{
+	CFStringRef intfSubtype;
+
+	if (entity == NULL) {
+		return FALSE;
+	}
+
+	intfSubtype = CFDictionaryGetValue(entity, kSCPropNetInterfaceSubType);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+	if (intfSubtype != NULL && CFEqual(intfSubtype, kSCValNetInterfaceSubTypePPTP)) {
+		return TRUE;
+	}
+#pragma GCC diagnostic pop
+
+	return FALSE;
+}
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkInterfaceProvider.c b/src/configd/SystemConfiguration.fproj/SCNetworkInterfaceProvider.c
new file mode 100644
index 000000000..65074b295
--- /dev/null
+++ b/src/configd/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/src/configd/SystemConfiguration.fproj/SCNetworkInterfaceProvider.h b/src/configd/SystemConfiguration.fproj/SCNetworkInterfaceProvider.h
new file mode 100644
index 000000000..da5c9d67d
--- /dev/null
+++ b/src/configd/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/src/configd/SystemConfiguration.fproj/SCNetworkMigration.c b/src/configd/SystemConfiguration.fproj/SCNetworkMigration.c
index b56c24607..27c7d8b37 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkMigration.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkMigration.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2014-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@
  */
 
@@ -30,13 +30,10 @@
 
 #include 
 #include 
-#include 
-#include 
-#include 
+#include "SCNetworkConfigurationInternal.h"
 #include "SCPreferencesInternal.h"
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -53,9 +50,14 @@
 #define PREFERENCES_PLIST_INDEX		0
 #define NETWORK_INTERFACES_PLIST_INDEX	1
 
+#define kProtocolType			CFSTR("Protocol Type")
+#define kProtocolConfiguration		CFSTR("Protocol Configuration")
+#define kProtocolEnabled		CFSTR("Protocol Enabled")
+
 
 const CFStringRef kSCNetworkConfigurationMigrationActionKey = CFSTR("MigrationActionKey");
 const CFStringRef kSCNetworkConfigurationRepair = CFSTR("ConfigurationRepair");
+
 #if	!TARGET_OS_IPHONE
 static CFDictionaryRef
 _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(SCPreferencesRef prefs);
@@ -65,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);
 
@@ -77,23 +80,24 @@ _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(CFURLRef baseURL, CFURLRef
 {
 	if (baseURL != NULL) {
 		CFRetain(baseURL);
-	}
-	else {
+	} else {
 		baseURL = CFURLCreateFromFileSystemRepresentation(NULL,
 								  (UInt8*)PREFS_DEFAULT_DIR_PLIST,
-								  sizeof(PREFS_DEFAULT_DIR_PLIST),
+								  sizeof(PREFS_DEFAULT_DIR_PLIST) - 1,
 								  TRUE);
 	}
 
 	*prefs = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL,
-								      (UInt8*)PREFS_DEFAULT_CONFIG_PLIST,
-								      sizeof(PREFS_DEFAULT_CONFIG_PLIST) - 1,
-								      FALSE, baseURL);
+								       (UInt8*)PREFS_DEFAULT_CONFIG_PLIST,
+								       sizeof(PREFS_DEFAULT_CONFIG_PLIST) - 1,
+								       FALSE,
+								       baseURL);
 
 	*interfaces = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL,
-									   (UInt8*)NETWORK_INTERFACES_PREFS_PLIST,
-									   sizeof(NETWORK_INTERFACES_PREFS_PLIST) - 1,
-									   FALSE, baseURL);
+									    (UInt8*)NETWORK_INTERFACES_PREFS_PLIST,
+									    sizeof(NETWORK_INTERFACES_PREFS_PLIST) - 1,
+									    FALSE,
+									    baseURL);
 	CFRelease(baseURL);
 	return;
 }
@@ -101,11 +105,12 @@ _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(CFURLRef baseURL, CFURLRef
 CFArrayRef
 _SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options)
 {
+#pragma unused(options)
 	CFURLRef interfaces;
 	CFMutableArrayRef migrationPaths = NULL;
 	CFURLRef prefs;
-	
-	if (getenv(INSTALL_ENVIRONMENT) != NULL) {
+
+	if (_SC_isInstallEnvironment()) {
 		_sc_debug = 1;
 	}
 	_SCNetworkConfigurationCopyMigrationPathsWithBaseURL(NULL, &prefs, &interfaces);
@@ -122,39 +127,38 @@ _SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options)
 static Boolean
 _SCNetworkConfigurationRemoveConfigurationFiles(CFURLRef configDir)
 {
-	
+
 	char configPathString[PATH_MAX];
 	CFURLRef configPathURL = NULL;
 	char configNetworkInterfacesPathString[PATH_MAX];
 	CFURLRef configNetworkInterfacesPathURL = NULL;
-	
+
 	_SCNetworkConfigurationCopyMigrationPathsWithBaseURL(configDir, &configPathURL, &configNetworkInterfacesPathURL);
-	
-	if(CFURLGetFileSystemRepresentation(configPathURL, TRUE, (UInt8*)configPathString, sizeof(configPathString)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: configPathString is NULL"));
-	}
-	else {
-		if (remove(configPathString) != 0) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: Removing file failed from: %s. Error is %d"), configPathString, errno);
+
+	if(!CFURLGetFileSystemRepresentation(configPathURL,
+					     TRUE,
+					     (UInt8*)configPathString,
+					     sizeof(configPathString))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", configPathURL);
+	} else {
+		if ((remove(configPathString) != 0) && (errno != ENOENT)) {
+			SC_log(LOG_INFO, "remove(\"%s\") failed: %s", configPathString, strerror(errno));
 		}
 	}
-	
-	if(CFURLGetFileSystemRepresentation(configNetworkInterfacesPathURL, TRUE, (UInt8*)configNetworkInterfacesPathString, sizeof(configNetworkInterfacesPathString)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: configNetwork"));
-	}
-	else {
-		if (remove(configNetworkInterfacesPathString) != 0) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: Removing file failed from: %s. Error is %d"), configNetworkInterfacesPathString, errno);
+	CFRelease(configPathURL);
+
+	if(!CFURLGetFileSystemRepresentation(configNetworkInterfacesPathURL,
+					     TRUE,
+					     (UInt8*)configNetworkInterfacesPathString,
+					     sizeof(configNetworkInterfacesPathString))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", configNetworkInterfacesPathURL);
+	} else {
+		if ((remove(configNetworkInterfacesPathString) != 0) && (errno != ENOENT)) {
+			SC_log(LOG_INFO, "remove(\"%s\") failed: %s", configNetworkInterfacesPathString, strerror(errno));
 		}
 	}
-	
-	if (configPathURL != NULL) {
-		CFRelease(configPathURL);
-	}
-	if (configNetworkInterfacesPathURL != NULL) {
-		CFRelease(configNetworkInterfacesPathURL);
-	}
-	
+	CFRelease(configNetworkInterfacesPathURL);
+
 	return TRUE;
 }
 
@@ -178,58 +182,76 @@ SCNetworkConfigurationCopyConfigurationFiles(CFURLRef	configDir,
 	CFURLRef targetPathURL = NULL;
 
 	_SCNetworkConfigurationCopyMigrationPathsWithBaseURL(targetDir, &targetPathURL, &targetNetworkInterfacesPathURL);
-	
-	if (CFURLGetFileSystemRepresentation(targetPathURL, TRUE, (UInt8*)targetPathString, sizeof(targetPathString)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: targetPathString is NULL"));
+
+	if (!CFURLGetFileSystemRepresentation(targetPathURL,
+					      TRUE,
+					      (UInt8*)targetPathString,
+					      sizeof(targetPathString))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", targetPathURL);
 		goto done;
 	}
-	
-	if (CFURLGetFileSystemRepresentation(targetNetworkInterfacesPathURL, TRUE, (UInt8*)targetNetworkInterfacesPathString, sizeof(targetNetworkInterfacesPathString)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: targetNetworkInterfacesPathString is NULL"));
+	if (!CFURLGetFileSystemRepresentation(targetNetworkInterfacesPathURL,
+					      TRUE,
+					      (UInt8*)targetNetworkInterfacesPathString,
+					      sizeof(targetNetworkInterfacesPathString))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", targetNetworkInterfacesPathURL);
 		goto done;
 	}
-	
+
 	if (configDir == NULL) {
 		removeTargetFiles = TRUE;
 		success = TRUE;
 		goto done;
 	}
+
 	_SCNetworkConfigurationCopyMigrationPathsWithBaseURL(configDir, &preferencesPathURL, &networkInterfacesPathURL);
 
-	if (CFURLGetFileSystemRepresentation(preferencesPathURL, TRUE, (UInt8*)preferencesPathString, sizeof(preferencesPathString)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: preferencesPathString is NULL"));
+	if (!CFURLGetFileSystemRepresentation(preferencesPathURL,
+					      TRUE,
+					      (UInt8*)preferencesPathString,
+					      sizeof(preferencesPathString))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", preferencesPathURL);
 		goto done;
 	}
-
-
-	if (CFURLGetFileSystemRepresentation(networkInterfacesPathURL, TRUE, (UInt8*)networkInterfacesPathString, sizeof(networkInterfacesPathString)) == FALSE) {
-		SCLog(_sc_debug, LOG_DEBUG, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: networkInterfacePathString is NULL"));
+	if (!CFURLGetFileSystemRepresentation(networkInterfacesPathURL,
+					      TRUE,
+					      (UInt8*)networkInterfacesPathString,
+					      sizeof(networkInterfacesPathString))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", networkInterfacesPathURL);
 		goto done;
 	}
-	
+
 	state = copyfile_state_alloc();
-	if ((error = copyfile(preferencesPathString, targetPathString, state, COPYFILE_ALL)) != 0) {
-		SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: Copying failed from:%s to %s. Error is %d"), preferencesPathString, targetPathString, errno);
+	error = copyfile(preferencesPathString, targetPathString, state, COPYFILE_ALL);
+	if (error != 0) {
+		SC_log(LOG_NOTICE, "copyFile(\"%s\", \"%s\", ...) failed: %s",
+		       preferencesPathString,
+		       targetPathString,
+		       strerror(errno));
 		copyfile_state_free(state);
 		removeTargetFiles = TRUE;
 		goto done;
 	}
 	copyfile_state_free(state);
-	chmod(targetPathString, mode);
+	(void)chmod(targetPathString, mode);
 
 	networkInterfacesState = copyfile_state_alloc();
-	if ((error = copyfile(networkInterfacesPathString, targetNetworkInterfacesPathString, networkInterfacesState, COPYFILE_ALL)) != 0) {
-		SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: Copying failed from:%s to %s. Error is %d"), networkInterfacesPathString, targetNetworkInterfacesPathString, errno);
+	error = copyfile(networkInterfacesPathString, targetNetworkInterfacesPathString, networkInterfacesState, COPYFILE_ALL);
+	if (error != 0) {
+		SC_log(LOG_NOTICE, "copyFile(\"%s\", \"%s\", ...) failed: %s",
+		       networkInterfacesPathString,
+		       targetNetworkInterfacesPathString,
+		       strerror(errno));
 		copyfile_state_free(networkInterfacesState);
 		removeTargetFiles = TRUE;
 		goto done;
 	}
 	copyfile_state_free(networkInterfacesState);
-	chmod(targetNetworkInterfacesPathString, mode);
+	(void)chmod(targetNetworkInterfacesPathString, mode);
 
 	success = TRUE;
 done:
-	if (removeTargetFiles == TRUE) {
+	if (removeTargetFiles) {
 		_SCNetworkConfigurationRemoveConfigurationFiles(targetDir);
 	}
 	if (preferencesPathURL != NULL) {
@@ -262,34 +284,34 @@ _SCNetworkConfigurationMakePathIfNeeded(CFURLRef pathURL)
 	struct stat sb;
 	Boolean success = FALSE;
 
-	if (CFURLGetFileSystemRepresentation(pathURL, TRUE, (UInt8 *)path, sizeof(path)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMakePathIfNeeded: Could not get character array from target string"));
+	if (!CFURLGetFileSystemRepresentation(pathURL, TRUE, (UInt8 *)path, sizeof(path))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", pathURL);
 		return success;
 	}
-	SCLog(TRUE, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMakePathIfNeeded: Creating path: %s"), path);
-	
+	SC_log(LOG_INFO, "creating path: %s", path);
+
 	newmask = S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH;
 
 	slen = strlen(path);
 
-	strlcpy( thepath, path, slen+1);
+	strlcpy(thepath, path, slen+1);
 	c = thepath;
-	if ( *c == '/' )
+	if (*c == '/')
 		c++;
-	for(  ; !success; c++){
-		if ( (*c == '/') || ( *c == '\0' )){
-			if ( *c == '\0' )
+	for(; !success; c++){
+		if ((*c == '/') || (*c == '\0')){
+			if (*c == '\0')
 				success = TRUE;
 			else
 				*c = '\0';
-			if ( mkdir( thepath, newmask) ){
-				if ( errno == EEXIST || errno == EISDIR){
-					if ( stat(thepath, &sb) < 0){
-						printf("stat returned value < 0\n");
+			if (mkdir(thepath, newmask)){
+				if (errno == EEXIST || errno == EISDIR){
+					if (stat(thepath, &sb) < 0){
+						SC_log(LOG_ERR, "stat returned value < 0");
 						break;
 					}
 				} else {
-					printf("received error: %s\n", strerror(errno));
+					SC_log(LOG_ERR, "received error: %s", strerror(errno));
 					break;
 				}
 			}
@@ -305,40 +327,25 @@ __SCNetworkCreateDefaultPref(CFStringRef prefsID)
 	SCPreferencesRef prefs;
 	SCNetworkSetRef currentSet;
 	CFStringRef model;
-	
+
 	prefs = SCPreferencesCreate(NULL, PLUGIN_ID, prefsID);
 	if (prefs == NULL) {
 		return NULL;
 	}
-	
+
 	currentSet = SCNetworkSetCopyCurrent(prefs);
 	if (currentSet == NULL) {
-		CFBundleRef bundle;
-		CFStringRef setName = NULL;
-		
-		currentSet = SCNetworkSetCreate(prefs);
-		bundle = _SC_CFBundleGet();
-		if (bundle != NULL) {
-			setName = CFBundleCopyLocalizedString(bundle,
-							      CFSTR("DEFAULT_SET_NAME"),
-							      CFSTR("Automatic"),
-							      NULL);
-		}
-		SCNetworkSetSetName(currentSet, (setName != NULL) ? setName : CFSTR("Automatic"));
-		SCNetworkSetSetCurrent(currentSet);
-		if (setName != NULL) {
-			CFRelease(setName);
-		}
+		currentSet = _SCNetworkSetCreateDefault(prefs);
 	}
 	SCNetworkSetEstablishDefaultConfiguration(currentSet);
 	CFRelease(currentSet);
-	
+
 	model = SCPreferencesGetValue(prefs, MODEL);
 	if (model == NULL) {
 		model = _SC_hw_model(FALSE);
 		SCPreferencesSetValue(prefs, MODEL, model);
 	}
-	
+
 	return prefs;
 }
 
@@ -351,53 +358,51 @@ __SCNetworkCreateDefaultNIPrefs(CFStringRef prefsID)
 	CFArrayRef networkInterfaces;
 	SCPreferencesRef ni_prefs;
 	CFComparisonResult res;
-	
-	
-	networkInterfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface();
-	
+
+	networkInterfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(TRUE);
 	if (networkInterfaces == NULL) {
+		SC_log(LOG_NOTICE, "networkInterfaces is NULL");
 		return NULL;
 	}
+
 	if (prefsID == NULL) {
 		prefsID = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS);
-	}
-	else {
+	} else {
 		CFRetain(prefsID);
 	}
-	
-	ni_prefs = SCPreferencesCreate(NULL, PLUGIN_ID , prefsID);
+	ni_prefs = SCPreferencesCreate(NULL, PLUGIN_ID, prefsID);
 	CFRelease(prefsID);
-	
 	if (ni_prefs == NULL) {
+		SC_log(LOG_NOTICE, "ni_prefs is NULL");
 		goto done;
 	}
-	
+
 	interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(networkInterfaces); idx++) {
 		CFIndex idx2 = 0;
 		CFNumberRef if_type;
 		CFNumberRef if_unit;
 		SCNetworkInterfaceRef interface = CFArrayGetValueAtIndex(networkInterfaces, idx);
 		CFDictionaryRef interfaceEntity = __SCNetworkInterfaceCopyStorageEntity(interface);
-		
+
 		if (interfaceEntity == NULL) {
 			continue;
 		}
-		
+
 		if_type = _SCNetworkInterfaceGetIOInterfaceType(interface);
 		if_unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface);
-		
+
 		if ((if_type == NULL) || (if_unit == NULL)) {
 			CFRelease(interfaceEntity);
 			continue;
 		}
-		
+
 		for (idx2 = 0; idx2 < CFArrayGetCount(interfaces); idx2++) {
 			CFNumberRef db_type;
 			CFNumberRef db_unit;
 			CFDictionaryRef dict = CFArrayGetValueAtIndex(interfaces, idx2);
-			
+
 			db_type = CFDictionaryGetValue(dict, CFSTR(kIOInterfaceType));
 			db_unit = CFDictionaryGetValue(dict, CFSTR(kIOInterfaceUnit));
 			res = CFNumberCompare(if_type, db_type, NULL);
@@ -407,13 +412,13 @@ __SCNetworkCreateDefaultNIPrefs(CFStringRef prefsID)
 				break;
 			}
 		}
-		
+
 		CFArrayInsertValueAtIndex(interfaces, idx2, interfaceEntity);
 		CFRelease(interfaceEntity);
-		
+
 	}
 	SCPreferencesSetValue(ni_prefs, INTERFACES, interfaces);
-	
+
 	model = SCPreferencesGetValue(ni_prefs, MODEL);
 	if (model == NULL) {
 		model = _SC_hw_model(FALSE);
@@ -426,7 +431,7 @@ done:
 	if (networkInterfaces != NULL) {
 		CFRelease(networkInterfaces);
 	}
-	
+
 	return ni_prefs;
 }
 
@@ -438,6 +443,7 @@ CF_RETURNS_RETAINED
 CFArrayRef
 _SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, CFURLRef currentDir, CFURLRef targetDir, CFDictionaryRef options)
 {
+#pragma unused(options)
 	CFURLRef currentDirConfig = NULL;
 	CFURLRef currentSystemPath = NULL;
 	Boolean migrationComplete = FALSE;
@@ -445,14 +451,29 @@ _SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, CFURLRef currentDir,
 	Boolean removeTargetOnFailure = FALSE;
 	CFURLRef sourceDirConfig = NULL;
 	CFURLRef targetDirConfig = NULL;
-	
-	if (getenv(INSTALL_ENVIRONMENT) != NULL) {
+
+	if (_SC_isInstallEnvironment()) {
 		_sc_debug = 1;
 	}
 
+	if ((sourceDir != NULL) && !CFURLHasDirectoryPath(sourceDir)) {
+		SC_log(LOG_INFO, "sourceDir is not a directory: %@", sourceDir);
+		goto done;
+	}
+
+	if ((currentDir != NULL) && !CFURLHasDirectoryPath(currentDir)) {
+		SC_log(LOG_INFO, "currentDir is not a directory: %@", currentDir);
+		goto done;
+	}
+
+	if ((targetDir != NULL) && !CFURLHasDirectoryPath(targetDir)) {
+		SC_log(LOG_INFO, "targetDir is not a directory: %@", targetDir);
+		goto done;
+	}
+
 	// Both sourceDir and currentDir cannot be NULL because NULL value indicates using current system
 	if (sourceDir == NULL && currentDir == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Both sourceDir and currentDir are NULL"));
+		SC_log(LOG_INFO, "Both sourceDir and currentDir are NULL");
 		goto done;
 	}
 
@@ -463,8 +484,7 @@ _SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, CFURLRef currentDir,
 	// if either of the sourceDir or currentDir are NULL, then populate it with current system path
 	if (sourceDir == NULL) {
 		sourceDirConfig = CFRetain(currentSystemPath);
-	}
-	else {
+	} else {
 		sourceDirConfig = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, sourceDir);
 	}
 
@@ -474,27 +494,26 @@ _SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, CFURLRef currentDir,
 	// If the targetDir is not provided then migration will take place in currentDir
 	if (targetDir == NULL) {
 		targetDirConfig = CFRetain(currentSystemPath);
-	}
-	else {
+	} else {
 		targetDirConfig = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, targetDir);
 	}
 	// Source directory cannot be the same as Target Directory
 	if (CFEqual(sourceDirConfig, targetDirConfig)) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Source directory cannot be the same as target directory"));
+		SC_log(LOG_INFO, "Source directory cannot be the same as target directory");
 		goto done;
 	}
-	
-	if ((currentDirConfig == NULL) || (CFEqual(currentDirConfig, targetDirConfig) == FALSE)) {
-		if (_SCNetworkConfigurationMakePathIfNeeded(targetDirConfig) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Could not create target directory as expected"));
+
+	if ((currentDirConfig == NULL) || !CFEqual(currentDirConfig, targetDirConfig)) {
+		if (!_SCNetworkConfigurationMakePathIfNeeded(targetDirConfig)) {
+			SC_log(LOG_INFO, "Could not create target directory");
 			goto done;
 		}
 
-		if (SCNetworkConfigurationCopyConfigurationFiles(currentDirConfig, targetDirConfig) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Could not copy configuration files from %@ to %@"),
-			      currentDirConfig, targetDirConfig);
-		}
-		else if (currentDirConfig != NULL) {
+		if (!SCNetworkConfigurationCopyConfigurationFiles(currentDirConfig, targetDirConfig)) {
+			SC_log(LOG_INFO, "Could not copy configuration files from \"%@\" to \"%@\"",
+			       currentDirConfig,
+			       targetDirConfig);
+		} else if (currentDirConfig != NULL) {
 			removeTargetOnFailure = TRUE;	// Configuration files were copied over to target directory
 							// If migration failed, then we should remove those configuration
 							// files since current directory and target directory are not
@@ -503,21 +522,21 @@ _SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, CFURLRef currentDir,
 	}
 
 	// If both source and current configurations point to current system, then no migration needs to be done.
-	if ((currentDirConfig != NULL) && (CFEqual(sourceDirConfig, currentDirConfig) == TRUE)) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration:  both source and current configurations point to same path ... No migration needs to be done"));
+	if ((currentDirConfig != NULL) && CFEqual(sourceDirConfig, currentDirConfig)) {
+		SC_log(LOG_INFO, "No migration needed, source and current configurations point to same path");
 		migrationComplete = TRUE;
-	}
-	else {
+	} else {
 		migrationComplete = _SCNetworkConfigurationMigrateConfiguration(sourceDirConfig, targetDirConfig);
 	}
-	SCLog(TRUE, LOG_NOTICE, CFSTR("Migration %s"), migrationComplete ? "complete" : "failed");
-	if (migrationComplete == TRUE) {
+	if (migrationComplete) {
+		SC_log(LOG_NOTICE, "Migration complete");
 		paths = _SCNetworkConfigurationCopyMigrationPaths(NULL);
-	}
-	else {
+	} else {
+		SC_log(LOG_NOTICE, "Migration failed: %s", SCErrorString(SCError()));
+
 		// If migration fails, then remove configuration files from target config if they are
 		// copied from the current directory
-		if (removeTargetOnFailure == TRUE) {
+		if (removeTargetOnFailure) {
 			_SCNetworkConfigurationRemoveConfigurationFiles(targetDirConfig);
 		}
 	}
@@ -546,17 +565,16 @@ _SCNetworkConfigurationMigrateIsFilePresent(CFURLRef filePath)
 	struct stat statStruct = {0, };
 
 	if (filePath == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateIsFilePresent: filePath is NULL"));
+		SC_log(LOG_DEBUG, "filePath is NULL");
 		goto done;
 	}
 
-	if (CFURLGetFileSystemRepresentation(filePath, TRUE, (UInt8*) filePathStr, sizeof(filePathStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateIsFilePresent: Couldn't get file system representation\n"));
+	if (!CFURLGetFileSystemRepresentation(filePath, TRUE, (UInt8*) filePathStr, sizeof(filePathStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", filePath);
 		goto done;
 	}
 
 	statResult = stat(filePathStr, &statStruct);
-
 	if (statResult == 0) {
 		fileExists = TRUE;
 	}
@@ -575,7 +593,7 @@ __SCNetworkConfigurationMigrateConfigurationFilesPresent(CFURLRef baseURL, CFArr
 	CFURLRef prefs;
 
 	if (baseURL == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("__SCNetworkConfigurationMigrateConfigurationFilesPresent: baseURL is NULL"));
+		SC_log(LOG_INFO, "No base migration URL");
 		goto done;
 	}
 
@@ -592,14 +610,14 @@ __SCNetworkConfigurationMigrateConfigurationFilesPresent(CFURLRef baseURL, CFArr
 
 	if ((*migrationPaths == NULL) ||
 	    ((count = CFArrayGetCount(*migrationPaths)) == 0)) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("__SCNetworkConfigurationMigrateConfigurationFilesPresent: migrationPath is NULL or number of elements in migrationPath array is 0"));
+		SC_log(LOG_INFO, "No migration paths");
 		goto done;
 	}
 
 	for (CFIndex idx = 0; idx < count; idx++) {
 		filePath = CFArrayGetValueAtIndex(*migrationPaths, idx);
-		if (_SCNetworkConfigurationMigrateIsFilePresent(filePath) ==  FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("__SCNetworkConfigurationMigrateConfigurationFilesPresent: File not present: %@"), filePath);
+		if (!_SCNetworkConfigurationMigrateIsFilePresent(filePath)) {
+			SC_log(LOG_INFO, "Required migration file not present: %@", filePath);
 			goto done;
 		}
 	}
@@ -611,7 +629,7 @@ done:
 
 
 static CFMutableArrayRef
-_SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences     (SCPreferencesRef   ni_prefs, Boolean isBuiltin)
+_SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(SCPreferencesRef ni_prefs, Boolean isBuiltin)
 {
 	CFIndex count = 0;
 	SCNetworkInterfaceRef interface;
@@ -620,7 +638,7 @@ _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences     (SCPrefere
 
 	interfaceList = __SCNetworkInterfaceCopyStoredWithPreferences(ni_prefs);
 	if (interfaceList == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences: interfaceList is NULL"));
+		SC_log(LOG_INFO, "No interfaces");
 		goto done;
 	}
 
@@ -651,22 +669,20 @@ _SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType(SCPreferencesRef ni_prefs)
 	CFIndex count = 0;
 	CFArrayRef ifList = NULL;
 	SCNetworkInterfaceRef interface;
-	CFMutableDictionaryRef InterfaceTypeToMaxUnitMapping = NULL;
+	CFMutableDictionaryRef interfaceTypeToMaxUnitMapping = NULL;
 	CFNumberRef type;
 	CFNumberRef unit;
 
 	ifList = __SCNetworkInterfaceCopyStoredWithPreferences(ni_prefs);
-
 	if (ifList == NULL) {
-		SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType: ifList is NULL"));
-		return 0;
+		SC_log(LOG_INFO, "No interfaces");
+		return NULL;
 	}
 
-	InterfaceTypeToMaxUnitMapping = CFDictionaryCreateMutable(NULL, 0,
+	interfaceTypeToMaxUnitMapping = CFDictionaryCreateMutable(NULL, 0,
 								    &kCFTypeDictionaryKeyCallBacks,
 								    &kCFTypeDictionaryValueCallBacks);
 	count = CFArrayGetCount(ifList);
-
 	for (CFIndex idx = 0; idx < count; idx++) {
 		cfMaxUnit = NULL;
 		interface = CFArrayGetValueAtIndex(ifList, idx);
@@ -676,37 +692,35 @@ _SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType(SCPreferencesRef ni_prefs)
 		}
 
 		type  = _SCNetworkInterfaceGetIOInterfaceType(interface);
-
-		if (isA_CFNumber(type) == NULL) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType: type is NULL"));
+		if (!isA_CFNumber(type)) {
+			SC_log(LOG_INFO, "No interface type");
 			continue;
 		}
 
-		if (CFDictionaryContainsKey(InterfaceTypeToMaxUnitMapping, type) == FALSE) {
+		if (!CFDictionaryContainsKey(interfaceTypeToMaxUnitMapping, type)) {
 			int temp = 0;
 			cfMaxUnit = CFNumberCreate(NULL, kCFNumberIntType, &temp);
-			CFDictionaryAddValue(InterfaceTypeToMaxUnitMapping, type, cfMaxUnit);
+			CFDictionaryAddValue(interfaceTypeToMaxUnitMapping, type, cfMaxUnit);
 			CFRelease(cfMaxUnit);
 		}
 
 		if (cfMaxUnit == NULL) {
-			cfMaxUnit = CFDictionaryGetValue(InterfaceTypeToMaxUnitMapping, type);
+			cfMaxUnit = CFDictionaryGetValue(interfaceTypeToMaxUnitMapping, type);
 		}
 
 		unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface);
-
-		if (isA_CFNumber(unit) == NULL) {
+		if (!isA_CFNumber(unit)) {
 			continue;
 		}
 
 		if (CFNumberCompare(unit, cfMaxUnit, NULL) == kCFCompareGreaterThan) {
-			CFDictionarySetValue(InterfaceTypeToMaxUnitMapping, type, unit);
+			CFDictionarySetValue(interfaceTypeToMaxUnitMapping, type, unit);
 		}
 	}
 	if (ifList != NULL) {
 		CFRelease(ifList);
 	}
-	return InterfaceTypeToMaxUnitMapping;
+	return interfaceTypeToMaxUnitMapping;
 }
 
 static CFMutableDictionaryRef
@@ -722,14 +736,14 @@ _SCNetworkConfigurationCopyBuiltinMapping (SCPreferencesRef sourcePrefs, SCPrefe
 
 	sourceBuiltinInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(sourcePrefs, TRUE);
 	if (isA_CFArray(sourceBuiltinInterfaces) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyBuiltinMapping: sourceBuiltinInterfaces is NULL"));
+		SC_log(LOG_INFO, "No source built-in interfaces");
 		goto done;
 	}
 	sourceBuiltinInterfaceCount = CFArrayGetCount(sourceBuiltinInterfaces);
 
 	targetBuiltinInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(targetPrefs, TRUE);
 	if (isA_CFArray(targetBuiltinInterfaces) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyBuiltinMapping: targetBuiltinInterfaces is NULL"));
+		SC_log(LOG_INFO, "No target built-in interfaces");
 		goto done;
 	}
 	targetBuiltinInterfaceCount = CFArrayGetCount(targetBuiltinInterfaces);
@@ -740,7 +754,7 @@ _SCNetworkConfigurationCopyBuiltinMapping (SCPreferencesRef sourcePrefs, SCPrefe
 		for (CFIndex idx2 = 0; idx2 < targetBuiltinInterfaceCount; idx2++) {
 			targetInterface = CFArrayGetValueAtIndex(targetBuiltinInterfaces, idx2);
 
-			if (_SCNetworkConfigurationIsInterfaceNamerMappable(sourceInterface, targetInterface, FALSE) == TRUE) {
+			if (_SCNetworkConfigurationIsInterfaceNamerMappable(sourceInterface, targetInterface, FALSE)) {
 				if (builtinMapping == NULL) {
 					builtinMapping = CFDictionaryCreateMutable(NULL, 0,
 										   &kCFTypeDictionaryKeyCallBacks,
@@ -770,7 +784,7 @@ _SCNetworkConfigurationCopyExternalInterfaceMapping (SCPreferencesRef sourcePref
 	CFNumberRef cfMaxTargetUnit = NULL;
 	CFNumberRef currentInterfaceUnit = NULL;
 	CFMutableDictionaryRef externalMapping = NULL;
-	CFMutableDictionaryRef InterfaceTypeToMaxUnitMapping = NULL;
+	CFMutableDictionaryRef interfaceTypeToMaxUnitMapping = NULL;
 	int maxTargetUnit;
 	int newTargetUnit;
 	CFIndex sourceExternalInterfaceCount = 0;
@@ -783,23 +797,22 @@ _SCNetworkConfigurationCopyExternalInterfaceMapping (SCPreferencesRef sourcePref
 
 	sourceExternalInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(sourcePref, FALSE);
 	if (isA_CFArray(sourceExternalInterfaces) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: sourceExternalInterfaces is NULL"));
+		SC_log(LOG_INFO, "No source external interfaces");
 		goto done;
 	}
 	sourceExternalInterfaceCount = CFArrayGetCount(sourceExternalInterfaces);
-
 	if (sourceExternalInterfaceCount == 0) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: sourceExternalInterfaceCount is 0"));
+		SC_log(LOG_INFO, "No source external interfaces");
 		goto done;
 	}
 
 	targetExternalInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(targetPrefs, FALSE);
 	if (isA_CFArray(targetExternalInterfaces) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: targetExternalInterfaces is NULL"));
+		SC_log(LOG_INFO, "No target external interfaces");
 		goto done;
 	}
 
-	InterfaceTypeToMaxUnitMapping = _SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType(targetPrefs);
+	interfaceTypeToMaxUnitMapping = _SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType(targetPrefs);
 	externalMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 
 	// Map all external interfaces which exist in both source and target
@@ -811,37 +824,35 @@ _SCNetworkConfigurationCopyExternalInterfaceMapping (SCPreferencesRef sourcePref
 		for (CFIndex idx2 = 0; idx2 < targetExternalInterfaceCount; idx2++) {
 			targetInterface = CFArrayGetValueAtIndex(targetExternalInterfaces, idx2);
 
-			if (_SCNetworkConfigurationIsInterfaceNamerMappable(sourceInterface, targetInterface, TRUE) == TRUE) {
+			if (_SCNetworkConfigurationIsInterfaceNamerMappable(sourceInterface, targetInterface, TRUE)) {
 				CFDictionaryAddValue(externalMapping, sourceInterface, targetInterface);
 				CFArrayRemoveValueAtIndex(targetExternalInterfaces, idx2);
 				break;
 			}
 		}
 
-		if (CFDictionaryContainsKey(externalMapping, sourceInterface) == FALSE) {
+		if (!CFDictionaryContainsKey(externalMapping, sourceInterface)) {
 			// Create new mappings for external source interfaces which don't exist in the target
 			type = _SCNetworkInterfaceGetIOInterfaceType(sourceInterface);
 
-			cfMaxTargetUnit = CFDictionaryGetValue(InterfaceTypeToMaxUnitMapping, type);
+			cfMaxTargetUnit = CFDictionaryGetValue(interfaceTypeToMaxUnitMapping, type);
 			if (cfMaxTargetUnit != NULL) {
 				CFNumberGetValue(cfMaxTargetUnit, kCFNumberIntType, &maxTargetUnit);
 				newTargetUnit = maxTargetUnit + 1;
-			}
-			else {
+			} else {
 				newTargetUnit = 0;
 			}
 
 			cfMaxTargetUnit = CFNumberCreate(NULL, kCFNumberIntType, &newTargetUnit);
-			CFDictionarySetValue(InterfaceTypeToMaxUnitMapping, type, cfMaxTargetUnit);
+			CFDictionarySetValue(interfaceTypeToMaxUnitMapping, type, cfMaxTargetUnit);
 
 			targetInterface = (SCNetworkInterfaceRef)__SCNetworkInterfaceCreateCopy(NULL, sourceInterface, NULL, NULL);
 
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: sourceInterface: %p, target Interface: %p"), sourceInterface, targetInterface);
+			SC_log(LOG_DEBUG, "sourceInterface: %p, target Interface: %p", sourceInterface, targetInterface);
 
 			currentInterfaceUnit = _SCNetworkInterfaceGetIOInterfaceUnit(targetInterface);
-
-			if ((isA_CFNumber(currentInterfaceUnit) == NULL) ||
-			    (CFEqual(currentInterfaceUnit, cfMaxTargetUnit) == FALSE)) {
+			if (!isA_CFNumber(currentInterfaceUnit) ||
+			    !CFEqual(currentInterfaceUnit, cfMaxTargetUnit)) {
 				// Update the interface unit
 				__SCNetworkInterfaceSetIOInterfaceUnit(targetInterface, cfMaxTargetUnit);
 			}
@@ -861,8 +872,8 @@ done:
 	if (targetExternalInterfaces != NULL) {
 		CFRelease(targetExternalInterfaces);
 	}
-	if (InterfaceTypeToMaxUnitMapping != NULL) {
-		CFRelease(InterfaceTypeToMaxUnitMapping);
+	if (interfaceTypeToMaxUnitMapping != NULL) {
+		CFRelease(interfaceTypeToMaxUnitMapping);
 	}
 	return externalMapping;
 }
@@ -872,6 +883,7 @@ __SCNetworkConfigurationInterfaceNameIsEquiv(CFStringRef interfaceName1, CFStrin
 static Boolean
 _SCNetworkConfigurationIsInterfaceNamerMappable(SCNetworkInterfaceRef interface1, SCNetworkInterfaceRef interface2, Boolean bypassActive)
 {
+#pragma unused(bypassActive)
 	Boolean interface1IsBuiltin;
 	CFStringRef interface1Prefix;
 	CFStringRef interface1Type;
@@ -905,20 +917,20 @@ _SCNetworkConfigurationIsInterfaceNamerMappable(SCNetworkInterfaceRef interface1
 		return FALSE;
 	}
 
-	if (_SC_CFEqual(interface1Type, interface2Type) == FALSE) {
+	if (!_SC_CFEqual(interface1Type, interface2Type)) {
 		return FALSE;
 	}
 
-	if (_SC_CFEqual(interface1Prefix, interface2Prefix) == FALSE) {
+	if (!_SC_CFEqual(interface1Prefix, interface2Prefix)) {
 		return FALSE;
 	}
 
-	if (_SC_CFEqual(interface1UserDefinedName, interface2UserDefinedName) == FALSE) {
+	if (!_SC_CFEqual(interface1UserDefinedName, interface2UserDefinedName)) {
 		// Checking if we have a mismatch because of the name Ethernet and Ethernet 1
 		// Checking if we have a mismatch because of the name Airport and WiFi
-		if ((interface1IsBuiltin == TRUE) &&
-		    (interface2IsBuiltin == TRUE) &&
-		    (__SCNetworkConfigurationInterfaceNameIsEquiv(interface1UserDefinedName, interface2UserDefinedName) == TRUE)) {
+		if (interface1IsBuiltin &&
+		    interface2IsBuiltin &&
+		    __SCNetworkConfigurationInterfaceNameIsEquiv(interface1UserDefinedName, interface2UserDefinedName)) {
 			    return TRUE;
 		}
 		return FALSE;
@@ -932,10 +944,10 @@ __SCNetworkConfigurationInterfaceNameIsEquiv(CFStringRef interfaceName1, CFStrin
 	CFStringRef interfaceArray[] = { CFSTR("iPhone"), CFSTR("iPad"), CFSTR("iPod"), CFSTR("AppleTV") };
 	const int interfaceCount = sizeof(interfaceArray) / sizeof(CFStringRef);
 	CFStringRef portSuffix = CFSTR(", Port 1");
-	
+
 	if ((isA_CFString(interfaceName1) != NULL) &&
 	    (isA_CFString(interfaceName2) != NULL)) {
-		if (CFEqual(interfaceName1, interfaceName2) == FALSE) {
+		if (!CFEqual(interfaceName1, interfaceName2)) {
 			// Check if we are looking at the WiFi interface
 			if ((CFEqual(interfaceName1, CFSTR("AirPort")) ||
 			     (CFEqual(interfaceName1, CFSTR("Wi-Fi")))) &&
@@ -943,36 +955,35 @@ __SCNetworkConfigurationInterfaceNameIsEquiv(CFStringRef interfaceName1, CFStrin
 			     (CFEqual(interfaceName2, CFSTR("Wi-Fi"))))) {
 				return TRUE;
 			}
-			
+
 			if (((CFEqual(interfaceName1, CFSTR("Ethernet"))) ||
 			     (CFEqual(interfaceName1, CFSTR("Ethernet 1")))) &&
 			    ((CFEqual(interfaceName2, CFSTR("Ethernet"))) ||
 			     (CFEqual(interfaceName2, CFSTR("Ethernet 1"))))) {
 				return TRUE;
 			}
-			
-			if (((CFStringHasSuffix(interfaceName1, portSuffix) == TRUE) &&
+
+			if ((CFStringHasSuffix(interfaceName1, portSuffix) &&
 			    (CFStringCompareWithOptions(interfaceName1, interfaceName2, CFRangeMake(0, (CFStringGetLength(interfaceName1) - CFStringGetLength(portSuffix))), 0) == kCFCompareEqualTo)) ||
-			    ((CFStringHasSuffix(interfaceName2, portSuffix) == TRUE) &&
+			    (CFStringHasSuffix(interfaceName2, portSuffix) &&
 			     (CFStringCompareWithOptions(interfaceName2, interfaceName1, CFRangeMake(0, (CFStringGetLength(interfaceName2) - CFStringGetLength(portSuffix))), 0) == kCFCompareEqualTo))) {
 				return TRUE;
 			}
-			
+
 			for (CFIndex idx = 0; idx < interfaceCount; idx++) {
 				CFStringRef tempInterfaceName = interfaceArray[idx];
-				if ((CFEqual(interfaceName1, tempInterfaceName) == TRUE ||
-					__SCNetworkInterfaceMatchesName(interfaceName1, tempInterfaceName) == TRUE) &&
-				    (CFEqual(interfaceName2, tempInterfaceName) == TRUE  ||
-					__SCNetworkInterfaceMatchesName(interfaceName2, tempInterfaceName) == TRUE)) {
+				if ((CFEqual(interfaceName1, tempInterfaceName) ||
+				     __SCNetworkInterfaceMatchesName(interfaceName1, tempInterfaceName)) &&
+				    (CFEqual(interfaceName2, tempInterfaceName) ||
+				     __SCNetworkInterfaceMatchesName(interfaceName2, tempInterfaceName))) {
 					return TRUE;
 				}
 			}
-		}
-		else {
+		} else {
 			return TRUE;
 		}
 	}
-	
+
 	return FALSE;
 }
 
@@ -989,6 +1000,9 @@ typedef struct {
 	Boolean* isValid;
 	CFMutableArrayRef interfaceToBeRemoved;	// SCNetworkInterfaceRef. Services containing the interface will be removed
 	CFMutableArrayRef interfaceToBeReplaced;// SCNetworkInterfaceRef. Services containing the interface will be replaced with default service
+	CFMutableArrayRef interfacePreserveServiceInformation; // SCNetworkInterfaceRef. Services containing the interface will be replaced with new service which has same configuration as the current service with issue.
+	CFMutableDictionaryRef bsdNameServiceProtocolPreserveMapping;
+	SCPreferencesRef prefs;
 	Boolean repair;
 } SCNetworkConfigurationValidityContext;
 
@@ -1008,23 +1022,24 @@ _SCNetworkConfigurationValidateInterface (const void *key, const void *value, vo
 	CFStringRef serviceInterfaceUserDefinedName = NULL;
 	CFMutableArrayRef interfaceToBeRemoved = ctx->interfaceToBeRemoved;
 	CFMutableArrayRef interfaceToBeReplaced = ctx->interfaceToBeReplaced;
-	
+	CFMutableArrayRef interfacePreserveServiceInformation = ctx->interfacePreserveServiceInformation;
+
 	// No work needs to be done if we have already made determination that configuration somewhere is not valid,
 	// or we don't intend to repair invalid configuration.
-	if ((*ctx->isValid == FALSE) && (repair == FALSE)) {
+	if ((*ctx->isValid == FALSE) && !repair) {
 		return;
 	}
 
 	// There is no interface present for the service
 	interface = CFDictionaryGetValue(interfaceMapping, bsdName);
 	if (interface == NULL) {
-		if ((((bsdNameToBridgeServices != NULL) && (CFDictionaryContainsKey(bsdNameToBridgeServices, bsdName) == FALSE))) &&
-		    (((bsdNameToBondServices != NULL) && (CFDictionaryContainsKey(bsdNameToBondServices, bsdName) == FALSE))) &&
-		    (((bsdNameToVLANServices != NULL) && (CFDictionaryContainsKey(bsdNameToVLANServices, bsdName) == FALSE)))) {
+		if ((((bsdNameToBridgeServices != NULL) && !CFDictionaryContainsKey(bsdNameToBridgeServices, bsdName))) &&
+		    (((bsdNameToBondServices != NULL) && !CFDictionaryContainsKey(bsdNameToBondServices, bsdName))) &&
+		    (((bsdNameToVLANServices != NULL) && !CFDictionaryContainsKey(bsdNameToVLANServices, bsdName)))) {
 			// Not a virtual interface
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationValidateInterface: There is no real interface with bsd name: %@ for service"), bsdName);
-			
-			if (repair == TRUE) {
+			SC_log(LOG_INFO, "No real interface with BSD name (%@) for service", bsdName);
+
+			if (repair) {
 				CFArrayAppendValue(interfaceToBeRemoved, serviceInterface);
 			}
 			*ctx->isValid = FALSE;
@@ -1032,13 +1047,21 @@ _SCNetworkConfigurationValidateInterface (const void *key, const void *value, vo
 		return;
 	}
 
-	// TODO: Need to compare between both SCNetworkInterfaceRefs
+	// Need to compare between both SCNetworkInterfaceRefs
 	interfaceUserDefinedName = __SCNetworkInterfaceGetUserDefinedName(interface);
 	serviceInterfaceUserDefinedName = __SCNetworkInterfaceGetUserDefinedName(serviceInterface);
 
-	if (__SCNetworkConfigurationInterfaceNameIsEquiv(interfaceUserDefinedName, serviceInterfaceUserDefinedName) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationValidateInterface: Interface user defined name: %@ doesn't match service interface user defined name: %@"), interfaceUserDefinedName, serviceInterfaceUserDefinedName);
+	if (!__SCNetworkConfigurationInterfaceNameIsEquiv(interfaceUserDefinedName, serviceInterfaceUserDefinedName)) {
+		SC_log(LOG_INFO, "Interface user defined name (%@) doesn't match service/interface user defined name: %@",
+		       interfaceUserDefinedName,
+		       serviceInterfaceUserDefinedName);
 		*ctx->isValid = FALSE;
+		// Check if the service interface name is set to localized key
+		if (isA_CFArray(interfacePreserveServiceInformation) != NULL &&
+		    __SCNetworkInterfaceMatchesName(interfaceUserDefinedName, serviceInterfaceUserDefinedName)) {
+			SC_log(LOG_NOTICE, "serviceInterfaceUserDefinedName: %@ is the localized key for interface name: %@", serviceInterfaceUserDefinedName, interfaceUserDefinedName);
+			CFArrayAppendValue(interfacePreserveServiceInformation, serviceInterface);
+		}
 		// Add service interface to the interfaceToBeReplaced list
 		if (isA_CFArray(interfaceToBeReplaced) != NULL) {
 			CFArrayAppendValue(interfaceToBeReplaced, interface);
@@ -1059,13 +1082,13 @@ _SCNetworkConfigurationCollectMissingService(const void *key, const void *value,
 	CFMutableArrayRef interfacesMissingServices = ctx->interfacesMissingServices;
 	CFDictionaryRef serviceInterfaceMapping = ctx->interfaceMapping;
 
-	if ((isA_SCNetworkInterface(interface) == NULL) ||
-	    (_SCNetworkInterfaceIsBuiltin(interface) == FALSE)) {
+	if (!isA_SCNetworkInterface(interface) ||
+	    !_SCNetworkInterfaceIsBuiltin(interface)) {
 		return;
 	}
 
 	// Check if services have mapping for the BSD name of the interface
-	if (CFDictionaryContainsKey(serviceInterfaceMapping, bsdName) == FALSE) {
+	if (!CFDictionaryContainsKey(serviceInterfaceMapping, bsdName)) {
 		CFArrayAppendValue(interfacesMissingServices, interface); // Adding interface since the corresponding service seems to be missing
 	}
 }
@@ -1085,7 +1108,7 @@ _SCNetworkConfigurationCreateBuiltinInterfaceServices(SCPreferencesRef pref,
 
 	interfaces = __SCNetworkInterfaceCopyStoredWithPreferences(ni_pref);
 	if (interfaces == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCreateBuiltinInterfaceServices: interfaces is NULL or not of the correct type"));
+		SC_log(LOG_NOTICE, "No interfaces");
 		goto done;
 	}
 
@@ -1097,7 +1120,7 @@ _SCNetworkConfigurationCreateBuiltinInterfaceServices(SCPreferencesRef pref,
 
 	interfaces = __SCNetworkServiceCopyAllInterfaces(pref);
 	if (interfaces == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCreateBuiltinInterfaceServices: interfaces is NULL for configPref or not of the correct type"));
+		SC_log(LOG_INFO, "No interfaces");
 		goto done;
 	}
 	mappingServiceBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces);
@@ -1119,8 +1142,8 @@ _SCNetworkConfigurationCreateBuiltinInterfaceServices(SCPreferencesRef pref,
 	for (CFIndex idx = 0; idx < missingServiceCount; idx++) {
 		interface = CFArrayGetValueAtIndex(interfacesWithoutService, idx);
 
-		if (__SCNetworkServiceCreate(pref, interface, NULL) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCreateBuiltinInterfaceServices: Could not add service for interface: %@"), interface);
+		if (!__SCNetworkServiceCreate(pref, interface, NULL)) {
+			SC_log(LOG_INFO, "Could not add service for interface: %@", interface);
 			success = FALSE;
 		}
 	}
@@ -1139,40 +1162,66 @@ done:
 }
 
 static void
-add_default_service(const void *value, void *context)
+add_service(const void *value, void *context)
 {
+	SCNetworkConfigurationValidityContext *ctx = (SCNetworkConfigurationValidityContext *)context;
 	SCNetworkSetRef currentSet = NULL;
+	Boolean enabled;
 	SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)value;
-	SCPreferencesRef prefs = (SCPreferencesRef)context;
+	CFDictionaryRef bsdNameServiceProtocolMapping = ctx->bsdNameServiceProtocolPreserveMapping;
+	SCPreferencesRef prefs = ctx->prefs;
 	SCNetworkServiceRef service;
-	
+	CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
+	CFArrayRef protocolArray = NULL;
+
+	if (isA_CFString(bsdName)) {
+		protocolArray = CFDictionaryGetValue(bsdNameServiceProtocolMapping, bsdName);
+	}
 	service = SCNetworkServiceCreate(prefs, interface);
-	
 	if (service == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: Could not create new service"));
+		SC_log(LOG_INFO, "Could not create new service");
 		goto done;
 	}
-	
-	if (SCNetworkServiceEstablishDefaultConfiguration(service) == FALSE) {
+
+	if (!SCNetworkServiceEstablishDefaultConfiguration(service)) {
 		SCNetworkServiceRemove(service);
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: SCNetworkServiceEstablishDefaultConfiguration failed"));
+		SC_log(LOG_INFO, "SCNetworkServiceEstablishDefaultConfiguration() failed");
 		goto done;
 	}
-	
-	// Add Service to current set
+
+	if (protocolArray != NULL) {
+		CFIndex protocolArrayCount = CFArrayGetCount(protocolArray);
+
+		for (CFIndex idx = 0; idx < protocolArrayCount; idx++) {
+			CFDictionaryRef protocolInfo = CFArrayGetValueAtIndex(protocolArray, idx);
+			CFDictionaryRef configuration = CFDictionaryGetValue(protocolInfo, kProtocolConfiguration);
+			CFStringRef protocolType = CFDictionaryGetValue(protocolInfo, kProtocolType);
+			CFBooleanRef cfEnabled = CFDictionaryGetValue(protocolInfo, kProtocolEnabled);
+			if (cfEnabled) {
+				enabled = CFBooleanGetValue(cfEnabled);
+			} else {
+				enabled = FALSE;
+			}
+			__SCNetworkServiceAddProtocolToService(service, protocolType, configuration, enabled);
+		}
+	}
+
+	// Add service to current set
 	currentSet = SCNetworkSetCopyCurrent(prefs);
 	if (currentSet == NULL) {
 		SCNetworkServiceRemove(service);
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: Could not find current set"));
+		SC_log(LOG_INFO, "Could not find current set");
 		goto done;
 	}
-	
-	if (SCNetworkSetAddService(currentSet, service) == FALSE) {
+
+	if (!SCNetworkSetAddService(currentSet, service)) {
 		SCNetworkServiceRemove(service);
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: Could not add service to current set"));
+		SC_log(LOG_INFO,  "Could not add service to current set");
 		goto done;
 	}
-done:
+
+    done:
+
 	if (service != NULL) {
 		CFRelease(service);
 	}
@@ -1181,15 +1230,62 @@ done:
 	}
 }
 
+static void
+create_bsd_name_service_protocol_mapping(const void *value, void *context)
+{
+	SCNetworkConfigurationValidityContext *ctx = (SCNetworkConfigurationValidityContext *)context;
+	CFArrayRef interfacePreserveServiceInformation = ctx->interfacePreserveServiceInformation;
+	CFMutableDictionaryRef bsdNameServiceProtocolMapping = ctx->bsdNameServiceProtocolPreserveMapping;
+	SCNetworkInterfaceRef interface;
+	SCNetworkServiceRef service = (SCNetworkServiceRef)value;
+
+	interface = SCNetworkServiceGetInterface(service);
+
+	if (CFArrayContainsValue(interfacePreserveServiceInformation, CFRangeMake(0, CFArrayGetCount(interfacePreserveServiceInformation)), interface)) {
+		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
+		if (isA_CFString(bsdName)) {
+
+			CFArrayRef protocols = SCNetworkServiceCopyProtocols(service);
+			if (protocols != NULL) {
+				CFMutableArrayRef protocolArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+				CFIndex protocolCount = CFArrayGetCount(protocols);
+
+				for (CFIndex idx = 0; idx < protocolCount; idx++) {
+					SCNetworkProtocolRef protocol = CFArrayGetValueAtIndex(protocols, idx);
+					CFDictionaryRef configuration = SCNetworkProtocolGetConfiguration(protocol);
+					CFStringRef protocolType = SCNetworkProtocolGetProtocolType(protocol);
+					Boolean enabled = SCNetworkProtocolGetEnabled(protocol);
+
+					if (configuration == NULL ||  protocolType == NULL) {
+						continue;
+					}
+					CFMutableDictionaryRef protocolInfo = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+
+					CFDictionaryAddValue(protocolInfo, kProtocolType, protocolType);
+					CFDictionaryAddValue(protocolInfo, kProtocolConfiguration, configuration);
+					CFDictionaryAddValue(protocolInfo, kProtocolEnabled, enabled ? kCFBooleanTrue : kCFBooleanFalse);
+					CFArrayAppendValue(protocolArray, protocolInfo);
+					CFRelease(protocolInfo);
+				}
+				CFDictionaryAddValue(bsdNameServiceProtocolMapping, bsdName, protocolArray);
+				CFRelease(protocols);
+				CFRelease(protocolArray);
+			}
+
+		}
+	}
+}
+
 static void
 remove_service(const void *value, void *context)
 {
+	SCNetworkConfigurationValidityContext *ctx = (SCNetworkConfigurationValidityContext *)context;
 	SCNetworkInterfaceRef interface;
 	SCNetworkServiceRef service = (SCNetworkServiceRef)value;
-	CFArrayRef toBeRemoved = (CFArrayRef)context;
-	
+	CFArrayRef toBeRemoved = ctx->interfaceToBeRemoved;
+
 	interface = SCNetworkServiceGetInterface(service);
-	
+
 	if (CFArrayContainsValue(toBeRemoved, CFRangeMake(0, CFArrayGetCount(toBeRemoved)), interface)) {
 		SCNetworkServiceRemove(service);
 	}
@@ -1215,20 +1311,20 @@ _SCNetworkConfigurationSaveOldConfiguration(SCPreferencesRef prefs)
 	int month;
 	int second;
 	int year;
-	
+
 	currentCalendar = CFCalendarCopyCurrent();
 	absoluteTime = CFAbsoluteTimeGetCurrent();
-	
-	if (CFCalendarDecomposeAbsoluteTime(currentCalendar, absoluteTime, "yMdHms",
-					    &year, &month, &day, &hour, &minute, &second) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationSaveOldConfiguration: Cannot decompose absolute time"));
+
+	if (!CFCalendarDecomposeAbsoluteTime(currentCalendar, absoluteTime, "yMdHms",
+					     &year, &month, &day, &hour, &minute, &second)) {
+		SC_log(LOG_INFO, "CFCalendarDecomposeAbsoluteTime() failed");
 	}
 	keyListCount = (CFIndex)sizeof(keyList)/sizeof(CFStringRef);
-	
+
 	for (CFIndex idx = 0; idx < keyListCount; idx++) {
 		CFStringRef newKey;
 		CFTypeRef value = SCPreferencesGetValue(prefs, keyList[idx]);
-		
+
 		if (value != NULL) {
 			newKey = CFStringCreateWithFormat(NULL, NULL,
 							  CFSTR("%d-%d-%d %d:%d:%d : %@"),
@@ -1243,13 +1339,14 @@ _SCNetworkConfigurationSaveOldConfiguration(SCPreferencesRef prefs)
 
 static Boolean
 _SCNetworkConfigurationRepairUsingPreferences(SCPreferencesRef prefs,
-					      CFArrayRef interfaceToBeRemoved,
-					      CFArrayRef interfaceToBeReplaced)
+					      SCNetworkConfigurationValidityContext *context)
 {
 	CFIndex removeCount;
 	CFIndex replaceCount;
 	CFArrayRef serviceList;
-	
+	CFArrayRef interfaceToBeRemoved = context->interfaceToBeRemoved;
+	CFArrayRef interfaceToBeReplaced = context->interfaceToBeReplaced;
+
 	removeCount = CFArrayGetCount(interfaceToBeRemoved);
 	replaceCount = CFArrayGetCount(interfaceToBeReplaced);
 	if (removeCount == 0 &&
@@ -1259,11 +1356,11 @@ _SCNetworkConfigurationRepairUsingPreferences(SCPreferencesRef prefs,
 	}
 	// Backup current preferences before making changes
 	_SCNetworkConfigurationSaveOldConfiguration(prefs);
-	
+
 	serviceList = SCNetworkServiceCopyAll(prefs);
-	CFArrayApplyFunction(serviceList, CFRangeMake(0, CFArrayGetCount(serviceList)), remove_service, (void*)interfaceToBeRemoved);
-	
-	CFArrayApplyFunction(interfaceToBeReplaced, CFRangeMake(0, replaceCount), add_default_service, (void*)prefs);
+	CFArrayApplyFunction(serviceList, CFRangeMake(0, CFArrayGetCount(serviceList)), create_bsd_name_service_protocol_mapping, context);
+	CFArrayApplyFunction(serviceList, CFRangeMake(0, CFArrayGetCount(serviceList)), remove_service, (void*)context);
+	CFArrayApplyFunction(interfaceToBeReplaced, CFRangeMake(0, replaceCount), add_service, (void*)context);
 	CFRelease(serviceList);
 	return TRUE;
 }
@@ -1275,17 +1372,17 @@ validate_bridge(const void *value, void *context)
 	CFArrayRef memberInterfaces = SCBridgeInterfaceGetMemberInterfaces(bridge);
 	CFMutableArrayRef memberInterfacesMutable = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 	SCPreferencesRef ni_prefs = (SCPreferencesRef)context;
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(memberInterfaces); idx++) {
 		CFStringRef bsdName;
 		SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)CFArrayGetValueAtIndex(memberInterfaces, idx);
 		SCNetworkInterfaceRef memberInterface;
-		
+
 		bsdName = SCNetworkInterfaceGetBSDName(interface);
 		if (bsdName == NULL) {
 			continue;
 		}
-		
+
 		// Check if member interface is present
 		memberInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, bsdName);
 		if (memberInterface != NULL) {
@@ -1293,12 +1390,11 @@ validate_bridge(const void *value, void *context)
 			CFRelease(memberInterface);
 		}
 	}
-	
+
 	if (CFArrayGetCount(memberInterfacesMutable) == 0) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("validate_bridge: Removing invalid bridge configuration: %@"), bridge);
+		SC_log(LOG_INFO, "Removing invalid bridge configuration: %@", bridge);
 		SCBridgeInterfaceRemove(bridge);
-	}
-	else {
+	} else {
 		SCBridgeInterfaceSetMemberInterfaces(bridge, memberInterfacesMutable);
 	}
 	CFRelease(memberInterfacesMutable);
@@ -1311,17 +1407,17 @@ validate_bond(const void *value, void *context)
 	CFArrayRef memberInterfaces = SCBondInterfaceGetMemberInterfaces(bond);
 	CFMutableArrayRef memberInterfacesMutable = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 	SCPreferencesRef ni_prefs = (SCPreferencesRef)context;
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(memberInterfaces); idx++) {
 		CFStringRef bsdName;
 		SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)CFArrayGetValueAtIndex(memberInterfaces, idx);
 		SCNetworkInterfaceRef memberInterface;
-		
+
 		bsdName = SCNetworkInterfaceGetBSDName(interface);
 		if (bsdName == NULL) {
 			continue;
 		}
-		
+
 		// Check if member interface is present
 		memberInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, bsdName);
 		if (memberInterface != NULL) {
@@ -1329,17 +1425,16 @@ validate_bond(const void *value, void *context)
 			CFRelease(memberInterface);
 		}
 	}
-	
+
 	if (CFArrayGetCount(memberInterfacesMutable) == 0) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("validate_bond: Removing invalid bond configuration: %@"), bond);
+		SC_log(LOG_INFO, "Removing invalid bond configuration: %@", bond);
 		SCBondInterfaceRemove(bond);
-	}
-	else {
+	} else {
 		SCBondInterfaceSetMemberInterfaces(bond, memberInterfacesMutable);
 	}
 	CFRelease(memberInterfacesMutable);
 }
-#endif
+#endif	// !TARGET_OS_IPHONE
 
 static void
 validate_vlan(const void *value, void *context)
@@ -1350,15 +1445,15 @@ validate_vlan(const void *value, void *context)
 	SCPreferencesRef ni_prefs = (SCPreferencesRef)context;
 	SCNetworkInterfaceRef physicalInterface;
 	SCVLANInterfaceRef vlan = (SCVLANInterfaceRef)value;
-	
+
 	physicalInterface = SCVLANInterfaceGetPhysicalInterface(vlan);
 	bsdName = SCNetworkInterfaceGetBSDName(physicalInterface);
-	
+
 	if (bsdName == NULL) {
 		isValid = FALSE;
 		goto done;
 	}
-	
+
 	// Check if the physical interface is present
 	interface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, bsdName);
 	if (interface == NULL) {
@@ -1366,16 +1461,16 @@ validate_vlan(const void *value, void *context)
 		goto done;
 	}
 	CFRelease(interface);
-	
+
 done:
-	if (isValid == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("validate_vlan: Removing invalid VLAN configuration: %@"), vlan);
+	if (!isValid) {
+		SC_log(LOG_INFO, "Removing invalid VLAN configuration: %@", vlan);
 		SCVLANInterfaceRemove(vlan);
 	}
 }
 
-static Boolean
-_SCNetworkConfigurationCheckValidityUsingPreferences(SCPreferencesRef prefs,
+Boolean
+_SCNetworkConfigurationCheckValidityWithPreferences(SCPreferencesRef prefs,
 						     SCPreferencesRef ni_prefs,
 						     CFDictionaryRef options)
 {
@@ -1386,110 +1481,135 @@ _SCNetworkConfigurationCheckValidityUsingPreferences(SCPreferencesRef prefs,
 	CFDictionaryRef bsdNameToVLANServices = NULL;
 	SCNetworkConfigurationValidityContext context;
 	CFArrayRef interfaces = NULL;
+	CFMutableArrayRef interfaceToBeRemoved = NULL;
+	CFMutableArrayRef interfaceToBeReplaced = NULL;
+	CFMutableArrayRef interfacePreserveServiceInformation = NULL;
+	CFMutableDictionaryRef bsdNameServiceProtocolPreserveMapping = NULL;
 	Boolean isValid = TRUE;
 	CFDictionaryRef mappingBSDNameToInterface = NULL;
 	CFDictionaryRef mappingServiceBSDNameToInterface = NULL;
+	CFStringRef  model = NULL;
+	CFStringRef ni_model = NULL;
 	Boolean repairConfiguration = FALSE;
+	Boolean revertLimitNetworkConfiguration = FALSE;
 	CFArrayRef setServiceOrder = NULL;
 	CFArrayRef setServices = NULL;
-	CFMutableArrayRef interfaceToBeRemoved = NULL;
-	CFMutableArrayRef interfaceToBeReplaced = NULL;
-	
-	
+
 	if  ((isA_CFDictionary(options) != NULL)) {
 		CFBooleanRef repair = CFDictionaryGetValue(options, kSCNetworkConfigurationRepair);
 		if (isA_CFBoolean(repair) != NULL) {
 			repairConfiguration = CFBooleanGetValue(repair);
 		}
 	}
-
+	if (!__SCPreferencesGetLimitSCNetworkConfiguration(prefs)) {
+		__SCPreferencesSetLimitSCNetworkConfiguration(prefs, TRUE);
+		revertLimitNetworkConfiguration = TRUE;
+	}
 	/*
+
 	 Check the validity by:
-	 1) Comparing if the interfaces names mentioned in NetworkInterfaces.plist and preferences.plist match
+	 - Comparing if the models are the same
+	 */
+	model = SCPreferencesGetValue(prefs, MODEL);
+	ni_model = SCPreferencesGetValue(ni_prefs, MODEL);
+
+	if (isA_CFString(model) == NULL || isA_CFString(ni_model) == NULL || CFStringCompare(model, ni_model, 0) != kCFCompareEqualTo) {
+		isValid = FALSE;
+		SC_log(LOG_INFO, "Model names do not match in preferences.plist and NetworkInterfaces.plist");
+		goto done;
+	}
+
+	/*
+	 - Comparing if the interfaces names mentioned in NetworkInterfaces.plist and preferences.plist match
 	 Use the functions
 	 CFDictionaryRef
 	 __SCNetworkInterfaceCreateMappingUsingBSDName(SCPreferencesRef prefs);
 	 */
 	interfaces = __SCNetworkInterfaceCopyStoredWithPreferences(ni_prefs);
-	if (isA_CFArray(interfaces) == NULL) {
+	if (!isA_CFArray(interfaces)) {
+		if (interfaces != NULL) CFRelease(interfaces);
+		SC_log(LOG_NOTICE, "No interfaces");
 		isValid = FALSE;
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: interfaces is NULL or not of the correct type"));
 		goto done;
 	}
 	mappingBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces);
 	CFRelease(interfaces);
 	if (isA_CFDictionary(mappingBSDNameToInterface) == NULL) {
 		isValid = FALSE;
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: mappingBSDNameToInterface is NULL"));
+		SC_log(LOG_INFO, "No BSD name to interface mapping");
 		goto done;
 	}
 
 	interfaces = __SCNetworkServiceCopyAllInterfaces(prefs);
-	if (isA_CFArray(interfaces) == NULL) {
+	if (!isA_CFArray(interfaces)) {
+		if (interfaces != NULL) CFRelease(interfaces);
 		isValid = FALSE;
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: interfaces is NULL for configPref or not of the correct type"));
+		SC_log(LOG_INFO, "No interfaces");
 		goto done;
 	}
 	mappingServiceBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces);
 	CFRelease(interfaces);
 	if (isA_CFDictionary(mappingServiceBSDNameToInterface) == NULL) {
 		isValid = FALSE;
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: mappingServiceBSDNameToInterface is NULL"));
+		SC_log(LOG_INFO, "No Service BSD name to interface mapping");
 		goto done;
 	}
 
 	if (repairConfiguration) {
 		interfaceToBeRemoved = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 		interfaceToBeReplaced = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+		interfacePreserveServiceInformation = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+		bsdNameServiceProtocolPreserveMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 #if	!TARGET_OS_IPHONE
 		bsdNameToBridgeServices = _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(prefs);
 		bsdNameToBondServices = _SCNetworkMigrationCopyMappingBSDNameToBondServices(prefs);
 		bsdNameToVLANServices = _SCNetworkMigrationCopyMappingBSDNameToVLANServices(prefs);
-#endif
+#endif	// !TARGET_OS_IPHONE
 	}
 	context.interfaceMapping = mappingBSDNameToInterface;
 	context.isValid = &isValid;
 	context.interfaceToBeRemoved = interfaceToBeRemoved;
 	context.interfaceToBeReplaced = interfaceToBeReplaced;
+	context.interfacePreserveServiceInformation = interfacePreserveServiceInformation;
 	context.bsdNameToBridgeServices = bsdNameToBridgeServices;
 	context.bsdNameToBondServices = bsdNameToBondServices;
 	context.bsdNameToVLANServices = bsdNameToVLANServices;
 	context.repair = repairConfiguration;
+	context.prefs = prefs;
+	context.bsdNameServiceProtocolPreserveMapping = bsdNameServiceProtocolPreserveMapping;
 
 	CFDictionaryApplyFunction(mappingServiceBSDNameToInterface, _SCNetworkConfigurationValidateInterface, &context);
 
-	if (isValid == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: Found mismatch between interface names in NetworkInterfaces.plist and preferences.plist"));
+	if (!isValid) {
+		SC_log(LOG_INFO, "mismatch between interface names in NetworkInterfaces.plist and preferences.plist");
 		if (repairConfiguration) {
-			isValid = _SCNetworkConfigurationRepairUsingPreferences(prefs, interfaceToBeRemoved, interfaceToBeReplaced);
-			if (isValid == FALSE) {
+			isValid = _SCNetworkConfigurationRepairUsingPreferences(prefs, &context);
+			if (!isValid) {
 				goto done;
 			}
 			// Save the changes if repair fixed an invalid configuration
-			if (SCPreferencesCommitChanges(prefs) == FALSE) {
-				SCLog(_sc_debug, LOG_NOTICE, CFSTR("Failed to commit changes from the repaired configuration"));
+			if (!SCPreferencesCommitChanges(prefs)) {
+				SC_log(LOG_INFO, "SCPreferencesCommitChanges() failed");
 			}
-		}
-		else {
+		} else {
 			goto done;
 		}
 	}
 	/*
-
-	 2) Check if all the network services mentioned in the SCNetworkSet are actually present in the SCNetworkService array
+	 - Check if all the network services mentioned in the SCNetworkSet are actually present in the SCNetworkService array
 	 */
 
 	allServices = SCNetworkServiceCopyAll(prefs);
 	if (isA_CFArray(allServices) == NULL) {
 		isValid = FALSE;
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: allServices is NULL"));
+		SC_log(LOG_INFO, "No services");
 		goto done;
 	}
 
 	allSets = SCNetworkSetCopyAll(prefs);
 	if (isA_CFArray(allSets) == NULL) {
 		isValid = FALSE;
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: allSets is NULL"));
+		SC_log(LOG_INFO, "No sets");
 		goto done;
 	}
 
@@ -1497,37 +1617,37 @@ _SCNetworkConfigurationCheckValidityUsingPreferences(SCPreferencesRef prefs,
 		SCNetworkSetRef set = CFArrayGetValueAtIndex(allSets, idx);
 
 		if (isA_SCNetworkSet(set) == NULL) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: set is NULL"));
+			SC_log(LOG_INFO, "No set");
 			continue;
 		}
 		setServices = SCNetworkSetCopyServices(set);
 		if (setServices == NULL) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: setServices is NULL"));
+			SC_log(LOG_INFO, "No services");
 			continue;
 		}
 		for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(setServices); idx2++) {
 			SCNetworkServiceRef service = CFArrayGetValueAtIndex(setServices, idx2);
 
-			if (CFArrayContainsValue(allServices, CFRangeMake(0, CFArrayGetCount(allServices)), service) == FALSE) {
+			if (!CFArrayContainsValue(allServices, CFRangeMake(0, CFArrayGetCount(allServices)), service)) {
 				isValid = FALSE;
-				SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: All network services in the network set are not present in SCNetworkService array"));
+				SC_log(LOG_INFO, "All network services in the network set are not present in SCNetworkService array");
 				break;
 			}
 		}
-		if (isValid == FALSE) {
+		if (!isValid) {
 			break;
 		}
 
 		/*
-		 3) Check if service IDs in service order do exist in the SET
+		 - Check if service IDs in service order do exist in the SET
 		 */
 		setServiceOrder = SCNetworkSetGetServiceOrder(set);
 		if (setServiceOrder != NULL) {
 			for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(setServiceOrder); idx2++) {
 				SCNetworkServiceRef service = CFArrayGetValueAtIndex(setServiceOrder, idx2);
-				if ((CFArrayContainsValue(setServiceOrder, CFRangeMake(0, CFArrayGetCount(setServiceOrder)), service) == FALSE) &&
-				    (CFArrayContainsValue(allServices, CFRangeMake(0, CFArrayGetCount(allServices)), service) == FALSE)) {
-					SCLog(_sc_debug, LOG_NOTICE, CFSTR("Service: %@ is not present in the service order for set %@"), service, set);
+				if (!CFArrayContainsValue(setServiceOrder, CFRangeMake(0, CFArrayGetCount(setServiceOrder)), service) &&
+				    !CFArrayContainsValue(allServices, CFRangeMake(0, CFArrayGetCount(allServices)), service)) {
+					SC_log(LOG_INFO, "Service: %@ is not present in the service order for set %@", service, set);
 					break;
 				}
 			}
@@ -1537,9 +1657,9 @@ _SCNetworkConfigurationCheckValidityUsingPreferences(SCPreferencesRef prefs,
 			setServices = NULL;
 		}
 	}
-	
+
 	/*
-	 4) Check if the virtual network interfaces have valid member interfaces
+	 - Check if the virtual network interfaces have valid member interfaces
 	 */
 	CFArrayRef bridges = SCBridgeInterfaceCopyAll(prefs);
 	if (bridges != NULL) {
@@ -1552,7 +1672,7 @@ _SCNetworkConfigurationCheckValidityUsingPreferences(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);
@@ -1573,6 +1693,7 @@ done:
 	if (allSets != NULL) {
 		CFRelease(allSets);
 	}
+#if	!TARGET_OS_IPHONE
 	if (bsdNameToBridgeServices != NULL) {
 		CFRelease(bsdNameToBridgeServices);
 	}
@@ -1582,6 +1703,7 @@ done:
 	if (bsdNameToVLANServices != NULL) {
 		CFRelease(bsdNameToVLANServices);
 	}
+#endif	// !TARGET_OS_IPHONE
 	if (setServices != NULL) {
 		CFRelease(setServices);
 	}
@@ -1591,6 +1713,15 @@ done:
 	if (interfaceToBeReplaced != NULL) {
 		CFRelease(interfaceToBeReplaced);
 	}
+	if (interfacePreserveServiceInformation != NULL) {
+		CFRelease(interfacePreserveServiceInformation);
+	}
+	if (bsdNameServiceProtocolPreserveMapping != NULL) {
+		CFRelease(bsdNameServiceProtocolPreserveMapping);
+	}
+	if (revertLimitNetworkConfiguration) {
+		__SCPreferencesSetLimitSCNetworkConfiguration(prefs, FALSE);
+	}
 	return isValid;
 }
 
@@ -1604,30 +1735,30 @@ _SCNetworkConfigurationCheckValidity(CFURLRef configDir, CFDictionaryRef options
 	SCPreferencesRef configPref = NULL;
 	CFURLRef configPreferenceFile = NULL;
 	CFStringRef configPreferencesFileString = NULL;
-	CFArrayRef configurationFiles = NULL;
 	Boolean isValid = FALSE;
 	char networkInterfaceStr[PATH_MAX];
 	char prefsStr[PATH_MAX];
-	
+
 	if (configDir == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidity: Migration files not found in directory: %@"), ((configDir == NULL) ? CFSTR("NULL") : CFURLGetString(configDir)));
+		SC_log(LOG_INFO, "Migration files not found in directory: %@",
+		       (configDir == NULL) ? CFSTR("NULL") : CFURLGetString(configDir));
 		goto done;
 	}
 	baseURL = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE,
 							      kCFURLPOSIXPathStyle, TRUE, configDir);
-	
+
 	configPreferenceFile = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)PREFS_DEFAULT_CONFIG_PLIST, sizeof(PREFS_DEFAULT_CONFIG_PLIST), FALSE, baseURL);
 	configNetworkInterfaceFile = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)NETWORK_INTERFACES_PREFS_PLIST, sizeof(NETWORK_INTERFACES_PREFS_PLIST), FALSE, baseURL);
-	
-	if (CFURLGetFileSystemRepresentation(configPreferenceFile, TRUE, (UInt8*)prefsStr, sizeof(prefsStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidity: Could not extract preferences information"));
+
+	if (!CFURLGetFileSystemRepresentation(configPreferenceFile, TRUE, (UInt8*)prefsStr, sizeof(prefsStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", configPreferenceFile);
 		goto done;
 	}
-	if (CFURLGetFileSystemRepresentation(configNetworkInterfaceFile, TRUE, (UInt8*)networkInterfaceStr, sizeof(networkInterfaceStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidity: Could not extract network interface information"));
+	if (!CFURLGetFileSystemRepresentation(configNetworkInterfaceFile, TRUE, (UInt8*)networkInterfaceStr, sizeof(networkInterfaceStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", configNetworkInterfaceFile);
 		goto done;
 	}
-	
+
 	configPreferencesFileString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), prefsStr);
 	configNetworkInterfaceFileString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), networkInterfaceStr);
 
@@ -1644,15 +1775,12 @@ _SCNetworkConfigurationCheckValidity(CFURLRef configDir, CFDictionaryRef options
 
 	// This function compares preferences.plist and NetworkInterfaces.plist and verifies if the values are correct
 	// Checking interface mismatch for validity
-	isValid = _SCNetworkConfigurationCheckValidityUsingPreferences(configPref, configNetworkInterfacePref, options);
+	isValid = _SCNetworkConfigurationCheckValidityWithPreferences(configPref, configNetworkInterfacePref, options);
 
 done:
 	if (baseURL != NULL) {
 		CFRelease(baseURL);
 	}
-	if (configurationFiles != NULL) {
-		CFRelease(configurationFiles);
-	}
 	if (configPreferencesFileString != NULL) {
 		CFRelease(configPreferencesFileString);
 	}
@@ -1678,19 +1806,22 @@ done:
 typedef struct {
 	CFMutableArrayRef externalInterfaceList;
 	CFMutableArrayRef networkInterfaceList;
+	Boolean foundNewInterfaces;
 } SCExternalMappingContext;
 
 static void
 _SCNetworkConfigurationCollectInterfaceStorageEntity(const void *key, const void *value, void *context)
 {
+#pragma unused(key)
 	SCExternalMappingContext* ctx = context;
 	CFDictionaryRef interface_entity = NULL;
 	SCNetworkInterfaceRef targetInterface = (SCNetworkInterfaceRef)value;
 
-	if (CFArrayContainsValue(ctx->externalInterfaceList, CFRangeMake(0, CFArrayGetCount(ctx->externalInterfaceList)), targetInterface) == TRUE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCollectInterfaceStorageEntity: Target Interface %@ already exists, thus do no add it to NetworkInterfaces.plist"), targetInterface);
+	if (CFArrayContainsValue(ctx->externalInterfaceList, CFRangeMake(0, CFArrayGetCount(ctx->externalInterfaceList)), targetInterface)) {
+		SC_log(LOG_INFO, "Target interface (%@) already exists, not adding to NetworkInterfaces.plist", targetInterface);
 		return; // If the target interface already exists then do not add it to NetworkInterfaces.plist
 	}
+	ctx->foundNewInterfaces = TRUE;
 	interface_entity = __SCNetworkInterfaceCopyStorageEntity(targetInterface);
 
 	if (interface_entity != NULL) {
@@ -1700,7 +1831,7 @@ _SCNetworkConfigurationCollectInterfaceStorageEntity(const void *key, const void
 }
 
 static CFArrayRef   // CFDictionaryRef
-_SCNetworkMigrationCreateNetworkInterfaceArray(SCPreferencesRef ni_prefs, CFDictionaryRef externalMapping)
+_SCNetworkMigrationCreateNetworkInterfaceArray(SCPreferencesRef ni_prefs, CFDictionaryRef externalMapping, Boolean *hasNewInterface)
 {
 	SCExternalMappingContext context;
 	CFIndex count = 0;
@@ -1710,15 +1841,14 @@ _SCNetworkMigrationCreateNetworkInterfaceArray(SCPreferencesRef ni_prefs, CFDict
 	CFMutableArrayRef networkInterfaceList = NULL;
 
 	if (ni_prefs == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateNetworkInterfaceArray: ni_prefs are NULL"));
+		SC_log(LOG_INFO, "No NetworkInterfaces.plist");
 		return NULL;
 	}
 
 	if_list = SCPreferencesGetValue(ni_prefs, INTERFACES);
-
-	if ((isA_CFArray(if_list) == NULL) ||
+	if (!isA_CFArray(if_list) ||
 	    ((count = CFArrayGetCount(if_list)) == 0)) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateNetworkInterfaceArray: if_list is NULL or interface count is 0"));
+		SC_log(LOG_INFO, "No interfaces");
 		return NULL;
 	}
 
@@ -1727,23 +1857,28 @@ _SCNetworkMigrationCreateNetworkInterfaceArray(SCPreferencesRef ni_prefs, CFDict
 	// Keep the same builtin and external interfaces
 	for (CFIndex idx = 0; idx < count; idx++) {
 		interface_entity = CFArrayGetValueAtIndex(if_list, idx);
-		if (isA_CFDictionary(interface_entity) == NULL) {
+		if (!isA_CFDictionary(interface_entity)) {
 			continue;
 		}
 		CFArrayAppendValue(networkInterfaceList, interface_entity);
 	}
 
-	if (isA_CFDictionary(externalMapping) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateNetworkInterfaceArray: externalMapping is NULL or not of the correct type"));
+	if (!isA_CFDictionary(externalMapping)) {
+		SC_log(LOG_INFO, "No external mapping");
 		goto done;
 	}
+
 	// Add any new external interfaces found
 	externalInterfaceList = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(ni_prefs, FALSE);
 	context.externalInterfaceList = externalInterfaceList;
 	context.networkInterfaceList = networkInterfaceList;
+	context.foundNewInterfaces = FALSE;
 
 	CFDictionaryApplyFunction(externalMapping, _SCNetworkConfigurationCollectInterfaceStorageEntity, &context);
 
+	if (hasNewInterface != NULL) {
+		*hasNewInterface = context.foundNewInterfaces;
+	}
 done:
 	if (externalInterfaceList != NULL) {
 		CFRelease(externalInterfaceList);
@@ -1770,7 +1905,7 @@ SCNetworkMigrationMapSourceToTargetName(const void *key, const void *value, void
 		return;
 	}
 
-	if (CFDictionaryContainsKey(mapping, sourceBSDName) == FALSE) {
+	if (!CFDictionaryContainsKey(mapping, sourceBSDName)) {
 		CFDictionaryAddValue(mapping, sourceBSDName, targetBSDName);
 	}
 	return;
@@ -1783,10 +1918,10 @@ _SCNetworkMigrationCreateBSDNameMapping(CFDictionaryRef internalMapping, CFDicti
 									  &kCFTypeDictionaryKeyCallBacks,
 									  &kCFTypeDictionaryValueCallBacks);
 
-	if ((internalMapping == NULL) && externalMapping == NULL) {
+	if ((internalMapping == NULL) && (externalMapping == NULL)) {
 		goto done;
 	}
-	
+
 	if (internalMapping != NULL) {
 		CFDictionaryApplyFunction(internalMapping, SCNetworkMigrationMapSourceToTargetName, bsdNameMapping);
 	}
@@ -1794,7 +1929,7 @@ _SCNetworkMigrationCreateBSDNameMapping(CFDictionaryRef internalMapping, CFDicti
 	if (externalMapping != NULL) {
 		CFDictionaryApplyFunction(externalMapping, SCNetworkMigrationMapSourceToTargetName, bsdNameMapping);
 	}
-	
+
 done:
 	return bsdNameMapping;
 }
@@ -1814,31 +1949,31 @@ _SCNetworkMigrationCreateServiceSetMapping(SCPreferencesRef prefs)
 	CFArrayRef services = NULL;
 	CFMutableArrayRef setList = NULL;
 	CFArrayRef sets = NULL;
-	
+
 	services = SCNetworkServiceCopyAll(prefs);
 	if (services == NULL) {
 		goto done;
 	}
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		service = CFArrayGetValueAtIndex(services, idx);
-		
-		if (CFDictionaryContainsKey(serviceSetMapping, service) == FALSE) {
+
+		if (!CFDictionaryContainsKey(serviceSetMapping, service)) {
 			setList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 			CFDictionaryAddValue(serviceSetMapping, service, setList);
 			CFRelease(setList);
 		}
 	}
 	CFRelease(services);
-	
+
 	sets = SCNetworkSetCopyAll(prefs);
 	if (sets == NULL) {
 		goto done;
 	}
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(sets); idx++) {
 		SCNetworkSetRef set = CFArrayGetValueAtIndex(sets, idx);
 		services = SCNetworkSetCopyServices(set);
-		
+
 		for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(services); idx2++) {
 			service = CFArrayGetValueAtIndex(services, idx2);
 			setList = (CFMutableArrayRef)CFDictionaryGetValue(serviceSetMapping, service);
@@ -1848,7 +1983,7 @@ _SCNetworkMigrationCreateServiceSetMapping(SCPreferencesRef prefs)
 		}
 		CFRelease(services);
 	}
-	
+
 done:
 	if (sets != NULL) {
 		CFRelease(sets);
@@ -1864,47 +1999,69 @@ _SCNetworkMigrationCreateSetMapping(SCPreferencesRef sourcePrefs,
 	CFMutableDictionaryRef setMapping = NULL;
 	CFStringRef setName;
 	CFArrayRef sourceSets = NULL;
+	CFIndex targetCount;
+	SCNetworkSetRef targetSet;
 	CFArrayRef targetSets = NULL;
 	CFMutableArrayRef targetSetsMutable = NULL;
-	
+
 	sourceSets = SCNetworkSetCopyAll(sourcePrefs);
 	targetSets = SCNetworkSetCopyAll(targetPrefs);
-	
+
 	if (sourceSets == NULL ||
 	    targetSets == NULL) {
 		goto done;
 	}
 	targetSetsMutable = CFArrayCreateMutableCopy(NULL, 0, targetSets);
-	
+	targetCount = CFArrayGetCount(targetSetsMutable);
+
 	setMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	
+
 	currentSourceSet = SCNetworkSetCopyCurrent(sourcePrefs);
-	
+
+	// Mapping the current source set to the first target set, and setting it as current set
+	if (currentSourceSet != NULL) {
+		if (targetCount > 0) {
+			targetSet = CFArrayGetValueAtIndex(targetSetsMutable, 0);
+			CFRetain(targetSet);
+			CFArrayRemoveValueAtIndex(targetSetsMutable, 0);
+
+			setName = SCNetworkSetGetName(currentSourceSet);
+			SCNetworkSetSetName(targetSet, setName);
+			CFDictionaryAddValue(setMapping, currentSourceSet, targetSet);
+			SCNetworkSetSetCurrent(targetSet);
+			CFRelease(targetSet);
+		}
+		else {
+			SC_log(LOG_ERR, "Number of sets in the target should be at least 1, but is found to be %ld", targetCount);
+			goto done;
+		}
+	}
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(sourceSets); idx++) {
 		SCNetworkSetRef sourceSet = CFArrayGetValueAtIndex(sourceSets, idx);
-		CFIndex targetCount = CFArrayGetCount(targetSetsMutable);
-		SCNetworkSetRef targetSet;
-		
+
+		if ((currentSourceSet != NULL) && CFEqual(sourceSet, currentSourceSet)) {
+			continue;
+		}
+
+		targetCount = CFArrayGetCount(targetSetsMutable);
 		setName = SCNetworkSetGetName(sourceSet);
+
 		if (targetCount > 0) {
 			targetSet = CFArrayGetValueAtIndex(targetSetsMutable, 0);
 			CFRetain(targetSet);
 			CFArrayRemoveValueAtIndex(targetSetsMutable, 0);
-		}
-		else {
+		} else {
 			targetSet = SCNetworkSetCreate(targetPrefs);
 		}
-		
 		SCNetworkSetSetName(targetSet, setName);
 		CFDictionaryAddValue(setMapping, sourceSet, targetSet);
-		
-		if (CFEqual(sourceSet, currentSourceSet) == TRUE) {
-			SCNetworkSetSetCurrent(targetSet);
-		}
+
 		CFRelease(targetSet);
 	}
-	
-done:
+
+    done:
+
 	if (sourceSets != NULL) {
 		CFRelease(sourceSets);
 	}
@@ -1917,6 +2074,13 @@ done:
 	if (currentSourceSet != NULL) {
 		CFRelease(currentSourceSet);
 	}
+
+	if (setMapping != NULL) {
+		SC_log(LOG_NOTICE, "Set mapping: %@", setMapping);
+	} else {
+		SC_log(LOG_INFO, "Set mapping: NULL");
+	}
+
 	return setMapping;
 }
 
@@ -1948,17 +2112,17 @@ _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(SCPreferencesRef sourcePr
 
 	// We need BSD Mapping to successfully create service mapping
 	if (bsdNameMapping == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: BSD Name Mapping is NULL"));
+		SC_log(LOG_INFO, "No BSD name mapping");
 		goto done;
 	}
 	sourceSCNetworkServices = SCNetworkServiceCopyAll(sourcePrefs);
 	if (isA_CFArray(sourceSCNetworkServices) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: sourceSCNetworkServices is NULL or not of the correct CFType"));
+		SC_log(LOG_INFO, "No source network services");
 		goto done;
 	}
 	targetSCNetworkServices = SCNetworkServiceCopyAll(targetPrefs);
 	if (isA_CFArray(targetSCNetworkServices) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetSCNetworkServices is NULL or not of the correct CFType"));
+		SC_log(LOG_INFO, "No target network services");
 		goto done;
 	}
 
@@ -1981,37 +2145,37 @@ _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(SCPreferencesRef sourcePr
 		sourceService = (SCNetworkServiceRef) CFArrayGetValueAtIndex(sourceSCNetworkServicesMutable, idx);
 
 		sourceInterface = SCNetworkServiceGetInterface(sourceService);
-
 		if (sourceInterface == NULL) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: sourceInterface is NULL or not of the correct type"));
+			SC_log(LOG_INFO, "No source interface");
 			continue;
 		}
 
 		sourceInterfaceType = __SCNetworkInterfaceGetEntityType(sourceInterface);
 		if ((isA_CFString(sourceInterfaceType) != NULL) &&
-		    ((CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeVPN) == TRUE) ||
-		     (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypePPP) == TRUE))) {
+		    (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeVPN) ||
+		     CFEqual(sourceInterfaceType, kSCValNetInterfaceTypePPP))) {
 			    sourceInterfaceSubType = __SCNetworkInterfaceGetEntitySubType(sourceInterface);
 			    if (isA_CFString(sourceInterfaceSubType) == NULL) {
-				    SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: sourceInterfaceSubType is NULL or not of the correct type"));
+				    SC_log(LOG_INFO, "No source interface SubType");
 				    continue;
 			    }
 		}
-		else if (((isA_CFString(sourceInterfaceType) != NULL) &&
-                         (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeIPSec) == FALSE) &&
-			  (CFEqual(sourceInterfaceType, kSCValNetInterfaceType6to4) == FALSE) &&
-			  (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeLoopback) == FALSE)) ||
-			 (isA_CFString(sourceInterfaceType) == NULL)) {
+		else if ((isA_CFString(sourceInterfaceType) &&
+			  !CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeIPSec) &&
+			  !CFEqual(sourceInterfaceType, kSCValNetInterfaceType6to4) &&
+			  !CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeLoopback)) ||
+			 !isA_CFString(sourceInterfaceType)) {
 			sourceBSDName = SCNetworkInterfaceGetBSDName(sourceInterface);
-			if ((isA_CFString(sourceBSDName) == NULL) ||
-			    (CFDictionaryContainsKey(bsdNameMapping, sourceBSDName)) == FALSE) {
-				SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: bsdNameMapping doesn't contain sourceBSDName: %@"), (sourceBSDName == NULL) ? CFSTR("NULL") : sourceBSDName);
+			if (!isA_CFString(sourceBSDName) ||
+			    !CFDictionaryContainsKey(bsdNameMapping, sourceBSDName)) {
+				SC_log(LOG_INFO, "No BSD name mapping for %@",
+				       (sourceBSDName == NULL) ? CFSTR("NULL") : sourceBSDName);
 				continue;
 			}
 
 			bsdNameMapTarget = CFDictionaryGetValue(bsdNameMapping, sourceBSDName);
 			if (isA_CFString(bsdNameMapTarget) == NULL) {
-				SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: bsdNameMapTarget is NULL or not of the correct CFType"));
+				SC_log(LOG_INFO, "No BSD name mapping target");
 				continue;
 			}
 		}
@@ -2027,43 +2191,43 @@ _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(SCPreferencesRef sourcePr
 
 			targetInterface = SCNetworkServiceGetInterface(targetService);
 			if (targetInterface == NULL) {
-				SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetInterface is NULL or not of the correct type"));
+				SC_log(LOG_INFO, "No target interface");
 				continue;
 			}
-                        SCLog(_sc_debug, LOG_NOTICE, CFSTR("targetInterface: %@"), targetInterface);
+			SC_log(LOG_INFO, "targetInterface: %@", targetInterface);
 			if (sourceBSDName != NULL) {
 				targetBSDName = SCNetworkInterfaceGetBSDName(targetInterface);
 				if (isA_CFString(targetBSDName) == NULL) {
-					SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetBSDName is NULL or not of the correct type"));
+					SC_log(LOG_INFO, "No target BSD name");
 					continue;
 				}
 
-				if (CFEqual(targetBSDName, bsdNameMapTarget) == TRUE) {
-					SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: Removing target BSD Name: %@"), targetBSDName);
+				if (CFEqual(targetBSDName, bsdNameMapTarget)) {
+					SC_log(LOG_INFO, "Removing target BSD name: %@", targetBSDName);
 					CFDictionaryAddValue(serviceMapping, sourceService, targetService);
 					CFArrayRemoveValueAtIndex(targetSCNetworkServicesMutable, idx2);
 					break;
 				}
-			}
-			else {
+			} else {
 				// Source Interface Type should be VPN
 				targetInterfaceType = __SCNetworkInterfaceGetEntityType(targetInterface);
 				if ((isA_CFString(targetInterfaceType) == NULL) ||
-				    ((CFEqual(targetInterfaceType, kSCValNetInterfaceTypeVPN) == FALSE) &&
-				     (CFEqual(targetInterfaceType, kSCValNetInterfaceTypePPP) == FALSE))) {
-					    SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetInterfaceType is NULL or not of the correct type : %@"), (targetInterfaceType != NULL) ? targetInterfaceType : CFSTR("NULL"));
+				    (!CFEqual(targetInterfaceType, kSCValNetInterfaceTypeVPN) &&
+				     !CFEqual(targetInterfaceType, kSCValNetInterfaceTypePPP))) {
+					    SC_log(LOG_INFO, "Unexpected target interface type: %@",
+						   (targetInterfaceType != NULL) ? targetInterfaceType : CFSTR("NULL"));
 					    continue;
 				    }
 				targetInterfaceSubType = __SCNetworkInterfaceGetEntitySubType(targetInterface);
 				if (isA_CFString(targetInterfaceSubType) == NULL) {
-					SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetInterfaceSubType is NULL or not of the correct type: %@"), (targetInterfaceSubType != NULL) ? targetInterfaceSubType : CFSTR("NULL"));
+					SC_log(LOG_INFO, "No target interface SubType");
 					continue;
 				}
 
 				// Check if the target interface type and the target interface sub type match
-				if ((CFEqual(targetInterfaceType, sourceInterfaceType) == TRUE) &&
-				    (CFEqual(targetInterfaceSubType, sourceInterfaceSubType) == TRUE)) {
-					SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: Removing target BSD Name: %@ for VPN"), targetBSDName);
+				if (CFEqual(targetInterfaceType, sourceInterfaceType) &&
+				    CFEqual(targetInterfaceSubType, sourceInterfaceSubType)) {
+					SC_log(LOG_INFO, "Removing target BSD Name: %@ for VPN", targetBSDName);
 					CFDictionaryAddValue(serviceMapping, sourceService, targetService);
 					CFArrayRemoveValueAtIndex(targetSCNetworkServicesMutable, idx2);
 					break;
@@ -2072,12 +2236,14 @@ _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(SCPreferencesRef sourcePr
 		}
 		// Check if sourceService has found a mapping or not, if not the create a NULL mapping to indicate
 		// the this service needs to be added and not replaced
-		if (CFDictionaryContainsKey(serviceMapping, sourceService) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: Service needs to be added: %@"), sourceService);
+		if (!CFDictionaryContainsKey(serviceMapping, sourceService)) {
+			SC_log(LOG_INFO, "Service needs to be added: %@", sourceService);
 			CFDictionaryAddValue(serviceMapping, sourceService, kCFBooleanFalse);
 		}
 	}
-done:
+
+    done :
+
 	if (sourceSCNetworkServices != NULL) {
 		CFRelease(sourceSCNetworkServices);
 	}
@@ -2090,6 +2256,13 @@ done:
 	if (targetSCNetworkServicesMutable != NULL) {
 		CFRelease(targetSCNetworkServicesMutable);
 	}
+
+	if (serviceMapping != NULL) {
+		SC_log(LOG_NOTICE, "Service mapping: %@", serviceMapping);
+	} else {
+		SC_log(LOG_INFO, "Service mapping: NULL");
+	}
+
 	return serviceMapping;
 }
 
@@ -2118,14 +2291,16 @@ ServiceMigrationAddOrReplace(const void *key, const void *value, void *context)
 	bsdMapping = ctx->bsdMapping;
 	setMapping = ctx->setMapping;
 	sourceServiceSetMapping = ctx->serviceSetMapping;
-	
-	if (isA_SCNetworkService(targetService) != NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("ServiceMigrationAddOrReplace: Removing target service: %@"), targetService);
-		SCNetworkServiceRemove(targetService);
+
+	if ((setMapping != NULL || sourceServiceSetMapping != NULL)) {
+		if (isA_SCNetworkService(targetService) != NULL) {
+			SC_log(LOG_INFO, "Removing target service: %@", targetService);
+			SCNetworkServiceRemove(targetService);
+		}
 	}
-	SCLog(_sc_debug, LOG_NOTICE, CFSTR("ServiceMigrationAddOrReplace: Adding service with %@"), sourceService);
+	SC_log(LOG_INFO, "Adding service: %@", sourceService);
 	if (__SCNetworkServiceMigrateNew(targetPrefs, sourceService, bsdMapping, setMapping, sourceServiceSetMapping) ==  FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("Could not Add Service: %@"), sourceService);
+		SC_log(LOG_INFO, "Could not add service: %@", sourceService);
 	}
 }
 
@@ -2141,14 +2316,14 @@ _SCNetworkMigrationDoServiceMigration(SCPreferencesRef sourcePrefs, SCPreference
 	    (targetPrefs == NULL) ||
 	    (isA_CFDictionary(serviceMapping) == NULL) ||
 	    (isA_CFDictionary(bsdMapping) == NULL)) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoServiceMigration: targetPrefs or serviceMapping or bsdMapping is NULL"));
+		SC_log(LOG_INFO, "No sourcePrefs, targetPrefs, serviceMapping, or bsdMapping");
 		goto done;
 	}
 	context.targetPrefs = targetPrefs;
 	context.bsdMapping = bsdMapping;
 	context.setMapping = setMapping;
 	context.serviceSetMapping = serviceSetMapping;
-	
+
 	CFDictionaryApplyFunction(serviceMapping, ServiceMigrationAddOrReplace, &context);
 
 	success = TRUE;
@@ -2167,8 +2342,8 @@ _SCNetworkMigrationDoSystemMigration(SCPreferencesRef sourcePrefs, SCPreferences
 	CFDictionaryRef btmmDSID = NULL;
 	CFStringRef btmmDSIDPath;
 	CFStringRef btmmPath;
-	
-	
+
+
 	if ((sourcePrefs == NULL) ||
 	    (targetPrefs == NULL)) {
 		return FALSE;
@@ -2186,30 +2361,28 @@ _SCNetworkMigrationDoSystemMigration(SCPreferencesRef sourcePrefs, SCPreferences
 	}
 
 	computerName = _SCPreferencesCopyComputerName(sourcePrefs, &nameEncoding);
-
 	if (computerName != NULL) {
 		SCPreferencesSetComputerName(targetPrefs, computerName, nameEncoding);
 		CFRelease(computerName);
 	}
-	
+
 	btmmPath = CFStringCreateWithFormat(NULL, NULL,
 					    CFSTR("/%@/%@/%@"),
 					    kSCPrefSystem,
 					    kSCCompNetwork,
 					    BACK_TO_MY_MAC);
 	btmm = SCPreferencesPathGetValue(sourcePrefs, btmmPath);
-	
 	if (btmm != NULL) {
 		SCPreferencesPathSetValue(targetPrefs, btmmPath, btmm);
 	}
 	CFRelease(btmmPath);
-	
+
 	btmmDSIDPath = CFStringCreateWithFormat(NULL, NULL,
 						CFSTR("/%@/%@/%@"),
 						kSCPrefSystem,
 						kSCCompNetwork,
 						BACK_TO_MY_MAC_DSIDS);
-	
+
 	btmmDSID = SCPreferencesPathGetValue(sourcePrefs, btmmDSIDPath);
 	if (btmmDSID != NULL) {
 		SCPreferencesPathSetValue(targetPrefs, btmmDSIDPath, btmmDSID);
@@ -2245,18 +2418,18 @@ add_virtual_interface(const void *value, void *context)
 	CFStringRef oldInterfaceBSDName = (CFStringRef)value;
 	SCNetworkInterfaceRef newInterface;
 	CFStringRef newInterfaceBSDName;
-	
-	SCLog(_sc_debug, LOG_NOTICE, CFSTR("old interface BSD name is %@"), oldInterfaceBSDName);
+
+	SC_log(LOG_INFO, "old BSD interface name: %@", oldInterfaceBSDName);
+
 	newInterfaceBSDName = CFDictionaryGetValue(bsdMapping, oldInterfaceBSDName);
 	if (newInterfaceBSDName == NULL) {
 		return;
 	}
-	
-	SCLog(_sc_debug, LOG_NOTICE, CFSTR("new interface BSD name is %@"), newInterfaceBSDName);
+	SC_log(LOG_INFO, "new BSD interface name: %@", newInterfaceBSDName);
+
 	newInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ctx->ni_prefs, newInterfaceBSDName);
-	
 	if (newInterface != NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("Adding interface to interfaceList: %@"), newInterface);
+		SC_log(LOG_INFO, "Adding interface to interfaceList: %@", newInterface);
 		CFArrayAppendValue(interfaceList, newInterface);
 		CFRelease(newInterface);
 	}
@@ -2281,47 +2454,47 @@ add_target_bridge(const void *key, const void *value, void *context)
 	SCPreferencesRef prefs = ctx->prefs;
 	CFDictionaryRef serviceSetMapping = ctx->serviceSetMapping;
 	CFDictionaryRef setMapping = ctx->setMapping;
-	
+
 	newInterfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-	
+
 	memberListContext.bsdMapping = ctx->bsdMapping;
 	memberListContext.interfaceList = newInterfaceList;
 	memberListContext.ni_prefs = ctx->ni_prefs;
-	
+
 	CFArrayApplyFunction(oldInterfaceList, CFRangeMake(0, CFArrayGetCount(oldInterfaceList)), add_virtual_interface, &memberListContext);
-	
+
 	newBridge = SCBridgeInterfaceCreate(prefs);
-	
-	if (__SCBridgeInterfaceSetMemberInterfaces(newBridge, newInterfaceList) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bridge: Adding Member Interfaces failed"));
+
+	if (!__SCBridgeInterfaceSetMemberInterfaces(newBridge, newInterfaceList)) {
+		SC_log(LOG_INFO, "__SCBridgeInterfaceSetMemberInterfaces() failed");
 	}
 	CFRelease(newInterfaceList);
-	
+
 	bridgeOptions = SCBridgeInterfaceGetOptions(oldBridge);
 	if (bridgeOptions != NULL) {
 		SCBridgeInterfaceSetOptions(newBridge, bridgeOptions);
 	}
-	
+
 	bridgeName = SCNetworkInterfaceGetLocalizedDisplayName(oldBridge);
-	
+
 	if (bridgeName != NULL) {
 		SCBridgeInterfaceSetLocalizedDisplayName(newBridge, bridgeName);
 	}
-	
+
 	oldBSDName = SCNetworkInterfaceGetBSDName(oldBridge);
 	if (oldBSDName == NULL) {
 		goto done;
 	}
-	
+
 	oldServiceList = CFDictionaryGetValue(bsdNameToServiceMapping, oldBSDName);
 	if (oldServiceList == NULL) {
 		goto done;
 	}
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(oldServiceList); idx++) {
 		SCNetworkServiceRef oldService = CFArrayGetValueAtIndex(oldServiceList, idx);
-		if (__SCNetworkServiceMigrateNew(prefs, oldService, bridgeBSDNameMapping, setMapping, serviceSetMapping) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bridge: Could not migrate service: %@"), oldService);
+		if (!__SCNetworkServiceMigrateNew(prefs, oldService, bridgeBSDNameMapping, setMapping, serviceSetMapping)) {
+			SC_log(LOG_INFO, "Could not migrate Bridge service: %@", oldService);
 		}
 	}
 done:
@@ -2332,15 +2505,15 @@ static void
 _SCNetworkMigrationRemoveBridgeServices(SCPreferencesRef prefs)
 {
 	CFArrayRef services = SCNetworkServiceCopyAll(prefs);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx);
 		SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
-		
+
 		if ((bsdName != NULL) &&
-		SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBridge) {
-			SCLog(TRUE, LOG_NOTICE, CFSTR("_SCNetworkMigrationRemoveBridgeServices: Removing services: %@"), service);
+		    (SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBridge)) {
+			SC_log(LOG_INFO, "Removing service: %@", service);
 			SCNetworkServiceRemove(service);
 		}
 	}
@@ -2353,16 +2526,16 @@ _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(SCPreferencesRef prefs)
 {
 	CFArrayRef services = SCNetworkServiceCopyAll(prefs);
 	CFMutableDictionaryRef bridgeServices = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx);
 		SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
-		
+
 		if ((bsdName != NULL) &&
 		SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBridge) {
 			CFMutableArrayRef serviceList;
-			if (CFDictionaryContainsKey(bridgeServices, bsdName) == FALSE) {
+			if (!CFDictionaryContainsKey(bridgeServices, bsdName)) {
 				serviceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 				CFDictionaryAddValue(bridgeServices, bsdName, serviceList);
 				CFRelease(serviceList);
@@ -2385,6 +2558,7 @@ _SCNetworkMigrationDoBridgeMigration (SCPreferencesRef sourcePrefs,
 				      CFDictionaryRef setMapping,
 				      CFDictionaryRef serviceSetMapping)
 {
+#pragma unused(sourceNIPrefs)
 	CFArrayRef allSourceBridges;
 	CFArrayRef allTargetBridges;
 	SCBridgeInterfaceRef bridge;
@@ -2394,30 +2568,30 @@ _SCNetworkMigrationDoBridgeMigration (SCPreferencesRef sourcePrefs,
 	SCVirtualInterfaceContext context;
 	CFIndex count = 0;
 	Boolean success = FALSE;
-	
+
 	allSourceBridges = SCBridgeInterfaceCopyAll(sourcePrefs);
 	allTargetBridges = SCBridgeInterfaceCopyAll(targetPrefs);
-	
+
 	bsdNameToBridgeServices = _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(sourcePrefs);
-	
+
 	bridgeInterfaceMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 	bridgeMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	
+
 	// Create Bridge Interface Mapping
 	for (CFIndex idx = 0; idx < CFArrayGetCount(allSourceBridges); idx++) {
 		bridge = CFArrayGetValueAtIndex(allSourceBridges, idx);
 		CFArrayRef bridgeMembers = SCBridgeInterfaceGetMemberInterfaces(bridge);
 		CFMutableArrayRef interfaceList;
-		
+
 		interfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 		for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(bridgeMembers); idx2++) {
 			CFStringRef interfaceName = NULL;
 			SCNetworkInterfaceRef interface = NULL;
-			
+
 			interface = CFArrayGetValueAtIndex(bridgeMembers, idx2);
 			interfaceName = SCNetworkInterfaceGetBSDName(interface);
-			
-			if (CFDictionaryContainsKey(bsdMapping, interfaceName) == TRUE) {
+
+			if (CFDictionaryContainsKey(bsdMapping, interfaceName)) {
 				CFStringRef bridgeNewName = CFStringCreateWithFormat(NULL, NULL, CFSTR("bridge%ld"), count);
 				CFDictionaryAddValue(bridgeMapping, interfaceName, bridgeNewName);
 				CFArrayAppendValue(interfaceList, interfaceName);
@@ -2432,16 +2606,16 @@ _SCNetworkMigrationDoBridgeMigration (SCPreferencesRef sourcePrefs,
 	}
 	// Remove bridge services from target
 	_SCNetworkMigrationRemoveBridgeServices(targetPrefs);
-	
+
 	// Remove Target Bridges
 	for (CFIndex idx = 0; idx < CFArrayGetCount(allTargetBridges); idx++) {
 		bridge = CFArrayGetValueAtIndex(allTargetBridges, idx);
-		if (SCBridgeInterfaceRemove(bridge) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoBridgeMigration: Could not remove bridge: %@"), bridge);
+		if (!SCBridgeInterfaceRemove(bridge)) {
+			SC_log(LOG_INFO, "SCBridgeInterfaceRemove() failed: %@", bridge);
 			goto done;
 		}
 	}
-	
+
 	context.prefs = targetPrefs;
 	context.ni_prefs = targetNIPrefs;
 	context.bsdMapping = bsdMapping;
@@ -2449,10 +2623,10 @@ _SCNetworkMigrationDoBridgeMigration (SCPreferencesRef sourcePrefs,
 	context.mappingBSDNameToService = bsdNameToBridgeServices;
 	context.setMapping = setMapping;
 	context.serviceSetMapping = serviceSetMapping;
-	
+
 	// Add Bridge configurations at the target using mapping
 	CFDictionaryApplyFunction(bridgeInterfaceMapping, add_target_bridge, &context);
-	
+
 	success = TRUE;
 done:
 	CFRelease(allSourceBridges);
@@ -2483,31 +2657,31 @@ add_target_bond(const void *key, const void *value, void *context)
 	SCPreferencesRef prefs = ctx->prefs;
 	CFDictionaryRef serviceSetMapping = ctx->serviceSetMapping;
 	CFDictionaryRef setMapping = ctx->setMapping;
-	
+
 	newInterfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-	
+
 	memberListContext.bsdMapping = ctx->bsdMapping;
 	memberListContext.interfaceList = newInterfaceList;
 	memberListContext.ni_prefs = ctx->ni_prefs;
-	
+
 	CFArrayApplyFunction(oldInterfaceList, CFRangeMake(0, CFArrayGetCount(oldInterfaceList)), add_virtual_interface, &memberListContext);
-	
+
 	newBond = SCBondInterfaceCreate(prefs);
-	if (__SCBondInterfaceSetMemberInterfaces(newBond, newInterfaceList) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bond: Adding member interface failed."));
+	if (!__SCBondInterfaceSetMemberInterfaces(newBond, newInterfaceList)) {
+		SC_log(LOG_INFO, "__SCBondInterfaceSetMemberInterfaces() failed");
 	}
 	CFRelease(newInterfaceList);
-	
+
 	bondOptions = SCBondInterfaceGetOptions(oldBond);
 	if (bondOptions != NULL) {
 		SCBondInterfaceSetOptions(newBond, bondOptions);
 	}
-	
+
 	bondName = SCNetworkInterfaceGetLocalizedDisplayName(oldBond);
 	if (bondName != NULL) {
 		SCBondInterfaceSetLocalizedDisplayName(newBond, bondName);
 	}
-	
+
 	bondMode = SCBondInterfaceGetMode(oldBond);
 	if (bondMode != NULL) {
 		SCBondInterfaceSetMode(newBond, bondMode);
@@ -2516,16 +2690,16 @@ add_target_bond(const void *key, const void *value, void *context)
 	if (oldBSDName == NULL) {
 		goto done;
 	}
-	
+
 	oldServiceList = CFDictionaryGetValue(bsdNameToServiceMapping, oldBSDName);
 	if (oldServiceList == NULL) {
 		goto done;
 	}
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(oldServiceList); idx++) {
 		SCNetworkServiceRef oldService = CFArrayGetValueAtIndex(oldServiceList, idx);
-		if (__SCNetworkServiceMigrateNew(prefs, oldService, bondBSDNameMapping, setMapping, serviceSetMapping) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bond: Could not migrate service: %@"), oldService);
+		if (!__SCNetworkServiceMigrateNew(prefs, oldService, bondBSDNameMapping, setMapping, serviceSetMapping)) {
+			SC_log(LOG_INFO, "Could not migrate Bond service: %@", oldService);
 		}
 	}
 done:
@@ -2536,12 +2710,12 @@ static void
 _SCNetworkMigrationRemoveBondServices(SCPreferencesRef prefs)
 {
 	CFArrayRef services = SCNetworkServiceCopyAll(prefs);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx);
 		SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
-		
+
 		if ((bsdName != NULL) &&
 		SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBond) {
 			SCNetworkServiceRemove(service);
@@ -2556,16 +2730,16 @@ _SCNetworkMigrationCopyMappingBSDNameToBondServices(SCPreferencesRef prefs)
 {
 	CFArrayRef services = SCNetworkServiceCopyAll(prefs);
 	CFMutableDictionaryRef bondServices = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx);
 		SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
-		
+
 		if ((bsdName != NULL) &&
 		SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBond) {
 			CFMutableArrayRef serviceList;
-			if (CFDictionaryContainsKey(bondServices, bsdName) == FALSE) {
+			if (!CFDictionaryContainsKey(bondServices, bsdName)) {
 				serviceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 				CFDictionaryAddValue(bondServices, bsdName, serviceList);
 				CFRelease(serviceList);
@@ -2588,6 +2762,7 @@ _SCNetworkMigrationDoBondMigration (SCPreferencesRef sourcePrefs,
 				    CFDictionaryRef setMapping,
 				    CFDictionaryRef serviceSetMapping)
 {
+#pragma unused(sourceNIPrefs)
 	CFArrayRef allSourceBonds;
 	CFArrayRef allTargetBonds;
 	SCBondInterfaceRef bond;
@@ -2597,12 +2772,12 @@ _SCNetworkMigrationDoBondMigration (SCPreferencesRef sourcePrefs,
 	SCVirtualInterfaceContext context;
 	CFIndex count = 0;
 	Boolean success = FALSE;
-	
+
 	allSourceBonds = SCBondInterfaceCopyAll(sourcePrefs);
 	allTargetBonds = SCBondInterfaceCopyAll(targetPrefs);
-	
+
 	bsdNameToBondServices = _SCNetworkMigrationCopyMappingBSDNameToBondServices(sourcePrefs);
-	
+
 	bondInterfaceMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 	bondMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 	// Create Bond Interface mapping
@@ -2610,16 +2785,16 @@ _SCNetworkMigrationDoBondMigration (SCPreferencesRef sourcePrefs,
 		bond = CFArrayGetValueAtIndex(allSourceBonds, idx);
 		CFArrayRef bondMembers = SCBondInterfaceGetMemberInterfaces(bond);
 		CFMutableArrayRef interfaceList;
-		
+
 		interfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 		for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(bondMembers); idx2++) {
 			CFStringRef interfaceName;
 			SCNetworkInterfaceRef interface;
-			
+
 			interface = CFArrayGetValueAtIndex(bondMembers, idx2);
 			interfaceName = SCNetworkInterfaceGetBSDName(interface);
-			
-			if (CFDictionaryContainsKey(bsdMapping, interfaceName) == TRUE) {
+
+			if (CFDictionaryContainsKey(bsdMapping, interfaceName)) {
 				CFStringRef bondNewName = CFStringCreateWithFormat(NULL, NULL, CFSTR("bond%ld"), count);
 				CFDictionaryAddValue(bondMapping, interfaceName, bondNewName);
 				CFArrayAppendValue(interfaceList, interfaceName);
@@ -2634,16 +2809,16 @@ _SCNetworkMigrationDoBondMigration (SCPreferencesRef sourcePrefs,
 	}
 	// Remove bond services from target
 	_SCNetworkMigrationRemoveBondServices(targetPrefs);
-	
+
 	// Remove Target Bonds
 	for (CFIndex idx = 0; idx < CFArrayGetCount(allTargetBonds); idx++) {
 		bond = CFArrayGetValueAtIndex(allTargetBonds, idx);
-		if (SCBondInterfaceRemove(bond) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoBondMigration: Could not remove bond: %@"), bond);
+		if (!SCBondInterfaceRemove(bond)) {
+			SC_log(LOG_INFO, "SCBondInterfaceRemove() failed: %@", bond);
 			goto done;
 		}
 	}
-	
+
 	context.prefs = targetPrefs;
 	context.ni_prefs = targetNIPrefs;
 	context.bsdMapping = bsdMapping;
@@ -2651,10 +2826,10 @@ _SCNetworkMigrationDoBondMigration (SCPreferencesRef sourcePrefs,
 	context.mappingBSDNameToService = bsdNameToBondServices;
 	context.setMapping = setMapping;
 	context.serviceSetMapping = serviceSetMapping;
-	
+
 	// Add Bond configurations at the target using mapping
 	CFDictionaryApplyFunction(bondInterfaceMapping, add_target_bond, &context);
-	
+
 	success = TRUE;
 done:
 	CFRelease(allSourceBonds);
@@ -2687,70 +2862,71 @@ add_target_vlan(const void *value, void *context)
 	CFNumberRef vlanTag;
 	CFStringRef vlanName;
 	CFDictionaryRef vlanOptions;
-	
+
 	bsdMapping = ctx->bsdMapping;
+
 	oldPhysicalInterface = SCVLANInterfaceGetPhysicalInterface(oldVLAN);
-	
 	if (oldPhysicalInterface == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: oldPhysicalInterface is NULL"));
+		SC_log(LOG_INFO, "No old VLAN physical interface");
 		goto done;
 	}
+
 	oldPhysicalInterfaceName = SCNetworkInterfaceGetBSDName(oldPhysicalInterface);
-	
 	if (oldPhysicalInterfaceName == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: oldPhysicalInterfaceName is NULL"));
+		SC_log(LOG_INFO, "No old VLAN physical interface name");
 		goto done;
 	}
-	
+
 	newPhysicalInterfaceName = CFDictionaryGetValue(bsdMapping, oldPhysicalInterfaceName);
 	if (newPhysicalInterfaceName == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: newPhysicalInterfaceName is NULL"));
+		SC_log(LOG_INFO, "No new VLAN physical interface name");
 		goto done;
 	}
 	newPhysicalInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ctx->ni_prefs, newPhysicalInterfaceName);
 	if (newPhysicalInterface == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: newPhysicalInterface is NULL"));
+		SC_log(LOG_INFO, "Could not create new VLAN physical interface");
 		goto done;
 	}
-	
+
 	vlanTag = SCVLANInterfaceGetTag(oldVLAN);
 	if (vlanTag == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: vlanTag is NULL"));
+		SC_log(LOG_INFO, "No old VLAN interface tag");
 		goto done;
 	}
-	
+
 	newVLAN = SCVLANInterfaceCreate(prefs, newPhysicalInterface, vlanTag);
 	if (newVLAN == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: Could not create newVLAN"));
+		SC_log(LOG_INFO, "Could not create new VLAN interface");
+		goto done;
 	}
-	
+
 	vlanName = SCNetworkInterfaceGetLocalizedDisplayName(oldVLAN);
 	if (vlanName != NULL) {
 		SCVLANInterfaceSetLocalizedDisplayName(newVLAN, vlanName);
 	}
-	
+
 	vlanOptions = SCVLANInterfaceGetOptions(oldVLAN);
 	if (vlanOptions != NULL) {
 		SCVLANInterfaceSetOptions(newVLAN, vlanOptions);
 	}
 	oldBSDName = SCNetworkInterfaceGetBSDName(oldVLAN);
-	
+
 	if (oldBSDName == NULL) {
 		goto done;
 	}
-	
+
 	oldServiceList = CFDictionaryGetValue(bsdNameToServiceMapping, oldBSDName);
 	if (oldServiceList == NULL) {
 		goto done;
 	}
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(oldServiceList); idx++) {
 		oldService = CFArrayGetValueAtIndex(oldServiceList, idx);
-		if (__SCNetworkServiceMigrateNew(prefs, oldService, vlanBSDMapping, setMapping, serviceSetMapping) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: Could not migrate service: %@"), oldService);
+		if (!__SCNetworkServiceMigrateNew(prefs, oldService, vlanBSDMapping, setMapping, serviceSetMapping)) {
+			SC_log(LOG_INFO, "Could not migrate VLAN service: %@", oldService);
 		}
 	}
-	
+
 done:
 	if (newPhysicalInterface != NULL) {
 		CFRelease(newPhysicalInterface);
@@ -2764,18 +2940,18 @@ static void
 _SCNetworkMigrationRemoveVLANServices(SCPreferencesRef prefs)
 {
 	CFArrayRef services = SCNetworkServiceCopyAll(prefs);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx);
 		SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
-		
+
 		if ((bsdName != NULL) &&
 		    SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeVLAN) {
 			SCNetworkServiceRemove(service);
 		}
 	}
-	
+
 	CFRelease(services);
 }
 
@@ -2785,16 +2961,16 @@ _SCNetworkMigrationCopyMappingBSDNameToVLANServices(SCPreferencesRef prefs)
 {
 	CFArrayRef services = SCNetworkServiceCopyAll(prefs);
 	CFMutableDictionaryRef vlanServices = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx);
 		SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 		CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface);
-		
+
 		if ((bsdName != NULL) &&
 		    SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeVLAN) {
 			CFMutableArrayRef serviceList;
-			if (CFDictionaryContainsKey(vlanServices, bsdName) == FALSE) {
+			if (!CFDictionaryContainsKey(vlanServices, bsdName)) {
 				serviceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 				CFDictionaryAddValue(vlanServices, bsdName, serviceList);
 				CFRelease(serviceList);
@@ -2816,6 +2992,7 @@ _SCNetworkMigrationDoVLANMigration (SCPreferencesRef sourcePrefs,
 				    CFDictionaryRef setMapping,
 				    CFDictionaryRef serviceSetMapping)
 {
+#pragma unused(sourceNIPrefs)
 	CFArrayRef allSourceVLAN;
 	CFArrayRef allTargetVLAN;
 	SCVirtualInterfaceContext context;
@@ -2825,28 +3002,28 @@ _SCNetworkMigrationDoVLANMigration (SCPreferencesRef sourcePrefs,
 	CFMutableArrayRef vlanList;
 	CFMutableDictionaryRef vlanMapping;
 	CFDictionaryRef bsdNameToVLANServices;
-	
+
 	allSourceVLAN = SCVLANInterfaceCopyAll(sourcePrefs);
 	allTargetVLAN = SCVLANInterfaceCopyAll(targetPrefs);
-	
+
 	bsdNameToVLANServices = _SCNetworkMigrationCopyMappingBSDNameToVLANServices(sourcePrefs);
-	
+
 	vlanList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 	vlanMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(allSourceVLAN); idx++) {
 		vlan = CFArrayGetValueAtIndex(allSourceVLAN, idx);
 		CFStringRef vlanBSDName = SCNetworkInterfaceGetBSDName(vlan);
 		SCNetworkInterfaceRef physicalInterface = SCVLANInterfaceGetPhysicalInterface(vlan);
 		CFStringRef physicalInterfaceName;
-		
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVLANMigration: physical interface is %@"), physicalInterface);
-		
+
+		SC_log(LOG_DEBUG, "physical VLAN interface: %@", physicalInterface);
+
 		physicalInterfaceName = SCNetworkInterfaceGetBSDName(physicalInterface);
-                SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVLANMigration: Physical Interface name is %@"), physicalInterfaceName);
-                
+		SC_log(LOG_DEBUG, "physical VLAN interface name: %@", physicalInterfaceName);
+
 		// Add VLAN to be migrated if the mapping between interfaces exists
-		if (CFDictionaryContainsKey(bsdMapping, physicalInterfaceName) == TRUE) {
+		if (CFDictionaryContainsKey(bsdMapping, physicalInterfaceName)) {
 			CFStringRef vlanNewName = CFStringCreateWithFormat(NULL, NULL, CFSTR("vlan%ld"), count);
 			CFDictionaryAddValue(vlanMapping, vlanBSDName, vlanNewName);
 			CFArrayAppendValue(vlanList, vlan);
@@ -2856,16 +3033,16 @@ _SCNetworkMigrationDoVLANMigration (SCPreferencesRef sourcePrefs,
 	}
 	// Remove vlan services from target
 	_SCNetworkMigrationRemoveVLANServices(targetPrefs);
-	
+
 	// Remove Target VLANs
 	for (CFIndex idx = 0; idx < CFArrayGetCount(allTargetVLAN); idx++) {
 		vlan = CFArrayGetValueAtIndex(allTargetVLAN, idx);
-		if (SCVLANInterfaceRemove(vlan) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVLANMigration: Could not remove VLAN: %@"), vlan);
+		if (!SCVLANInterfaceRemove(vlan)) {
+			SC_log(LOG_INFO, "SCVLANInterfaceRemove() failed: %@", vlan);
 			goto done;
 		}
 	}
-	
+
 	context.prefs = targetPrefs;
 	context.ni_prefs = targetNIPrefs;
 	context.bsdMapping = bsdMapping;
@@ -2873,10 +3050,10 @@ _SCNetworkMigrationDoVLANMigration (SCPreferencesRef sourcePrefs,
 	context.mappingBSDNameToService = bsdNameToVLANServices;
 	context.setMapping = setMapping;
 	context.serviceSetMapping = serviceSetMapping;
-	
+
 	// Add VLAN configurations at the target using vlanList
 	CFArrayApplyFunction(vlanList, CFRangeMake(0, CFArrayGetCount(vlanList)), add_target_vlan, &context);
-	
+
 	success = TRUE;
 done:
 	CFRelease(allSourceVLAN);
@@ -2897,28 +3074,28 @@ _SCNetworkMigrationDoVirtualNetworkInterfaceMigration(SCPreferencesRef sourcePre
 						      CFDictionaryRef serviceSetMapping)
 {
 	// Handle Bridges
-	if (_SCNetworkMigrationDoBridgeMigration(sourcePrefs, sourceNIPrefs,
+	if (!_SCNetworkMigrationDoBridgeMigration(sourcePrefs, sourceNIPrefs,
 						 targetPrefs, targetNIPrefs,
-						 bsdMapping, setMapping, serviceSetMapping) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: Bridge migration failed"));
+						 bsdMapping, setMapping, serviceSetMapping)) {
+		SC_log(LOG_INFO, "Bridge migration failed");
 	}
-	
+
 	// Handle Bonds
-	if (_SCNetworkMigrationDoBondMigration(sourcePrefs, sourceNIPrefs,
+	if (!_SCNetworkMigrationDoBondMigration(sourcePrefs, sourceNIPrefs,
 					       targetPrefs, targetNIPrefs,
-					       bsdMapping, setMapping, serviceSetMapping) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: Bond migration failed"));
+					       bsdMapping, setMapping, serviceSetMapping)) {
+		SC_log(LOG_INFO, "Bond migration failed");
 	}
-	
+
 	// Handle VLANs
-	if (_SCNetworkMigrationDoVLANMigration(sourcePrefs, sourceNIPrefs,
+	if (!_SCNetworkMigrationDoVLANMigration(sourcePrefs, sourceNIPrefs,
 					       targetPrefs, targetNIPrefs,
-					       bsdMapping, setMapping, serviceSetMapping) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: VLAN migration failed"));
+					       bsdMapping, setMapping, serviceSetMapping)) {
+		SC_log(LOG_INFO, "VLAN migration failed");
 	}
 	return TRUE;
 }
-#endif
+#endif	// !TARGET_OS_IPHONE
 
 typedef struct {
 	SCPreferencesRef prefs;
@@ -2935,7 +3112,7 @@ create_migrated_order(const void *value, void *context)
 	CFArrayRef targetServiceOrder = ctx->serviceOrder;
 	CFStringRef migratedServiceID = (CFStringRef)value;
 	Boolean *success = ctx->success;
-	
+
 	if (*success == FALSE) {
 		return;
 	}
@@ -2943,7 +3120,7 @@ create_migrated_order(const void *value, void *context)
 	// which were migrated into the target configuration
 	for (CFIndex idx = 0; idx < CFArrayGetCount(targetServiceOrder); idx++) {
 		CFStringRef targetServiceID = CFArrayGetValueAtIndex(targetServiceOrder, idx);
-		if (CFEqual(migratedServiceID, targetServiceID) == TRUE) {
+		if (CFEqual(migratedServiceID, targetServiceID)) {
 			CFArrayAppendValue(migratedServiceOrder, migratedServiceID);
 			return;
 		}
@@ -2960,15 +3137,15 @@ create_non_migrated_service_list(const void *value, void *context)
 	SCNetworkServiceRef service;
 	Boolean *success = ctx->success;
 	CFStringRef targetServiceID = (CFStringRef)value;
-	
+
 	if (*success == FALSE) {
 		return;
 	}
 	// Adding all services not present in migratedServiceOrder into nonMigrated service
 	for (CFIndex idx = 0; idx < CFArrayGetCount(migratedServiceOrder); idx++) {
 		CFStringRef migratedServiceID = CFArrayGetValueAtIndex(migratedServiceOrder, idx);
-		
-		if (CFEqual(targetServiceID, migratedServiceID) == TRUE) {
+
+		if (CFEqual(targetServiceID, migratedServiceID)) {
 			return;
 		}
 	}
@@ -2977,7 +3154,7 @@ create_non_migrated_service_list(const void *value, void *context)
 		*success = FALSE;
 		return;
 	}
-	
+
 	CFArrayAppendValue(nonMigratedService, service);
 	CFRelease(service);
 }
@@ -2995,13 +3172,14 @@ preserve_service_order(const void *key, const void *value, void *context)
 	SCNetworkSetRef targetSet = (SCNetworkSetRef)value;
 	SCNetworkSetPrivateRef targetPrivate = (SCNetworkSetPrivateRef)targetSet;
 	CFArrayRef targetServiceOrder = NULL;
-	
+
 	if (*success == FALSE) {
 		return;
 	}
+
 	migratedServiceOrder = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 	nonMigratedServices = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-	
+
 	sourceServiceOrder = SCNetworkSetGetServiceOrder(sourceSet);
 	if (sourceServiceOrder == NULL) {
 		goto done;
@@ -3010,29 +3188,28 @@ preserve_service_order(const void *key, const void *value, void *context)
 	if (targetServiceOrder == NULL) {
 		goto done;
 	}
-	
+
 	migrated_context.prefs = NULL;
 	migrated_context.serviceOrder = targetServiceOrder;
 	migrated_context.serviceListMutable = migratedServiceOrder;
 	migrated_context.success = success;
-	
+
 	// Creating a list of service IDs which were migrated in the target set
 	// while maintaining the service order or the source set
 	CFArrayApplyFunction(sourceServiceOrder, CFRangeMake(0, CFArrayGetCount(sourceServiceOrder)), create_migrated_order, &migrated_context);
-	
-	if (success == FALSE) {
+	if (*success == FALSE) {
 		goto done;
 	}
-	
+
 	non_migrated_context.prefs = targetPrivate->prefs;
 	non_migrated_context.serviceOrder = migratedServiceOrder;
 	non_migrated_context.serviceListMutable = nonMigratedServices;
 	non_migrated_context.success = success;
-	
+
 	// Creating a list of all the services which were not migrated from the source set to the
 	// target set
 	CFArrayApplyFunction(targetServiceOrder, CFRangeMake(0, CFArrayGetCount(targetServiceOrder)), create_non_migrated_service_list, &non_migrated_context);
-	
+
 	// Remove non migrated service
 	for (CFIndex idx = 0; idx < CFArrayGetCount(nonMigratedServices); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(nonMigratedServices, idx);
@@ -3040,18 +3217,18 @@ preserve_service_order(const void *key, const void *value, void *context)
 	}
 	// Set migrated service order
 	SCNetworkSetSetServiceOrder(targetSet, migratedServiceOrder);
-	
+
 	// Add non migrated services
 	for (CFIndex idx = 0; idx < CFArrayGetCount(nonMigratedServices); idx++) {
 		SCNetworkServiceRef service = CFArrayGetValueAtIndex(nonMigratedServices, idx);
-		SCNetworkSetAddService(targetSet, service);
+		(void)SCNetworkSetAddService(targetSet, service);
 	}
-	
+
 done:
 	CFRelease(migratedServiceOrder);
 	CFRelease(nonMigratedServices);
 	return;
-	
+
 }
 
 static Boolean
@@ -3059,13 +3236,15 @@ _SCNetworkMigrationDoServiceOrderMigration(SCPreferencesRef sourcePrefs,
 					   SCPreferencesRef targetPrefs,
 					   CFDictionaryRef setMapping)
 {
+#pragma unused(sourcePrefs)
+#pragma unused(targetPrefs)
 	Boolean success = TRUE;
-	
-	if (isA_CFDictionary(setMapping) == NULL) {
+
+	if (!isA_CFDictionary(setMapping)) {
 		success = FALSE;
 		goto done;
 	}
-	
+
 	CFDictionaryApplyFunction(setMapping, preserve_service_order, &success);
 done:
 	return success;
@@ -3078,50 +3257,53 @@ done:
 static Boolean
 _SCNetworkConfigurationMigrateConfiguration(CFURLRef sourceDir, CFURLRef targetDir)
 {
-	CFDictionaryRef bsdNameMapping = NULL;              // Mapping between BSD name and SCNetworkInterfaceRef to help with mapping services
-	CFMutableDictionaryRef builtinMapping = NULL;       // Mapping between builtin interfaces between source and target configurations: (SCNetworkInterfaceRef -> SCNetworkInterfaceRef)
-	CFMutableDictionaryRef externalMapping = NULL;      // Mapping between external interfaces between source and target configurations: (SCNetworkInterfaceRef -> SCNetworkInterfaceRef)
+	CFDictionaryRef bsdNameMapping = NULL;			// Mapping between BSD name and SCNetworkInterfaceRef to help with mapping services
+	CFMutableDictionaryRef builtinMapping = NULL;		// Mapping between builtin interfaces between source and target configurations: (SCNetworkInterfaceRef -> SCNetworkInterfaceRef)
+	CFMutableDictionaryRef externalMapping = NULL;		// Mapping between external interfaces between source and target configurations: (SCNetworkInterfaceRef -> SCNetworkInterfaceRef)
 	Boolean migrationSuccess = FALSE;
-	CFArrayRef newTargetNetworkInterfaceEntity = NULL;  // Array of Interface Entity which used to create new target interfaces created during migration
-	CFDictionaryRef serviceMapping = NULL;              // Mapping between services of source to target. (SCNetworkServicesRef -> SCNetworkServicesRef)
+	CFArrayRef newTargetNetworkInterfaceEntity = NULL;	// Array of Interface Entity which used to create new target interfaces created during migration
+	CFDictionaryRef serviceMapping = NULL;			// Mapping between services of source to target. (SCNetworkServicesRef -> SCNetworkServicesRef)
 	CFDictionaryRef setMapping = NULL;
 	CFDictionaryRef sourceServiceSetMapping = NULL;
-	CFArrayRef sourceConfigurationFiles = NULL;							// Path to the source configuration files which need to be migrated
-	CFURLRef sourceNetworkInterfaceFile = NULL;			// Source CFURLRef for preferences.plist and NetworkInterfaces.plist
+	CFArrayRef sourceConfigurationFiles = NULL;		// Path to the source configuration files which need to be migrated
+	CFStringRef sourceModel = NULL;
+	CFURLRef sourceNetworkInterfaceFile = NULL;		// Source CFURLRef for preferences.plist and NetworkInterfaces.plist
 	char sourceNetworkInterfaceFileStr[PATH_MAX];
 	CFStringRef sourceNetworkInterfaceFileString = NULL;	// Source CFStringRef for preferences.plist and NetworkInterfaces.plist
-	SCPreferencesRef sourceNetworkInterfacePrefs = NULL;			// Source SCPreferencesRef for preferences.plist and NetworkInterfaces.plist
+	SCPreferencesRef sourceNetworkInterfacePrefs = NULL;	// Source SCPreferencesRef for preferences.plist and NetworkInterfaces.plist
 	CFURLRef sourcePreferencesFile = NULL;
 	char sourcePreferencesFileStr[PATH_MAX];
 	CFStringRef sourcePreferencesFileString = NULL;
 	SCPreferencesRef sourcePrefs = NULL;
-	CFArrayRef targetConfigurationFiles = NULL;							// Path to the target configuration files where migration will take place to
+	CFArrayRef targetConfigurationFiles = NULL;		// Path to the target configuration files where migration will take place to
 	Boolean targetConfigurationFilesPresent;
-	CFURLRef targetNetworkInterfaceFile = NULL;			// Target CFURLRef for preferences.plist and NetworkInterfaces.plist
+	CFStringRef targetModel = NULL;
+	CFURLRef targetNetworkInterfaceFile = NULL;		// Target CFURLRef for preferences.plist and NetworkInterfaces.plist
 	char targetNetworkInterfaceFileStr[PATH_MAX];
 	CFStringRef targetNetworkInterfaceFileString = NULL;	// Target CFStringRef for preferences.plist and NetworkInterfaces.plist
-	SCPreferencesRef targetNetworkInterfacePrefs = NULL;			// Target SCPreferencesRef for preferences.plist and NetworkInterfaces.plist
+	SCPreferencesRef targetNetworkInterfacePrefs = NULL;	// Target SCPreferencesRef for preferences.plist and NetworkInterfaces.plist
 	CFURLRef targetPreferencesFile = NULL;
 	char targetPreferencesFileStr[PATH_MAX];
 	CFStringRef targetPreferencesFileString = NULL;
 	SCPreferencesRef targetPrefs = NULL;
+	Boolean isUpgradeScenario = FALSE;
 	CFMutableDictionaryRef validityOptions = NULL;
 
 	// Check if configuration files exist in sourceDir
-	if (__SCNetworkConfigurationMigrateConfigurationFilesPresent(sourceDir, &sourceConfigurationFiles) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: sourceDir: (%@) doesn't contain configuration files"), sourceDir);
+	if (!__SCNetworkConfigurationMigrateConfigurationFilesPresent(sourceDir, &sourceConfigurationFiles)) {
+		SC_log(LOG_INFO, "sourceDir: (%@) doesn't contain configuration files", sourceDir);
 		goto done;
 	}
 
 	sourcePreferencesFile = CFArrayGetValueAtIndex(sourceConfigurationFiles, PREFERENCES_PLIST_INDEX);
-	if (CFURLGetFileSystemRepresentation(sourcePreferencesFile, TRUE, (UInt8*)sourcePreferencesFileStr, sizeof(sourcePreferencesFileStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), sourcePreferencesFile);
+	if (!CFURLGetFileSystemRepresentation(sourcePreferencesFile, TRUE, (UInt8*)sourcePreferencesFileStr, sizeof(sourcePreferencesFileStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", sourcePreferencesFile);
 		goto done;
 	}
 
 	sourceNetworkInterfaceFile = CFArrayGetValueAtIndex(sourceConfigurationFiles, NETWORK_INTERFACES_PLIST_INDEX);
-	if (CFURLGetFileSystemRepresentation(sourceNetworkInterfaceFile, TRUE, (UInt8*)sourceNetworkInterfaceFileStr, sizeof(sourceNetworkInterfaceFileStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), sourceNetworkInterfaceFile);
+	if (!CFURLGetFileSystemRepresentation(sourceNetworkInterfaceFile, TRUE, (UInt8*)sourceNetworkInterfaceFileStr, sizeof(sourceNetworkInterfaceFileStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", sourceNetworkInterfaceFile);
 		goto done;
 	}
 
@@ -3133,43 +3315,43 @@ _SCNetworkConfigurationMigrateConfiguration(CFURLRef sourceDir, CFURLRef targetD
 	if ((sourcePrefs == NULL) || (sourceNetworkInterfacePrefs == NULL)) {
 		goto done;
 	}
-	
-	if ((targetConfigurationFilesPresent = __SCNetworkConfigurationMigrateConfigurationFilesPresent(targetDir, &targetConfigurationFiles)) == FALSE) {
+
+	targetConfigurationFilesPresent = __SCNetworkConfigurationMigrateConfigurationFilesPresent(targetDir, &targetConfigurationFiles);
+	if (!targetConfigurationFilesPresent) {
 		if (targetConfigurationFiles == NULL) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: targetConfigurationFiles is NULL"));
+			SC_log(LOG_DEBUG, "targetConfigurationFiles is NULL");
 			goto done;
 		}
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: targetDir: (%@) doesn't contain configuration files ... Need to create default configuration"), targetDir);
+		SC_log(LOG_INFO, "targetDir: (%@) doesn't contain configuration files ... Need to create default configuration", targetDir);
 	}
-	
+
 	targetPreferencesFile = CFArrayGetValueAtIndex(targetConfigurationFiles, PREFERENCES_PLIST_INDEX);
-	if (CFURLGetFileSystemRepresentation(targetPreferencesFile, TRUE, (UInt8*)targetPreferencesFileStr, sizeof(targetPreferencesFileStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), targetPreferencesFile);
+	if (!CFURLGetFileSystemRepresentation(targetPreferencesFile, TRUE, (UInt8*)targetPreferencesFileStr, sizeof(targetPreferencesFileStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", targetPreferencesFile);
 		goto done;
 	}
 	targetNetworkInterfaceFile = CFArrayGetValueAtIndex(targetConfigurationFiles, NETWORK_INTERFACES_PLIST_INDEX);
-	if (CFURLGetFileSystemRepresentation(targetNetworkInterfaceFile, TRUE, (UInt8*)targetNetworkInterfaceFileStr, sizeof(targetNetworkInterfaceFileStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), targetNetworkInterfaceFile);
+	if (!CFURLGetFileSystemRepresentation(targetNetworkInterfaceFile, TRUE, (UInt8*)targetNetworkInterfaceFileStr, sizeof(targetNetworkInterfaceFileStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", targetNetworkInterfaceFile);
 		goto done;
 	}
 
 	targetPreferencesFileString = CFStringCreateWithCString(NULL, targetPreferencesFileStr, kCFStringEncodingUTF8);
 	targetNetworkInterfaceFileString = CFStringCreateWithCString(NULL, targetNetworkInterfaceFileStr, kCFStringEncodingUTF8);
 
-	if (targetConfigurationFilesPresent == TRUE) {
+	if (targetConfigurationFilesPresent) {
 		targetPrefs = SCPreferencesCreate(NULL, PLUGIN_ID, targetPreferencesFileString);
 		targetNetworkInterfacePrefs = SCPreferencesCreate(NULL, PLUGIN_ID, targetNetworkInterfaceFileString);
 		if ((targetPrefs == NULL) || (targetNetworkInterfacePrefs == NULL)) {
 			goto done;
 		}
-	}
-	else {
+	} else {
 		targetPrefs = __SCNetworkCreateDefaultPref(targetPreferencesFileString);
 		targetNetworkInterfacePrefs = __SCNetworkCreateDefaultNIPrefs(targetNetworkInterfaceFileString);
-		
+
 		if (targetPrefs == NULL ||
 		    targetNetworkInterfacePrefs == NULL) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Could not create default configuration."));
+			SC_log(LOG_DEBUG, "Could not create default configuration");
 			goto done;
 		}
 	}
@@ -3177,113 +3359,169 @@ _SCNetworkConfigurationMigrateConfiguration(CFURLRef sourceDir, CFURLRef targetD
 						    &kCFTypeDictionaryKeyCallBacks,
 						    &kCFTypeDictionaryValueCallBacks);
 	CFDictionaryAddValue(validityOptions, kSCNetworkConfigurationRepair, kCFBooleanTrue);
-	
-	SCLog(_sc_debug, LOG_NOTICE, CFSTR("sourcePreferenceFileString: %@\n sourceNetworkInterfaceFileString:%@\n targetPreferencesFileString:%@\ntargetNetworkInterfaceFileString:%@"), sourcePreferencesFileString, sourceNetworkInterfaceFileString,
-	      targetPreferencesFileString, targetNetworkInterfaceFileString);
+
+	SC_log(LOG_DEBUG, "sourcePreferenceFileString: %@\n"
+			  "sourceNetworkInterfaceFileString:%@\n"
+			  "targetPreferencesFileString:%@\n"
+			  "targetNetworkInterfaceFileString:%@",
+	       sourcePreferencesFileString,
+	       sourceNetworkInterfaceFileString,
+	       targetPreferencesFileString,
+	       targetNetworkInterfaceFileString);
 
 	// Setting Bypass Interface to avoid looking at system interfaces
 	__SCPreferencesSetLimitSCNetworkConfiguration(sourcePrefs, TRUE);
 	__SCPreferencesSetLimitSCNetworkConfiguration(targetPrefs, TRUE);
 
+	sourceModel = SCPreferencesGetValue(sourcePrefs, MODEL);
+	targetModel = SCPreferencesGetValue(targetPrefs, MODEL);
+
+	isUpgradeScenario = (isA_CFString(sourceModel) && isA_CFString(targetModel) && CFStringCompare(sourceModel, targetModel, 0) == kCFCompareEqualTo);
+
 	// Create services for builtin interfaces at source if they don't exist
 	(void)_SCNetworkConfigurationCreateBuiltinInterfaceServices(sourcePrefs, sourceNetworkInterfacePrefs);
 	// Checking validity of the source and destination preferences before continuing
-	if (_SCNetworkConfigurationCheckValidityUsingPreferences(sourcePrefs,
+	if (!_SCNetworkConfigurationCheckValidityWithPreferences(sourcePrefs,
 								 sourceNetworkInterfacePrefs,
-								 validityOptions) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Source configuration is not valid"));
+								 validityOptions)) {
+		SC_log(LOG_INFO, "Source configuration not valid");
 		goto skipServiceMigration;
 	}
 	// Only call this function if configuration files were not created by default
-	if (targetConfigurationFilesPresent == TRUE) {
+	if (targetConfigurationFilesPresent) {
 		// Create services for builtin interfaces at target if they don't exist
 		(void)_SCNetworkConfigurationCreateBuiltinInterfaceServices(targetPrefs, targetNetworkInterfacePrefs);
-		if (_SCNetworkConfigurationCheckValidityUsingPreferences(targetPrefs,
+		if (!_SCNetworkConfigurationCheckValidityWithPreferences(targetPrefs,
 									 targetNetworkInterfacePrefs,
-									 validityOptions) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Target configuration is not valid"));
+									 validityOptions)) {
+			SC_log(LOG_INFO, "Target configuration not valid");
 			goto skipServiceMigration;
 		}
 	}
+	SC_log(LOG_DEBUG, "This is %san upgrade scenario", isUpgradeScenario ? "" : "not ");
+	// Upgrade scenario, source and target models match
+	if (isUpgradeScenario) {
+		Boolean foundNewInterface = FALSE;
+		// Create SCPreferences to copy the target prefs
+		SCPreferencesRef upgradeSourcePrefs = SCPreferencesCreate(NULL, CFSTR("Upgrade Source Prefs"), NULL);
+		SCPreferencesRef upgradeSourceNIPrefs = SCPreferencesCreate(NULL, CFSTR("Upgrade Source NI Prefs"), NULL);
 
-	builtinMapping = _SCNetworkConfigurationCopyBuiltinMapping(sourceNetworkInterfacePrefs, targetNetworkInterfacePrefs);
-	externalMapping = _SCNetworkConfigurationCopyExternalInterfaceMapping(sourceNetworkInterfacePrefs, targetNetworkInterfacePrefs);
+		// Content of target prefs
+		CFDictionaryRef targetPrefsContent = SCPreferencesPathGetValue(targetPrefs, CFSTR("/"));
+		CFDictionaryRef targetNIPrefsContent  = SCPreferencesPathGetValue(targetNetworkInterfacePrefs, CFSTR("/"));
 
-	/*
-	 TODO:
-	 Now builtin and external interface mapping is complete, work needs to be done on updating the preferences.plist and NetworkInterface.plist.
+		// Backing up the target prefs into source prefs
+		SCPreferencesPathSetValue(upgradeSourcePrefs, CFSTR("/"), targetPrefsContent);
+		SCPreferencesPathSetValue(upgradeSourceNIPrefs, CFSTR("/"), targetNIPrefsContent);
 
-	 Also, work needs to be done to check the validity of the data in preferences in source and target destinations, and after migration
-	 */
+		// Copying content from the source prefs
+		CFDictionaryRef sourcePrefsContent = SCPreferencesPathGetValue(sourcePrefs, CFSTR("/"));
+		CFDictionaryRef sourceNIPreferencesContent = SCPreferencesPathGetValue(sourceNetworkInterfacePrefs, CFSTR("/"));
 
-	newTargetNetworkInterfaceEntity = _SCNetworkMigrationCreateNetworkInterfaceArray(targetNetworkInterfacePrefs, externalMapping);
-	if (isA_CFArray(newTargetNetworkInterfaceEntity) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: newTargetNetworkInterfaceEntity is NULL or not of correct type"));
-		goto done;
-	}
-	// Write new interface mapping to NetworkInterfaces.plist
-	if (__SCNetworkInterfaceSaveStoredWithPreferences(targetNetworkInterfacePrefs, newTargetNetworkInterfaceEntity) == FALSE)
-	{
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: SCNetworkInterfaceSaveStoreWithPreferences failed to update NetworkInterface.plist"));
-		goto done;
-	}
-	// Create BSD Name Mapping to facilitate mapping of services
-	bsdNameMapping = _SCNetworkMigrationCreateBSDNameMapping(builtinMapping, externalMapping);
+		// Setting the contents of the source prefs into the target prefs
+		SCPreferencesPathSetValue(targetPrefs, CFSTR("/"), sourcePrefsContent);
+		SCPreferencesPathSetValue(targetNetworkInterfacePrefs, CFSTR("/"), sourceNIPreferencesContent);
 
-	if (isA_CFDictionary(bsdNameMapping) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: BSD Name Mapping is NULL"));
-		goto done;
-	}
-	SCLog(_sc_debug, LOG_NOTICE, CFSTR("BSD Name Mapping: %@"), bsdNameMapping);
-	serviceMapping = _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(sourcePrefs, targetPrefs, bsdNameMapping);
+		// Getting the mapping of the non builtin interfaces between source and target
+		externalMapping = _SCNetworkConfigurationCopyExternalInterfaceMapping(upgradeSourceNIPrefs, targetNetworkInterfacePrefs);
 
-	if (isA_CFDictionary(serviceMapping) == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Service Mapping is NULL"));
-		goto done;
-	}
-	SCLog(_sc_debug, LOG_NOTICE, CFSTR("Service Mapping: %@"), serviceMapping);
+		newTargetNetworkInterfaceEntity = _SCNetworkMigrationCreateNetworkInterfaceArray(targetNetworkInterfacePrefs, externalMapping, &foundNewInterface);
+		if (foundNewInterface) {
+			if (isA_CFArray(newTargetNetworkInterfaceEntity) == NULL) {
+				SC_log(LOG_INFO, "newTargetNetworkInterfaceEntity is NULL or not of correct type");
+				CFRelease(upgradeSourcePrefs);
+				CFRelease(upgradeSourceNIPrefs);
+				goto done;
+			}
+			// Write new interface mapping to NetworkInterfaces.plist
+			if (!__SCNetworkInterfaceSaveStoredWithPreferences(targetNetworkInterfacePrefs, newTargetNetworkInterfaceEntity)) {
+				SC_log(LOG_INFO, "SCNetworkInterfaceSaveStoreWithPreferences: failed to update NetworkInterfaces.plist");
+				CFRelease(upgradeSourcePrefs);
+				CFRelease(upgradeSourceNIPrefs);
+				goto done;
+			}
+
+			// Create BSD Name Mapping to facilitate mapping of services
+			bsdNameMapping = _SCNetworkMigrationCreateBSDNameMapping(NULL, externalMapping);
+
+			serviceMapping = _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(upgradeSourcePrefs, targetPrefs, bsdNameMapping);
+
+			_SCNetworkMigrationDoServiceMigration(upgradeSourcePrefs, targetPrefs,
+							      serviceMapping, bsdNameMapping,
+							      NULL, NULL);
+		}
+		CFRelease(upgradeSourcePrefs);
+		CFRelease(upgradeSourceNIPrefs);
+	} else {
+		builtinMapping = _SCNetworkConfigurationCopyBuiltinMapping(sourceNetworkInterfacePrefs, targetNetworkInterfacePrefs);
+		externalMapping = _SCNetworkConfigurationCopyExternalInterfaceMapping(sourceNetworkInterfacePrefs, targetNetworkInterfacePrefs);
+
+		newTargetNetworkInterfaceEntity = _SCNetworkMigrationCreateNetworkInterfaceArray(targetNetworkInterfacePrefs, externalMapping, NULL);
+		if (isA_CFArray(newTargetNetworkInterfaceEntity) == NULL) {
+			SC_log(LOG_INFO, "newTargetNetworkInterfaceEntity is NULL or not of correct type");
+			goto done;
+		}
+		// Write new interface mapping to NetworkInterfaces.plist
+		if (!__SCNetworkInterfaceSaveStoredWithPreferences(targetNetworkInterfacePrefs, newTargetNetworkInterfaceEntity)) {
+			SC_log(LOG_INFO, "SCNetworkInterfaceSaveStoreWithPreferences: failed to update NetworkInterfaces.plist");
+			goto done;
+		}
+		// Create BSD Name Mapping to facilitate mapping of services
+		bsdNameMapping = _SCNetworkMigrationCreateBSDNameMapping(builtinMapping, externalMapping);
+
+		if (isA_CFDictionary(bsdNameMapping) == NULL) {
+			SC_log(LOG_INFO, "BSD name mapping is NULL");
+			goto done;
+		}
+		SC_log(LOG_DEBUG, "BSD Name Mapping: %@", bsdNameMapping);
+		serviceMapping = _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(sourcePrefs, targetPrefs, bsdNameMapping);
+		if (serviceMapping == NULL) {
+			goto done;
+		}
+
+		setMapping = _SCNetworkMigrationCreateSetMapping(sourcePrefs, targetPrefs);
+		sourceServiceSetMapping = _SCNetworkMigrationCreateServiceSetMapping(sourcePrefs);
+
+		// Perform the migration of services
+		if (!_SCNetworkMigrationDoServiceMigration(sourcePrefs, targetPrefs,
+							  serviceMapping, bsdNameMapping,
+							  setMapping, sourceServiceSetMapping)) {
+			SC_log(LOG_INFO, "SCNetworkMigrationDoServiceMigration: failed to complete successfully");
+			goto done;
+		}
 
-	setMapping = _SCNetworkMigrationCreateSetMapping(sourcePrefs, targetPrefs);
-	sourceServiceSetMapping = _SCNetworkMigrationCreateServiceSetMapping(sourcePrefs);
-	
-	// Perform the migration of services
-	if (_SCNetworkMigrationDoServiceMigration(sourcePrefs, targetPrefs,
-						  serviceMapping, bsdNameMapping,
-						  setMapping, sourceServiceSetMapping) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: SCNetworkMigrationDoServiceMigration failed to complete successfully"));
-		goto done;
-	}
-	
 #if	!TARGET_OS_IPHONE
-	// Migrating Virtual Network Interface
-	if (_SCNetworkMigrationDoVirtualNetworkInterfaceMigration(sourcePrefs, sourceNetworkInterfacePrefs,
-								  targetPrefs, targetNetworkInterfacePrefs,
-								  bsdNameMapping, setMapping, sourceServiceSetMapping) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: _SCNetworkMigrationDoVirtualNetworkInterfaceMigration failed to complete successfully"));
-	}
-#endif
-	// Migrate Service Order
-	if (_SCNetworkMigrationDoServiceOrderMigration(sourcePrefs, targetPrefs, setMapping) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: _SCNetworkMigrationDoServiceOrderMigration failed to complete successfully"));
-	}
-	
+		// Migrating Virtual Network Interface
+		if (!_SCNetworkMigrationDoVirtualNetworkInterfaceMigration(sourcePrefs, sourceNetworkInterfacePrefs,
+									  targetPrefs, targetNetworkInterfacePrefs,
+									  bsdNameMapping, setMapping, sourceServiceSetMapping)) {
+			SC_log(LOG_INFO, "_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: failed to complete successfully");
+		}
+#endif	// !TARGET_OS_IPHONE
+		// Migrate Service Order
+		if (!_SCNetworkMigrationDoServiceOrderMigration(sourcePrefs, targetPrefs, setMapping)) {
+			SC_log(LOG_INFO, "_SCNetworkMigrationDoServiceOrderMigration: failed to complete successfully");
+		}
+	}
+
 skipServiceMigration:
 	// Migrating System Information
-	if (_SCNetworkMigrationDoSystemMigration(sourcePrefs, targetPrefs) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: _SCNetworkMigrationDoSystemMigration failed to complete successfully"));
+	if (!isUpgradeScenario) {
+		if (!_SCNetworkMigrationDoSystemMigration(sourcePrefs, targetPrefs)) {
+			SC_log(LOG_INFO, "_SCNetworkMigrationDoSystemMigration: failed to complete successfully");
+		}
 	}
-
-	if (_SCNetworkConfigurationCheckValidityUsingPreferences(targetPrefs, targetNetworkInterfacePrefs, NULL) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Migrated configuration is not valid"));
+	if (!_SCNetworkConfigurationCheckValidityWithPreferences(targetPrefs, targetNetworkInterfacePrefs, validityOptions)) {
+		SC_log(LOG_INFO, "Migrated configuration not valid");
 		goto done;
 	}
-	if (SCPreferencesCommitChanges(targetPrefs) == FALSE) {
-		SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Error commiting targetPrefs, %s"), SCErrorString(SCError()));
+	if (!SCPreferencesCommitChanges(targetPrefs)) {
+		SC_log(LOG_INFO, "SCPreferencesCommitChanges(target preferences.plist) failed: %s", SCErrorString(SCError()));
 		goto done;
 	}
 
-	if (SCPreferencesCommitChanges(targetNetworkInterfacePrefs) == FALSE) {
-		SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Error commiting targetNetworkInterfacePrefs, %s"), SCErrorString(SCError()));
+	if (!SCPreferencesCommitChanges(targetNetworkInterfacePrefs)) {
+		SC_log(LOG_INFO, "SCPreferencesCommitChanges(target NetworkInterfaces.plist) failed: %s", SCErrorString(SCError()));
 		goto done;
 	}
 	migrationSuccess = TRUE;
@@ -3349,33 +3587,33 @@ done:
 #define N_QUICK 64
 
 static Boolean
-_SCNetworkMigrationAreServicesIdentical( SCPreferencesRef configPref, SCPreferencesRef expectedConfigPref)
+_SCNetworkMigrationAreServicesIdentical(SCPreferencesRef configPref, SCPreferencesRef expectedConfigPref)
 {
 	const void * expected_vals_q[N_QUICK];
 	const void ** expected_vals = expected_vals_q;
 	CFMutableArrayRef expectedServiceArray = NULL;
 	CFIndex expectedServiceArrayCount = 0;
 	CFDictionaryRef expectedServiceDict = NULL;
-	CFIndex expectedServiceDictCount = 0;
+	size_t expectedServiceDictCount = 0;
 	CFDictionaryRef expectedServiceEntity = 0;
 	Boolean foundMatch = FALSE;
 	CFMutableArrayRef serviceArray = NULL;
 	CFIndex serviceArrayCount = 0;
 	CFDictionaryRef serviceDict = NULL;
-	CFIndex serviceDictCount = 0;
+	size_t serviceDictCount = 0;
 	CFDictionaryRef serviceEntity = NULL;
 	Boolean success = FALSE;
 	const void * vals_q[N_QUICK];
 	const void ** vals = vals_q;
 
 	serviceDict = SCPreferencesGetValue(configPref, kSCPrefNetworkServices);
-	if (isA_CFDictionary(serviceDict) == NULL) {
+	if (!isA_CFDictionary(serviceDict)) {
 		goto done;
 	}
 	serviceDictCount = CFDictionaryGetCount(serviceDict);
 
 	expectedServiceDict = SCPreferencesGetValue(expectedConfigPref, kSCPrefNetworkServices);
-	if (isA_CFDictionary(expectedServiceDict) == NULL) {
+	if (!isA_CFDictionary(expectedServiceDict)) {
 		goto done;
 	}
 	expectedServiceDictCount = CFDictionaryGetCount(expectedServiceDict);
@@ -3391,9 +3629,9 @@ _SCNetworkMigrationAreServicesIdentical( SCPreferencesRef configPref, SCPreferen
 	CFDictionaryGetKeysAndValues(serviceDict, NULL, vals);
 	serviceArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 
-	for (CFIndex idx=0; idx < serviceDictCount; idx++) {
+	for (size_t idx=0; idx < serviceDictCount; idx++) {
 		serviceEntity = vals[idx];
-		if (isA_CFDictionary(serviceEntity) == FALSE) {
+		if (!isA_CFDictionary(serviceEntity)) {
 			continue;
 		}
 		CFArrayAppendValue(serviceArray, serviceEntity);
@@ -3408,10 +3646,9 @@ _SCNetworkMigrationAreServicesIdentical( SCPreferencesRef configPref, SCPreferen
 	CFDictionaryGetKeysAndValues(expectedServiceDict, NULL, expected_vals);
 	expectedServiceArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 
-	for (CFIndex idx = 0; idx < expectedServiceDictCount; idx++) {
+	for (size_t idx = 0; idx < expectedServiceDictCount; idx++) {
 		serviceEntity = expected_vals[idx];
-
-		if (isA_CFDictionary(serviceEntity) == FALSE) {
+		if (!isA_CFDictionary(serviceEntity)) {
 			continue;
 		}
 		CFArrayAppendValue(expectedServiceArray, serviceEntity);
@@ -3430,13 +3667,13 @@ _SCNetworkMigrationAreServicesIdentical( SCPreferencesRef configPref, SCPreferen
 		for (CFIndex idx2 = 0; idx2 < serviceArrayCount; idx2++) {
 			serviceEntity = CFArrayGetValueAtIndex(serviceArray, idx2);
 
-			if (CFEqual(expectedServiceEntity, serviceEntity) == TRUE) {
+			if (CFEqual(expectedServiceEntity, serviceEntity)) {
 				foundMatch = TRUE;
 				break;
 			}
 		}
 
-		if (foundMatch == FALSE) {
+		if (!foundMatch) {
 			break;
 		}
 	}
@@ -3466,14 +3703,14 @@ _SCNetworkMigrationAreNetworkInterfaceConfigurationsIdentical (SCPreferencesRef
 	Boolean success = FALSE;
 
 	interfaceList = SCPreferencesGetValue(configNetworkInterfacePref, INTERFACES);
-	if (isA_CFArray(interfaceList) == NULL) {
+	if (!isA_CFArray(interfaceList)) {
 		goto done;
 	}
 	interfaceListMutable = CFArrayCreateMutableCopy(NULL, 0, interfaceList);
 	interfaceListCount = CFArrayGetCount(interfaceListMutable);
 
 	expectedInterfaceList = SCPreferencesGetValue(expectedNetworkInterfacePref, INTERFACES);
-	if (isA_CFArray(expectedInterfaceList) == NULL) {
+	if (!isA_CFArray(expectedInterfaceList)) {
 		goto done;
 	}
 	expectedInterfaceListCount = CFArrayGetCount(expectedInterfaceList);
@@ -3489,12 +3726,12 @@ _SCNetworkMigrationAreNetworkInterfaceConfigurationsIdentical (SCPreferencesRef
 
 		for (CFIndex idx2 = 0; idx2 < interfaceListCount; idx2++) {
 			interfaceEntity = CFArrayGetValueAtIndex(interfaceList, idx2);
-			if (CFEqual(expectedInterfaceEntity, interfaceEntity) == TRUE) {
+			if (CFEqual(expectedInterfaceEntity, interfaceEntity)) {
 				foundMatch = TRUE;
 				break;
 			}
 		}
-		if (foundMatch == FALSE) {
+		if (!foundMatch) {
 			break;
 		}
 	}
@@ -3531,64 +3768,64 @@ _SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL,
 	char networkInterfaceExpectedStr[PATH_MAX];
 	char prefsConfigStr[PATH_MAX];
 	char prefsExpectedStr[PATH_MAX];
-	
+
 	if (configurationURL == NULL ||
 	    expectedConfigurationURL == NULL) {
 		return FALSE;
 	}
 	baseConfigURL = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, configurationURL);
 	configPreferencesURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*) PREFS_DEFAULT_CONFIG_PLIST, sizeof(PREFS_DEFAULT_CONFIG_PLIST), FALSE, baseConfigURL);
-        
-        if (CFURLResourceIsReachable(configPreferencesURL, NULL) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: preferences.plist file is not present."));
+
+	if (!CFURLResourceIsReachable(configPreferencesURL, NULL)) {
+		SC_log(LOG_INFO, "No preferences.plist file");
 		goto done;
-        }
-	
+	}
+
 	configNetworkInterfacesURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)NETWORK_INTERFACES_PREFS_PLIST, sizeof(NETWORK_INTERFACES_PREFS_PLIST), FALSE, baseConfigURL);
-	
-	if (CFURLResourceIsReachable(configNetworkInterfacesURL, NULL) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: NetworkInterfaces.plist file is not present."));
+
+	if (!CFURLResourceIsReachable(configNetworkInterfacesURL, NULL)) {
+		SC_log(LOG_INFO, "No NetworkInterfaces.plist file");
 		goto done;
 	}
-	
-	if (CFURLGetFileSystemRepresentation(configPreferencesURL, TRUE, (UInt8*)prefsConfigStr, sizeof(prefsConfigStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract preferences information"));
+
+	if (!CFURLGetFileSystemRepresentation(configPreferencesURL, TRUE, (UInt8*)prefsConfigStr, sizeof(prefsConfigStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", configPreferencesURL);
 		goto done;
 	}
-	if (CFURLGetFileSystemRepresentation(configNetworkInterfacesURL, TRUE, (UInt8*)networkInterfaceConfigStr, sizeof(networkInterfaceConfigStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract network interfaces information"));
+	if (!CFURLGetFileSystemRepresentation(configNetworkInterfacesURL, TRUE, (UInt8*)networkInterfaceConfigStr, sizeof(networkInterfaceConfigStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", configNetworkInterfacesURL);
 		goto done;
 	}
-	
+
 	baseExpectedConfigURL = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, expectedConfigurationURL);
 	expectedPreferencesURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)PREFS_DEFAULT_CONFIG_PLIST, sizeof(PREFS_DEFAULT_CONFIG_PLIST), FALSE, baseExpectedConfigURL);
-	
-	if (CFURLResourceIsReachable(expectedPreferencesURL, NULL) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: preferences.plist file is not present in the expected configuration."));
+
+	if (!CFURLResourceIsReachable(expectedPreferencesURL, NULL)) {
+		SC_log(LOG_INFO, "No expected preferences.plist file");
 		goto done;
 	}
-	
+
 	expectedNetworkInterfaceURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)NETWORK_INTERFACES_PREFS_PLIST, sizeof(NETWORK_INTERFACES_PREFS_PLIST), FALSE, baseExpectedConfigURL);
-	
-	if (CFURLResourceIsReachable(expectedNetworkInterfaceURL, NULL) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: NetworkInterfaces.plist file is not present in the expected configuration."));
+
+	if (!CFURLResourceIsReachable(expectedNetworkInterfaceURL, NULL)) {
+		SC_log(LOG_INFO, "No expected NetworkInterfaces.plist file");
 		goto done;
 	}
-	
-	if (CFURLGetFileSystemRepresentation(expectedPreferencesURL, TRUE, (UInt8*)prefsExpectedStr, sizeof(prefsExpectedStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract preferences information"));
+
+	if (!CFURLGetFileSystemRepresentation(expectedPreferencesURL, TRUE, (UInt8*)prefsExpectedStr, sizeof(prefsExpectedStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", expectedPreferencesURL);
 		goto done;
 	}
-	if (CFURLGetFileSystemRepresentation(expectedNetworkInterfaceURL, TRUE, (UInt8*)networkInterfaceExpectedStr, sizeof(networkInterfaceExpectedStr)) == FALSE) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract network interfaces information"));
+	if (!CFURLGetFileSystemRepresentation(expectedNetworkInterfaceURL, TRUE, (UInt8*)networkInterfaceExpectedStr, sizeof(networkInterfaceExpectedStr))) {
+		SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", expectedNetworkInterfaceURL);
 		goto done;
 	}
-	
+
 	prefsConfigString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), prefsConfigStr);
 	networkInterfaceConfigString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), networkInterfaceConfigStr);
 	prefsExpectedString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), prefsExpectedStr);
 	networkInterfaceExpectedString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), networkInterfaceExpectedStr);
-	
+
 	configPref = SCPreferencesCreate(NULL, PLUGIN_ID, prefsConfigString);
 	expectedConfigPref = SCPreferencesCreate(NULL, PLUGIN_ID, prefsExpectedString);
 	configNetworkInterfacePref = SCPreferencesCreate(NULL, PLUGIN_ID, networkInterfaceConfigString);
@@ -3598,10 +3835,9 @@ done:
 	    expectedConfigPref == NULL ||
 	    configNetworkInterfacePref == NULL ||
 	    expectedNetworkInterfacePref == NULL) {
-		SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: One of the preferences is NULL"));
+		SC_log(LOG_INFO, "One of the preferences is NULL");
 		isIdentical = FALSE;
-	}
-	else {
+	} else {
 		isIdentical = (_SCNetworkMigrationAreServicesIdentical(configPref, expectedConfigPref) &&
 			       _SCNetworkMigrationAreNetworkInterfaceConfigurationsIdentical(configNetworkInterfacePref, expectedNetworkInterfacePref));
 	}
@@ -3652,24 +3888,24 @@ done:
 
 CFArrayRef
 _SCNetworkConfigurationCopyMigrationRemovePaths	(CFArrayRef	targetPaths,
-                                                 CFURLRef	targetDir)
+						 CFURLRef	targetDir)
 {
 	CFURLRef affectedURL;
 	char filePath[PATH_MAX];
 	CFURLRef targetFile;
 	CFMutableArrayRef toBeRemoved = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-	
+
 	for (CFIndex idx = 0; idx < CFArrayGetCount(targetPaths); idx++) {
 		affectedURL = CFArrayGetValueAtIndex(targetPaths, idx);
-		
-		if (CFURLGetFileSystemRepresentation(affectedURL, TRUE, (UInt8*)filePath, sizeof(filePath)) == FALSE) {
-			SCLog(_sc_debug, LOG_NOTICE, CFSTR("filesToBeRemoved: Could not get file system representation"));
+
+		if (!CFURLGetFileSystemRepresentation(affectedURL, TRUE, (UInt8*)filePath, sizeof(filePath))) {
+			SC_log(LOG_NOTICE, "Cannot get file system representation for url: %@", affectedURL);
 			continue;
 		}
 		targetFile = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)filePath,
 		strnlen(filePath, sizeof(filePath)), FALSE, targetDir);
-		
-		if (CFURLResourceIsReachable(targetFile, NULL) == FALSE) {
+
+		if (!CFURLResourceIsReachable(targetFile, NULL)) {
 			CFArrayAppendValue(toBeRemoved, affectedURL);
 		}
 		CFRelease(targetFile);
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkProtocol.c b/src/configd/SystemConfiguration.fproj/SCNetworkProtocol.c
index 921908a24..d0cd41ea2 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkProtocol.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkProtocol.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2004-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2008, 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@
  */
 
@@ -31,10 +31,7 @@
 
 #include 
 #include 
-#include 
 #include "SCNetworkConfigurationInternal.h"
-#include 
-#include 
 
 #include 
 
@@ -45,9 +42,6 @@ static Boolean		__SCNetworkProtocolEqual		(CFTypeRef cf1, CFTypeRef cf2);
 static CFHashCode	__SCNetworkProtocolHash			(CFTypeRef cf);
 
 
-#if	!TARGET_OS_IPHONE
-const CFStringRef kSCNetworkProtocolTypeAppleTalk       = CFSTR("AppleTalk");
-#endif	// !TARGET_OS_IPHONE
 const CFStringRef kSCNetworkProtocolTypeDNS		= CFSTR("DNS");
 const CFStringRef kSCNetworkProtocolTypeIPv4		= CFSTR("IPv4");
 const CFStringRef kSCNetworkProtocolTypeIPv6		= CFSTR("IPv6");
@@ -122,10 +116,10 @@ __SCNetworkProtocolEqual(CFTypeRef cf1, CFTypeRef cf2)
 		return FALSE;	// if not the same protocol type
 
 	if (p1->service == p2->service)
-		return TRUE;    // if both point to the same service
+		return TRUE;	// if both point to the same service
 
 	if ((p1->service != NULL) && (p2->service != NULL) && CFEqual(p1->service, p2->service))
-		return TRUE;    // if both effectively point to the same service
+		return TRUE;	// if both effectively point to the same service
 
 	return FALSE;
 }
@@ -160,16 +154,17 @@ __SCNetworkProtocolCreatePrivate(CFAllocatorRef		allocator,
 	pthread_once(&initialized, __SCNetworkProtocolInitialize);
 
 	/* allocate target */
-	size           = sizeof(SCNetworkProtocolPrivate) - sizeof(CFRuntimeBase);
+	size            = sizeof(SCNetworkProtocolPrivate) - sizeof(CFRuntimeBase);
 	protocolPrivate = (SCNetworkProtocolPrivateRef)_CFRuntimeCreateInstance(allocator,
-									      __kSCNetworkProtocolTypeID,
-									      size,
-									      NULL);
+										__kSCNetworkProtocolTypeID,
+										size,
+										NULL);
 	if (protocolPrivate == NULL) {
 		return NULL;
 	}
 
-	protocolPrivate->entityID       = CFStringCreateCopy(NULL, entityID);
+	/* initialize non-zero/NULL members */
+	protocolPrivate->entityID	= CFStringCreateCopy(NULL, entityID);
 	protocolPrivate->service	= CFRetain(service);
 
 	return protocolPrivate;
@@ -179,11 +174,7 @@ __SCNetworkProtocolCreatePrivate(CFAllocatorRef		allocator,
 __private_extern__ Boolean
 __SCNetworkProtocolIsValidType(CFStringRef protocolType)
 {
-	int				i;
-	static const CFStringRef	*valid_types[]   = {
-#if	!TARGET_OS_IPHONE
-		&kSCNetworkProtocolTypeAppleTalk,
-#endif	// !TARGET_OS_IPHONE
+	static const CFStringRef	*valid_types[]	= {
 		&kSCNetworkProtocolTypeDNS,
 		&kSCNetworkProtocolTypeIPv4,
 		&kSCNetworkProtocolTypeIPv6,
@@ -193,7 +184,7 @@ __SCNetworkProtocolIsValidType(CFStringRef protocolType)
 #endif	// !TARGET_OS_IPHONE
 	};
 
-	for (i = 0; i < sizeof(valid_types)/sizeof(valid_types[0]); i++) {
+	for (size_t i = 0; i < sizeof(valid_types)/sizeof(valid_types[0]); i++) {
 		if (CFEqual(protocolType, *valid_types[i])) {
 			// if known/valid protocol type
 			return TRUE;
@@ -217,12 +208,12 @@ static CFStringRef
 copyProtocolConfigurationPath(SCNetworkProtocolPrivateRef protocolPrivate)
 {
 	CFStringRef			path;
-	SCNetworkServicePrivateRef      servicePrivate;
+	SCNetworkServicePrivateRef	servicePrivate;
 
 	servicePrivate = (SCNetworkServicePrivateRef)protocolPrivate->service;
 	path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
 							      servicePrivate->serviceID,	// service
-							      protocolPrivate->entityID);       // entity
+							      protocolPrivate->entityID);	// entity
 	return path;
 }
 
@@ -231,6 +222,22 @@ copyProtocolConfigurationPath(SCNetworkProtocolPrivateRef protocolPrivate)
 #pragma mark SCNetworkProtocol APIs
 
 
+CFComparisonResult
+_SCNetworkProtocolCompare(const void *val1, const void *val2, void *context)
+{
+#pragma unused(context)
+	SCNetworkProtocolRef	p1	= (SCNetworkProtocolRef)val1;
+	SCNetworkProtocolRef	p2	= (SCNetworkProtocolRef)val2;
+	CFStringRef		type1;
+	CFStringRef		type2;
+
+	type1 = SCNetworkProtocolGetProtocolType(p1);
+	type2 = SCNetworkProtocolGetProtocolType(p2);
+
+	return CFStringCompare(type1, type2, 0);
+}
+
+
 CFTypeID
 SCNetworkProtocolGetTypeID()
 {
@@ -245,13 +252,14 @@ SCNetworkProtocolGetConfiguration(SCNetworkProtocolRef protocol)
 	CFDictionaryRef			config;
 	CFStringRef			path;
 	SCNetworkProtocolPrivateRef	protocolPrivate	= (SCNetworkProtocolPrivateRef)protocol;
-	SCNetworkServicePrivateRef      servicePrivate  = (SCNetworkServicePrivateRef)protocolPrivate->service;
+	SCNetworkServicePrivateRef	servicePrivate;
 
 	if (!isA_SCNetworkProtocol(protocol)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return NULL;
 	}
 
+	servicePrivate = (SCNetworkServicePrivateRef)protocolPrivate->service;
 	path = copyProtocolConfigurationPath(protocolPrivate);
 	config = __getPrefsConfiguration(servicePrivate->prefs, path);
 	CFRelease(path);
@@ -266,13 +274,14 @@ SCNetworkProtocolGetEnabled(SCNetworkProtocolRef protocol)
 	Boolean				enabled;
 	CFStringRef			path;
 	SCNetworkProtocolPrivateRef	protocolPrivate	= (SCNetworkProtocolPrivateRef)protocol;
-	SCNetworkServicePrivateRef      servicePrivate  = (SCNetworkServicePrivateRef)protocolPrivate->service;
+	SCNetworkServicePrivateRef	servicePrivate;
 
 	if (!isA_SCNetworkProtocol(protocol)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
 	}
 
+	servicePrivate = (SCNetworkServicePrivateRef)protocolPrivate->service;
 	path = copyProtocolConfigurationPath(protocolPrivate);
 	enabled = __getPrefsEnabled(servicePrivate->prefs, path);
 	CFRelease(path);
@@ -301,17 +310,35 @@ SCNetworkProtocolSetConfiguration(SCNetworkProtocolRef protocol, CFDictionaryRef
 	Boolean				ok;
 	CFStringRef			path;
 	SCNetworkProtocolPrivateRef	protocolPrivate	= (SCNetworkProtocolPrivateRef)protocol;
-	SCNetworkServicePrivateRef      servicePrivate  = (SCNetworkServicePrivateRef)protocolPrivate->service;
+	SCNetworkServiceRef		service;
+	SCNetworkServicePrivateRef	servicePrivate;
 
 	if (!isA_SCNetworkProtocol(protocol)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
 	}
 
+	service = protocolPrivate->service;
+	servicePrivate = (SCNetworkServicePrivateRef)service;
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkProtocolSetConfiguration() w/removed service\n  protocol = %@\n  service = %@",
+		       protocolPrivate->entityID,
+		       servicePrivate);
+		_SC_crash_once("SCNetworkProtocolSetConfiguration() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	path = copyProtocolConfigurationPath(protocolPrivate);
 	ok = __setPrefsConfiguration(servicePrivate->prefs, path, config, TRUE);
 	CFRelease(path);
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkProtocolSetConfiguration(): %@ --> %@",
+		       protocol,
+		       config != NULL ? config : (CFDictionaryRef)CFSTR("NULL"));
+	}
+
 	return ok;
 }
 
@@ -322,16 +349,34 @@ SCNetworkProtocolSetEnabled(SCNetworkProtocolRef protocol, Boolean enabled)
 	Boolean				ok;
 	CFStringRef			path;
 	SCNetworkProtocolPrivateRef	protocolPrivate	= (SCNetworkProtocolPrivateRef)protocol;
-	SCNetworkServicePrivateRef      servicePrivate  = (SCNetworkServicePrivateRef)protocolPrivate->service;
+	SCNetworkServiceRef		service;
+	SCNetworkServicePrivateRef	servicePrivate;
 
 	if (!isA_SCNetworkProtocol(protocol)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
 	}
 
+	service = protocolPrivate->service;
+	servicePrivate = (SCNetworkServicePrivateRef)service;
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkProtocolSetEnabled() w/removed service\n  protocol = %@\n  service = %@",
+		       protocolPrivate->entityID,
+		       servicePrivate);
+		_SC_crash_once("SCNetworkProtocolSetEnabled() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	path = copyProtocolConfigurationPath(protocolPrivate);
 	ok = __setPrefsEnabled(servicePrivate->prefs, path, enabled);
 	CFRelease(path);
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkProtocolSetEnabled(): %@ -> %s",
+		       protocol,
+		       enabled ? "Enabled" : "Disabled");
+	}
+
 	return ok;
 }
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkReachability.c b/src/configd/SystemConfiguration.fproj/SCNetworkReachability.c
index 5533c47ab..5b572365e 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkReachability.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkReachability.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2019 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  *
@@ -34,24 +34,12 @@
  * - add advanced reachability APIs
  */
 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
-
-#if	!TARGET_OS_IPHONE
-#include 
-#endif	// !TARGET_OS_IPHONE
-
 #include 
 #include 
 #include 
@@ -64,52 +52,35 @@
 #include 
 #include 
 #include 
-#define	KERNEL_PRIVATE
-#include 
-#undef	KERNEL_PRIVATE
+#include 
 
-#ifndef s6_addr16
-#define s6_addr16 __u6_addr.__u6_addr16
-#endif
+#include 
+#include 
 
-#include "SCNetworkConnectionInternal.h"
+#define	SC_LOG_HANDLE		__log_SCNetworkReachability
+#define SC_LOG_HANDLE_TYPE	static
+#include 
+#include 
+#include 
+#include "SCD.h"
 #include "SCNetworkReachabilityInternal.h"
 
-#include 
-#include 
-
-#include 
-
-
-
-
 
 
+#include 
 
 #define	DEBUG_REACHABILITY_TYPE_NAME			"create w/name"
-#define	DEBUG_REACHABILITY_TYPE_NAME_CLONE		"      > clone"
 #define	DEBUG_REACHABILITY_TYPE_NAME_OPTIONS		"    + options"
 
 #define	DEBUG_REACHABILITY_TYPE_ADDRESS			"create w/address"
-#define	DEBUG_REACHABILITY_TYPE_ADDRESS_CLONE		"         > clone"
 #define	DEBUG_REACHABILITY_TYPE_ADDRESS_OPTIONS		"       + options"
 
 #define	DEBUG_REACHABILITY_TYPE_ADDRESSPAIR		"create w/address pair"
-#define	DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_CLONE	"              > clone"
 #define	DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_OPTIONS	"            + options"
 
 #define	DEBUG_REACHABILITY_TYPE_PTR			"create w/ptr"
-#define	DEBUG_REACHABILITY_TYPE_PTR_CLONE		"     > clone"
 #define	DEBUG_REACHABILITY_TYPE_PTR_OPTIONS		"   + options"
 
-#define	DNS_FLAGS_FORMAT	"[%s%s%s%s%s]"
-#define	DNS_FLAGS_VALUES(t)	t->dnsHaveV4      ? "4" : "",	\
-				t->dnsHaveV6      ? "6" : "",	\
-				t->dnsHavePTR     ? "P" : "",	\
-				t->dnsHaveTimeout ? "T" : "",	\
-				t->dnsHaveError   ? "E" : ""
-
-
 static pthread_mutexattr_t	lock_attr;
 
 #define MUTEX_INIT(m) {							\
@@ -133,36 +104,26 @@ static pthread_mutexattr_t	lock_attr;
 }
 
 
-#define SCNETWORKREACHABILITY_TRIGGER_KEY	CFSTR("com.apple.SCNetworkReachability:FORCE-CHANGE")
-
-
 #define	N_QUICK	64
 
+#define REACHABILITY_NETWORK_EXTENSION_AGENT_DOMAIN "NetworkExtension"
+#define REACHABILITY_AGENT_DATA_KEY "data"
+
 
 static CFStringRef	__SCNetworkReachabilityCopyDescription	(CFTypeRef cf);
 static void		__SCNetworkReachabilityDeallocate	(CFTypeRef cf);
-static void		reachPerform				(void *info);
-static Boolean		reachUpdate				(SCNetworkReachabilityRef target);
 
-
-static void
-__SCNetworkReachabilityHandleChanges		(SCDynamicStoreRef		store,
-						 CFArrayRef			changedKeys,
-						 void				*info);
-
-static Boolean
-__SCNetworkReachabilityScheduleWithRunLoop	(SCNetworkReachabilityRef	target,
-						 CFRunLoopRef			runLoop,
-						 CFStringRef			runLoopMode,
-						 dispatch_queue_t		queue,
-						 Boolean			onDemand);
+static SCNetworkReachabilityFlags
+__SCNetworkReachabilityGetFlagsFromPath(nw_path_t			path,
+					ReachabilityAddressType		type,
+					nw_resolver_status_t		resolverStatus,
+					nw_array_t			resolvedEndpoints,
+					Boolean				resolvedEndpointUseFlags,
+					SCNetworkReachabilityFlags	resolvedEndpointFlags);
 
 static Boolean
-__SCNetworkReachabilityUnscheduleFromRunLoop	(SCNetworkReachabilityRef	target,
-						 CFRunLoopRef			runLoop,
-						 CFStringRef			runLoopMode,
-						 Boolean			onDemand);
-
+__SCNetworkReachabilitySetDispatchQueue(SCNetworkReachabilityPrivateRef	targetPrivate,
+					dispatch_queue_t		queue);
 
 static CFTypeID __kSCNetworkReachabilityTypeID	= _kCFRuntimeNotATypeID;
 
@@ -181,5803 +142,1470 @@ static const CFRuntimeClass __SCNetworkReachabilityClass = {
 
 
 static pthread_once_t		initialized	= PTHREAD_ONCE_INIT;
-static const ReachabilityInfo	NOT_REACHABLE	= { 0, 0,		0, { 0 }, FALSE };
-static const ReachabilityInfo	NOT_REPORTED	= { 0, 0xFFFFFFFF,	0, { 0 }, FALSE };
-static int			rtm_seq		= 0;
-
-
-static const struct timeval	TIME_ZERO	= { 0, 0 };
-
-
-static int			dnsCount	= 0;
-static int			dnsGeneration	= 0;
-static DNSServiceRef		dnsMain		= NULL;
-static CFMutableSetRef		dnsUpdated	= NULL;
-
-static Boolean			D_serverBypass	= FALSE;
-
-
-
-#if	!TARGET_OS_IPHONE
-/*
- * Power capabilities (sleep/wake)
- */
-#define POWER_CAPABILITIES_NETWORK	( kIOPMCapabilityCPU		\
-					| kIOPMCapabilityNetwork	\
-					| kIOPMCapabilityVideo)
-static IOPMSystemPowerStateCapabilities	power_capabilities	= POWER_CAPABILITIES_NETWORK;
-#endif	// !TARGET_OS_IPHONE
-
-
-/*
- * host "something has changed" notifications
- */
-
-// Note: protected by _hn_target_queue()
-static SCDynamicStoreRef	hn_store	= NULL;
-static CFMutableSetRef		hn_targets	= NULL;
-
 
 static dispatch_queue_t
-_hn_changes_queue()
+_callback_queue()
 {
 	static dispatch_once_t	once;
-	static dispatch_queue_t	q = NULL;
+	static dispatch_queue_t	q;
 
 	dispatch_once(&once, ^{
-		q = dispatch_queue_create("SCNetworkReachability.handleChanges", NULL);
+		q = dispatch_queue_create("SCNetworkReachability.callback", NULL);
 	});
 
 	return q;
 }
 
-
-static dispatch_queue_t
-_hn_target_queue()
+static os_log_t
+__log_SCNetworkReachability(void)
 {
-	static dispatch_once_t	once;
-	static dispatch_queue_t	q;
+	static os_log_t	log	= NULL;
 
-	dispatch_once(&once, ^{
-		q = dispatch_queue_create("SCNetworkReachability.targetManagement", NULL);
-	});
+	if (log == NULL) {
+		log = os_log_create("com.apple.SystemConfiguration", "SCNetworkReachability");
+	}
 
-	return q;
+	return log;
 }
 
 
-/*
- * DNS configuration
- */
-
-typedef struct {
-	dns_config_t	*config;
-	int		refs;
-} dns_configuration_t;
-
-
-// Note: protected by "dns_lock"
-static pthread_mutex_t		dns_lock		= PTHREAD_MUTEX_INITIALIZER;
-static dns_configuration_t	*dns_configuration	= NULL;
-static int			dns_token;
-static Boolean			dns_token_valid		= FALSE;
-
-
-
-
-typedef enum {
-	dns_query_async,
-	dns_query_mdns,
-	dns_query_mdns_timeout,
-} query_type;
+#pragma mark -
+#pragma mark SCNetworkReachability APIs
 
 
-static void
-__mark_operation_start(struct timeval	*queryStart,
-		       struct timeval	*queryEnd)
+static __inline__ CFTypeRef
+isA_SCNetworkReachability(CFTypeRef obj)
 {
-	(void) gettimeofday(queryStart, NULL);
-	*queryEnd = TIME_ZERO;
-
-	return;
+	return (isA_CFType(obj, SCNetworkReachabilityGetTypeID()));
 }
 
-
-static void
-__mark_operation_end(SCNetworkReachabilityRef	target,
-		     Boolean			found,
-		     query_type			query_type,
-		     struct timeval		*queryStart,
-		     struct timeval		*queryEnd)
+static CFStringRef
+_SCNetworkReachabilityCopyTargetDescription(SCNetworkReachabilityRef target)
 {
-	struct timeval			queryElapsed;
+	CFAllocatorRef			allocator	= CFGetAllocator(target);
+	CFMutableStringRef		str;
 	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-	(void) gettimeofday(queryEnd, NULL);
-
-	if (!_sc_debug &&
-	    (query_type != dns_query_mdns_timeout)) {
-		return;
-	}
-
-	if (!timerisset(queryStart)) {
-		return;
-	}
-
-	timersub(queryEnd, queryStart, &queryElapsed);
-	switch (query_type) {
-
-		#define	QUERY_TIME__FMT	"%ld.%6.6d"
-		#define	QUERY_TIME__DIV	1
-
-		case dns_query_async :
-			SCLog(TRUE, LOG_INFO,
-			      CFSTR("%sasync DNS complete%s (query time = " QUERY_TIME__FMT ")"),
-			      targetPrivate->log_prefix,
-			      found ? "" : ", host not found",
-			      queryElapsed.tv_sec,
-			      queryElapsed.tv_usec / QUERY_TIME__DIV);
+	str = CFStringCreateMutable(allocator, 0);
+	switch (targetPrivate->type) {
+		case reachabilityTypeAddress :
+		case reachabilityTypeAddressPair : {
+			char buf[64];
+			if (targetPrivate->localAddressEndpoint != NULL) {
+				_SC_sockaddr_to_string(nw_endpoint_get_address(targetPrivate->localAddressEndpoint), buf, sizeof(buf));
+				CFStringAppendFormat(str, NULL, CFSTR("local address = %s"),
+						     buf);
+			}
+			if (targetPrivate->remoteAddressEndpoint != NULL) {
+				_SC_sockaddr_to_string(nw_endpoint_get_address(targetPrivate->remoteAddressEndpoint), buf, sizeof(buf));
+				CFStringAppendFormat(str, NULL, CFSTR("%s%saddress = %s"),
+						     targetPrivate->localAddressEndpoint ? ", " : "",
+						     (targetPrivate->type == reachabilityTypeAddressPair) ? "remote " : "",
+						     buf);
+			} else {
+				CFStringAppendFormat(str, NULL, CFSTR("default path"));
+			}
 			break;
-		case dns_query_mdns :
-			SCLog(TRUE, LOG_INFO,
-			      CFSTR("%s[m]DNS query complete%s (query time = " QUERY_TIME__FMT "), " DNS_FLAGS_FORMAT),
-			      targetPrivate->log_prefix,
-			      found ? "" : ", host not found",
-			      queryElapsed.tv_sec,
-			      queryElapsed.tv_usec / QUERY_TIME__DIV,
-			      DNS_FLAGS_VALUES(targetPrivate));
+		}
+		case reachabilityTypeName : {
+			CFStringAppendFormat(str, NULL, CFSTR("name = %s"), nw_endpoint_get_hostname(targetPrivate->hostnameEndpoint));
 			break;
-		case dns_query_mdns_timeout :
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("%s[m]DNS query timeout (query time = " QUERY_TIME__FMT "), " DNS_FLAGS_FORMAT),
-			      targetPrivate->log_prefix,
-			      queryElapsed.tv_sec,
-			      queryElapsed.tv_usec / QUERY_TIME__DIV,
-			      DNS_FLAGS_VALUES(targetPrivate));
+		}
+		case reachabilityTypePTR : {
+			char buf[64];
+			if (targetPrivate->remoteAddressEndpoint != NULL) {
+				_SC_sockaddr_to_string(nw_endpoint_get_address(targetPrivate->remoteAddressEndpoint), buf, sizeof(buf));
+				CFStringAppendFormat(str, NULL, CFSTR("ptr = %s"),
+						     buf);
+			}
 			break;
+		}
 	}
 
-	return;
-}
-
-
-static __inline__ Boolean
-__reach_changed(ReachabilityInfo *r1, ReachabilityInfo *r2)
-{
-	if (r1->flags != r2->flags) {
-		// if the reachability flags changed
-		return TRUE;
-	}
-
-	if (r1->if_index != r2->if_index) {
-		// if the target interface changed
-		return TRUE;
-	}
+	if (targetPrivate->parameters != NULL) {
+		unsigned int	if_index;
 
-	if ((r1->sleeping != r2->sleeping) && !r2->sleeping) {
-		// if our sleep/wake status changed and if we
-		// are no longer sleeping
-		return TRUE;
+		if_index = nw_parameters_get_required_interface_index(targetPrivate->parameters);
+		if (if_index != 0) {
+			CFStringAppendFormat(str, NULL, CFSTR(", if_index = %u"), if_index);
+		}
 	}
 
-	return FALSE;
+	return str;
 }
 
 
-static __inline__ void
-_reach_set(ReachabilityInfo		*dst,
-	   const ReachabilityInfo	*src,
-	   uint64_t			cycle,
-	   unsigned int			requested_if_index,
-	   const char			*requested_if_name)
+static CFStringRef
+__SCNetworkReachabilityCopyTargetFlags(SCNetworkReachabilityRef target)
 {
-	memcpy(dst, src, sizeof(ReachabilityInfo));
-	dst->cycle = cycle;
-
-	if (!(dst->flags & kSCNetworkReachabilityFlagsReachable) ||
-		(dst->flags & kSCNetworkReachabilityFlagsConnectionRequired)) {
-		// if not reachable or connection required, return the
-		// requested if_index and if_name.
-		dst->if_index = requested_if_index;
-		if (requested_if_name != NULL) {
-			strlcpy(dst->if_name, requested_if_name, sizeof(dst->if_name));
-		} else {
-			dst->if_name[0] = '\0';
-		}
-	}
+	CFAllocatorRef			allocator	= CFGetAllocator(target);
+	CFStringRef			str;
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-	return;
+	str = CFStringCreateWithFormat(allocator,
+				       NULL,
+				       CFSTR("flags = 0x%08x, if_index = %u"),
+				       __SCNetworkReachabilityGetFlagsFromPath(targetPrivate->lastPath,
+									       targetPrivate->type,
+									       targetPrivate->lastResolverStatus,
+									       targetPrivate->lastResolvedEndpoints,
+									       targetPrivate->lastResolvedEndpointHasFlags,
+									       targetPrivate->lastResolvedEndpointFlags),
+				       targetPrivate->lastResolvedEndpointHasFlags ? targetPrivate->lastResolvedEndpointInterfaceIndex
+										   : nw_path_get_interface_index(targetPrivate->lastPath));
+	return str;
 }
 
 
-#pragma mark -
-#pragma mark SCDynamicStore info
-
-
-typedef struct {
-	SCDynamicStoreRef	store;
-	CFStringRef		entity;
-	CFDictionaryRef		dict;
-	CFIndex			n;
-	const void **		keys;
-	const void *		keys_q[N_QUICK];
-	const void **		values;
-	const void *		values_q[N_QUICK];
-} ReachabilityStoreInfo, *ReachabilityStoreInfoRef;
-
-
-static ReachabilityStoreInfo	S_storeInfo		= { 0 };
-static Boolean			S_storeInfoActive	= FALSE;
-
-
-static dispatch_queue_t
-_storeInfo_queue()
+static CFStringRef
+__SCNetworkReachabilityCopyDescription(CFTypeRef cf)
 {
-	static dispatch_once_t	once;
-	static dispatch_queue_t	q;
+	CFAllocatorRef			allocator	= CFGetAllocator(cf);
+	CFMutableStringRef		result;
+	CFStringRef			str;
+	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)cf;
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-	dispatch_once(&once, ^{
-		q = dispatch_queue_create("SCNetworkReachability.storeInfo", NULL);
-	});
+	MUTEX_LOCK(&targetPrivate->lock);
 
-	return q;
-}
+	result = CFStringCreateMutable(allocator, 0);
+	CFStringAppendFormat(result, NULL, CFSTR(" {"), cf, allocator);
 
+	// add target description
+	str = _SCNetworkReachabilityCopyTargetDescription(target);
+	CFStringAppend(result, str);
+	CFRelease(str);
 
-static void
-ReachabilityStoreInfo_copy(ReachabilityStoreInfoRef	src,
-			   ReachabilityStoreInfoRef	dst)
-{
-	if (src->dict != NULL) {
-		dst->store = src->store;
-		CFRetain(dst->store);
-
-		dst->dict = src->dict;
-		CFRetain(dst->dict);
-
-		dst->n = src->n;
-		if (dst->n > 0) {
-			if (dst->n <= (CFIndex)(sizeof(dst->keys_q) / sizeof(CFTypeRef))) {
-				dst->keys   = dst->keys_q;
-				dst->values = dst->values_q;
+	// add additional "name" info
+	if (isReachabilityTypeName(targetPrivate->type)) {
+		if (targetPrivate->resolver && targetPrivate->lastResolverStatus == nw_resolver_status_invalid) {
+			CFStringAppendFormat(result, NULL, CFSTR(" (DNS query active)"));
+		} else if (targetPrivate->lastResolverStatus != nw_resolver_status_invalid) {
+			CFStringAppendFormat(result, NULL, CFSTR(" (%s"), (targetPrivate->lastResolverStatus == nw_resolver_status_complete) ? "complete" : "in progress");
+			if (nw_array_get_count(targetPrivate->lastResolvedEndpoints) > 0) {
+				nw_array_apply(targetPrivate->lastResolvedEndpoints, ^bool(size_t index, nw_object_t object) {
+#pragma unused(index)
+					nw_endpoint_t endpoint = (nw_endpoint_t)object;
+					nw_endpoint_type_t endpoint_type = nw_endpoint_get_type(endpoint);
+					if (endpoint_type == nw_endpoint_type_address) {
+						char buf[64];
+						const struct sockaddr	*sa = nw_endpoint_get_address(endpoint);
+						_SC_sockaddr_to_string(sa, buf, sizeof(buf));
+						CFStringAppendFormat(result, NULL, CFSTR(", %s"), buf);
+					} else if (endpoint_type == nw_endpoint_type_host) {
+						CFStringAppendFormat(result, NULL, CFSTR(", %s"), nw_endpoint_get_hostname(endpoint));
+					} else {
+						CFStringAppendFormat(result, NULL, CFSTR(", unexpected nw_endpoint type: %d"), endpoint_type);
+					}
+					return TRUE;
+				});
 			} else {
-				dst->keys   = CFAllocatorAllocate(NULL, dst->n * sizeof(CFTypeRef), 0);
-				dst->values = CFAllocatorAllocate(NULL, dst->n * sizeof(CFTypeRef), 0);
+				CFStringAppendFormat(result, NULL, CFSTR(", no addresses"));
 			}
-			memcpy(dst->keys,   src->keys,   dst->n * sizeof(CFTypeRef));
-			memcpy(dst->values, src->values, dst->n * sizeof(CFTypeRef));
+			CFStringAppendFormat(result, NULL, CFSTR(")"));
 		}
 	}
 
-	return;
-}
+	if (targetPrivate->resolverBypass) {
+		CFStringAppendFormat(result, NULL, CFSTR(", !resolve"));
+	}
+
+	// add flags
+	if (targetPrivate->scheduled) {
+		str = __SCNetworkReachabilityCopyTargetFlags(target);
+		CFStringAppendFormat(result, NULL, CFSTR(", %@"), str);
+		CFRelease(str);
+	}
 
+	CFStringAppendFormat(result, NULL, CFSTR("}"));
 
-static void
-ReachabilityStoreInfo_enable(Boolean enable)
-{
-	dispatch_sync(_storeInfo_queue(), ^{
-		S_storeInfoActive = enable;
-	});
+	MUTEX_UNLOCK(&targetPrivate->lock);
 
-	return;
+	return result;
 }
 
 
 static void
-ReachabilityStoreInfo_free(ReachabilityStoreInfoRef store_info)
+__SCNetworkReachabilityDeallocate(CFTypeRef cf)
 {
-	if ((store_info->n > 0) && (store_info->keys != store_info->keys_q)) {
-		CFAllocatorDeallocate(NULL, store_info->keys);
-		store_info->keys = NULL;
+	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)cf;
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-		CFAllocatorDeallocate(NULL, store_info->values);
-		store_info->values = NULL;
-	}
-	store_info->n = 0;
+	SC_log(LOG_DEBUG, "%srelease", targetPrivate->log_prefix);
 
-	if (store_info->dict != NULL) {
-		CFRelease(store_info->dict);
-		store_info->dict = NULL;
-	}
+	/* release resources */
+	MUTEX_LOCK(&targetPrivate->lock);
+	targetPrivate->scheduled = FALSE;
 
-	if (store_info->store != NULL) {
-		CFRelease(store_info->store);
-		store_info->store = NULL;
+	if (targetPrivate->hostnameEndpoint) {
+		nw_release(targetPrivate->hostnameEndpoint);
+		targetPrivate->hostnameEndpoint = NULL;
+	}
+	if (targetPrivate->localAddressEndpoint) {
+		nw_release(targetPrivate->localAddressEndpoint);
+		targetPrivate->localAddressEndpoint = NULL;
+	}
+	if (targetPrivate->remoteAddressEndpoint) {
+		nw_release(targetPrivate->remoteAddressEndpoint);
+		targetPrivate->remoteAddressEndpoint = NULL;
+	}
+	if (targetPrivate->parameters) {
+		nw_release(targetPrivate->parameters);
+		targetPrivate->parameters = NULL;
+	}
+	if (targetPrivate->lastPath) {
+		nw_release(targetPrivate->lastPath);
+		targetPrivate->lastPath = NULL;
+	}
+	if (targetPrivate->lastPathParameters) {
+		nw_release(targetPrivate->lastPathParameters);
+		targetPrivate->lastPathParameters = NULL;
+	}
+	if (targetPrivate->lastResolvedEndpoints) {
+		nw_release(targetPrivate->lastResolvedEndpoints);
+		targetPrivate->lastResolvedEndpoints = NULL;
 	}
 
-	return;
-}
-
+	if (targetPrivate->rlsContext.release != NULL) {
+		(*targetPrivate->rlsContext.release)(targetPrivate->rlsContext.info);
+	}
 
-static void
-ReachabilityStoreInfo_init(ReachabilityStoreInfoRef store_info)
-{
-	dispatch_sync(_storeInfo_queue(), ^{
-		bzero(store_info, sizeof(ReachabilityStoreInfo));
+	MUTEX_UNLOCK(&targetPrivate->lock);
 
-		if (S_storeInfoActive && (S_storeInfo.dict != NULL)) {
-			ReachabilityStoreInfo_copy(&S_storeInfo, store_info);
-		}
-	});
+	pthread_mutex_destroy(&targetPrivate->lock);
 
 	return;
 }
 
 
 static void
-ReachabilityStoreInfo_save(ReachabilityStoreInfoRef store_info)
+__SCNetworkReachabilityInitialize(void)
 {
-	dispatch_sync(_storeInfo_queue(), ^{
-		if ((store_info == NULL) ||
-		    !_SC_CFEqual(store_info->dict, S_storeInfo.dict)) {
-			// free any old info
-			ReachabilityStoreInfo_free(&S_storeInfo);
-
-			// save new info
-			if (S_storeInfoActive &&
-			    (store_info != NULL) &&
-			    (store_info->dict != NULL)) {
-				ReachabilityStoreInfo_copy(store_info, &S_storeInfo);
-			}
-		}
-	});
+	__kSCNetworkReachabilityTypeID = _CFRuntimeRegisterClass(&__SCNetworkReachabilityClass);
+
+	pthread_mutexattr_init(&lock_attr);
+	pthread_mutexattr_settype(&lock_attr, PTHREAD_MUTEX_ERRORCHECK);
 
 	return;
 }
 
-
-static void
-ReachabilityStoreInfo_keys(CFMutableArrayRef *fill_keys, CFMutableArrayRef *fill_patterns)
+static SCNetworkReachabilityPrivateRef
+__SCNetworkReachabilityCreatePrivate(CFAllocatorRef	allocator)
 {
-	CFStringRef		key;
-	CFMutableArrayRef	keys;
-	CFStringRef		pattern;
-	CFMutableArrayRef	patterns;
-
-	keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-	patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-
-	// get info for IPv4 services
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetIPv4);
-	CFArrayAppendValue(keys, key);
-	CFRelease(key);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainSetup,
-							      kSCCompAnyRegex,
-							      kSCEntNetIPv4);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainState,
-							      kSCCompAnyRegex,
-							      kSCEntNetIPv4);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-
-	// get info for IPv6 services
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetIPv6);
-	CFArrayAppendValue(keys, key);
-	CFRelease(key);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainSetup,
-							      kSCCompAnyRegex,
-							      kSCEntNetIPv6);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainState,
-							      kSCCompAnyRegex,
-							      kSCEntNetIPv6);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-
-	// get info for PPP services
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainSetup,
-							      kSCCompAnyRegex,
-							      kSCEntNetPPP);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainState,
-							      kSCCompAnyRegex,
-							      kSCEntNetPPP);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-
-	// get info for VPN services
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainSetup,
-							      kSCCompAnyRegex,
-							      kSCEntNetVPN);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainState,
-							      kSCCompAnyRegex,
-							      kSCEntNetVPN);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-
-	// get info for IPSec services
-//	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-//							      kSCDynamicStoreDomainSetup,
-//							      kSCCompAnyRegex,
-//							      kSCEntNetIPSec);
-//	CFArrayAppendValue(patterns, pattern);
-//	CFRelease(pattern);
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainState,
-							      kSCCompAnyRegex,
-							      kSCEntNetIPSec);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-
-	// get info to identify "available" services
-	pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
-							      kSCDynamicStoreDomainSetup,
-							      kSCCompAnyRegex,
-							      kSCEntNetInterface);
-	CFArrayAppendValue(patterns, pattern);
-	CFRelease(pattern);
-
-
-	*fill_keys     = keys;
-	*fill_patterns = patterns;
-	return;
-}
+	SCNetworkReachabilityPrivateRef		targetPrivate;
+	uint32_t				size;
 
+	/* initialize runtime */
+	pthread_once(&initialized, __SCNetworkReachabilityInitialize);
 
-static Boolean
-ReachabilityStoreInfo_fill(ReachabilityStoreInfoRef store_info)
-{
-	CFMutableArrayRef	keys;
-	CFMutableArrayRef	patterns;
-
-	// get the SCDynamicStore info
-	ReachabilityStoreInfo_keys(&keys, &patterns);
-	store_info->dict = SCDynamicStoreCopyMultiple(store_info->store, keys, patterns);
-	CFRelease(keys);
-	CFRelease(patterns);
-	if (store_info->dict == NULL) {
-		return FALSE;
+	/* allocate target */
+	size          = sizeof(SCNetworkReachabilityPrivate) - sizeof(CFRuntimeBase);
+	targetPrivate = (SCNetworkReachabilityPrivateRef)_CFRuntimeCreateInstance(allocator,
+										  __kSCNetworkReachabilityTypeID,
+										  size,
+										  NULL);
+	if (targetPrivate == NULL) {
+		return NULL;
 	}
 
-	// and extract the keys/values for post-processing
-	store_info->n = CFDictionaryGetCount(store_info->dict);
-	if (store_info->n > 0) {
-		if (store_info->n <= (CFIndex)(sizeof(store_info->keys_q) / sizeof(CFTypeRef))) {
-			store_info->keys   = store_info->keys_q;
-			store_info->values = store_info->values_q;
-		} else {
-			store_info->keys   = CFAllocatorAllocate(NULL, store_info->n * sizeof(CFTypeRef), 0);
-			store_info->values = CFAllocatorAllocate(NULL, store_info->n * sizeof(CFTypeRef), 0);
-		}
-		CFDictionaryGetKeysAndValues(store_info->dict,
-					     store_info->keys,
-					     store_info->values);
+	/* initialize non-zero/NULL members */
+	MUTEX_INIT(&targetPrivate->lock);
+	if (_sc_log > 0) {
+		snprintf(targetPrivate->log_prefix,
+			 sizeof(targetPrivate->log_prefix),
+			 "[%p] ",
+			 targetPrivate);
 	}
 
-	return TRUE;
+	return targetPrivate;
 }
 
-
-static Boolean
-ReachabilityStoreInfo_update(ReachabilityStoreInfoRef	store_info,
-			     SCDynamicStoreRef		*storeP,
-			     sa_family_t		sa_family)
+static const struct sockaddr *
+is_valid_address(const struct sockaddr *address)
 {
-	__block Boolean		ok	= TRUE;
+	const struct sockaddr	*valid	= NULL;
+	static Boolean	warned	= FALSE;
 
-	switch (sa_family) {
-		case AF_UNSPEC :
-			store_info->entity = NULL;
-			break;
-		case AF_INET :
-			store_info->entity = kSCEntNetIPv4;
-			break;
-		case AF_INET6 :
-			store_info->entity = kSCEntNetIPv6;
-			break;
-		default :
-			return FALSE;
-	}
-
-	if (store_info->dict != NULL) {
-		// if info already available
-		return TRUE;
-	}
-
-	dispatch_sync(_storeInfo_queue(), ^{
-		if (S_storeInfoActive && (S_storeInfo.dict != NULL)) {
-			// free any info
-			ReachabilityStoreInfo_free(store_info);
-
-			// copy the shared/available info
-			ReachabilityStoreInfo_copy(&S_storeInfo, store_info);
-		}
-
-		if (store_info->store == NULL) {
-			store_info->store = (storeP != NULL) ? *storeP : NULL;
-			if (store_info->store != NULL) {
-				// keep a reference to the passed in SCDynamicStore
-				CFRetain(store_info->store);
-			} else {
-				store_info->store = SCDynamicStoreCreate(NULL, CFSTR("SCNetworkReachability"), NULL, NULL);
-				if (store_info->store == NULL) {
-					SCLog(TRUE, LOG_ERR, CFSTR("ReachabilityStoreInfo_update SCDynamicStoreCreate() failed"));
-					return;
+	if ((address != NULL) &&
+	    (address->sa_len <= sizeof(struct sockaddr_storage))) {
+		switch (address->sa_family) {
+			case AF_INET :
+				if (address->sa_len >= sizeof(struct sockaddr_in)) {
+					valid = address;
+				} else if (!warned) {
+					SC_log(LOG_WARNING, "SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %zu",
+					      address->sa_len,
+					      sizeof(struct sockaddr_in));
+					warned = TRUE;
 				}
-
-				if (storeP != NULL) {
-					// and pass back a reference
-					*storeP = store_info->store;
-					CFRetain(*storeP);
+				break;
+			case AF_INET6 :
+				if (address->sa_len >= sizeof(struct sockaddr_in6)) {
+					valid = address;
+				} else if (!warned) {
+					SC_log(LOG_WARNING, "SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %zu",
+					      address->sa_len,
+					      sizeof(struct sockaddr_in6));
+					warned = TRUE;
+				}
+				break;
+			default :
+				if (!warned) {
+					SC_log(LOG_WARNING, "SCNetworkReachabilityCreateWithAddress[Pair] called with invalid address family %d",
+					      address->sa_family);
+					warned = TRUE;
 				}
-			}
 		}
+	}
 
-		if (sa_family == AF_UNSPEC) {
-			// if the address family was not specified than
-			// all we wanted, for now, was to establish the
-			// SCDynamicStore session
-			return;
-		}
+	return valid;
+}
 
-		if (store_info->dict != NULL) {
-			// or we have picked up the shared info
-			return;
-		}
+static bool
+__SCNetworkReachabilityAddressIsEmpty(const struct sockaddr *address)
+{
+	if (address == NULL) {
+		return TRUE;
+	}
 
-		ok = ReachabilityStoreInfo_fill(store_info);
-		if (!ok) {
-			return;
-		}
+	if (address->sa_family == AF_INET) {
+		return (((struct sockaddr_in *)(void *)address)->sin_addr.s_addr == 0);
+	} else if (address->sa_family == AF_INET6) {
+		return IN6_IS_ADDR_UNSPECIFIED(&((struct sockaddr_in6 *)(void *)address)->sin6_addr);
+	} else {
+		return FALSE;
+	}
+}
 
-		if (!_SC_CFEqual(store_info->dict, S_storeInfo.dict)) {
-			// free any old info
-			ReachabilityStoreInfo_free(&S_storeInfo);
+SCNetworkReachabilityRef
+SCNetworkReachabilityCreateWithAddress(CFAllocatorRef		allocator,
+				       const struct sockaddr	*address)
+{
+	const struct sockaddr		*targetAddress;
+	SCNetworkReachabilityPrivateRef	targetPrivate;
 
-			// save new info
-			if (S_storeInfoActive &&
-			    (store_info->dict != NULL)) {
-				ReachabilityStoreInfo_copy(store_info, &S_storeInfo);
-			}
-		}
-	});
+	targetAddress = is_valid_address(address);
+	if (targetAddress == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
+	}
 
-	return ok;
-}
+	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
+	if (targetPrivate == NULL) {
+		return NULL;
+	}
 
+	targetPrivate->type = reachabilityTypeAddress;
 
-#pragma mark -
-#pragma mark Reachability engine
+	if (!__SCNetworkReachabilityAddressIsEmpty(targetAddress)) {
+		targetPrivate->remoteAddressEndpoint = nw_endpoint_create_address(targetAddress);
+	}
 
+	SC_log(LOG_DEBUG, "%s%s %@",
+	       targetPrivate->log_prefix,
+	       DEBUG_REACHABILITY_TYPE_ADDRESS,
+	       targetPrivate);
 
-#define ROUNDUP(a, size) \
-	(((a) & ((size)-1)) ? (1 + ((a) | ((size)-1))) : (a))
+	return (SCNetworkReachabilityRef)targetPrivate;
+}
 
-#define NEXT_SA(ap) (ap) = (struct sockaddr *) \
-	((caddr_t)(ap) + ((ap)->sa_len ? ROUNDUP((ap)->sa_len,\
-						 sizeof(uint32_t)) :\
-						 sizeof(uint32_t)))
 
-static void
-get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
+#if	!TARGET_OS_IPHONE
+static Boolean
+is_ipv4_loopback(const struct sockaddr *sa)
 {
-	int             i;
-
-	for (i = 0; i < RTAX_MAX; i++) {
-		if (addrs & (1 << i)) {
-			rti_info[i] = sa;
-			NEXT_SA(sa);
-		} else
-			rti_info[i] = NULL;
+	uint32_t		addr;
+	struct sockaddr_in	*sin	= (struct sockaddr_in *)(void *)sa;
+
+	if ((sa == NULL) ||
+	    (sa->sa_len < sizeof(struct sockaddr_in)) ||
+	    (sa->sa_family != AF_INET)) {
+		return FALSE;
 	}
-}
 
+	addr = ntohl(sin->sin_addr.s_addr);
+	return IN_LOOPBACK(addr) ? TRUE : FALSE;
+}
+#endif	// !TARGET_OS_IPHONE
 
-#define BUFLEN (sizeof(struct rt_msghdr) + 512)	/* 8 * sizeof(struct sockaddr_in6) = 192 */
 
+static Boolean
+is_same_address(const struct sockaddr *a, const struct sockaddr *b)
+{
+	const void	*a_addr;
+	const void	*b_addr;
+	size_t		len;
 
-typedef struct {
-	union {
-		char			bytes[BUFLEN];
-		struct rt_msghdr	rtm;
-	} buf;
-	int			error;
-	struct sockaddr         *rti_info[RTAX_MAX];
-	struct rt_msghdr	*rtm;
-	struct sockaddr_dl	*sdl;
-} route_info, *route_info_p;
+	if ((a == NULL) ||
+	    (b == NULL) ||
+	    (a->sa_family != b->sa_family) ||
+	    (a->sa_len    != b->sa_len   )) {
+		return FALSE;
+	}
 
+	switch (a->sa_family) {
+		case AF_INET : {
+			struct sockaddr_in	*a_sin	= (struct sockaddr_in *)(void *)a;
+			struct sockaddr_in	*b_sin	= (struct sockaddr_in *)(void *)b;
 
-/*
- * route_get()
- *	returns	zero if route exists and data returned, EHOSTUNREACH
- *	if no route, or errno for any other error.
- */
-static int
-route_get(const struct sockaddr	*address,
-	  unsigned int		if_index,
-	  route_info		*info)
-{
-	int			n;
-	int			opt;
-	pid_t			pid		= getpid();
-	int			rsock;
-	struct sockaddr         *sa;
-	int32_t			seq		= OSAtomicIncrement32Barrier(&rtm_seq);
-#ifndef	RTM_GET_SILENT
-#warning Note: Using RTM_GET (and not RTM_GET_SILENT)
-	static pthread_mutex_t	lock		= PTHREAD_MUTEX_INITIALIZER;
-	int			sosize		= 48 * 1024;
-#endif
-
-	bzero(info, sizeof(*info));
-
-	info->rtm = &info->buf.rtm;
-	info->rtm->rtm_msglen  = sizeof(struct rt_msghdr);
-	info->rtm->rtm_version = RTM_VERSION;
-#ifdef	RTM_GET_SILENT
-	info->rtm->rtm_type    = RTM_GET_SILENT;
-#else
-	info->rtm->rtm_type    = RTM_GET;
-#endif
-	info->rtm->rtm_flags   = RTF_STATIC|RTF_UP|RTF_HOST|RTF_GATEWAY;
-	info->rtm->rtm_addrs   = RTA_DST|RTA_IFP; /* Both destination and device */
-	info->rtm->rtm_pid     = pid;
-	info->rtm->rtm_seq     = seq;
+			/* ALIGN: assuming a (and b) are aligned, then cast ok. */
+			a_addr = &a_sin->sin_addr;
+			b_addr = &b_sin->sin_addr;
+			len = sizeof(struct in_addr);
+			break;
+		}
 
-	if (if_index != 0) {
-		info->rtm->rtm_flags |= RTF_IFSCOPE;
-		info->rtm->rtm_index = if_index;
-	}
+		case AF_INET6 : {
+			struct sockaddr_in6	*a_sin6	= (struct sockaddr_in6 *)(void *)a;
+			struct sockaddr_in6	*b_sin6	= (struct sockaddr_in6 *)(void *)b;
 
-	switch (address->sa_family) {
-		case AF_INET6: {
-			struct sockaddr_in6	*sin6;
-
-			/* ALIGN: caller ensures that the address is aligned */
-			sin6 = (struct sockaddr_in6 *)(void *)address;
-			if ((IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) ||
-			     IN6_IS_ADDR_MC_LINKLOCAL(&sin6->sin6_addr)) &&
-			    (sin6->sin6_scope_id != 0)) {
-				sin6->sin6_addr.s6_addr16[1] = htons(sin6->sin6_scope_id);
-				sin6->sin6_scope_id = 0;
+			if (a_sin6->sin6_scope_id != b_sin6->sin6_scope_id) {
+				return FALSE;
 			}
+
+			a_addr = &a_sin6->sin6_addr;
+			b_addr = &b_sin6->sin6_addr;
+			len = sizeof(struct in6_addr);
 			break;
 		}
-	}
 
-	sa  = (struct sockaddr *) (info->rtm + 1);
-	bcopy(address, sa, address->sa_len);
-	n = ROUNDUP(sa->sa_len, sizeof(uint32_t));
-	info->rtm->rtm_msglen += n;
-
-	info->sdl = (struct sockaddr_dl *) ((void *)sa + n);
-	info->sdl->sdl_family = AF_LINK;
-	info->sdl->sdl_len = sizeof (struct sockaddr_dl);
-	n = ROUNDUP(info->sdl->sdl_len, sizeof(uint32_t));
-	info->rtm->rtm_msglen += n;
-
-#ifndef	RTM_GET_SILENT
-	pthread_mutex_lock(&lock);
-#endif
-	rsock = socket(PF_ROUTE, SOCK_RAW, PF_ROUTE);
-	if (rsock == -1) {
-		int	error	= errno;
-
-#ifndef	RTM_GET_SILENT
-		pthread_mutex_unlock(&lock);
-#endif
-		SCLog(TRUE, LOG_ERR, CFSTR("socket(PF_ROUTE) failed: %s"), strerror(error));
-		return error;
-	}
-	opt = 1;
-	if (ioctl(rsock, FIONBIO, &opt) < 0) {
-		int	error	= errno;
-
-		(void)close(rsock);
-#ifndef	RTM_GET_SILENT
-		pthread_mutex_unlock(&lock);
-#endif
-		SCLog(TRUE, LOG_ERR, CFSTR("ioctl(FIONBIO) failed: %s"), strerror(error));
-		return error;
+		default :
+			a_addr = a;
+			b_addr = b;
+			len = a->sa_len;
+			break;
 	}
 
-#ifndef	RTM_GET_SILENT
-	if (setsockopt(rsock, SOL_SOCKET, SO_RCVBUF, &sosize, sizeof(sosize)) == -1) {
-		int	error	= errno;
+	return (bcmp(a_addr, b_addr, len) == 0);
+}
 
-		(void)close(rsock);
-		pthread_mutex_unlock(&lock);
-		SCLog(TRUE, LOG_ERR, CFSTR("setsockopt(SO_RCVBUF) failed: %s"), strerror(error));
-		return error;
-	}
-#endif
-
-	if (write(rsock, &info->buf, info->rtm->rtm_msglen) == -1) {
-		int	error	= errno;
-
-		(void)close(rsock);
-#ifndef	RTM_GET_SILENT
-		pthread_mutex_unlock(&lock);
-#endif
-		if (error != ESRCH) {
-			SCLog(TRUE, LOG_ERR, CFSTR("write() failed: %s"), strerror(error));
-			return error;
-		}
-		return EHOSTUNREACH;
-	}
 
-	/*
-	 * Type, seq, pid identify our response.
-	 * Routing sockets are broadcasters on input.
-	 */
-	while (TRUE) {
-		ssize_t		n;
+SCNetworkReachabilityRef
+SCNetworkReachabilityCreateWithAddressPair(CFAllocatorRef		allocator,
+					   const struct sockaddr	*localAddress,
+					   const struct sockaddr	*remoteAddress)
+{
+	SCNetworkReachabilityPrivateRef	targetPrivate;
 
-		n = read(rsock, &info->buf, sizeof(info->buf));
-		if (n == -1) {
-			int	error	= errno;
+	if ((localAddress == NULL) && (remoteAddress == NULL)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
+	}
 
-			if (error == EINTR) {
-				continue;
-			}
-			(void)close(rsock);
-#ifndef	RTM_GET_SILENT
-			pthread_mutex_unlock(&lock);
-#endif
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("SCNetworkReachability: routing socket"
-				    " read() failed: %s"), strerror(error));
-			return error;
-		}
-		if ((info->rtm->rtm_type == RTM_GET) 	&&
-		    (info->rtm->rtm_seq == seq) 	&&
-		    (info->rtm->rtm_pid == pid)) {
-		    break;
+	if (localAddress != NULL) {
+		localAddress = is_valid_address(localAddress);
+		if (localAddress == NULL) {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
 	}
 
-	(void)close(rsock);
-#ifndef	RTM_GET_SILENT
-	pthread_mutex_unlock(&lock);
-#endif
-
-	get_rtaddrs(info->rtm->rtm_addrs, sa, info->rti_info);
-
-//#define LOG_RTADDRS
-#ifdef	LOG_RTADDRS
-	{
-		int	i;
-
-		SCLog(_sc_debug, LOG_DEBUG, CFSTR("rtm_flags = 0x%8.8x"), info->rtm->rtm_flags);
-
-		if ((info->rti_info[RTAX_NETMASK] != NULL) && (info->rti_info[RTAX_DST] != NULL)) {
-			info->rti_info[RTAX_NETMASK]->sa_family = info->rti_info[RTAX_DST]->sa_family;
+	if (remoteAddress != NULL) {
+		remoteAddress = is_valid_address(remoteAddress);
+		if (remoteAddress == NULL) {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
+	}
 
-		for (i = 0; i < RTAX_MAX; i++) {
-			if (info->rti_info[i] != NULL) {
-				char	addr[128];
+#if	!TARGET_OS_IPHONE
+	// Check/fix for loopback IP --> remote IP (rdar://26561383)
+	if ((localAddress != NULL) && (remoteAddress != NULL) &&
+	    is_ipv4_loopback(localAddress) && !is_ipv4_loopback(remoteAddress)) {
+		static Boolean	warned	= FALSE;
 
-				_SC_sockaddr_to_string(info->rti_info[i], addr, sizeof(addr));
-				SCLog(_sc_debug, LOG_DEBUG, CFSTR("%d: %s"), i, addr);
-			}
+		if (!warned) {
+			SC_log(LOG_WARNING, "BUG: SCNetworkReachabilityCreateWithAddressPair() called with local ");
+			SC_log(LOG_WARNING, "address and remote  address. To return the expected (but actually");
+			SC_log(LOG_WARNING, "incorrect) result, switched to SCNetworkReachabilityCreateWithAddress() with");
+			SC_log(LOG_WARNING, "the remote address.");
+			warned = TRUE;
 		}
-	}
-#endif	// LOG_RTADDRS
 
-	if ((info->rti_info[RTAX_IFP] == NULL) ||
-	    (info->rti_info[RTAX_IFP]->sa_family != AF_LINK)) {
-		/* no interface info */
-		SCLog(TRUE, LOG_DEBUG, CFSTR("route_get() no interface info"));
-		return EINVAL;
+		return SCNetworkReachabilityCreateWithAddress(allocator, remoteAddress);
 	}
+#endif	// !TARGET_OS_IPHONE
 
-	/* ALIGN: accessors are retrieving byte values, cast ok. */
-	info->sdl = (struct sockaddr_dl *)(void *) info->rti_info[RTAX_IFP];
-	if ((info->sdl->sdl_nlen == 0) || (info->sdl->sdl_nlen > IFNAMSIZ)) {
-		/* no interface name */
-		return EHOSTUNREACH;
+	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
+	if (targetPrivate == NULL) {
+		return NULL;
 	}
 
-	return 0;
-}
-
-
-static void
-log_address(const char			*str,
-	    const struct sockaddr	*sa,
-	    unsigned int		if_index,
-	    const char			*log_prefix)
-{
-	char	addr[128];
-	char	if_name[IFNAMSIZ + 1];
+	targetPrivate->type = reachabilityTypeAddressPair;
 
-	_SC_sockaddr_to_string(sa, addr, sizeof(addr));
+	if (localAddress != NULL) {
+		targetPrivate->localAddressEndpoint = nw_endpoint_create_address(localAddress);
+	}
 
-	if ((if_index != 0) &&
-	    (if_indextoname(if_index, &if_name[1]) != NULL)) {
-		if_name[0] = '%';
-	} else {
-		if_name[0] = '\0';
+	if (remoteAddress != NULL) {
+		if (is_same_address(localAddress, remoteAddress)) {
+			targetPrivate->remoteAddressEndpoint = nw_retain(targetPrivate->localAddressEndpoint);
+		} else {
+			targetPrivate->remoteAddressEndpoint = nw_endpoint_create_address(remoteAddress);
+		}
 	}
 
-	SCLog(TRUE, LOG_INFO, CFSTR("%s%s(%s%s)"),
-	      log_prefix,
-	      str,
-	      addr,
-	      if_name);
+	targetPrivate->parameters = nw_parameters_create();
+	nw_parameters_set_local_address(targetPrivate->parameters, targetPrivate->localAddressEndpoint);
 
-	return;
+	SC_log(LOG_DEBUG, "%s%s %@",
+	       targetPrivate->log_prefix,
+	       DEBUG_REACHABILITY_TYPE_ADDRESSPAIR,
+	       targetPrivate);
+
+	return (SCNetworkReachabilityRef)targetPrivate;
 }
 
 
-static int
-checkAddress_route(const struct sockaddr	*address,
-		   unsigned int			if_index,
-		   char				*if_name,
-		   struct ifreq			*ifr,
-		   ReachabilityInfo		*reach_info,
-		   route_info			*info,
-		   int				*sc_status,
-		   const char			*log_prefix)
+SCNetworkReachabilityRef
+SCNetworkReachabilityCreateWithName(CFAllocatorRef	allocator,
+				    const char		*nodename)
 {
-	int			isock		= -1;
-	int			ret		= 0;
-	char			*statusMessage	= NULL;
-	struct sockaddr_in	v4mapped;
-
-	switch (address->sa_family) {
-		case AF_INET :
-		case AF_INET6 :
-			if (_sc_debug) {
-				log_address("checkAddress", address, if_index, log_prefix);
-			}
-			break;
-		default :
-			/*
-			 * if no code for this address family (yet)
-			 */
-			SCLog(TRUE, LOG_INFO,
-			      CFSTR("checkAddress(): unexpected address family %d"),
-			      address->sa_family);
-			*sc_status = kSCStatusInvalidArgument;
-			ret = EPERM;
-			goto done;
-	}
+	union {
+		struct sockaddr		sa;
+		struct sockaddr_in	sin;
+		struct sockaddr_in6	sin6;
+	} addr;
+	size_t				nodenameLen;
+	SCNetworkReachabilityPrivateRef	targetPrivate;
 
-	if (address->sa_family == AF_INET6) {
-		/* ALIGN: sin6_addr accessed aligned, cast ok. */
-		struct sockaddr_in6	*sin6	= (struct sockaddr_in6 *)(void *)address;
-
-		if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
-			bzero(&v4mapped, sizeof(v4mapped));
-			v4mapped.sin_len         = sizeof(v4mapped);
-			v4mapped.sin_family      = AF_INET;
-			v4mapped.sin_port        = sin6->sin6_port;
-			v4mapped.sin_addr.s_addr = sin6->sin6_addr.__u6_addr.__u6_addr32[3];
-			address = (struct sockaddr *)&v4mapped;
-		}
+	if (nodename == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
 
-	ret = route_get(address, if_index, info);
-	switch (ret) {
-		case 0 :
-			break;
-		case EHOSTUNREACH :
-			// if no route
-			goto done;
-		default :
-			// if error
-			*sc_status = ret;
-			goto done;
+	nodenameLen = strlen(nodename);
+	if (nodenameLen == 0) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
 
-	/* get the interface flags */
+	if (_SC_string_to_sockaddr(nodename, AF_UNSPEC, (void *)&addr, sizeof(addr)) != NULL) {
+		/* if this "nodename" is really an IP[v6] address in disguise */
+		return SCNetworkReachabilityCreateWithAddress(allocator, &addr.sa);
+	}
 
-	isock = socket(AF_INET, SOCK_DGRAM, 0);
-	if (isock == -1) {
-		ret = errno;
-		SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno));
-		goto done;
+	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
+	if (targetPrivate == NULL) {
+		return NULL;
 	}
 
-	bzero(ifr, sizeof(*ifr));
-	bcopy(info->sdl->sdl_data, ifr->ifr_name, info->sdl->sdl_nlen);
+	targetPrivate->type = reachabilityTypeName;
 
-	if (ioctl(isock, SIOCGIFFLAGS, (char *)ifr) == -1) {
-		ret = errno;
-		SCLog(TRUE, LOG_ERR, CFSTR("ioctl(SIOCGIFFLAGS) failed: %s"), strerror(errno));
-		goto done;
-	}
+	targetPrivate->hostnameEndpoint = nw_endpoint_create_host(nodename, "0");
 
-	if (!(ifr->ifr_flags & IFF_UP)) {
-		ret = EHOSTUNREACH;
-		goto done;
-	}
+	SC_log(LOG_DEBUG, "%s%s %@",
+	       targetPrivate->log_prefix,
+	       DEBUG_REACHABILITY_TYPE_NAME,
+	       targetPrivate);
 
-	statusMessage = "isReachable";
-	reach_info->flags |= kSCNetworkReachabilityFlagsReachable;
-
-	if (info->rtm->rtm_flags & RTF_LOCAL) {
-		statusMessage = "isReachable (is a local address)";
-		reach_info->flags |= kSCNetworkReachabilityFlagsIsLocalAddress;
-	} else if (ifr->ifr_flags & IFF_LOOPBACK) {
-		statusMessage = "isReachable (is loopback network)";
-		reach_info->flags |= kSCNetworkReachabilityFlagsIsLocalAddress;
-	} else if ((info->rti_info[RTAX_IFA] != NULL) &&
-		   (info->rti_info[RTAX_IFA]->sa_family != AF_LINK)) {
-		void	*addr1	= (void *)address;
-		void	*addr2	= (void *)info->rti_info[RTAX_IFA];
-		size_t	len	= address->sa_len;
-
-		if ((address->sa_family != info->rti_info[RTAX_IFA]->sa_family) &&
-		    (address->sa_len    != info->rti_info[RTAX_IFA]->sa_len)) {
-			SCLog(TRUE, LOG_NOTICE,
-			      CFSTR("address family/length mismatch: %d/%d != %d/%d"),
-			      address->sa_family,
-			      address->sa_len,
-			      info->rti_info[RTAX_IFA]->sa_family,
-			      info->rti_info[RTAX_IFA]->sa_len);
-			goto done;
-		}
+	return (SCNetworkReachabilityRef)targetPrivate;
+}
 
-		switch (address->sa_family) {
-			case AF_INET :
-				/* ALIGN: cast ok, because only bcmp is used. */
-				addr1 = &((struct sockaddr_in *)(void *)address)->sin_addr;
-				addr2 = &((struct sockaddr_in *)(void *)info->rti_info[RTAX_IFA])->sin_addr;
-				len = sizeof(struct in_addr);
 
-				/*
-				 * check if 0.0.0.0
-				 */
-				/* ALIGN: sin_addr should be aligned, cast ok. */
-				if (((struct sockaddr_in *)(void *)address)->sin_addr.s_addr == 0) {
-					statusMessage = "isReachable (this host)";
-					reach_info->flags |= kSCNetworkReachabilityFlagsIsLocalAddress;
-				}
-				break;
-			case AF_INET6 :
-				/* ALIGN: cast ok, because only bcmp is used. */
-				addr1 = &((struct sockaddr_in6 *)(void *)address)->sin6_addr;
-				addr2 = &((struct sockaddr_in6 *)(void *)info->rti_info[RTAX_IFA])->sin6_addr;
-				len = sizeof(struct in6_addr);
-				break;
-			default :
-				break;
-		}
+static SCNetworkReachabilityRef
+__SCNetworkReachabilityCreateWithPTR(CFAllocatorRef		allocator,
+				     const struct sockaddr	*ptrAddress)
+{
+	SCNetworkReachabilityPrivateRef	targetPrivate;
 
-		if (bcmp(addr1, addr2, len) == 0) {
-			statusMessage = "isReachable (is interface address)";
-			reach_info->flags |= kSCNetworkReachabilityFlagsIsLocalAddress;
-		}
+	ptrAddress = is_valid_address(ptrAddress);
+	if (ptrAddress == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
 
-	if (!(info->rtm->rtm_flags & RTF_GATEWAY) &&
-	    (info->rti_info[RTAX_GATEWAY] != NULL) &&
-	    (info->rti_info[RTAX_GATEWAY]->sa_family == AF_LINK) &&
-	    !(ifr->ifr_flags & IFF_POINTOPOINT)) {
-		reach_info->flags |= kSCNetworkReachabilityFlagsIsDirect;
+	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
+	if (targetPrivate == NULL) {
+		return NULL;
 	}
 
-	bzero(if_name, IFNAMSIZ);
-	bcopy(info->sdl->sdl_data,
-	      if_name,
-	      (info->sdl->sdl_nlen <= IFNAMSIZ) ? info->sdl->sdl_nlen : IFNAMSIZ);
+	targetPrivate->type = reachabilityTypePTR;
 
-	strlcpy(reach_info->if_name, if_name, sizeof(reach_info->if_name));
-	reach_info->if_index = info->sdl->sdl_index;
+	targetPrivate->remoteAddressEndpoint = nw_endpoint_create_address(ptrAddress);
 
-	if (_sc_debug) {
-		SCLog(TRUE, LOG_INFO, CFSTR("%s  status    = %s"), log_prefix, statusMessage);
-		SCLog(TRUE, LOG_INFO, CFSTR("%s  device    = %s (%hu)"), log_prefix, if_name, info->sdl->sdl_index);
-		SCLog(TRUE, LOG_INFO, CFSTR("%s  sdl_type  = 0x%x"), log_prefix, info->sdl->sdl_type);
-		SCLog(TRUE, LOG_INFO, CFSTR("%s  ifr_flags = 0x%04hx"), log_prefix, ifr->ifr_flags);
-		SCLog(TRUE, LOG_INFO, CFSTR("%s  rtm_flags = 0x%08x"), log_prefix, info->rtm->rtm_flags);
-	}
+	targetPrivate->parameters = nw_parameters_create();
+	nw_parameters_set_resolve_ptr(targetPrivate->parameters, TRUE);
 
-    done :
-	if (isock != -1) (void)close(isock);
-	return ret;
-}
+	SC_log(LOG_DEBUG, "%s%s %@",
+	       targetPrivate->log_prefix,
+	       DEBUG_REACHABILITY_TYPE_PTR,
+	       targetPrivate);
 
+	return (SCNetworkReachabilityRef)targetPrivate;
+}
 
-static Boolean
-checkAddress(ReachabilityStoreInfoRef	store_info,
-	     const struct sockaddr	*address,
-	     unsigned int		if_index,
-	     ReachabilityInfo		*reach_info,
-	     const char			*log_prefix)
-{
-	route_info		info;
-	struct ifreq		ifr;
-	char			if_name[IFNAMSIZ];
-	nwi_ifstate_t		ifstate;
-	nwi_state_t		nwi_state;
-	int			ret;
-	int			sc_status	= kSCStatusReachabilityUnknown;
-
-	_reach_set(reach_info, &NOT_REACHABLE, reach_info->cycle, if_index, NULL);
-
-	nwi_state = nwi_state_copy();
-
-	if (address != NULL) {
-		ret = checkAddress_route(address,
-					if_index,
-					if_name,
-					&ifr,
-					reach_info,
-					&info,
-					&sc_status,
-					log_prefix);
-	} else {
-		/* special case: check only for available paths off the system */
-		ret = EHOSTUNREACH;
-	}
-
-	if (ret == 0) {
-		const struct sockaddr	*vpn_server_address;
-
-		sc_status = kSCStatusOK;
-
-		ifstate = nwi_state_get_ifstate(nwi_state, if_name);
-		if (ifstate == NULL) {
-			goto done;
-		}
-
-		reach_info->flags |= nwi_ifstate_get_reachability_flags(ifstate);
-
-
-		vpn_server_address = nwi_ifstate_get_vpn_server(ifstate);
-		if (vpn_server_address != NULL) {
-			char		dst_if_name[IFNAMSIZ];
-			route_info	dst_info;
-
-			ret = route_get(vpn_server_address, 0, &dst_info);
-			if (ret != 0) {
-				goto done;
-			}
-
-			bzero(&dst_if_name, sizeof(dst_if_name));
-			bcopy(dst_info.sdl->sdl_data,
-			      dst_if_name,
-			      (dst_info.sdl->sdl_nlen <= IFNAMSIZ) ? dst_info.sdl->sdl_nlen : IFNAMSIZ);
-			if (bcmp(if_name, dst_if_name, sizeof(if_name)) != 0) {
-				nwi_ifstate_t ifstate;
-
-				ifstate = nwi_state_get_ifstate(nwi_state, dst_if_name);
-				if (ifstate != NULL) {
-					reach_info->flags |= nwi_ifstate_get_reachability_flags(ifstate);
-				}
-			}
-		}
-	} else if (ret == EHOSTUNREACH) {
-		if (if_index == 0) {
-			int	af;
-
-			// if not "scoped" request
-			af = (address != NULL) ? address->sa_family : AF_UNSPEC;
-			reach_info->flags |= nwi_state_get_reachability_flags(nwi_state, af);
-			sc_status = kSCStatusOK;
-		} else {
-			// if "scoped" request
-			sc_status = kSCStatusNoKey;
-		}
-	}
-
-    done:
-
-	if (reach_info->flags == 0) {
-		SCLog(_sc_debug, LOG_INFO, CFSTR("%s  cannot be reached"), log_prefix);
-	}
-
-	if (nwi_state != NULL) {
-		nwi_state_release(nwi_state);
-	}
-
-	if ((sc_status != kSCStatusOK) && (sc_status != kSCStatusNoKey)) {
-		_SCErrorSet(sc_status);
-		return FALSE;
-	}
-
-	return TRUE;
-}
-
-
-#pragma mark -
-#pragma mark SCNetworkReachability APIs
-
-
-static __inline__ CFTypeRef
-isA_SCNetworkReachability(CFTypeRef obj)
-{
-	return (isA_CFType(obj, SCNetworkReachabilityGetTypeID()));
-}
-
-
-static Boolean
-addr_to_PTR_name(const struct sockaddr *sa, char *name, size_t name_len)
-{
-	int	n;
-
-	switch (sa->sa_family) {
-		case AF_INET : {
-			union {
-				in_addr_t	s_addr;
-				unsigned char	b[4];
-			} rev;
-			/* ALIGN: assuming sa is aligned, then cast ok. */
-			struct sockaddr_in	*sin	= (struct sockaddr_in *)(void *)sa;
-
-			/*
-			 * build "PTR" query name
-			 *   NNN.NNN.NNN.NNN.in-addr.arpa.
-			 */
-			rev.s_addr = sin->sin_addr.s_addr;
-			n = snprintf(name, name_len, "%u.%u.%u.%u.in-addr.arpa.",
-				     rev.b[3],
-				     rev.b[2],
-				     rev.b[1],
-				     rev.b[0]);
-			if ((n == -1) || (n >= name_len)) {
-				return FALSE;
-			}
-
-			break;
-		}
-
-		case AF_INET6 : {
-			int			i;
-			int			s	= 0;
-			/* ALIGN: assume sa is aligned, cast ok. */
-			struct sockaddr_in6	*sin6	= (struct sockaddr_in6 *)(void *)sa;
-			size_t			x	= name_len;
-
-			/*
-			 * build IPv6 "nibble" PTR query name (RFC 1886, RFC 3152)
-			 *   N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.ip6.arpa.
-			 */
-			for (i = sizeof(sin6->sin6_addr) - 1; i >= 0; i--) {
-				n = snprintf(&name[s], x, "%x.%x.",
-					     ( sin6->sin6_addr.s6_addr[i]       & 0xf),
-					     ((sin6->sin6_addr.s6_addr[i] >> 4) & 0xf));
-				if ((n == -1) || (n >= x)) {
-					return FALSE;
-				}
-
-				s += n;
-				x -= n;
-			}
-
-			n = snprintf(&name[s], x, "ip6.arpa.");
-			if ((n == -1) || (n >= x)) {
-				return FALSE;
-			}
-
-			break;
-		}
-
-		default :
-			return FALSE;
-	}
-
-	return TRUE;
-}
-
-
-CFStringRef
-_SCNetworkReachabilityCopyTargetDescription(SCNetworkReachabilityRef target)
-{
-	CFAllocatorRef			allocator	= CFGetAllocator(target);
-	CFMutableStringRef		str;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	str = CFStringCreateMutable(allocator, 0);
-	switch (targetPrivate->type) {
-		case reachabilityTypeAddress :
-		case reachabilityTypeAddressPair : {
-			char		buf[64];
-
-			if (targetPrivate->localAddress != NULL) {
-				_SC_sockaddr_to_string(targetPrivate->localAddress, buf, sizeof(buf));
-				CFStringAppendFormat(str, NULL, CFSTR("local address = %s"),
-						     buf);
-			}
-
-			if (targetPrivate->remoteAddress != NULL) {
-				_SC_sockaddr_to_string(targetPrivate->remoteAddress, buf, sizeof(buf));
-				CFStringAppendFormat(str, NULL, CFSTR("%s%saddress = %s"),
-						     targetPrivate->localAddress ? ", " : "",
-						     (targetPrivate->type == reachabilityTypeAddressPair) ? "remote " : "",
-						     buf);
-			}
-			break;
-		}
-		case reachabilityTypeName : {
-			CFStringAppendFormat(str, NULL, CFSTR("name = %s"), targetPrivate->name);
-			break;
-		}
-		case reachabilityTypePTR : {
-			CFStringAppendFormat(str, NULL, CFSTR("ptr = %s"), targetPrivate->name);
-			break;
-		}
-	}
-
-	return str;
-}
-
-
-CFStringRef
-_SCNetworkReachabilityCopyTargetFlags(SCNetworkReachabilityRef target)
-{
-	CFAllocatorRef			allocator	= CFGetAllocator(target);
-	CFStringRef			str;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	str = CFStringCreateWithFormat(allocator,
-				       NULL,
-				       CFSTR("flags = 0x%08x, if_index = %u%s"),
-				       targetPrivate->info.flags,
-				       targetPrivate->info.if_index,
-				       targetPrivate->info.sleeping ? ", z" : "");
-	return str;
-}
-
-
-static CFStringRef
-__SCNetworkReachabilityCopyDescription(CFTypeRef cf)
-{
-	CFAllocatorRef			allocator	= CFGetAllocator(cf);
-	CFMutableStringRef		result;
-	CFStringRef			str;
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)cf;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	result = CFStringCreateMutable(allocator, 0);
-	CFStringAppendFormat(result, NULL, CFSTR(" {"), cf, allocator);
-
-	// add target description
-	str = _SCNetworkReachabilityCopyTargetDescription(target);
-	CFStringAppend(result, str);
-	CFRelease(str);
-
-	// add additional "name" info
-	if (isReachabilityTypeName(targetPrivate->type)) {
-		if (targetPrivate->dnsActive) {
-			CFStringAppendFormat(result, NULL, CFSTR(" (DNS query active)"));
-		} else if (targetPrivate->serverActive &&
-			   (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending)) {
-			CFStringAppendFormat(result, NULL, CFSTR(" (server query active)"));
-		} else if ((targetPrivate->resolvedAddresses != NULL) || (targetPrivate->resolvedError != NETDB_SUCCESS)) {
-			if (targetPrivate->resolvedAddresses != NULL) {
-				if (isA_CFArray(targetPrivate->resolvedAddresses)) {
-					CFIndex	i;
-					CFIndex	n	= CFArrayGetCount(targetPrivate->resolvedAddresses);
-
-					CFStringAppendFormat(result, NULL, CFSTR(" ("));
-					for (i = 0; i < n; i++) {
-						CFDataRef	address;
-
-						CFStringAppendFormat(result, NULL, CFSTR("%s"),
-								     i > 0 ? ", " : "");
-
-						address	= CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i);
-						if (isA_CFData(address)) {
-							char		buf[64];
-							struct sockaddr	*sa;
-
-							sa      = (struct sockaddr *)CFDataGetBytePtr(address);
-							_SC_sockaddr_to_string(sa, buf, sizeof(buf));
-							CFStringAppendFormat(result, NULL, CFSTR("%s"), buf);
-						} else {
-							CFStringAppendFormat(result, NULL, CFSTR("%@"), address);
-						}
-					}
-					CFStringAppendFormat(result, NULL, CFSTR(")"));
-				} else if (CFEqual(targetPrivate->resolvedAddresses, kCFNull)) {
-					CFStringAppendFormat(result, NULL, CFSTR(" (%s)"),
-							     gai_strerror(targetPrivate->resolvedError));
-				} else {
-					CFStringAppendFormat(result, NULL, CFSTR(" (no addresses)"));
-				}
-			} else {
-				CFStringAppendFormat(result, NULL, CFSTR(" (%s)"),
-						     gai_strerror(targetPrivate->resolvedError));
-			}
-		}
-		if (targetPrivate->dnsFlags != 0) {
-			CFStringAppendFormat(result, NULL, CFSTR(", " DNS_FLAGS_FORMAT),
-					     DNS_FLAGS_VALUES(targetPrivate));
-		}
-	}
-
-	if (targetPrivate->onDemandBypass) {
-		CFStringAppendFormat(result, NULL, CFSTR(", !ondemand"));
-	}
-
-
-	if (targetPrivate->resolverBypass) {
-		CFStringAppendFormat(result, NULL, CFSTR(", !resolve"));
-	}
-
-
-	// add flags
-	if (targetPrivate->scheduled) {
-		str = _SCNetworkReachabilityCopyTargetFlags(target);
-		CFStringAppendFormat(result, NULL, CFSTR(", %@"), str);
-		CFRelease(str);
-	}
-
-	CFStringAppendFormat(result, NULL, CFSTR("}"));
-
-	return result;
-}
-
-
-static void
-__SCNetworkReachabilityDeallocate(CFTypeRef cf)
-{
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)cf;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%srelease"),
-	      targetPrivate->log_prefix);
-
-	/* disconnect from the reachability server */
-
-	if (targetPrivate->serverActive) {
-		__SCNetworkReachabilityServer_targetRemove(target);
-	}
-
-	/* release resources */
-
-	pthread_mutex_destroy(&targetPrivate->lock);
-
-	if (targetPrivate->name != NULL)
-		CFAllocatorDeallocate(NULL, (void *)targetPrivate->name);
-
-	if (targetPrivate->resolvedAddresses != NULL)
-		CFRelease(targetPrivate->resolvedAddresses);
-
-	if (targetPrivate->localAddress != NULL) {
-		if (targetPrivate->localAddress == targetPrivate->remoteAddress) {
-			targetPrivate->remoteAddress = NULL;
-		}
-		CFAllocatorDeallocate(NULL, (void *)targetPrivate->localAddress);
-	}
-
-	if (targetPrivate->remoteAddress != NULL)
-		CFAllocatorDeallocate(NULL, (void *)targetPrivate->remoteAddress);
-
-	if (targetPrivate->rlsContext.release != NULL) {
-		(*targetPrivate->rlsContext.release)(targetPrivate->rlsContext.info);
-	}
-
-	if (targetPrivate->onDemandName != NULL) {
-		CFRelease(targetPrivate->onDemandName);
-	}
-
-	if (targetPrivate->onDemandRemoteAddress != NULL) {
-		CFRelease(targetPrivate->onDemandRemoteAddress);
-	}
-
-	if (targetPrivate->onDemandServer != NULL) {
-		CFRelease(targetPrivate->onDemandServer);
-	}
-
-	if (targetPrivate->onDemandServiceID != NULL) {
-		CFRelease(targetPrivate->onDemandServiceID);
-	}
-
-	if (targetPrivate->serverDigest != NULL) {
-		CFRelease(targetPrivate->serverDigest);
-	}
-
-	if (targetPrivate->serverGroup != NULL) {
-		dispatch_release(targetPrivate->serverGroup);
-	}
-
-	if (targetPrivate->serverQueue != NULL) {
-		dispatch_release(targetPrivate->serverQueue);
-	}
-
-	if (targetPrivate->serverWatchers != NULL) {
-		CFRelease(targetPrivate->serverWatchers);
-	}
-
-	if (targetPrivate->nePolicyResult) {
-		free(targetPrivate->nePolicyResult);
-	}
-
-	return;
-}
-
-
-static void
-__SCNetworkReachabilityInitialize(void)
-{
-	__kSCNetworkReachabilityTypeID = _CFRuntimeRegisterClass(&__SCNetworkReachabilityClass);
-
-	// provide a way to enable SCNetworkReachability logging without
-	// having to set _sc_debug=1.
-	if ((getenv("REACH_LOGGING") != NULL) ||
-	    (CFPreferencesGetAppBooleanValue(CFSTR("com.apple.SCNetworkReachability.debug"),
-					     kCFPreferencesCurrentApplication,
-					     NULL))) {
-		_sc_debug = TRUE;
-	}
-
-	// set per-process "bypass" of the SCNetworkReachability server
-	if (getenv("REACH_SERVER_BYPASS") != NULL) {
-		D_serverBypass = TRUE;
-	}
-
-
-	pthread_mutexattr_init(&lock_attr);
-	pthread_mutexattr_settype(&lock_attr, PTHREAD_MUTEX_ERRORCHECK);
-
-	return;
-}
-
-
-__private_extern__
-dispatch_queue_t
-__SCNetworkReachability_concurrent_queue()
-{
-	static dispatch_once_t	once;
-	static dispatch_queue_t	q;
-
-	dispatch_once(&once, ^{
-		q = dispatch_queue_create("SCNetworkReachability.concurrent",
-					  DISPATCH_QUEUE_CONCURRENT);
-	});
-
-	return q;
-}
-
-
-/*
- * __SCNetworkReachabilityUpdateConcurrent
- *
- * Calls reachUpdate()
- * - caller must be holding a reference to the target
- * - caller must *not* be holding the target lock
- * - caller must be running on the __SCNetworkReachability_concurrent_queue()
- */
-__private_extern__
-void
-__SCNetworkReachabilityUpdateConcurrent(SCNetworkReachabilityRef target)
-{
-	Boolean				changed;
-	unsigned int			n;
-	dispatch_queue_t		queue;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	changed = reachUpdate((void *)target);
-	if (!changed) {
-		return;
-	}
-
-	n = _SC_ATOMIC_INC(&targetPrivate->pending);
-	if (n > 0) {
-		// if we already have a notification pending
-		return;
-	}
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	queue = targetPrivate->dispatchQueue;
-	if (queue != NULL) {
-		dispatch_group_t	group;
-
-		dispatch_retain(queue);
-
-		group = targetPrivate->dispatchGroup;
-		dispatch_group_enter(group);
-
-		MUTEX_UNLOCK(&targetPrivate->lock);
-
-		dispatch_sync(queue, ^{
-			reachPerform((void *)target);
-			dispatch_group_leave(group);
-		});
-
-		dispatch_release(queue);
-	} else {
-		if (targetPrivate->rls != NULL) {
-			CFRunLoopSourceSignal(targetPrivate->rls);
-			_SC_signalRunLoop(target, targetPrivate->rls, targetPrivate->rlList);
-		}
-
-		MUTEX_UNLOCK(&targetPrivate->lock);
-	}
-
-	return;
-}
-
-
-/*
- * __SCNetworkReachabilityUpdate
- *
- * Calls reachUpdate() [indirectly]
- * - caller can be holding the target lock
- * - caller can be running on any dispatch queue
- */
-__private_extern__
-void
-__SCNetworkReachabilityUpdate(SCNetworkReachabilityRef target)
-{
-	CFRetain(target);
-	dispatch_async(__SCNetworkReachability_concurrent_queue(), ^{
-		__SCNetworkReachabilityUpdateConcurrent(target);
-		CFRelease(target);
-	});
-
-	return;
-}
-
-
-static SCNetworkReachabilityPrivateRef
-__SCNetworkReachabilityCreatePrivate(CFAllocatorRef	allocator)
-{
-	SCNetworkReachabilityPrivateRef		targetPrivate;
-	uint32_t				size;
-
-	/* initialize runtime */
-	pthread_once(&initialized, __SCNetworkReachabilityInitialize);
-
-	/* allocate target */
-	size          = sizeof(SCNetworkReachabilityPrivate) - sizeof(CFRuntimeBase);
-	targetPrivate = (SCNetworkReachabilityPrivateRef)_CFRuntimeCreateInstance(allocator,
-										  __kSCNetworkReachabilityTypeID,
-										  size,
-										  NULL);
-	if (targetPrivate == NULL) {
-		return NULL;
-	}
-
-	bzero((void *)targetPrivate + sizeof(CFRuntimeBase), size);
-
-	MUTEX_INIT(&targetPrivate->lock);
-
-	targetPrivate->cycle				= 1;
-	targetPrivate->last_notify			= NOT_REPORTED;
-	targetPrivate->serverBypass			= D_serverBypass;
-
-
-
-	targetPrivate->log_prefix[0] = '\0';
-	if (_sc_log > 0) {
-		snprintf(targetPrivate->log_prefix,
-			 sizeof(targetPrivate->log_prefix),
-			 "[%p] ",
-			 targetPrivate);
-	}
-
-	return targetPrivate;
-}
-
-
-
-
-static const struct sockaddr *
-is_valid_address(const struct sockaddr *address)
-{
-	const struct sockaddr	*valid	= NULL;
-	static Boolean	warned	= FALSE;
-
-	if ((address != NULL) &&
-	    (address->sa_len <= sizeof(struct sockaddr_storage))) {
-		switch (address->sa_family) {
-			case AF_INET :
-				if (address->sa_len >= sizeof(struct sockaddr_in)) {
-					valid = address;
-				} else {
-					if (!warned) {
-						SCLog(TRUE, LOG_ERR,
-						      CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %zu"),
-						      address->sa_len,
-						      sizeof(struct sockaddr_in));
-						warned = TRUE;
-					}
-				}
-				break;
-			case AF_INET6 :
-				if (address->sa_len >= sizeof(struct sockaddr_in6)) {
-					valid = address;
-				} else if (!warned) {
-					SCLog(TRUE, LOG_ERR,
-					      CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %zu"),
-					      address->sa_len,
-					      sizeof(struct sockaddr_in6));
-					warned = TRUE;
-				}
-				break;
-			default :
-				if (!warned) {
-					SCLog(TRUE, LOG_ERR,
-					      CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with invalid address family %d"),
-					      address->sa_family);
-					warned = TRUE;
-				}
-		}
-	}
-
-	return valid;
-}
-
-
-
-
-
-
-SCNetworkReachabilityRef
-SCNetworkReachabilityCreateWithAddress(CFAllocatorRef		allocator,
-				       const struct sockaddr	*address)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate;
-
-	address = is_valid_address(address);
-	if (address == NULL) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
-	if (targetPrivate == NULL) {
-		return NULL;
-	}
-
-	targetPrivate->type = reachabilityTypeAddress;
-	targetPrivate->remoteAddress = CFAllocatorAllocate(NULL, address->sa_len, 0);
-	bcopy(address, targetPrivate->remoteAddress, address->sa_len);
-
-
-
-	SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"),
-	      targetPrivate->log_prefix,
-	      DEBUG_REACHABILITY_TYPE_ADDRESS,
-	      targetPrivate);
-
-	return (SCNetworkReachabilityRef)targetPrivate;
-}
-
-
-static Boolean
-is_same_address(const struct sockaddr *a, const struct sockaddr *b)
-{
-	const void	*a_addr;
-	const void	*b_addr;
-	size_t		len;
-
-	if ((a == NULL) ||
-	    (b == NULL) ||
-	    (a->sa_family != b->sa_family) ||
-	    (a->sa_len    != b->sa_len   )) {
-		return FALSE;
-	}
-
-	switch (a->sa_family) {
-		case AF_INET : {
-			struct sockaddr_in	*a_sin	= (struct sockaddr_in *)(void *)a;
-			struct sockaddr_in	*b_sin	= (struct sockaddr_in *)(void *)b;
-
-			/* ALIGN: assuming a (and b) are aligned, then cast ok. */
-			a_addr = &a_sin->sin_addr;
-			b_addr = &b_sin->sin_addr;
-			len = sizeof(struct in_addr);
-			break;
-		}
-
-		case AF_INET6 : {
-			struct sockaddr_in6	*a_sin6	= (struct sockaddr_in6 *)(void *)a;
-			struct sockaddr_in6	*b_sin6	= (struct sockaddr_in6 *)(void *)b;
-
-			if (a_sin6->sin6_scope_id != b_sin6->sin6_scope_id) {
-				return FALSE;
-			}
-
-			a_addr = &a_sin6->sin6_addr;
-			b_addr = &b_sin6->sin6_addr;
-			len = sizeof(struct in6_addr);
-			break;
-		}
-
-		default :
-			a_addr = a;
-			b_addr = b;
-			len = a->sa_len;
-			break;
-	}
-
-	return (bcmp(a_addr, b_addr, len) == 0);
-}
-
-
-SCNetworkReachabilityRef
-SCNetworkReachabilityCreateWithAddressPair(CFAllocatorRef		allocator,
-					   const struct sockaddr	*localAddress,
-					   const struct sockaddr	*remoteAddress)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate;
-
-	if ((localAddress == NULL) && (remoteAddress == NULL)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-	if (localAddress != NULL) {
-		localAddress = is_valid_address(localAddress);
-		if (localAddress == NULL) {
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-	}
-
-	if (remoteAddress != NULL) {
-		remoteAddress = is_valid_address(remoteAddress);
-		if (remoteAddress == NULL) {
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-	}
-
-	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
-	if (targetPrivate == NULL) {
-		return NULL;
-	}
-
-	targetPrivate->type = reachabilityTypeAddressPair;
-
-	if (localAddress != NULL) {
-		targetPrivate->localAddress = CFAllocatorAllocate(NULL, localAddress->sa_len, 0);
-		bcopy(localAddress, targetPrivate->localAddress, localAddress->sa_len);
-	}
-
-	if (remoteAddress != NULL) {
-		if (is_same_address(localAddress, remoteAddress)) {
-			targetPrivate->remoteAddress = targetPrivate->localAddress;
-		} else {
-			targetPrivate->remoteAddress = CFAllocatorAllocate(NULL, remoteAddress->sa_len, 0);
-			bcopy(remoteAddress, targetPrivate->remoteAddress, remoteAddress->sa_len);
-		}
-	}
-
-
-
-	SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"),
-	      targetPrivate->log_prefix,
-	      DEBUG_REACHABILITY_TYPE_ADDRESSPAIR,
-	      targetPrivate);
-
-	return (SCNetworkReachabilityRef)targetPrivate;
-}
-
-
-SCNetworkReachabilityRef
-SCNetworkReachabilityCreateWithName(CFAllocatorRef	allocator,
-				    const char		*nodename)
-{
-	union {
-		struct sockaddr		sa;
-		struct sockaddr_in	sin;
-		struct sockaddr_in6	sin6;
-	} addr;
-	size_t				nodenameLen;
-	SCNetworkReachabilityPrivateRef	targetPrivate;
-
-	if (nodename == NULL) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-	nodenameLen = strlen(nodename);
-	if (nodenameLen == 0) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-	if (nodename[nodenameLen - 1] == '.') {
-		int		dots;
-		size_t		i;
-
-		// trim trailing "."s
-		do {
-			--nodenameLen;
-		} while ((nodenameLen > 0) && (nodename[nodenameLen - 1] == '.'));
-
-		if (nodenameLen == 0) {
-			// if only trailing "."s
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-
-		// count the remaining "."s
-		dots = 0;
-		for (i = 0; i < nodenameLen; i++) {
-			if (nodename[i] == '.') dots++;
-		}
-
-		if (dots == 0) {
-			// if only a single-label, add back the FQDN "."
-			nodenameLen++;
-		}
-	}
-
-	if (_SC_string_to_sockaddr(nodename, AF_UNSPEC, (void *)&addr, sizeof(addr)) != NULL) {
-		/* if this "nodename" is really an IP[v6] address in disguise */
-		return SCNetworkReachabilityCreateWithAddress(allocator, &addr.sa);
-	}
-
-	targetPrivate = __SCNetworkReachabilityCreatePrivate(allocator);
-	if (targetPrivate == NULL) {
-		return NULL;
-	}
-
-	targetPrivate->type = reachabilityTypeName;
-
-	targetPrivate->name = CFAllocatorAllocate(NULL, nodenameLen + 1, 0);
-	strlcpy((char *)targetPrivate->name, nodename, nodenameLen + 1);
-
-	targetPrivate->needResolve = TRUE;
-	targetPrivate->info.flags |= kSCNetworkReachabilityFlagsFirstResolvePending;
-	targetPrivate->serverInfo.flags |= kSCNetworkReachabilityFlagsFirstResolvePending;
-
-	{
-		/* make sure AppLayerVPN only is in client mode */
-		CFDictionaryRef	appLayerVPNProperties;
-
-		appLayerVPNProperties = VPNAppLayerCopyCurrentAppProperties();
-		if (appLayerVPNProperties != NULL) {
-			targetPrivate->serverBypassForVPN = TRUE;
-			targetPrivate->serverBypass = YES;
-			CFRelease(appLayerVPNProperties);
-		}
-	}
-
-	SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"),
-	      targetPrivate->log_prefix,
-	      DEBUG_REACHABILITY_TYPE_NAME,
-	      targetPrivate);
-
-	return (SCNetworkReachabilityRef)targetPrivate;
-}
-
-
-static SCNetworkReachabilityRef
-__SCNetworkReachabilityCreateWithPtr(CFAllocatorRef		allocator,
-				     const char			*ptrName,
-				     const struct sockaddr	*ptrAddress)
-{
-	SCNetworkReachabilityRef	target;
-	SCNetworkReachabilityPrivateRef	targetPrivate;
-
-	target = SCNetworkReachabilityCreateWithName(NULL, ptrName);
-	if (target == NULL) {
-		return NULL;
-	}
-
-	targetPrivate = (SCNetworkReachabilityPrivateRef)target;
-
-	// change type
-	targetPrivate->type = reachabilityTypePTR;
-
-	// and keep the address
-	targetPrivate->remoteAddress = CFAllocatorAllocate(NULL, ptrAddress->sa_len, 0);
-	bcopy(ptrAddress, targetPrivate->remoteAddress, ptrAddress->sa_len);
-
-	return target;
-}
-
-
-
-
-SCNetworkReachabilityRef
-SCNetworkReachabilityCreateWithOptions(CFAllocatorRef	allocator,
-				       CFDictionaryRef	options)
-{
-	const struct sockaddr		*addr_l		= NULL;
-	const struct sockaddr		*addr_p		= NULL;
-	const struct sockaddr		*addr_r		= NULL;
-	CFDataRef			data;
-	CFStringRef			interface	= NULL;
-	CFStringRef			nodename;
-	CFBooleanRef			onDemandBypass;
-	CFBooleanRef			resolverBypass;
-	CFBooleanRef			serverBypass;
-	SCNetworkReachabilityRef	target;
-	SCNetworkReachabilityPrivateRef	targetPrivate;
-
-	if (!isA_CFDictionary(options)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-	nodename = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionNodeName);
-	if ((nodename != NULL) &&
-	    (!isA_CFString(nodename) || (CFStringGetLength(nodename) == 0))) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-	data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionLocalAddress);
-	if (data != NULL) {
-		if (!isA_CFData(data) || (CFDataGetLength(data) < sizeof(struct sockaddr_in))) {
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-		addr_l = (const struct sockaddr *)CFDataGetBytePtr(data);
-	}
-	data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionPTRAddress);
-	if (data != NULL) {
-		if (!isA_CFData(data) || (CFDataGetLength(data) < sizeof(struct sockaddr_in))) {
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-		addr_p = (const struct sockaddr *)CFDataGetBytePtr(data);
-	}
-	data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionRemoteAddress);
-	if (data != NULL) {
-		if (!isA_CFData(data) || (CFDataGetLength(data) < sizeof(struct sockaddr_in))) {
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-		addr_r = (const struct sockaddr *)CFDataGetBytePtr(data);
-	}
-	interface = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionInterface);
-	if ((interface != NULL) &&
-	    (!isA_CFString(interface) || (CFStringGetLength(interface) == 0))) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-	onDemandBypass = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionConnectionOnDemandBypass);
-	if ((onDemandBypass != NULL) && !isA_CFBoolean(onDemandBypass)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-	resolverBypass = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionResolverBypass);
-	if ((resolverBypass != NULL) && !isA_CFBoolean(resolverBypass)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-
-	serverBypass = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionServerBypass);
-	if ((serverBypass != NULL) && !isA_CFBoolean(serverBypass)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-
-	if (nodename != NULL) {
-		const char	*name;
-
-		if ((addr_l != NULL) || (addr_r != NULL) || (addr_p != NULL)) {
-			// can't have both a nodename and an address
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-
-		name = _SC_cfstring_to_cstring(nodename, NULL, 0, kCFStringEncodingUTF8);
-		target = SCNetworkReachabilityCreateWithName(allocator, name);
-		CFAllocatorDeallocate(NULL, (void *)name);
-	} else if (addr_p != NULL) {
-		char	name[MAXHOSTNAMELEN];
-
-		if ((addr_l != NULL) ||					// can't have PTR and target address
-		    (addr_r != NULL) ||					// can't have PTR and target address
-		    !addr_to_PTR_name(addr_p, name, sizeof(name))) {	// can't convert PTR
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-
-		target = __SCNetworkReachabilityCreateWithPtr(NULL, name, addr_p);
-	} else {
-		if ((addr_l != NULL) && (addr_r != NULL)) {
-			target = SCNetworkReachabilityCreateWithAddressPair(NULL, addr_l, addr_r);
-		} else if (addr_r != NULL) {
-			target = SCNetworkReachabilityCreateWithAddress(NULL, addr_r);
-		} else if (addr_l != NULL) {
-			target = SCNetworkReachabilityCreateWithAddressPair(NULL, addr_l, NULL);
-		} else {
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-	}
-	if (target == NULL) {
-		return NULL;
-	}
-
-	targetPrivate = (SCNetworkReachabilityPrivateRef)target;
-
-	if (interface != NULL) {
-		if ((_SC_cfstring_to_cstring(interface,
-					     targetPrivate->if_name,
-					     sizeof(targetPrivate->if_name),
-					     kCFStringEncodingASCII) == NULL) ||
-		    ((targetPrivate->if_index = if_nametoindex(targetPrivate->if_name)) == 0)) {
-			CFRelease(targetPrivate);
-			_SCErrorSet(kSCStatusInvalidArgument);
-			return NULL;
-		}
-	}
-
-
-	if (onDemandBypass != NULL) {
-		targetPrivate->onDemandBypass = CFBooleanGetValue(onDemandBypass);
-	}
-
-	if (resolverBypass != NULL) {
-		targetPrivate->resolverBypass = CFBooleanGetValue(resolverBypass);
-	}
-
-	/* if by name, make sure client-only VPN types stay in client mode */
-	if (serverBypass != NULL && targetPrivate->serverBypassForVPN == FALSE) {
-		targetPrivate->serverBypass = CFBooleanGetValue(serverBypass);
-	}
-
-
-	if (_sc_debug && (_sc_log > 0)) {
-		const char	*opt	= "???";
-
-		switch (targetPrivate->type) {
-			case reachabilityTypeAddress :
-				opt = DEBUG_REACHABILITY_TYPE_ADDRESS_OPTIONS;
-				break;
-			case reachabilityTypeAddressPair :
-				opt = DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_OPTIONS;
-				break;
-			case reachabilityTypeName :
-				opt = DEBUG_REACHABILITY_TYPE_NAME_OPTIONS;
-				break;
-			case reachabilityTypePTR :
-				opt = DEBUG_REACHABILITY_TYPE_PTR_OPTIONS;
-				break;
-		}
-
-		SCLog(TRUE, LOG_INFO, CFSTR("%s%s %@"),
-		      targetPrivate->log_prefix,
-		      opt,
-		      targetPrivate);
-	}
-
-	return (SCNetworkReachabilityRef)targetPrivate;
-}
-
-
-static SCNetworkReachabilityRef
-__SCNetworkReachabilityCreateCopy(SCNetworkReachabilityRef target)
-{
-	SCNetworkReachabilityRef	clone		= NULL;
-	SCNetworkReachabilityPrivateRef	clonePrivate;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	switch (targetPrivate->type) {
-		case reachabilityTypeAddress :
-			clone = SCNetworkReachabilityCreateWithAddress(NULL,
-								       targetPrivate->remoteAddress);
-			break;
-		case reachabilityTypeAddressPair :
-			clone = SCNetworkReachabilityCreateWithAddressPair(NULL,
-									   targetPrivate->localAddress,
-									   targetPrivate->remoteAddress);
-			break;
-		case reachabilityTypeName :
-			clone = SCNetworkReachabilityCreateWithName(NULL,
-								    targetPrivate->name);
-			break;
-		case reachabilityTypePTR :
-			clone = __SCNetworkReachabilityCreateWithPtr(NULL,
-								     targetPrivate->name,
-								     targetPrivate->remoteAddress);
-			break;
-	}
-	if (clone == NULL) {
-		return NULL;
-	}
-
-	clonePrivate = (SCNetworkReachabilityPrivateRef)clone;
-
-	clonePrivate->quiet = TRUE;
-
-	clonePrivate->if_index = targetPrivate->if_index;
-	bcopy(targetPrivate->if_name, clonePrivate->if_name, sizeof(clonePrivate->if_name));
-
-	clonePrivate->onDemandBypass = targetPrivate->onDemandBypass;
-
-
-	clonePrivate->serverBypass = targetPrivate->serverBypass;
-
-	clonePrivate->resolverBypass = targetPrivate->resolverBypass;
-
-
-	if (_sc_debug && (_sc_log > 0)) {
-		const char	*opt	= "???";
-
-		switch (clonePrivate->type) {
-			case reachabilityTypeAddress :
-				opt = DEBUG_REACHABILITY_TYPE_ADDRESS_CLONE;
-				break;
-			case reachabilityTypeAddressPair :
-				opt = DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_CLONE;
-				break;
-			case reachabilityTypeName :
-				opt = DEBUG_REACHABILITY_TYPE_NAME_CLONE;
-				break;
-			case reachabilityTypePTR :
-				opt = DEBUG_REACHABILITY_TYPE_PTR_CLONE;
-				break;
-		}
-
-		SCLog(TRUE, LOG_INFO, CFSTR("%s%s %p %@"),
-		      clonePrivate->log_prefix,
-		      opt,
-		      targetPrivate,
-		      clone);
-	}
-
-	return clone;
-}
-
-
-CFTypeID
-SCNetworkReachabilityGetTypeID(void)
-{
-	pthread_once(&initialized, __SCNetworkReachabilityInitialize);	/* initialize runtime */
-	return __kSCNetworkReachabilityTypeID;
-}
-
-
-CFArrayRef	/* CFArray[CFData], where each CFData is a (struct sockaddr *) */
-SCNetworkReachabilityCopyResolvedAddress(SCNetworkReachabilityRef	target,
-					 int				*error_num)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	if (!isA_SCNetworkReachability(target)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-	       return NULL;
-	}
-
-	if (!isReachabilityTypeName(targetPrivate->type)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-	       return NULL;
-	}
-
-	if (error_num) {
-		*error_num = targetPrivate->resolvedError;
-	}
-
-	if (targetPrivate->resolvedAddresses != NULL) {
-		if (isA_CFArray(targetPrivate->resolvedAddresses)) {
-			return CFRetain(targetPrivate->resolvedAddresses);
-		} else {
-			/* if status is known but no resolved addresses to return */
-			_SCErrorSet(kSCStatusOK);
-			return NULL;
-		}
-	}
-
-	_SCErrorSet(kSCStatusReachabilityUnknown);
-	return NULL;
-}
-
-
-static void
-__SCNetworkReachabilitySetResolvedError(SCNetworkReachabilityRef	target,
-					int32_t				status)
-{
-	SCNetworkReachabilityPrivateRef		targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_ASSERT_HELD(&targetPrivate->lock);
-
-	__mark_operation_end(target,
-			     FALSE,				// if successful query
-			     dns_query_async,			// async
-			     &targetPrivate->dnsQueryStart,	// start time
-			     &targetPrivate->dnsQueryEnd);	// end time
-
-	if (targetPrivate->resolvedAddresses != NULL) {
-		CFRelease(targetPrivate->resolvedAddresses);
-		targetPrivate->resolvedAddresses = NULL;
-	}
-
-	SCLog(_sc_debug, LOG_INFO, CFSTR("%scould not be resolved: %s"),
-	      targetPrivate->log_prefix,
-	      gai_strerror(status));
-
-	/* save the error associated with the attempt to resolve the name */
-	targetPrivate->resolvedAddresses = CFRetain(kCFNull);
-	targetPrivate->resolvedError     = status;
-	targetPrivate->needResolve       = FALSE;
-
-	return;
-}
-
-
-/*
- * rankReachability()
- *   Not reachable       == 0
- *   Connection Required == 1
- *   Reachable           == 2
- */
-static int
-rankReachability(SCNetworkReachabilityFlags flags)
-{
-	int	rank = 0;
-
-	if (flags & kSCNetworkReachabilityFlagsReachable)		rank = 2;
-	if (flags & kSCNetworkReachabilityFlagsConnectionRequired)	rank = 1;
-	return rank;
-}
-
-
-#pragma mark -
-#pragma mark DNS name resolution
-
-
-static void
-update_resolver_reachability(ReachabilityStoreInfoRef	store_info,
-			     dns_resolver_t		*resolver,
-			     SCNetworkReachabilityFlags	*flags,
-			     Boolean			*haveDNS,
-			     uint32_t			*resolver_if_index,
-			     const char			*log_prefix)
-{
-	if (resolver_if_index) *resolver_if_index = 0;
-
-	if (resolver->n_nameserver > 0) {
-		*flags   = (SCNetworkReachabilityFlags)resolver->reach_flags;
-		if (resolver_if_index != NULL) {
-			*resolver_if_index = resolver->if_index;
-		}
-		*haveDNS = TRUE;
-	} else {
-		*flags   = kSCNetworkReachabilityFlagsReachable;
-		*haveDNS = FALSE;
-	}
-
-	return;
-}
-
-
-static Boolean
-check_matching_resolvers(ReachabilityStoreInfoRef	store_info,
-			 dns_config_t			*dns_config,
-			 const char			*fqdn,
-			 unsigned int			if_index,
-			 SCNetworkReachabilityFlags	*flags,
-			 Boolean			*haveDNS,
-			 uint32_t			*resolver_if_index,
-			 int				*dns_config_index,
-			 const char			*log_prefix)
-{
-	int		i;
-	Boolean		matched		= FALSE;
-	const char	*name		= fqdn;
-	int32_t		n_resolvers;
-	dns_resolver_t	**resolvers;
-
-	if (if_index == 0) {
-		n_resolvers = dns_config->n_resolver;
-		resolvers   = dns_config->resolver;
-	} else {
-		n_resolvers = dns_config->n_scoped_resolver;
-		resolvers   = dns_config->scoped_resolver;
-	}
-
-	/* In case we couldn't find a match, setting an index of -1
-	   and resolver_if_index 0 */
-	if (dns_config_index != NULL) *dns_config_index = -1;
-	if (resolver_if_index != NULL) *resolver_if_index = 0;
-
-	while (!matched && (name != NULL)) {
-		size_t	len;
-
-		/*
-		 * check if the provided name (or sub-component)
-		 * matches one of our resolver configurations.
-		 */
-		len = strlen(name);
-		for (i = 0; i < n_resolvers; i++) {
-			char		*domain;
-			dns_resolver_t	*resolver;
-
-			resolver = resolvers[i];
-			if ((if_index != 0) && (if_index != resolver->if_index)) {
-				continue;
-			}
-
-			domain   = resolver->domain;
-			if (domain != NULL && (len == strlen(domain))) {
-				if (strcasecmp(name, domain) == 0) {
-					/*
-					 * if name matches domain
-					 */
-					matched = TRUE;
-					update_resolver_reachability(store_info,
-								     resolver,
-								     flags,
-								     haveDNS,
-								     resolver_if_index,
-								     log_prefix);
-					if (dns_config_index != NULL) *dns_config_index = i;
-					break;
-				}
-			}
-		}
-
-		if (!matched) {
-			/*
-			 * we have not found a matching resolver, try
-			 * a less qualified domain
-			 */
-			name = strchr(name, '.');
-			if ((name != NULL) && (*name != '\0')) {
-				name++;
-			} else {
-				name = NULL;
-			}
-		}
-	}
-
-	return matched;
-}
-
-
-static dns_resolver_t *
-get_default_resolver(dns_config_t *dns_config, unsigned int if_index)
-{
-	int		i;
-	int32_t		n_resolvers;
-	dns_resolver_t	*resolver	= NULL;
-	dns_resolver_t	**resolvers;
-
-	if (if_index == 0) {
-		n_resolvers = dns_config->n_resolver;
-		resolvers   = dns_config->resolver;
-	} else {
-		n_resolvers = dns_config->n_scoped_resolver;
-		resolvers   = dns_config->scoped_resolver;
-	}
-
-	for (i = 0; i < n_resolvers; i++) {
-		if ((if_index != 0) && (if_index != resolvers[i]->if_index)) {
-			continue;
-		}
-
-		if (((if_index == 0) && (i == 0)) ||
-		    ((if_index != 0) && (resolver == NULL))) {
-			// if this is the first (aka default) resolver
-			resolver = resolvers[i];
-		} else if ((resolvers[i]->domain == NULL) &&
-			   (resolvers[i]->search_order < resolver->search_order)) {
-			// if this is a default resolver with a lower search order
-			resolver = resolvers[i];
-		}
-	}
-
-	return resolver;
-}
-
-
-static dns_configuration_t *
-dns_configuration_retain()
-{
-	dns_configuration_t	*config;
-
-	pthread_mutex_lock(&dns_lock);
-
-	if (dns_configuration != NULL) {
-		Boolean		refresh	= TRUE;
-
-		if (dns_token_valid) {
-			int		check	= 0;
-			uint32_t	status;
-
-			/*
-			 * check if the global [DNS] configuration snapshot needs
-			 * to be updated
-			 */
-			status = notify_check(dns_token, &check);
-			if (status != NOTIFY_STATUS_OK) {
-				SCLog(TRUE, LOG_INFO, CFSTR("notify_check() failed, status=%u"), status);
-			} else if (check == 0) {
-				// if the snapshot does not need to be refreshed
-				refresh = FALSE;
-			}
-		}
-
-		if (refresh) {
-			if (dns_configuration->refs == 0) {
-				dns_configuration_free(dns_configuration->config);
-				CFAllocatorDeallocate(NULL, dns_configuration);
-			}
-			dns_configuration = NULL;
-		}
-	}
-
-	if (dns_configuration == NULL) {
-		dns_config_t	*new_config;
-
-		new_config = dns_configuration_copy();
-		if (new_config != NULL) {
-			dns_configuration = CFAllocatorAllocate(NULL, sizeof(dns_configuration_t), 0);
-			dns_configuration->config = new_config;
-			dns_configuration->refs   = 0;
-		}
-	}
-
-	if (dns_configuration != NULL) {
-		dns_configuration->refs++;
-	}
-
-	config = dns_configuration;
-	pthread_mutex_unlock(&dns_lock);
-	return config;
-}
-
-
-static void
-dns_configuration_release(dns_configuration_t *config)
-{
-	pthread_mutex_lock(&dns_lock);
-
-	config->refs--;
-	if (config->refs == 0) {
-		if (!dns_token_valid && (config == dns_configuration)) {
-			dns_configuration = NULL;
-		}
-
-		if (config != dns_configuration) {
-			dns_configuration_free(config->config);
-			CFAllocatorDeallocate(NULL, config);
-		}
-	}
-
-	pthread_mutex_unlock(&dns_lock);
-	return;
-}
-
-
-static Boolean
-dns_configuration_watch()
-{
-	int		dns_check	= 0;
-	const char	*dns_key;
-	Boolean		ok		= FALSE;
-	uint32_t	status;
-
-	pthread_mutex_lock(&dns_lock);
-
-	dns_key = dns_configuration_notify_key();
-	if (dns_key == NULL) {
-		SCLog(TRUE, LOG_INFO, CFSTR("dns_configuration_notify_key() failed"));
-		goto done;
-	}
-
-	status = notify_register_check(dns_key, &dns_token);
-	if (status == NOTIFY_STATUS_OK) {
-		dns_token_valid = TRUE;
-	} else {
-		SCLog(TRUE, LOG_INFO, CFSTR("notify_register_check() failed, status=%u"), status);
-		goto done;
-	}
-
-	status = notify_check(dns_token, &dns_check);
-	if (status != NOTIFY_STATUS_OK) {
-		SCLog(TRUE, LOG_INFO, CFSTR("notify_check() failed, status=%u"), status);
-		(void)notify_cancel(dns_token);
-		dns_token_valid = FALSE;
-		goto done;
-	}
-
-	ok = TRUE;
-
-    done :
-
-	pthread_mutex_unlock(&dns_lock);
-	return ok;
-}
-
-
-static void
-dns_configuration_unwatch()
-{
-	pthread_mutex_lock(&dns_lock);
-
-	(void)notify_cancel(dns_token);
-	dns_token_valid = FALSE;
-
-	if ((dns_configuration != NULL) && (dns_configuration->refs == 0)) {
-		dns_configuration_free(dns_configuration->config);
-		CFAllocatorDeallocate(NULL, dns_configuration);
-		dns_configuration = NULL;
-	}
-
-	pthread_mutex_unlock(&dns_lock);
-	return;
-}
-
-
-static void
-_SC_R_updateResolverReachability(ReachabilityStoreInfoRef	store_info,
-				 SCNetworkReachabilityFlags	*flags,
-				 Boolean			*haveDNS,
-				 const char			*nodename,
-				 unsigned int			if_index,
-				 uint32_t			*resolver_if_index,
-				 int				*dns_config_index,
-				 const char			*log_prefix
-				 )
-{
-	dns_resolver_t		*default_resolver;
-	dns_configuration_t	*dns;
-	Boolean			found			= FALSE;
-	char			*fqdn			= (char *)nodename;
-	int			i;
-	Boolean			isFQDN			= FALSE;
-	size_t			len;
-	const int		ndots			= 1;
-	Boolean			useDefault		= FALSE;
-
-	if (resolver_if_index) *resolver_if_index = 0;
-	if (dns_config_index) *dns_config_index = -1;
-
-	/*
-	 * We first assume that all of the configured DNS servers
-	 * are available.  Since we don't know which name server will
-	 * be consulted to resolve the specified nodename we need to
-	 * check the availability of ALL name servers.  We can only
-	 * proceed if we know that our query can be answered.
-	 */
-
-	*flags   = kSCNetworkReachabilityFlagsReachable;
-	*haveDNS = FALSE;
-
-	len = (nodename != NULL) ? strlen(nodename) : 0;
-	if (len == 0) {
-		// if no nodename, return not reachable
-		*flags = 0;
-		return;
-	}
-
-	dns = dns_configuration_retain();
-	if (dns == NULL) {
-		// if error
-		SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS: no configuration"), log_prefix);
-		goto done;
-	}
-
-	default_resolver = get_default_resolver(dns->config, if_index);
-	if (default_resolver == NULL) {
-		// if no resolver configuration
-		SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS: no resolvers"), log_prefix);
-		goto done;
-	}
-
-	if (fqdn[len - 1] == '.') {
-		isFQDN = TRUE;
-
-		// trim trailing '.''s
-		while ((len > 0) && (fqdn[len-1] == '.')) {
-			if (fqdn == nodename) {
-				fqdn = strdup(nodename);
-				assert(fqdn != nodename);
-			}
-			fqdn[--len] = '\0';
-		}
-	}
-
-	/*
-	 * check if the provided name matches a supplemental domain
-	 */
-	found = check_matching_resolvers(store_info, dns->config, fqdn, if_index,
-					 flags, haveDNS, resolver_if_index,
-					 dns_config_index, log_prefix);
-
-	if (!found && !isFQDN) {
-		/*
-		 * if we did not match a supplemental domain name and if the
-		 * provided name has enough "."s then the first query will be
-		 * directed to the default resolver.
-		 */
-		char	*cp;
-		int	dots;
-
-		dots = 0;
-		for (cp = fqdn; *cp != '\0'; cp++) {
-			if (*cp == '.') dots++;
-		}
-
-		/* Per KB: HT4845 */
-		if (dots >= ndots) {
-			useDefault = TRUE;
-		}
-	}
-
-	if (!found && !isFQDN && !useDefault && (dns->config->n_resolver > 1)) {
-		/*
-		 * FQDN not specified, try matching w/search domains
-		 */
-		if (default_resolver->n_search > 0) {
-			for (i = 0; !found && (i < default_resolver->n_search); i++) {
-				int	ret;
-				char	*search_fqdn	= NULL;
-
-				ret = asprintf(&search_fqdn, "%s.%s", fqdn, default_resolver->search[i]);
-				if (ret == -1) {
-					continue;
-				}
-
-				// try the provided name with the search domain appended
-				found = check_matching_resolvers(store_info,
-								 dns->config,
-								 search_fqdn,
-								 if_index,
-								 flags,
-								 haveDNS,
-								 resolver_if_index,
-								 dns_config_index,
-								 log_prefix);
-				free(search_fqdn);
-			}
-		} else if (default_resolver->domain != NULL) {
-			char	*dp;
-			int	domain_parts	= 0;
-
-			// count domain parts
-			for (dp = default_resolver->domain; *dp != '\0'; dp++) {
-				if (*dp == '.') {
-					domain_parts++;
-				}
-			}
-
-			// remove trailing dots
-			for (dp--; (dp >= default_resolver->domain) && (*dp == '.'); dp--) {
-				*dp = '\0';
-				domain_parts--;
-			}
-
-			if (dp >= default_resolver->domain) {
-				// dots are separators, bump # of components
-				domain_parts++;
-			}
-
-			dp = default_resolver->domain;
-			for (i = LOCALDOMAINPARTS; !found && (i <= (domain_parts - ndots)); i++) {
-				int	ret;
-				char	*search_fqdn	= NULL;
-
-				ret = asprintf(&search_fqdn, "%s.%s", fqdn, dp);
-				if (ret == -1) {
-					continue;
-				}
-
-				// try the provided name with the [default] domain appended
-				found = check_matching_resolvers(store_info,
-								 dns->config,
-								 search_fqdn,
-								 if_index,
-								 flags,
-								 haveDNS,
-								 resolver_if_index,
-								 dns_config_index,
-								 log_prefix);
-				free(search_fqdn);
-
-				// move to the next component of the [default] domain
-				dp = strchr(dp, '.') + 1;
-			}
-		}
-	}
-
-	if (!found) {
-		// update the reachability of the default resolver
-		update_resolver_reachability(store_info,
-					     default_resolver,
-					     flags,
-					     haveDNS,
-					     resolver_if_index,
-					     log_prefix);
-		if (dns_config_index != NULL) *dns_config_index = 0;
-	}
-
-    done :
-
-	if (fqdn != nodename)	free(fqdn);
-
-	if (dns != NULL) {
-		dns_configuration_release(dns);
-	}
-
-	return;
-}
-
-
-Boolean
-__SC_checkResolverReachabilityInternal(SCDynamicStoreRef		*storeP,
-				       SCNetworkReachabilityFlags	*flags,
-				       Boolean				*haveDNS,
-				       const char			*nodename,
-				       uint32_t				*resolver_if_index,
-				       int				*dns_config_index)
-{
-	Boolean			ok;
-	ReachabilityStoreInfo	store_info;
-
-	ReachabilityStoreInfo_init(&store_info);
-	ok = ReachabilityStoreInfo_update(&store_info, storeP, AF_UNSPEC);
-	if (!ok) {
-		goto done;
-	}
-
-	_SC_R_updateResolverReachability(&store_info,
-					 flags,
-					 haveDNS,
-					 nodename,
-					 0,
-					 resolver_if_index,
-					 dns_config_index,
-					 "");
-
-    done :
-
-	ReachabilityStoreInfo_free(&store_info);
-	return ok;
-}
-
-
-/*
- * _SC_checkResolverReachabilityByAddress()
- *
- * Given an IP address, determine whether a reverse DNS query can be issued
- * using the current network configuration.
- */
-Boolean
-_SC_checkResolverReachabilityByAddress(SCDynamicStoreRef		*storeP,
-				       SCNetworkReachabilityFlags	*flags,
-				       Boolean				*haveDNS,
-				       struct sockaddr			*sa)
-{
-	Boolean			ok;
-	char			ptr_name[128];
-	ReachabilityStoreInfo	store_info;
-
-	ReachabilityStoreInfo_init(&store_info);
-	ok = ReachabilityStoreInfo_update(&store_info, storeP, AF_UNSPEC);
-	if (!ok) {
-		goto done;
-	}
-
-	/*
-	 * Ideally, we would have an API that given a local IP
-	 * address would return the DNS server(s) that would field
-	 * a given PTR query.  Fortunately, we do have an SPI which
-	 * which will provide this information given a "name" so we
-	 * take the address, convert it into the inverse query name,
-	 * and find out which servers should be consulted.
-	 */
-	ok = addr_to_PTR_name(sa, ptr_name, sizeof(ptr_name));
-	if (!ok) {
-		goto done;
-	}
-
-	_SC_R_updateResolverReachability(&store_info, flags, haveDNS, ptr_name, 0, NULL, NULL, "");
-
-    done :
-
-	ReachabilityStoreInfo_free(&store_info);
-	return ok;
-}
-
-
-#pragma mark -
-#pragma mark DNSServiceGetAddrInfo support
-
-
-/*
- * DNS query handling
- *
- * Notes :
- *
- * 1. We have a "contract" with mDNSResponder that for EVERY network
- *    or DNS configuration change that should warrant our [re-]starting
- *    a query, mDNSResponder will acknowledge the latest DNS configuration.
- *
- * 2. IPMonitor also posts a notification AFTER every network or DNS
- *    configuration change.
- *
- * 3. We use IPMonitor's "trailing edge" as a signal to restart any
- *    by-name queries.
- */
-
-
-// Note: protected by _hn_target_queue()
-static int			dns_refresh_token;
-static Boolean			dns_refresh_token_valid	= FALSE;
-
-
-/*
- * dns_refresh_handler
- *
- * Called to notify/update all SCNetworkReachability by-name targets of
- * a network/DNS change.  The change should [re-]start a DNS query to
- * resolve the name.
- * - should be exec'd on the _hn_target_queue()
- */
-static void
-dns_refresh_handler()
-{
-	CFArrayRef			changes;
-	CFStringRef			key;
-	__block SCDynamicStoreRef	store	= NULL;
-
-	dispatch_sync(_hn_target_queue(), ^{
-		if (dns_refresh_token_valid && (hn_store != NULL)) {
-			store = CFRetain(hn_store);
-		}
-	});
-
-	if (store == NULL) {
-		return;
-	}
-
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetDNS);
-	changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks);
-	__SCNetworkReachabilityHandleChanges(store, changes, NULL);
-	CFRelease(changes);
-	CFRelease(key);
-
-	CFRelease(store);
-	return;
-}
-
-
-/*
- * dns_refresh_enable
- *
- * Called to monitor for network/DNS changes that should restart a DNS query.
- * - caller must be running on the _hn_target_queue()
- */
-static Boolean
-dns_refresh_enable(dispatch_queue_t q)
-{
-	uint32_t	status;
-
-	status = notify_register_dispatch(_SC_NOTIFY_NETWORK_CHANGE,
-					  &dns_refresh_token,
-					  q,
-					  ^(int token){
-						  dns_refresh_handler();
-					  });
-	if (status != NOTIFY_STATUS_OK) {
-		SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed, status=%u"), status);
-		return FALSE;
-	}
-
-	dns_refresh_token_valid = TRUE;
-
-	return TRUE;
-}
-
-
-/*
- * dns_refresh_disable
- *
- * Called to stop monitoring for network/DNS changes
- * - caller must be running on the _hn_target_queue()
- */
-static void
-dns_refresh_disable()
-{
-	(void)notify_cancel(dns_refresh_token);
-	dns_refresh_token_valid = FALSE;
-	return;
-}
-
-
-#pragma mark -
-#pragma mark [m]DNS Queries
-
-
-static void
-dequeueDNSQuery(SCNetworkReachabilityRef target);
-
-
-static dispatch_queue_t
-_dns_queue()
-{
-	static dispatch_once_t	once;
-	static dispatch_queue_t	q;
-
-	dispatch_once(&once, ^{
-		q = dispatch_queue_create("SCNetworkReachability.DNSService", NULL);
-	});
-
-	return q;
-}
-
-
-/*
- * _dns_complete
- */
-static __inline__ Boolean
-_dns_complete(SCNetworkReachabilityRef target)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	if ((targetPrivate->dnsHaveV4 && targetPrivate->dnsHaveV6) ||
-	    targetPrivate->dnsHavePTR ||
-	    targetPrivate->dnsHaveError ||
-	    targetPrivate->dnsHaveTimeout) {
-		return TRUE;
-	}
-
-	return FALSE;
-}
-
-
-/*
- * _dns_notify
- *
- * Called to push out a target's DNS changes
- * - caller must be running on the _dns_queue()
- */
-static void
-_dns_notify(const void *value, void *context)
-{
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)value;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (_dns_complete(target)) {
-		__mark_operation_end(target,
-				     (targetPrivate->resolvedError == NETDB_SUCCESS),	// if successful query
-				     dns_query_mdns,					// [m]DNS query
-				     &targetPrivate->dnsQueryStart,			// start time
-				     &targetPrivate->dnsQueryEnd);			// end time
-
-		// update target info
-		if (targetPrivate->resolvedAddresses != NULL) {
-			CFRelease(targetPrivate->resolvedAddresses);
-		}
-		targetPrivate->resolvedAddresses = targetPrivate->dnsAddresses;
-		targetPrivate->dnsAddresses      = NULL;
-
-		targetPrivate->resolvedError     = targetPrivate->dnsError;
-		targetPrivate->dnsError          = NETDB_SUCCESS;
-
-		dequeueDNSQuery(target);
-
-		targetPrivate->needResolve = FALSE;
-
-		if (targetPrivate->scheduled) {
-			__SCNetworkReachabilityUpdate(target);
-		}
-	}
-
-	MUTEX_UNLOCK(&targetPrivate->lock);
-	return;
-}
-
-
-typedef enum {
-	MARK_NONE,
-	MARK_ERROR,
-	MARK_TIMEOUT,
-	MARK_HAVE_V4,
-	MARK_HAVE_V6,
-	MARK_HAVE_PTR,
-} _dns_mark_t;
-
-
-/*
- * _dns_mark
- */
-static __inline__ void
-_dns_mark(SCNetworkReachabilityRef target, _dns_mark_t mark)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	switch (mark) {
-		case MARK_NONE :
-			break;
-		case MARK_ERROR :
-			targetPrivate->dnsHaveError = TRUE;
-			break;
-		case MARK_TIMEOUT :
-			targetPrivate->dnsHaveTimeout = TRUE;
-			break;
-		case MARK_HAVE_V4 :
-			targetPrivate->dnsHaveV4 = TRUE;
-			break;
-		case MARK_HAVE_V6 :
-			targetPrivate->dnsHaveV6 = TRUE;
-			break;
-		case MARK_HAVE_PTR :
-			targetPrivate->dnsHavePTR = TRUE;
-			break;
-	}
-
-	return;
-}
-
-
-/*
- * _dns_callback
- *
- * Called to process [m]DNS query updates
- * - caller must be running on the _dns_queue()
- */
-static void
-_dns_callback(DNSServiceRef		sdRef,
-	      DNSServiceFlags		flags,
-	      DNSServiceErrorType	errorCode,
-	      _dns_mark_t		dnsMark,
-	      CFTypeRef			dnsAddress,	// CFData(struct sockaddr) or CFString(ptr_name)
-	      void			*context)
-{
-	int				failures	= 0;
-	Boolean				restart		= FALSE;
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)context;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (sdRef != targetPrivate->dnsTarget) {
-		// if this DNSServiceRef is no longer associated with the target
-		MUTEX_UNLOCK(&targetPrivate->lock);
-		return;
-	}
-
-	switch (errorCode) {
-		case kDNSServiceErr_NoError :
-			if (dnsAddress != NULL) {
-				CFMutableArrayRef	addresses;
-				CFIndex			i;
-
-				_dns_mark(target, dnsMark);
-
-				if (targetPrivate->dnsAddresses != NULL) {
-					if (isA_CFArray(targetPrivate->dnsAddresses)) {
-						addresses = CFArrayCreateMutableCopy(NULL, 0, targetPrivate->dnsAddresses);
-					} else {
-						addresses = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-					}
-
-					CFRelease(targetPrivate->dnsAddresses);
-					targetPrivate->dnsAddresses = NULL;
-				} else {
-					addresses = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-				}
-
-				i = CFArrayGetFirstIndexOfValue(addresses,
-								CFRangeMake(0, CFArrayGetCount(addresses)),
-								dnsAddress);
-				if (flags & kDNSServiceFlagsAdd) {
-					// add address
-					if (i == kCFNotFound) {
-						CFArrayAppendValue(addresses, dnsAddress);
-					}
-#ifdef	HANDLE_RMV_REQUESTS
-				} else {
-					// remove address
-					if (i != kCFNotFound) {
-						CFArrayRemoveValueAtIndex(addresses, i);
-					}
-#endif	// HANDLE_RMV_REQUESTS
-				}
-
-				if (CFArrayGetCount(addresses) > 0) {
-					targetPrivate->dnsAddresses = addresses;
-					targetPrivate->dnsError     = NETDB_SUCCESS;
-				} else {
-					// if host not found
-					targetPrivate->dnsAddresses = CFRetain(kCFNull);
-					targetPrivate->dnsError     = EAI_NONAME;
-					CFRelease(addresses);
-				}
-
-			}
-			break;
-		case kDNSServiceErr_BadParam :
-			_dns_mark(target, MARK_ERROR);
-
-			if (targetPrivate->dnsAddresses != NULL) {
-				CFRelease(targetPrivate->dnsAddresses);
-			}
-			targetPrivate->dnsAddresses = CFRetain(kCFNull);
-			targetPrivate->dnsError     = EAI_NONAME;
-			break;
-		case kDNSServiceErr_NoSuchRecord :
-			_dns_mark(target, dnsMark);
-
-			if (targetPrivate->dnsAddresses == NULL) {
-				targetPrivate->dnsAddresses = CFRetain(kCFNull);
-				targetPrivate->dnsError     = EAI_NONAME;
-			}
-			break;
-		case kDNSServiceErr_Timeout :
-			_dns_mark(target, MARK_TIMEOUT);
-
-			if (targetPrivate->dnsAddresses == NULL) {
-				targetPrivate->dnsAddresses = CFRetain(kCFNull);
-				targetPrivate->dnsError     = EAI_NONAME;
-			}
-			break;
-		default :
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("%sSCNetworkReachability _dns_callback w/error=%d (n=%d)"),
-			      targetPrivate->log_prefix,
-			      errorCode,
-			      targetPrivate->dnsFailures + 1);
-			// fall through
-		case kDNSServiceErr_ServiceNotRunning :
-			_dns_mark(target, MARK_ERROR);
-
-			// bump per-target failure count
-			failures = ++targetPrivate->dnsFailures;
-
-			// Check to see if we've seen too many failures for this target
-			if (failures > 2) {
-				// if so, there's little point in retrying over
-				// and over again so let's just return an error
-				// and move on.
-				if (targetPrivate->dnsAddresses != NULL) {
-					CFRelease(targetPrivate->dnsAddresses);
-				}
-				targetPrivate->dnsAddresses = CFRetain(kCFNull);
-				targetPrivate->dnsError     = EAI_NONAME;
-			} else if (targetPrivate->dnsGeneration == dnsGeneration) {
-				// if not, then "mDNSResponder" crashed or some
-				// other/unexpected error occurred.  In this
-				// case, we'll try again with a clean slate and
-				// restart all requests.
-				if (dnsMain != NULL) {
-					DNSServiceRefDeallocate(dnsMain);
-					dnsMain = NULL;
-					dnsCount = 0;
-					dnsGeneration++;
-					restart = TRUE;
-				}
-			}
-			break;
-	}
-
-	// update DNS failure count (and [re-]set to zero if we're OK)
-	targetPrivate->dnsFailures = failures;
-
-	MUTEX_UNLOCK(&targetPrivate->lock);
-
-	if (restart) {
-		SCLog(TRUE, LOG_DEBUG,
-		      CFSTR("%sreconnecting SCNetworkReachability w/\"mDNSResponder\" (%d)"),
-		      targetPrivate->log_prefix,
-		      dnsGeneration);
-
-		dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 500 * NSEC_PER_MSEC),
-			       _hn_changes_queue(),
-			       ^{
-			dns_refresh_handler();
-		});
-
-		// and flush the dnsUpdated queue as any DNS results we may have
-		// accumulated are no longer valid.
-		if (dnsUpdated != NULL) {
-			CFRelease(dnsUpdated);
-			dnsUpdated = NULL;
-		}
-		return;
-	}
-
-	if (targetPrivate->dnsHaveTimeout) {
-	    targetPrivate->dnsNoAddressesSinceLastTimeout = TRUE;
-	} else if (targetPrivate->dnsNoAddressesSinceLastTimeout &&
-	           isA_CFArray(targetPrivate->dnsAddresses) &&
-	           CFArrayGetCount(targetPrivate->dnsAddresses) > 0)
-	{
-	    targetPrivate->dnsNoAddressesSinceLastTimeout = FALSE;
-	}
-
-	// the "more coming" flag applies to DNSService callouts for any/all
-	// hosts that are being watched so we need to keep track of the targets
-	// we have updated.  When we [finally] have the last callout then we
-	// push our notifications for all of the updated targets.
-
-	if (dnsUpdated == NULL) {
-		dnsUpdated = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
-	}
-	CFSetAddValue(dnsUpdated, target);
-
-	if (!(flags & kDNSServiceFlagsMoreComing)) {
-		CFSetApplyFunction(dnsUpdated, _dns_notify, NULL);
-		CFRelease(dnsUpdated);
-		dnsUpdated = NULL;
-	}
-
-	return;
-}
-
-
-/*
- * _dns_getaddrinfo_callback
- *
- * Called to process [m]DNS query updates
- * - caller must be running on the _dns_queue()
- */
-static void
-_dns_getaddrinfo_callback(DNSServiceRef			sdRef,
-			  DNSServiceFlags		flags,
-			  uint32_t			interfaceIndex,
-			  DNSServiceErrorType		errorCode,
-			  const char			*hostname,
-			  const struct sockaddr		*address,
-			  uint32_t			ttl,
-			  void				*context)
-{
-	CFDataRef	dnsAddress	= NULL;
-	_dns_mark_t	dnsMark		= MARK_NONE;
-
-	if (address != NULL) {
-		switch (errorCode) {
-			case kDNSServiceErr_NoError :
-				dnsAddress = CFDataCreate(NULL, (void *)address, address->sa_len);
-				// ... and fall through
-			case kDNSServiceErr_NoSuchRecord :
-				switch (address->sa_family) {
-					case AF_INET :
-						dnsMark = MARK_HAVE_V4;
-						break;
-					case AF_INET6 :
-						dnsMark = MARK_HAVE_V6;
-						break;
-				}
-				break;
-			default :
-				break;
-		}
-	}
-
-	_dns_callback(sdRef, flags, errorCode, dnsMark, dnsAddress, context);
-
-	if (dnsAddress != NULL) {
-		CFRelease(dnsAddress);
-	}
-
-	return;
-}
-
-
-static CFStringRef
-_dns_copy_domain_name(const uint8_t *rdata, uint16_t rdlen)
-{
-	CFMutableStringRef	domain;
-	const uint8_t		*label;
-	uint8_t			label_len;
-
-	domain = CFStringCreateMutable(NULL, 0);
-
-	label = rdata;
-	label_len = *(label++);
-	while (label_len != 0) {
-		while (label_len-- > 0) {
-			uint8_t		byte	= *label++;
-
-			if ((byte == '.') || (byte == '\\')) {
-				// if escape needed
-				CFStringAppendFormat(domain, NULL, CFSTR("\\%c"), byte);
-			} else if (byte <= ' ') {
-				CFStringAppendFormat(domain, NULL, CFSTR("\\%c%c%c"),
-						     '0' + (byte / 100),
-						     '0' + ((byte / 10) % 10),
-						     '0' + (byte % 10));
-			} else {
-				CFStringAppendFormat(domain, NULL, CFSTR("%c"), byte);
-			}
-		}
-
-		label_len = *(label++);
-		if (label_len != 0) {
-			CFStringAppendFormat(domain, NULL, CFSTR("."));
-		}
-	}
-
-	return domain;
-}
-
-
-static void
-_dns_queryrecord_callback(DNSServiceRef			sdRef,
-			  DNSServiceFlags		flags,
-			  uint32_t			interfaceIndex,
-			  DNSServiceErrorType		errorCode,
-			  const char			*fullname,
-			  uint16_t			rrtype,
-			  uint16_t			rrclass,
-			  uint16_t			rdlen,
-			  const void			*rdata,
-			  uint32_t			ttl,
-			  void				*context)
-{
-	_dns_mark_t			dnsMark		= MARK_NONE;
-	CFStringRef			dnsPTRName	= NULL;
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)context;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	// for now, we only support using DNSServiceQueryRecord for PTR queries
-	assert(targetPrivate->type == reachabilityTypePTR);
-
-	if (rdata != NULL) {
-		switch (errorCode) {
-			case kDNSServiceErr_NoError :
-				if (rrtype == kDNSServiceType_PTR) {
-					dnsPTRName = _dns_copy_domain_name(rdata, rdlen);
-				}
-				// ... and fall through
-			case kDNSServiceErr_NoSuchRecord :
-				dnsMark = MARK_HAVE_PTR;
-				break;
-			default :
-				break;
-		}
-	}
-
-	_dns_callback(sdRef, flags, errorCode, dnsMark, dnsPTRName, context);
-
-	if (dnsPTRName != NULL) {
-		CFRelease(dnsPTRName);
-	}
-
-	return;
-}
-
-
-static Boolean
-enqueueDNSQuery(SCNetworkReachabilityRef target)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_ASSERT_HELD(&targetPrivate->lock);
-
-	// clear DNS flags, mark the query active
-	targetPrivate->dnsFlags = 0;
-	targetPrivate->dnsActive = TRUE;
-
-	// track the DNS resolution time
-	__mark_operation_start(&targetPrivate->dnsQueryStart, &targetPrivate->dnsQueryEnd);
-
-	CFRetain(target);
-	dispatch_async(_dns_queue(), ^{
-		DNSServiceErrorType	err;
-		const char		*fcn	= "???";
-		DNSServiceRef		sdRef	= NULL;
-
-		if (targetPrivate->dnsTarget != NULL) {
-			// if already running
-			CFRelease(target);
-			return;
-		}
-
-		// if needed, start interacting with "mDNSResponder"
-		if (dnsMain == NULL) {
-			err = DNSServiceCreateConnection(&dnsMain);
-			if (err != kDNSServiceErr_NoError) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("%sDNSServiceCreateConnection(&dnsMain) failed, error = %d"),
-				      targetPrivate->log_prefix,
-				      err);
-				goto done;
-			}
-
-			err = DNSServiceSetDispatchQueue(dnsMain, _dns_queue());
-			if (err != kDNSServiceErr_NoError) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("%sDNSServiceSetDispatchQueue() failed, error = %d"),
-				      targetPrivate->log_prefix,
-				      err);
-				DNSServiceRefDeallocate(dnsMain);
-				dnsMain = NULL;
-				dnsGeneration++;
-				goto done;
-			}
-		}
-
-		// start a query for this target
-		sdRef = dnsMain;
-
-		switch (targetPrivate->type) {
-			case reachabilityTypeName :
-				fcn = "DNSServiceGetAddrInfo";
-				err = DNSServiceGetAddrInfo(&sdRef,				// sdRef
-							    kDNSServiceFlagsReturnIntermediates // flags
-							    | kDNSServiceFlagsShareConnection
-							    | kDNSServiceFlagsSuppressUnusable
-							    | kDNSServiceFlagsTimeout,
-							    targetPrivate->if_index,		// interfaceIndex
-							    0,					// protocol
-							    targetPrivate->name,		// hostname
-							    _dns_getaddrinfo_callback,		// callback
-							    (void *)target);			// context
-				break;
-			case reachabilityTypePTR :
-				fcn = "DNSServiceQueryRecord";
-				err = DNSServiceQueryRecord(&sdRef,				// sdRef
-							    kDNSServiceFlagsReturnIntermediates	// flags
-							    | kDNSServiceFlagsShareConnection
-							    | kDNSServiceFlagsSuppressUnusable
-							    | kDNSServiceFlagsTimeout,
-							    targetPrivate->if_index,		// interfaceIndex
-							    targetPrivate->name,		// fullname
-							    kDNSServiceType_PTR,		// rrtype
-							    kDNSServiceClass_IN,		// rrclass
-							    _dns_queryrecord_callback,		// callback
-							    (void *)target);			// context
-				break;
-			default :
-				err = kDNSServiceErr_Unknown;
-				break;
-		}
-
-		switch (err) {
-			case kDNSServiceErr_NoError :
-				dnsCount++;
-				break;
-
-			default :
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("%s%s() failed, error = %d (%d)"),
-				      targetPrivate->log_prefix,
-				      fcn,
-				      err,
-				      dnsCount);
-				// fall through
-
-			case kDNSServiceErr_BadParam :
-				if (dnsCount == 0) {
-					// if this was the first request
-					DNSServiceRefDeallocate(dnsMain);
-					dnsMain = NULL;
-					dnsGeneration++;
-				}
-				sdRef = NULL;
-				break;
-		}
-
-	    done :
-
-		MUTEX_LOCK(&targetPrivate->lock);
-
-		if (err == kDNSServiceErr_NoError) {
-			targetPrivate->dnsGeneration = dnsGeneration;
-			targetPrivate->dnsTarget = sdRef;
-		} else {
-			targetPrivate->dnsActive = FALSE;
-
-			// queue up the returned error
-			dispatch_async(_dns_queue(), ^{
-				_dns_callback(NULL,			// sdRef
-					      0,			// flags
-					      err,			// errorCode
-					      MARK_ERROR,		// dnsMark
-					      NULL,			// dnsAddress
-					      (void *)target);		// context
-				CFRelease(target);
-			});
-		}
-
-		MUTEX_UNLOCK(&targetPrivate->lock);
-
-		return;
-	});
-
-	return TRUE;
-}
-
-
-static void
-dequeueDNSQuery(SCNetworkReachabilityRef target)
-{
-	DNSServiceRef			sdRef;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_ASSERT_HELD(&targetPrivate->lock);
-
-	// terminate the [target] [m]DNS query
-	sdRef = targetPrivate->dnsTarget;
-	targetPrivate->dnsTarget = NULL;
-
-	// mark the query NOT active
-	targetPrivate->dnsActive = FALSE;
-
-	// don't do anything if the sdRef is not valid
-	if (sdRef != NULL) {
-		int			generation;
-
-		generation = targetPrivate->dnsGeneration;
-		dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3LL * NSEC_PER_SEC),
-			       _dns_queue(),
-			       ^{
-			if (generation == dnsGeneration) {
-				// if we're pointing to the same DNSService
-				// generation as the main/active session
-				// deallocate per-target query
-				DNSServiceRefDeallocate(sdRef);
-				dnsCount--;
-				if (dnsCount == 0) {
-					// if no more queries active
-					DNSServiceRefDeallocate(dnsMain);
-					dnsMain = NULL;
-					dnsGeneration++;
-				}
-			}
-
-			CFRelease(target);
-		});
-	}
-
-	if (targetPrivate->dnsAddresses != NULL) {
-		CFRelease(targetPrivate->dnsAddresses);
-		targetPrivate->dnsAddresses = NULL;
-	}
-	targetPrivate->dnsError = NETDB_SUCCESS;
-
-	return;
-}
-
-
-#pragma mark -
-#pragma mark Synchronous DNS query support
-
-
-#define SYNC_DNS_QUERY_TIMEOUT_NSEC	35 * NSEC_PER_SEC	// 35s
-
-
-static void
-sync_DNS_query_callback(SCNetworkReachabilityRef	clone,
-			SCNetworkReachabilityFlags	cloneFlags,
-			void				*info)
-{
-	dispatch_semaphore_t		s	= (dispatch_semaphore_t)info;
-
-	dispatch_semaphore_signal(s);
-	return;
-}
-
-
-static void
-sync_DNS_query(SCNetworkReachabilityRef target)
-{
-	SCNetworkReachabilityRef	clone;
-	SCNetworkReachabilityPrivateRef	clonePrivate;
-	SCNetworkReachabilityContext	context	= { 0, NULL, NULL, NULL, NULL };
-	dispatch_queue_t		q;
-	long				ret;
-	dispatch_semaphore_t		s;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	clone = __SCNetworkReachabilityCreateCopy(target);
-	if (clone == NULL) {
-		return;
-	}
-	clonePrivate = (SCNetworkReachabilityPrivateRef)clone;
-
-	q = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
-	s = dispatch_semaphore_create(0);
-
-	// start async query
-	context.info = (void *)s;
-	SCNetworkReachabilitySetCallback(clone, sync_DNS_query_callback, &context);
-	SCNetworkReachabilitySetDispatchQueue(clone, q);
-
-	// wait for reply (or timeout)
-	ret = dispatch_semaphore_wait(s, dispatch_time(DISPATCH_TIME_NOW,
-						       SYNC_DNS_QUERY_TIMEOUT_NSEC));
-	if (ret != 0) {
-		dispatch_sync(_dns_queue(), ^{
-			// mark as both a timeout *and* an error
-			_dns_mark(clone, MARK_TIMEOUT);
-			_dns_mark(clone, MARK_ERROR);
-
-			__mark_operation_end(clone,
-					     FALSE,				// if successful query
-					     dns_query_mdns_timeout,		// [m]DNS query
-					     &clonePrivate->dnsQueryStart,	// start time
-					     &clonePrivate->dnsQueryEnd);	// end time
-
-			MUTEX_LOCK(&clonePrivate->lock);
-
-			// update target info with what's available
-			if (clonePrivate->resolvedAddresses != NULL) {
-				CFRelease(clonePrivate->resolvedAddresses);
-				clonePrivate->resolvedAddresses = NULL;
-			}
-			if ((clonePrivate->dnsAddresses != NULL) &&
-			    isA_CFArray(clonePrivate->dnsAddresses) &&
-			    (CFArrayGetCount(clonePrivate->dnsAddresses) > 0)) {
-				clonePrivate->resolvedAddresses = CFArrayCreateMutableCopy(NULL,
-											   0,
-											   clonePrivate->dnsAddresses);
-			}
-			if (clonePrivate->resolvedAddresses != NULL) {
-				// if timeout w/partial results
-				clonePrivate->resolvedError     = NETDB_SUCCESS;
-			} else {
-				// if timeout w/no results
-				clonePrivate->resolvedAddresses = CFRetain(kCFNull);
-				clonePrivate->resolvedError     = EAI_NONAME;
-			}
-
-			MUTEX_UNLOCK(&clonePrivate->lock);
-		});
-	}
-
-	// cancel request
-	SCNetworkReachabilitySetDispatchQueue(clone, NULL);
-	SCNetworkReachabilitySetCallback(clone, NULL, NULL);
-
-	// transfer reply
-	if (clonePrivate->resolvedAddresses  != NULL) CFRetain(clonePrivate->resolvedAddresses);
-	if (targetPrivate->resolvedAddresses != NULL) CFRelease(targetPrivate->resolvedAddresses);
-	targetPrivate->resolvedAddresses = clonePrivate->resolvedAddresses;
-	targetPrivate->resolvedError     = clonePrivate->resolvedError;
-	targetPrivate->resolverFlags     = clonePrivate->resolverFlags;
-	targetPrivate->cycle             = clonePrivate->cycle;
-	targetPrivate->dnsFlags          = clonePrivate->dnsFlags;
-	memcpy(&targetPrivate->info, &clonePrivate->info, sizeof(ReachabilityInfo));
-	memcpy(&targetPrivate->last_notify, &clonePrivate->last_notify, sizeof(ReachabilityInfo));
-
-	CFRelease(clone);
-	dispatch_release(s);
-
-	return;
-}
-
-
-#pragma mark -
-#pragma mark Network Information support
-
-
-// Note: protected by _hn_target_queue()
-static int			network_changed_token;
-static Boolean			network_changed_token_valid	= FALSE;
-
-
-/*
- * nwi_refresh_handler
- *
- * Called to notify/update network changed events
- * - should be exec'd on the _hn_changes_queue()
- */
-static void
-nwi_refresh_handler()
-{
-	CFArrayRef			changes;
-	CFStringRef			key;
-	__block SCDynamicStoreRef	store	= NULL;
-
-	dispatch_sync(_hn_target_queue(), ^{
-		if (network_changed_token_valid && (hn_store != NULL)) {
-			store = CFRetain(hn_store);
-		}
-	});
-
-	if (store == NULL) {
-		return;
-	}
-
-	// Fake a network change.
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetIPv4);
-	changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks);
-	__SCNetworkReachabilityHandleChanges(store, changes, NULL);
-	CFRelease(changes);
-	CFRelease(key);
-
-	CFRelease(store);
-	return;
-}
-
-
-/*
- * nwi_refresh_enable
- *
- * Called to monitor for network changes.
- * - caller must be running on the _hn_target_queue()
- * - passed in queue should be _hn_changes_queue()
- */
-static Boolean
-nwi_refresh_enable(dispatch_queue_t q)
-{
-	uint32_t	status;
-
-	status = notify_register_dispatch(_SC_NOTIFY_NETWORK_CHANGE_NWI,	// trailing nwi_state_get_notify_key()
-					  &network_changed_token,
-					  q,
-					  ^(int token){
-						  nwi_refresh_handler();
-					  });
-	if (status != NOTIFY_STATUS_OK) {
-		SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for network changes, status=%u"), status);
-		return FALSE;
-	}
-
-	network_changed_token_valid = TRUE;
-
-	return TRUE;
-}
-
-
-/*
- * nwi_refresh_disable
- *
- * Called to stop monitoring for network changes
- * - caller must be running on the _hn_target_queue()
- */
-static void
-nwi_refresh_disable()
-{
-	if (network_changed_token_valid) {
-		(void)notify_cancel(network_changed_token);
-		network_changed_token_valid = FALSE;
-	}
-
-	return;
-}
-
-
-#pragma mark -
-#pragma mark Sleep/wake support
-
-
-#if	!TARGET_OS_IPHONE
-
-// Note: protected by _hn_target_queue()
-static IOPMConnection		power_changed_connection	= NULL;
-static const CFStringRef	power_changed_key		= CFSTR("*** EARLY WAKE ***");
-
-
-/*
- * power_refresh_handler
- *
- * Called to notify/update power capability changed events
- * - should be exec'd on the _hn_changes_queue()
- */
-static void
-power_refresh_handler(void				*param,
-		      IOPMConnection			connection,
-		      IOPMConnectionMessageToken	token,
-		      IOPMSystemPowerStateCapabilities	capabilities)
-{
-	Boolean				change;
-	IOReturn			ret;
-	__block SCDynamicStoreRef	store	= NULL;
-
-	dispatch_sync(_hn_target_queue(), ^{
-		if ((power_changed_connection != NULL) && (hn_store != NULL)) {
-			store = CFRetain(hn_store);
-		}
-	});
-
-	if (store == NULL) {
-		return;
-	}
-
-	// check for [relevant] changes
-	change = ((power_capabilities ^ capabilities) & POWER_CAPABILITIES_NETWORK) != 0;
-
-	// update capabilities
-	power_capabilities = capabilities;
-
-	if (change) {
-		CFArrayRef	changes;
-
-		// fake a network change.
-		changes = CFArrayCreate(NULL, (const void **)&power_changed_key, 1, &kCFTypeArrayCallBacks);
-		__SCNetworkReachabilityHandleChanges(store, changes, NULL);
-		CFRelease(changes);
-	}
-
-	ret = IOPMConnectionAcknowledgeEvent(connection, token);
-	if (ret != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_ERR, CFSTR("IOPMConnectionAcknowledgeEvent failed, 0x%08x"), ret);
-	}
-
-	CFRelease(store);
-	return;
-}
-
-
-/*
- * power_refresh_enable
- *
- * Called to monitor power changes.
- * - caller must be running on the _hn_target_queue()
- * - passed in queue should be _hn_changes_queue()
- */
-static Boolean
-power_refresh_enable(dispatch_queue_t q)
-{
-	IOPMConnection	connection	= NULL;
-	IOReturn	ret;
-
-	ret = IOPMConnectionCreate(CFSTR("com.apple.SCNetworkReachability"),
-				   kIOPMEarlyWakeNotification | kIOPMSleepWakeInterest,
-				   &connection);
-	if (ret != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_ERR, CFSTR("IOPMConnectionCreate failed, 0x%08x"), ret);
-		goto failed;
-	}
-
-	ret = IOPMConnectionSetNotification(connection, NULL, power_refresh_handler);
-	if (ret != kIOReturnSuccess) {
-		SCLog(TRUE, LOG_ERR, CFSTR("IOPMConnectionSetNotification failed, 0x%08x"), ret);
-		goto failed;
-	}
-
-	power_changed_connection = connection;
-	IOPMConnectionSetDispatchQueue(connection, q);
-	power_capabilities = IOPMConnectionGetSystemCapabilities();
-
-	return TRUE;
-
-    failed:
-
-	if (connection != NULL) {
-		IOPMConnectionRelease(connection);
-	}
-
-	return FALSE;
-}
-
-
-static void
-power_refresh_disable()
-{
-	if (power_changed_connection != NULL) {
-		IOPMConnectionSetDispatchQueue(power_changed_connection, NULL);
-		IOPMConnectionRelease(power_changed_connection);
-		power_changed_connection = NULL;
-	}
-
-	return;
-}
-
-#endif	// !TARGET_OS_IPHONE
-
-
-
-
-
-
-#pragma mark -
-#pragma mark OnDemand
-
-
-SCNetworkServiceRef
-SCNetworkReachabilityCopyOnDemandService(SCNetworkReachabilityRef	target,
-					 CFDictionaryRef		*userOptions)
-{
-	SCNetworkServiceRef		service		= NULL;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	if (!isA_SCNetworkReachability(target)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return NULL;
-	}
-
-	if (targetPrivate->onDemandServiceID != NULL) {
-		service = _SCNetworkServiceCopyActive(NULL, targetPrivate->onDemandServiceID);
-	}
-
-	if (userOptions != NULL) {
-		if (targetPrivate->onDemandName != NULL) {
-			*userOptions = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-			CFDictionarySetValue((CFMutableDictionaryRef)*userOptions, kSCNetworkConnectionSelectionOptionOnDemandHostName, targetPrivate->onDemandName);
-		} else {
-			*userOptions = NULL;
-		}
-	}
-
-	return service;
-}
-
-
-
-
-static void
-__SCNetworkReachabilityOnDemandCheckCallback(SCNetworkReachabilityRef	onDemandServer,
-					     SCNetworkReachabilityFlags	onDemandFlags,
-					     void			*info)
-{
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)info;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (!targetPrivate->scheduled) {
-		// if not currently scheduled
-		MUTEX_UNLOCK(&targetPrivate->lock);
-		return;
-	}
-
-	SCLog(_sc_debug, LOG_INFO, CFSTR("%sOnDemand \"server\" status changed (now 0x%08x)"),
-	      targetPrivate->log_prefix,
-	      onDemandFlags);
-
-	if (targetPrivate->type == reachabilityTypeName) {
-		// make sure that we resolve the name again
-		targetPrivate->needResolve = TRUE;
-	}
-
-	__SCNetworkReachabilityUpdate(target);
-
-	MUTEX_UNLOCK(&targetPrivate->lock);
-
-	return;
-}
-
-
-static Boolean
-__SCNetworkReachabilityOnDemandCheck(ReachabilityStoreInfoRef	store_info,
-				     SCNetworkReachabilityRef	target,
-				     Boolean			onDemandRetry,
-				     SCNetworkReachabilityFlags	*flags)
-{
-	SCNetworkConnectionRef		connection		= NULL;
-	SCNetworkConnectionType		connectionType		= kSCNetworkConnectionTypeUnknown;
-	Boolean				isAppLayerVPN		= FALSE;
-	Boolean				isOnDemandService	= FALSE;
-	Boolean				ok			= FALSE;
-	CFStringRef			onDemandRemoteAddress	= NULL;
-	CFStringRef			onDemandServiceID	= NULL;
-	SCNetworkConnectionStatus	onDemandStatus		= kSCNetworkConnectionInvalid;
-	CFMutableDictionaryRef		selectOptions		= NULL;
-	Boolean				success			= FALSE;
-	SCNetworkReachabilityPrivateRef	targetPrivate		= (SCNetworkReachabilityPrivateRef)target;
-
-	MUTEX_ASSERT_HELD(&targetPrivate->lock);
-
-	if (targetPrivate->onDemandName == NULL) {
-		targetPrivate->onDemandName = CFStringCreateWithCString(NULL, targetPrivate->name, kCFStringEncodingUTF8);
-	}
-
-	/*
-	 * check if an OnDemand VPN configuration matches the name.
-	 */
-
-	connection = SCNetworkConnectionCreate(kCFAllocatorDefault, NULL, NULL);
-	if (connection == NULL) {
-		goto done;
-	}
-
-	/* set select options */
-	selectOptions = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-	if (selectOptions == NULL) {
-		goto done;
-	}
-
-	CFDictionaryAddValue(selectOptions, kSCNetworkConnectionSelectionOptionOnDemandHostName, targetPrivate->onDemandName);
-	CFDictionaryAddValue(selectOptions, kSCNetworkConnectionSelectionOptionOnDemandRetry, onDemandRetry ? kCFBooleanTrue : kCFBooleanFalse);
-	CFDictionaryAddValue(selectOptions, kSCNetworkConnectionSelectionOptionNoUserPrefs, kCFBooleanTrue);
-
-	/* select service. May be On Demand or App Layer VPN */
-	if (!SCNetworkConnectionSelectServiceWithOptions(connection, selectOptions)) {
-		goto done;
-	}
-
-	/* get reachability flags (of VPN server) */
-	(void) SCNetworkConnectionGetReachabilityInfo(connection, flags, NULL);
-
-	connectionType = SCNetworkConnectionGetType(connection);
-	if (connectionType == kSCNetworkConnectionTypeAppLayerVPN) {
-		isAppLayerVPN = TRUE;
-	}
-
-	/* get on-demand info */
-	onDemandServiceID = SCNetworkConnectionCopyServiceID(connection);
-	if (SCNetworkConnectionCopyOnDemandInfo(connection, &onDemandRemoteAddress, &onDemandStatus)) {
-		if (onDemandRemoteAddress != NULL) {
-			isOnDemandService = TRUE;
-			ok = TRUE;
-		}
-	}
-
-	/* handle non-OnDemand App Layer VPN */
-	if (isAppLayerVPN && !isOnDemandService) {
-		SCLog(_sc_debug, LOG_INFO, CFSTR("%s  status  * = 0x%08x (App Layer VPN)"),
-		      targetPrivate->log_prefix,
-		      *flags);
-		if (*flags & kSCNetworkReachabilityFlagsReachable) {
-			// if VPN "server" is reachable
-
-			if (!(*flags & kSCNetworkReachabilityFlagsTransientConnection)) {
-				// start w/clean flags if not already layered on a transient network
-				*flags = kSCNetworkReachabilityFlagsReachable;
-			}
-
-			*flags |= kSCNetworkReachabilityFlagsTransientConnection;
-			if (onDemandStatus != kSCNetworkConnectionConnected) {
-				*flags |= kSCNetworkReachabilityFlagsConnectionRequired;
-			}
-
-			SCLog(_sc_debug, LOG_INFO, CFSTR("%s  status    = isReachable%s"),
-			      (onDemandStatus != kSCNetworkConnectionConnected)
-					? " (after App Layer connect)" : "",
-			      targetPrivate->log_prefix);
-		}
-
-		success = TRUE;
-		goto done;
-	}
-
-	if (!_SC_CFEqual(targetPrivate->onDemandRemoteAddress, onDemandRemoteAddress) ||
-	    !_SC_CFEqual(targetPrivate->onDemandServiceID, onDemandServiceID)) {
-		if (targetPrivate->onDemandRemoteAddress != NULL) {
-			CFRelease(targetPrivate->onDemandRemoteAddress);
-			targetPrivate->onDemandRemoteAddress = NULL;
-		}
-
-		if (targetPrivate->onDemandServer != NULL) {
-			SCNetworkReachabilitySetCallback(targetPrivate->onDemandServer, NULL, NULL);
-			if (targetPrivate->dispatchQueue != NULL) {
-				// unschedule
-				__SCNetworkReachabilityUnscheduleFromRunLoop(targetPrivate->onDemandServer, NULL, NULL, TRUE);
-			} else if (targetPrivate->rls != NULL) {
-				CFIndex	i;
-				CFIndex	n;
-
-				// unschedule
-				n = CFArrayGetCount(targetPrivate->rlList);
-				for (i = 0; i < n; i += 3) {
-					CFRunLoopRef	rl	= (CFRunLoopRef)CFArrayGetValueAtIndex(targetPrivate->rlList, i+1);
-					CFStringRef	rlMode	= (CFStringRef) CFArrayGetValueAtIndex(targetPrivate->rlList, i+2);
-
-					__SCNetworkReachabilityUnscheduleFromRunLoop(targetPrivate->onDemandServer, rl, rlMode, TRUE);
-				}
-			}
-
-			CFRelease(targetPrivate->onDemandServer);
-			targetPrivate->onDemandServer = NULL;
-		}
-
-		if (targetPrivate->onDemandServiceID != NULL) {
-			CFRelease(targetPrivate->onDemandServiceID);
-			targetPrivate->onDemandServiceID = NULL;
-		}
-	}
-
-	if (ok) {
-		if (onDemandStatus != kSCNetworkConnectionConnected) {
-			/*
-			 * if we have a VPN configuration matching the name *and* we need to
-			 * bring the VPN up.  Combine our flags with those of the VPN server.
-			 */
-			if (targetPrivate->onDemandServer == NULL) {
-				SCNetworkReachabilityPrivateRef	demandPrivate;
-				CFMutableDictionaryRef		options;
-
-				options = CFDictionaryCreateMutable(NULL,
-								    0,
-								    &kCFTypeDictionaryKeyCallBacks,
-								    &kCFTypeDictionaryValueCallBacks);
-				CFDictionarySetValue(options, kSCNetworkReachabilityOptionNodeName, onDemandRemoteAddress);
-				CFDictionarySetValue(options, kSCNetworkReachabilityOptionConnectionOnDemandBypass, kCFBooleanTrue);
-				if (targetPrivate->serverBypass) {
-					CFDictionarySetValue(options, kSCNetworkReachabilityOptionServerBypass, kCFBooleanTrue);
-				}
-				targetPrivate->onDemandServer = SCNetworkReachabilityCreateWithOptions(NULL, options);
-				CFRelease(options);
-
-				// indent OnDemand target
-				demandPrivate = (SCNetworkReachabilityPrivateRef)targetPrivate->onDemandServer;
-				strlcat(demandPrivate->log_prefix, ".... ", sizeof(demandPrivate->log_prefix));
-
-				if (targetPrivate->scheduled) {
-					SCNetworkReachabilityContext	context	= { 0, NULL, CFRetain, CFRelease, CFCopyDescription };
-
-					context.info = (void *)target;
-					SCNetworkReachabilitySetCallback(targetPrivate->onDemandServer,
-									 __SCNetworkReachabilityOnDemandCheckCallback,
-									 &context);
-
-					// schedule server reachability to match that of the target
-					if (targetPrivate->dispatchQueue != NULL) {
-						__SCNetworkReachabilityScheduleWithRunLoop(targetPrivate->onDemandServer, NULL, NULL, targetPrivate->dispatchQueue, TRUE);
-					} else {
-						CFIndex	i;
-						CFIndex	n;
-
-						n = CFArrayGetCount(targetPrivate->rlList);
-						for (i = 0; i < n; i += 3) {
-							CFRunLoopRef	rl	= (CFRunLoopRef)CFArrayGetValueAtIndex(targetPrivate->rlList, i+1);
-							CFStringRef	rlMode	= (CFStringRef) CFArrayGetValueAtIndex(targetPrivate->rlList, i+2);
-
-							__SCNetworkReachabilityScheduleWithRunLoop(targetPrivate->onDemandServer, rl, rlMode, NULL, TRUE);
-						}
-					}
-				}
-			}
-
-			SCLog(_sc_debug, LOG_INFO, CFSTR("%s  status  * = 0x%08x"),
-			      targetPrivate->log_prefix,
-			      *flags);
-
-
-			if ((*flags & kSCNetworkReachabilityFlagsReachable) && !(*flags & kSCNetworkReachabilityFlagsConnectionRequired)) {
-				// if VPN "server" is [still] reachable
-
-				if (!(*flags & kSCNetworkReachabilityFlagsTransientConnection)) {
-					// start w/clean flags if not already layered on a transient network
-					*flags = kSCNetworkReachabilityFlagsReachable;
-				}
-
-				*flags |= kSCNetworkReachabilityFlagsTransientConnection;
-				*flags |= kSCNetworkReachabilityFlagsConnectionRequired;
-				*flags |= kSCNetworkReachabilityFlagsConnectionOnDemand;
-
-				// set 'InterventionRequired' if the OnDemand connection is paused
-				if (SCNetworkConnectionIsOnDemandSuspended(connection)) {
-					*flags |= kSCNetworkReachabilityFlagsInterventionRequired;
-				}
-
-				if (_sc_debug) {
-					SCLog(TRUE, LOG_INFO, CFSTR("%s  service * = %@"),
-					      targetPrivate->log_prefix,
-					      onDemandServiceID);
-					SCLog(TRUE, LOG_INFO, CFSTR("%s  status    = isReachable (after OnDemand connect)"),
-					      targetPrivate->log_prefix);
-				}
-
-				success = TRUE;
-			}
-		}
-
-		if (onDemandRemoteAddress != NULL) {
-			if (targetPrivate->onDemandRemoteAddress == NULL) {
-				targetPrivate->onDemandRemoteAddress = CFRetain(onDemandRemoteAddress);
-			}
-		}
-
-		if (onDemandServiceID != NULL) {
-			if (targetPrivate->onDemandServiceID == NULL) {
-				targetPrivate->onDemandServiceID = CFRetain(onDemandServiceID);
-			}
-		}
-	}
-
-    done:
-
-	if (onDemandServiceID != NULL) {
-		CFRelease(onDemandServiceID);
-	}
-	if (onDemandRemoteAddress != NULL) {
-		CFRelease(onDemandRemoteAddress);
-	}
-	if (connection != NULL) {
-		CFRelease(connection);
-	}
-	if (selectOptions != NULL) {
-		CFRelease(selectOptions);
-	}
-	return success;
-}
-
-
-/*
- * OnDemand configuration handling
- *
- * Notes :
- *
- * 1. We have a "contract" with mDNSResponder that for EVERY network
- *    or DNS configuration change that should warrant our [re-]starting
- *    a query, mDNSResponder will acknowledge the latest DNS configuration.
- *
- * 2. IPMonitor also posts a notification AFTER every network or DNS
- *    configuration change.
- *
- * 3. We use IPMonitor's "trailing edge" as a signal to restart any
- *    by-name queries.
- */
-
-
-// Note: protected by _hn_target_queue()
-static int			onDemand_refresh_token;
-static Boolean			onDemand_refresh_token_valid	= FALSE;
-
-
-/*
- * onDemand_refresh_handler
- *
- * Called to notify/update all SCNetworkReachability targets of
- * OnDemand changes.
- * - should be exec'd on the _hn_changes_queue()
- */
-static void
-onDemand_refresh_handler()
-{
-	CFArrayRef			changes;
-	CFStringRef			key;
-	__block SCDynamicStoreRef	store	= NULL;
-
-	dispatch_sync(_hn_target_queue(), ^{
-		if (onDemand_refresh_token_valid && (hn_store != NULL)) {
-			store = CFRetain(hn_store);
-		}
-	});
-
-	if (store == NULL) {
-		return;
-	}
-
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetOnDemand);
-	changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks);
-	__SCNetworkReachabilityHandleChanges(store, changes, NULL);
-	CFRelease(changes);
-	CFRelease(key);
-
-	CFRelease(store);
-	return;
-}
-
-
-/*
- * onDemand_refresh_enable
- *
- * Called to monitor for OnDemand changes.
- * - caller must be running on the _hn_target_queue()
- */
-static Boolean
-onDemand_refresh_enable(dispatch_queue_t q)
-{
-	uint32_t	status;
-
-	status = notify_register_dispatch(kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY,
-					  &onDemand_refresh_token,
-					  q,
-					  ^(int token){
-						  onDemand_refresh_handler();
-					  });
-	if (status != NOTIFY_STATUS_OK) {
-		SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed, status=%u"), status);
-		return FALSE;
-	}
-
-	onDemand_refresh_token_valid = TRUE;
-
-	return TRUE;
-}
-
-
-/*
- * onDemand_refresh_disable
- *
- * Called to stop monitoring for OnDemand changes
- * - caller must be running on the _hn_target_queue()
- */
-static void
-onDemand_refresh_disable()
-{
-	(void)notify_cancel(onDemand_refresh_token);
-	onDemand_refresh_token_valid = FALSE;
-	return;
-}
-
-
-
-
-#pragma mark -
-#pragma mark Reachability Flags
-
-
-static Boolean
-__SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef	store_info,
-				SCNetworkReachabilityRef	target,
-				ReachabilityInfo		*reach_info,
-				Boolean				async)
-{
-	CFMutableArrayRef		addresses	= NULL;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-	ReachabilityInfo		my_info		= NOT_REACHABLE;
-	Boolean				ok		= TRUE;
-
-	MUTEX_ASSERT_HELD(&targetPrivate->lock);
-
-	_reach_set(reach_info, &NOT_REACHABLE, reach_info->cycle, targetPrivate->if_index, targetPrivate->if_name);
-
-	if (!isA_SCNetworkReachability(target)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return FALSE;
-	}
-
-#if	TARGET_OS_IPHONE
-	if (isReachabilityTypeName(targetPrivate->type) &&
-	    !async &&
-	    pthread_is_threaded_np() &&
-	    pthread_main_np()) {
-		SCLog(TRUE, LOG_WARNING, CFSTR("Warning: sync SCNetworkReachability (by-name) query on main thread"));
-	}
-#endif	// TARGET_OS_IPHONE
-
-	if (!targetPrivate->serverBypass) {
-		if (!targetPrivate->serverActive) {
-
-			ok = __SCNetworkReachabilityServer_targetAdd(target);
-			if (!ok) {
-				targetPrivate->serverBypass = TRUE;
-			}
-		}
-
-		if (targetPrivate->serverActive) {
-			ok = __SCNetworkReachabilityServer_targetStatus(target);
-			if (!ok) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("__SCNetworkReachabilityGetFlags _targetStatus() failed"));
-				_SCErrorSet(kSCStatusFailed);
-				goto done;
-			}
-
-			targetPrivate->cycle = targetPrivate->serverInfo.cycle;
-			_reach_set(&my_info,
-				   &targetPrivate->serverInfo,
-				   targetPrivate->serverInfo.cycle,
-				   targetPrivate->if_index,
-				   targetPrivate->if_name);
-			goto done;
-		}
-	}
-
-
-	switch (targetPrivate->type) {
-		case reachabilityTypeAddress :
-		case reachabilityTypeAddressPair : {
-			/*
-			 * Check "local" address
-			 */
-			if (targetPrivate->localAddress != NULL) {
-				/*
-				 * Check "local" address
-				 */
-				ok = checkAddress(store_info,
-						  targetPrivate->localAddress,
-						  targetPrivate->if_index,
-						  &my_info,
-						  targetPrivate->log_prefix);
-				if (!ok) {
-					goto done2;	/* not today */
-				}
-
-				if (!(my_info.flags & kSCNetworkReachabilityFlagsIsLocalAddress)) {
-					goto done2;	/* not reachable, non-"local" address */
-				}
-			}
-
-			/*
-			 * Check "remote" address
-			 */
-			if ((targetPrivate->remoteAddress != NULL) &&
-			    (targetPrivate->localAddress != targetPrivate->remoteAddress)) {
-				/*
-				 * in cases where we have different "local" and "remote" addresses
-				 * we need to re-initialize the to-be-returned flags.
-				 */
-				my_info = NOT_REACHABLE;
-
-				/*
-				 * Check "remote" address
-				 */
-				ok = checkAddress(store_info,
-						  targetPrivate->remoteAddress,
-						  targetPrivate->if_index,
-						  &my_info,
-						  targetPrivate->log_prefix);
-				if (!ok) {
-					goto done2;	/* not today */
-				}
-			}
-
-			break;
-
-		}
-
-		case reachabilityTypeName :
-		case reachabilityTypePTR  : {
-			int				error;
-			int				ns_dns_config	= -1;
-			SCNetworkReachabilityFlags	ns_flags	= 0;
-			uint32_t			ns_if_index	= 0;
-
-			addresses = (CFMutableArrayRef)SCNetworkReachabilityCopyResolvedAddress(target, &error);
-			if ((addresses != NULL) || (error != NETDB_SUCCESS)) {
-				/* if resolved or an error had been detected */
-				if (!async) {
-					/* if not an async request */
-					goto checkResolvedAddresses;
-				} else if (targetPrivate->dnsActive) {
-					/* if [m]DNS query active */
-					goto checkResolvedAddresses;
-				} else if (!targetPrivate->needResolve) {
-					/*
-					 * if this is an async request (i.e. someone is watching the reachability
-					 * of this target), if no query active, and if no query is needed
-					 */
-					goto checkResolvedAddresses;
-				}
-			}
-
-			if (!targetPrivate->onDemandBypass) {
-				Boolean				onDemand;
-				SCNetworkReachabilityFlags	onDemandFlags	= 0;
-
-				/*
-				 * before we attempt our initial DNS query, check if there is
-				 * an OnDemand configuration that we should be using.
-				 */
-				onDemand = __SCNetworkReachabilityOnDemandCheck(store_info, target, FALSE, &onDemandFlags);
-				if (onDemand) {
-					/* if OnDemand connection is needed */
-					my_info.flags = onDemandFlags;
-					goto done;
-				}
-			}
-
-			targetPrivate->dnsBlocked = FALSE;
-
-			/* update the reachability of the DNS servers */
-			_SC_R_updateResolverReachability(store_info,
-							 &ns_flags,
-							 &targetPrivate->haveDNS,
-							 targetPrivate->name,
-							 targetPrivate->if_index,
-							 &ns_if_index,
-							 &ns_dns_config,
-							 targetPrivate->log_prefix);
-
-
-			// save resolver reachability flags
-			targetPrivate->resolverFlags = ns_flags;
-
-			if (rankReachability(ns_flags) < 2) {
-				/*
-				 * if DNS servers are not (or are no longer) reachable, set
-				 * flags based on the availability of configured (but not
-				 * active) services.
-				 */
-
-				SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server(s) not available"),
-				      targetPrivate->log_prefix);
-
-				if (!targetPrivate->dnsBlocked) {
-					ok = checkAddress(store_info,
-							  NULL,
-							  targetPrivate->if_index,
-							  &my_info,
-							  targetPrivate->log_prefix);
-					if (!ok) {
-						SCLog(_sc_debug, LOG_INFO, CFSTR("%sNo available networks"),
-						      targetPrivate->log_prefix);
-						goto done2;
-					}
-				} else {
-					// if not checking "available" networks
-					my_info.flags = ns_flags;
-					my_info.if_index = ns_if_index;
-				}
-
-				if (async && targetPrivate->scheduled) {
-					/*
-					 * return "host not found", set flags appropriately,
-					 * and schedule notification.
-					 */
-					__SCNetworkReachabilitySetResolvedError(target, EAI_NONAME);
-					my_info.flags |= (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending);
-
-					SCLog(_sc_debug, LOG_INFO, CFSTR("%sno DNS servers are reachable"),
-					      targetPrivate->log_prefix);
-					__SCNetworkReachabilityUpdate(target);
-				}
-
-				break;
-			}
-
-			if (targetPrivate->resolverBypass) {
-				if (targetPrivate->haveDNS) {
-					/*
-					 * if we are not resolving the name, and if we have
-					 * one or more DNS resolvers, then return flags that
-					 * reflect the reachability of the resolvers (and
-					 * not the actual name).
-					 */
-					my_info.flags = ns_flags;
-					my_info.if_index = ns_if_index;
-				}
-				break;
-			}
-
-			if (async) {
-				/* for async requests we return the last known status */
-				my_info = targetPrivate->info;
-
-				if (targetPrivate->dnsActive) {
-					/* if [m]DNS query active */
-					if (_sc_debug && !targetPrivate->quiet) {
-						SCLog(TRUE, LOG_INFO,
-						      CFSTR("%swaiting for DNS reply"),
-						      targetPrivate->log_prefix);
-					}
-					if ((addresses != NULL) || (error != NETDB_SUCCESS)) {
-						/* updated reachability based on the previous reply */
-						goto checkResolvedAddresses;
-					}
-					break;
-				}
-
-				SCLog(_sc_debug, LOG_INFO,
-				      CFSTR("%sstart DNS query for name = %s"),
-				      targetPrivate->log_prefix,
-				      targetPrivate->name);
-
-				/*
-				 * initiate an DNS query w/DNSServiceGetAddrInfo
-				 */
-				enqueueDNSQuery(target);
-				break;
-			}
-
-			SCLog(_sc_debug, LOG_INFO,
-			      CFSTR("%scheckName(%s)"),
-			      targetPrivate->log_prefix,
-			      targetPrivate->name);
-
-			/*
-			 * OK, all of the DNS name servers are available.  Let's
-			 * resolve the nodename into an address.
-			 */
-			sync_DNS_query(target);
-
-			if (!(targetPrivate->dnsHaveTimeout && targetPrivate->dnsHaveError)) {
-				// if target reach info is valid
-				memcpy(reach_info, &targetPrivate->info, sizeof(ReachabilityInfo));
-				goto done2;
-			}
-
-			if (addresses != NULL)	CFRelease(addresses);
-			addresses = (CFMutableArrayRef)SCNetworkReachabilityCopyResolvedAddress(target, &error);
-
-		    checkResolvedAddresses :
-
-			/*
-			 * We first assume that the requested host is NOT available.
-			 * Then, check each address for accessibility and return the
-			 * best status available.
-			 */
-			my_info = NOT_REACHABLE;
-
-			if ((targetPrivate->type == reachabilityTypeName) && isA_CFArray(addresses)) {
-				CFIndex		i;
-				CFIndex		n	= CFArrayGetCount(addresses);
-				struct sockaddr	*sa;
-
-				for (i = 0; i < n; i++) {
-					ReachabilityInfo	ns_info	= NOT_REACHABLE;
-
-					sa = (struct sockaddr *)CFDataGetBytePtr(CFArrayGetValueAtIndex(addresses, i));
-
-					ok = checkAddress(store_info,
-							  sa,
-							  targetPrivate->if_index,
-							  &ns_info,
-							  targetPrivate->log_prefix);
-					if (!ok) {
-						goto done2;	/* not today */
-					}
-
-					if (rankReachability(ns_info.flags) > rankReachability(my_info.flags)) {
-						/* return the best case result */
-						my_info = ns_info;
-						if (rankReachability(my_info.flags) == 2) {
-							/* can't get any better than REACHABLE */
-							break;
-						}
-					}
-				}
-
-				if (_sc_debug) {
-					for (i++; i < n; i++) {
-						sa = (struct sockaddr *)CFDataGetBytePtr(CFArrayGetValueAtIndex(addresses, i));
-						log_address("skipAddress",
-							    sa,
-							    targetPrivate->if_index,
-							    targetPrivate->log_prefix);
-					}
-				}
-			} else if ((targetPrivate->type == reachabilityTypePTR) && isA_CFArray(addresses)) {
-				CFIndex		i;
-				CFIndex		n	= CFArrayGetCount(addresses);
-
-				my_info = NOT_REACHABLE;
-
-				for (i = 0; i < n; i++) {
-					if (i == 0) {
-						my_info.flags = kSCNetworkReachabilityFlagsReachable;
-					}
-
-					if (_sc_debug) {
-						CFStringRef	ptrName;
-
-						ptrName = CFArrayGetValueAtIndex(addresses, i);
-						SCLog(TRUE, LOG_INFO, CFSTR("%sPTR name(%@)"),
-						      targetPrivate->log_prefix,
-						      ptrName);
-					}
-				}
-			} else {
-				if ((error == EAI_NONAME)
-#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
-				     || (error == EAI_NODATA)
-#endif
-				     ) {
-					/*
-					 * the target host name could not be resolved
-					 */
-					if (!targetPrivate->onDemandBypass) {
-						Boolean				onDemand;
-						SCNetworkReachabilityFlags	onDemandFlags	= 0;
-
-						/*
-						 * our initial DNS query failed, check again to see if there
-						 * there is an OnDemand configuration that we should be using.
-						 */
-						onDemand = __SCNetworkReachabilityOnDemandCheck(store_info, target, TRUE, &onDemandFlags);
-						if (onDemand) {
-							/* if OnDemand connection is needed */
-							my_info.flags = onDemandFlags;
-							goto done;
-						}
-					}
-
-
-					if (!targetPrivate->haveDNS) {
-						/*
-						 * No DNS servers are defined. Set flags based on
-						 * the availability of configured (but not active)
-						 * services.
-						 */
-						ok = checkAddress(store_info,
-								  NULL,
-								  targetPrivate->if_index,
-								  &my_info,
-								  targetPrivate->log_prefix);
-						if (!ok) {
-							goto done2;	/* not today */
-						}
-
-						if ((my_info.flags & kSCNetworkReachabilityFlagsReachable) &&
-							(my_info.flags & kSCNetworkReachabilityFlagsConnectionRequired)) {
-							/*
-							 * Since we might pick up a set of DNS servers when this connection
-							 * is established, don't reply with a "HOST NOT FOUND" error just yet.
-							 */
-							break;
-						}
-
-						/* Host not found, not reachable! */
-						my_info = NOT_REACHABLE;
-					}
-				}
-			}
-
-			break;
-		}
-	}
-
-    done:
-
-
-	_reach_set(reach_info, &my_info, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name);
-
-    done2 :
-
-	if (addresses != NULL)	CFRelease(addresses);
-	return ok;
-}
-
-int
-SCNetworkReachabilityGetInterfaceIndex(SCNetworkReachabilityRef target)
+SCNetworkReachabilityRef
+SCNetworkReachabilityCreateWithOptions(CFAllocatorRef	allocator,
+				       CFDictionaryRef	options)
 {
-	int				if_index	= -1;
-	Boolean				ok		= TRUE;
-	ReachabilityStoreInfo		store_info;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
+	const struct sockaddr		*addr_l		= NULL;
+	const struct sockaddr		*addr_p		= NULL;
+	const struct sockaddr		*addr_r		= NULL;
+	CFDataRef			data;
+	Boolean				haveOpt		= FALSE;
+	CFStringRef			interface	= NULL;
+	CFStringRef			nodename;
+	CFBooleanRef			resolverBypass;
+	SCNetworkReachabilityRef	target;
+	SCNetworkReachabilityPrivateRef	targetPrivate;
+	unsigned int			if_index = 0;
+	char				if_name[IFNAMSIZ];
+	CFDataRef			sourceAppAuditToken	= NULL;
+	CFStringRef			sourceAppBundleID	= NULL;
 
-	if (!isA_SCNetworkReachability(target)) {
+	if (!isA_CFDictionary(options)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
-		return if_index;
-	}
-
-	ReachabilityStoreInfo_init(&store_info);
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (targetPrivate->scheduled) {
-		// if being watched, return the last known (and what should be current) status
-		goto done;
-	}
-
-
-	ok = __SCNetworkReachabilityGetFlags(&store_info, target, &targetPrivate->info, FALSE);
-
-    done :
-
-	/* Only return the if_index if the connection is reachable not for reachable connection
-	 * required etc ... */
-	if (ok && rankReachability(targetPrivate->info.flags) == 2) {
-		if_index = targetPrivate->info.if_index;
+		return NULL;
 	}
 
-	MUTEX_UNLOCK(&targetPrivate->lock);
-	ReachabilityStoreInfo_free(&store_info);
-	return if_index;
-}
-
-
-Boolean
-SCNetworkReachabilityGetFlags(SCNetworkReachabilityRef		target,
-			      SCNetworkReachabilityFlags	*flags)
-{
-	Boolean				ok		= TRUE;
-	ReachabilityStoreInfo		store_info;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	if (!isA_SCNetworkReachability(target)) {
+	nodename = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionNodeName);
+	if ((nodename != NULL) &&
+	    (!isA_CFString(nodename) || (CFStringGetLength(nodename) == 0))) {
 		_SCErrorSet(kSCStatusInvalidArgument);
-		return FALSE;
+		return NULL;
 	}
-
-	ReachabilityStoreInfo_init(&store_info);
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (targetPrivate->scheduled) {
-		// if being watched, return the last known (and what should be current) status
-		*flags = targetPrivate->info.flags & kSCNetworkReachabilityFlagsMask;
-
-		if (isReachabilityTypeName(targetPrivate->type) && targetPrivate->dnsNoAddressesSinceLastTimeout) {
-			targetPrivate->needResolve = TRUE;
-			ReachabilityInfo tmp_reach_info	= NOT_REACHABLE;
-			__SCNetworkReachabilityGetFlags(&store_info, target, &tmp_reach_info, TRUE);
+	data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionLocalAddress);
+	if (data != NULL) {
+		if (!isA_CFData(data) || ((size_t)CFDataGetLength(data) < sizeof(struct sockaddr_in))) {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
-
-		goto done;
-	}
-
-
-	ok = __SCNetworkReachabilityGetFlags(&store_info, target, &targetPrivate->info, FALSE);
-	if (_sc_debug) {
-		SCLog(TRUE, LOG_INFO, CFSTR("%s  flags     = 0x%08x"), targetPrivate->log_prefix, targetPrivate->info.flags);
-	}
-
-	*flags = targetPrivate->info.flags & kSCNetworkReachabilityFlagsMask;
-
-    done :
-
-	MUTEX_UNLOCK(&targetPrivate->lock);
-	ReachabilityStoreInfo_free(&store_info);
-	return ok;
-}
-
-
-#pragma mark -
-#pragma mark Notifications
-
-
-/*
- * __SCNetworkReachabilityHandleChanges
- *
- * Called to process network configuration changes and determine
- * if a reachability notification is warranted.
- * - should be exec'd on the _hn_changes_queue()
- */
-static void
-__SCNetworkReachabilityHandleChanges(SCDynamicStoreRef	store,
-				     CFArrayRef		changedKeys,
-				     void		*info)
-{
-	Boolean			dnsConfigChanged	= FALSE;
-	CFIndex			i;
-	Boolean			forcedChange		= FALSE;
-	CFStringRef		key;
-	Boolean			match;
-	CFIndex			nChanges;
-	CFIndex			nGlobals		= 0;
-	CFIndex			nTargets;
-	Boolean			neChanged		= FALSE;
-	Boolean			networkConfigChanged	= FALSE;
-	struct timeval		now;
-	Boolean			onDemandConfigChanged	= FALSE;
-#if	!TARGET_OS_IPHONE
-	Boolean			powerStatusChanged	= FALSE;
-#endif	// !TARGET_OS_IPHONE
-	ReachabilityStoreInfo	store_info;
-	const void *		targets_q[N_QUICK];
-	const void **		targets			= targets_q;
-	__block CFSetRef	watchers		= NULL;
-
-	nChanges = CFArrayGetCount(changedKeys);
-	if (nChanges == 0) {
-		/* if no changes */
-		return;
+		addr_l = (const struct sockaddr *)CFDataGetBytePtr(data);
 	}
-
-
-	dispatch_sync(_hn_target_queue(), ^{
-		/* grab the currently watched targets */
-		if (hn_targets != NULL) {
-			watchers = CFSetCreateCopy(NULL, hn_targets);
+	data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionPTRAddress);
+	if (data != NULL) {
+		if (!isA_CFData(data) || ((size_t)CFDataGetLength(data) < sizeof(struct sockaddr_in))) {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
-	});
-
-	nTargets = (watchers != NULL) ? CFSetGetCount(watchers) : 0;
-	if (nTargets == 0) {
-		/* if no addresses being monitored */
-		goto done;
+		addr_p = (const struct sockaddr *)CFDataGetBytePtr(data);
 	}
-
-	/* grab the current time */
-	(void)gettimeofday(&now, NULL);
-
-#if	!TARGET_OS_IPHONE
-	match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), power_changed_key);
-	if (match) {
-		/* handle "early" wake notification */
-		nGlobals++;
-		powerStatusChanged = TRUE;
+	data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionRemoteAddress);
+	if (data != NULL) {
+		if (!isA_CFData(data) || ((size_t)CFDataGetLength(data) < sizeof(struct sockaddr_in))) {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
+		}
+		addr_r = (const struct sockaddr *)CFDataGetBytePtr(data);
 	}
-#endif	// !TARGET_OS_IPHONE
-
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetDNS);
-	match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key);
-	CFRelease(key);
-	if (match) {
-		nGlobals++;
-		dnsConfigChanged = TRUE;	/* the DNS server(s) have changed */
+	interface = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionInterface);
+	if ((interface != NULL) &&
+	    (!isA_CFString(interface) || (CFStringGetLength(interface) == 0))) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
-
-	key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
-							 kSCDynamicStoreDomainState,
-							 kSCEntNetOnDemand);
-	match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key);
-	CFRelease(key);
-	if (match) {
-		nGlobals++;
-		onDemandConfigChanged = TRUE;	/* the OnDemand configuration has changed */
-
-		// force OnDemand configuration refresh (if SC notification arrives before BSD notify)
-		__SCNetworkConnectionForceOnDemandConfigurationRefresh();
+	resolverBypass = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionResolverBypass);
+	if ((resolverBypass != NULL) && !isA_CFBoolean(resolverBypass)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
-
-
-
-	match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), SCNETWORKREACHABILITY_TRIGGER_KEY);
-	if (match) {
-		nGlobals++;
-		forcedChange = TRUE;		/* an SCDynamicStore driven "network" change */
+	sourceAppAuditToken =
+		CFDictionaryGetValue(options, kSCNetworkReachabilityOptionSourceAppAuditToken);
+	if ((sourceAppAuditToken != NULL) &&
+		(!isA_CFData(sourceAppAuditToken) ||
+		(CFDataGetLength(sourceAppAuditToken) != sizeof(audit_token_t)))) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
-
-	if (nChanges > nGlobals) {
-		networkConfigChanged = TRUE;
+	sourceAppBundleID =
+		CFDictionaryGetValue(options, kSCNetworkReachabilityOptionSourceAppBundleIdentifier);
+	if ((sourceAppBundleID != NULL) &&
+		(!isA_CFString(sourceAppBundleID) ||
+		(CFStringGetLength(sourceAppBundleID) == 0))) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
 	}
 
-	if (_sc_debug) {
-		unsigned int		changes			= 0;
-		static const char	*change_strings[]	= {
-			// with no "power" status change
-			"",						// 00000
-			"network ",					// 00001
-			"DNS ",						// 00010
-			"network and DNS ",				// 00011
-			"OnDemand ",					// 00100
-			"network and OnDemand ",			// 00101
-			"DNS and OnDemand ",				// 00110
-			"network, DNS, and OnDemand ",			// 00111
-			"NE ",						// 01000
-			"network and NE ",				// 01001
-			"DNS and NE ",					// 01010
-			"network, DNS, and NE ",			// 01011
-			"OnDemand and NE ",				// 01100
-			"network, OnDemand, and NE ",			// 01101
-			"DNS, OnDemand, and NE ",			// 01110
-			"network, DNS, OnDemand, and NE ",		// 01111
-#if	!TARGET_OS_IPHONE
-			// with "power" status change
-			"power",					// 10000
-			"network and power ",				// 10001
-			"DNS and power ",				// 10010
-			"network, DNS, and power ",			// 10011
-			"OnDemand and power ",				// 10100
-			"network, OnDemand, and power ",		// 10101
-			"DNS, OnDemand, and power ",			// 10110
-			"network, DNS, OnDemand, and power ",		// 10111
-			"NE and power ",				// 11000
-			"network, NE, and power ",			// 11001
-			"DNS, NE, and power ",				// 11010
-			"network, DNS, NE, and power ",			// 11011
-			"OnDemand, NE, and power ",			// 11100
-			"network, OnDemand, NE, and power ",		// 11101
-			"DNS, OnDemand, NE, and power ",		// 11110
-			"network, DNS, OnDemand, NE, and power ",	// 11111
-#endif	// !TARGET_OS_IPHONE
-		};
-
-#if	!TARGET_OS_IPHONE
-		#define	PWR	16
-		if (powerStatusChanged) {
-			changes |= PWR;
-		}
-#endif	// !TARGET_OS_IPHONE
-
-		#define	NE	8
-		if (neChanged) {
-			changes |= NE;
-		}
+	if (nodename != NULL) {
+		const char	*name;
 
-		#define	VOD	4
-		if (onDemandConfigChanged) {
-			changes |= VOD;
+		if ((addr_l != NULL) || (addr_r != NULL) || (addr_p != NULL)) {
+			// can't have both a nodename and an address
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
 
-		#define	DNS	2
-		if (dnsConfigChanged) {
-			changes |= DNS;
+		name = _SC_cfstring_to_cstring(nodename, NULL, 0, kCFStringEncodingUTF8);
+		target = SCNetworkReachabilityCreateWithName(allocator, name);
+		CFAllocatorDeallocate(NULL, (void *)name);
+	} else if (addr_p != NULL) {
+		if ((addr_l != NULL) ||					// can't have PTR and target address
+		    (addr_r != NULL)) {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
 
-		#define	NET	1
-		if (networkConfigChanged) {
-			changes |= NET;
+		target = __SCNetworkReachabilityCreateWithPTR(NULL, addr_p);
+	} else {
+		if ((addr_l != NULL) && (addr_r != NULL)) {
+			target = SCNetworkReachabilityCreateWithAddressPair(NULL, addr_l, addr_r);
+		} else if (addr_r != NULL) {
+			target = SCNetworkReachabilityCreateWithAddress(NULL, addr_r);
+		} else if (addr_l != NULL) {
+			target = SCNetworkReachabilityCreateWithAddressPair(NULL, addr_l, NULL);
+		} else {
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
-
-		SCLog(TRUE, LOG_INFO,
-		      CFSTR("process %s%s%sconfiguration change"),
-		      forcedChange ? "[forced] " : "",
-		      change_strings[changes]);
+	}
+	if (target == NULL) {
+		return NULL;
 	}
 
-	ReachabilityStoreInfo_init(&store_info);
-
-	if (nTargets > (CFIndex)(sizeof(targets_q) / sizeof(CFTypeRef)))
-		targets = CFAllocatorAllocate(NULL, nTargets * sizeof(CFTypeRef), 0);
-	CFSetGetValues(watchers, targets);
-	for (i = 0; i < nTargets; i++) {
-		Boolean				dnsNeedsUpdate	= FALSE;
-		SCNetworkReachabilityRef	target		= targets[i];
-		SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-		MUTEX_LOCK(&targetPrivate->lock);
-
-
-		if (dnsConfigChanged) {
-			targetPrivate->last_dns = now;
-		}
-
-		if (networkConfigChanged) {
-			targetPrivate->last_network = now;
-		}
-
-#if	!TARGET_OS_IPHONE
-		if (powerStatusChanged) {
-			targetPrivate->last_power = now;
-		}
-#endif	// !TARGET_OS_IPHONE
-
-		if (isReachabilityTypeName(targetPrivate->type)) {
-			Boolean		dnsChanged	= (dnsConfigChanged	 |
-							   dnsNeedsUpdate	 |
-							   onDemandConfigChanged |
-							   neChanged);
-
-			if (!dnsChanged) {
-				/*
-				 * if the DNS configuration didn't change we still need to
-				 * check that the DNS servers are accessible.
-				 */
-				Boolean				ns_blocked	= FALSE;
-				int				ns_dns_config	= -1;
-				SCNetworkReachabilityFlags	ns_flags	= 0;
-				uint32_t			ns_if_index	= 0;
-				Boolean				ok;
-
-				/* update the reachability of the DNS servers */
-				ok = ReachabilityStoreInfo_update(&store_info, &store, AF_UNSPEC);
-				if (ok) {
-					_SC_R_updateResolverReachability(&store_info,
-									 &ns_flags,
-									 &targetPrivate->haveDNS,
-									 targetPrivate->name,
-									 targetPrivate->if_index,
-									 &ns_if_index,
-									 &ns_dns_config,
-									 targetPrivate->log_prefix);
-				} else {
-					ns_flags = kSCNetworkReachabilityFlagsReachable;
-					dnsChanged = TRUE;
-				}
-
-
-				if (rankReachability(ns_flags) < 2) {
-					/*
-					 * if DNS servers are not (or are no longer) reachable, set
-					 * flags based on the availability of configured (but not
-					 * active) services.
-					 */
-					SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server(s) not available"),
-					      targetPrivate->log_prefix);
-					dnsChanged = TRUE;
-				}
-
-				if ((targetPrivate->dnsBlocked != ns_blocked) ||
-				    (targetPrivate->resolverFlags != ns_flags)) {
-					// if the DNS blocked or resolver reachability changed
-					targetPrivate->dnsBlocked = ns_blocked;
-					targetPrivate->resolverFlags = ns_flags;
-					dnsChanged = TRUE;
-				}
-			}
-
-			if (dnsChanged) {
-				if (targetPrivate->dnsActive) {
-					// if we have an outstanding [m]DNS query
-					SCLog(_sc_debug, LOG_INFO,
-					      CFSTR("%scancel [m]DNS query for name = %s"),
-					      targetPrivate->log_prefix,
-					      targetPrivate->name);
-					dequeueDNSQuery(target);
-				}
-
-				/* schedule request to resolve the name again */
-				targetPrivate->needResolve = TRUE;
-			}
-		}
-
-		if (forcedChange) {
-			targetPrivate->cycle++;
-		}
+	targetPrivate = (SCNetworkReachabilityPrivateRef)target;
 
-		if (targetPrivate->scheduled) {
-			__SCNetworkReachabilityUpdate(target);
+	if (interface != NULL) {
+		if ((_SC_cfstring_to_cstring(interface,
+					     if_name,
+					     sizeof(if_name),
+					     kCFStringEncodingASCII) == NULL) ||
+			((if_index = if_nametoindex(if_name)) == 0)) {
+			CFRelease(targetPrivate);
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return NULL;
 		}
-
-		MUTEX_UNLOCK(&targetPrivate->lock);
 	}
-	if (targets != targets_q)	CFAllocatorDeallocate(NULL, targets);
-
-	ReachabilityStoreInfo_free(&store_info);
-
-    done :
-
-	if (watchers != NULL) CFRelease(watchers);
-	return;
-}
-
-
-/*
- * __SCNetworkReachabilityHandleStoreChanges
- *
- * Called to process SCDynamicStore network configuration changes.
- * - should be exec'd on the _hn_changes_queue()
- */
-static void
-__SCNetworkReachabilityHandleStoreChanges(SCDynamicStoreRef	store,
-					  CFArrayRef		changedKeys,
-					  void			*info)
-{
-	nwi_state_t	nwi_state;
 
-	if ((CFArrayGetCount(changedKeys) == 1) &&
-	    CFArrayContainsValue(changedKeys, CFRangeMake(0, 1), SCNETWORKREACHABILITY_TRIGGER_KEY)) {
-		goto update;
+	if (targetPrivate->parameters == NULL) {
+		targetPrivate->parameters = nw_parameters_create();
 	}
 
-	/* "something" [else] changed, start fresh */
-	ReachabilityStoreInfo_save(NULL);
-
-	nwi_state = nwi_state_copy();
-	if (nwi_state != NULL) {
-		// if we have some networking
-		nwi_state_release(nwi_state);
-		return;
+	if (if_index != 0) {
+		nw_interface_t interfaceObject = nw_interface_create_with_index(if_index);
+		nw_parameters_require_interface(targetPrivate->parameters, interfaceObject);
+		nw_release(interfaceObject);
+		haveOpt = TRUE;
 	}
 
-	// if no networking, use the [SC] changes to add/update
-	// the kSCNetworkReachabilityFlagsConnectionRequired flag
-
-    update :
+	if (resolverBypass != NULL) {
+		targetPrivate->resolverBypass = CFBooleanGetValue(resolverBypass);
+		haveOpt = TRUE;
+	}
+
+	if (sourceAppAuditToken != NULL) {
+		audit_token_t atoken;
+		CFDataGetBytes(sourceAppAuditToken,
+				CFRangeMake(0, CFDataGetLength(sourceAppAuditToken)),
+				(UInt8 *)&atoken);
+		nw_parameters_set_source_application(targetPrivate->parameters, atoken);
+		haveOpt = TRUE;
+	} else if (sourceAppBundleID != NULL) {
+		char *cBundleID = _SC_cfstring_to_cstring(sourceAppBundleID,
+								NULL,
+								0,
+								kCFStringEncodingUTF8);
+		if (cBundleID != NULL) {
+			nw_parameters_set_source_application_by_bundle_id(targetPrivate->parameters,
+									  cBundleID);
+			CFAllocatorDeallocate(NULL, (void *)cBundleID);
+		} else {
+			SC_log(LOG_WARNING, "failed to convert %@ to a C string", sourceAppBundleID);
+		}
+		haveOpt = TRUE;
+	}
 
-	__SCNetworkReachabilityHandleChanges(store, changedKeys, info);
-	return;
-}
+	if (haveOpt) {
+		const char	*opt	= "???";
 
+		switch (targetPrivate->type) {
+			case reachabilityTypeAddress :
+				opt = DEBUG_REACHABILITY_TYPE_ADDRESS_OPTIONS;
+				break;
+			case reachabilityTypeAddressPair :
+				opt = DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_OPTIONS;
+				break;
+			case reachabilityTypeName :
+				opt = DEBUG_REACHABILITY_TYPE_NAME_OPTIONS;
+				break;
+			case reachabilityTypePTR :
+				opt = DEBUG_REACHABILITY_TYPE_PTR_OPTIONS;
+				break;
+		}
 
-#if	!TARGET_OS_IPHONE
+		SC_log(LOG_DEBUG, "%s%s %@",
+		       targetPrivate->log_prefix,
+		       opt,
+		       targetPrivate);
+	}
 
-static Boolean
-darkWakeNotify(SCNetworkReachabilityRef target)
-{
-	return FALSE;
+	return (SCNetworkReachabilityRef)targetPrivate;
 }
 
 
-static Boolean
-systemIsAwake(IOPMSystemPowerStateCapabilities power_capabilities)
+CFTypeID
+SCNetworkReachabilityGetTypeID(void)
 {
-	if ((power_capabilities & POWER_CAPABILITIES_NETWORK) != POWER_CAPABILITIES_NETWORK) {
-		// if we're not fully awake (from a networking point of view).
-		return FALSE;
-	}
-
-	return TRUE;
+	pthread_once(&initialized, __SCNetworkReachabilityInitialize);	/* initialize runtime */
+	return __kSCNetworkReachabilityTypeID;
 }
 
-#endif	// !TARGET_OS_IPHONE
-
 
-static void
-reachPerform(void *info)
+CFArrayRef	/* CFArray[CFData], where each CFData is a (struct sockaddr *) */
+SCNetworkReachabilityCopyResolvedAddress(SCNetworkReachabilityRef	target,
+					 int				*error_num)
 {
-	void				*context_info;
-	void				(*context_release)(const void *);
-	unsigned int			n;
-	ReachabilityInfo		reach_info;
-	SCNetworkReachabilityCallBack	rlsFunction;
-	SCNetworkReachabilityRef	target		= (SCNetworkReachabilityRef)info;
+	CFMutableArrayRef		array		= NULL;
 	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-	n = _SC_ATOMIC_ZERO(&targetPrivate->pending);
-	if (_sc_debug && (n > 1)) {
-		SCLog(TRUE, LOG_DEBUG,
-		      CFSTR("%sdelivering SCNetworkReachability notifications (%u)"),
-		      targetPrivate->log_prefix,
-		      n);
+	if (!isA_SCNetworkReachability(target)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+	       return NULL;
 	}
 
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (!targetPrivate->scheduled) {
-		// if no longer scheduled
-		SCLog(_sc_debug, LOG_DEBUG,
-		      CFSTR("%sskipping SCNetworkReachability callback, no longer scheduled"),
-		      targetPrivate->log_prefix);
-		MUTEX_UNLOCK(&targetPrivate->lock);
-		return;
+	if (!isReachabilityTypeName(targetPrivate->type)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+	       return NULL;
 	}
 
-	// capture current state
-	memcpy(&reach_info, &targetPrivate->info, sizeof(ReachabilityInfo));
-
-	// callout
-	rlsFunction = targetPrivate->rlsFunction;
-	if (targetPrivate->rlsContext.retain != NULL) {
-		context_info	= (void *)(*targetPrivate->rlsContext.retain)(targetPrivate->rlsContext.info);
-		context_release	= targetPrivate->rlsContext.release;
-	} else {
-		context_info	= targetPrivate->rlsContext.info;
-		context_release	= NULL;
+	if (error_num) {
+		*error_num = 0;
 	}
 
-	// update last notification info
-	_reach_set(&targetPrivate->last_notify, &reach_info, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name);
-	(void)gettimeofday(&targetPrivate->last_push, NULL);
+	MUTEX_LOCK(&targetPrivate->lock);
 
-	MUTEX_UNLOCK(&targetPrivate->lock);
+	if (nw_array_get_count(targetPrivate->lastResolvedEndpoints) > 0) {
+		array = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
+		nw_array_apply(targetPrivate->lastResolvedEndpoints, ^bool(size_t index, nw_object_t object) {
+#pragma unused(index)
+			nw_endpoint_type_t endpoint_type = nw_endpoint_get_type((nw_endpoint_t)object);
+			if (endpoint_type == nw_endpoint_type_address) {
+				const struct sockaddr *address = nw_endpoint_get_address((nw_endpoint_t)object);
+				if (address == NULL) {
+					SC_log(LOG_ERR, "nw_endpoint_type_address w/no address");
+					return TRUE;
+				}
 
-	if (rlsFunction != NULL) {
-		(*rlsFunction)(target,
-			       reach_info.flags & kSCNetworkReachabilityFlagsMask,
-			       context_info);
-	}
+				CFDataRef addressData = CFDataCreate(kCFAllocatorDefault, (const uint8_t *)address, address->sa_len);
+				CFArrayAppendValue(array, addressData);
+				CFRelease(addressData);
+			} else if (endpoint_type == nw_endpoint_type_host) {
+				const char *host = nw_endpoint_get_hostname((nw_endpoint_t)object);
+				if (host == NULL) {
+					SC_log(LOG_ERR, "nw_endpoint_type_host w/no host");
+					return TRUE;
+				}
 
-	if (context_release != NULL) {
-		(*context_release)(context_info);
+				CFStringRef string = CFStringCreateWithCString(kCFAllocatorDefault, host, kCFStringEncodingASCII);
+				if (string == NULL) {
+					SC_log(LOG_ERR, "nw_endpoint_type_host w/non-ASCII host");
+					return TRUE;
+				}
+
+				if (CFStringHasPrefix(string,  CFSTR(".")) || CFStringHasSuffix(string,  CFSTR("."))) {
+					CFMutableStringRef mutableString = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, string);
+					CFRelease(string);
+					string = mutableString;
+					CFStringTrim(mutableString, CFSTR("."));
+				}
+				CFArrayAppendValue(array, string);
+				CFRelease(string);
+			} else {
+				SC_log(LOG_ERR, "unexpected nw_endpoint type: %d", endpoint_type);
+			}
+			return TRUE;
+		});
 	}
 
-	return;
+	MUTEX_UNLOCK(&targetPrivate->lock);
+	_SCErrorSet(kSCStatusOK);
+	return array;
 }
 
+#pragma mark -
+#pragma mark Reachability Flags
 
-/*
- * reachUpdate
- *
- * - caller must *not* be holding the target lock
- * - caller must be running on the __SCNetworkReachability_concurrent_queue()
- */
-static Boolean
-reachUpdate(SCNetworkReachabilityRef target)
+static void
+__SCNetworkReachabilityGetAgentVPNFlags(xpc_object_t dictionary, Boolean *vpn, Boolean *onDemand)
 {
-	uint64_t			cycle;
-	Boolean				defer		= FALSE;
-	Boolean				forced;
-	Boolean				ok;
-	ReachabilityInfo		reach_info	= NOT_REACHABLE;
-	ReachabilityStoreInfo		store_info;
-	Boolean				target_debug;
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-
-	target_debug = (_sc_debug && !targetPrivate->quiet);
+	const struct netagent *agent = NULL;
+	size_t length = 0;
 
-	if (target_debug) {
-		SCLog(TRUE, LOG_INFO, CFSTR("%schecking target reachability"),
-		      targetPrivate->log_prefix);
+	if (dictionary == NULL || vpn == NULL || onDemand == NULL) {
+		return;
 	}
 
+	*vpn = FALSE;
+	*onDemand = FALSE;
 
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (!targetPrivate->scheduled) {
-		// if not currently scheduled
-		MUTEX_UNLOCK(&targetPrivate->lock);
-		return FALSE;
+	agent = xpc_dictionary_get_data(dictionary, REACHABILITY_AGENT_DATA_KEY, &length);
+	if (agent == NULL || length < sizeof(struct netagent) || length != (sizeof(struct netagent) + agent->netagent_data_size)) {
+		return;
 	}
 
-	/* update reachability, notify if status changed */
-	ReachabilityStoreInfo_init(&store_info);
-	ok = __SCNetworkReachabilityGetFlags(&store_info, target, &reach_info, TRUE);
-	ReachabilityStoreInfo_free(&store_info);
-	if (!ok) {
-		/* if reachability status not available */
-		if (target_debug) {
-			SCLog(TRUE, LOG_INFO, CFSTR("%sflags not available"),
-			      targetPrivate->log_prefix);
+	if (strncmp(REACHABILITY_NETWORK_EXTENSION_AGENT_DOMAIN, agent->netagent_domain, NETAGENT_DOMAINSIZE) == 0) {
+		*vpn = TRUE;
+		if ((agent->netagent_flags & NETAGENT_FLAG_VOLUNTARY) &&
+		    !(agent->netagent_flags & NETAGENT_FLAG_ACTIVE)) {
+			*onDemand = TRUE;
 		}
-		reach_info = NOT_REACHABLE;
 	}
+}
 
-#if	!TARGET_OS_IPHONE
-	/*
-	 * We want to defer the notification if this is a maintenance wake *and*
-	 * the reachability flags that we would be reporting to the application
-	 * are better than those that we last reported.
-	 */
-	if (!systemIsAwake(power_capabilities)) {
-		/* if this is a maintenace wake */
-		reach_info.sleeping = TRUE;
-
-		if (rankReachability(reach_info.flags) >= rankReachability(targetPrivate->info.flags)) {
-			/*
-			 * don't report the change if the new reachability flags are
-			 * the same or "better"
-			 */
-			defer = !darkWakeNotify(target);
-		} else if (!__reach_changed(&targetPrivate->last_notify, &reach_info)) {
-			/*
-			 * if we have already posted this change
-			 */
-			defer = !darkWakeNotify(target);
-		}
-	}
-#endif	// !TARGET_OS_IPHONE
+static bool
+nw_path_is_linklocal_direct(nw_path_t path)
+{
+	bool is_linklocal_direct = false;
 
-	cycle = targetPrivate->cycle;
-	forced = ((cycle != 0) && (targetPrivate->info.cycle != cycle));
-
-	/*
-	 *	  (A)	  (B)	  (C)
-	 *	 reach		resolve
-	 *	changed	forced	pending
-	 *	=======	=======	=======
-	 *	   N	   N	   N	No change
-	 *	   N	   N	   Y	No change
-	 *	   N	   Y	   N	Change		(forced && !resolve pending)
-	 *	   N	   Y	   Y	No change	(suppress forced w/resolve pending)
-	 *	   Y	  N/A	  N/A	Change
-	 *	   Y	  N/A	  N/A	Change
-	 *	   Y	  N/A	  N/A	Change
-	 *	   Y	  N/A	  N/A	Change
-	 *
-	 *	Change    == A || (B && !C)
-	 *	No Change == !(A || (B && !C))
-	 *	No Change == !A && !(B && !C)
-	 *	No Change == !A && (!B || C)
-	 *	No Change == (!B || C) && !A
-	 */
-	if ((!forced || (reach_info.flags == kSCNetworkReachabilityFlagsFirstResolvePending))
-	    && !__reach_changed(&targetPrivate->info, &reach_info)) {
-		if (target_debug) {
-			if (targetPrivate->info.sleeping == reach_info.sleeping) {
-				SCLog(TRUE, LOG_INFO,
-				      CFSTR("%sflags/interface match (now 0x%08x/%u%s)%s%s"),
-				      targetPrivate->log_prefix,
-				      reach_info.flags,
-				      reach_info.if_index,
-				      reach_info.sleeping ? ", z" : "",
-				      defer ? ", deferred" : "",
-				      forced ? ", forced" : "");
-			} else {
-				SCLog(TRUE, LOG_INFO,
-				      CFSTR("%sflags/interface equiv (was 0x%08x/%u%s, now 0x%08x/%u%s)%s%s"),
-				      targetPrivate->log_prefix,
-				      targetPrivate->info.flags,
-				      targetPrivate->info.if_index,
-				      targetPrivate->info.sleeping ? ", z" : "",
-				      reach_info.flags,
-				      reach_info.if_index,
-				      reach_info.sleeping ? ", z" : "",
-				      defer ? ", deferred" : "",
-				      forced ? ", forced" : "");
-			}
-		}
-		MUTEX_UNLOCK(&targetPrivate->lock);
-		return FALSE;
+	nw_endpoint_t endpoint = nw_path_copy_endpoint(path);
+	if (endpoint == NULL) {
+		return false;
 	}
 
-	if (target_debug) {
-		SCLog(TRUE, LOG_INFO,
-		      CFSTR("%sflags/interface have changed (was 0x%08x/%u%s, now 0x%08x/%u%s)%s%s"),
-		      targetPrivate->log_prefix,
-		      targetPrivate->info.flags,
-		      targetPrivate->info.if_index,
-		      targetPrivate->info.sleeping ? ", z" : "",
-		      reach_info.flags,
-		      reach_info.if_index,
-		      reach_info.sleeping ? ", z" : "",
-		      defer ? ", deferred" : "",
-		      forced ? ", forced" : "");
-	}
+	if (nw_endpoint_get_type(endpoint) == nw_endpoint_type_address) {
+		const struct sockaddr_in *sin;
 
-	/* update flags / interface */
-	_reach_set(&targetPrivate->info, &reach_info, cycle, targetPrivate->if_index, targetPrivate->if_name);
+		sin = (const struct sockaddr_in *)(void *)nw_endpoint_get_address(endpoint);;
+		if ((sin != NULL) &&
+		    (sin->sin_family == AF_INET) &&
+		    IN_LINKLOCAL(ntohl(sin->sin_addr.s_addr))) {
+			nw_interface_t interface = nw_path_copy_interface(path);
 
-	/* as needed, defer the notification */
-	if (defer) {
-		MUTEX_UNLOCK(&targetPrivate->lock);
-		return FALSE;
-	}
+			if (interface != NULL) {
+				nw_interface_type_t type = nw_interface_get_type(interface);
+				if ((type == nw_interface_type_wired) ||
+				    ((type == nw_interface_type_wifi) &&
+				     (nw_interface_get_subtype(interface) != nw_interface_subtype_wifi_awdl))) {
+					is_linklocal_direct = true;
+				}
 
-	MUTEX_UNLOCK(&targetPrivate->lock);
+				nw_release(interface);
+			}
+		}
+	}
+
+	nw_release(endpoint);
+	return is_linklocal_direct;
+}
+
+static SCNetworkReachabilityFlags
+__SCNetworkReachabilityGetFlagsFromPath(nw_path_t			path,
+					ReachabilityAddressType		type,
+					nw_resolver_status_t		resolverStatus,
+					nw_array_t			resolvedEndpoints,
+					Boolean				resolvedEndpointUseFlags,
+					SCNetworkReachabilityFlags	resolvedEndpointFlags)
+{
+	__block SCNetworkReachabilityFlags flags = kSCNetworkReachabilityFlagsReachable;
+	__block const char *why = "???";
+	if (path != NULL) {
+		nw_path_status_t status = nw_path_get_status(path);
+		if (status == nw_path_status_satisfied) {
+			__block bool checkDNSFlags = TRUE;
+			flags = kSCNetworkReachabilityFlagsReachable;
+			why = "nw_path_status_satisfied";
+#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	// 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) {
+					xpc_dictionary_apply(agent_dictionary, ^bool(const char *key, xpc_object_t value) {
+#pragma unused(key)
+						Boolean vpn = FALSE;
+						Boolean onDemand = FALSE;
+						__SCNetworkReachabilityGetAgentVPNFlags(value, &vpn, &onDemand);
+						if (vpn) {
+							// VPN flows are transient
+							flags |= kSCNetworkReachabilityFlagsTransientConnection;
+							why = "nw_path_status_satisfied, VPN";
+						}
+						if (onDemand &&
+						    type == reachabilityTypeName &&
+						    resolverStatus == nw_resolver_status_complete &&
+						    nw_array_get_count(resolvedEndpoints) == 0) {
+							// On Demand by hostname, when no address has been resolved
+							flags |= (kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsConnectionOnDemand);
+							why = "nw_path_status_satisfied, OnDemand";
+							checkDNSFlags = FALSE;
+						}
+						return TRUE;
+					});
 
-	return TRUE;
+				}
+				xpc_release(agent_dictionary);
+			}
+			if (isReachabilityTypeName(type)) {
+				if (checkDNSFlags) {
+					if (resolverStatus == nw_resolver_status_complete &&
+					    nw_array_get_count(resolvedEndpoints) == 0) {
+						// DNS didn't resolve, as a final answer for now. Not reachable!
+						flags = 0;
+						why = "nw_path_status_satisfied, DNS not reachable";
+					} else if (resolvedEndpointUseFlags) {
+						flags = resolvedEndpointFlags;
+						why = "nw_path_status_satisfied, resolved endpoint flags";
+					}
+				}
+			} else {
+				if (nw_path_is_direct(path) || nw_path_is_linklocal_direct(path)) {
+					flags |= kSCNetworkReachabilityFlagsIsDirect;
+					why = "nw_path_status_satisfied, by address, direct";
+				}
+				if (nw_path_is_local(path)) {
+					flags |= kSCNetworkReachabilityFlagsIsLocalAddress;
+					why = "nw_path_status_satisfied, by address, local";
+				}
+			}
+		} else if (status == nw_path_status_unsatisfied) {
+			flags = 0;
+			why = "nw_path_status_unsatisfied";
+#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	// TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
+		} else if (status == nw_path_status_satisfiable) {
+			flags = (kSCNetworkReachabilityFlagsReachable | kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsTransientConnection);
+			why = "nw_path_status_satisfiable";
+			uuid_t vpn_uuid;
+			if (nw_path_get_vpn_config_id(path, &vpn_uuid)) {
+				flags |= kSCNetworkReachabilityFlagsConnectionOnDemand;
+				why = "nw_path_status_satisfiable, OnDemand";
+			}
+#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	// TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
+		}
+	}
+	SC_log(LOG_DEBUG, "__SCNetworkReachabilityGetFlagsFromPath, flags = 0x%08x, %s", flags, why);
+	return (flags & kSCNetworkReachabilityFlagsMask);
 }
 
+static nw_endpoint_t
+__SCNetworkReachabilityGetPrimaryEndpoint(SCNetworkReachabilityPrivateRef targetPrivate)
+{
+	if (targetPrivate->type == reachabilityTypeName) {
+		return targetPrivate->hostnameEndpoint;
+	} else if (targetPrivate->type == reachabilityTypeAddress ||
+		   targetPrivate->type == reachabilityTypeAddressPair ||
+		   targetPrivate->type == reachabilityTypePTR) {
+		return targetPrivate->remoteAddressEndpoint;
+	}
+	return NULL;
+}
 
-Boolean
-SCNetworkReachabilitySetCallback(SCNetworkReachabilityRef	target,
-				 SCNetworkReachabilityCallBack	callout,
-				 SCNetworkReachabilityContext	*context)
+int
+SCNetworkReachabilityGetInterfaceIndex(SCNetworkReachabilityRef target)
 {
-	SCNetworkReachabilityPrivateRef	targetPrivate = (SCNetworkReachabilityPrivateRef)target;
+	int				if_index	= -1;
+	Boolean				ok		= TRUE;
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
+	SCNetworkReachabilityFlags	flags		= 0;
+
+	if (!isA_SCNetworkReachability(target)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return if_index;
+	}
 
 	MUTEX_LOCK(&targetPrivate->lock);
 
-	if (targetPrivate->rlsContext.release != NULL) {
-		/* let go of the current context */
-		(*targetPrivate->rlsContext.release)(targetPrivate->rlsContext.info);
-	}
+	flags = __SCNetworkReachabilityGetFlagsFromPath(targetPrivate->lastPath,
+							targetPrivate->type,
+							nw_resolver_status_invalid,
+							NULL,
+							targetPrivate->lastResolvedEndpointHasFlags,
+							targetPrivate->lastResolvedEndpointFlags);
 
-	targetPrivate->rlsFunction   			= callout;
-	targetPrivate->rlsContext.info			= NULL;
-	targetPrivate->rlsContext.retain		= NULL;
-	targetPrivate->rlsContext.release		= NULL;
-	targetPrivate->rlsContext.copyDescription	= NULL;
-	if (context) {
-		bcopy(context, &targetPrivate->rlsContext, sizeof(SCNetworkReachabilityContext));
-		if (context->retain != NULL) {
-			targetPrivate->rlsContext.info = (void *)(*context->retain)(context->info);
+	/* Only return the if_index if the connection is reachable not for reachable connection
+	 * required etc ... */
+	if (ok && __SCNetworkReachabilityRank(flags) == ReachabilityRankReachable) {
+		if (targetPrivate->lastResolvedEndpointHasFlags) {
+			if_index = targetPrivate->lastResolvedEndpointInterfaceIndex;
+		} else {
+			if_index = nw_path_get_interface_index(targetPrivate->lastPath);
 		}
 	}
 
 	MUTEX_UNLOCK(&targetPrivate->lock);
-
-	return TRUE;
+	return if_index;
 }
 
-
-static CFStringRef
-reachRLSCopyDescription(const void *info)
+// CrazyIvan46 is the feature that allows connections to IPv4 literals on IPv6-only (NAT64+DNS64) networks to work
+// This function replaces the path when the initial one isn't satisfied and our target is an IPv4 literal
+// It tries IPv6 reachability instead in case we could synthesize another address to connect to
+static OS_OBJECT_RETURNS_RETAINED nw_path_t
+__SCNetworkReachabilityCreateCrazyIvan46Path(nw_path_t path, nw_endpoint_t endpoint,
+					     nw_parameters_t parameters, Boolean allow_resolution)
 {
-	SCNetworkReachabilityRef		target	= (SCNetworkReachabilityRef)info;
-
-	return CFStringCreateWithFormat(NULL,
-					NULL,
-					CFSTR(" {target = %p}"),
-					target);
-}
-
+	nw_path_t retPath = NULL;
+	const struct sockaddr *sa;
 
-static Boolean
-__SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef	target,
-					   CFRunLoopRef			runLoop,
-					   CFStringRef			runLoopMode,
-					   dispatch_queue_t		queue,
-					   Boolean			onDemand)
-{
-	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
-	Boolean				init		= FALSE;
-	__block Boolean			ok		= FALSE;
+	if ((nw_path_get_status(path) != nw_path_status_unsatisfied) ||
+	    (NULL == endpoint) || (nw_endpoint_get_type(endpoint) != nw_endpoint_type_address)) {
+		return NULL;
+	}
 
-	MUTEX_LOCK(&targetPrivate->lock);
+	sa = nw_endpoint_get_address(endpoint);
 
-	if ((targetPrivate->dispatchQueue != NULL) ||		// if we are already scheduled with a dispatch queue
-	    ((queue != NULL) && targetPrivate->scheduled)) {	// if we are already scheduled on a CFRunLoop
-		_SCErrorSet(kSCStatusInvalidArgument);
-		goto done;
+	if (sa->sa_family != AF_INET) {
+		return NULL;
 	}
 
-	if (!targetPrivate->serverBypass) {
-		if (!targetPrivate->serverActive) {
-
-			ok = __SCNetworkReachabilityServer_targetAdd(target);
-			if (!ok) {
-				targetPrivate->serverBypass = TRUE;
+	if (allow_resolution) {
+		uint32_t ifIndex = 0;
+		int32_t numPrefixes;
+		nw_nat64_prefix_t *prefixes = NULL;
+		struct sockaddr_in sin;
+
+		memcpy(&sin, sa, MIN(sizeof(sin), sa->sa_len));
+		if (NULL != parameters) {
+			ifIndex = nw_parameters_get_required_interface_index(parameters);
+		}
+		numPrefixes = nw_nat64_copy_prefixes(&ifIndex, &prefixes);
+		if (numPrefixes > 0) {
+			struct sockaddr_in6 synthesizedAddress = {
+				.sin6_len = sizeof(struct sockaddr_in6),
+				.sin6_family = AF_INET6,
+				.sin6_port = htons(nw_endpoint_get_port(endpoint)),
+				.sin6_flowinfo = 0,
+				.sin6_scope_id = 0
+			};
+			nw_endpoint_t synthesizedEndpoint;
+			nw_path_evaluator_t synthesizedEvaluator;
+			nw_path_t synthesizedPath;
+
+			nw_nat64_synthesize_v6(&prefixes[0], &sin.sin_addr, &synthesizedAddress.sin6_addr);
+			synthesizedEndpoint = nw_endpoint_create_address((const struct sockaddr *)&synthesizedAddress);
+			synthesizedEvaluator = nw_path_create_evaluator_for_endpoint(synthesizedEndpoint, parameters);
+			synthesizedPath = nw_path_evaluator_copy_path(synthesizedEvaluator);
+			if (nw_path_get_status(synthesizedPath) != nw_path_status_unsatisfied) {
+				retPath = synthesizedPath;
+				SC_log(LOG_INFO, "Using CrazyIvan46 synthesized reachability result");
+			} else {
+				nw_release(synthesizedPath);
 			}
+			nw_release(synthesizedEvaluator);
+			nw_release(synthesizedEndpoint);
 		}
+	} else {
+		// Don't synthesize in non-scheduled mode to avoid generating DNS traffic
+		nw_path_t v6Path;
+		nw_path_evaluator_t v6PathEvaluator;
+		nw_parameters_t v6Parameters;
 
-		if (targetPrivate->serverActive) {
-			if (targetPrivate->scheduled) {
-				// if already scheduled
-				goto watch;
-			}
-
-			ok = __SCNetworkReachabilityServer_targetSchedule(target);
-			if (!ok) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("__SCNetworkReachabilityScheduleWithRunLoop _targetMonitor() failed"));
-				_SCErrorSet(kSCStatusFailed);
-				goto done;
-			}
-
-			goto watch;
+		if (NULL != parameters) {
+			v6Parameters = nw_parameters_copy(parameters);
+		} else {
+			v6Parameters = nw_parameters_create();
+		}
+		nw_parameters_set_required_address_family(v6Parameters, AF_INET6);
+		v6PathEvaluator = nw_path_create_evaluator_for_endpoint(NULL, v6Parameters);
+		v6Path = nw_path_evaluator_copy_path(v6PathEvaluator);
+		if (nw_path_get_status(v6Path) != nw_path_status_unsatisfied) {
+			retPath = v6Path;
+			SC_log(LOG_INFO, "Using CrazyIvan46 simple reachability result");
+		} else {
+			nw_release(v6Path);
 		}
+		nw_release(v6PathEvaluator);
+		nw_release(v6Parameters);
 	}
+	return retPath;
+}
 
-	/* schedule the SCNetworkReachability did-something-change handler */
-
-	dispatch_sync(_hn_target_queue(), ^{
-		ok = FALSE;
-
-		if (!onDemand && (hn_store == NULL)) {
-			CFMutableArrayRef	keys;
-			CFMutableArrayRef	patterns;
-			Boolean			watch_dns_configuration		= FALSE;
-			Boolean			watch_dns_changes		= FALSE;
-			Boolean			watch_nwi			= FALSE;
-			Boolean			watch_onDemand_networking	= FALSE;
-#if	!TARGET_OS_IPHONE
-			Boolean			watch_power			= FALSE;
-#endif	// !TARGET_OS_IPHONE
-
-			hn_store = SCDynamicStoreCreate(NULL,
-							CFSTR("SCNetworkReachability"),
-							__SCNetworkReachabilityHandleStoreChanges,
-							NULL);
-			if (hn_store == NULL) {
-				SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreCreate() failed"));
-				return;
-			}
-
-			ReachabilityStoreInfo_keys(&keys, &patterns);
-			CFArrayAppendValue(keys, SCNETWORKREACHABILITY_TRIGGER_KEY);	// force posting reach change
-			ok = SCDynamicStoreSetNotificationKeys(hn_store, keys, patterns);
-			CFRelease(keys);
-			CFRelease(patterns);
-			if (!ok) {
-				SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed"));
-				CFRelease(hn_store);
-				hn_store = NULL;
-				return;
-			}
+Boolean
+SCNetworkReachabilityGetFlags(SCNetworkReachabilityRef		target,
+			      SCNetworkReachabilityFlags	*flags)
+{
+	nw_path_t			crazyIvanPath;
+	nw_endpoint_t			endpoint;
+	Boolean				ok		= TRUE;
+	nw_path_t			path;
+	nw_path_evaluator_t		pathEvaluator;
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-			ok = SCDynamicStoreSetDispatchQueue(hn_store, _hn_changes_queue());
-			if (!ok) {
-				SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreSetDispatchQueue() failed"));
-				CFRelease(hn_store);
-				hn_store = NULL;
-				return;
-			}
+	if (!isA_SCNetworkReachability(target)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
 
-			// watch for network information changes
-			watch_nwi = nwi_refresh_enable(_hn_changes_queue());
-			if (!watch_nwi) {
-				goto fail;
-			}
+	MUTEX_LOCK(&targetPrivate->lock);
 
-			// watch for DNS configuration (resolver reachability) changes
-			watch_dns_configuration = dns_configuration_watch();
-			if (!watch_dns_configuration) {
-				goto fail;
-			}
+	if (targetPrivate->scheduled) {
+		// if being watched, return the last known (and what should be current) status
+		*flags = __SCNetworkReachabilityGetFlagsFromPath(targetPrivate->lastPath,
+								 targetPrivate->type,
+								 targetPrivate->lastResolverStatus,
+								 targetPrivate->lastResolvedEndpoints,
+								 targetPrivate->lastResolvedEndpointHasFlags,
+								 targetPrivate->lastResolvedEndpointFlags);
+		// because we have synchronously captured the current status, we no longer
+		// need our by-name required callback
+		targetPrivate->sentFirstUpdate = TRUE;
+		goto done;
+	}
 
-			// watch for changes affecting DNS queries
-			watch_dns_changes = dns_refresh_enable(_hn_changes_queue());
-			if (!watch_dns_changes) {
-				goto fail;
-			}
+	// Not being watched, so run a one-shot path evaluator
+	// We don't care about DNS resolution in this case, since we only need to have the
+	// DNS resolution to support clients watching reachability to get updates
+	endpoint = __SCNetworkReachabilityGetPrimaryEndpoint(targetPrivate);
+	pathEvaluator = nw_path_create_evaluator_for_endpoint(endpoint, targetPrivate->parameters);
+	path = nw_path_evaluator_copy_path(pathEvaluator);
 
-#if	!TARGET_OS_IPHONE
-			// watch for power capabilities (sleep/wake) changes
-			watch_power = power_refresh_enable(_hn_changes_queue());
-			if (!watch_power) {
-				goto fail;
-			}
-#endif	// !TARGET_OS_IPHONE
+	if (isReachabilityTypeAddress(targetPrivate->type)) {
+		crazyIvanPath = __SCNetworkReachabilityCreateCrazyIvan46Path(path, endpoint,
+									     targetPrivate->parameters, FALSE);
+		if (NULL != crazyIvanPath) {
+			nw_release(path);
+			path = crazyIvanPath;
+		}
+	}
 
-			// watch for OnDemand network changes
-			watch_onDemand_networking = onDemand_refresh_enable(_hn_changes_queue());
-			if (!watch_onDemand_networking) {
-				goto fail;
-			}
+	*flags = __SCNetworkReachabilityGetFlagsFromPath(path, 0, nw_resolver_status_invalid, NULL, FALSE, 0);
+	nw_release(path);
+	nw_release(pathEvaluator);
 
+    done :
 
+	MUTEX_UNLOCK(&targetPrivate->lock);
+	return ok;
+}
 
-			hn_targets = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
-			ReachabilityStoreInfo_enable(TRUE);
 
-			goto scheduled;
+#pragma mark -
+#pragma mark Notifications
 
-		    fail :
+static void
+reachPerformAndUnlock(SCNetworkReachabilityPrivateRef targetPrivate)
+{
+	void				*context_info;
+	void				(*context_release)(const void *);
+	SCNetworkReachabilityCallBack	rlsFunction;
+	SCNetworkReachabilityFlags	flags		= 0;
 
-			ok = FALSE;
+	if (!targetPrivate->scheduled) {
+		// if no longer scheduled
+		SC_log(LOG_INFO, "%sskipping SCNetworkReachability callback, no longer scheduled",
+		       targetPrivate->log_prefix);
+		MUTEX_UNLOCK(&targetPrivate->lock);
+		return;
+	}
 
+	// callout
+	rlsFunction = targetPrivate->rlsFunction;
+	if (targetPrivate->rlsContext.retain != NULL) {
+		context_info	= (void *)(*targetPrivate->rlsContext.retain)(targetPrivate->rlsContext.info);
+		context_release	= targetPrivate->rlsContext.release;
+	} else {
+		context_info	= targetPrivate->rlsContext.info;
+		context_release	= NULL;
+	}
 
+	flags = __SCNetworkReachabilityGetFlagsFromPath(targetPrivate->lastPath,
+							targetPrivate->type,
+							targetPrivate->lastResolverStatus,
+							targetPrivate->lastResolvedEndpoints,
+							targetPrivate->lastResolvedEndpointHasFlags,
+							targetPrivate->lastResolvedEndpointFlags);
 
-			if (watch_onDemand_networking) {
-				onDemand_refresh_disable();
-			}
+	MUTEX_UNLOCK(&targetPrivate->lock);
 
-#if	!TARGET_OS_IPHONE
-			if (watch_power) {
-				power_refresh_disable();
-			}
-#endif	// !TARGET_OS_IPHONE
+	if (rlsFunction != NULL) {
+		SC_log(LOG_DEBUG, "%sexec SCNetworkReachability callout w/flags = 0x%08x",
+		       targetPrivate->log_prefix,
+		       flags);
+		(*rlsFunction)((SCNetworkReachabilityRef)targetPrivate,
+			       flags,
+			       context_info);
+	}
 
-			if (watch_dns_changes) {
-				dns_refresh_disable();
-			}
+	if (context_release != NULL) {
+		(*context_release)(context_info);
+	}
 
-			if (watch_dns_configuration) {
-				dns_configuration_unwatch();
-			}
+	return;
+}
 
-			if (watch_nwi) {
-				nwi_refresh_disable();
-			}
+static void
+reachPerform(void *info)
+{
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)info;
 
-			SCDynamicStoreSetDispatchQueue(hn_store, NULL);
-			CFRelease(hn_store);
-			hn_store = NULL;
+	MUTEX_LOCK(&targetPrivate->lock);
+	reachPerformAndUnlock(targetPrivate);
 
-			_SCErrorSet(kSCStatusFailed);
+}
 
-			return;
+static void
+reachUpdateAndUnlock(SCNetworkReachabilityPrivateRef targetPrivate)
+{
+	targetPrivate->sentFirstUpdate = TRUE;
+	if (targetPrivate->rls != NULL) {
+		if (targetPrivate->rlList != NULL) {
+			CFRunLoopSourceSignal(targetPrivate->rls);
+			_SC_signalRunLoop(targetPrivate, targetPrivate->rls, targetPrivate->rlList);
 		}
+		MUTEX_UNLOCK(&targetPrivate->lock);
+	} else {
+		reachPerformAndUnlock(targetPrivate);
+	}
+}
 
-	    scheduled :
+Boolean
+SCNetworkReachabilitySetCallback(SCNetworkReachabilityRef	target,
+				 SCNetworkReachabilityCallBack	callout,
+				 SCNetworkReachabilityContext	*context)
+{
+	SCNetworkReachabilityPrivateRef	targetPrivate = (SCNetworkReachabilityPrivateRef)target;
 
-		CFSetAddValue(hn_targets, target);
+	MUTEX_LOCK(&targetPrivate->lock);
 
-		ok = TRUE;
-	});
+	if (targetPrivate->rlsContext.release != NULL) {
+		/* let go of the current context */
+		(*targetPrivate->rlsContext.release)(targetPrivate->rlsContext.info);
+	}
 
-	if (!ok) {
-		goto done;
+	targetPrivate->rlsFunction   			= callout;
+	targetPrivate->rlsContext.info			= NULL;
+	targetPrivate->rlsContext.retain		= NULL;
+	targetPrivate->rlsContext.release		= NULL;
+	targetPrivate->rlsContext.copyDescription	= NULL;
+	if (context) {
+		memcpy(&targetPrivate->rlsContext, context, sizeof(SCNetworkReachabilityContext));
+		if (context->retain != NULL) {
+			targetPrivate->rlsContext.info = (void *)(*context->retain)(context->info);
+		}
 	}
 
-    watch :
+	MUTEX_UNLOCK(&targetPrivate->lock);
 
-	if (!targetPrivate->scheduled) {
-		CFRunLoopSourceContext	context = { 0				// version
-						  , (void *)target		// info
-						  , CFRetain			// retain
-						  , CFRelease			// release
-						  , reachRLSCopyDescription	// copyDescription
-						  , CFEqual			// equal
-						  , CFHash			// hash
-						  , NULL			// schedule
-						  , NULL			// cancel
-						  , reachPerform		// perform
-						  };
-
-		if (runLoop != NULL) {
-			targetPrivate->rls    = CFRunLoopSourceCreate(NULL, 0, &context);
-			targetPrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
-		}
+	return TRUE;
+}
 
-		if (isReachabilityTypeName(targetPrivate->type)) {
-			/*
-			 * we're now scheduled so let's ensure that we
-			 * are starting with a clean slate before we
-			 * resolve the name
-			 */
-			if (targetPrivate->resolvedAddresses != NULL) {
-				CFRelease(targetPrivate->resolvedAddresses);
-				targetPrivate->resolvedAddresses = NULL;
-			}
-			targetPrivate->resolvedError = NETDB_SUCCESS;
-			targetPrivate->needResolve = TRUE;
-			_reach_set(&targetPrivate->info,
-				   &NOT_REACHABLE,
-				   targetPrivate->info.cycle,
-				   targetPrivate->if_index,
-				   targetPrivate->if_name);
-			targetPrivate->info.flags |= kSCNetworkReachabilityFlagsFirstResolvePending;
-			_reach_set(&targetPrivate->serverInfo,
-				   &NOT_REACHABLE,
-				   targetPrivate->serverInfo.cycle,
-				   targetPrivate->if_index,
-				   targetPrivate->if_name);
-			targetPrivate->serverInfo.flags |= kSCNetworkReachabilityFlagsFirstResolvePending;
-		}
 
+static CFStringRef
+reachRLSCopyDescription(const void *info)
+{
+	SCNetworkReachabilityRef		target	= (SCNetworkReachabilityRef)info;
 
-		targetPrivate->scheduled = TRUE;
+	return CFStringCreateWithFormat(NULL,
+					NULL,
+					CFSTR(" {target = %p}"),
+					target);
+}
 
-		init = TRUE;
+Boolean
+SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef	target,
+					 CFRunLoopRef			runLoop,
+					 CFStringRef			runLoopMode)
+{
+	Boolean				success = FALSE;
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
+	if (!isA_SCNetworkReachability(target) || (runLoop == NULL) || (runLoopMode == NULL)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
 	}
 
-	if (queue != NULL) {
-		// retain dispatch queue
-		dispatch_retain(queue);
-		targetPrivate->dispatchQueue = queue;
-
-		//
-		// We've taken a reference to the client's dispatch_queue and we
-		// want to hold on to that reference until we've processed any/all
-		// notifications.  To facilitate this we create a group, dispatch
-		// any notification blocks to via that group, and when the caller
-		// has told us to stop the notifications (unschedule) we wait for
-		// the group to empty and use the group's finalizer to release
-		// our reference to the client's queue.
-		//
-
-		// make sure that we have group to track any async requests
-		targetPrivate->dispatchGroup = dispatch_group_create();
-
-		// retain the target ... and release it when the group is released
-		CFRetain(target);
-		dispatch_set_context(targetPrivate->dispatchGroup, (void *)target);
-		dispatch_set_finalizer_f(targetPrivate->dispatchGroup, (dispatch_function_t)CFRelease);
-	} else {
-		if (!_SC_isScheduled(NULL, runLoop, runLoopMode, targetPrivate->rlList)) {
-			/*
-			 * if we do not already have host notifications scheduled with
-			 * this runLoop / runLoopMode
-			 */
-			CFRunLoopAddSource(runLoop, targetPrivate->rls, runLoopMode);
-		}
+	MUTEX_LOCK(&targetPrivate->lock);
 
-		_SC_schedule(target, runLoop, runLoopMode, targetPrivate->rlList);
-	}
+	if (targetPrivate->scheduled) {
+		if (targetPrivate->rls != NULL && targetPrivate->rlList != NULL) {
+			if (!_SC_isScheduled(NULL, runLoop, runLoopMode, targetPrivate->rlList)) {
+				/*
+				 * if we do not already have host notifications scheduled with
+				 * this runLoop / runLoopMode
+				 */
+				CFRunLoopAddSource(runLoop, targetPrivate->rls, runLoopMode);
+			}
 
-	if (init) {
-		ReachabilityInfo	reach_info	= NOT_REACHABLE;
-		ReachabilityStoreInfo	store_info;
+			_SC_schedule(target, runLoop, runLoopMode, targetPrivate->rlList);
 
-		/*
-		 * if we have yet to schedule SC notifications for this address
-		 * - initialize current reachability status
-		 */
-		ReachabilityStoreInfo_init(&store_info);
-		if (__SCNetworkReachabilityGetFlags(&store_info, target, &reach_info, TRUE)) {
-			/*
-			 * if reachability status available
-			 * - set flags
-			 * - schedule notification to report status via callback
-			 */
-			reach_info.flags |= (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending);
-			_reach_set(&targetPrivate->info,
-				   &reach_info,
-				   targetPrivate->cycle,
-				   targetPrivate->if_index,
-				   targetPrivate->if_name);
-			__SCNetworkReachabilityUpdate(target);
+			MUTEX_UNLOCK(&targetPrivate->lock);
+			return TRUE;
 		} else {
-			/* if reachability status not available, async lookup started */
-			_reach_set(&targetPrivate->info,
-				   &NOT_REACHABLE,
-				   targetPrivate->cycle,
-				   targetPrivate->if_index,
-				   targetPrivate->if_name);
-			_reach_set(&targetPrivate->serverInfo,
-				   &NOT_REACHABLE,
-				   targetPrivate->cycle,
-				   targetPrivate->if_index,
-				   targetPrivate->if_name);
+			MUTEX_UNLOCK(&targetPrivate->lock);
+			_SCErrorSet(kSCStatusInvalidArgument);
+			return FALSE;
 		}
-		ReachabilityStoreInfo_free(&store_info);
 	}
 
-	if (targetPrivate->onDemandServer != NULL) {
-		__SCNetworkReachabilityScheduleWithRunLoop(targetPrivate->onDemandServer, runLoop, runLoopMode, queue, TRUE);
-	}
-
-	SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%sscheduled"),
-	      targetPrivate->log_prefix);
+	CFRunLoopSourceContext	context = {
+		0				// version
+		, (void *)target		// info
+		, CFRetain			// retain
+		, CFRelease			// release
+		, reachRLSCopyDescription	// copyDescription
+		, CFEqual			// equal
+		, CFHash			// hash
+		, NULL				// schedule
+		, NULL				// cancel
+		, reachPerform			// perform
+	};
 
-	ok = TRUE;
+	targetPrivate->rls    = CFRunLoopSourceCreate(NULL, 0, &context);
+	targetPrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 
-    done :
+	if (!_SC_isScheduled(NULL, runLoop, runLoopMode, targetPrivate->rlList)) {
+		/*
+		 * if we do not already have host notifications scheduled with
+		 * this runLoop / runLoopMode
+		 */
+		CFRunLoopAddSource(runLoop, targetPrivate->rls, runLoopMode);
+	}
+
+	_SC_schedule(target, runLoop, runLoopMode, targetPrivate->rlList);
+
+	success = __SCNetworkReachabilitySetDispatchQueue(targetPrivate, _callback_queue());
+	if (!success) {
+		if (_SC_unschedule(target, runLoop, runLoopMode, targetPrivate->rlList, FALSE)) {
+			CFIndex n = CFArrayGetCount(targetPrivate->rlList);
+			if ((n == 0) || !_SC_isScheduled(NULL, runLoop, runLoopMode, targetPrivate->rlList)) {
+				// if target is no longer scheduled for this runLoop / runLoopMode
+				CFRunLoopRemoveSource(runLoop, targetPrivate->rls, runLoopMode);
+				if (n == 0) {
+					// if *all* notifications have been unscheduled
+					CFRelease(targetPrivate->rlList);
+					targetPrivate->rlList = NULL;
+					CFRunLoopSourceInvalidate(targetPrivate->rls);
+					CFRelease(targetPrivate->rls);
+					targetPrivate->rls = NULL;
+				}
+			}
+		}
+	}
 
 	MUTEX_UNLOCK(&targetPrivate->lock);
-	return ok;
+	return success;
 }
 
-
-static Boolean
-__SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef	target,
-					     CFRunLoopRef		runLoop,
-					     CFStringRef		runLoopMode,
-					     Boolean			onDemand)
+Boolean
+SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef	target,
+					   CFRunLoopRef			runLoop,
+					   CFStringRef			runLoopMode)
 {
-	dispatch_group_t		drainGroup	= NULL;
-	dispatch_queue_t		drainQueue	= NULL;
-	CFIndex				n		= 0;
-	Boolean				ok		= FALSE;
+	Boolean				success = FALSE;
+	Boolean				unscheduleDispatchQueue = FALSE;
 	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
 
-	// hold a reference while we unschedule
-	CFRetain(target);
-
-	MUTEX_LOCK(&targetPrivate->lock);
-
-	if (((runLoop == NULL) && (targetPrivate->dispatchQueue == NULL)) ||	// if we should be scheduled on a dispatch queue (but are not)
-	    ((runLoop != NULL) && (targetPrivate->dispatchQueue != NULL))) {	// if we should be scheduled on a CFRunLoop (but are not)
+	if (!isA_SCNetworkReachability(target) || (runLoop == NULL) || (runLoopMode == NULL)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
-		goto done;
+		return FALSE;
 	}
 
-	if (!targetPrivate->scheduled) {
-		// if not currently scheduled
+	MUTEX_LOCK(&targetPrivate->lock);
+
+	if (targetPrivate->rlList == NULL || targetPrivate->rls == NULL || !targetPrivate->scheduled) {
+		MUTEX_UNLOCK(&targetPrivate->lock);
 		_SCErrorSet(kSCStatusInvalidArgument);
-		goto done;
+		return FALSE;
 	}
 
-	// unschedule the target specific sources
-	if (targetPrivate->dispatchQueue != NULL) {
-		if (targetPrivate->onDemandServer != NULL) {
-			SCNetworkReachabilitySetCallback(targetPrivate->onDemandServer, NULL, NULL);
-			__SCNetworkReachabilityUnscheduleFromRunLoop(targetPrivate->onDemandServer, NULL, NULL, TRUE);
-		}
-
-		// save dispatchQueue, release reference when we've queue'd blocks complete, allow re-scheduling
-		drainGroup = targetPrivate->dispatchGroup;
-		targetPrivate->dispatchGroup = NULL;
-		drainQueue = targetPrivate->dispatchQueue;
-		targetPrivate->dispatchQueue = NULL;
-	} else {
-		if (!_SC_unschedule(target, runLoop, runLoopMode, targetPrivate->rlList, FALSE)) {
-			// if not currently scheduled
-			_SCErrorSet(kSCStatusInvalidArgument);
-			goto done;
-		}
-
-		if (targetPrivate->onDemandServer != NULL) {
-			__SCNetworkReachabilityUnscheduleFromRunLoop(targetPrivate->onDemandServer, runLoop, runLoopMode, TRUE);
-		}
-
-		n = CFArrayGetCount(targetPrivate->rlList);
+	if (_SC_unschedule(target, runLoop, runLoopMode, targetPrivate->rlList, FALSE)) {
+		CFIndex n = CFArrayGetCount(targetPrivate->rlList);
 		if ((n == 0) || !_SC_isScheduled(NULL, runLoop, runLoopMode, targetPrivate->rlList)) {
 			// if target is no longer scheduled for this runLoop / runLoopMode
 			CFRunLoopRemoveSource(runLoop, targetPrivate->rls, runLoopMode);
-
 			if (n == 0) {
 				// if *all* notifications have been unscheduled
-				if (targetPrivate->onDemandServer != NULL) {
-					SCNetworkReachabilitySetCallback(targetPrivate->onDemandServer, NULL, NULL);
-				}
+				unscheduleDispatchQueue = TRUE;
 				CFRelease(targetPrivate->rlList);
 				targetPrivate->rlList = NULL;
 				CFRunLoopSourceInvalidate(targetPrivate->rls);
@@ -5987,147 +1615,338 @@ __SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef	target,
 		}
 	}
 
-	if (n == 0) {
-		//
-		// Cancel our request for server monitoring
-		//
-		if (targetPrivate->serverActive) {
-			ok = __SCNetworkReachabilityServer_targetUnschedule(target);
-			if (!ok) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("__SCNetworkReachabilityUnscheduleFromRunLoop _targetMonitor() failed"));
-				_SCErrorSet(kSCStatusFailed);
-			}
-		}
-
-		// if *all* notifications have been unscheduled
-		targetPrivate->scheduled = FALSE;
+	if (unscheduleDispatchQueue) {
+		success = __SCNetworkReachabilitySetDispatchQueue(targetPrivate, NULL);
+	} else {
+		success = TRUE;
 	}
+	MUTEX_UNLOCK(&targetPrivate->lock);
+	return success;
+}
 
-	if (targetPrivate->serverActive) {
-		goto unwatch;
+static __inline__ void
+__SCNetworkReachabilityCopyPathStatus(SCNetworkReachabilityPrivateRef targetPrivate, SCNetworkReachabilityFlags *flags, uint *ifIndex, size_t *endpointCount)
+{
+	if (flags) {
+		*flags = __SCNetworkReachabilityGetFlagsFromPath(targetPrivate->lastPath,
+								 targetPrivate->type,
+								 targetPrivate->lastResolverStatus,
+								 targetPrivate->lastResolvedEndpoints,
+								 targetPrivate->lastResolvedEndpointHasFlags,
+								 targetPrivate->lastResolvedEndpointFlags);
 	}
+	if (ifIndex) {
+		*ifIndex = nw_path_get_interface_index(targetPrivate->lastPath);
+	}
+	if (endpointCount) {
+		*endpointCount = nw_array_get_count(targetPrivate->lastResolvedEndpoints);
+	}
+	return;
+}
 
-	if (n == 0) {
-		if (targetPrivate->dnsActive) {
-			// if we have an active [m]DNS query
-			dequeueDNSQuery(target);
-		}
-
-		dispatch_sync(_hn_target_queue(), ^{
-			CFSetRemoveValue(hn_targets, target);
+static __inline__ Boolean
+__SCNetworkReachabilityShouldUpdateClient(SCNetworkReachabilityPrivateRef targetPrivate, SCNetworkReachabilityFlags oldFlags, uint oldIFIndex, size_t oldEndpointCount)
+{
+	SCNetworkReachabilityFlags newFlags = 0;
+	uint newIFIndex = 0;
+	size_t newEndpointCount = 0;
+	__SCNetworkReachabilityCopyPathStatus(targetPrivate, &newFlags, &newIFIndex, &newEndpointCount);
+	return (!targetPrivate->sentFirstUpdate ||
+		oldFlags != newFlags ||
+		oldIFIndex != newIFIndex ||
+		oldEndpointCount != newEndpointCount);
+}
 
-			if (onDemand) {
-				return;
+static void
+__SCNetworkReachabilityRestartResolver(SCNetworkReachabilityPrivateRef targetPrivate)
+{
+	if (targetPrivate &&
+	    !targetPrivate->resolverBypass &&
+	    isReachabilityTypeName(targetPrivate->type)) {
+		nw_resolver_t resolver;
+		CFRetain(targetPrivate);
+		if (NULL != targetPrivate->resolver) {
+			nw_resolver_cancel(targetPrivate->resolver);
+		}
+		if (targetPrivate->lastPath != NULL) {
+			resolver = nw_resolver_create_with_path(targetPrivate->lastPath);
+		} else {
+			resolver = nw_resolver_create_with_endpoint(__SCNetworkReachabilityGetPrimaryEndpoint(targetPrivate), targetPrivate->lastPathParameters ? targetPrivate->lastPathParameters : targetPrivate->parameters);
+		}
+		if (resolver == NULL) {
+			SC_log(LOG_ERR, "%sfailed to create a nw_resolver", targetPrivate->log_prefix);
+			targetPrivate->resolver = NULL;
+			CFRelease(targetPrivate);
+			return;
+		}
+		targetPrivate->resolver = resolver;
+		nw_resolver_set_cancel_handler(resolver, ^(void) {
+			MUTEX_LOCK(&targetPrivate->lock);
+			if (resolver == targetPrivate->resolver) {
+				targetPrivate->resolver = NULL;
 			}
+			nw_release(resolver);
+			MUTEX_UNLOCK(&targetPrivate->lock);
+			CFRelease(targetPrivate);
+		});
+		if (!nw_resolver_set_update_handler(resolver, targetPrivate->dispatchQueue, ^(nw_resolver_status_t status, nw_array_t resolved_endpoints) {
+			MUTEX_LOCK(&targetPrivate->lock);
+			if (targetPrivate->scheduled) {
+				SCNetworkReachabilityFlags oldFlags = 0;
+				uint oldIFIndex = 0;
+				size_t oldEndpointCount = 0;
+				__SCNetworkReachabilityCopyPathStatus(targetPrivate, &oldFlags, &oldIFIndex, &oldEndpointCount);
+
+				targetPrivate->lastResolverStatus = status;
+				nw_release(targetPrivate->lastResolvedEndpoints);
+				targetPrivate->lastResolvedEndpoints = nw_retain(resolved_endpoints);
+
+				// Run path evaluation on the resolved endpoints
+				__block Boolean hasFlags = FALSE;
+				targetPrivate->lastResolvedEndpointHasFlags = FALSE;
+				targetPrivate->lastResolvedEndpointFlags = 0;
+				targetPrivate->lastResolvedEndpointInterfaceIndex = 0;
+				nw_array_apply(targetPrivate->lastResolvedEndpoints, ^bool(size_t index, nw_object_t object) {
+#pragma unused(index)
+					SCNetworkReachabilityFlags flags = 0;
+					uint interfaceIndex = 0;
+					ReachabilityRankType rank;
+					nw_endpoint_t resolvedEndpoint = (nw_endpoint_t)object;
+					nw_path_evaluator_t pathEvaluator = nw_path_create_evaluator_for_endpoint(resolvedEndpoint, targetPrivate->lastPathParameters ? targetPrivate->lastPathParameters : targetPrivate->parameters);
+					nw_path_t path = nw_path_evaluator_copy_path(pathEvaluator);
+					if (path != NULL) {
+						flags = __SCNetworkReachabilityGetFlagsFromPath(path, 0, nw_resolver_status_invalid, NULL, FALSE, 0);
+						hasFlags = TRUE;
+					}
+					interfaceIndex = nw_path_get_interface_index(path);
+					nw_release(path);
+					nw_release(pathEvaluator);
+
+					rank = __SCNetworkReachabilityRank(flags);
+					if (rank > __SCNetworkReachabilityRank(targetPrivate->lastResolvedEndpointFlags)) {
+						// Return the best case result
+						targetPrivate->lastResolvedEndpointFlags = flags;
+						targetPrivate->lastResolvedEndpointInterfaceIndex = interfaceIndex;
+						if (rank == ReachabilityRankReachable) {
+							// Can't get any better than REACHABLE
+							return FALSE;
+						}
+					}
+					return TRUE;
+				});
+				targetPrivate->lastResolvedEndpointHasFlags = hasFlags;
 
-			if (CFSetGetCount(hn_targets) > 0) {
-				return;
+				if (__SCNetworkReachabilityShouldUpdateClient(targetPrivate, oldFlags, oldIFIndex, oldEndpointCount)) {
+					reachUpdateAndUnlock(targetPrivate);
+				} else {
+					MUTEX_UNLOCK(&targetPrivate->lock);
+				}
+			} else {
+				MUTEX_UNLOCK(&targetPrivate->lock);
 			}
+		})) {
+			nw_release(resolver);
+			targetPrivate->resolver = NULL;
+			CFRelease(targetPrivate);
+		}
+	}
+}
+
+static Boolean
+__SCNetworkReachabilitySetDispatchQueue(SCNetworkReachabilityPrivateRef	targetPrivate,
+					dispatch_queue_t		queue)
+{
+	Boolean	ok	= FALSE;
 
-			// if we are no longer monitoring any targets
-			SCDynamicStoreSetDispatchQueue(hn_store, NULL);
-			CFRelease(hn_store);
-			hn_store = NULL;
-			CFRelease(hn_targets);
-			hn_targets = NULL;
+	if (queue != NULL) {
+		nw_path_t		crazyIvanPath;
+		nw_endpoint_t		endpoint;
+		nw_path_evaluator_t	pathEvaluator;
 
-			ReachabilityStoreInfo_enable(FALSE);
-			ReachabilityStoreInfo_save(NULL);
+		if ((targetPrivate->dispatchQueue != NULL) ||		// if we are already scheduled with a dispatch queue
+		    ((queue != NULL) && targetPrivate->scheduled)) {	// if we are already scheduled on a CFRunLoop
+			_SCErrorSet(kSCStatusInvalidArgument);
+			goto done;
+		}
 
-			/*
-			 * until we start monitoring again, ensure that
-			 * any resources associated with watching network
-			 * and configuration changes have been released.
-			 */
+		SC_log(LOG_DEBUG, "%sscheduled", targetPrivate->log_prefix);
 
+		// retain dispatch queue
+		dispatch_retain(queue);
+		nw_path_evaluator_cancel(targetPrivate->pathEvaluator);
+		endpoint = __SCNetworkReachabilityGetPrimaryEndpoint(targetPrivate);
+		pathEvaluator = nw_path_create_evaluator_for_endpoint(endpoint, targetPrivate->parameters);
+		targetPrivate->pathEvaluator = pathEvaluator;
+		targetPrivate->dispatchQueue = queue;
+		targetPrivate->scheduled = TRUE;
+		if (isReachabilityTypeName(targetPrivate->type)) {
+			// we must have at least one callback for by-name queries
+			targetPrivate->sentFirstUpdate = FALSE;
+		} else {
+			targetPrivate->sentFirstUpdate = TRUE;
+		}
 
-			// OnDemand configuration
-			onDemand_refresh_disable();
+		nw_release(targetPrivate->lastPath);
+		targetPrivate->lastPath = nw_path_evaluator_copy_path(pathEvaluator);
 
-#if	!TARGET_OS_IPHONE
-			// sleep/wake & power capabilities
-			power_refresh_disable();
-#endif	// !TARGET_OS_IPHONE
+		if (isReachabilityTypeAddress(targetPrivate->type)) {
+			crazyIvanPath = __SCNetworkReachabilityCreateCrazyIvan46Path(targetPrivate->lastPath, endpoint,
+										     targetPrivate->parameters, FALSE);
+			if (NULL != crazyIvanPath) {
+				nw_release(targetPrivate->lastPath);
+				targetPrivate->lastPath = crazyIvanPath;
+			}
+		}
 
-			// outstanding DNS queries
-			dns_refresh_disable();
+		nw_release(targetPrivate->lastPathParameters);
+		targetPrivate->lastPathParameters = nw_path_copy_derived_parameters(targetPrivate->lastPath);
 
-			// DNS configuration
-			dns_configuration_unwatch();
+		targetPrivate->lastResolverStatus = nw_resolver_status_invalid;
+		nw_release(targetPrivate->lastResolvedEndpoints);
+		targetPrivate->lastResolvedEndpoints = NULL;
+		__SCNetworkReachabilityRestartResolver(targetPrivate);
 
-			// nwi
-			nwi_refresh_disable();
+		CFRetain(targetPrivate);
+		nw_path_evaluator_set_cancel_handler(pathEvaluator, ^(void) {
+			MUTEX_LOCK(&targetPrivate->lock);
+			if (pathEvaluator == targetPrivate->pathEvaluator) {
+				targetPrivate->pathEvaluator = NULL;
+			}
+			nw_release(pathEvaluator);
+			MUTEX_UNLOCK(&targetPrivate->lock);
+			CFRelease(targetPrivate);
 		});
-	}
-
-    unwatch :
 
-	SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%sunscheduled"),
-	      targetPrivate->log_prefix);
+		if (!nw_path_evaluator_set_update_handler(pathEvaluator, targetPrivate->dispatchQueue, ^(nw_path_t path) {
+			MUTEX_LOCK(&targetPrivate->lock);
+			if (targetPrivate->scheduled) {
+				nw_path_t crazyIvanPath;
+				SCNetworkReachabilityFlags oldFlags = 0;
+				uint oldIFIndex = 0;
+				size_t oldEndpointCount = 0;
+				__SCNetworkReachabilityCopyPathStatus(targetPrivate, &oldFlags, &oldIFIndex, &oldEndpointCount);
+
+				nw_release(targetPrivate->lastPath);
+				targetPrivate->lastPath = nw_retain(path);
+
+				if (isReachabilityTypeAddress(targetPrivate->type)) {
+					crazyIvanPath =
+						__SCNetworkReachabilityCreateCrazyIvan46Path(targetPrivate->lastPath,
+											     endpoint,
+											     targetPrivate->parameters,
+											     TRUE);
+					if (NULL != crazyIvanPath) {
+						nw_release(targetPrivate->lastPath);
+						targetPrivate->lastPath = crazyIvanPath;
+					}
+				}
 
-	ok = TRUE;
+				if (targetPrivate->lastResolverStatus == nw_resolver_status_complete) {
+					targetPrivate->lastResolverStatus = nw_resolver_status_invalid;
+					__SCNetworkReachabilityRestartResolver(targetPrivate);
+				}
 
-    done :
+				if (__SCNetworkReachabilityShouldUpdateClient(targetPrivate, oldFlags, oldIFIndex, oldEndpointCount)) {
+					reachUpdateAndUnlock(targetPrivate);
+				} else {
+					MUTEX_UNLOCK(&targetPrivate->lock);
+				}
+			} else {
+				MUTEX_UNLOCK(&targetPrivate->lock);
+			}
+		})) {
+			targetPrivate->pathEvaluator = NULL;
+			nw_release(pathEvaluator);
+			CFRelease(targetPrivate);
+		}
+	} else {
+		if (targetPrivate->dispatchQueue == NULL) {	// if we should be scheduled on a dispatch queue (but are not)
+			_SCErrorSet(kSCStatusInvalidArgument);
+			goto done;
+		}
 
-	MUTEX_UNLOCK(&targetPrivate->lock);
+		if (!targetPrivate->scheduled) {
+			// if not currently scheduled
+			_SCErrorSet(kSCStatusInvalidArgument);
+			goto done;
+		}
 
-	if (drainGroup != NULL) {
-		dispatch_group_notify(drainGroup, __SCNetworkReachability_concurrent_queue(), ^{
-			// release group/queue references
-			dispatch_release(drainQueue);
-			dispatch_release(drainGroup);	// releases our target reference
-		});
+		targetPrivate->scheduled = FALSE;
+		targetPrivate->sentFirstUpdate = FALSE;
+		nw_path_evaluator_cancel(targetPrivate->pathEvaluator);
+		targetPrivate->pathEvaluator = NULL;
+		nw_release(targetPrivate->lastPath);
+		targetPrivate->lastPath = NULL;
+		nw_release(targetPrivate->lastPathParameters);
+		targetPrivate->lastPathParameters = NULL;
+		nw_release(targetPrivate->lastResolvedEndpoints);
+		targetPrivate->lastResolvedEndpoints = NULL;
+		if (NULL != targetPrivate->resolver) {
+			nw_resolver_cancel(targetPrivate->resolver);
+			targetPrivate->resolver = NULL;
+		}
+		if (targetPrivate->dispatchQueue != NULL) {
+			dispatch_release(targetPrivate->dispatchQueue);
+			targetPrivate->dispatchQueue = NULL;
+		}
+
+		SC_log(LOG_DEBUG, "%sunscheduled", targetPrivate->log_prefix);
 	}
-
-	// release our reference
-	CFRelease(target);
-
+	ok = TRUE;
+done:
 	return ok;
 }
 
 Boolean
-SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef	target,
-					 CFRunLoopRef			runLoop,
-					 CFStringRef			runLoopMode)
-{
-	if (!isA_SCNetworkReachability(target) || (runLoop == NULL) || (runLoopMode == NULL)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return FALSE;
-	}
-
-	return __SCNetworkReachabilityScheduleWithRunLoop(target, runLoop, runLoopMode, NULL, FALSE);
-}
-
-Boolean
-SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef	target,
-					   CFRunLoopRef			runLoop,
-					   CFStringRef			runLoopMode)
+SCNetworkReachabilitySetDispatchQueue(SCNetworkReachabilityRef	target,
+				      dispatch_queue_t		queue)
 {
-	if (!isA_SCNetworkReachability(target) || (runLoop == NULL) || (runLoopMode == NULL)) {
+	if (!isA_SCNetworkReachability(target)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
 	}
 
-	return __SCNetworkReachabilityUnscheduleFromRunLoop(target, runLoop, runLoopMode, FALSE);
+	SCNetworkReachabilityPrivateRef	targetPrivate	= (SCNetworkReachabilityPrivateRef)target;
+	MUTEX_LOCK(&targetPrivate->lock);
+	Boolean success = __SCNetworkReachabilitySetDispatchQueue(targetPrivate, queue);
+	MUTEX_UNLOCK(&targetPrivate->lock);
+	return success;
 }
 
+/*
+ * _SC_checkResolverReachabilityByAddress()
+ *
+ * Given an IP address, determine whether a reverse DNS query can be issued
+ * using the current network configuration.
+ */
 Boolean
-SCNetworkReachabilitySetDispatchQueue(SCNetworkReachabilityRef	target,
-				      dispatch_queue_t		queue)
+_SC_checkResolverReachabilityByAddress(SCDynamicStoreRef		*storeP,
+				       SCNetworkReachabilityFlags	*flags,
+				       Boolean				*haveDNS,
+				       struct sockaddr			*sa)
 {
-	Boolean	ok	= FALSE;
-
-	if (!isA_SCNetworkReachability(target)) {
-		_SCErrorSet(kSCStatusInvalidArgument);
-		return FALSE;
-	}
-
-	if (queue != NULL) {
-		ok = __SCNetworkReachabilityScheduleWithRunLoop(target, NULL, NULL, queue, FALSE);
+#pragma unused(storeP)
+#pragma unused(sa)
+	nw_path_evaluator_t evaluator = nw_path_create_default_evaluator();
+	nw_path_t path = nw_path_evaluator_copy_path(evaluator);
+	if (nw_path_get_status(path) == nw_path_status_unsatisfied_network) {
+		if (flags) {
+			*flags = 0;
+		}
+		if (haveDNS) {
+			*haveDNS = FALSE;
+		}
 	} else {
-		ok = __SCNetworkReachabilityUnscheduleFromRunLoop(target, NULL, NULL, FALSE);
+		if (flags) {
+			*flags = kSCNetworkReachabilityFlagsReachable;
+		}
+		if (haveDNS) {
+			*haveDNS = TRUE;
+		}
 	}
+	nw_release(evaluator);
+	nw_release(path);
 
-	return ok;
+	return TRUE;
 }
+
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkReachability.h b/src/configd/SystemConfiguration.fproj/SCNetworkReachability.h
index 14c56c74a..b4301c88a 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkReachability.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkReachability.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2003-2005, 2008-2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2005, 2008-2010, 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,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 _SCNETWORKREACHABILITY_H
 #define _SCNETWORKREACHABILITY_H
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -33,6 +33,9 @@
 #include 
 #include 
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
+
 /*!
 	@header SCNetworkReachability
 	@discussion The SCNetworkReachability API allows an application to
@@ -46,13 +49,29 @@
 		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
+		is reachable if there is a default route but a DNS query is
+		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
+		result for the corresponding synthesized IPv6 address.
+		On those networks, creating a CFSocketStream or NSURLSession
+		to that address will send packets but trying to connect using
+		BSD socket APIs will fail.
  */
 
 /*!
 	@typedef SCNetworkReachabilityRef
 	@discussion This is the handle to a network address or name.
  */
-typedef const struct __SCNetworkReachability * SCNetworkReachabilityRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkReachability * SCNetworkReachabilityRef;
 
 
 /*!
@@ -74,10 +93,10 @@ typedef const struct __SCNetworkReachability * SCNetworkReachabilityRef;
  */
 typedef struct {
 	CFIndex		version;
-	void *		info;
-	const void	*(*retain)(const void *info);
-	void		(*release)(const void *info);
-	CFStringRef	(*copyDescription)(const void *info);
+	void *		__nullable info;
+	const void	* __nonnull (* __nullable retain)(const void *info);
+	void		(* __nullable release)(const void *info);
+	CFStringRef	__nonnull (* __nullable copyDescription)(const void *info);
 } SCNetworkReachabilityContext;
 
 /*!
@@ -138,28 +157,25 @@ 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
  */
-enum {
-	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
+typedef CF_OPTIONS(uint32_t, SCNetworkReachabilityFlags) {
+	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
 };
-typedef	uint32_t	SCNetworkReachabilityFlags;
 
 /*!
 	@typedef SCNetworkReachabilityCallBack
@@ -172,9 +188,9 @@ typedef	uint32_t	SCNetworkReachabilityFlags;
 	@param info A C pointer to a user-specified block of data.
  */
 typedef void (*SCNetworkReachabilityCallBack)	(
-						SCNetworkReachabilityRef	target,
-						SCNetworkReachabilityFlags	flags,
-						void				*info
+						SCNetworkReachabilityRef			target,
+						SCNetworkReachabilityFlags			flags,
+						void			     *	__nullable	info
 						);
 
 __BEGIN_DECLS
@@ -189,11 +205,11 @@ __BEGIN_DECLS
 
 		 You must release the returned value.
  */
-SCNetworkReachabilityRef
+SCNetworkReachabilityRef __nullable
 SCNetworkReachabilityCreateWithAddress		(
-						CFAllocatorRef			allocator,
-						const struct sockaddr		*address
-						)				__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0);
+						CFAllocatorRef			__nullable	allocator,
+						const struct sockaddr				*address
+						)				API_AVAILABLE(macos(10.3), ios(2.0));
 
 /*!
 	@function SCNetworkReachabilityCreateWithAddressPair
@@ -208,12 +224,12 @@ SCNetworkReachabilityCreateWithAddress		(
 
 		 You must release the returned value.
  */
-SCNetworkReachabilityRef
+SCNetworkReachabilityRef __nullable
 SCNetworkReachabilityCreateWithAddressPair	(
-						CFAllocatorRef			allocator,
-						const struct sockaddr		*localAddress,
-						const struct sockaddr		*remoteAddress
-						)				__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0);
+						CFAllocatorRef			__nullable	allocator,
+						const struct sockaddr		* __nullable	localAddress,
+						const struct sockaddr		* __nullable	remoteAddress
+						)				API_AVAILABLE(macos(10.3), ios(2.0));
 
 /*!
 	@function SCNetworkReachabilityCreateWithName
@@ -227,11 +243,11 @@ SCNetworkReachabilityCreateWithAddressPair	(
 
 		You must release the returned value.
  */
-SCNetworkReachabilityRef
+SCNetworkReachabilityRef __nullable
 SCNetworkReachabilityCreateWithName		(
-						CFAllocatorRef			allocator,
-						const char			*nodename
-						)				__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0);
+						CFAllocatorRef			__nullable	allocator,
+						const char					*nodename
+						)				API_AVAILABLE(macos(10.3), ios(2.0));
 
 /*!
 	@function SCNetworkReachabilityGetTypeID
@@ -239,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));
 
 
 /*!
@@ -258,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
@@ -275,10 +291,10 @@ SCNetworkReachabilityGetFlags			(
  */
 Boolean
 SCNetworkReachabilitySetCallback		(
-						SCNetworkReachabilityRef	target,
-						SCNetworkReachabilityCallBack	callout,
-						SCNetworkReachabilityContext	*context
-						)				__OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0);
+						SCNetworkReachabilityRef			target,
+						SCNetworkReachabilityCallBack	__nullable	callout,
+						SCNetworkReachabilityContext	* __nullable	context
+						)				API_AVAILABLE(macos(10.3), ios(2.0));
 
 /*!
 	@function SCNetworkReachabilityScheduleWithRunLoop
@@ -297,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
@@ -317,24 +333,28 @@ 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
-	@discussion Schedules callbacks for the given target on the given
+	@discussion Schedule or unschedule callbacks for the given target on the given
 		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. Pass NULL to disable notifications, and release queue.
-	@result Returns TRUE if the target is unscheduled successfully;
+	@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.
  */
 Boolean
 SCNetworkReachabilitySetDispatchQueue		(
-						SCNetworkReachabilityRef	target,
-						dispatch_queue_t		queue
-						)				__OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0);
+						SCNetworkReachabilityRef			target,
+						dispatch_queue_t		__nullable	queue
+						)				API_AVAILABLE(macos(10.6), ios(4.0));
 
 __END_DECLS
 
-#endif /* _SCNETWORKREACHABILITY_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SCNETWORKREACHABILITY_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h b/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h
index 9c88fb6d2..0a98fe4f1 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2014 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 
@@ -33,23 +33,16 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
 #include 
 
-
-
+#include 
 
 #pragma mark -
 #pragma mark SCNetworkReachability
 
-
-#define kSCNetworkReachabilityFlagsFirstResolvePending	(1<<31)
-
-
-
 #define kSCNetworkReachabilityFlagsMask			0x00ffffff	// top 8-bits reserved for implementation
 
 
@@ -59,6 +52,11 @@ typedef	enum {
 	UNKNOWN
 } lazyBoolean;
 
+typedef enum {
+	ReachabilityRankNone			= 0,
+	ReachabilityRankConnectionRequired	= 1,
+	ReachabilityRankReachable		= 2
+} ReachabilityRankType;
 
 typedef enum {
 	// by-address SCNetworkReachability targets
@@ -72,16 +70,6 @@ typedef enum {
 #define isReachabilityTypeAddress(type)		(type < reachabilityTypeName)
 #define isReachabilityTypeName(type)		(type >= reachabilityTypeName)
 
-
-typedef struct {
-	uint64_t			cycle;
-	SCNetworkReachabilityFlags	flags;
-	unsigned int			if_index;
-	char				if_name[IFNAMSIZ];
-	Boolean				sleeping;
-} ReachabilityInfo;
-
-
 typedef struct {
 
 	/* base CFType information */
@@ -90,194 +78,43 @@ typedef struct {
 	/* lock */
 	pthread_mutex_t			lock;
 
-	/* logging */
-	Boolean				quiet;
-
 	/* address type */
 	ReachabilityAddressType		type;
 
 	/* target host name */
-	const char			*name;
-	Boolean				needResolve;
-	CFArrayRef			resolvedAddresses;	/* CFArray[CFData] or CFArray[CFString] */
-	int				resolvedError;
-	SCNetworkReachabilityFlags	resolverFlags;
-
-	/* [scoped routing] interface constraints */
-	unsigned int			if_index;
-	char				if_name[IFNAMSIZ];
+	nw_endpoint_t			hostnameEndpoint;
 
 	/* local & remote addresses */
-	struct sockaddr			*localAddress;
-	struct sockaddr			*remoteAddress;
-
-	/* current reachability flags */
-	uint64_t			cycle;
-	ReachabilityInfo		info;
-	ReachabilityInfo		last_notify;
+	nw_endpoint_t			localAddressEndpoint;
+	nw_endpoint_t			remoteAddressEndpoint;
 
 	/* run loop source, callout, context, rl scheduling info */
 	Boolean				scheduled;
+	Boolean				sentFirstUpdate;
 	CFRunLoopSourceRef		rls;
 	SCNetworkReachabilityCallBack	rlsFunction;
 	SCNetworkReachabilityContext	rlsContext;
 	CFMutableArrayRef		rlList;
-	unsigned int			pending;		// 0 == no notifications queued, else # to be delivered
 
-	dispatch_group_t		dispatchGroup;
 	dispatch_queue_t		dispatchQueue;		// SCNetworkReachabilitySetDispatchQueue
 
-	/* [async] DNS query info */
-	Boolean				haveDNS;
-	struct timeval			dnsQueryStart;
-	struct timeval			dnsQueryEnd;
-
-	/* [async] processing info */
-	struct timeval			last_dns;
-	struct timeval			last_network;
-#if	!TARGET_OS_IPHONE
-	struct timeval			last_power;
-#endif	// !TARGET_OS_IPHONE
-	struct timeval			last_push;
-
-	/* on demand info */
-	Boolean				onDemandBypass;
-	CFStringRef			onDemandName;
-	CFStringRef			onDemandRemoteAddress;
-	SCNetworkReachabilityRef	onDemandServer;
-	CFStringRef			onDemandServiceID;
-
-
-	union {
-		uint32_t		dnsFlags;
-		struct {
-			Boolean		dnsActive     :1;	// if DNSServiceGetAddrInfo active
-
-			Boolean		dnsHaveError  :1;	// error during query
-			Boolean		dnsHaveV4     :1;	// have IPv4 (A) reply
-			Boolean		dnsHaveV6     :1;	// have IPv6 (AAAA) reply
-			Boolean		dnsHavePTR    :1;	// have PTR reply
-			Boolean		dnsHaveTimeout:1;	// no replies (A, AAAA, or PTR)
-		};
-	};
-	CFArrayRef			dnsAddresses;		// CFArray[CFData]
-	Boolean				dnsBlocked;		// if DNS query blocked
-	int				dnsError;
-	int				dnsFailures;		// # of unexpected DNSServiceXXX errors
-	int				dnsGeneration;
-	DNSServiceRef			dnsTarget;
-	Boolean				dnsNoAddressesSinceLastTimeout;
-
-	/* SCNetworkReachability server "client" info */
-	Boolean				serverActive;
-	Boolean				serverBypass;
-	Boolean				serverScheduled;
-	ReachabilityInfo		serverInfo;
-
-	/* SCNetworkReachability server "server" info */
-	CFDataRef			serverDigest;
-	dispatch_group_t		serverGroup;
-	Boolean				serverInfoValid;
-	unsigned int			serverSyncQueryActive;	// 0 == no [sync] query active, else # waiting on group
-	dispatch_queue_t		serverQueue;
-	unsigned int			serverReferences;	// how many [client] targets
-	CFMutableDictionaryRef		serverWatchers;		// [client_id/target_id] watchers
-
-	Boolean				useNEVPN;
-	uid_t				uid;
-	void				*nePolicyResult;
-	Boolean				serverBypassForVPN;	// if serverBypassForVPN, only use client mode
-
 	Boolean				resolverBypass;		// set this flag to bypass resolving the name
 
-
-
 	/* logging */
 	char				log_prefix[32];
 
-} SCNetworkReachabilityPrivate, *SCNetworkReachabilityPrivateRef;
-
-
-
-// ------------------------------------------------------------
-
-#pragma mark -
-#pragma mark [XPC] Reachability Server
-
-
-#define	REACH_SERVER_VERSION		20110323
-
-#if	!TARGET_IPHONE_SIMULATOR
-#define	REACH_SERVICE_NAME		"com.apple.SystemConfiguration.SCNetworkReachability"
-#else	// !TARGET_IPHONE_SIMULATOR
-#define	REACH_SERVICE_NAME		"com.apple.SystemConfiguration.SCNetworkReachability_sim"
-#endif	// !TARGET_IPHONE_SIMULATOR
-
-// ------------------------------------------------------------
-
-
-#pragma mark -
-#pragma mark [XPC] Reachability Server (client->server request)
-
-
-#define	REACH_CLIENT_PROC_NAME		"proc_name"		// string
-#define	REACH_CLIENT_TARGET_ID		"target_id"		// uint64
-
-#define	REACH_REQUEST			"request_op"		// int64
-
-enum {
-	REACH_REQUEST_CREATE		= 0x0001,
-	REACH_REQUEST_REMOVE,
-	REACH_REQUEST_SCHEDULE,
-	REACH_REQUEST_STATUS,
-	REACH_REQUEST_UNSCHEDULE,
-	REACH_REQUEST_SNAPSHOT		= 0x0101,
-};
-
-#define	REACH_TARGET_NAME		"name"			// string
-
-#define	REACH_TARGET_LOCAL_ADDR		"local_address"		// data (struct sockaddr)
-#define	REACH_TARGET_REMOTE_ADDR	"remote_address"	// data (struct sockaddr)
-
-#define	REACH_TARGET_PTR_ADDR		"ptr_address"		// data (struct sockaddr)
+	nw_parameters_t			parameters;
+	nw_path_evaluator_t		pathEvaluator;
+	nw_path_t			lastPath;
+	nw_parameters_t			lastPathParameters;
+	nw_resolver_t			resolver;
+	nw_resolver_status_t		lastResolverStatus;
+	nw_array_t			lastResolvedEndpoints;
+	Boolean				lastResolvedEndpointHasFlags;
+	SCNetworkReachabilityFlags	lastResolvedEndpointFlags;
+	uint				lastResolvedEndpointInterfaceIndex;
 
-#define	REACH_TARGET_IF_INDEX		"if_index"		// int64
-#define	REACH_TARGET_IF_NAME		"if_name"		// string
-#define	REACH_TARGET_ONDEMAND_BYPASS	"ondemand_bypass"	// bool
-#define REACH_TARGET_RESOLVER_BYPASS	"resolver_bypass"	// bool
-
-
-#define REACH_REQUEST_REPLY		"reply"			// int64
-#define REACH_REQUEST_REPLY_DETAIL	"reply_detail"		// string
-
-enum {
-	REACH_REQUEST_REPLY_OK		= 0x0000,
-	REACH_REQUEST_REPLY_FAILED,
-	REACH_REQUEST_REPLY_UNKNOWN,
-};
-
-
-// ------------------------------------------------------------
-
-
-#pragma mark -
-#pragma mark [XPC] Reachability Server (server->client request)
-
-
-#define	MESSAGE_NOTIFY			"notify_op"		// int64
-
-enum {
-	MESSAGE_REACHABILITY_STATUS	= 0x1001,
-};
-
-#define REACH_STATUS_CYCLE		"cycle"			// uint64
-#define REACH_STATUS_DNS_FLAGS		"dns_flags"		// uint64
-#define REACH_STATUS_FLAGS		"flags"			// uint64
-#define REACH_STATUS_IF_INDEX		"if_index"		// uint64
-#define REACH_STATUS_IF_NAME		"if_name"		// data (char if_name[IFNAMSIZ])
-#define REACH_STATUS_RESOLVED_ADDRESSES	"resolved_addresses"	// array[data]
-#define REACH_STATUS_RESOLVED_ERROR	"resolved_error"	// int64
-#define REACH_STATUS_SLEEPING		"sleeping"		// bool
+} SCNetworkReachabilityPrivate, *SCNetworkReachabilityPrivateRef;
 
 
 // ------------------------------------------------------------
@@ -285,110 +122,18 @@ enum {
 
 __BEGIN_DECLS
 
-CFStringRef
-_SCNetworkReachabilityCopyTargetDescription	(SCNetworkReachabilityRef	target);
-
-CFStringRef
-_SCNetworkReachabilityCopyTargetFlags		(SCNetworkReachabilityRef	target);
-
-void
-__SCNetworkReachabilityUpdate			(SCNetworkReachabilityRef	target);
-
-void
-__SCNetworkReachabilityUpdateConcurrent		(SCNetworkReachabilityRef	target);
-
-dispatch_queue_t
-__SCNetworkReachability_concurrent_queue	(void);
-
-#pragma mark -
-#pragma mark [XPC] Reachability Server (client APIs)
-
-Boolean
-_SCNetworkReachabilityServer_snapshot		(void);
-
-Boolean
-__SCNetworkReachabilityServer_targetAdd		(SCNetworkReachabilityRef	target);
-
-void
-__SCNetworkReachabilityServer_targetRemove	(SCNetworkReachabilityRef	target);
-
-Boolean
-__SCNetworkReachabilityServer_targetSchedule	(SCNetworkReachabilityRef	target);
-
-Boolean
-__SCNetworkReachabilityServer_targetStatus	(SCNetworkReachabilityRef	target);
-
-Boolean
-__SCNetworkReachabilityServer_targetUnschedule	(SCNetworkReachabilityRef	target);
-
-
-Boolean
-__SC_checkResolverReachabilityInternal		(SCDynamicStoreRef		*storeP,
-						 SCNetworkReachabilityFlags	*flags,
-						 Boolean			*haveDNS,
-						 const char			*nodename,
-						 uint32_t			*resolver_if_index,
-						 int				*dns_config_index);
-
-static __inline__ void
-__SCNetworkReachabilityPrintFlags(SCNetworkReachabilityFlags flags)
+static __inline__ ReachabilityRankType
+__SCNetworkReachabilityRank(SCNetworkReachabilityFlags flags)
 {
-	if (flags != 0) {
-		if (flags & kSCNetworkReachabilityFlagsReachable) {
-			SCPrint(TRUE, stdout, CFSTR("Reachable"));
-			flags &= ~kSCNetworkReachabilityFlagsReachable;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsTransientConnection) {
-			SCPrint(TRUE, stdout, CFSTR("Transient Connection"));
-			flags &= ~kSCNetworkReachabilityFlagsTransientConnection;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsConnectionRequired) {
-			SCPrint(TRUE, stdout, CFSTR("Connection Required"));
-			flags &= ~kSCNetworkReachabilityFlagsConnectionRequired;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) {
-			SCPrint(TRUE, stdout, CFSTR("Automatic Connection On Traffic"));
-			flags &= ~kSCNetworkReachabilityFlagsConnectionOnTraffic;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) {
-			SCPrint(TRUE, stdout, CFSTR("Automatic Connection On Demand"));
-			flags &= ~kSCNetworkReachabilityFlagsConnectionOnDemand;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsInterventionRequired) {
-			SCPrint(TRUE, stdout, CFSTR("Intervention Required"));
-			flags &= ~kSCNetworkReachabilityFlagsInterventionRequired;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsIsLocalAddress) {
-			SCPrint(TRUE, stdout, CFSTR("Local Address"));
-			flags &= ~kSCNetworkReachabilityFlagsIsLocalAddress;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-		if (flags & kSCNetworkReachabilityFlagsIsDirect) {
-			SCPrint(TRUE, stdout, CFSTR("Directly Reachable Address"));
-			flags &= ~kSCNetworkReachabilityFlagsIsDirect;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-#if	TARGET_OS_IPHONE
-		if (flags & kSCNetworkReachabilityFlagsIsWWAN) {
-			SCPrint(TRUE, stdout, CFSTR("WWAN"));
-			flags &= ~kSCNetworkReachabilityFlagsIsWWAN;
-			SCPrint(flags != 0, stdout, CFSTR(","));
-		}
-#endif	// TARGET_OS_IPHONE
-		if (flags != 0) {
-			SCPrint(TRUE, stdout, CFSTR("0x%08x"), flags);
+	ReachabilityRankType	rank = ReachabilityRankNone;
+
+	if ((flags & kSCNetworkReachabilityFlagsReachable) != 0) {
+		rank = ReachabilityRankReachable;
+		if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0) {
+			rank = ReachabilityRankConnectionRequired;
 		}
-	} else {
-		SCPrint(TRUE, stdout, CFSTR("Not Reachable"));
 	}
-
-	return;
+	return rank;
 }
 
 
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h b/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h
new file mode 100644
index 000000000..c3cb87e2d
--- /dev/null
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 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,
+ * 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 _SCNETWORKREACHABILITYLOGGING_H
+#define _SCNETWORKREACHABILITYLOGGING_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+__BEGIN_DECLS
+
+/*
+ * __SCNetworkReachability_flags_string()
+ *
+ * Returns a string representation of the SCNetworkReachability flags.
+ *	debug==FALSE : " Reachable,Transient Connection,WWAN,..."
+ *	debug==TRUE  : " 0x01234567 (Reachable,Transient Connection,WWAN,...)"
+ */
+static __inline__ void
+__SCNetworkReachability_flags_string(SCNetworkReachabilityFlags flags, Boolean debug, char *str, size_t len)
+{
+	size_t				n;
+	size_t				op;		// open paren
+	SCNetworkReachabilityFlags	remaining;
+
+	assert((len >= sizeof("Not Reachable,"            )) &&	// check min buffer size
+	       (len >= sizeof("0x01234567 (Not Reachable)")) &&
+	       (len >= sizeof("0x01234567 (0x01234567)"   )));
+
+	if (!debug) {
+		n = 0;
+		str[n] = '\0';
+	} else {
+		n = snprintf(str, len, "0x%08x (", flags);
+		len--;	// leave room for the closing paren
+	}
+	op = n;
+	remaining = flags;
+
+	if ((remaining == 0) &&
+	    (n < len) && ((len - n) > sizeof("Not Reachable,"))) {
+		n = strlcat(str, "Not Reachable,", len);
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsReachable) &&
+	    (n < len) && ((len - n) > sizeof("Reachable,"))) {
+		n = strlcat(str, "Reachable,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsReachable;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsTransientConnection) &&
+	    (n < len) && ((len - n) > sizeof("Transient Connection,"))) {
+		n = strlcat(str, "Transient Connection,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsTransientConnection;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsConnectionRequired) &&
+	    (n < len) && ((len - n) > sizeof("Connection Required,"))) {
+		n = strlcat(str, "Connection Required,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsConnectionRequired;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsConnectionOnTraffic) &&
+	    (n < len) && ((len - n) > sizeof("Automatic Connection On Traffic,"))) {
+		n = strlcat(str, "Automatic Connection On Traffic,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsConnectionOnTraffic;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsConnectionOnDemand) &&
+	    (n < len) && ((len - n) > sizeof("Automatic Connection On Demand,"))) {
+		n = strlcat(str, "Automatic Connection On Demand,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsConnectionOnDemand;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsInterventionRequired) &&
+	    (n < len) && ((len - n) > sizeof("Intervention Required,"))) {
+		n = strlcat(str, "Intervention Required,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsInterventionRequired;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsIsLocalAddress) &&
+	    (n < len) && ((len - n) > sizeof("Local Address,"))) {
+		n = strlcat(str, "Local Address,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsIsLocalAddress;
+	}
+
+	if ((remaining & kSCNetworkReachabilityFlagsIsDirect) &&
+	    (n < len) && ((len - n) > sizeof("Directly Reachable Address,"))) {
+		n = strlcat(str, "Directly Reachable Address,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsIsDirect;
+	}
+
+#if	TARGET_OS_IPHONE
+	if ((remaining & kSCNetworkReachabilityFlagsIsWWAN) &&
+	    (n < len) && ((len - n) > sizeof("WWAN,"))) {
+		n = strlcat(str, "WWAN,", len);
+		remaining &= ~kSCNetworkReachabilityFlagsIsWWAN;
+	}
+#endif	// TARGET_OS_IPHONE
+
+	if (remaining != 0) {
+		if ((n >= len) ||
+		    ((len - n) <= sizeof("0x01234567,"))) {
+			// if we don't have enough space, truncate and start over
+			str[op] = '\0';
+			n = op;
+			remaining = flags;
+		}
+
+		n += snprintf(str + n, len - n, "0x%08x,", remaining);
+	}
+
+	if (n-- > 0) {
+		if (!debug) {
+			str[n] = '\0';			// remove trailing ","
+		} else {
+			str[n] = ')';			// trailing "," --> ")"
+		}
+	}
+
+	return;
+}
+
+__END_DECLS
+
+#endif	/* _SCNETWORKREACHABILITYLOGGING_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkService.c b/src/configd/SystemConfiguration.fproj/SCNetworkService.c
index 489ee394d..d9c8d4bed 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkService.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkService.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2004-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-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@
  */
 
@@ -31,10 +31,7 @@
 
 #include 
 #include 
-#include 
 #include "SCNetworkConfigurationInternal.h"
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 #include 
@@ -71,10 +68,11 @@ __SCNetworkServiceCopyDescription(CFTypeRef cf)
 {
 	CFAllocatorRef			allocator	= CFGetAllocator(cf);
 	CFMutableStringRef		result;
-	SCNetworkServicePrivateRef	servicePrivate	= (SCNetworkServicePrivateRef)cf;
+	SCNetworkServiceRef		service		= (SCNetworkServiceRef)cf;
+	SCNetworkServicePrivateRef	servicePrivate	= (SCNetworkServicePrivateRef)service;
 
 	result = CFStringCreateMutable(allocator, 0);
-	CFStringAppendFormat(result, NULL, CFSTR(" {"), cf, allocator);
+	CFStringAppendFormat(result, NULL, CFSTR(" {"), service, allocator);
 	CFStringAppendFormat(result, NULL, CFSTR("id = %@"), servicePrivate->serviceID);
 	if (servicePrivate->prefs != NULL) {
 		CFStringAppendFormat(result, NULL, CFSTR(", prefs = %p"), servicePrivate->prefs);
@@ -84,6 +82,9 @@ __SCNetworkServiceCopyDescription(CFTypeRef cf)
 	if (servicePrivate->name != NULL) {
 		CFStringAppendFormat(result, NULL, CFSTR(", name = %@"), servicePrivate->name);
 	}
+	if (!__SCNetworkServiceExists(service)) {
+		CFStringAppendFormat(result, NULL, CFSTR(", REMOVED"));
+	}
 	CFStringAppendFormat(result, NULL, CFSTR("}"));
 
 	return result;
@@ -166,10 +167,10 @@ __SCNetworkServiceCreatePrivate(CFAllocatorRef		allocator,
 		return NULL;
 	}
 
+	/* initialize non-zero/NULL members */
 	servicePrivate->prefs		= (prefs != NULL) ? CFRetain(prefs): NULL;
 	servicePrivate->serviceID	= CFStringCreateCopy(NULL, serviceID);
 	servicePrivate->interface       = (interface != NULL) ? CFRetain(interface) : NULL;
-	servicePrivate->name		= NULL;
 
 	return servicePrivate;
 }
@@ -340,7 +341,7 @@ _protocolTemplate(SCNetworkServiceRef service, CFStringRef protocolType)
 			}
 
 			overrides = __SCNetworkInterfaceGetTemplateOverrides(interface, protocolType);
-			if (overrides != NULL) {
+			if (isA_CFDictionary(overrides)) {
 				CFMutableDictionaryRef	newTemplate;
 
 				newTemplate = CFDictionaryCreateMutableCopy(NULL, 0, template);
@@ -368,10 +369,11 @@ Boolean
 SCNetworkServiceAddProtocolType(SCNetworkServiceRef service, CFStringRef protocolType)
 {
 	CFDictionaryRef			entity;
+	Boolean				newEnabled;
 	CFDictionaryRef			newEntity       = NULL;
 	Boolean				ok		= FALSE;
 	CFStringRef			path;
-	SCNetworkProtocolRef		protocol;
+	SCNetworkProtocolRef		protocol	= NULL;
 	SCNetworkServicePrivateRef      servicePrivate  = (SCNetworkServicePrivateRef)service;
 
 	if (!isA_SCNetworkService(service) || (servicePrivate->prefs == NULL)) {
@@ -384,6 +386,15 @@ SCNetworkServiceAddProtocolType(SCNetworkServiceRef service, CFStringRef protoco
 		return FALSE;
 	}
 
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceAddProtocolType() w/removed service\n  service = %@\n  protocol = %@",
+		       service,
+		       protocolType);
+		_SC_crash_once("SCNetworkServiceAddProtocolType() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
 							      servicePrivate->serviceID,	// service
 							      protocolType);			// entity
@@ -403,6 +414,7 @@ SCNetworkServiceAddProtocolType(SCNetworkServiceRef service, CFStringRef protoco
 				       &kCFTypeDictionaryValueCallBacks);
 	ok = SCPreferencesPathSetValue(servicePrivate->prefs, path, newEntity);
 	CFRelease(newEntity);
+	newEntity = NULL;
 	if (!ok) {
 		goto done;
 	}
@@ -411,12 +423,30 @@ SCNetworkServiceAddProtocolType(SCNetworkServiceRef service, CFStringRef protoco
 	assert(protocol != NULL);
 
 	newEntity = _protocolTemplate(service, protocolType);
+	assert(newEntity != NULL);
+	
 	ok = SCNetworkProtocolSetConfiguration(protocol, newEntity);
-	CFRelease(newEntity);
-	CFRelease(protocol);
+	if (!ok) {
+		// could not set default configuration
+		goto done;
+	}
+
+	newEnabled = !CFDictionaryContainsKey(newEntity, kSCResvInactive);
+	ok = SCNetworkProtocolSetEnabled(protocol, newEnabled);
+	if (!ok) {
+		// could not enable/disable protocol
+		goto done;
+	}
 
     done :
 
+	if (newEntity != NULL) CFRelease(newEntity);
+	if (protocol != NULL) CFRelease(protocol);
+
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkServiceAddProtocolType(): %@, %@", service, protocolType);
+	}
+
 	CFRelease(path);
 	return ok;
 }
@@ -458,21 +488,21 @@ SCNetworkServiceCopyAll(SCPreferencesRef prefs)
 			SCNetworkServicePrivateRef	servicePrivate;
 
 			if (!isA_CFDictionary(vals[i])) {
-				SCLog(TRUE,
-				      LOG_INFO,
-				      CFSTR("SCNetworkServiceCopyAll(): error w/service \"%@\"\n"),
-				      keys[i]);
+				SC_log(LOG_INFO, "error w/service \"%@\"", keys[i]);
 				continue;
 			}
 
 			entity = CFDictionaryGetValue(vals[i], kSCEntNetInterface);
 			if (!isA_CFDictionary(entity)) {
 				// if no "interface"
-				SCLog(TRUE,
-				      LOG_INFO,
-				      CFSTR("SCNetworkServiceCopyAll(): no \"%@\" entity for service \"%@\"\n"),
-				      kSCEntNetInterface,
-				      keys[i]);
+				SC_log(LOG_INFO, "no \"%@\" entity for service \"%@\"",
+				       kSCEntNetInterface,
+				       keys[i]);
+				continue;
+			}
+
+			if (__SCNetworkInterfaceEntityIsPPTP(entity)) {
+				SC_log(LOG_INFO, "PPTP services are no longer supported");
 				continue;
 			}
 
@@ -559,13 +589,12 @@ _copyInterfaceEntityTypes(CFDictionaryRef protocols)
 		CFStringRef	entities[]	= { kSCPropNetInterfaceType,
 						    kSCPropNetInterfaceSubType,
 						    kSCPropNetInterfaceHardware };
-		int		i;
 
 		// include the "Interface" entity itself
 		CFSetAddValue(interface_entity_types, kSCEntNetInterface);
 
 		// include the entities associated with the interface
-		for (i = 0; i < sizeof(entities)/sizeof(entities[0]); i++) {
+		for (size_t i = 0; i < sizeof(entities)/sizeof(entities[0]); i++) {
 			CFStringRef     entity;
 
 			entity = CFDictionaryGetValue(interface, entities[i]);
@@ -610,6 +639,12 @@ SCNetworkServiceCopy(SCPreferencesRef prefs, CFStringRef serviceID)
 		return NULL;
 	}
 
+	if (__SCNetworkInterfaceEntityIsPPTP(entity)) {
+		SC_log(LOG_INFO, "PPTP services are no longer supported");
+		_SCErrorSet(kSCStatusNoKey);
+		return NULL;
+	}
+
 	servicePrivate = __SCNetworkServiceCreatePrivate(NULL, prefs, serviceID, NULL);
 	return (SCNetworkServiceRef)servicePrivate;
 }
@@ -873,7 +908,7 @@ SCNetworkServiceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef interface)
 
 				// a ConnectionScript (and related keys) from the interface
 				// should trump the settings from the configuration template.
-				if (overrides != NULL) {
+				if (isA_CFDictionary(overrides)) {
 					CFMutableDictionaryRef	newConfig;
 
 					newConfig = CFDictionaryCreateMutableCopy(NULL, 0, config);
@@ -892,7 +927,7 @@ SCNetworkServiceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef interface)
 				CFDictionaryRef		overrides;
 
 				overrides = __SCNetworkInterfaceGetTemplateOverrides(interface, kSCNetworkInterfaceTypePPP);
-				if (overrides != NULL) {
+				if (isA_CFDictionary(overrides)) {
 					CFMutableDictionaryRef	newConfig;
 
 					newConfig = CFDictionaryCreateMutableCopy(NULL, 0, config);
@@ -903,9 +938,8 @@ SCNetworkServiceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef interface)
 			}
 
 			if (!__SCNetworkInterfaceSetConfiguration(interface, NULL, config, TRUE)) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("SCNetworkService __SCNetworkInterfaceSetConfiguration failed(), interface=%@, type=NULL"),
-				      interface);
+				SC_log(LOG_INFO, "__SCNetworkInterfaceSetConfiguration failed(), interface=%@, type=NULL",
+				       interface);
 			}
 			CFRelease(config);
 		}
@@ -937,6 +971,8 @@ SCNetworkServiceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef interface)
 					       interface_name);
 	}
 
+	SC_log(LOG_DEBUG, "SCNetworkServiceCreate(): %@", servicePrivate);
+
 	return (SCNetworkServiceRef)servicePrivate;
 }
 
@@ -947,7 +983,9 @@ SCNetworkServiceEstablishDefaultConfiguration(SCNetworkServiceRef service)
 	CFIndex				i;
 	SCNetworkInterfaceRef		interface;
 	CFIndex				n;
+	Boolean				ok;
 	CFArrayRef			protocolTypes;
+	CFStringRef			rankStr;
 	SCNetworkServicePrivateRef	servicePrivate  = (SCNetworkServicePrivateRef)service;
 
 	if (!isA_SCNetworkService(service) || (servicePrivate->prefs == NULL)) {
@@ -963,45 +1001,40 @@ SCNetworkServiceEstablishDefaultConfiguration(SCNetworkServiceRef service)
 	protocolTypes = SCNetworkInterfaceGetSupportedProtocolTypes(interface);
 	n = (protocolTypes != NULL) ? CFArrayGetCount(protocolTypes) : 0;
 	for (i = 0; i < n; i++) {
-		Boolean			enabled;
-		CFDictionaryRef		newEntity	= NULL;
-		Boolean			ok;
-		SCNetworkProtocolRef	protocol	= NULL;
-		CFStringRef		protocolType;
+		CFStringRef	protocolType;
 
 		protocolType = CFArrayGetValueAtIndex(protocolTypes, i);
 		ok = SCNetworkServiceAddProtocolType(service, protocolType);
-		if (!ok && (SCError() != kSCStatusKeyExists)) {
-			// could not add protocol
-			goto nextProtocol;
+		if (!ok) {
+			SC_log(LOG_INFO,
+			       "SCNetworkServiceEstablishDefaultConfiguration(): could not add protocol \"%@\"",
+			       protocolType);
 		}
+	}
 
-		protocol = SCNetworkServiceCopyProtocol(service, protocolType);
-		if (protocol == NULL) {
-			// oops, somethings wrong (should never happen)
-			goto nextProtocol;
-		}
+	rankStr = __SCNetworkInterfaceGetTemplateOverrides(interface, kSCPropNetServicePrimaryRank);
+	if (isA_CFString(rankStr)) {
+		SCNetworkServicePrimaryRank	rank;
 
-		newEntity = _protocolTemplate(service, protocolType);
-		ok = SCNetworkProtocolSetConfiguration(protocol, newEntity);
+		ok = __str_to_rank(rankStr, &rank);
 		if (!ok) {
-			// could not set default configuration
-			goto nextProtocol;
+			SC_log(LOG_INFO,
+			       "SCNetworkServiceEstablishDefaultConfiguration(): unknown rank \"%@\"",
+			       rankStr);
+			goto done;
 		}
 
-		enabled = !CFDictionaryContainsKey(newEntity, kSCResvInactive);
-		ok = SCNetworkProtocolSetEnabled(protocol, enabled);
+		ok = SCNetworkServiceSetPrimaryRank(service, rank);
 		if (!ok) {
-			// could not enable/disable protocol
-			goto nextProtocol;
+			SC_log(LOG_INFO,
+			       "SCNetworkServiceEstablishDefaultConfiguration(): could not set rank \"%@\"",
+			       rankStr);
+			goto done;
 		}
-
-	    nextProtocol :
-
-		if (newEntity != NULL) CFRelease(newEntity);
-		if (protocol  != NULL) CFRelease(protocol);
 	}
 
+    done :
+
 	return TRUE;
 }
 
@@ -1083,13 +1116,13 @@ SCNetworkServiceGetName(SCNetworkServiceRef service)
 	CFRelease(path);
 
 	useSystemInterfaces = ((__SCPreferencesUsingDefaultPrefs(servicePrivate->prefs)) &&
-			       (__SCPreferencesGetLimitSCNetworkConfiguration(servicePrivate->prefs) == FALSE));
-	
+			       !__SCPreferencesGetLimitSCNetworkConfiguration(servicePrivate->prefs));
+
 	if (isA_CFDictionary(entity)) {
 		name = CFDictionaryGetValue(entity, kSCPropUserDefinedName);
 		if (isA_CFString(name)) {
 			servicePrivate->name = CFRetain(name);
-			if (useSystemInterfaces == FALSE) {
+			if (!useSystemInterfaces) {
 				return servicePrivate->name;
 			}
 		}
@@ -1153,9 +1186,10 @@ SCNetworkServiceGetName(SCNetworkServiceRef service)
 					// compare the older "Built-in XXX" non-localized name
 					interface_name = __SCNetworkInterfaceCopyXNonLocalizedDisplayName(interface);
 					break;
-#endif	// !TARGET_OS_IPHONE
+#else	// !TARGET_OS_IPHONE
 				default :
 					continue;
+#endif	// !TARGET_OS_IPHONE
 			}
 
 			if (interface_name != NULL) {
@@ -1243,15 +1277,21 @@ SCNetworkServiceRemove(SCNetworkServiceRef service)
 		return FALSE;
 	}
 
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceRemove() w/removed service\n  service = %@", service);
+		_SC_crash_once("SCNetworkServiceRemove() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	// remove service from all sets
 
 	sets = SCNetworkSetCopyAll(servicePrivate->prefs);
 	if (sets != NULL) {
-		CFIndex	i;
 		CFIndex n;
 
 		n = CFArrayGetCount(sets);
-		for (i = 0; i < n; i++) {
+		for (CFIndex i = 0; i < n; i++) {
 			SCNetworkSetRef	set;
 
 			set = CFArrayGetValueAtIndex(sets, i);
@@ -1272,6 +1312,10 @@ SCNetworkServiceRemove(SCNetworkServiceRef service)
 	ok = SCPreferencesPathRemoveValue(servicePrivate->prefs, path);
 	CFRelease(path);
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkServiceRemove(): %@", service);
+	}
+
 	return ok;
 }
 
@@ -1289,6 +1333,15 @@ SCNetworkServiceRemoveProtocolType(SCNetworkServiceRef service, CFStringRef prot
 		return FALSE;
 	}
 
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceRemoveProtocolType() w/removed service\n  service = %@\n  protocol = %@",
+		       service,
+		       protocolType);
+		_SC_crash_once("SCNetworkServiceRemoveProtocolType() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	if (!__SCNetworkProtocolIsValidType(protocolType)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
@@ -1309,6 +1362,10 @@ SCNetworkServiceRemoveProtocolType(SCNetworkServiceRef service, CFStringRef prot
 
     done :
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkServiceRemoveProtocolType(): %@, %@", service, protocolType);
+	}
+
 	CFRelease(path);
 	return ok;
 }
@@ -1326,6 +1383,13 @@ SCNetworkServiceSetEnabled(SCNetworkServiceRef service, Boolean enabled)
 		return FALSE;
 	}
 
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceSetEnabled() w/removed service\n  service = %@", service);
+		_SC_crash_once("SCNetworkProtocolSetEnabled() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	// make sure that we do not enable a network service if the
 	// associated interface is a member of a bond or bridge.
 	if (enabled) {
@@ -1345,6 +1409,12 @@ SCNetworkServiceSetEnabled(SCNetworkServiceRef service, Boolean enabled)
 	ok = __setPrefsEnabled(servicePrivate->prefs, path, enabled);
 	CFRelease(path);
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkServiceSetEnabled(): %@ -> %s",
+		       service,
+		       enabled ? "Enabled" : "Disabled");
+	}
+
 	return ok;
 }
 
@@ -1363,6 +1433,15 @@ SCNetworkServiceSetName(SCNetworkServiceRef service, CFStringRef name)
 		return FALSE;
 	}
 
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceSetName() w/removed service\n  service = %@\n  name = %@",
+		       service,
+		       name != NULL ? name : CFSTR(""));
+		_SC_crash_once("SCNetworkServiceSetName() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	if (name != NULL) {
 		if (!isA_CFString(name)) {
 			_SCErrorSet(kSCStatusInvalidArgument);
@@ -1520,6 +1599,10 @@ SCNetworkServiceSetName(SCNetworkServiceRef service, CFStringRef name)
 	if (name != NULL) CFRetain(name);
 	servicePrivate->name = name;
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkServiceSetName(): %@", service);
+	}
+
 	return ok;
 }
 
@@ -1528,6 +1611,34 @@ SCNetworkServiceSetName(SCNetworkServiceRef service, CFStringRef name)
 #pragma mark SCNetworkService SPIs
 
 
+__private_extern__
+Boolean
+__SCNetworkServiceExists(SCNetworkServiceRef service)
+{
+	CFDictionaryRef			entity;
+	CFStringRef			path;
+	SCNetworkServicePrivateRef      servicePrivate	= (SCNetworkServicePrivateRef)service;
+
+	if (servicePrivate->prefs == NULL) {
+		// if no prefs
+		return FALSE;
+	}
+
+	path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
+							      servicePrivate->serviceID,	// service
+							      kSCEntNetInterface);     		 // entity
+	entity = SCPreferencesPathGetValue(servicePrivate->prefs, path);
+	CFRelease(path);
+
+	if (!isA_CFDictionary(entity)) {
+		// a "service" must have an "interface"
+		return FALSE;
+	}
+
+	return TRUE;
+}
+
+
 SCNetworkServicePrimaryRank
 SCNetworkServiceGetPrimaryRank(SCNetworkServiceRef service)
 {
@@ -1599,6 +1710,13 @@ SCNetworkServiceSetPrimaryRank(SCNetworkServiceRef		service,
 		return FALSE;
 	}
 
+	if ((servicePrivate->prefs != NULL) && !__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceSetPrimaryRank() w/removed\n  service = %@", service);
+		_SC_crash_once("SCNetworkServiceSetPrimaryRank() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	ok = __rank_to_str(newRank, &rankStr);
 	if (!ok) {
 		_SCErrorSet(kSCStatusInvalidArgument);
@@ -1715,9 +1833,12 @@ _SCNetworkServiceIsVPN(SCNetworkServiceRef service)
 		if (CFEqual(interfaceType, kSCNetworkInterfaceTypeL2TP)) {
 			return TRUE;
 		}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
 		if (CFEqual(interfaceType, kSCNetworkInterfaceTypePPTP)) {
 			return TRUE;
 		}
+#pragma GCC diagnostic pop
 	} else if (CFEqual(interfaceType, kSCNetworkInterfaceTypeVPN)) {
 		return TRUE;
 	} else if (CFEqual(interfaceType, kSCNetworkInterfaceTypeIPSec)) {
@@ -1731,13 +1852,22 @@ _SCNetworkServiceIsVPN(SCNetworkServiceRef service)
 Boolean
 SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifierDomain, CFStringRef identifier)
 {
-	CFStringRef					prefs_path;
-	CFDictionaryRef				service_dictionary;
-	SCNetworkServicePrivateRef	service_private		= (SCNetworkServicePrivateRef)service;
-	Boolean						success				= FALSE;
-	CFStringRef					prefixed_domain;
+	CFStringRef			prefs_path;
+	CFDictionaryRef			service_dictionary;
+	SCNetworkServicePrivateRef	servicePrivate		= (SCNetworkServicePrivateRef)service;
+	Boolean				success			= FALSE;
+	CFStringRef			prefixed_domain;
 
-	if (!isA_SCNetworkService(service) || (service_private->prefs == NULL) || !isA_CFString(identifierDomain)) {
+	if (!isA_SCNetworkService(service) || (servicePrivate->prefs == NULL) || !isA_CFString(identifierDomain)) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkServiceSetExternalID() w/removed\n  service = %@\n  id = %@",
+		       service,
+		       identifier);
+		_SC_crash_once("SCNetworkServiceSetExternalID() w/removed service", NULL, NULL);
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
 	}
@@ -1750,10 +1880,10 @@ SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifie
 	prefixed_domain = CFStringCreateWithFormat(NULL, 0, CFSTR("%s%@"), EXTERNAL_ID_DOMAIN_PREFIX, identifierDomain);
 
 	prefs_path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,
-								    service_private->serviceID,
+								    servicePrivate->serviceID,
 								    NULL);
 
-	service_dictionary = SCPreferencesPathGetValue(service_private->prefs, prefs_path);
+	service_dictionary = SCPreferencesPathGetValue(servicePrivate->prefs, prefs_path);
 	if (isA_CFDictionary(service_dictionary) || ((service_dictionary == NULL) && (identifier != NULL))) {
 		CFMutableDictionaryRef	new_service_dictionary;
 
@@ -1771,22 +1901,22 @@ SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifie
 		} else {
 			CFDictionaryRemoveValue(new_service_dictionary, prefixed_domain);
 		}
-		success = SCPreferencesPathSetValue(service_private->prefs, prefs_path, new_service_dictionary);
+		success = SCPreferencesPathSetValue(servicePrivate->prefs, prefs_path, new_service_dictionary);
 		CFRelease(new_service_dictionary);
 	}
 	CFRelease(prefs_path);
 
 	if (identifier != NULL) {
-	    if (service_private->externalIDs == NULL) {
-			service_private->externalIDs = CFDictionaryCreateMutable(NULL,
+	    if (servicePrivate->externalIDs == NULL) {
+			servicePrivate->externalIDs = CFDictionaryCreateMutable(NULL,
 										 0,
-																	 &kCFTypeDictionaryKeyCallBacks,
-																	 &kCFTypeDictionaryValueCallBacks);
+										 &kCFTypeDictionaryKeyCallBacks,
+										 &kCFTypeDictionaryValueCallBacks);
 	    }
-	    CFDictionarySetValue(service_private->externalIDs, prefixed_domain, identifier);
+	    CFDictionarySetValue(servicePrivate->externalIDs, prefixed_domain, identifier);
 	} else {
-	    if (service_private->externalIDs != NULL) {
-			CFDictionaryRemoveValue(service_private->externalIDs, prefixed_domain);
+	    if (servicePrivate->externalIDs != NULL) {
+			CFDictionaryRemoveValue(servicePrivate->externalIDs, prefixed_domain);
 	    }
 	}
 
@@ -1803,9 +1933,9 @@ SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifie
 CFStringRef
 SCNetworkServiceCopyExternalID(SCNetworkServiceRef service, CFStringRef identifierDomain)
 {
+	CFStringRef			identifier		= NULL;
+	CFStringRef			prefixed_domain;
 	SCNetworkServicePrivateRef	service_private		= (SCNetworkServicePrivateRef)service;
-	CFStringRef					identifier			= NULL;
-	CFStringRef					prefixed_domain;
 
 	if (!isA_SCNetworkService(service) || (service_private->prefs == NULL) || !isA_CFString(identifierDomain)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
@@ -1822,7 +1952,7 @@ SCNetworkServiceCopyExternalID(SCNetworkServiceRef service, CFStringRef identifi
 	}
 
 	if (identifier == NULL) {
-		CFStringRef			prefs_path;
+		CFStringRef		prefs_path;
 		CFDictionaryRef		service_dictionary;
 
 		prefs_path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,
@@ -1877,9 +2007,9 @@ replaceServiceID(const void *value, void *context)
 	// update service order
 	serviceOrder = SCNetworkSetGetServiceOrder(set);
 	if ((isA_CFArray(serviceOrder) != NULL) &&
-	    (CFArrayContainsValue(serviceOrder,
+	    CFArrayContainsValue(serviceOrder,
 				  CFRangeMake(0, CFArrayGetCount(serviceOrder)),
-				  service_context->oldServiceID) == TRUE)) {
+				  service_context->oldServiceID)) {
 		CFIndex	count;
 		CFIndex	serviceOrderIndex;
 
@@ -1910,7 +2040,7 @@ replaceServiceID(const void *value, void *context)
 	}
 
 	// remove link between "set" and old "service"
-	SCPreferencesPathRemoveValue(setPrivate->prefs, path);
+	(void) SCPreferencesPathRemoveValue(setPrivate->prefs, path);
 	CFRelease(path);
 
 	// create the link between "set" and the "service"
@@ -1921,7 +2051,7 @@ replaceServiceID(const void *value, void *context)
 	link = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
 							      service_context->newServiceID,	// service
 							      NULL);				// entity
-	SCPreferencesPathSetLink(setPrivate->prefs, path, link);
+	(void) SCPreferencesPathSetLink(setPrivate->prefs, path, link);
 
     done:
 
@@ -1962,6 +2092,15 @@ _SCNetworkServiceSetServiceID(SCNetworkServiceRef service, CFStringRef newServic
 		return TRUE;
 	}
 
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "_SCNetworkServiceSetServiceID() w/removed service\n  service = %@\n  serviceID = %@",
+		       service,
+		       newServiceID);
+		_SC_crash_once("_SCNetworkServiceSetServiceID() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	newPath = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,				// allocator
 								 newServiceID,			// service
 								 NULL);				// entity
@@ -2012,6 +2151,8 @@ _SCNetworkServiceSetServiceID(SCNetworkServiceRef service, CFStringRef newServic
 		servicePrivate->interface = newInterface;
 	}
 
+	SC_log(LOG_DEBUG, "_SCNetworkServiceSetServiceID(): %@ --> %@", service, newServiceID);
+
 	// replace serviceID with new one
 	CFRetain(newServiceID);
 	CFRelease(servicePrivate->serviceID);
@@ -2028,6 +2169,7 @@ _SCNetworkServiceSetServiceID(SCNetworkServiceRef service, CFStringRef newServic
 	if (allSets != NULL) {
 		CFRelease(allSets);
 	}
+
 	return ok;
 }
 
@@ -2057,8 +2199,8 @@ copyInterfaceConfiguration(SCNetworkServiceRef oldService, SCNetworkServiceRef n
 
 		if ((configuration != NULL) ||
 		    (SCError() == kSCStatusOK)) {
-			if (SCNetworkInterfaceSetConfiguration(newInterface, configuration) == FALSE) {
-				SCLog(_sc_debug, LOG_DEBUG, CFSTR("problem setting interface configuration"));
+			if (!SCNetworkInterfaceSetConfiguration(newInterface, configuration)) {
+				SC_log(LOG_INFO, "problem setting interface configuration");
 			}
 
 		}
@@ -2078,8 +2220,8 @@ copyInterfaceConfiguration(SCNetworkServiceRef oldService, SCNetworkServiceRef n
 					configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kSCEntNetIPSec);
 					if ((configuration != NULL) ||
 					    (SCError() == kSCStatusOK)) {
-						if (SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCEntNetIPSec, configuration) == FALSE) {
-							SCLog(_sc_debug, LOG_DEBUG, CFSTR("problem setting child interface configuration"));
+						if (!SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCEntNetIPSec, configuration)) {
+							SC_log(LOG_INFO, "problem setting child interface configuration");
 						}
 					}
 				}
@@ -2128,8 +2270,9 @@ copyInterfaceConfiguration(SCNetworkServiceRef oldService, SCNetworkServiceRef n
 	return;
 }
 
-static void
-addProtocolToService(SCNetworkServiceRef service, CFStringRef protocolType, CFDictionaryRef configuration, Boolean enabled)
+__private_extern__
+void
+__SCNetworkServiceAddProtocolToService(SCNetworkServiceRef service, CFStringRef protocolType, CFDictionaryRef configuration, Boolean enabled)
 {
 	Boolean ok;
 	SCNetworkProtocolRef protocol;
@@ -2174,7 +2317,6 @@ __SCNetworkServiceMigrateNew(SCPreferencesRef		prefs,
 	SCNetworkServiceRef newService = NULL;
 	CFStringRef serviceID = NULL;
 	SCNetworkServicePrivateRef servicePrivate = (SCNetworkServicePrivateRef) service;
-	CFMutableDictionaryRef servicesMutable = NULL;
 	CFArrayRef setList = NULL;
 	Boolean success = FALSE;
 	CFStringRef targetDeviceName = NULL;
@@ -2193,18 +2335,17 @@ __SCNetworkServiceMigrateNew(SCPreferencesRef		prefs,
 	newService = SCNetworkServiceCopy(prefs, serviceID);
 	if (newService != NULL) {
 		// Cannot add service if it already exists
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Cannot add service if it already exists."));
+		SC_log(LOG_INFO, "Service already exists");
 		goto done;
 	}
 
 	oldInterface = SCNetworkServiceGetInterface(service);
 	interfaceEntity = __SCNetworkInterfaceCopyInterfaceEntity(oldInterface);
 	if (interfaceEntity == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: interfaceEntity does not exist"));
+		SC_log(LOG_INFO, "No interface entity");
 		goto done;
 	}
 	interfaceEntityMutable = CFDictionaryCreateMutableCopy(NULL, 0, interfaceEntity);
-	CFRelease(interfaceEntity);
 
 	if (isA_CFDictionary(bsdMapping) != NULL) {
 		deviceName = CFDictionaryGetValue(interfaceEntityMutable, kSCPropNetInterfaceDeviceName);
@@ -2238,28 +2379,31 @@ __SCNetworkServiceMigrateNew(SCPreferencesRef		prefs,
 		}
 	}
 	newService = SCNetworkServiceCreate(prefs, interface);
-
 	if (newService == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Could not create new service"));
+		SC_log(LOG_INFO, "SCNetworkServiceCreate() failed");
 		goto done;
 	}
 
 	enabled = SCNetworkServiceGetEnabled(service);
-	SCNetworkServiceSetEnabled(newService, enabled);
-	
-	if (SCNetworkServiceEstablishDefaultConfiguration(newService) == FALSE) {
+	if (!SCNetworkServiceSetEnabled(newService, enabled)) {
 		SCNetworkServiceRemove(newService);
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: SCNetworkServiceEstablishDefaultConfiguration failed"));
+		SC_log(LOG_INFO, "SCNetworkServiceSetEnabled() failed");
 		goto done;
 	}
-	
+
+	if (!SCNetworkServiceEstablishDefaultConfiguration(newService)) {
+		SCNetworkServiceRemove(newService);
+		SC_log(LOG_INFO, "SCNetworkServiceEstablishDefaultConfiguration() failed");
+		goto done;
+	}
+
 	// Set service ID
 	_SCNetworkServiceSetServiceID(newService, serviceID);
 
 	userDefinedName = SCNetworkServiceGetName(service);
-	if (userDefinedName != NULL &&
-	    SCNetworkServiceSetName(newService, userDefinedName) == FALSE) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Could not set service name to %@"), userDefinedName);
+	if ((userDefinedName != NULL) &&
+	    !SCNetworkServiceSetName(newService, userDefinedName)) {
+		SC_log(LOG_INFO, "SCNetworkServiceSetName(, %@) failed", userDefinedName);
 	}
 
 	// Determine which sets to add service
@@ -2270,18 +2414,17 @@ __SCNetworkServiceMigrateNew(SCPreferencesRef		prefs,
 			for (CFIndex idx = 0; idx < CFArrayGetCount(setList); idx++) {
 				oldSet = CFArrayGetValueAtIndex(setList, idx);
 				newSet = CFDictionaryGetValue(setMapping, oldSet);
-				
 				if (newSet == NULL) {
 					continue;
 				}
-				if (SCNetworkSetAddService(newSet, newService) == FALSE) {
-					SCLog(_sc_debug, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Could not add service to set: %@"), newSet);
-					continue;
+
+				if (!SCNetworkSetAddService(newSet, newService)) {
+					SC_log(LOG_INFO, "SCNetworkSetAddService() failed");
 				}
 			}
 		}
 	}
-	
+
 	protocols = SCNetworkServiceCopyProtocols(service);
 	if (protocols != NULL) {
 
@@ -2290,7 +2433,7 @@ __SCNetworkServiceMigrateNew(SCPreferencesRef		prefs,
 			CFDictionaryRef configuration = SCNetworkProtocolGetConfiguration(protocol);
 			CFStringRef protocolType = SCNetworkProtocolGetProtocolType(protocol);
 			enabled = SCNetworkProtocolGetEnabled(protocol);
-			addProtocolToService(newService, protocolType, configuration, enabled);
+			__SCNetworkServiceAddProtocolToService(newService, protocolType, configuration, enabled);
 		}
 		CFRelease(protocols);
 	}
@@ -2302,15 +2445,15 @@ done:
 	if (interface != NULL) {
 		CFRelease(interface);
 	}
+	if (interfaceEntity != NULL) {
+		CFRelease(interfaceEntity);
+	}
 	if (interfaceEntityMutable != NULL) {
 		CFRelease(interfaceEntityMutable);
 	}
 	if (newService != NULL) {
 		CFRelease(newService);
 	}
-	if (servicesMutable != NULL) {
-		CFRelease(servicesMutable);
-	}
 	if (ni_prefs != NULL) {
 		CFRelease(ni_prefs);
 	}
@@ -2338,31 +2481,31 @@ __SCNetworkServiceCreate(SCPreferencesRef	prefs,
 	if (userDefinedName == NULL) {
 		userDefinedName = __SCNetworkInterfaceGetUserDefinedName(interface);
 		if (userDefinedName == NULL) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: userDefinedName is NULL"));
+			SC_log(LOG_INFO, "No userDefinedName");
 			goto done;
 		}
 	}
 	service = SCNetworkServiceCreate(prefs, interface);
 	if (service == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Failed to create service: %s"), SCErrorString(SCError()));
+		SC_log(LOG_INFO, "SCNetworkServiceCreate() failed: %s", SCErrorString(SCError()));
 	} else {
 		ok = SCNetworkServiceSetName(service, userDefinedName);
-		if (ok == FALSE) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Failed to set name: %s"), SCErrorString(SCError()));
+		if (!ok) {
+			SC_log(LOG_INFO, "SCNetworkServiceSetName() failed: %s", SCErrorString(SCError()));
 			SCNetworkServiceRemove(service);
 			goto done;
 		}
 
 		ok = SCNetworkServiceEstablishDefaultConfiguration(service);
-		if (ok == FALSE) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Failed to establish default configuration: %s"), SCErrorString(SCError()));
+		if (!ok) {
+			SC_log(LOG_INFO, "SCNetworkServiceEstablishDefaultConfiguration() failed: %s", SCErrorString(SCError()));
 			SCNetworkServiceRemove(service);
 			goto done;
 		}
 	}
 	currentSet = SCNetworkSetCopyCurrent(prefs);
 	if (currentSet == NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Could not copy current set"));
+		SC_log(LOG_INFO, "No current set");
 		if (service != NULL) {
 			SCNetworkServiceRemove(service);
 		}
@@ -2370,8 +2513,8 @@ __SCNetworkServiceCreate(SCPreferencesRef	prefs,
 	}
 	if (service != NULL) {
 		ok = SCNetworkSetAddService(currentSet, service);
-		if (ok == FALSE) {
-			SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Could not add service to the current set"));
+		if (!ok) {
+			SC_log(LOG_INFO, "Could not add service to the current set");
 			SCNetworkServiceRemove(service);
 			goto done;
 		}
@@ -2386,3 +2529,28 @@ __SCNetworkServiceCreate(SCPreferencesRef	prefs,
 	}
 	return ok;
 }
+
+__private_extern__ Boolean
+__SCNetworkServiceIsPPTP(SCNetworkServiceRef	service)
+{
+	CFStringRef intfSubtype;
+	SCNetworkServicePrivateRef servicePrivate = (SCNetworkServicePrivateRef)service;
+
+	if (servicePrivate == NULL || servicePrivate->interface == NULL) {
+		return FALSE;
+	}
+
+	intfSubtype = __SCNetworkInterfaceGetEntitySubType(servicePrivate->interface);
+	if (intfSubtype == NULL) {
+		return FALSE;
+	}
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+	if (CFEqual(intfSubtype, kSCValNetInterfaceSubTypePPTP)) {
+		return TRUE;
+	}
+#pragma GCC diagnostic pop
+
+	return FALSE;
+}
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkSet.c b/src/configd/SystemConfiguration.fproj/SCNetworkSet.c
index d9576f6da..bfcf499e6 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkSet.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkSet.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2004-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2019 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@
  */
 
@@ -31,10 +31,7 @@
 
 #include 
 #include 
-#include 
 #include "SCNetworkConfigurationInternal.h"
-#include 
-#include 
 
 #include 
 
@@ -69,15 +66,19 @@ __SCNetworkSetCopyDescription(CFTypeRef cf)
 {
 	CFAllocatorRef		allocator	= CFGetAllocator(cf);
 	CFMutableStringRef      result;
-	SCNetworkSetPrivateRef	setPrivate	= (SCNetworkSetPrivateRef)cf;
+	SCNetworkSetRef		set		= (SCNetworkSetRef)cf;
+	SCNetworkSetPrivateRef	setPrivate	= (SCNetworkSetPrivateRef)set;
 
 	result = CFStringCreateMutable(allocator, 0);
-	CFStringAppendFormat(result, NULL, CFSTR(" {"), cf, allocator);
+	CFStringAppendFormat(result, NULL, CFSTR(" {"), set, allocator);
 	CFStringAppendFormat(result, NULL, CFSTR("id = %@"), setPrivate->setID);
 	CFStringAppendFormat(result, NULL, CFSTR(", prefs = %p"), setPrivate->prefs);
 	if (setPrivate->name != NULL) {
 		CFStringAppendFormat(result, NULL, CFSTR(", name = %@"), setPrivate->name);
 	}
+	if (!__SCNetworkSetExists(set)) {
+		CFStringAppendFormat(result, NULL, CFSTR(", REMOVED"));
+	}
 	CFStringAppendFormat(result, NULL, CFSTR("}"));
 
 	return result;
@@ -157,10 +158,9 @@ __SCNetworkSetCreatePrivate(CFAllocatorRef      allocator,
 		return NULL;
 	}
 
+	/* initialize non-zero/NULL members */
 	setPrivate->setID       = CFStringCreateCopy(NULL, setID);
 	setPrivate->prefs       = CFRetain(prefs);
-	setPrivate->name	= NULL;
-	setPrivate->established	= FALSE;	// "new" (not yet established) set
 
 	return setPrivate;
 }
@@ -183,15 +183,42 @@ _serviceOrder(SCNetworkServiceRef service)
 }
 
 
+static CFIndex
+_serviceOrder_clear(CFMutableArrayRef order, CFStringRef serviceID)
+{
+	CFIndex	f;	// # of serviceID's found
+	CFIndex	i;
+	CFIndex	n;
+
+	f = 0;
+	i = 0;
+	n = CFArrayGetCount(order);
+	while (i < n) {
+		CFStringRef	thisServiceID	= CFArrayGetValueAtIndex(order, i);
+
+		if (CFEqual(thisServiceID, serviceID)) {
+			// remove the serviceID
+			CFArrayRemoveValueAtIndex(order, i);
+			n--;
+			f++;
+			continue;
+		}
+
+		i++;	// move to the next serviceID
+	}
+
+	return f;
+}
+
+
 static void
 _serviceOrder_add(SCNetworkSetRef set, SCNetworkServiceRef service)
 {
-	CFIndex			i;
 	CFIndex			n;
 	CFMutableArrayRef	newOrder;
 	CFArrayRef		order;
-	CFStringRef		serviceID;
-	CFIndex			serviceOrder;
+	CFStringRef		serviceID	= SCNetworkServiceGetServiceID(service);
+	CFIndex			serviceOrder	= _serviceOrder(service);
 	SCNetworkSetPrivateRef	setPrivate	= (SCNetworkSetPrivateRef)set;
 	CFIndex			slot;
 
@@ -202,18 +229,18 @@ _serviceOrder_add(SCNetworkSetRef set, SCNetworkServiceRef service)
 		newOrder = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 	}
 	assert(newOrder != NULL);
-	n = CFArrayGetCount(newOrder);
 
-	serviceID = SCNetworkServiceGetServiceID(service);
-	if (CFArrayContainsValue(newOrder, CFRangeMake(0, n), serviceID)) {
-		// if serviceID already present
-		goto done;
+	n = _serviceOrder_clear(newOrder, serviceID);
+	if (n > 0) {
+		SC_log(LOG_ERR, "SCNetworkSetAddService() w/service already in ServiceOrder\n  service = %@\n  matched = %ld",
+		       service,
+		       n);
+		_SC_crash_once("SCNetworkSetAddService() w/service already in ServiceOrder", NULL, NULL);
 	}
 
-	serviceOrder = _serviceOrder(service);
-
 	slot = 0;
-	for (i = 0; i < n; i++) {
+	n = CFArrayGetCount(newOrder);
+	for (CFIndex i = 0; i < n; i++) {
 		int			slotOrder;
 		SCNetworkServiceRef	slotService;
 		CFStringRef		slotServiceID;
@@ -241,9 +268,6 @@ _serviceOrder_add(SCNetworkSetRef set, SCNetworkServiceRef service)
 
 	CFArrayInsertValueAtIndex(newOrder, slot, serviceID);
 	(void) SCNetworkSetSetServiceOrder(set, newOrder);
-
-    done :
-
 	CFRelease(newOrder);
 
 	return;
@@ -253,6 +277,7 @@ _serviceOrder_add(SCNetworkSetRef set, SCNetworkServiceRef service)
 static void
 _serviceOrder_remove(SCNetworkSetRef set, SCNetworkServiceRef service)
 {
+	CFIndex			n;
 	CFMutableArrayRef	newOrder;
 	CFArrayRef		order;
 	CFStringRef		serviceID;
@@ -261,22 +286,17 @@ _serviceOrder_remove(SCNetworkSetRef set, SCNetworkServiceRef service)
 	if (order == NULL) {
 		return;
 	}
-
-	serviceID = SCNetworkServiceGetServiceID(service);
-
 	newOrder = CFArrayCreateMutableCopy(NULL, 0, order);
-	while (TRUE) {
-		CFIndex	i;
 
-		i = CFArrayGetFirstIndexOfValue(newOrder,
-						CFRangeMake(0, CFArrayGetCount(newOrder)),
-						serviceID);
-		if (i == kCFNotFound) {
-			break;
-		}
+	serviceID = SCNetworkServiceGetServiceID(service);
 
-		CFArrayRemoveValueAtIndex(newOrder, i);
+	n = _serviceOrder_clear(newOrder, serviceID);
+	if (n > 1) {
+		SC_log(LOG_ERR, "SCNetworkSetRemoveService() w/multiple instances of service in ServiceOrder\n  service = %@\n  count = %ld",
+		       service,
+		       n);
 	}
+
 	(void) SCNetworkSetSetServiceOrder(set, newOrder);
 	CFRelease(newOrder);
 
@@ -288,11 +308,61 @@ _serviceOrder_remove(SCNetworkSetRef set, SCNetworkServiceRef service)
 #pragma mark SCNetworkSet APIs
 
 
+#define DEFAULT_SET_NAME	CFSTR("Automatic")
 #define	N_QUICK	16
 
 
-#define PREVENT_DUPLICATE_SERVICE_NAMES
-#ifdef  PREVENT_DUPLICATE_SERVICE_NAMES
+static CFStringRef
+copy_default_set_name(Boolean loc)
+{
+	CFStringRef		name;
+	static CFStringRef	non_localized	= NULL;
+	static CFStringRef	localized	= NULL;
+
+	if (!loc) {
+		static dispatch_once_t	once;
+
+		dispatch_once(&once, ^{
+			CFBundleRef	bundle;
+
+			bundle = _SC_CFBundleGet();
+			if (bundle != NULL) {
+				non_localized = _SC_CFBundleCopyNonLocalizedString(bundle,
+										   CFSTR("DEFAULT_SET_NAME"),
+										   DEFAULT_SET_NAME,
+										   NULL);
+			}
+		});
+		name = non_localized;
+	} else {
+		static dispatch_once_t	once;
+
+		dispatch_once(&once, ^{
+			CFBundleRef	bundle;
+
+			bundle = _SC_CFBundleGet();
+			if (bundle != NULL) {
+				localized = CFBundleCopyLocalizedString(bundle,
+									CFSTR("DEFAULT_SET_NAME"),
+									DEFAULT_SET_NAME,
+									NULL);
+			}
+		});
+		name = localized;
+	}
+
+	if (name == NULL) {
+		// if bundle or localized names not available
+		name = DEFAULT_SET_NAME;
+	}
+
+	CFRetain(name);
+	return name;
+}
+
+
+#define	PREVENT_DUPLICATE_SERVICE_NAMES
+#ifdef	PREVENT_DUPLICATE_SERVICE_NAMES
 static CFStringRef
 copy_next_name(CFStringRef name)
 {
@@ -361,8 +431,7 @@ ensure_unique_service_name(SCNetworkServiceRef service)
 		}
 
 		if (SCError() != kSCStatusKeyExists) {
-			SCLog(TRUE, LOG_DEBUG,
-			      CFSTR("could not update service name for \"%@\": %s"),
+			SC_log(LOG_INFO, "could not update service name for \"%@\": %s",
 			      SCNetworkInterfaceGetLocalizedDisplayName(interface),
 			      SCErrorString(SCError()));
 			break;
@@ -370,8 +439,7 @@ ensure_unique_service_name(SCNetworkServiceRef service)
 
 		newName = copy_next_name(name);
 		if (newName == NULL) {
-			SCLog(TRUE, LOG_DEBUG,
-			      CFSTR("could not create unique name for \"%@\": %s"),
+			SC_log(LOG_INFO, "could not create unique name for \"%@\": %s",
 			      SCNetworkInterfaceGetLocalizedDisplayName(interface),
 			      SCErrorString(SCError()));
 			break;
@@ -414,6 +482,23 @@ SCNetworkSetAddService(SCNetworkSetRef set, SCNetworkServiceRef service)
 		return FALSE;
 	}
 
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "SCNetworkSetAddService() w/removed set\n  set = %@\n  service = %@",
+		       set,
+		       service);
+		_SC_crash_once("SCNetworkSetAddService() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+	}
+
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkSetAddService() w/removed service\n  set = %@\n  service =  %@",
+		       set,
+		       service);
+		_SC_crash_once("SCNetworkSetAddService() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	// make sure that we do not add an orphaned network service if its
 	// associated interface is a member of a bond or bridge.
 	interface = SCNetworkServiceGetInterface(service);
@@ -473,7 +558,12 @@ SCNetworkSetAddService(SCNetworkSetRef set, SCNetworkServiceRef service)
 	ok = SCPreferencesPathSetLink(setPrivate->prefs, path, link);
 #ifdef	PREVENT_DUPLICATE_SERVICE_NAMES
 	if (ok) {
+		// We use the interface cache here to not reach into the
+		// IORegistry for every service we go through
+		_SCNetworkInterfaceCacheOpen();
 		ok = ensure_unique_service_name(service);
+		_SCNetworkInterfaceCacheClose();
+
 		if (!ok) {
 			// if we could not ensure a unique name, remove the (just added)
 			// link between the "set" and the "service"
@@ -500,6 +590,10 @@ SCNetworkSetAddService(SCNetworkSetRef set, SCNetworkServiceRef service)
 
     done :
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkSetAddService(): %@, %@", set, service);
+	}
+
 	if (interface_config != NULL)	CFRelease(interface_config);
 	return ok;
 }
@@ -587,10 +681,7 @@ SCNetworkSetCopyAll(SCPreferencesRef prefs)
 			SCNetworkSetPrivateRef	setPrivate;
 
 			if (!isA_CFDictionary(vals[i])) {
-				SCLog(TRUE,
-				      LOG_INFO,
-				      CFSTR("SCNetworkSetCopyAll(): error w/set \"%@\"\n"),
-				      keys[i]);
+				SC_log(LOG_INFO, "error w/set \"%@\"", keys[i]);
 				continue;
 			}
 
@@ -713,7 +804,7 @@ SCNetworkSetCopyCurrent(SCPreferencesRef prefs)
 			// mark set as "old" (already established)
 			setPrivate->established = TRUE;
 		} else {
-			SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkSetCopyCurrent(): preferences are non-conformant"));
+			SC_log(LOG_NOTICE, "SCNetworkSetCopyCurrent(): preferences are non-conformant");
 		}
 		CFRelease(path);
 	}
@@ -767,11 +858,9 @@ SCNetworkSetCopyServices(SCNetworkSetRef set)
 			link = SCPreferencesPathGetLink(setPrivate->prefs, path);
 			CFRelease(path);
 			if (link == NULL) {
-				SCLog(TRUE,
-				      LOG_INFO,
-				      CFSTR("SCNetworkSetCopyServices(): service \"%@\" for set \"%@\" is not a link\n"),
-				      keys[i],
-				      setPrivate->setID);
+				SC_log(LOG_INFO, "service \"%@\" for set \"%@\" is not a link",
+				       keys[i],
+				       setPrivate->setID);
 				continue;	 // if the service is not a link
 			}
 
@@ -784,14 +873,31 @@ SCNetworkSetCopyServices(SCNetworkSetRef set)
 										      serviceID,	// service
 										      NULL);		// entity
 				if (CFEqual(path, link)) {
-					SCNetworkServicePrivateRef	servicePrivate;
-
-					servicePrivate = __SCNetworkServiceCreatePrivate(NULL,
-											 setPrivate->prefs,
-											 serviceID,
-											 NULL);
-					CFArrayAppendValue(array, (SCNetworkServiceRef)servicePrivate);
-					CFRelease(servicePrivate);
+					CFDictionaryRef	entity;
+					CFStringRef	interfacePath;
+					Boolean		skip		= FALSE;
+
+					interfacePath = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL,			// allocator
+												       serviceID,		// service
+												       kSCEntNetInterface);	// entity
+					entity = SCPreferencesPathGetValue(setPrivate->prefs, interfacePath);
+					CFRelease(interfacePath);
+
+					if (__SCNetworkInterfaceEntityIsPPTP(entity)) {
+						SC_log(LOG_INFO, "PPTP services are no longer supported");
+						skip = TRUE;
+					}
+
+					if (!skip) {
+						SCNetworkServicePrivateRef	servicePrivate;
+
+						servicePrivate = __SCNetworkServiceCreatePrivate(NULL,
+												 setPrivate->prefs,
+												 serviceID,
+												 NULL);
+						CFArrayAppendValue(array, (SCNetworkServiceRef)servicePrivate);
+						CFRelease(servicePrivate);
+					}
 				}
 				CFRelease(path);
 			}
@@ -847,10 +953,73 @@ SCNetworkSetCreate(SCPreferencesRef prefs)
 		setPrivate = NULL;
 	}
 
+	if (setPrivate != NULL) {
+		SC_log(LOG_DEBUG, "SCNetworkSetCreate(): %@", setPrivate);
+	}
+
 	return (SCNetworkSetRef)setPrivate;
 }
 
 
+SCNetworkSetRef
+_SCNetworkSetCreateDefault(SCPreferencesRef prefs)
+{
+	CFStringRef	model;
+	Boolean		ok		= TRUE;
+	SCNetworkSetRef	set;
+	CFStringRef	setName		= NULL;
+
+	set = SCNetworkSetCopyCurrent(prefs);
+	if (set != NULL) {
+		SC_log(LOG_NOTICE, "creating default set w/already existing set");
+		CFRelease(set);
+		_SCErrorSet(kSCStatusKeyExists);
+		return NULL;
+	}
+
+	// create a new ("Automatic") set
+	set = SCNetworkSetCreate(prefs);
+	if (set == NULL) {
+		SC_log(LOG_NOTICE, "could not create \"new\" set: %s",
+		       SCErrorString(SCError()));
+		goto done;
+	}
+
+	setName = copy_default_set_name(TRUE);
+	ok = SCNetworkSetSetName(set, setName);
+	CFRelease(setName);
+	if (!ok) {
+		// if we could not save the new set's "name"
+		SC_log(LOG_NOTICE, "could not save the new set's name: %s",
+		       SCErrorString(SCError()));
+		goto done;
+	}
+
+	ok = SCNetworkSetSetCurrent(set);
+	if (!ok) {
+		// if we could not make this the "current" set
+		SC_log(LOG_NOTICE, "could not establish new set as current: %s",
+		       SCErrorString(SCError()));
+//		goto done;
+	}
+
+	model = SCPreferencesGetValue(prefs, MODEL);
+	if (model == NULL) {
+		model = _SC_hw_model(FALSE);
+		SCPreferencesSetValue(prefs, MODEL, model);
+	}
+
+    done :
+
+	if (!ok && (set != NULL)) {
+		SCNetworkSetRemove(set);
+		CFRelease(set);
+		set = NULL;
+	}
+	return set;
+}
+
+
 CFStringRef
 SCNetworkSetGetSetID(SCNetworkSetRef set)
 {
@@ -868,7 +1037,6 @@ SCNetworkSetGetSetID(SCNetworkSetRef set)
 CFStringRef
 SCNetworkSetGetName(SCNetworkSetRef set)
 {
-	CFBundleRef		bundle;
 	CFDictionaryRef		entity;
 	CFStringRef		path;
 	SCNetworkSetPrivateRef	setPrivate	= (SCNetworkSetPrivateRef)set;
@@ -895,33 +1063,20 @@ SCNetworkSetGetName(SCNetworkSetRef set)
 		}
 	}
 
-	bundle = _SC_CFBundleGet();
-	if (bundle != NULL) {
-		if (setPrivate->name != NULL) {
-			CFStringRef	non_localized;
-
-			non_localized = _SC_CFBundleCopyNonLocalizedString(bundle,
-									   CFSTR("DEFAULT_SET_NAME"),
-									   CFSTR("Automatic"),
-									   NULL);
-			if (non_localized != NULL) {
-				if (CFEqual(setPrivate->name, non_localized)) {
-					CFStringRef	localized;
-
-					// if "Automatic", return localized name
-					localized = CFBundleCopyLocalizedString(bundle,
-										CFSTR("DEFAULT_SET_NAME"),
-										CFSTR("Automatic"),
-										NULL);
-					if (localized != NULL) {
-						CFRelease(setPrivate->name);
-						setPrivate->name = localized;
-					}
-				}
+	if (setPrivate->name != NULL) {
+		CFStringRef	non_localized;
 
-				CFRelease(non_localized);
-			}
+		non_localized = copy_default_set_name(FALSE);
+		if (CFEqual(setPrivate->name, non_localized)) {
+			CFStringRef	localized;
+
+			// if "Automatic", return localized name
+			localized = copy_default_set_name(TRUE);
+			CFRelease(setPrivate->name);
+			setPrivate->name = localized;
 		}
+
+		CFRelease(non_localized);
 	}
 
 	return setPrivate->name;
@@ -967,6 +1122,24 @@ SCNetworkSetGetTypeID(void)
 }
 
 
+#if	TARGET_OS_IPHONE
+static Boolean
+isDefaultSet(SCNetworkSetRef set)
+{
+	CFStringRef	defaultName;
+	Boolean		isDefault	= FALSE;
+	CFStringRef	setName;
+
+	defaultName = copy_default_set_name(TRUE);
+	setName = SCNetworkSetGetName(set);
+	isDefault = _SC_CFEqual(setName, defaultName);
+	CFRelease(defaultName);
+
+	return isDefault;
+}
+#endif	// TARGET_OS_IPHONE
+
+
 Boolean
 SCNetworkSetRemove(SCNetworkSetRef set)
 {
@@ -980,15 +1153,35 @@ SCNetworkSetRemove(SCNetworkSetRef set)
 		return FALSE;
 	}
 
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "SCNetworkSetRemove() w/removed set\n  set = %@", set);
+		_SC_crash_once("SCNetworkSetRemove() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+	}
+
+#if	TARGET_OS_IPHONE
+	if (isDefaultSet(set) && (geteuid() != 0)) {
+		SC_log(LOG_ERR, "SCNetworkSetRemove() failed, cannot remove set : %@", set);
+		_SC_crash("The \"Automatic\" network set cannot be removed", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+#endif	// TARGET_OS_IPHONE
+
 	currentPath = SCPreferencesGetValue(setPrivate->prefs, kSCPrefCurrentSet);
 	path = SCPreferencesPathKeyCreateSet(NULL, setPrivate->setID);
 	if (!isA_CFString(currentPath) || !CFEqual(currentPath, path)) {
 		ok = SCPreferencesPathRemoveValue(setPrivate->prefs, path);
 	} else {
+		SC_log(LOG_DEBUG, "SCNetworkSetRemove() failed, currently active: %@", setPrivate->setID);
 		_SCErrorSet(kSCStatusInvalidArgument);
 	}
 	CFRelease(path);
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkSetRemove(): %@", set);
+	}
+
 	return ok;
 }
 
@@ -1014,6 +1207,23 @@ SCNetworkSetRemoveService(SCNetworkSetRef set, SCNetworkServiceRef service)
 		return FALSE;
 	}
 
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "SCNetworkSetRemoveService() w/removed set\n  set = %@\n  service = %@",
+		       set,
+		       service);
+		_SC_crash_once("SCNetworkSetRemoveService() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+	}
+
+	if (!__SCNetworkServiceExists(service)) {
+		SC_log(LOG_ERR, "SCNetworkSetRemoveService() w/removed service\n  set = %@\n  service = %@",
+		       set,
+		       service);
+		_SC_crash_once("SCNetworkSetRemoveService() w/removed service", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	// remove service from ServiceOrder
 	_serviceOrder_remove(set, service);
 
@@ -1041,12 +1251,15 @@ SCNetworkSetRemoveService(SCNetworkSetRef set, SCNetworkServiceRef service)
 	// push the [deep] interface configuration [back] into all sets which contain the service.
 	if (interface_config != NULL) {
 		__SCNetworkInterfaceSetDeepConfiguration(set, interface, interface_config);
+		CFRelease(interface_config);
 	}
 
-	if (interface_config != NULL)     CFRelease(interface_config);
-	if (!ok) {
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkSetRemoveService(): %@, %@", set, service);
+	} else {
 		_SCErrorSet(sc_status);
 	}
+
 	return ok;
 }
 
@@ -1063,9 +1276,21 @@ SCNetworkSetSetCurrent(SCNetworkSetRef set)
 		return FALSE;
 	}
 
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "SCNetworkSetSetCurrent() w/removed set\n  set = %@", set);
+		_SC_crash_once("SCNetworkSetSetCurrent() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	path = SCPreferencesPathKeyCreateSet(NULL, setPrivate->setID);
 	ok = SCPreferencesSetValue(setPrivate->prefs, kSCPrefCurrentSet, path);
 	CFRelease(path);
+
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkSetSetCurrent(): %@", set);
+	}
+
 	return ok;
 }
 
@@ -1073,8 +1298,10 @@ SCNetworkSetSetCurrent(SCNetworkSetRef set)
 Boolean
 SCNetworkSetSetName(SCNetworkSetRef set, CFStringRef name)
 {
-	CFBundleRef		bundle		= NULL;
 	CFDictionaryRef		entity;
+#if	TARGET_OS_IPHONE
+	Boolean			isDefaultName	= FALSE;
+#endif	// TARGET_OS_IPHONE
 	CFStringRef		localized	= NULL;
 	CFStringRef		non_localized	= NULL;
 	Boolean			ok		= FALSE;
@@ -1086,6 +1313,15 @@ SCNetworkSetSetName(SCNetworkSetRef set, CFStringRef name)
 		return FALSE;
 	}
 
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "SCNetworkSetSetName() w/removed set\n  set = %@\n  name = %@",
+		       set,
+		       name != NULL ? name : CFSTR(""));
+		_SC_crash_once("SCNetworkSetSetName() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	if ((name != NULL) && !isA_CFString(name)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
@@ -1094,28 +1330,42 @@ SCNetworkSetSetName(SCNetworkSetRef set, CFStringRef name)
 	// if known, compare against localized name
 
 	if (name != NULL) {
-		bundle = _SC_CFBundleGet();
-		if (bundle != NULL) {
-			non_localized = _SC_CFBundleCopyNonLocalizedString(bundle,
-									   CFSTR("DEFAULT_SET_NAME"),
-									   CFSTR("Automatic"),
-									   NULL);
-			if (non_localized != NULL) {
-				if (CFEqual(name, non_localized)) {
-					localized = CFBundleCopyLocalizedString(bundle,
-										CFSTR("DEFAULT_SET_NAME"),
-										CFSTR("Automatic"),
-										NULL);
-					if (localized != NULL) {
-						name = localized;
-					}
-				}
-			}
+		non_localized = copy_default_set_name(FALSE);
+		if (CFEqual(name, non_localized)) {
+			localized = copy_default_set_name(TRUE);
+			name = localized;
+#if	TARGET_OS_IPHONE
+			isDefaultName = TRUE;
+#endif	// TARGET_OS_IPHONE
 		}
+#if	TARGET_OS_IPHONE
+		else {
+			localized = copy_default_set_name(TRUE);
+			isDefaultName = CFEqual(name, non_localized);
+		}
+#endif	// TARGET_OS_IPHONE
+	}
+
+#if	TARGET_OS_IPHONE
+	if (!isDefaultName && isDefaultSet(set) && (geteuid() != 0)) {
+		// if we are trying to change the name of the "Automatic" set
+		SC_log(LOG_ERR, "SCNetworkSetSetName() failed, cannot rename : %@", set);
+		_SC_crash("The \"Automatic\" network set cannot be renamed", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		goto done;
 	}
+#endif	// TARGET_OS_IPHONE
+
+#define	PREVENT_DUPLICATE_SET_NAMES
+#ifdef	PREVENT_DUPLICATE_SET_NAMES
+
+#if	TARGET_OS_IPHONE
+	if (!isDefaultName) {
+		// On iOS, only block naming multiple sets with the name
+		// "Automatic".  Others names are OK.
+	} else
+#endif	// TARGET_OS_IPHONE
 
-#define PREVENT_DUPLICATE_SET_NAMES
-#ifdef  PREVENT_DUPLICATE_SET_NAMES
 	if (name != NULL) {
 		CFArrayRef      sets;
 
@@ -1152,18 +1402,12 @@ SCNetworkSetSetName(SCNetworkSetRef set, CFStringRef name)
 
 	// if known, store non-localized name
 
-	if ((name != NULL) && (bundle != NULL) && (non_localized != NULL)) {
+	if ((name != NULL) && (non_localized != NULL)) {
 		if (localized == NULL) {
-			localized = CFBundleCopyLocalizedString(bundle,
-								CFSTR("DEFAULT_SET_NAME"),
-								CFSTR("Automatic"),
-								NULL);
+			localized = copy_default_set_name(TRUE);
 		}
-
-		if (localized != NULL) {
-			if (CFEqual(name, localized)) {
-				name = non_localized;
-			}
+		if (CFEqual(name, localized)) {
+			name = non_localized;
 		}
 	}
 
@@ -1195,6 +1439,10 @@ SCNetworkSetSetName(SCNetworkSetRef set, CFStringRef name)
 
     done :
 
+	if (ok) {
+		SC_log(LOG_DEBUG, "SCNetworkSetSetName(): %@", set);
+	}
+
 	if (localized != NULL)		CFRelease(localized);
 	if (non_localized != NULL)	CFRelease(non_localized);
 	return ok;
@@ -1204,7 +1452,10 @@ SCNetworkSetSetName(SCNetworkSetRef set, CFStringRef name)
 Boolean
 SCNetworkSetSetServiceOrder(SCNetworkSetRef set, CFArrayRef newOrder)
 {
+	CFMutableArrayRef	cleanOrder;
 	CFDictionaryRef		dict;
+	CFIndex			i;
+	CFIndex			n;
 	CFMutableDictionaryRef  newDict;
 	Boolean			ok;
 	CFStringRef		path;
@@ -1215,10 +1466,15 @@ SCNetworkSetSetServiceOrder(SCNetworkSetRef set, CFArrayRef newOrder)
 		return FALSE;
 	}
 
-	if (isA_CFArray(newOrder)) {
-		CFIndex	i;
-		CFIndex	n	= CFArrayGetCount(newOrder);
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "SCNetworkSetSetServiceOrder() w/removed set\n  set = %@", set);
+		_SC_crash_once("SCNetworkSetSetServiceOrder() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
 
+	if (isA_CFArray(newOrder)) {
+		n = CFArrayGetCount(newOrder);
 		for (i = 0; i < n; i++) {
 			CFStringRef	serviceID;
 
@@ -1248,7 +1504,24 @@ SCNetworkSetSetServiceOrder(SCNetworkSetRef set, CFArrayRef newOrder)
 						    &kCFTypeDictionaryValueCallBacks);
 	}
 
-	CFDictionarySetValue(newDict, kSCPropNetServiceOrder, newOrder);
+	cleanOrder = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
+	n = CFArrayGetCount(newOrder);
+	for (i = 0; i < n; i++) {
+		CFIndex		nClean		= CFArrayGetCount(cleanOrder);
+		CFStringRef	serviceID	= CFArrayGetValueAtIndex(newOrder, i);
+
+		if ((nClean == 0) ||
+		    !CFArrayContainsValue(cleanOrder, CFRangeMake(0, nClean), serviceID)) {
+			// if first reference to this serviceID
+			CFArrayAppendValue(cleanOrder, serviceID);
+		} else {
+			// skip duplicate serviceID
+			SC_log(LOG_ERR, "SCNetworkSetSetServiceOrder() found duplicate serviceID: removed %@\n", serviceID);
+		}
+	}
+	CFDictionarySetValue(newDict, kSCPropNetServiceOrder, cleanOrder);
+	CFRelease(cleanOrder);
+
 	ok = SCPreferencesPathSetValue(setPrivate->prefs, path, newDict);
 	CFRelease(newDict);
 	CFRelease(path);
@@ -1261,6 +1534,31 @@ SCNetworkSetSetServiceOrder(SCNetworkSetRef set, CFArrayRef newOrder)
 #pragma mark SCNetworkSet SPIs
 
 
+__private_extern__
+Boolean
+__SCNetworkSetExists(SCNetworkSetRef set)
+{
+	CFDictionaryRef			entity;
+	CFStringRef			path;
+	SCNetworkSetPrivateRef		setPrivate	= (SCNetworkSetPrivateRef)set;
+
+	if (setPrivate->prefs == NULL) {
+		return FALSE;
+	}
+
+	path = SCPreferencesPathKeyCreateSet(NULL, setPrivate->setID);
+	entity = SCPreferencesPathGetValue(setPrivate->prefs, path);
+	CFRelease(path);
+
+	if (!isA_CFDictionary(entity)) {
+		// if no "set"
+		return FALSE;
+	}
+
+	return TRUE;
+}
+
+
 static void
 add_supported_interfaces(CFMutableArrayRef interface_list, SCNetworkInterfaceRef interface)
 {
@@ -1396,7 +1694,7 @@ copyServices(SCNetworkSetRef set)
 
 
 #if	!TARGET_OS_IPHONE
-static CFArrayRef
+static CF_RETURNS_RETAINED CFArrayRef
 updateServices(CFArrayRef services, SCNetworkInterfaceRef interface)
 {
 	CFStringRef		bsdName;
@@ -1460,17 +1758,51 @@ skipInterface(SCNetworkInterfaceRef interface)
 }
 
 
+CFComparisonResult
+_SCNetworkSetCompare(const void *val1, const void *val2, void *context)
+{
+#pragma unused(context)
+	CFStringRef	id1;
+	CFStringRef	id2;
+	CFStringRef	name1;
+	CFStringRef	name2;
+	SCNetworkSetRef	s1	= (SCNetworkSetRef)val1;
+	SCNetworkSetRef	s2	= (SCNetworkSetRef)val2;
+
+	name1 = SCNetworkSetGetName(s1);
+	name2 = SCNetworkSetGetName(s2);
+
+	if (name1 != NULL) {
+		if (name2 != NULL) {
+			return CFStringCompare(name1, name2, 0);
+		} else {
+			return kCFCompareLessThan;
+		}
+	}
+
+	if (name2 != NULL) {
+		return kCFCompareGreaterThan;
+	}
+
+	id1 = SCNetworkSetGetSetID(s1);
+	id2 = SCNetworkSetGetSetID(s2);
+	return CFStringCompare(id1, id2, 0);
+}
+
+
 static Boolean
 __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CFArrayRef interfaces, Boolean excludeHidden)
 {
-	CFSetRef		excluded	= NULL;
+	CFSetRef		excluded;
 	CFIndex			i;
 	CFIndex			n		= 0;
 	Boolean			ok		= TRUE;
 	CFArrayRef		services;
 	SCNetworkSetPrivateRef	setPrivate	= (SCNetworkSetPrivateRef)set;
 	Boolean			updated		= FALSE;
+#if	!TARGET_OS_IPHONE
 	Boolean			updatedIFs	= FALSE;
+#endif	// !TARGET_OS_IPHONE
 
 #if	TARGET_OS_IPHONE
 	CFArrayRef		orphans		= NULL;
@@ -1505,7 +1837,7 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 #if	!TARGET_OS_IPHONE
 	// look for interfaces that should auto-magically be added
 	// to an Ethernet bridge
-	n = (interfaces != NULL) ? CFArrayGetCount(interfaces) : 0;
+	n = ((services != NULL) && (interfaces != NULL)) ? CFArrayGetCount(interfaces) : 0;
 	for (i = 0; i < n; i++) {
 		SCBridgeInterfaceRef	bridge		= NULL;
 		SCNetworkInterfaceRef	interface;
@@ -1517,8 +1849,7 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 			continue;
 		}
 
-		if ((excluded != NULL)
-		    && CFSetContainsValue(excluded, interface)) {
+		if (CFSetContainsValue(excluded, interface)) {
 			// if this interface is a member of a Bond or Bridge
 			continue;
 		}
@@ -1560,10 +1891,9 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 			ok = SCBridgeInterfaceSetMemberInterfaces(bridge, newMembers);
 			CFRelease(newMembers);
 			if (!ok) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("could not update bridge with \"%@\": %s\n"),
-				      SCNetworkInterfaceGetLocalizedDisplayName(interface),
-				      SCErrorString(SCError()));
+				SC_log(LOG_INFO, "could not update bridge with \"%@\": %s",
+				       SCNetworkInterfaceGetLocalizedDisplayName(interface),
+				       SCErrorString(SCError()));
 				CFRelease(bridge);
 				continue;
 			}
@@ -1599,7 +1929,7 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 	}
 #endif	// !TARGET_OS_IPHONE
 
-	n = (interfaces != NULL) ? CFArrayGetCount(interfaces) : 0;
+	n = ((services != NULL) && (interfaces != NULL)) ? CFArrayGetCount(interfaces) : 0;
 	for (i = 0; i < n; i++) {
 		SCNetworkInterfaceRef	interface;
 		CFMutableArrayRef	interface_list;
@@ -1611,8 +1941,7 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 			continue;
 		}
 
-		if ((excluded != NULL)
-		    && CFSetContainsValue(excluded, interface)) {
+		if (CFSetContainsValue(excluded, interface)) {
 			// if this interface is a member of a Bond or Bridge
 			continue;
 		}
@@ -1636,20 +1965,18 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 
 				service = SCNetworkServiceCreate(setPrivate->prefs, interface);
 				if (service == NULL) {
-					SCLog(TRUE, LOG_DEBUG,
-					      CFSTR("could not create service for \"%@\": %s\n"),
-					      SCNetworkInterfaceGetLocalizedDisplayName(interface),
-					      SCErrorString(SCError()));
+					SC_log(LOG_ERR, "could not create service for \"%@\": %s",
+					       SCNetworkInterfaceGetLocalizedDisplayName(interface),
+					       SCErrorString(SCError()));
 					ok = FALSE;
 					goto nextInterface;
 				}
 
 				ok = SCNetworkServiceEstablishDefaultConfiguration(service);
 				if (!ok) {
-					SCLog(TRUE, LOG_DEBUG,
-					      CFSTR("could not estabish default configuration for \"%@\": %s\n"),
-					      SCNetworkInterfaceGetLocalizedDisplayName(interface),
-					      SCErrorString(SCError()));
+					SC_log(LOG_ERR, "could not estabish default configuration for \"%@\": %s",
+					       SCNetworkInterfaceGetLocalizedDisplayName(interface),
+					       SCErrorString(SCError()));
 					SCNetworkServiceRemove(service);
 					CFRelease(service);
 					goto nextInterface;
@@ -1657,10 +1984,9 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 
 				ok = SCNetworkSetAddService(set, service);
 				if (!ok) {
-					SCLog(TRUE, LOG_DEBUG,
-					      CFSTR("could not add service for \"%@\": %s\n"),
-					      SCNetworkInterfaceGetLocalizedDisplayName(interface),
-					      SCErrorString(SCError()));
+					SC_log(LOG_ERR, "could not add service for \"%@\": %s",
+					       SCNetworkInterfaceGetLocalizedDisplayName(interface),
+					       SCErrorString(SCError()));
 					SCNetworkServiceRemove(service);
 					CFRelease(service);
 					goto nextInterface;
@@ -1678,9 +2004,13 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 		}
 		CFRelease(interface_list);
 	}
-	if (updatedIFs)		CFRelease(interfaces);
+#if	!TARGET_OS_IPHONE
+	if (updatedIFs && (interfaces != NULL)) {
+		CFRelease(interfaces);
+	}
+#endif	// !TARGET_OS_IPHONE
 	if (services != NULL)	CFRelease(services);
-	if (excluded != NULL)	CFRelease(excluded);
+	CFRelease(excluded);
 
 #if	TARGET_OS_IPHONE
 	if (orphans != NULL) {
@@ -1705,9 +2035,19 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF
 	}
 #endif	// TARGET_OS_IPHONE
 
-	if (ok && !updated) {
-		// if no changes were made
-		_SCErrorSet(kSCStatusOK);
+	if (ok) {
+		if (updated) {
+			CFStringRef	model;
+
+			model = SCPreferencesGetValue(setPrivate->prefs, MODEL);
+			if (model == NULL) {
+				model = _SC_hw_model(FALSE);
+				SCPreferencesSetValue(setPrivate->prefs, MODEL, model);
+			}
+		} else {
+			// if no changes were made
+			_SCErrorSet(kSCStatusOK);
+		}
 	}
 
 	return updated;
@@ -1930,6 +2270,15 @@ _SCNetworkSetSetSetID(SCNetworkSetRef set, CFStringRef newSetID)
 		return FALSE;
 	}
 
+	if (!__SCNetworkSetExists(set)) {
+		SC_log(LOG_ERR, "_SCNetworkSetSetSetID() w/removed set\n  set = %@\n  setID = %@",
+		       set,
+		       newSetID);
+		_SC_crash_once("_SCNetworkSetSetSetID() w/removed set", NULL, NULL);
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	// If newSetID is equal to current setID, our work is done
 	if (CFEqual(newSetID, setPrivate->setID)) {
 		return TRUE;
@@ -1971,9 +2320,11 @@ _SCNetworkSetSetSetID(SCNetworkSetRef set, CFStringRef newSetID)
 		CFRelease(currentSet);
 	}
 
+	SC_log(LOG_DEBUG, "_SCNetworkSetSetID(): %@ --> %@", set, newSetID);
+
+	// replace setID with new one
 	CFRetain(newSetID);
 	CFRelease(setPrivate->setID);
-
 	setPrivate->setID = newSetID;
 
 	if (updateCurrentSet) {
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkSignature.c b/src/configd/SystemConfiguration.fproj/SCNetworkSignature.c
index 4e2541f43..69371985a 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkSignature.c
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkSignature.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2006, 2008, 2009, 2011-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2006, 2008, 2009, 2011-2019 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@
  */
 
@@ -49,7 +49,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #pragma mark SCNetworkSignature Supporting APIs
 
@@ -89,9 +89,9 @@ create_ipv6_services_pattern(void)
 }
 
 static CFDictionaryRef
-copy_services_for_address_family(CFAllocatorRef alloc,
-				 int af)
+copy_services_for_address_family(CFAllocatorRef alloc, int af)
 {
+#pragma unused(alloc)
 	CFDictionaryRef info;
 	CFArrayRef      patterns;
 	CFStringRef     pattern;
@@ -134,6 +134,7 @@ CFStringRef
 SCNetworkSignatureCopyActiveIdentifierForAddress(CFAllocatorRef alloc,
 						 const struct sockaddr * addr)
 {
+#pragma unused(alloc)
 	CFStringRef		ident	= NULL;
 	CFDictionaryRef		info = NULL;
 	CFStringRef		global_state_v4_key = NULL;
@@ -157,7 +158,7 @@ SCNetworkSignatureCopyActiveIdentifierForAddress(CFAllocatorRef alloc,
 
 	/* ALIGN: force alignment */
 	sin_p = (struct sockaddr_in *)(void *)addr;
-	bcopy(&sin_p->sin_addr.s_addr, &s_addr, sizeof(s_addr));
+	memcpy(&s_addr, &sin_p->sin_addr.s_addr, sizeof(s_addr));
 	if (s_addr != 0) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		goto done;
@@ -235,6 +236,7 @@ done:
 CFArrayRef /* of CFStringRef's */
 SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc)
 {
+#pragma unused(alloc)
 	CFMutableArrayRef	active = NULL;
 	CFIndex			count = 0;
 	CFStringRef		global_setup_v4_key = NULL;
@@ -316,8 +318,7 @@ SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc)
 			/* Does this service have a signature? */
 			if (isA_CFDictionary(service_info) != NULL) {
 				network_sig = CFDictionaryGetValue(service_info, kStoreKeyNetworkSignature);
-				if (isA_CFString(network_sig) != NULL
-				    && CFArrayContainsValue(active, range, network_sig) == FALSE) {
+				if (isA_CFString(network_sig) && !CFArrayContainsValue(active, range, network_sig)) {
 					CFArrayAppendValue(active, network_sig);
 					network_sig = NULL;
 					range.length++;
@@ -350,8 +351,7 @@ SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc)
 		network_sig = CFDictionaryGetValue(service_dict,
 						   kStoreKeyNetworkSignature);
 		/* Does this service have a signature? */
-		if (isA_CFString(network_sig) != NULL
-		    && CFArrayContainsValue(active, range, network_sig) == FALSE) {
+		if (isA_CFString(network_sig) && !CFArrayContainsValue(active, range, network_sig)) {
 			CFArrayAppendValue(active, network_sig);
 			range.length++;
 			network_sig = NULL;
@@ -413,7 +413,7 @@ SCNetworkSignatureCopyIdentifierForConnectedSocket(CFAllocatorRef alloc,
 	CFDictionaryRef		service_info	= NULL;
 	int			status		= kSCStatusFailed;
 
-	if (copyconninfo(sock_fd, CONNID_ANY, &info) != 0) {
+	if (copyconninfo(sock_fd, SAE_CONNID_ANY, &info) != 0) {
 		status = kSCStatusInvalidArgument;
 		goto done;
 	}
diff --git a/src/configd/SystemConfiguration.fproj/SCNetworkSignature.h b/src/configd/SystemConfiguration.fproj/SCNetworkSignature.h
index 675ae3f6b..974b9bc34 100644
--- a/src/configd/SystemConfiguration.fproj/SCNetworkSignature.h
+++ b/src/configd/SystemConfiguration.fproj/SCNetworkSignature.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2006, 2008, 2011, 2012 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 
@@ -46,7 +46,7 @@ __BEGIN_DECLS
 	@function SCNetworkSignatureCopyActiveIdentifiers
 	@discussion Find all currently active networks and return a list of
 		(string) identifiers, one for each network.
-	@param allocator The CFAllocator that should be used to allocate
+	@param alloc The CFAllocator that should be used to allocate
 		memory for the local dynamic store object.
 		This parameter may be NULL in which case the current
 		default CFAllocator is used. If this reference is not
@@ -55,14 +55,14 @@ __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
 	@discussion Find the one active network associated with the specified
 		address and return the unique (string) identifier that
 		represents it.
-	@param allocator The CFAllocator that should be used to allocate
+	@param alloc The CFAllocator that should be used to allocate
 		memory for the local dynamic store object.
 		This parameter may be NULL in which case the current
 		default CFAllocator is used. If this reference is not
@@ -75,13 +75,13 @@ 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
 	@discussion Find the identifier for the given file descriptor
 		corresponding to a connected socket.
-	@param allocator The CFAllocator that should be used to allocate
+	@param alloc The CFAllocator that should be used to allocate
 		memory for the local dynamic store object.
 		This parameter may be NULL in which case the current
 		default CFAllocator is used. If this reference is not
@@ -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/src/configd/SystemConfiguration.fproj/SCP.c b/src/configd/SystemConfiguration.fproj/SCP.c
index bc55bb00e..2e223eb83 100644
--- a/src/configd/SystemConfiguration.fproj/SCP.c
+++ b/src/configd/SystemConfiguration.fproj/SCP.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2003-2005, 2007-2009, 2011, 2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2003-2005, 2007-2009, 2011, 2014-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@
  */
 
@@ -31,8 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 #include "SCNetworkConfigurationInternal.h"
 
@@ -106,11 +104,11 @@ __SCPreferencesPath(CFAllocatorRef	allocator,
 	pathStr = _SC_cfstring_to_cstring(path, NULL, 0, kCFStringEncodingASCII);
 	if (pathStr == NULL) {
 		CFIndex pathLen;
-		
+
 		pathLen = CFStringGetMaximumSizeOfFileSystemRepresentation(path);
-		pathStr = CFAllocatorAllocate(NULL, pathLen, 0);		
-		if (CFStringGetFileSystemRepresentation(path, pathStr, pathLen) == FALSE) {
-			SCLog(_sc_verbose, LOG_DEBUG, CFSTR("could not convert path to C string"));
+		pathStr = CFAllocatorAllocate(NULL, pathLen, 0);
+		if (!CFStringGetFileSystemRepresentation(path, pathStr, pathLen)) {
+			SC_log(LOG_INFO, "could not convert path to C string");
 			CFAllocatorDeallocate(NULL, pathStr);
 			pathStr = NULL;
 		}
@@ -134,6 +132,24 @@ __SCPreferencesGetLimitSCNetworkConfiguration(SCPreferencesRef prefs)
 }
 
 
+__private_extern__
+off_t
+__SCPreferencesPrefsSize(SCPreferencesRef prefs)
+{
+	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+	SCPSignatureDataRef	sig;
+	CFDataRef		signature;
+
+	signature = prefsPrivate->signature;
+	if (signature == NULL) {
+		return 0;
+	}
+
+	sig = (SCPSignatureDataRef)(void *)CFDataGetBytePtr(signature);
+	return sig->st_size;
+}
+
+
 __private_extern__
 Boolean
 __SCPreferencesUsingDefaultPrefs(SCPreferencesRef prefs)
@@ -168,27 +184,27 @@ __SCPreferencesCreateNIPrefsFromPrefs(SCPreferencesRef prefs)
 	SCPreferencesRef ni_prefs = NULL;
 	SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs;
 	char * prefsPath = __SCPreferencesPath(NULL, prefsPrivate->prefsID, FALSE);
-	
-	
+
+
 	newPath = CFStringCreateMutable(NULL, 0);
 	CFStringAppendFormat(newPath, NULL, CFSTR("%s"), prefsPath);
-	
-	CFStringFindAndReplace(newPath, PREFS_DEFAULT_CONFIG,
+
+	CFStringFindAndReplace(newPath,
+			       PREFS_DEFAULT_CONFIG,
 			       NETWORK_INTERFACES_PREFS,
 			       CFRangeMake(0, CFStringGetLength(newPath)),
 			       kCFCompareBackwards);
-	
+
 	newURL = CFURLCreateWithFileSystemPath(NULL, newPath, kCFURLPOSIXPathStyle, FALSE);
-	if (CFURLResourceIsReachable(newURL, NULL) == FALSE) {
+	if (!CFURLResourceIsReachable(newURL, NULL)) {
 		ni_prefs = __SCNetworkCreateDefaultNIPrefs(newPath);
-	}
-	else {
+	} else {
 		ni_prefs = SCPreferencesCreate(NULL, prefsPrivate->name, newPath);
 	}
 	CFAllocatorDeallocate(NULL, prefsPath);
 	CFRelease(newPath);
 	CFRelease(newURL);
-	
+
 	return ni_prefs;
 }
 
diff --git a/src/configd/SystemConfiguration.fproj/SCPAdd.c b/src/configd/SystemConfiguration.fproj/SCPAdd.c
index 2168f50e4..438e7e8ef 100644
--- a/src/configd/SystemConfiguration.fproj/SCPAdd.c
+++ b/src/configd/SystemConfiguration.fproj/SCPAdd.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2004, 2016 Apple Computer, 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@
  */
 
@@ -31,8 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 Boolean
diff --git a/src/configd/SystemConfiguration.fproj/SCPApply.c b/src/configd/SystemConfiguration.fproj/SCPApply.c
index f913dc98e..6bef94104 100644
--- a/src/configd/SystemConfiguration.fproj/SCPApply.c
+++ b/src/configd/SystemConfiguration.fproj/SCPApply.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004-2006, 2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2004-2006, 2010, 2015, 2016 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@
  */
 
@@ -31,8 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
 
@@ -103,7 +101,7 @@ SCPreferencesApplyChanges(SCPreferencesRef prefs)
 	wasLocked = prefsPrivate->locked;
 	if (!wasLocked) {
 		if (!SCPreferencesLock(prefs, TRUE)) {
-			SCLog(_sc_verbose, LOG_DEBUG, CFSTR("SCPreferencesApplyChanges SCPreferencesLock() failed"));
+			SC_log(LOG_INFO, "SCPreferencesLock() failed");
 			return FALSE;
 		}
 	}
@@ -113,15 +111,14 @@ SCPreferencesApplyChanges(SCPreferencesRef prefs)
 		goto done;
 	}
 
+	SC_log(LOG_INFO, "SCPreferences() apply: %s",
+	       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
+
 	/* post notification */
-	if (prefsPrivate->session == NULL) {
-		ok = TRUE;
-	} else {
-		ok = SCDynamicStoreNotifyValue(prefsPrivate->session, prefsPrivate->sessionKeyApply);
-		if (!ok) {
-			SCLog(_sc_verbose, LOG_DEBUG, CFSTR("SCPreferencesApplyChanges SCDynamicStoreNotifyValue() failed"));
-			_SCErrorSet(kSCStatusFailed);
-		}
+	ok = SCDynamicStoreNotifyValue(NULL, prefsPrivate->sessionKeyApply);
+	if (!ok) {
+		SC_log(LOG_INFO, "SCDynamicStoreNotifyValue() failed");
+		_SCErrorSet(kSCStatusFailed);
 	}
 
     done :
diff --git a/src/configd/SystemConfiguration.fproj/SCPCommit.c b/src/configd/SystemConfiguration.fproj/SCPCommit.c
index 15f5ef8a0..42b9890bb 100644
--- a/src/configd/SystemConfiguration.fproj/SCPCommit.c
+++ b/src/configd/SystemConfiguration.fproj/SCPCommit.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2008, 2010-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2008, 2010-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@
  */
 
@@ -32,8 +32,6 @@
  */
 
 #include 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
 
@@ -61,10 +59,8 @@ __SCPreferencesCommitChanges_helper(SCPreferencesRef prefs)
 		if (!ok) {
 			status = kSCStatusFailed;
 			if (_sc_verbose) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("SCPreferencesCommitChanges(-->helper) CFPropertyListCreateData() failed"));
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("  prefs = %s"),
+				SC_log(LOG_NOTICE, "_SCSerialize() failed");
+				SC_log(LOG_NOTICE, "  prefs = %s",
 				      prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
 			}
 			goto error;
@@ -158,7 +154,7 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 	wasLocked = prefsPrivate->locked;
 	if (!wasLocked) {
 		if (!SCPreferencesLock(prefs, TRUE)) {
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges SCPreferencesLock() failed"));
+			SC_log(LOG_INFO, "SCPreferencesLock() failed");
 			return FALSE;
 		}
 	}
@@ -201,16 +197,18 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 		int		fd;
 		CFDataRef	newPrefs;
 		CFIndex		pathLen;
+		CFStringRef	protectionClass;
 		char *		thePath;
 
 		if (stat(prefsPrivate->path, &statBuf) == -1) {
 			if (errno == ENOENT) {
-				bzero(&statBuf, sizeof(statBuf));
+				memset(&statBuf, 0, sizeof(statBuf));
 				statBuf.st_mode = 0644;
 				statBuf.st_uid  = geteuid();
 				statBuf.st_gid  = getegid();
 			} else {
-				SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges stat() failed: %s"), strerror(errno));
+				_SCErrorSet(errno);
+				SC_log(LOG_INFO, "stat() failed: %s", strerror(errno));
 				goto done;
 			}
 		}
@@ -220,10 +218,31 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 		thePath = CFAllocatorAllocate(NULL, pathLen, 0);
 		snprintf(thePath, pathLen, "%s-new", path);
 
-		fd = open(thePath, O_WRONLY|O_CREAT, statBuf.st_mode);
+		if ((prefsPrivate->options != NULL) &&
+		    CFDictionaryGetValueIfPresent(prefsPrivate->options,
+						  kSCPreferencesOptionProtectionClass,
+						  (const void **)&protectionClass)) {
+			int		pc;
+			const char	*str;
+
+			if (!isA_CFString(protectionClass) ||
+			    (CFStringGetLength(protectionClass) != 1) ||
+			    ((str = CFStringGetCStringPtr(protectionClass, kCFStringEncodingASCII)) == NULL) ||
+			    (str[0] < 'A') || (str[0] > 'F')
+			    ) {
+				_SCErrorSet(kSCStatusInvalidArgument);
+				goto done;
+			}
+
+			pc = str[0] - 'A' + 1;	// PROTECTION_CLASS_[ABCDEF]
+			fd = open_dprotected_np(thePath, O_WRONLY|O_CREAT, pc, 0, statBuf.st_mode);
+		} else {
+			fd = open(thePath, O_WRONLY|O_CREAT, statBuf.st_mode);
+		}
+
 		if (fd == -1) {
 			_SCErrorSet(errno);
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges open() failed: %s"), strerror(errno));
+			SC_log(LOG_NOTICE, "open() failed: %s", strerror(errno));
 			CFAllocatorDeallocate(NULL, thePath);
 			goto done;
 		}
@@ -244,16 +263,16 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 						    NULL);
 		if (!newPrefs) {
 			_SCErrorSet(kSCStatusFailed);
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges CFPropertyListCreateData() failed"));
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("  prefs = %s"), path);
+			SC_log(LOG_INFO, "CFPropertyListCreateData() failed");
+			SC_log(LOG_INFO, "  prefs = %s", path);
 			CFAllocatorDeallocate(NULL, thePath);
 			(void) close(fd);
 			goto done;
 		}
 		if (writen(fd, (const void *)CFDataGetBytePtr(newPrefs), CFDataGetLength(newPrefs)) == -1) {
 			_SCErrorSet(errno);
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges write() failed: %s"), strerror(errno));
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("  path = %s"), thePath);
+			SC_log(LOG_INFO, "writen() failed: %s", strerror(errno));
+			SC_log(LOG_INFO, "  path = %s", thePath);
 			(void) unlink(thePath);
 			CFAllocatorDeallocate(NULL, thePath);
 			(void) close(fd);
@@ -264,8 +283,8 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 		/* new preferences have been written */
 		if (close(fd) == -1) {
 			_SCErrorSet(errno);
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges close() failed: %s"), strerror(errno));
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("  path = %s"), thePath);
+			SC_log(LOG_INFO, "close() failed: %s", strerror(errno));
+			SC_log(LOG_INFO, "  path = %s", thePath);
 			(void) unlink(thePath);
 			CFAllocatorDeallocate(NULL, thePath);
 			CFRelease(newPrefs);
@@ -276,8 +295,8 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 		/* rename new->old */
 		if (rename(thePath, path) == -1) {
 			_SCErrorSet(errno);
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges rename() failed: %s"), strerror(errno));
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("  path = %s --> %s"), thePath, path);
+			SC_log(LOG_INFO, "rename() failed: %s", strerror(errno));
+			SC_log(LOG_INFO, "  path = %s --> %s", thePath, path);
 			CFAllocatorDeallocate(NULL, thePath);
 			goto done;
 		}
@@ -295,8 +314,8 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 		/* grab the new signature */
 		if (stat(path, &statBuf) == -1) {
 			_SCErrorSet(errno);
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges stat() failed: %s"), strerror(errno));
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("  path = %s"), thePath);
+			SC_log(LOG_INFO, "stat() failed: %s", strerror(errno));
+			SC_log(LOG_INFO, "  path = %s", thePath);
 			goto done;
 		}
 	} else {
@@ -304,7 +323,7 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 		unlink(path);
 
 		/* init the new signature */
-		bzero(&statBuf, sizeof(statBuf));
+		memset(&statBuf, 0, sizeof(statBuf));
 	}
 
 	/* update signature */
@@ -313,16 +332,16 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs)
 
     committed :
 
+	SC_log(LOG_INFO, "SCPreferences() commit: %s, size=%lld",
+	       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path,
+	       __SCPreferencesPrefsSize(prefs));
+
 	/* post notification */
-	if (prefsPrivate->session == NULL) {
-		ok = TRUE;
-	} else {
-		ok = SCDynamicStoreNotifyValue(prefsPrivate->session, prefsPrivate->sessionKeyCommit);
-		if (!ok) {
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges SCDynamicStoreNotifyValue() failed"));
-			_SCErrorSet(kSCStatusFailed);
-			goto done;
-		}
+	ok = SCDynamicStoreNotifyValue(NULL, prefsPrivate->sessionKeyCommit);
+	if (!ok) {
+		SC_log(LOG_INFO, "SCDynamicStoreNotifyValue() failed");
+		_SCErrorSet(kSCStatusFailed);
+		goto done;
 	}
 
 	prefsPrivate->changed = FALSE;
diff --git a/src/configd/SystemConfiguration.fproj/SCPGet.c b/src/configd/SystemConfiguration.fproj/SCPGet.c
index f83471c5b..1500f0962 100644
--- a/src/configd/SystemConfiguration.fproj/SCPGet.c
+++ b/src/configd/SystemConfiguration.fproj/SCPGet.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2004, 2016 Apple Computer, 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,8 +35,6 @@
 #include 
 #include 
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 CFPropertyListRef
diff --git a/src/configd/SystemConfiguration.fproj/SCPList.c b/src/configd/SystemConfiguration.fproj/SCPList.c
index fa5437d51..d6fa5aacd 100644
--- a/src/configd/SystemConfiguration.fproj/SCPList.c
+++ b/src/configd/SystemConfiguration.fproj/SCPList.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005, 2016 Apple Computer, 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@
  */
 
@@ -31,8 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 CFArrayRef
diff --git a/src/configd/SystemConfiguration.fproj/SCPLock.c b/src/configd/SystemConfiguration.fproj/SCPLock.c
index ba5201b06..3de6de562 100644
--- a/src/configd/SystemConfiguration.fproj/SCPLock.c
+++ b/src/configd/SystemConfiguration.fproj/SCPLock.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2010, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2010, 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@
  */
 
@@ -31,9 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
 
@@ -48,7 +45,6 @@
 #include 
 
 
-
 static Boolean
 __SCPreferencesLock_helper(SCPreferencesRef prefs, Boolean wait)
 {
@@ -80,7 +76,7 @@ __SCPreferencesLock_helper(SCPreferencesRef prefs, Boolean wait)
 		goto error;
 	}
 
-	prefsPrivate->locked = TRUE;
+	__SCPreferencesUpdateLockedState(prefs, TRUE);
 	return TRUE;
 
     fail :
@@ -136,7 +132,7 @@ createParentDirectory(const char *path)
 			static	gid_t	group	= -1;
 
 			// set group
-			if (group == -1) {
+			if (group == (gid_t)-1) {
 				char		buf[256];
 				struct group	grp;
 				struct group	*grpP	= NULL;
@@ -145,24 +141,18 @@ createParentDirectory(const char *path)
 				    (grpP != NULL)) {
 					group = grpP->gr_gid;
 				} else {
-					SCLog(TRUE, LOG_ERR,
-					      CFSTR("SCPreferencesLock getgrnam_r() failed: %s"),
-					      strerror(errno));
+					SC_log(LOG_NOTICE, "getgrnam_r() failed: %s", strerror(errno));
 					group = 0;	// wheel
 				}
 			}
 
 			if (chown(dir, -1, group) == -1) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("SCPreferencesLock chown() failed: %s"),
-				      strerror(errno));
+				SC_log(LOG_NOTICE, "chown() failed: %s", strerror(errno));
 			}
 
 			// set [force] mode
 			if (chmod(dir, mode) == -1) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("SCPreferencesLock chmod() failed: %s"),
-				      strerror(errno));
+				SC_log(LOG_NOTICE, "chmod() failed: %s", strerror(errno));
 			}
 
 			if ((slash == NULL) || (scan == dir)) {
@@ -185,9 +175,7 @@ createParentDirectory(const char *path)
 		slash = strchr(scan + 1, '/');
 	}
 
-	SCLog(TRUE, LOG_ERR,
-	      CFSTR("SCPreferencesLock mkdir() failed: %s"),
-	      strerror(errno));
+	SC_log(LOG_NOTICE, "mkdir() failed: %s", strerror(errno));
 	return -1;
 }
 
@@ -195,30 +183,15 @@ createParentDirectory(const char *path)
 static void
 reportDelay(SCPreferencesRef prefs, struct timeval *delay, Boolean isStale)
 {
-	asl_object_t		m;
 	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)prefs;
-	char			str[256];
-
-	m = asl_new(ASL_TYPE_MSG);
-	asl_set(m, "com.apple.message.domain", "com.apple.SystemConfiguration.SCPreferencesLock");
-	(void) _SC_cfstring_to_cstring(prefsPrivate->name, str, sizeof(str), kCFStringEncodingUTF8);
-	asl_set(m, "com.apple.message.signature", str);
-	(void) _SC_cfstring_to_cstring(prefsPrivate->prefsID, str, sizeof(str), kCFStringEncodingUTF8);
-	asl_set(m, "com.apple.message.signature2", str);
-	(void) snprintf(str, sizeof(str),
-			"%d.%3.3d",
-			(int)delay->tv_sec,
-			delay->tv_usec / 1000);
-	asl_set(m, "com.apple.message.value", str);
-	SCLOG(NULL, m, ASL_LEVEL_DEBUG,
-	      CFSTR("SCPreferences(%@:%@) lock delayed for %d.%3.3d seconds%s"),
-	      prefsPrivate->name,
-	      prefsPrivate->prefsID,
-	      (int)delay->tv_sec,
-	      delay->tv_usec / 1000,
-	      isStale ? " (stale)" : "");
-	asl_release(m);
 
+	SC_log(LOG_ERR,
+	       "SCPreferences(%@:%@) lock delayed for %d.%3.3d seconds%s",
+	       prefsPrivate->name,
+	       prefsPrivate->prefsID,
+	       (int)delay->tv_sec,
+	       delay->tv_usec / 1000,
+	       isStale ? " (stale)" : "");
 	return;
 }
 
@@ -239,9 +212,7 @@ has_O_EXLOCK(SCPreferencesPrivateRef prefsPrivate)
 
 	fd = open(prefsPrivate->lockPath, O_WRONLY|O_CREAT, 0644);
 	if (fd == -1) {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SCPreferencesLock open() failed: %s"),
-		      strerror(errno));
+		SC_log(LOG_NOTICE, "open() failed: %s", strerror(errno));
 		return FALSE;
 	}
 
@@ -249,25 +220,21 @@ has_O_EXLOCK(SCPreferencesPrivateRef prefsPrivate)
 	unlink(prefsPrivate->lockPath);
 	close(fd);
 	if (ret == -1) {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SCPreferencesLock fstatfs() failed: %s"),
-		      strerror(errno));
+		SC_log(LOG_NOTICE, "fstatfs() failed: %s", strerror(errno));
 		return FALSE;
 	}
 
-	bzero(&attrs, sizeof(attrs));
+	memset(&attrs, 0, sizeof(attrs));
 	attrs.bitmapcount = ATTR_BIT_MAP_COUNT;
 	attrs.volattr     = ATTR_VOL_INFO | ATTR_VOL_CAPABILITIES;
-	bzero(&attrbuf, sizeof(attrbuf));
+	memset(&attrbuf, 0, sizeof(attrbuf));
 	ret = getattrlist(statbuf.f_mntonname,	// path (of mount point)
 			  &attrs,		// attribute list
 			  &attrbuf,		// attribute buffer
 			  sizeof(attrbuf),
 			  0);			// options
 	if (ret == -1) {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SCPreferencesLock getattrlist() failed: %s"),
-		      strerror(errno));
+		SC_log(LOG_NOTICE, "getattrlist() failed: %s", strerror(errno));
 		return FALSE;
 	}
 
@@ -281,12 +248,19 @@ has_O_EXLOCK(SCPreferencesPrivateRef prefsPrivate)
 
 
 static Boolean
-lockWithSCDynamicStore(SCPreferencesPrivateRef	prefsPrivate, Boolean wait)
+lockWithSCDynamicStore(SCPreferencesRef	prefs, Boolean wait)
 {
-	CFArrayRef	changes;
-	Boolean		locked		= FALSE;
-	Boolean		ok;
-	int		sc_status	= kSCStatusOK;
+	CFArrayRef		changes;
+	Boolean			locked		= FALSE;
+	Boolean			ok;
+	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+	int			sc_status	= kSCStatusOK;
+
+	// add SCDynamicStore session (for lock monitoring)
+	ok = __SCPreferencesAddSession(prefs);
+	if (!ok) {
+		return FALSE;
+	}
 
 	// add [lock] notification
 	ok = SCDynamicStoreAddWatchedKey(prefsPrivate->session,
@@ -294,7 +268,17 @@ lockWithSCDynamicStore(SCPreferencesPrivateRef	prefsPrivate, Boolean wait)
 					 FALSE);
 	if (!ok) {
 		sc_status = SCError();
-		SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesLock SCDynamicStoreAddWatchedKey() failed"));
+		SC_log(LOG_INFO, "SCDynamicStoreAddWatchedKey() failed");
+	}
+
+	// add SCDynamicStore session (for the actual lock)
+	if (ok) {
+		prefsPrivate->sessionNoO_EXLOCK = SCDynamicStoreCreate(NULL, prefsPrivate->name, NULL, NULL);
+		if (prefsPrivate->sessionNoO_EXLOCK == NULL) {
+			sc_status = SCError();
+			SC_log(LOG_INFO, "SCDynamicStoreCreate() failed");
+			ok = FALSE;
+		}
 	}
 
 	while (ok) {
@@ -302,7 +286,7 @@ lockWithSCDynamicStore(SCPreferencesPrivateRef	prefsPrivate, Boolean wait)
 
 		// Attempt to acquire the lock
 		value = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
-		ok = SCDynamicStoreAddTemporaryValue(prefsPrivate->session,
+		ok = SCDynamicStoreAddTemporaryValue(prefsPrivate->sessionNoO_EXLOCK,
 						     prefsPrivate->sessionKeyLock,
 						     value);
 		CFRelease(value);
@@ -320,7 +304,7 @@ lockWithSCDynamicStore(SCPreferencesPrivateRef	prefsPrivate, Boolean wait)
 		ok = SCDynamicStoreNotifyWait(prefsPrivate->session);
 		if (!ok) {
 			sc_status = SCError();
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesLock SCDynamicStoreNotifyWait() failed"));
+			SC_log(LOG_INFO, "SCDynamicStoreNotifyWait() failed");
 			break;
 		}
 
@@ -329,7 +313,7 @@ lockWithSCDynamicStore(SCPreferencesPrivateRef	prefsPrivate, Boolean wait)
 		if (changes != NULL) {
 			CFRelease(changes);
 		} else {
-			SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesLock SCDynamicStoreCopyNotifiedKeys() failed"));
+			SC_log(LOG_INFO, "SCDynamicStoreCopyNotifiedKeys() failed");
 			break;
 		}
 	}
@@ -345,9 +329,17 @@ lockWithSCDynamicStore(SCPreferencesPrivateRef	prefsPrivate, Boolean wait)
 		CFRelease(changes);
 	}
 
+	__SCPreferencesRemoveSession(prefs);
+
+	if (!locked && (prefsPrivate->sessionNoO_EXLOCK != NULL)) {
+		CFRelease(prefsPrivate->sessionNoO_EXLOCK);
+		prefsPrivate->sessionNoO_EXLOCK = NULL;
+	}
+
 	if (sc_status != kSCStatusOK) {
 		_SCErrorSet(sc_status);
 	}
+
 	return locked;
 }
 
@@ -384,12 +376,9 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
 		return FALSE;
 	}
 
-
 	pthread_mutex_lock(&prefsPrivate->lock);
 
-	if (prefsPrivate->session == NULL) {
-		__SCPreferencesAddSession(prefs);
-	}
+	__SCPreferencesAddSessionKeys(prefs);
 
 	if (prefsPrivate->lockPath == NULL) {
 		char	*path;
@@ -406,7 +395,7 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
     retry :
 
 	if (prefsPrivate->sessionKeyLock != NULL) {
-		if (lockWithSCDynamicStore(prefsPrivate, wait)) {
+		if (lockWithSCDynamicStore(prefs, wait)) {
 			goto locked;
 		}
 
@@ -427,9 +416,8 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
 					// create parent (/Library/Preferences/SystemConfiguration)
 					ret = createParentDirectory(prefsPrivate->lockPath);
 					if (ret == 0) {
-						SCLog(TRUE, LOG_NOTICE,
-						      CFSTR("created directory for \"%s\""),
-						      prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
+						SC_log(LOG_INFO, "created directory for \"%s\"",
+						       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
 						goto retry;
 					} else if (errno == EROFS) {
 						goto locked;
@@ -458,9 +446,7 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
 		}
 
 		sc_status = errno;
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SCPreferencesLock open() failed: %s"),
-		      strerror(errno));
+		SC_log(LOG_NOTICE, "open() failed: %s", strerror(errno));
 		goto error;
 	}
 
@@ -477,7 +463,7 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
 	// we have the lock
 
 	snprintf(buf, sizeof(buf), "%d\n", getpid());
-	write(prefsPrivate->lockFD, buf, strlen(buf));
+	(void) write(prefsPrivate->lockFD, buf, strlen(buf));
 
     locked :
 
@@ -495,10 +481,9 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
 		 */
 		if (stat(prefsPrivate->path, &statBuf) == -1) {
 			if (errno == ENOENT) {
-				bzero(&statBuf, sizeof(statBuf));
+				memset(&statBuf, 0, sizeof(statBuf));
 			} else {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("SCPreferencesLock stat() failed: %s"),
+				SC_log(LOG_INFO, "stat() failed: %s",
 				      strerror(errno));
 				goto stale;
 			}
@@ -528,7 +513,10 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait)
 		reportDelay(prefs, &lockElapsed, FALSE);
 	}
 
-	prefsPrivate->locked = TRUE;
+	SC_log(LOG_DEBUG, "SCPreferences() lock: %s",
+	       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
+
+	__SCPreferencesUpdateLockedState(prefs, TRUE);
 	pthread_mutex_unlock(&prefsPrivate->lock);
 	return TRUE;
 
diff --git a/src/configd/SystemConfiguration.fproj/SCPOpen.c b/src/configd/SystemConfiguration.fproj/SCPOpen.c
index 89ccbf4a2..05ef3a3f1 100644
--- a/src/configd/SystemConfiguration.fproj/SCPOpen.c
+++ b/src/configd/SystemConfiguration.fproj/SCPOpen.c
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright(c) 2000-2019 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  *
@@ -34,28 +34,37 @@
  * - initial revision
  */
 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "SCPreferencesInternal.h"
-#include "SCHelper_client.h"
-
-#include "dy_framework.h"
-
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
+
+#include "SCPreferencesInternal.h"
+#include "SCD.h"
+#include "SCHelper_client.h"
+#include "dy_framework.h"
 
 
 const AuthorizationRef	kSCPreferencesUseEntitlementAuthorization	= (AuthorizationRef)CFSTR("UseEntitlement");
 
 
+__private_extern__ os_log_t
+__log_SCPreferences(void)
+{
+	static os_log_t	log	= NULL;
+
+	if (log == NULL) {
+		log = os_log_create("com.apple.SystemConfiguration", "SCPreferences");
+	}
+
+	return log;
+}
+
+
 static __inline__ CFTypeRef
 isA_SCPreferences(CFTypeRef obj)
 {
@@ -72,9 +81,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"));
 	}
@@ -96,7 +106,14 @@ __SCPreferencesCopyDescription(CFTypeRef cf) {
 static void
 __SCPreferencesDeallocate(CFTypeRef cf)
 {
-	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)cf;
+	SCPreferencesRef	prefs		= (SCPreferencesRef)cf;
+	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+
+	SC_log(LOG_DEBUG, "release %@", prefsPrivate);
+
+	if (prefsPrivate->locked) {
+		__SCPreferencesUpdateLockedState(prefs, FALSE);
+	}
 
 	/* release resources */
 
@@ -115,7 +132,9 @@ __SCPreferencesDeallocate(CFTypeRef cf)
 	}
 	if (prefsPrivate->lockPath)		CFAllocatorDeallocate(NULL, prefsPrivate->lockPath);
 	if (prefsPrivate->signature)		CFRelease(prefsPrivate->signature);
-	if (prefsPrivate->session)		CFRelease(prefsPrivate->session);
+	if (prefsPrivate->sessionNoO_EXLOCK != NULL) {
+		CFRelease(prefsPrivate->sessionNoO_EXLOCK);
+	}
 	if (prefsPrivate->sessionKeyLock)	CFRelease(prefsPrivate->sessionKeyLock);
 	if (prefsPrivate->sessionKeyCommit)	CFRelease(prefsPrivate->sessionKeyCommit);
 	if (prefsPrivate->sessionKeyApply)	CFRelease(prefsPrivate->sessionKeyApply);
@@ -157,6 +176,7 @@ static pthread_once_t initialized	= PTHREAD_ONCE_INIT;
 
 static void
 __SCPreferencesInitialize(void) {
+	/* register with CoreFoundation */
 	__kSCPreferencesTypeID = _CFRuntimeRegisterClass(&__SCPreferencesClass);
 	return;
 }
@@ -181,38 +201,10 @@ __SCPreferencesCreatePrivate(CFAllocatorRef	allocator)
 		return NULL;
 	}
 
+	/* initialize non-zero/NULL members */
 	pthread_mutex_init(&prefsPrivate->lock, NULL);
-
-	prefsPrivate->name				= NULL;
-	prefsPrivate->prefsID				= NULL;
-	prefsPrivate->options				= NULL;
-	prefsPrivate->path				= NULL;
-	prefsPrivate->newPath				= NULL;		// new prefs path
-	prefsPrivate->locked				= FALSE;
 	prefsPrivate->lockFD				= -1;
-	prefsPrivate->lockPath				= NULL;
-	prefsPrivate->signature				= NULL;
-	prefsPrivate->session				= NULL;
-	prefsPrivate->sessionKeyLock			= NULL;
-	prefsPrivate->sessionKeyCommit			= NULL;
-	prefsPrivate->sessionKeyApply			= NULL;
-	prefsPrivate->scheduled				= FALSE;
-	prefsPrivate->rls				= NULL;
-	prefsPrivate->rlsFunction			= NULL;
-	prefsPrivate->rlsContext.info			= NULL;
-	prefsPrivate->rlsContext.retain			= NULL;
-	prefsPrivate->rlsContext.release		= NULL;
-	prefsPrivate->rlsContext.copyDescription	= NULL;
-	prefsPrivate->rlList				= NULL;
-	prefsPrivate->dispatchQueue			= NULL;
-	prefsPrivate->prefs				= NULL;
-	prefsPrivate->accessed				= FALSE;
-	prefsPrivate->changed				= FALSE;
 	prefsPrivate->isRoot				= (geteuid() == 0);
-	prefsPrivate->limit_SCNetworkConfiguration	= FALSE;
-	prefsPrivate->authorizationData			= NULL;
-	prefsPrivate->authorizationRequired		= FALSE;
-	prefsPrivate->helper_port			= MACH_PORT_NULL;
 
 	return prefsPrivate;
 }
@@ -467,11 +459,11 @@ __SCPreferencesCreate(CFAllocatorRef	allocator,
 				goto done;
 			}
 
-			SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCPreferencesCreate open() failed: %s"), strerror(errno));
+			SC_log(LOG_NOTICE, "open() failed: %s", strerror(errno));
 			sc_status = kSCStatusAccessError;
 			break;
 		default :
-			SCLog(TRUE, LOG_ERR, CFSTR("__SCPreferencesCreate open() failed: %s"), strerror(errno));
+			SC_log(LOG_NOTICE, "open() failed: %s", strerror(errno));
 			sc_status = kSCStatusFailed;
 			break;
 	}
@@ -503,20 +495,16 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 		return;
 	}
 
-	if (!prefsPrivate->authorizationRequired) {
-		if (access(prefsPrivate->path, R_OK) == 0) {
-			fd = open(prefsPrivate->path, O_RDONLY, 0644);
-		} else {
-			fd = -1;
-		}
+	if (access(prefsPrivate->path, R_OK) == 0) {
+		fd = open(prefsPrivate->path, O_RDONLY, 0644);
 	} else {
-		errno = EACCES;
+		fd = -1;
 	}
 	if (fd != -1) {
 		// create signature
 		if (fstat(fd, &statBuf) == -1) {
-			SCLog(TRUE, LOG_ERR, CFSTR("__SCPreferencesAccess fstat() failed: %s"), strerror(errno));
-			bzero(&statBuf, sizeof(statBuf));
+			SC_log(LOG_NOTICE, "fstat() failed: %s", strerror(errno));
+			memset(&statBuf, 0, sizeof(statBuf));
 		}
 	} else {
 		switch (errno) {
@@ -529,18 +517,17 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 					if (__SCPreferencesAccess_helper(prefs)) {
 						goto done;
 					} else {
-						SCLog(TRUE, LOG_ERR,
-						      CFSTR("__SCPreferencesAccess_helper() failed: %s"),
-						      SCErrorString(SCError()));
+						SC_log(LOG_NOTICE, "__SCPreferencesAccess_helper() failed: %s",
+						       SCErrorString(SCError()));
 					}
 					break;
 				}
 				// fall through
 			default :
-				SCLog(TRUE, LOG_ERR, CFSTR("__SCPreferencesAccess open() failed: %s"), strerror(errno));
+				SC_log(LOG_NOTICE, "open() failed: %s", strerror(errno));
 				break;
 		}
-		bzero(&statBuf, sizeof(statBuf));
+		memset(&statBuf, 0, sizeof(statBuf));
 	}
 
 	if (prefsPrivate->signature != NULL) CFRelease(prefsPrivate->signature);
@@ -558,7 +545,7 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 		CFDataSetLength(xmlData, (CFIndex)statBuf.st_size);
 		if (read(fd, (void *)CFDataGetBytePtr(xmlData), (CFIndex)statBuf.st_size) != (CFIndex)statBuf.st_size) {
 			/* corrupt prefs file, start fresh */
-			SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCPreferencesAccess read(): could not load preference data."));
+			SC_log(LOG_INFO, "read(): could not load preference data");
 			CFRelease(xmlData);
 			xmlData = NULL;
 			goto done;
@@ -572,9 +559,7 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 		if (dict == NULL) {
 			/* corrupt prefs file, start fresh */
 			if (error != NULL) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("__SCPreferencesAccess CFPropertyListCreateWithData(): %@"),
-				      error);
+				SC_log(LOG_NOTICE, "CFPropertyListCreateWithData(): %@", error);
 				CFRelease(error);
 			}
 			goto done;
@@ -585,7 +570,7 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 		 */
 		if (!isA_CFDictionary(dict)) {
 			/* corrupt prefs file, start fresh */
-			SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCPreferencesAccess CFGetTypeID(): not a dictionary."));
+			SC_log(LOG_INFO, "CFGetTypeID(): not a dictionary");
 			CFRelease(dict);
 			goto done;
 		}
@@ -604,7 +589,7 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 		/*
 		 * new file, create empty preferences
 		 */
-//		SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCPreferencesAccess(): creating new preferences file."));
+//		SC_log(LOG_INFO, "creating new preferences file");
 		prefsPrivate->prefs = CFDictionaryCreateMutable(allocator,
 								0,
 								&kCFTypeDictionaryKeyCallBacks,
@@ -612,6 +597,10 @@ __SCPreferencesAccess(SCPreferencesRef	prefs)
 		prefsPrivate->changed = TRUE;
 	}
 
+	SC_log(LOG_DEBUG, "SCPreferences() access: %s, size=%lld",
+	       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path,
+	       __SCPreferencesPrefsSize(prefs));
+
 	prefsPrivate->accessed = TRUE;
 	return;
 }
@@ -625,6 +614,10 @@ SCPreferencesCreate(CFAllocatorRef		allocator,
 	SCPreferencesPrivateRef	prefsPrivate;
 
 	prefsPrivate = __SCPreferencesCreate(allocator, name, prefsID, NULL, NULL);
+	if (prefsPrivate != NULL) {
+		SC_log(LOG_DEBUG, "create %@", prefsPrivate);
+	}
+
 	return (SCPreferencesRef)prefsPrivate;
 }
 
@@ -684,7 +677,7 @@ SCPreferencesCreateWithOptions(CFAllocatorRef	allocator,
 
 			os_status = AuthorizationMakeExternalForm(authorization, &extForm);
 			if (os_status != errAuthorizationSuccess) {
-				SCLog(TRUE, LOG_INFO, CFSTR("_SCHelperOpen AuthorizationMakeExternalForm() failed"));
+				SC_log(LOG_INFO, "AuthorizationMakeExternalForm() failed");
 				_SCErrorSet(kSCStatusInvalidArgument);
 				CFRelease(authorizationDict);
 				return NULL;
@@ -696,7 +689,7 @@ SCPreferencesCreateWithOptions(CFAllocatorRef	allocator,
 					     data);
 			CFRelease(data);
 		}
-#endif
+#endif	// !TARGET_OS_IPHONE
 
 		/* get the application/executable/bundle name */
 		bundle = CFBundleGetMainBundle();
@@ -730,15 +723,38 @@ SCPreferencesCreateWithOptions(CFAllocatorRef	allocator,
 		CFRelease(bundleID);
 
 		if (authorizationDict != NULL) {
-			_SCSerialize((CFPropertyListRef)authorizationDict,
-				     &authorizationData,
-				     NULL,
-				     NULL);
+			(void) _SCSerialize((CFPropertyListRef)authorizationDict,
+					    &authorizationData,
+					    NULL,
+					    NULL);
 			CFRelease(authorizationDict);
 		}
 	}
 
 	prefsPrivate = __SCPreferencesCreate(allocator, name, prefsID, authorizationData, options);
+	if (prefsPrivate != NULL) {
+		const char	*astr	= "";
+		const char	*ostr	= "";
+
+		if (options != NULL) {
+			ostr = "options";
+		}
+
+		if (authorization != NULL) {
+			if (authorization == kSCPreferencesUseEntitlementAuthorization) {
+				astr = "entitlement";
+			} else {
+				astr = "authorization";
+			}
+		}
+
+		SC_log(LOG_DEBUG, "create w/%s%s%s %@",
+		       ostr,
+		       ((ostr != "") && (astr != "")) ? " + " : "",
+		       astr,
+		       prefsPrivate);
+	}
+
 	if (authorizationData != NULL) CFRelease(authorizationData);
 
 	return (SCPreferencesRef)prefsPrivate;
@@ -755,6 +771,7 @@ SCPreferencesGetTypeID(void) {
 static void
 prefsNotify(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info)
 {
+#pragma unused(store)
 	void				*context_info;
 	void				(*context_release)(const void *);
 	CFIndex				i;
@@ -769,13 +786,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;
 		}
 	}
 
@@ -799,6 +822,11 @@ prefsNotify(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info)
 	pthread_mutex_unlock(&prefsPrivate->lock);
 
 	if (rlsFunction != NULL) {
+		SC_log(LOG_DEBUG, "exec SCPreferences callout: %s%s%s",
+		       ((notify & kSCPreferencesNotificationCommit) != 0) ? "commit" : "",
+		       (((notify & kSCPreferencesNotificationCommit) != 0) &&
+			((notify & kSCPreferencesNotificationApply ) != 0)) ? ", " : "",
+		       ((notify & kSCPreferencesNotificationApply)  != 0) ? "apply"  : "");
 		(*rlsFunction)(prefs, notify, context_info);
 	}
 
@@ -810,39 +838,176 @@ prefsNotify(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info)
 }
 
 
+__private_extern__ void
+__SCPreferencesAddSessionKeys(SCPreferencesRef prefs)
+{
+	SCPreferencesPrivateRef		prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+
+	/* create the session "commit" key */
+	if (prefsPrivate->sessionKeyCommit == NULL) {
+		prefsPrivate->sessionKeyCommit = _SCPNotificationKey(NULL,
+								     prefsPrivate->prefsID,
+								     kSCPreferencesKeyCommit);
+	}
+
+	/* create the session "apply" key */
+	if (prefsPrivate->sessionKeyApply == NULL) {
+		prefsPrivate->sessionKeyApply = _SCPNotificationKey(NULL,
+								    prefsPrivate->prefsID,
+								    kSCPreferencesKeyApply);
+	}
+
+	return;
+}
+
+
 __private_extern__ Boolean
 __SCPreferencesAddSession(SCPreferencesRef prefs)
 {
 	CFAllocatorRef			allocator	= CFGetAllocator(prefs);
 	SCDynamicStoreContext		context		= { 0
 							  , (void *)prefs
-							  , NULL
-							  , NULL
-							  , NULL
+							  , CFRetain
+							  , CFRelease
+							  , CFCopyDescription
 							  };
 	SCPreferencesPrivateRef		prefsPrivate	= (SCPreferencesPrivateRef)prefs;
 
-	/* establish a dynamic store session */
-	prefsPrivate->session = SCDynamicStoreCreate(allocator,
-						     prefsPrivate->name,
-						     prefsNotify,
-						     &context);
-	if (prefsPrivate->session == NULL) {
-		SCLog(_sc_verbose, LOG_INFO, CFSTR("__SCPreferencesAddSession SCDynamicStoreCreate() failed"));
-		return FALSE;
+	if (prefsPrivate->sessionRefcnt == 0) {
+		/* establish a dynamic store session */
+		prefsPrivate->session = SCDynamicStoreCreate(allocator,
+							     prefsPrivate->name,
+							     prefsNotify,
+							     &context);
+		if (prefsPrivate->session == NULL) {
+			SC_log(LOG_INFO, "SCDynamicStoreCreate() failed");
+			return FALSE;
+		}
+
+		SC_log(LOG_DEBUG, "added SCDynamicStore session (for prefs)");
 	}
 
-	/* create the session "commit" key */
-	prefsPrivate->sessionKeyCommit = _SCPNotificationKey(NULL,
-							     prefsPrivate->prefsID,
-							     kSCPreferencesKeyCommit);
+	prefsPrivate->sessionRefcnt++;
+	return TRUE;
+}
 
-	/* create the session "apply" key */
-	prefsPrivate->sessionKeyApply = _SCPNotificationKey(NULL,
-							    prefsPrivate->prefsID,
-							    kSCPreferencesKeyApply);
 
-	return TRUE;
+__private_extern__ void
+__SCPreferencesRemoveSession(SCPreferencesRef prefs)
+{
+	SCPreferencesPrivateRef		prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+
+	if (prefsPrivate->sessionRefcnt > 0) {
+		if (--prefsPrivate->sessionRefcnt == 0) {
+			CFRelease(prefsPrivate->session);
+			prefsPrivate->session = NULL;
+
+			SC_log(LOG_DEBUG, "removed SCDynamicStore session (for prefs)");
+		}
+	}
+
+	return;
+}
+
+
+static void
+appendLockedPreferences(const void *key, const void *value, void *context)
+{
+#pragma unused(key)
+	CFMutableStringRef	str	= (CFMutableStringRef)context;
+
+	CFStringAppendFormat(str, NULL, CFSTR("%s%@"),
+			     (CFStringGetLength(str) > 0) ? "\n" : "",
+			     value);
+	return;
+}
+
+
+__private_extern__ void
+__SCPreferencesUpdateLockedState(SCPreferencesRef prefs, Boolean locked)
+{
+	static dispatch_queue_t		lockedQueue;
+	static CFMutableDictionaryRef	lockedState;
+	static dispatch_once_t		once;
+	SCPreferencesPrivateRef		prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+
+	dispatch_once(&once, ^{
+		os_state_block_t	state_block;
+
+		lockedQueue = dispatch_queue_create("SCPreferences locked state queue", NULL);
+
+		lockedState = CFDictionaryCreateMutable(NULL,
+							0,
+							NULL,	// NO retain/release
+							&kCFTypeDictionaryValueCallBacks);
+
+		state_block = ^os_state_data_t(os_state_hints_t hints) {
+#pragma unused(hints)
+			CFDataRef		data	= NULL;
+			Boolean			ok;
+			os_state_data_t		state_data;
+			size_t			state_data_size;
+			CFIndex			state_len;
+			CFMutableStringRef	str;
+
+			if (CFDictionaryGetCount(lockedState) == 0) {
+				// if no locked preferences
+				return NULL;
+			}
+
+			str = CFStringCreateMutable(NULL, 0);
+			CFDictionaryApplyFunction(lockedState, appendLockedPreferences, str);
+			ok = _SCSerialize(str, &data, NULL, NULL);
+			CFRelease(str);
+
+			state_len = (ok && (data != NULL)) ? CFDataGetLength(data) : 0;
+			state_data_size = OS_STATE_DATA_SIZE_NEEDED(state_len);
+			if (state_data_size > MAX_STATEDUMP_SIZE) {
+				SC_log(LOG_ERR, "locked SCPreferences : state data too large (%zd > %zd)",
+				       state_data_size,
+				       (size_t)MAX_STATEDUMP_SIZE);
+				if (data != NULL) CFRelease(data);
+				return NULL;
+			}
+
+			state_data = calloc(1, state_data_size);
+			if (state_data == NULL) {
+				SC_log(LOG_ERR, "locked SCPreferences: could not allocate state data");
+				if (data != NULL) CFRelease(data);
+				return NULL;
+			}
+
+			state_data->osd_type = OS_STATE_DATA_SERIALIZED_NSCF_OBJECT;
+			state_data->osd_data_size = (uint32_t)state_len;
+			strlcpy(state_data->osd_title, "open/locked SCPreferences", sizeof(state_data->osd_title));
+			if (state_len > 0) {
+				memcpy(state_data->osd_data, CFDataGetBytePtr(data), state_len);
+			}
+			if (data != NULL) CFRelease(data);
+
+			return state_data;
+		};
+
+		(void) os_state_add_handler(lockedQueue, state_block);
+	});
+
+	// update the locked state
+	prefsPrivate->locked = locked;
+
+	// add (or update) the locked preferences
+	dispatch_sync(lockedQueue, ^{
+		if (locked) {
+			CFStringRef	str;
+
+			str = CFCopyDescription(prefs);
+			CFDictionarySetValue(lockedState, prefs, str);
+			CFRelease(str);
+		} else {
+			CFDictionaryRemoveValue(lockedState, prefs);
+		}
+	});
+
+	return;
 }
 
 
@@ -872,7 +1037,7 @@ SCPreferencesSetCallback(SCPreferencesRef       prefs,
 	prefsPrivate->rlsContext.release		= NULL;
 	prefsPrivate->rlsContext.copyDescription	= NULL;
 	if (context != NULL) {
-		bcopy(context, &prefsPrivate->rlsContext, sizeof(SCPreferencesContext));
+		memcpy(&prefsPrivate->rlsContext, context, sizeof(SCPreferencesContext));
 		if (context->retain != NULL) {
 			prefsPrivate->rlsContext.info = (void *)(*context->retain)(context->info);
 		}
@@ -904,14 +1069,17 @@ __SCPreferencesScheduleWithRunLoop(SCPreferencesRef	prefs,
 	if (!prefsPrivate->scheduled) {
 		CFMutableArrayRef       keys;
 
+		// add SCDynamicStore session (for notifications) ... and hold a 'prefs' reference
 		if (prefsPrivate->session == NULL) {
 			ok = __SCPreferencesAddSession(prefs);
 			if (!ok) {
 				goto done;
 			}
+			assert(prefsPrivate->session != NULL);
 		}
 
-		CFRetain(prefs);	// hold a reference to the prefs
+		// add SCDynamicStore "keys"
+		__SCPreferencesAddSessionKeys(prefs);
 
 		keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 		CFArrayAppendValue(keys, prefsPrivate->sessionKeyCommit);
@@ -924,6 +1092,8 @@ __SCPreferencesScheduleWithRunLoop(SCPreferencesRef	prefs,
 			prefsPrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
 		}
 
+		SC_log(LOG_DEBUG, "scheduled");
+
 		prefsPrivate->scheduled = TRUE;
 	}
 
@@ -932,7 +1102,7 @@ __SCPreferencesScheduleWithRunLoop(SCPreferencesRef	prefs,
 		if (!ok) {
 			prefsPrivate->scheduled = FALSE;
 			(void) SCDynamicStoreSetNotificationKeys(prefsPrivate->session, NULL, NULL);
-			CFRelease(prefs);
+			__SCPreferencesRemoveSession(prefs);
 			goto done;
 		}
 
@@ -1014,6 +1184,8 @@ __SCPreferencesUnscheduleFromRunLoop(SCPreferencesRef	prefs,
 	if (n == 0) {
 		CFArrayRef      changedKeys;
 
+		SC_log(LOG_DEBUG, "unscheduled");
+
 		// if *all* notifications have been unscheduled
 		prefsPrivate->scheduled = FALSE;
 
@@ -1026,8 +1198,8 @@ __SCPreferencesUnscheduleFromRunLoop(SCPreferencesRef	prefs,
 			CFRelease(changedKeys);
 		}
 
-		// release our reference to the prefs
-		CFRelease(prefs);
+		// remove SCDynamicStore session, release 'prefs' reference
+		__SCPreferencesRemoveSession(prefs);
 	}
 
 	ok = TRUE;
@@ -1129,6 +1301,9 @@ SCPreferencesSynchronize(SCPreferencesRef prefs)
 		return;
 	}
 
+	SC_log(LOG_DEBUG, "SCPreferences() synchronize: %s",
+	       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
+
 	if (prefsPrivate->authorizationData != NULL) {
 		__SCPreferencesSynchronize_helper(prefs);
 	}
diff --git a/src/configd/SystemConfiguration.fproj/SCPPath.c b/src/configd/SystemConfiguration.fproj/SCPPath.c
index a9489ffac..eef1ac23e 100644
--- a/src/configd/SystemConfiguration.fproj/SCPPath.c
+++ b/src/configd/SystemConfiguration.fproj/SCPPath.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2006, 2008, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2006, 2008, 2011, 2012, 2016 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@
  */
 
@@ -31,9 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 #define	MAXLINKS	8
diff --git a/src/configd/SystemConfiguration.fproj/SCPRemove.c b/src/configd/SystemConfiguration.fproj/SCPRemove.c
index fa2b1b52e..76aac0e19 100644
--- a/src/configd/SystemConfiguration.fproj/SCPRemove.c
+++ b/src/configd/SystemConfiguration.fproj/SCPRemove.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004, 2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2004, 2011, 2016 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@
  */
 
@@ -31,8 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 Boolean
diff --git a/src/configd/SystemConfiguration.fproj/SCPSet.c b/src/configd/SystemConfiguration.fproj/SCPSet.c
index ae82d19cb..d89880c14 100644
--- a/src/configd/SystemConfiguration.fproj/SCPSet.c
+++ b/src/configd/SystemConfiguration.fproj/SCPSet.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2004, 2016 Apple Computer, 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@
  */
 
@@ -31,8 +31,6 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 
 Boolean
diff --git a/src/configd/SystemConfiguration.fproj/SCPUnlock.c b/src/configd/SystemConfiguration.fproj/SCPUnlock.c
index d47c6c590..4c5e525c1 100644
--- a/src/configd/SystemConfiguration.fproj/SCPUnlock.c
+++ b/src/configd/SystemConfiguration.fproj/SCPUnlock.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004-2010, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2004-2010, 2013, 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,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@
  */
 
@@ -31,14 +31,13 @@
  * - initial revision
  */
 
-#include 
-#include 
 #include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
 
 #include 
 #include 
 
+
 static Boolean
 __SCPreferencesUnlock_helper(SCPreferencesRef prefs)
 {
@@ -66,7 +65,7 @@ __SCPreferencesUnlock_helper(SCPreferencesRef prefs)
 		goto error;
 	}
 
-	prefsPrivate->locked = FALSE;
+	__SCPreferencesUpdateLockedState(prefs, FALSE);
 	return TRUE;
 
     fail :
@@ -89,29 +88,14 @@ __SCPreferencesUnlock_helper(SCPreferencesRef prefs)
 static void
 reportDelay(SCPreferencesRef prefs, struct timeval *delay)
 {
-	asl_object_t		m;
 	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)prefs;
-	char			str[256];
-
-	m = asl_new(ASL_TYPE_MSG);
-	asl_set(m, "com.apple.message.domain", "com.apple.SystemConfiguration.SCPreferencesUnlock");
-	(void) _SC_cfstring_to_cstring(prefsPrivate->name, str, sizeof(str), kCFStringEncodingUTF8);
-	asl_set(m, "com.apple.message.signature", str);
-	(void) _SC_cfstring_to_cstring(prefsPrivate->prefsID, str, sizeof(str), kCFStringEncodingUTF8);
-	asl_set(m, "com.apple.message.signature2", str);
-	(void) snprintf(str, sizeof(str),
-			"%d.%3.3d",
-			(int)delay->tv_sec,
-			delay->tv_usec / 1000);
-	asl_set(m, "com.apple.message.value", str);
-	SCLOG(NULL, m, ASL_LEVEL_DEBUG,
-	      CFSTR("SCPreferences(%@:%@) lock held for %d.%3.3d seconds"),
-	      prefsPrivate->name,
-	      prefsPrivate->prefsID,
-	      (int)delay->tv_sec,
-	      delay->tv_usec / 1000);
-	asl_release(m);
 
+	SC_log(LOG_ERR,
+	       "SCPreferences(%@:%@) lock held for %d.%3.3d seconds",
+	       prefsPrivate->name,
+	       prefsPrivate->prefsID,
+	       (int)delay->tv_sec,
+	       delay->tv_usec / 1000);
 	return;
 }
 
@@ -141,9 +125,10 @@ SCPreferencesUnlock(SCPreferencesRef prefs)
 
 	pthread_mutex_lock(&prefsPrivate->lock);
 
-	if (prefsPrivate->sessionKeyLock != NULL) {
-		SCDynamicStoreRemoveValue(prefsPrivate->session,
-					  prefsPrivate->sessionKeyLock);
+	if (prefsPrivate->sessionNoO_EXLOCK != NULL) {
+		// Note: closing the session removes the temporary "lock" key
+		CFRelease(prefsPrivate->sessionNoO_EXLOCK);
+		prefsPrivate->sessionNoO_EXLOCK = NULL;
 	}
 
 	if (prefsPrivate->lockFD != -1)	{
@@ -161,7 +146,10 @@ SCPreferencesUnlock(SCPreferencesRef prefs)
 		reportDelay(prefs, &lockElapsed);
 	}
 
-	prefsPrivate->locked = FALSE;
+	SC_log(LOG_DEBUG, "SCPreferences() unlock: %s",
+	       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path);
+
+	__SCPreferencesUpdateLockedState(prefs, FALSE);
 
 	pthread_mutex_unlock(&prefsPrivate->lock);
 	return TRUE;
diff --git a/src/configd/SystemConfiguration.fproj/SCPreferences.h b/src/configd/SystemConfiguration.fproj/SCPreferences.h
index b31ba81ef..e1d639b25 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferences.h
+++ b/src/configd/SystemConfiguration.fproj/SCPreferences.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004, 2005, 2007-2010 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 
@@ -40,6 +37,8 @@
 typedef const struct AuthorizationOpaqueRef *	AuthorizationRef;
 #endif	// !TARGET_OS_IPHONE
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
 
 /*!
 	@header SCPreferences
@@ -71,7 +70,7 @@ typedef const struct AuthorizationOpaqueRef *	AuthorizationRef;
 	@discussion This is the handle to an open preferences session for
 		accessing system configuration preferences.
  */
-typedef const struct __SCPreferences *	SCPreferencesRef;
+typedef const struct CF_BRIDGED_TYPE(id) __SCPreferences *	SCPreferencesRef;
 
 /*!
 	@enum SCPreferencesNotification
@@ -83,13 +82,15 @@ typedef const struct __SCPreferences *	SCPreferencesRef;
 		request has been made to apply the currently saved
 		preferences to the active system configuration.
  */
-enum {
-	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*/)
+typedef CF_OPTIONS(uint32_t, SCPreferencesNotification) {
+	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
 };
 
-typedef	uint32_t	SCPreferencesNotification;
-
 /*!
 	@typedef SCPreferencesContext
 	Structure containing user-specified data and callbacks for SCPreferences.
@@ -111,10 +112,10 @@ typedef	uint32_t	SCPreferencesNotification;
  */
 typedef struct {
 	CFIndex		version;
-	void *		info;
-	const void	*(*retain)(const void *info);
-	void		(*release)(const void *info);
-	CFStringRef	(*copyDescription)(const void *info);
+	void *		__nullable info;
+	const void	* __nonnull (* __nullable retain)(const void *info);
+	void		(* __nullable release)(const void *info);
+	CFStringRef	__nonnull (* __nullable copyDescription)(const void *info);
 } SCPreferencesContext;
 
 /*!
@@ -127,9 +128,9 @@ typedef struct {
 	@param info A C pointer to a user-specified block of data.
  */
 typedef void (*SCPreferencesCallBack)   (
-					SCPreferencesRef		prefs,
-					SCPreferencesNotification	notificationType,
-					void				*info
+					SCPreferencesRef				prefs,
+					SCPreferencesNotification			notificationType,
+					void			     *	__nullable	info
 					);
 
 
@@ -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
@@ -159,12 +160,12 @@ SCPreferencesGetTypeID			(void)			__OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2
 	@result Returns a reference to the new SCPreferences.
 		You must release the returned value.
  */
-SCPreferencesRef
+SCPreferencesRef __nullable
 SCPreferencesCreate			(
-					CFAllocatorRef		allocator,
-					CFStringRef		name,
-					CFStringRef		prefsID
-					)			__OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
+					CFAllocatorRef		__nullable	allocator,
+					CFStringRef				name,
+					CFStringRef		__nullable	prefsID
+					)			API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 
 /*!
@@ -187,13 +188,13 @@ SCPreferencesCreate			(
 	@result Returns a reference to the new SCPreferences.
 		You must release the returned value.
  */
-SCPreferencesRef
+SCPreferencesRef __nullable
 SCPreferencesCreateWithAuthorization	(
-					CFAllocatorRef		allocator,
-					CFStringRef		name,
-					CFStringRef		prefsID,
-					AuthorizationRef	authorization
-					)			__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/);
+					CFAllocatorRef		__nullable	allocator,
+					CFStringRef				name,
+					CFStringRef		__nullable	prefsID,
+					AuthorizationRef	__nullable	authorization
+					)			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
@@ -275,10 +276,10 @@ SCPreferencesUnlock			(
 	@result Returns a CFDataRef that reflects the signature of the configuration
 		preferences at the time of the call to the SCPreferencesCreate function.
  */
-CFDataRef
+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
@@ -287,10 +288,10 @@ SCPreferencesGetSignature		(
 	@result Returns the list of keys.
 		You must release the returned value.
  */
-CFArrayRef
+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
@@ -306,11 +307,11 @@ SCPreferencesCopyKeyList		(
 	@result Returns the value associated with the specified preference key;
 		NULL if no value was located.
  */
-CFPropertyListRef
+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
@@ -388,10 +389,10 @@ SCPreferencesRemoveValue		(
  */
 Boolean
 SCPreferencesSetCallback		(
-					SCPreferencesRef	prefs,
-					SCPreferencesCallBack	callout,
-					SCPreferencesContext	*context
-					)			__OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);
+					SCPreferencesRef			prefs,
+					SCPreferencesCallBack	__nullable	callout,
+					SCPreferencesContext	* __nullable	context
+					)			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
@@ -444,9 +445,9 @@ SCPreferencesUnscheduleFromRunLoop	(
  */
 Boolean
 SCPreferencesSetDispatchQueue		(
-					 SCPreferencesRef	prefs,
-					 dispatch_queue_t	queue
-					 )			__OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0/*SPI*/);
+					 SCPreferencesRef			prefs,
+					 dispatch_queue_t	__nullable	queue
+					 )			API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 /*!
 	@function SCPreferencesSynchronize
@@ -462,9 +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
 
-#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
-#endif /* _SCPREFERENCES_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SCPREFERENCES_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCPreferencesInternal.h b/src/configd/SystemConfiguration.fproj/SCPreferencesInternal.h
index 78de1f854..4201dc4c1 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesInternal.h
+++ b/src/configd/SystemConfiguration.fproj/SCPreferencesInternal.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2003-2005, 2007-2011, 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2003-2005, 2007-2011, 2013-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,21 +17,31 @@
  * 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 _SCPREFERENCESINTERNAL_H
 #define _SCPREFERENCESINTERNAL_H
 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
+
+#ifndef	SC_LOG_HANDLE
+#define	SC_LOG_HANDLE	__log_SCPreferences
+#endif	// SC_LOG_HANDLE
+#include 
+#include 
+#include 
+
 #include 
 #include 
-#include 
 
 
 #define	PREFS_DEFAULT_DIR		CFSTR("/Library/Preferences/SystemConfiguration")
@@ -79,6 +89,8 @@ typedef struct {
 
 	/* configd session */
 	SCDynamicStoreRef	session;
+	SCDynamicStoreRef	sessionNoO_EXLOCK;
+	int			sessionRefcnt;
 
 	/* configd session keys */
 	CFStringRef		sessionKeyLock;
@@ -104,7 +116,6 @@ typedef struct {
 
 	/* authorization, helper */
 	CFDataRef		authorizationData;
-	Boolean			authorizationRequired;
 	mach_port_t		helper_port;
 
 } SCPreferencesPrivate, *SCPreferencesPrivateRef;
@@ -122,15 +133,28 @@ typedef struct {
 
 __BEGIN_DECLS
 
+os_log_t
+__log_SCPreferences			(void);
+
 Boolean
 __SCPreferencesCreate_helper		(SCPreferencesRef	prefs);
 
 void
 __SCPreferencesAccess			(SCPreferencesRef	prefs);
 
+void
+__SCPreferencesAddSessionKeys		(SCPreferencesRef       prefs);
+
 Boolean
 __SCPreferencesAddSession		(SCPreferencesRef       prefs);
 
+void
+__SCPreferencesRemoveSession		(SCPreferencesRef       prefs);
+
+void
+__SCPreferencesUpdateLockedState	(SCPreferencesRef       prefs,
+					 Boolean		locked);
+
 CF_RETURNS_RETAINED
 CFDataRef
 __SCPSignatureFromStatbuf		(const struct stat	*statBuf);
@@ -140,6 +164,9 @@ __SCPreferencesPath			(CFAllocatorRef		allocator,
 					 CFStringRef		prefsID,
 					 Boolean		useNewPrefs);
 
+off_t
+__SCPreferencesPrefsSize		(SCPreferencesRef	prefs);
+
 CF_RETURNS_RETAINED
 CFStringRef
 _SCPNotificationKey			(CFAllocatorRef		allocator,
diff --git a/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c b/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c
index 36dd87bc3..e39e0e5a5 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c
+++ b/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2006, 2007, 2010, 2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2006, 2007, 2010, 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@
  */
 
@@ -31,12 +31,11 @@
  * - created (for EAP)
  */
 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 	// for _CFBundleCopyMainBundleExecutableURL
-#include 	// for _SCErrorSet
 #include "dy_framework.h"
 
 #include "SCPreferencesInternal.h"
@@ -192,7 +191,6 @@ _SCSecAccessCreateForExecutables(CFStringRef	label,
 				 CFArrayRef	executableURLs)
 {
 	SecAccessRef			access			= NULL;
-	CFArrayRef			aclList			= NULL;
 	CFIndex				i;
 	CFIndex				n;
 	OSStatus			status;
@@ -240,7 +238,6 @@ _SCSecAccessCreateForExecutables(CFStringRef	label,
 
     done :
 
-	if (aclList != NULL)	CFRelease(aclList);
 	CFRelease(trustedApplications);
 
 	return	access;
@@ -328,6 +325,8 @@ _SCSecKeychainPasswordItemCopy(SecKeychainRef	keychain,
 
 	return keychain_password;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(keychain)
+#pragma unused(unique_id)
 	_SCErrorSet(kSCStatusAccessError);
 	return NULL;
 #endif	// !TARGET_OS_IPHONE
@@ -350,6 +349,8 @@ _SCSecKeychainPasswordItemExists(SecKeychainRef keychain, CFStringRef unique_id)
 	CFRelease(item);
 	return TRUE;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(keychain)
+#pragma unused(unique_id)
 	_SCErrorSet(kSCStatusAccessError);
 	return FALSE;
 #endif	// !TARGET_OS_IPHONE
@@ -378,6 +379,8 @@ _SCSecKeychainPasswordItemRemove(SecKeychainRef keychain, CFStringRef unique_id)
 
 	return TRUE;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(keychain)
+#pragma unused(unique_id)
 	_SCErrorSet(kSCStatusAccessError);
 	return FALSE;
 #endif	// !TARGET_OS_IPHONE
@@ -548,6 +551,13 @@ _SCSecKeychainPasswordItemSet(SecKeychainRef	keychain,
 
 	return TRUE;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(keychain)
+#pragma unused(unique_id)
+#pragma unused(label)
+#pragma unused(description)
+#pragma unused(account)
+#pragma unused(password)
+#pragma unused(options)
 	_SCErrorSet(kSCStatusAccessError);
 	return FALSE;
 #endif	// !TARGET_OS_IPHONE
@@ -661,6 +671,8 @@ _SCPreferencesSystemKeychainPasswordItemCopy(SCPreferencesRef	prefs,
 	if (keychain != NULL)	CFRelease(keychain);
 	return password;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(prefs)
+#pragma unused(unique_id)
 	_SCErrorSet(kSCStatusAccessError);
 	return NULL;
 #endif	// !TARGET_OS_IPHONE
@@ -704,6 +716,8 @@ _SCPreferencesSystemKeychainPasswordItemExists(SCPreferencesRef	prefs,
 	if (keychain != NULL)	CFRelease(keychain);
 	return ok;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(prefs)
+#pragma unused(unique_id)
 	_SCErrorSet(kSCStatusAccessError);
 	return FALSE;
 #endif	// !TARGET_OS_IPHONE
@@ -806,6 +820,8 @@ _SCPreferencesSystemKeychainPasswordItemRemove(SCPreferencesRef	prefs,
 	if (keychain != NULL)	CFRelease(keychain);
 	return ok;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(prefs)
+#pragma unused(unique_id)
 	_SCErrorSet(kSCStatusAccessError);
 	return FALSE;
 #endif	// !TARGET_OS_IPHONE
@@ -1009,6 +1025,13 @@ _SCPreferencesSystemKeychainPasswordItemSet(SCPreferencesRef	prefs,
 	if (keychain != NULL)	CFRelease(keychain);
 	return ok;
 #else	// !TARGET_OS_IPHONE
+#pragma unused(prefs)
+#pragma unused(unique_id)
+#pragma unused(label)
+#pragma unused(description)
+#pragma unused(account)
+#pragma unused(password)
+#pragma unused(options)
 	_SCErrorSet(kSCStatusAccessError);
 	return FALSE;
 #endif	// !TARGET_OS_IPHONE
diff --git a/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h b/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h
index c45f48ba8..64d43420f 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h
+++ b/src/configd/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@
  */
 
@@ -25,20 +25,16 @@
 #define	_SCPREFERENCESKEYCHAINPRIVATE_H
 
 /*
- * SCPreferencesKeychain.h
+ * SCPreferencesKeychainPrivate.h
  * - routines to deal with keychain passwords
  */
 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#if	!TARGET_OS_IPHONE
 #include 
-#else	// !TARGET_OS_IPHONE
-typedef struct OpaqueSecKeychainRef *SecKeychainRef;
-#endif	// !TARGET_OS_IPHONE
 
 #pragma mark -
 #pragma mark Keychain helper APIs
@@ -49,19 +45,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 +66,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 +75,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 +92,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/src/configd/SystemConfiguration.fproj/SCPreferencesPath.h b/src/configd/SystemConfiguration.fproj/SCPreferencesPath.h
index 221ac57c5..b965eabb8 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesPath.h
+++ b/src/configd/SystemConfiguration.fproj/SCPreferencesPath.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2004, 2005, 2008 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,21 +17,20 @@
  * 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 
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
 
 /*!
 	@header SCPreferencesPath
@@ -90,11 +89,11 @@ __BEGIN_DECLS
 	@result Returns a string representing the new (unique) child path; NULL
 		if the specified path does not exist.
  */
-CFStringRef
+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
@@ -105,11 +104,11 @@ SCPreferencesPathCreateUniqueChild	(
 	@result Returns the dictionary associated with the specified path; NULL
 		if the path does not exist.
  */
-CFDictionaryRef
+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
@@ -120,11 +119,11 @@ SCPreferencesPathGetValue		(
 	@result Returns the dictionary associated with the specified path; NULL
 		if the path is not a link or does not exist.
  */
-CFStringRef
+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
@@ -140,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
@@ -157,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
@@ -170,9 +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
 
-#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
-#endif /* _SCPREFERENCESPATH_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SCPREFERENCESPATH_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.c b/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.c
index 26676014a..159b9ea33 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.c
+++ b/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, 2005, 2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2001, 2004, 2005, 2010, 2015 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -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,
@@ -152,6 +152,16 @@ SCPreferencesPathKeyCreateSetNetworkInterfaceEntity(CFAllocatorRef	allocator,
 	/*
 	 * create "/Sets/set-id/Network/Interface/interface-name/entity"
 	 */
+	if (entity == NULL) {
+		return CFStringCreateWithFormat(allocator,
+						NULL,
+						CFSTR("/%@/%@/%@/%@/%@"),
+						kSCPrefSets,
+						set,
+						kSCCompNetwork,
+						kSCCompInterface,
+						ifname);
+	}
 	return CFStringCreateWithFormat(allocator,
 					NULL,
 					CFSTR("/%@/%@/%@/%@/%@/%@"),
@@ -164,7 +174,7 @@ SCPreferencesPathKeyCreateSetNetworkInterfaceEntity(CFAllocatorRef	allocator,
 }
 
 
-__private_extern__ CFStringRef
+CFStringRef
 SCPreferencesPathKeyCreateSetNetworkService(CFAllocatorRef	allocator,
 					    CFStringRef		set,
 					    CFStringRef		service)
@@ -200,7 +210,7 @@ SCPreferencesPathKeyCreateSetNetworkService(CFAllocatorRef	allocator,
 }
 
 
-__private_extern__ CFStringRef
+CFStringRef
 SCPreferencesPathKeyCreateSetNetworkServiceEntity(CFAllocatorRef	allocator,
 						  CFStringRef		set,
 						  CFStringRef		service,
diff --git a/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.h b/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.h
index e74945c7b..3d0f540bf 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesPathKey.h
+++ b/src/configd/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/src/configd/SystemConfiguration.fproj/SCPreferencesPrivate.h b/src/configd/SystemConfiguration.fproj/SCPreferencesPrivate.h
index 303ffdd19..eabdba3df 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/SCPreferencesPrivate.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2005, 2007-2009, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2005, 2007-2009, 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,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,8 @@
 #define _SCPREFERENCESPRIVATE_H
 
 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -42,6 +43,13 @@
  */
 #define kSCPreferencesOptionChangeNetworkSet	CFSTR("change-network-set")	// CFBooleanRef
 
+/*!
+	@defined kSCPreferencesOptionProtectionClass
+	@abstract The SCPreferences "option" used to indicate the file
+		 protection class of the .plist.
+ */
+#define kSCPreferencesOptionProtectionClass	CFSTR("ProtectionClass")	// CFStringRef["A"-"F"]
+
 /*!
 	@defined kSCPreferencesOptionRemoveWhenEmpty
 	@abstract The SCPreferences "option" used to indicate that the .plist
@@ -112,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
@@ -144,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
@@ -160,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/src/configd/SystemConfiguration.fproj/SCPreferencesSetSpecific.h b/src/configd/SystemConfiguration.fproj/SCPreferencesSetSpecific.h
index b044efbef..2c6028a49 100644
--- a/src/configd/SystemConfiguration.fproj/SCPreferencesSetSpecific.h
+++ b/src/configd/SystemConfiguration.fproj/SCPreferencesSetSpecific.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2002, 2004, 2005, 2008 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,21 +17,20 @@
  * 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 
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
 
 /*!
 	@header SCPreferencesSetSpecific
@@ -63,9 +62,9 @@ __BEGIN_DECLS
 Boolean
 SCPreferencesSetComputerName		(
 					SCPreferencesRef	prefs,
-					CFStringRef		name,
+					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
@@ -85,10 +84,12 @@ SCPreferencesSetComputerName		(
 Boolean
 SCPreferencesSetLocalHostName		(
 					SCPreferencesRef	prefs,
-					CFStringRef		name
-					)			__OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/);
+					CFStringRef __nullable	name
+					)			API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
 
 __END_DECLS
 
-#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
-#endif /* _SCPREFERENCESSETSPECIFIC_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SCPREFERENCESSETSPECIFIC_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCPrivate.h b/src/configd/SystemConfiguration.fproj/SCPrivate.h
index e68fac83a..f9bf27852 100644
--- a/src/configd/SystemConfiguration.fproj/SCPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/SCPrivate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  *
@@ -27,9 +27,10 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -62,14 +63,12 @@
 
 
 /* "server" defines */
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR
 #define _SC_SERVER_PROG			"configd"
-#else	// !TARGET_IPHONE_SIMULATOR
+#else	// !TARGET_OS_SIMULATOR
 #define _SC_SERVER_PROG			"configd_sim"
-#endif	// !TARGET_IPHONE_SIMULATOR
+#endif	// !TARGET_OS_SIMULATOR
 
-#define INSTALL_ENVIRONMENT	"__OSINSTALL_ENVIRONMENT"
-#define INSTALL_FACILITY	"install"
 
 /* atomic operations */
 #define _SC_ATOMIC_CMPXCHG(p, o, n)	__sync_bool_compare_and_swap((p), (o), (n))
@@ -78,21 +77,41 @@
 #define _SC_ATOMIC_ZERO(p)		__sync_fetch_and_and((p), 0)		// old_n = n; n = 0; return(old_n);
 
 
+/* framework path */
+#if	!TARGET_OS_WATCH
+#define	SYSTEMCONFIGURATION_FRAMEWORK_PATH	"/System/Library/Frameworks/SystemConfiguration.framework"
+#else
+#define	SYSTEMCONFIGURATION_FRAMEWORK_PATH	"/System/Library/PrivateFrameworks/SystemConfiguration.framework"
+#endif
+
+
+/* get-network-info script path */
+#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"
+#endif
+
+
+/* crash report(s) directory path */
+#if	TARGET_OS_OSX
+#define	_SC_CRASH_DIR	"/Library/Logs/DiagnosticReports"
+#else
+#define	_SC_CRASH_DIR	"/Library/Logs/CrashReporter"
+#endif
+
+
 /* framework variables */
 extern int	_sc_debug;	/* non-zero if debugging enabled */
 extern int	_sc_verbose;	/* non-zero if verbose logging enabled */
 extern int	_sc_log;	/* 0 if SC messages should be written to stdout/stderr,
-				   1 if SC messages should be logged w/asl(3),
+				   1 if SC messages should be logged w/os_log(3),
 				   2 if SC messages should be written to stdout/stderr AND logged */
 
-/* notify(3) keys */
 
-#if	!TARGET_IPHONE_SIMULATOR
-#define _SC_NOTIFY_PREFIX	"com.apple.system.config"
-#else	// !TARGET_IPHONE_SIMULATOR
-#define _SC_NOTIFY_PREFIX	"com.apple.iOS_Simulator.config"
-#endif	// !TARGET_IPHONE_SIMULATOR
+/* notify(3) keys */
 
+#define _SC_NOTIFY_PREFIX		"com.apple.system.config"
 #define _SC_NOTIFY_NETWORK_CHANGE	_SC_NOTIFY_PREFIX ".network_change"
 #define _SC_NOTIFY_NETWORK_CHANGE_DNS	_SC_NOTIFY_NETWORK_CHANGE ".dns"
 #define _SC_NOTIFY_NETWORK_CHANGE_NWI	_SC_NOTIFY_NETWORK_CHANGE ".nwi"
@@ -306,6 +325,19 @@ CF_RETURNS_RETAINED
 CFDictionaryRef	_SCUnserializeMultiple		(CFDictionaryRef	dict);
 
 
+#pragma mark -
+
+
+/*!
+	@function _SCCreatePropertyListFromResource
+	@discussion Reads a property list referenced by a file URL.
+	@param url The file URL.
+	@result The CFPropertyList content of the URL.
+ */
+CFPropertyListRef
+_SCCreatePropertyListFromResource		(CFURLRef		url);
+
+
 #pragma mark -
 #pragma mark String conversion
 
@@ -388,6 +420,24 @@ void		_SC_sendMachMessage		(mach_port_t		port,
 #pragma mark Logging
 
 
+/*!
+	@function _SC_LOG_DEFAULT
+	@discussion A function returning a default os_log_t object to be
+		used for [SystemConfiguration] logging.
+	@result The os_log_t object
+ */
+os_log_t	_SC_LOG_DEFAULT			(void);
+
+
+/*!
+	@function _SC_syslog_os_log_mapping
+	@discussion Maps a syslog logging level to an os_log level.
+	@param level The syslog logging level
+	@result The os_log level
+ */
+os_log_type_t	_SC_syslog_os_log_mapping	(int			level);
+
+
 /*!
 	@function _SCCopyDescription
 	@discussion Returns a formatted textual description of a CF object.
@@ -406,97 +456,99 @@ CFStringRef	_SCCopyDescription		(CFTypeRef		cf,
 	@param condition A boolean value indicating if the message should be logged
 	@param level A syslog(3) logging priority.
 	@param formatString The format string
-	@result The specified message will be written to the system message
-		logger (See syslogd(8)).
  */
 void		SCLog				(Boolean		condition,
 						 int			level,
 						 CFStringRef		formatString,
 						 ...)	CF_FORMAT_FUNCTION(3, 4);
 
-enum {
-	kSCLoggerFlagsNone		= 0x0,
-	kSCLoggerFlagsDefault	= 0x1,
-	kSCLoggerFlagsFile		= 0x2
-};
-typedef uint32_t	SCLoggerFlags;
-
-typedef struct SCLogger * SCLoggerRef;
-
-
-/*!
-	@function SCLoggerLog
-	@discussion Logs messages using SCLoggerRef
-	@param	logger A SCLoggerRef which keeps information about how logging
-		needs to be done. Passing NULL uses the default logger instance.
-	@param level An asl(3) logging priority. Passing the complement of a logging
-		priority (e.g. ~ASL_LEVEL_NOTICE) will result in log message lines
-		NOT being split by a "\n".
-	@param formatString The format string followed by format arguments
-	@result The specified message will be written to the system message
-		logger (See syslogd(8)). If logger is in verbose mode, the message
-		will be also written to a file specified in the ASL Module
- */
-void		SCLoggerLog			(SCLoggerRef	logger,
-						 int		level,
-						 CFStringRef	formatString,
-						 ...)	CF_FORMAT_FUNCTION(3, 4)
-							__OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0);
-
-/*!
-	@function SCLoggerVLog
-	@discussion Logs messages using SCLoggerRef
-	@param logger A SCLoggerRef which keeps information about how logging
-		needs to be done. Passing NULL uses the default logger instance.
-	@param level An asl(3) logging priority. Passing the complement of a logging
-		priority (e.g. ~ASL_LEVEL_NOTICE) will result in log message lines
-		NOT being split by a "\n".
-	@param formatString The format string
-	@param args The va_list representing the arguments
-	@result The specified message will be written to the system message
-		logger (See syslogd(8)). If logger is in verbose mode, the message
-		will be also written to a file specified in the ASL Module
- */
-void		SCLoggerVLog			(SCLoggerRef	logger,
-						 int		level,
-						 CFStringRef	formatString,
-						 va_list	args)	__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0);
+
+/*!
+	@function SC_log
+	@discussion Issue an os_log() message.
+
+	Note:	By default, the log messages will be associated with the
+		"com.apple.SystemConfiguration" subsystem.  This behavior
+		can be overwritten by #define'ing SC_LOG_HANDLE with the name
+		of an os_log_t global (or a function that returns an os_log_t)
+		*BEFORE* this header is #include'd. In that case, the noted
+		log handle will be used.
+
+		Also, by #define'ing SC_LOG_OR_PRINT, we will check the "_sc_log"
+		global to see if the messages should [also] be directed to stdout/stderr.
+
+	@param level The syslog(3 logging priority.
+	@param __string The format string
+	@result The specified message will be written to the unified logging system.
+ */
+#ifndef SC_log
+  #ifdef	SC_LOG_HANDLE
+    #ifndef	SC_LOG_HANDLE_TYPE
+    #define SC_LOG_HANDLE_TYPE
+    #endif	// SC_LOG_HANDLE_TYPE
+    SC_LOG_HANDLE_TYPE	os_log_t	SC_LOG_HANDLE(void);
+  #else	// SC_LOG_HANDLE
+    #define	SC_LOG_HANDLE	_SC_LOG_DEFAULT		// use [SC] default os_log handle
+    #ifndef	SC_LOG_OR_PRINT
+      #define	USE_SC_LOG_OR_PRINT	1		// and use '_sc_log' to control os_log, printf
+    #endif	// !SC_LOG_OR_PRINT
+  #endif	// !SC_LOG_HANDLE
+
+  #if	USE_SC_LOG_OR_PRINT
+    #define	SC_log(__level, __format, ...)						\
+	do {										\
+		os_log_t	__handle = SC_LOG_HANDLE();				\
+		os_log_type_t	__type   = _SC_syslog_os_log_mapping(__level);		\
+											\
+		if (((_sc_log != 1) && ((__level > LOG_DEBUG) || _sc_debug)) ||		\
+		    os_log_type_enabled(__handle, __type)) {				\
+			__SC_Log(__level,						\
+				 CFSTR( __format ),					\
+				 __handle,						\
+				 __type,						\
+				 __format,						\
+				 ## __VA_ARGS__);					\
+		}									\
+	} while (0)
+  #else	// USE_SC_LOG_OR_PRINT
+    #define	SC_log(__level, __format, ...)						\
+	do {										\
+		os_log_t	__handle = SC_LOG_HANDLE();				\
+		os_log_type_t	__type = _SC_syslog_os_log_mapping(__level);		\
+											\
+		os_log_with_type(__handle, __type, __format, ## __VA_ARGS__);		\
+	} while (0)
+  #endif	// USE_SC_LOG_OR_PRINT
+#endif	// !SC_log
 
 
-#ifdef	USE_NEW_SCLOG
-#define SCLOG(sclogger, level, __string, ...)	SCLoggerLog(sclogger, level, CFSTR(__string), ## __VA_ARGS__)	// temporary, remove once all "old" clients have migrated
-#else
 /*!
-	@function SCLOG
-	@discussion Issue a log message.
-	@param asl An asl client handle to be used for logging. If NULL, a shared
-		handle will be used.
-	@param msg An asl msg structure to be used for logging. If NULL, a default
-		asl msg will be used.
-	@param level A asl(3) logging priority. Passing the complement of a logging
-		priority (e.g. ~ASL_LEVEL_NOTICE) will result in log message lines
-		NOT being split by a "\n".
-	@param formatString The format string
-	@result The specified message will be written to the system message
-		logger (See syslogd(8)).
+	@function __SC_Log
+	@discussion Issue a log message w/os_log(3) or printf(3).
+		The specified message will be written to the system message
+		logger.
+	@param level A syslog(3) logging priority. If less than 0, log message is multi-line
+	@param format_CF The format string (as a CFString for stdout/stderr)
+	@param log The os_log_t handle (for logging)
+	@param type The os_log_type_t type (for logging)
+	@param format The format string (for logging)
+ stream.
  */
-void		SCLOG				(asl_object_t		asl,
-						 asl_object_t		msg,
-						 int			level,
-						 CFStringRef		formatString,
-						 ...)	CF_FORMAT_FUNCTION(4, 5);
+void		__SC_Log			(int		level,
+						 CFStringRef	format_CF,
+						 os_log_t	log,
+						 os_log_type_t	type,
+						 const char	*format,
+						 ...)	CF_FORMAT_FUNCTION(2, 6) __attribute__((format(os_log, 5, 6)));
 
 
-#endif
-
 /*!
 	@function SCPrint
 	@discussion Conditionally issue a debug message.
+		The message will be written to the specified output stream.
 	@param condition A boolean value indicating if the message should be written
 	@param stream The output stream for the log message.
 	@param formatString The format string
-	@result The message will be written to the specified stream
-		stream.
  */
 void		SCPrint				(Boolean		condition,
 						 FILE			*stream,
@@ -504,57 +556,14 @@ void		SCPrint				(Boolean		condition,
 						 ...)	CF_FORMAT_FUNCTION(3, 4);
 
 
-
-/*!
-	@function SCTrace
-	@discussion Conditionally issue a debug message with a time stamp.
-	@param condition A boolean value indicating if the message should be written
-	@param stream The output stream for the log message.
-	@param formatString The format string
-	@result The message will be written to the specified stream
-		stream.
- */
-void		SCTrace				(Boolean		condition,
-						 FILE			*stream,
-						 CFStringRef		formatString,
-						 ...)	CF_FORMAT_FUNCTION(3, 4);
-
-/*!
-	@function SCLoggerCreate
-	@discussion Create a reference to logger which stores information like verbose mode or not, loggerID, etc.
-			loggerID and moduleName both need to be non NULL, or else the function returns NULL.
-			If the moduleName points to a module which doesn't exist, then SCLoggerCreate will fail and
-			return NULL;
-	@param loggerID CFStringRef which will be appended to the log message when in verbose mode. It will also be
-			used to identify the module where the rules are being defined.
- */
-SCLoggerRef
-SCLoggerCreate					(CFStringRef loggerID);
-
-/*!
-	@function SCLoggerGetFlags
-	@discussion Returns the log flags for the logging reference
-	@param	logger Reference which points to the logger information
- */
-SCLoggerFlags
-SCLoggerGetFlags				(SCLoggerRef logger);
-
-/*!
-	@function SCLoggerSetFlags
-	@discussion Sets the log flags for the logger reference
-	@param	logger A reference to the logger
-	@param	flags SCLoggerFlags value determining where the logs from the logger will be directed
- */
-void		SCLoggerSetFlags		(SCLoggerRef logger,
-						 SCLoggerFlags flags);
-
 #pragma mark -
 #pragma mark Proxies
 
 
 /*!
 	@function SCNetworkProxiesCopyMatching
-	@discussion
+	@discussion Return the proxy configurations matching a target host
+		and/or one associated with a specific network interface.
 	@param globalConfiguration the proxy dictionary currently returned
 		by SCDynamicStoreCopyProxies().
 	@param server A CFString specying the hostname of interest; NULL if
@@ -571,7 +580,7 @@ void		SCLoggerSetFlags		(SCLoggerRef logger,
 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 */
@@ -579,7 +588,8 @@ SCNetworkProxiesCopyMatching			(CFDictionaryRef	globalConfiguration,
 
 /*!
 	@function SCNetworkProxiesCopyMatchingWithOptions
-	@discussion
+	@discussion Return the proxy configurations matching a target host
+		and/or one associated with a specific network interface.
 	@param globalConfiguration the proxy dictionary currently returned
 		by SCDynamicStoreCopyProxies().
 	@param options A dictionary containing any (or none) of the following:
@@ -595,22 +605,34 @@ SCNetworkProxiesCopyMatching			(CFDictionaryRef	globalConfiguration,
 		kSCProxiesMatchExecutableUUID	CFUUID		If present, specifies the Mach-O UUID of the executable
 								on whose behalf the match operation is being performed.
 								If kSCProxiesMatchInterface is present then this option
-							   	is ignored. If not present, then the Mach-O UUID of
-							   	the current process is used. The Mach-O UUID is used
-							   	to match application-specific proxy configurations
-							   	(i.e., if per-app VPN rules are in effect).
+								is ignored. If not present, then the Mach-O UUID of
+								the current process is used. The Mach-O UUID is used
+								to match application-specific proxy configurations
+								(i.e., if per-app VPN rules are in effect).
 	@result A CFArray containing the proxy configurations associated with the given options.
  */
 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;
 
 /*!
- @function SCDynamicStoreCopyProxiesWithOptions
- @discussion
+	@function SCNetworkProxiesCreateProxyAgentData
+	@discussion Returns a serialized representation of a proxy configuration.
+	@param proxyConfig A dictionary representing a proxy configuration
+	@result returns a CFData representing a proxy configuration. This data is
+		readable by all "config-agents" (Agents with domain as "SystemConfig")
+		via config_agent_copy_proxy_information().
+		You must release the returned value.
+ */
+CFDataRef
+SCNetworkProxiesCreateProxyAgentData		(CFDictionaryRef	proxyConfig)	API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0));
 
+/*!
+	@function SCDynamicStoreCopyProxiesWithOptions
+	@discussion Return the proxy configurations matching the provided
+		criteria.
 	@param	store An SCDynamicStoreRef representing the dynamic store
 		session that should be used for communication with the server.
 		If NULL, a temporary session will be used.
@@ -626,24 +648,13 @@ extern const CFStringRef	kSCProxiesNoGlobal;
 		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
 
 
-/*!
-	@function SCNetworkReachabilityCopyOnDemandService
-	@discussion For target hosts that require an OnDemand connection, returns
-		the SCNetworkService associated with the connection and user
-		options to use with SCNetworkConnectionStart.
-	@result The SCNetworkService for the target; NULL if there is
-		no associated OnDemand service.
- */
-SCNetworkServiceRef
-SCNetworkReachabilityCopyOnDemandService	(SCNetworkReachabilityRef	target,
-						 CFDictionaryRef		*userOptions);
-
 /*!
 	@function SCNetworkReachabilityCopyResolvedAddress
 	@discussion Return the resolved addresses associated with the
@@ -752,37 +763,6 @@ _SC_dos_encoding_and_codepage			(CFStringEncoding	macEncoding,
 						 UInt32			*dosCodepage);
 #endif	// !TARGET_OS_IPHONE
 
-#pragma mark -
-#pragma mark ScheduleWithRunLoop/UnscheduleFromRunLoop
-
-
-/*
- * object / CFRunLoop  management
- */
-void
-_SC_signalRunLoop				(CFTypeRef		obj,
-						 CFRunLoopSourceRef     rls,
-						 CFArrayRef		rlList);
-
-Boolean
-_SC_isScheduled					(CFTypeRef		obj,
-						 CFRunLoopRef		runLoop,
-						 CFStringRef		runLoopMode,
-						 CFMutableArrayRef      rlList);
-
-void
-_SC_schedule					(CFTypeRef		obj,
-						 CFRunLoopRef		runLoop,
-						 CFStringRef		runLoopMode,
-						 CFMutableArrayRef      rlList);
-
-Boolean
-_SC_unschedule					(CFTypeRef		obj,
-						 CFRunLoopRef		runLoop,
-						 CFStringRef		runLoopMode,
-						 CFMutableArrayRef      rlList,
-						 Boolean		all);
-
 #pragma mark -
 #pragma mark Bundle
 
@@ -830,24 +810,27 @@ _SC_CFEqual(CFTypeRef val1, CFTypeRef val2)
 static __inline__ Boolean
 _SC_isAppleInternal()
 {
-	static int isInternal	= 0;
-
-	if (isInternal == 0) {
-		int		ret;
-		struct stat	statbuf;
+	static Boolean		isInternal;
+	static dispatch_once_t	once;
 
-		ret = stat("/AppleInternal", &statbuf);
-		isInternal = (ret == 0) ? 1 : 2;
-	}
+	dispatch_once(&once, ^{
+		isInternal = os_variant_has_internal_content("com.apple.SystemConfiguration");
+	});
 
-	return (isInternal == 1);
+	return isInternal;
 }
 
+Boolean
+_SC_isInstallEnvironment			(void);
+
 #define	MODEL			CFSTR("Model")
 
 CFStringRef
 _SC_hw_model					(Boolean		trim);
 
+void *
+_SC_dlopen					(const char		*framework);
+
 /*
  * debugging
  */
@@ -876,6 +859,18 @@ _SC_crash					(const char		*crash_info,
 						 CFStringRef		notifyHeader,
 						 CFStringRef		notifyMessage);
 
+static __inline__ void
+_SC_crash_once					(const char		*crash_info,
+						 CFStringRef		notifyHeader,
+						 CFStringRef		notifyMessage)
+{
+	static dispatch_once_t	once;
+
+	_dispatch_once(&once, ^{
+		_SC_crash(crash_info, notifyHeader, notifyMessage);
+	});
+}
+
 Boolean
 _SC_getconninfo					(int				socket,
 						 struct sockaddr_storage	*src_addr,
diff --git a/src/configd/SystemConfiguration.fproj/SCProxies.c b/src/configd/SystemConfiguration.fproj/SCProxies.c
index a7e288e24..043a0faaf 100644
--- a/src/configd/SystemConfiguration.fproj/SCProxies.c
+++ b/src/configd/SystemConfiguration.fproj/SCProxies.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2004, 2006-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2004, 2006-2013, 2015, 2016 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,9 +35,9 @@
 #include 
 
 #include 
-
-
-
+#if	!TARGET_OS_SIMULATOR
+#include 
+#endif	// !TARGET_OS_SIMULATOR
 
 CFStringRef
 SCDynamicStoreKeyCreateProxies(CFAllocatorRef allocator)
@@ -75,7 +75,8 @@ validate_proxy_content(CFMutableDictionaryRef	proxies,
 			goto disable;		// if not enabled, remove provided key/value
 		}
 
-		if ((enabled != 0) && !isA_CFString(host)) {
+		if ((enabled != 0) &&
+		    (!isA_CFString(host) || (CFStringGetLength(host) == 0))) {
 			goto disable;		// if enabled, not provided (or not valid)
 		}
 	}
@@ -265,7 +266,7 @@ __SCNetworkProxiesCopyNormalized(CFDictionaryRef proxy)
 			CFStringRef	str;
 
 			str = CFArrayGetValueAtIndex(array, i);
-			if (!isA_CFString(str)) {
+			if (!isA_CFString(str) || (CFStringGetLength(str) == 0)) {
 				// if we don't like the array contents
 				n = 0;
 				break;
@@ -366,12 +367,12 @@ normalize_scoped_proxy(const void *key, const void *value, void *context)
 static void
 normalize_services_proxy(const void *key, const void *value, void *context)
 {
-	CFStringRef		serviceID	= (CFStringRef)key;
+	CFNumberRef		serviceIndex	= (CFNumberRef)key;
 	CFDictionaryRef		proxy		= (CFDictionaryRef)value;
 	CFMutableDictionaryRef	newServices	= (CFMutableDictionaryRef)context;
 
 	proxy = __SCNetworkProxiesCopyNormalized(proxy);
-	CFDictionarySetValue(newServices, serviceID, proxy);
+	CFDictionarySetValue(newServices, serviceIndex, proxy);
 	CFRelease(proxy);
 
 	return;
@@ -403,12 +404,12 @@ SCDynamicStoreCopyProxiesWithOptions(SCDynamicStoreRef store, CFDictionaryRef op
 {
 	Boolean			bypass	= FALSE;
 	CFStringRef		key;
-	CFDictionaryRef		proxies;
+	CFDictionaryRef		proxies	= NULL;
 
 	if (options != NULL) {
 		CFBooleanRef	bypassGlobalOption;
 
-		if (isA_CFDictionary(options) == NULL) {
+		if (!isA_CFDictionary(options)) {
 			_SCErrorSet(kSCStatusInvalidArgument);
 			return NULL;
 		}
@@ -426,6 +427,21 @@ SCDynamicStoreCopyProxiesWithOptions(SCDynamicStoreRef store, CFDictionaryRef op
 	proxies = SCDynamicStoreCopyValue(store, key);
 	CFRelease(key);
 
+	if (isA_CFDictionary(proxies) &&
+	    CFDictionaryContainsKey(proxies, kSCPropNetProxiesBypassAllowed)) {
+		CFMutableDictionaryRef	newProxies;
+
+		newProxies = CFDictionaryCreateMutableCopy(NULL, 0, proxies);
+		CFRelease(proxies);
+
+		/*
+		 * Remove kSCPropNetProxiesBypassAllowed property from network
+		 * service based configurations.
+		 */
+		CFDictionaryRemoveValue(newProxies, kSCPropNetProxiesBypassAllowed);
+		proxies = newProxies;
+	}
+
 
 	if (proxies != NULL) {
 		CFDictionaryRef	base	= proxies;
@@ -441,7 +457,6 @@ SCDynamicStoreCopyProxiesWithOptions(SCDynamicStoreRef store, CFDictionaryRef op
 					     &kCFTypeDictionaryValueCallBacks);
 	}
 
-
 	return proxies;
 }
 
@@ -479,7 +494,6 @@ _SCNetworkProxiesCopyMatchingInternal(CFDictionaryRef	globalConfiguration,
 
 		euuid = CFDictionaryGetValue(options, kSCProxiesMatchExecutableUUID);
 		euuid = isA_CFType(euuid, CFUUIDGetTypeID());
-
 		if (euuid != NULL) {
 			CFUUIDBytes uuid_bytes = CFUUIDGetUUIDBytes(euuid);
 			uuid_copy(match_uuid, (const uint8_t *)&uuid_bytes);
@@ -497,6 +511,21 @@ _SCNetworkProxiesCopyMatchingInternal(CFDictionaryRef	globalConfiguration,
 
 		scoped = CFDictionaryGetValue(globalConfiguration, kSCPropNetProxiesScoped);
 		if (scoped == NULL) {
+#if	!TARGET_OS_SIMULATOR
+			if (CFDictionaryContainsKey(globalConfiguration, kSCPropNetProxiesBypassAllowed) &&
+			    ne_session_always_on_vpn_configs_present()) {
+				/*
+				 * The kSCPropNetProxiesBypassAllowed key will be present
+				 * for managed proxy configurations where bypassing is *not*
+				 * allowed.
+				 *
+				 * Also (for now), forcing the use of the managed proxy
+				 * configurations will only be done with AOVPN present.
+				 */
+				goto useDefault;
+			}
+#endif	// !TARGET_OS_SIMULATOR
+
 			// if no scoped proxy configurations
 			_SCErrorSet(kSCStatusOK);
 			return NULL;
@@ -620,6 +649,10 @@ _SCNetworkProxiesCopyMatchingInternal(CFDictionaryRef	globalConfiguration,
 
 	// no matches, return "global" proxy configuration
 
+#if	!TARGET_OS_SIMULATOR
+    useDefault :
+#endif	// !TARGET_OS_SIMULATOR
+
 	newProxy = CFDictionaryCreateMutableCopy(NULL, 0, globalConfiguration);
 	CFDictionaryRemoveValue(newProxy, kSCPropNetProxiesScoped);
 	CFDictionaryRemoveValue(newProxy, kSCPropNetProxiesServices);
@@ -630,17 +663,42 @@ _SCNetworkProxiesCopyMatchingInternal(CFDictionaryRef	globalConfiguration,
     done :
 
 	if (sc_status != kSCStatusOK) {
-		if (proxies != NULL) {
-			CFRelease(proxies);
-			proxies = NULL;
-		}
 		_SCErrorSet(sc_status);
+
+//		Note: if we are returning an error then we must
+//		      return w/proxies==NULL.  At present, there
+//		      is no code (above) that would get here with
+//		      proxies!=NULL so we don't need to take any
+//		      action but future coder's should beware :-)
+//		if (proxies != NULL) {
+//			CFRelease(proxies);
+//			proxies = NULL;
+//		}
 	}
 	if (trimmed != NULL) CFRelease(trimmed);
 
 	return proxies;
 }
 
+CFDataRef
+SCNetworkProxiesCreateProxyAgentData(CFDictionaryRef proxyConfig)
+{
+	CFDataRef result = NULL;
+	CFArrayRef newProxy = NULL;
+
+	if (!isA_CFDictionary(proxyConfig)) {
+		SC_log(LOG_ERR, "Invalid proxy configuration");
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
+	}
+
+	newProxy = CFArrayCreate(NULL, (const void **)&proxyConfig, 1, &kCFTypeArrayCallBacks);
+	(void)_SCSerialize(newProxy, &result, NULL, NULL);
+	CFRelease(newProxy);
+
+	return result;
+}
+
 CFArrayRef
 SCNetworkProxiesCopyMatching(CFDictionaryRef	globalConfiguration,
 			     CFStringRef	server,
diff --git a/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.c b/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.c
index 02b3bf82e..ebb53abd5 100644
--- a/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.c
+++ b/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.c
@@ -3,7 +3,6 @@
  * DO NOT EDIT!
  */
 
-#include 
 #include 
 #include 
 
@@ -13,7 +12,9 @@ const CFStringRef kSCPropInterfaceName                             = CFSTR("Inte
 const CFStringRef kSCPropMACAddress                                = CFSTR("MACAddress");
 const CFStringRef kSCPropUserDefinedName                           = CFSTR("UserDefinedName");
 const CFStringRef kSCPropVersion                                   = CFSTR("Version");
+const CFStringRef kSCPropNetIgnoreLinkStatus                       = CFSTR("IgnoreLinkStatus");
 const CFStringRef kSCPropConfirmedInterfaceName                    = CFSTR("ConfirmedInterfaceName");
+const CFStringRef kSCPropDisableUntilNeeded                        = CFSTR("DisableUntilNeeded");
 const CFStringRef kSCPrefCurrentSet                                = CFSTR("CurrentSet");
 const CFStringRef kSCPrefNetworkServices                           = CFSTR("NetworkServices");
 const CFStringRef kSCPrefSets                                      = CFSTR("Sets");
@@ -60,24 +61,32 @@ const CFStringRef kSCEntNetSMB                                     = CFSTR("SMB"
 #endif	// !TARGET_OS_IPHONE
 
 const CFStringRef kSCEntNet6to4                                    = CFSTR("6to4");
-const CFStringRef kSCEntNetActiveDuringSleepRequested              = CFSTR("ActiveDuringSleepRequested");
-const CFStringRef kSCEntNetActiveDuringSleepSupported              = CFSTR("ActiveDuringSleepSupported");
 const CFStringRef kSCEntNetAppLayer                                = CFSTR("AppLayer");
 
 
 const CFStringRef kSCEntNetEAPOL                                   = CFSTR("EAPOL");
+const CFStringRef kSCEntNetIdleRoute                               = CFSTR("IdleRoute");
+const CFStringRef kSCEntNetInterfaceActiveDuringSleepRequested     = CFSTR("ActiveDuringSleepRequested");
+const CFStringRef kSCEntNetInterfaceActiveDuringSleepSupported     = CFSTR("ActiveDuringSleepSupported");
+const CFStringRef kSCEntNetInterfaceDelegation                     = CFSTR("InterfaceDelegation");
+const CFStringRef kSCEntNetIPv4ARPCollision                        = CFSTR("IPv4ARPCollision");
+const CFStringRef kSCEntNetIPv4PortInUse                           = CFSTR("PortInUse");
 const CFStringRef kSCEntNetIPv4RouterARPFailure                    = CFSTR("IPv4RouterARPFailure");
 const CFStringRef kSCEntNetIPv4RouterARPAlive                      = CFSTR("IPv4RouterARPAlive");
+const CFStringRef kSCEntNetIPv6RouterExpired                       = CFSTR("IPv6RouterExpired");
 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");
+const CFStringRef kSCEntNetRefreshConfiguration                    = CFSTR("RefreshConfiguration");
 const CFStringRef kSCEntNetService                                 = CFSTR("__SERVICE__");
 const CFStringRef kSCEntNetVPN                                     = CFSTR("VPN");
 const CFStringRef kSCPropNetOverridePrimary                        = CFSTR("OverridePrimary");
 const CFStringRef kSCPropNetServiceOrder                           = CFSTR("ServiceOrder");
 const CFStringRef kSCPropNetPPPOverridePrimary                     = CFSTR("PPPOverridePrimary");
-const CFStringRef kSCPropNetIgnoreLinkStatus                       = CFSTR("IgnoreLinkStatus");
 const CFStringRef kSCPropNetInterfaces                             = CFSTR("Interfaces");
 const CFStringRef kSCPropNetLocalHostName                          = CFSTR("LocalHostName");
 const CFStringRef kSCPropNetAirPortAllowNetCreation                = CFSTR("AllowNetCreation");
@@ -95,18 +104,11 @@ const CFStringRef kSCValNetAirPortJoinModeStrongest                = CFSTR("Stro
 const CFStringRef kSCValNetAirPortAuthPasswordEncryptionKeychain   = CFSTR("Keychain");
 
 #if	!TARGET_OS_IPHONE
-const CFStringRef kSCPropNetAppleTalkComputerName                  = CFSTR("ComputerName");
-const CFStringRef kSCPropNetAppleTalkComputerNameEncoding          = CFSTR("ComputerNameEncoding");
 const CFStringRef kSCPropNetAppleTalkConfigMethod                  = CFSTR("ConfigMethod");
 const CFStringRef kSCPropNetAppleTalkDefaultZone                   = CFSTR("DefaultZone");
 const CFStringRef kSCPropNetAppleTalkNetworkID                     = CFSTR("NetworkID");
-const CFStringRef kSCPropNetAppleTalkNetworkRange                  = CFSTR("NetworkRange");
 const CFStringRef kSCPropNetAppleTalkNodeID                        = CFSTR("NodeID");
-const CFStringRef kSCPropNetAppleTalkSeedNetworkRange              = CFSTR("SeedNetworkRange");
-const CFStringRef kSCPropNetAppleTalkSeedZones                     = CFSTR("SeedZones");
 const CFStringRef kSCValNetAppleTalkConfigMethodNode               = CFSTR("Node");
-const CFStringRef kSCValNetAppleTalkConfigMethodRouter             = CFSTR("Router");
-const CFStringRef kSCValNetAppleTalkConfigMethodSeedRouter         = CFSTR("SeedRouter");
 #endif	// !TARGET_OS_IPHONE
 
 
@@ -121,6 +123,7 @@ const CFStringRef kSCPropNetDNSServerTimeout                       = CFSTR("Serv
 const CFStringRef kSCPropNetDNSSortList                            = CFSTR("SortList");
 const CFStringRef kSCPropNetDNSSupplementalMatchDomains            = CFSTR("SupplementalMatchDomains");
 const CFStringRef kSCPropNetDNSSupplementalMatchOrders             = CFSTR("SupplementalMatchOrders");
+const CFStringRef kSCPropNetDNSConfirmedServiceID                  = CFSTR("ConfirmedServiceID");
 const CFStringRef kSCPropNetDNSServiceIdentifier                   = CFSTR("ServiceIdentifier");
 const CFStringRef kSCPropNetDNSSupplementalMatchDomainsNoSearch    = CFSTR("SupplementalMatchDomainsNoSearch");
 const CFStringRef kSCPropNetEthernetMediaSubType                   = CFSTR("MediaSubType");
@@ -196,6 +199,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");
@@ -217,8 +221,11 @@ const CFStringRef kSCValNetIPv6ConfigMethodManual                  = CFSTR("Manu
 const CFStringRef kSCValNetIPv6ConfigMethodRouterAdvertisement     = CFSTR("RouterAdvertisement");
 const CFStringRef kSCValNetIPv6ConfigMethod6to4                    = CFSTR("6to4");
 const CFStringRef kSCPropNetIPv6AdditionalRoutes                   = CFSTR("AdditionalRoutes");
+const CFStringRef kSCPropNetIPv6EnableCGA                          = CFSTR("EnableCGA");
 const CFStringRef kSCPropNetIPv6ExcludedRoutes                     = CFSTR("ExcludedRoutes");
 const CFStringRef kSCPropNetIPv6IncludedRoutes                     = CFSTR("IncludedRoutes");
+const CFStringRef kSCPropNetIPv6LinkLocalAddress                   = CFSTR("LinkLocalAddress");
+const CFStringRef kSCPropNetIPv6PerformPLATDiscovery               = CFSTR("PerformPLATDiscovery");
 const CFStringRef kSCPropNetIPv6RouteDestinationAddress            = CFSTR("DestinationAddress");
 const CFStringRef kSCPropNetIPv6RoutePrefixLength                  = CFSTR("PrefixLength");
 const CFStringRef kSCPropNetIPv6RouteGatewayAddress                = CFSTR("GatewayAddress");
@@ -253,18 +260,6 @@ const CFStringRef kSCPropNetModemSpeed                             = CFSTR("Spee
 const CFStringRef kSCValNetModemDialModeIgnoreDialTone             = CFSTR("IgnoreDialTone");
 const CFStringRef kSCValNetModemDialModeManual                     = CFSTR("Manual");
 const CFStringRef kSCValNetModemDialModeWaitForDialTone            = CFSTR("WaitForDialTone");
-
-#if	!TARGET_OS_IPHONE
-const CFStringRef kSCPropNetNetInfoBindingMethods                  = CFSTR("BindingMethods");
-const CFStringRef kSCPropNetNetInfoServerAddresses                 = CFSTR("ServerAddresses");
-const CFStringRef kSCPropNetNetInfoServerTags                      = CFSTR("ServerTags");
-const CFStringRef kSCPropNetNetInfoBroadcastServerTag              = CFSTR("BroadcastServerTag");
-const CFStringRef kSCValNetNetInfoBindingMethodsBroadcast          = CFSTR("Broadcast");
-const CFStringRef kSCValNetNetInfoBindingMethodsDHCP               = CFSTR("DHCP");
-const CFStringRef kSCValNetNetInfoBindingMethodsManual             = CFSTR("Manual");
-const CFStringRef kSCValNetNetInfoDefaultServerTag                 = CFSTR("network");
-#endif	// !TARGET_OS_IPHONE
-
 const CFStringRef kSCPropNetPPPACSPEnabled                         = CFSTR("ACSPEnabled");
 const CFStringRef kSCPropNetPPPConnectTime                         = CFSTR("ConnectTime");
 const CFStringRef kSCPropNetPPPDeviceLastCause                     = CFSTR("DeviceLastCause");
@@ -277,8 +272,8 @@ const CFStringRef kSCPropNetPPPDisconnectOnSleep                   = CFSTR("Disc
 const CFStringRef kSCPropNetPPPDisconnectOnWake                    = CFSTR("DisconnectOnWake");
 const CFStringRef kSCPropNetPPPDisconnectOnWakeTimer               = CFSTR("DisconnectOnWakeTimer");
 const CFStringRef kSCPropNetPPPDisconnectTime                      = CFSTR("DisconnectTime");
-const CFStringRef kSCPropNetPPPIdleReminderTimer                   = CFSTR("IdleReminderTimer");
 const CFStringRef kSCPropNetPPPIdleReminder                        = CFSTR("IdleReminder");
+const CFStringRef kSCPropNetPPPIdleReminderTimer                   = CFSTR("IdleReminderTimer");
 const CFStringRef kSCPropNetPPPLastCause                           = CFSTR("LastCause");
 const CFStringRef kSCPropNetPPPLogfile                             = CFSTR("Logfile");
 const CFStringRef kSCPropNetPPPPlugins                             = CFSTR("Plugins");
@@ -345,6 +340,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");
@@ -374,11 +372,16 @@ const CFStringRef kSCPropNetProxiesBypassAllowed                   = CFSTR("Bypa
 const CFStringRef kSCPropNetProxiesFallBackAllowed                 = CFSTR("FallBackAllowed");
 const CFStringRef kSCPropNetProxiesSupplementalMatchDomains        = CFSTR("SupplementalMatchDomains");
 const CFStringRef kSCPropNetProxiesSupplementalMatchOrders         = CFSTR("SupplementalMatchOrders");
+const CFStringRef kSCPropNetProxiesServiceSpecific                 = CFSTR("ServiceSpecific");
 const CFStringRef kSCPropNetProxiesScoped                          = CFSTR("__SCOPED__");
 const CFStringRef kSCPropNetProxiesServices                        = CFSTR("__SERVICES__");
 const CFStringRef kSCPropNetProxiesSupplemental                    = CFSTR("__SUPPLEMENTAL__");
 const CFStringRef kSCPropNetProxiesSupplementalMatchDomain         = CFSTR("__MATCH_DOMAIN__");
+const CFStringRef kSCPropNetQoSMarkingAppleAudioVideoCalls         = CFSTR("QoSMarkingAppleAudioVideoCalls");
+const CFStringRef kSCPropNetQoSMarkingEnabled                      = CFSTR("QoSMarkingEnabled");
+const CFStringRef kSCPropNetQoSMarkingWhitelistedAppIdentifiers    = CFSTR("QoSMarkingWhitelistedAppIdentifiers");
 const CFStringRef kSCPropNetServicePrimaryRank                     = CFSTR("PrimaryRank");
+const CFStringRef kSCPropNetServiceServiceIndex                    = CFSTR("ServiceIndex");
 const CFStringRef kSCPropNetServiceUserDefinedName                 = CFSTR("UserDefinedName");
 const CFStringRef kSCValNetServicePrimaryRankFirst                 = CFSTR("First");
 const CFStringRef kSCValNetServicePrimaryRankLast                  = CFSTR("Last");
diff --git a/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.h b/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.h
index 17d5e2994..94d61c985 100644
--- a/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.h
+++ b/src/configd/SystemConfiguration.fproj/SCSchemaDefinitions.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2019 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@
  */
 
@@ -124,7 +124,6 @@
  *   kSCPropNetInterfaceHardware                        "Hardware"                     CFString
  *   kSCPropNetInterfaceType                            "Type"                         CFString
  *   kSCPropNetInterfaceSubType                         "SubType"                      CFString
- *   kSCPropNetInterfaceSupportsModemOnHold             "SupportsModemOnHold"          CFNumber (0 or 1)
  *
  *   --- kSCPropNetInterfaceType values ---
  *   kSCValNetInterfaceTypeEthernet                     "Ethernet"
@@ -253,11 +252,10 @@
  *   kSCPropNetPPPDisconnectOnLogout                    "DisconnectOnLogout"           CFNumber (0 or 1)
  *   kSCPropNetPPPDisconnectOnSleep                     "DisconnectOnSleep"            CFNumber (0 or 1)
  *   kSCPropNetPPPDisconnectTime                        "DisconnectTime"               CFNumber
- *   kSCPropNetPPPIdleReminderTimer                     "IdleReminderTimer"            CFNumber
  *   kSCPropNetPPPIdleReminder                          "IdleReminder"                 CFNumber (0 or 1)
+ *   kSCPropNetPPPIdleReminderTimer                     "IdleReminderTimer"            CFNumber
  *   kSCPropNetPPPLastCause                             "LastCause"                    CFNumber
  *   kSCPropNetPPPLogfile                               "Logfile"                      CFString
- *   kSCPropNetPPPPlugins                               "Plugins"                      CFArray[CFString]
  *   kSCPropNetPPPRetryConnectTime                      "RetryConnectTime"             CFNumber
  *   kSCPropNetPPPSessionTimer                          "SessionTimer"                 CFNumber
  *   kSCPropNetPPPStatus                                "Status"                       CFNumber
@@ -265,7 +263,6 @@
  *   kSCPropNetPPPVerboseLogging                        "VerboseLogging"               CFNumber (0 or 1)
  *
  *   --- Auth: ---
- *   kSCPropNetPPPAuthEAPPlugins                        "AuthEAPPlugins"               CFArray[CFString]
  *   kSCPropNetPPPAuthName                              "AuthName"                     CFString
  *   kSCPropNetPPPAuthPassword                          "AuthPassword"                 CFString
  *   kSCPropNetPPPAuthPasswordEncryption                "AuthPasswordEncryption"       CFString
@@ -326,10 +323,6 @@
  *
  *   * RESERVED FOR FUTURE USE *
  *
- * kSCEntNetPPTP Entity Keys
- *
- *   * RESERVED FOR FUTURE USE *
- *
  * kSCEntNetL2TP Entity Keys
  *
  *   kSCPropNetL2TPIPSecSharedSecret                    "IPSecSharedSecret"            CFString
@@ -416,117 +409,60 @@
  */
 
 
-/*
- * Note: The MACOSX_DEPLOYMENT_TARGET environment variable should be used
- *       when building an application targeted for an earlier version of
- *       Mac OS X.  Please reference Technical Note TN2064 for more details.
- */
-
-/*
- * Note: For Cocoa/Obj-C/Foundation applications accessing these preference
- *       keys you may want to consider the following :
- *
- *       #define SC_SCHEMA_DECLARATION(k,q)	extern NSString * k;
- *       #import 
- */
-
-/*
- * Note: For CFM applications using these schema keys you may want to
- *       consider the following :
- *
- *       #define SC_SCHEMA_DECLARATION(k,q)
- *       #define SC_SCHEMA_KV(k,v,t)	lookup_SC_key( CFSTR( #k ) )
- *       #include 
- *
- *       CFStringRef lookup_SC_key(CFStringRef key)
- *       {
- *         // this function should [dynamically, on-demand] load the
- *         // SystemConfiguration.framework, look up the provided key,
- *         // and return the associated value.
- *       }
- */
-
-/*
- * Note: Earlier versions of this header file defined a "SCSTR" macro
- *       which helped to facilitate Obj-C development. Use of this macro
- *       has been deprecated (in Mac OS X 10.4) in favor of the newer
- *       "SC_SCHEMA_DECLARATION" and "SC_SCHEMA_KV" macros
- */
-
-
 #ifndef	_SCSCHEMADEFINITIONS_H
-#ifdef	USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
-#include 
-#else	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
 #define	_SCSCHEMADEFINITIONS_H
 
-/* -------------------- Macro declarations -------------------- */
-
-#include 
+#include 
 #include 
+#include 
 
-/*
- * Define a schema key/value/type tuple
- */
-#ifndef SC_SCHEMA_KV
-  #define SC_SCHEMA_KV(k,v,t)	k
-#endif
-
-/*
- * Provide an "extern" for the key/value
- */
-#ifndef SC_SCHEMA_DECLARATION
-  #ifndef SCSTR
-    #include 
-    #define SC_SCHEMA_DECLARATION(k,q)	extern const CFStringRef k q;
-  #else
-    #import 
-    #define SC_SCHEMA_DECLARATION(k,q)	extern NSString * k q;
-  #endif
-#endif
-/* -------------------- HeaderDoc comments -------------------- */
-
-
-#if	0
 /*!
  *	@header SCSchemaDefinitions
  */
 
+
+CF_ASSUME_NONNULL_BEGIN
+
 /*!
   @const kSCResvLink
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCResvLink;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCResvInactive;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropInterfaceName;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropMACAddress;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropUserDefinedName;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropVersion;
+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
 
 /*!
   @group Preference Keys
@@ -534,27 +470,31 @@ extern const CFStringRef kSCPropVersion;
 
 /*!
   @const kSCPrefCurrentSet
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPrefCurrentSet;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPrefNetworkServices;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPrefSets;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPrefSystem;
+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
 
 /*!
   @group Component Keys
@@ -562,51 +502,51 @@ extern const CFStringRef kSCPrefSystem;
 
 /*!
   @const kSCCompNetwork
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompNetwork;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompService;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompGlobal;
+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
-  @availability Introduced in Mac OS X 10.2.
  */
-extern const CFStringRef kSCCompHostNames;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompInterface;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompSystem;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompUsers;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCCompAnyRegex;
+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
 
 /*!
   @group Network Entity Keys
@@ -614,129 +554,136 @@ extern const CFStringRef kSCCompAnyRegex;
 
 /*!
   @const kSCEntNetAirPort
-  @availability Introduced in Mac OS X 10.1.
- */
-extern const CFStringRef kSCEntNetAirPort;
-
-/*!
-  @const kSCEntNetAppleTalk
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetAppleTalk;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetDHCP;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetDNS;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetEthernet;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetFireWire;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetInterface;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetIPSec;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetIPv4;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetIPv6;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetL2TP;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetLink;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetModem;
-
-/*!
-  @const kSCEntNetNetInfo
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCEntNetNetInfo;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetPPP;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetPPPoE;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetPPPSerial;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetPPTP;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetProxies;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetSMB;
+extern const CFStringRef kSCEntNetSMB                                       API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCEntNetSMB kSCEntNetSMB
 
 /*!
   @const kSCEntNet6to4
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNet6to4;
+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
 
 /*!
   @group kSCCompNetwork Properties
@@ -744,21 +691,24 @@ extern const CFStringRef kSCEntNet6to4;
 
 /*!
   @const kSCPropNetOverridePrimary
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetOverridePrimary;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetServiceOrder;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPOverridePrimary;
+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
 
 /*!
   @group kSCCompNetworkInterface Properties
@@ -766,9 +716,10 @@ extern const CFStringRef kSCPropNetPPPOverridePrimary;
 
 /*!
   @const kSCPropNetInterfaces
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetInterfaces;
+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
 
 /*!
   @group kSCCompNetworkHostNames Properties
@@ -776,9 +727,10 @@ extern const CFStringRef kSCPropNetInterfaces;
 
 /*!
   @const kSCPropNetLocalHostName
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetLocalHostName;
+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
 
 /*!
   @group kSCEntNetAirPort (Hardware) Entity Keys
@@ -786,157 +738,88 @@ extern const CFStringRef kSCPropNetLocalHostName;
 
 /*!
   @const kSCPropNetAirPortAllowNetCreation
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetAirPortAllowNetCreation;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFData
  */
-extern const CFStringRef kSCPropNetAirPortAuthPassword;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetAirPortAuthPasswordEncryption;
+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
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetAirPortJoinMode;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetAirPortPowerEnabled;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetAirPortPreferredNetwork;
+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
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetAirPortSavePasswords;
+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
-  @availability Introduced in Mac OS X 10.3, but later deprecated in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetAirPortJoinModeAutomatic;
+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
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetAirPortJoinModePreferred;
+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
-  @availability Introduced in Mac OS X 10.4, but later deprecated in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetAirPortJoinModeRanked;
+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
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetAirPortJoinModeRecent;
+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
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetAirPortJoinModeStrongest;
+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
-  @availability Introduced in Mac OS X 10.3, but later deprecated in Mac OS X 10.9.
- */
-extern const CFStringRef kSCValNetAirPortAuthPasswordEncryptionKeychain;
-
-/*!
-  @group kSCEntNetAppleTalk Entity Keys
- */
-
-/*!
-  @const kSCPropNetAppleTalkComputerName
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkComputerName;
-
-/*!
-  @const kSCPropNetAppleTalkComputerNameEncoding
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkComputerNameEncoding;
-
-/*!
-  @const kSCPropNetAppleTalkConfigMethod
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkConfigMethod;
-
-/*!
-  @const kSCPropNetAppleTalkDefaultZone
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkDefaultZone;
-
-/*!
-  @const kSCPropNetAppleTalkNetworkID
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
  */
-extern const CFStringRef kSCPropNetAppleTalkNetworkID;
-
-/*!
-  @const kSCPropNetAppleTalkNetworkRange
-  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkNetworkRange;
-
-/*!
-  @const kSCPropNetAppleTalkNodeID
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkNodeID;
-
-/*!
-  @const kSCPropNetAppleTalkSeedNetworkRange
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkSeedNetworkRange;
-
-/*!
-  @const kSCPropNetAppleTalkSeedZones
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCPropNetAppleTalkSeedZones;
-
-/*!
-  @const kSCValNetAppleTalkConfigMethodNode
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCValNetAppleTalkConfigMethodNode;
-
-/*!
-  @const kSCValNetAppleTalkConfigMethodRouter
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCValNetAppleTalkConfigMethodRouter;
-
-/*!
-  @const kSCValNetAppleTalkConfigMethodSeedRouter
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.
- */
-extern const CFStringRef kSCValNetAppleTalkConfigMethodSeedRouter;
+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
 
 /*!
   @group kSCEntNetDNS Entity Keys
@@ -944,63 +827,73 @@ extern const CFStringRef kSCValNetAppleTalkConfigMethodSeedRouter;
 
 /*!
   @const kSCPropNetDNSDomainName
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetDNSDomainName;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetDNSOptions;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetDNSSearchDomains;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetDNSSearchOrder;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetDNSServerAddresses;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetDNSServerPort;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetDNSServerTimeout;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetDNSSortList;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetDNSSupplementalMatchDomains;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFArray[CFNumber]
  */
-extern const CFStringRef kSCPropNetDNSSupplementalMatchOrders;
+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
 
 /*!
   @group kSCEntNetEthernet (Hardware) Entity Keys
@@ -1008,21 +901,24 @@ extern const CFStringRef kSCPropNetDNSSupplementalMatchOrders;
 
 /*!
   @const kSCPropNetEthernetMediaSubType
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetEthernetMediaSubType;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetEthernetMediaOptions;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetEthernetMTU;
+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
 
 /*!
   @group kSCEntNetFireWire (Hardware) Entity Keys
@@ -1034,87 +930,92 @@ extern const CFStringRef kSCPropNetEthernetMTU;
 
 /*!
   @const kSCPropNetInterfaceDeviceName
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetInterfaceDeviceName;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetInterfaceHardware;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetInterfaceType;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetInterfaceSubType;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetInterfaceSupportsModemOnHold;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetInterfaceTypeEthernet;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetInterfaceTypeFireWire;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetInterfaceTypePPP;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetInterfaceType6to4;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetInterfaceTypeIPSec;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetInterfaceSubTypePPPoE;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetInterfaceSubTypePPPSerial;
+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
-  @availability Introduced in Mac OS X 10.2.
  */
-extern const CFStringRef kSCValNetInterfaceSubTypePPTP;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetInterfaceSubTypeL2TP;
+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
 
 /*!
   @group kSCEntNetIPSec Entity Keys
@@ -1122,123 +1023,136 @@ extern const CFStringRef kSCValNetInterfaceSubTypeL2TP;
 
 /*!
   @const kSCPropNetIPSecAuthenticationMethod
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecAuthenticationMethod;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFData
  */
-extern const CFStringRef kSCPropNetIPSecLocalCertificate;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecLocalIdentifier;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecLocalIdentifierType;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecSharedSecret;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecSharedSecretEncryption;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetIPSecConnectTime;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecRemoteAddress;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetIPSecStatus;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetIPSecXAuthEnabled;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecXAuthName;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecXAuthPassword;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPSecXAuthPasswordEncryption;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetIPSecAuthenticationMethodSharedSecret;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetIPSecAuthenticationMethodCertificate;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetIPSecAuthenticationMethodHybrid;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetIPSecLocalIdentifierTypeKeyID;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetIPSecSharedSecretEncryptionKeychain;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionKeychain;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionPrompt;
+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
 
 /*!
   @group kSCEntNetIPv4 Entity Keys
@@ -1246,87 +1160,94 @@ extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionPrompt;
 
 /*!
   @const kSCPropNetIPv4Addresses
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPv4Addresses;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4ConfigMethod;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4DHCPClientID;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4Router;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPv4SubnetMasks;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPv4DestAddresses;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPv4BroadcastAddresses;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodAutomatic;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodBOOTP;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodDHCP;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodINFORM;
+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
-  @availability Introduced in Mac OS X 10.2.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodLinkLocal;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodManual;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodPPP;
+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
 
 /*!
   @group kSCEntNetIPv6 Entity Keys
@@ -1334,69 +1255,75 @@ extern const CFStringRef kSCValNetIPv4ConfigMethodPPP;
 
 /*!
   @const kSCPropNetIPv6Addresses
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPv6Addresses;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv6ConfigMethod;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPv6DestAddresses;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetIPv6Flags;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFArray[CFNumber]
  */
-extern const CFStringRef kSCPropNetIPv6PrefixLength;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv6Router;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetIPv6ConfigMethodAutomatic;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetIPv6ConfigMethodLinkLocal;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetIPv6ConfigMethodManual;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetIPv6ConfigMethodRouterAdvertisement;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetIPv6ConfigMethod6to4;
+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
 
 /*!
   @group kSCEntNet6to4 Entity Keys
@@ -1404,9 +1331,10 @@ extern const CFStringRef kSCValNetIPv6ConfigMethod6to4;
 
 /*!
   @const kSCPropNet6to4Relay
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNet6to4Relay;
+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
 
 /*!
   @group kSCEntNetLink Entity Keys
@@ -1414,15 +1342,17 @@ extern const CFStringRef kSCPropNet6to4Relay;
 
 /*!
   @const kSCPropNetLinkActive
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFBoolean
  */
-extern const CFStringRef kSCPropNetLinkActive;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFBoolean
  */
-extern const CFStringRef kSCPropNetLinkDetaching;
+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
 
 /*!
   @group kSCEntNetModem (Hardware) Entity Keys
@@ -1430,187 +1360,154 @@ extern const CFStringRef kSCPropNetLinkDetaching;
 
 /*!
   @const kSCPropNetModemAccessPointName
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemAccessPointName;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemConnectionPersonality;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemConnectionScript;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetModemConnectSpeed;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemDataCompression;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemDeviceContextID;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemDeviceModel;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemDeviceVendor;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemDialMode;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemErrorCorrection;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemHoldCallWaitingAudibleAlert;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemHoldDisconnectOnAnswer;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemHoldEnabled;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemHoldReminder;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetModemHoldReminderTime;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetModemNote;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemPulseDial;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetModemSpeaker;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetModemSpeed;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetModemDialModeIgnoreDialTone;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCValNetModemDialModeManual;
+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
-  @availability Introduced in Mac OS X 10.1.
- */
-extern const CFStringRef kSCValNetModemDialModeWaitForDialTone;
-
-/*!
-  @group kSCEntNetNetInfo Entity Keys
- */
-
-/*!
-  @const kSCPropNetNetInfoBindingMethods
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCPropNetNetInfoBindingMethods;
-
-/*!
-  @const kSCPropNetNetInfoServerAddresses
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCPropNetNetInfoServerAddresses;
-
-/*!
-  @const kSCPropNetNetInfoServerTags
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
  */
-extern const CFStringRef kSCPropNetNetInfoServerTags;
-
-/*!
-  @const kSCPropNetNetInfoBroadcastServerTag
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCPropNetNetInfoBroadcastServerTag;
-
-/*!
-  @const kSCValNetNetInfoBindingMethodsBroadcast
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCValNetNetInfoBindingMethodsBroadcast;
-
-/*!
-  @const kSCValNetNetInfoBindingMethodsDHCP
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCValNetNetInfoBindingMethodsDHCP;
-
-/*!
-  @const kSCValNetNetInfoBindingMethodsManual
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCValNetNetInfoBindingMethodsManual;
-
-/*!
-  @const kSCValNetNetInfoDefaultServerTag
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.
- */
-extern const CFStringRef kSCValNetNetInfoDefaultServerTag;
+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
 
 /*!
   @group kSCEntNetPPP Entity Keys
@@ -1618,351 +1515,407 @@ extern const CFStringRef kSCValNetNetInfoDefaultServerTag;
 
 /*!
   @const kSCPropNetPPPACSPEnabled
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPACSPEnabled;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPConnectTime;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPDeviceLastCause;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPDialOnDemand;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnFastUserSwitch;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnIdle;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnIdleTimer;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnLogout;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnSleep;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPDisconnectTime;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @const kSCPropNetPPPIdleReminder
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPIdleReminderTimer;
+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 kSCPropNetPPPIdleReminder
-  @availability Introduced in Mac OS X 10.1.
+  @const kSCPropNetPPPIdleReminderTimer
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPIdleReminder;
+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 kSCPropNetPPPLastCause
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLastCause;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPLogfile;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPPlugins;
+extern const CFStringRef kSCPropNetPPPPlugins                               API_DEPRECATED("No longer supported", macos(10.2,10.15)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCPropNetPPPPlugins kSCPropNetPPPPlugins
 
 /*!
   @const kSCPropNetPPPRetryConnectTime
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPRetryConnectTime;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPSessionTimer;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPStatus;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPUseSessionTimer;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPVerboseLogging;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPAuthEAPPlugins;
+extern const CFStringRef kSCPropNetPPPAuthEAPPlugins                        API_DEPRECATED("No longer supported", macos(10.3,10.15)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCPropNetPPPAuthEAPPlugins kSCPropNetPPPAuthEAPPlugins
 
 /*!
   @const kSCPropNetPPPAuthName
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPAuthName;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPAuthPassword;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPAuthPasswordEncryption;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPAuthPrompt;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPAuthProtocol;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetPPPAuthPasswordEncryptionKeychain;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPAuthPasswordEncryptionToken;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthPromptBefore;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthPromptAfter;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthProtocolCHAP;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthProtocolEAP;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthProtocolMSCHAP1;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthProtocolMSCHAP2;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetPPPAuthProtocolPAP;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPCommAlternateRemoteAddress;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPCommConnectDelay;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPCommDisplayTerminalWindow;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPCommRedialCount;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPCommRedialEnabled;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPCommRedialInterval;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPCommRemoteAddress;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPCommTerminalScript;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPCommUseTerminalScript;
+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
-  @availability Introduced in Mac OS X 10.2.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPCCPEnabled;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPCCPMPPE40Enabled;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPCCPMPPE128Enabled;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPIPCPCompressionVJ;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPIPCPUsePeerDNS;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPLCPEchoEnabled;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLCPEchoFailure;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLCPEchoInterval;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPLCPCompressionACField;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPLCPCompressionPField;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLCPMRU;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLCPMTU;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLCPReceiveACCM;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPLCPTransmitACCM;
+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
 
 /*!
   @group kSCEntNetPPPoE Entity Keys
@@ -1972,49 +1925,48 @@ extern const CFStringRef kSCPropNetPPPLCPTransmitACCM;
   @group kSCEntNetPPPSerial Entity Keys
  */
 
-/*!
-  @group kSCEntNetPPTP Entity Keys
- */
-
 /*!
   @group kSCEntNetL2TP Entity Keys
  */
 
 /*!
   @const kSCPropNetL2TPIPSecSharedSecret
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetL2TPIPSecSharedSecret;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetL2TPIPSecSharedSecretEncryption;
+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
-  @availability Introduced in Mac OS X 10.3.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetL2TPTransport;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetL2TPIPSecSharedSecretEncryptionKeychain;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetL2TPTransportIP;
+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
-  @availability Introduced in Mac OS X 10.3.
  */
-extern const CFStringRef kSCValNetL2TPTransportIPSec;
+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
 
 /*!
   @group kSCEntNetProxies Entity Keys
@@ -2022,153 +1974,178 @@ extern const CFStringRef kSCValNetL2TPTransportIPSec;
 
 /*!
   @const kSCPropNetProxiesExceptionsList
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetProxiesExceptionsList;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesExcludeSimpleHostnames;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesFTPEnable;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesFTPPassive;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetProxiesFTPPort;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesFTPProxy;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesGopherEnable;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetProxiesGopherPort;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesGopherProxy;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesHTTPEnable;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetProxiesHTTPPort;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesHTTPProxy;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesHTTPSEnable;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetProxiesHTTPSPort;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesHTTPSProxy;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesRTSPEnable;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetProxiesRTSPPort;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesRTSPProxy;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesSOCKSEnable;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetProxiesSOCKSPort;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesSOCKSProxy;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesProxyAutoConfigEnable;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesProxyAutoConfigJavaScript;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetProxiesProxyAutoConfigURLString;
+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
-  @availability Introduced in Mac OS X 10.4.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable;
+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
 
 /*!
   @group kSCEntNetSMB Entity Keys
@@ -2176,57 +2153,62 @@ extern const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable;
 
 /*!
   @const kSCPropNetSMBNetBIOSName
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetSMBNetBIOSName;
+extern const CFStringRef kSCPropNetSMBNetBIOSName                           API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCPropNetSMBNetBIOSName kSCPropNetSMBNetBIOSName
 
 /*!
   @const kSCPropNetSMBNetBIOSNodeType
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetSMBNetBIOSNodeType;
+extern const CFStringRef kSCPropNetSMBNetBIOSNodeType                       API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCPropNetSMBNetBIOSNodeType kSCPropNetSMBNetBIOSNodeType
 
 /*!
   @const kSCPropNetSMBNetBIOSScope
-  @availability Introduced in Mac OS X 10.5, but later deprecated in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetSMBNetBIOSScope;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetSMBWINSAddresses;
+extern const CFStringRef kSCPropNetSMBWINSAddresses                         API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCPropNetSMBWINSAddresses kSCPropNetSMBWINSAddresses
 
 /*!
   @const kSCPropNetSMBWorkgroup
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetSMBWorkgroup;
+extern const CFStringRef kSCPropNetSMBWorkgroup                             API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCPropNetSMBWorkgroup kSCPropNetSMBWorkgroup
 
 /*!
   @const kSCValNetSMBNetBIOSNodeTypeBroadcast
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeBroadcast;
+extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeBroadcast               API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCValNetSMBNetBIOSNodeTypeBroadcast kSCValNetSMBNetBIOSNodeTypeBroadcast
 
 /*!
   @const kSCValNetSMBNetBIOSNodeTypePeer
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetSMBNetBIOSNodeTypePeer;
+extern const CFStringRef kSCValNetSMBNetBIOSNodeTypePeer                    API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCValNetSMBNetBIOSNodeTypePeer kSCValNetSMBNetBIOSNodeTypePeer
 
 /*!
   @const kSCValNetSMBNetBIOSNodeTypeMixed
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeMixed;
+extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeMixed                   API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCValNetSMBNetBIOSNodeTypeMixed kSCValNetSMBNetBIOSNodeTypeMixed
 
 /*!
   @const kSCValNetSMBNetBIOSNodeTypeHybrid
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid;
+extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid                  API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCValNetSMBNetBIOSNodeTypeHybrid kSCValNetSMBNetBIOSNodeTypeHybrid
 
 /*!
   @group kSCCompUsers Entity Keys
@@ -2234,9 +2216,9 @@ extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid;
 
 /*!
   @const kSCEntUsersConsoleUser
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCEntUsersConsoleUser;
+extern const CFStringRef kSCEntUsersConsoleUser                             API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);
+#define kSCEntUsersConsoleUser kSCEntUsersConsoleUser
 
 /*!
   @group kSCCompSystem Properties
@@ -2244,15 +2226,17 @@ extern const CFStringRef kSCEntUsersConsoleUser;
 
 /*!
   @const kSCPropSystemComputerName
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropSystemComputerName;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropSystemComputerNameEncoding;
+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
 
 /*!
   @group SCDynamicStore "domain" prefixes
@@ -2260,33 +2244,33 @@ extern const CFStringRef kSCPropSystemComputerNameEncoding;
 
 /*!
   @const kSCDynamicStoreDomainFile
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCDynamicStoreDomainFile;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCDynamicStoreDomainPlugin;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCDynamicStoreDomainSetup;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCDynamicStoreDomainState;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCDynamicStoreDomainPrefs;
+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
 
 /*!
   @group Preference ("location") Keys
@@ -2294,15 +2278,16 @@ extern const CFStringRef kSCDynamicStoreDomainPrefs;
 
 /*!
   @const kSCDynamicStorePropSetupCurrentSet
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCDynamicStorePropSetupCurrentSet;
+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
-  @availability Introduced in Mac OS X 10.1.
  */
-extern const CFStringRef kSCDynamicStorePropSetupLastUpdated;
+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
 
 /*!
   @group Common/shared Keys
@@ -2310,1818 +2295,53 @@ extern const CFStringRef kSCDynamicStorePropSetupLastUpdated;
 
 /*!
   @const kSCDynamicStorePropNetInterfaces
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCDynamicStorePropNetInterfaces;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCDynamicStorePropNetPrimaryInterface;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCDynamicStorePropNetPrimaryService;
+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
-  @availability Introduced in Mac OS X 10.1.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCDynamicStorePropNetServiceIDs;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.4.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropUsersConsoleUserName;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.4.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropUsersConsoleUserUID;
+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
-  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.4.
- */
-extern const CFStringRef kSCPropUsersConsoleUserGID;
-
-#endif	/* 0 */
-
-
-/* -------------------- Schema declarations -------------------- */
-
-#define	__AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_FUTURE	__AVAILABILITY_INTERNAL__IPHONE_2_0/*SPI*/
-
-  SC_SCHEMA_DECLARATION(kSCResvLink, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCResvLink                                                   \
-	  SC_SCHEMA_KV(kSCResvLink                                      \
-		      ,"__LINK__"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCResvInactive, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCResvInactive                                               \
-	  SC_SCHEMA_KV(kSCResvInactive                                  \
-		      ,"__INACTIVE__"                                   \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropInterfaceName                                          \
-	  SC_SCHEMA_KV(kSCPropInterfaceName                             \
-		      ,"InterfaceName"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropMACAddress, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropMACAddress                                             \
-	  SC_SCHEMA_KV(kSCPropMACAddress                                \
-		      ,"MACAddress"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropUserDefinedName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropUserDefinedName                                        \
-	  SC_SCHEMA_KV(kSCPropUserDefinedName                           \
-		      ,"UserDefinedName"                                \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropVersion, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVersion                                                \
-	  SC_SCHEMA_KV(kSCPropVersion                                   \
-		      ,"Version"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPrefCurrentSet, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPrefCurrentSet                                             \
-	  SC_SCHEMA_KV(kSCPrefCurrentSet                                \
-		      ,"CurrentSet"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPrefNetworkServices, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPrefNetworkServices                                        \
-	  SC_SCHEMA_KV(kSCPrefNetworkServices                           \
-		      ,"NetworkServices"                                \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPrefSets, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPrefSets                                                   \
-	  SC_SCHEMA_KV(kSCPrefSets                                      \
-		      ,"Sets"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPrefSystem, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPrefSystem                                                 \
-	  SC_SCHEMA_KV(kSCPrefSystem                                    \
-		      ,"System"                                         \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCCompNetwork, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompNetwork                                                \
-	  SC_SCHEMA_KV(kSCCompNetwork                                   \
-		      ,"Network"                                        \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompService, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompService                                                \
-	  SC_SCHEMA_KV(kSCCompService                                   \
-		      ,"Service"                                        \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompGlobal, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompGlobal                                                 \
-	  SC_SCHEMA_KV(kSCCompGlobal                                    \
-		      ,"Global"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompHostNames, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCCompHostNames                                              \
-	  SC_SCHEMA_KV(kSCCompHostNames                                 \
-		      ,"HostNames"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompInterface, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompInterface                                              \
-	  SC_SCHEMA_KV(kSCCompInterface                                 \
-		      ,"Interface"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompSystem, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompSystem                                                 \
-	  SC_SCHEMA_KV(kSCCompSystem                                    \
-		      ,"System"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompUsers, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompUsers                                                  \
-	  SC_SCHEMA_KV(kSCCompUsers                                     \
-		      ,"Users"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCCompAnyRegex, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCCompAnyRegex                                               \
-	  SC_SCHEMA_KV(kSCCompAnyRegex                                  \
-		      ,"[^/]+"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetAirPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetAirPort                                              \
-	  SC_SCHEMA_KV(kSCEntNetAirPort                                 \
-		      ,"AirPort"                                        \
-		      ,CFDictionary                                     )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntNetAppleTalk, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCEntNetAppleTalk                                            \
-	  SC_SCHEMA_KV(kSCEntNetAppleTalk                               \
-		      ,"AppleTalk"                                      \
-		      ,CFDictionary                                     )
-
-#endif	// !TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntNetDHCP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetDHCP                                                 \
-	  SC_SCHEMA_KV(kSCEntNetDHCP                                    \
-		      ,"DHCP"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetDNS, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetDNS                                                  \
-	  SC_SCHEMA_KV(kSCEntNetDNS                                     \
-		      ,"DNS"                                            \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetEthernet, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetEthernet                                             \
-	  SC_SCHEMA_KV(kSCEntNetEthernet                                \
-		      ,"Ethernet"                                       \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetFireWire, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetFireWire                                             \
-	  SC_SCHEMA_KV(kSCEntNetFireWire                                \
-		      ,"FireWire"                                       \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetInterface, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetInterface                                            \
-	  SC_SCHEMA_KV(kSCEntNetInterface                               \
-		      ,"Interface"                                      \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetIPSec, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetIPSec                                                \
-	  SC_SCHEMA_KV(kSCEntNetIPSec                                   \
-		      ,"IPSec"                                          \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetIPv4, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetIPv4                                                 \
-	  SC_SCHEMA_KV(kSCEntNetIPv4                                    \
-		      ,"IPv4"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetIPv6, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetIPv6                                                 \
-	  SC_SCHEMA_KV(kSCEntNetIPv6                                    \
-		      ,"IPv6"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetL2TP, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetL2TP                                                 \
-	  SC_SCHEMA_KV(kSCEntNetL2TP                                    \
-		      ,"L2TP"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetLink, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetLink                                                 \
-	  SC_SCHEMA_KV(kSCEntNetLink                                    \
-		      ,"Link"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetModem, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetModem                                                \
-	  SC_SCHEMA_KV(kSCEntNetModem                                   \
-		      ,"Modem"                                          \
-		      ,CFDictionary                                     )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntNetNetInfo, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCEntNetNetInfo                                              \
-	  SC_SCHEMA_KV(kSCEntNetNetInfo                                 \
-		      ,"NetInfo"                                        \
-		      ,CFDictionary                                     )
-
-#endif	// !TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntNetPPP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetPPP                                                  \
-	  SC_SCHEMA_KV(kSCEntNetPPP                                     \
-		      ,"PPP"                                            \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetPPPoE, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetPPPoE                                                \
-	  SC_SCHEMA_KV(kSCEntNetPPPoE                                   \
-		      ,"PPPoE"                                          \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetPPPSerial, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetPPPSerial                                            \
-	  SC_SCHEMA_KV(kSCEntNetPPPSerial                               \
-		      ,"PPPSerial"                                      \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetPPTP, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetPPTP                                                 \
-	  SC_SCHEMA_KV(kSCEntNetPPTP                                    \
-		      ,"PPTP"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetProxies, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetProxies                                              \
-	  SC_SCHEMA_KV(kSCEntNetProxies                                 \
-		      ,"Proxies"                                        \
-		      ,CFDictionary                                     )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntNetSMB, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetSMB                                                  \
-	  SC_SCHEMA_KV(kSCEntNetSMB                                     \
-		      ,"SMB"                                            \
-		      ,CFDictionary                                     )
-
-#endif	// !TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntNet6to4, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNet6to4                                                 \
-	  SC_SCHEMA_KV(kSCEntNet6to4                                    \
-		      ,"6to4"                                           \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetOverridePrimary, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetOverridePrimary                                     \
-	  SC_SCHEMA_KV(kSCPropNetOverridePrimary                        \
-		      ,"OverridePrimary"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetServiceOrder, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetServiceOrder                                        \
-	  SC_SCHEMA_KV(kSCPropNetServiceOrder                           \
-		      ,"ServiceOrder"                                   \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOverridePrimary, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPOverridePrimary                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPOverridePrimary                     \
-		      ,"PPPOverridePrimary"                             \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetInterfaces, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetInterfaces                                          \
-	  SC_SCHEMA_KV(kSCPropNetInterfaces                             \
-		      ,"Interfaces"                                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLocalHostName, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetLocalHostName                                       \
-	  SC_SCHEMA_KV(kSCPropNetLocalHostName                          \
-		      ,"LocalHostName"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortAllowNetCreation, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortAllowNetCreation                             \
-	  SC_SCHEMA_KV(kSCPropNetAirPortAllowNetCreation                \
-		      ,"AllowNetCreation"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortAuthPassword, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortAuthPassword                                 \
-	  SC_SCHEMA_KV(kSCPropNetAirPortAuthPassword                    \
-		      ,"AuthPassword"                                   \
-		      ,CFData                                           )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortAuthPasswordEncryption, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortAuthPasswordEncryption                       \
-	  SC_SCHEMA_KV(kSCPropNetAirPortAuthPasswordEncryption          \
-		      ,"AuthPasswordEncryption"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortJoinMode, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortJoinMode                                     \
-	  SC_SCHEMA_KV(kSCPropNetAirPortJoinMode                        \
-		      ,"JoinMode"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortPowerEnabled, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortPowerEnabled                                 \
-	  SC_SCHEMA_KV(kSCPropNetAirPortPowerEnabled                    \
-		      ,"PowerEnabled"                                   \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortPreferredNetwork, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortPreferredNetwork                             \
-	  SC_SCHEMA_KV(kSCPropNetAirPortPreferredNetwork                \
-		      ,"PreferredNetwork"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAirPortSavePasswords, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCPropNetAirPortSavePasswords                                \
-	  SC_SCHEMA_KV(kSCPropNetAirPortSavePasswords                   \
-		      ,"SavePasswords"                                  \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAirPortJoinModeAutomatic, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCValNetAirPortJoinModeAutomatic                             \
-	  SC_SCHEMA_KV(kSCValNetAirPortJoinModeAutomatic                \
-		      ,"Automatic"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAirPortJoinModePreferred, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCValNetAirPortJoinModePreferred                             \
-	  SC_SCHEMA_KV(kSCValNetAirPortJoinModePreferred                \
-		      ,"Preferred"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAirPortJoinModeRanked, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCValNetAirPortJoinModeRanked                                \
-	  SC_SCHEMA_KV(kSCValNetAirPortJoinModeRanked                   \
-		      ,"Ranked"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAirPortJoinModeRecent, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCValNetAirPortJoinModeRecent                                \
-	  SC_SCHEMA_KV(kSCValNetAirPortJoinModeRecent                   \
-		      ,"Recent"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAirPortJoinModeStrongest, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCValNetAirPortJoinModeStrongest                             \
-	  SC_SCHEMA_KV(kSCValNetAirPortJoinModeStrongest                \
-		      ,"Strongest"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAirPortAuthPasswordEncryptionKeychain, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))
-  #define kSCValNetAirPortAuthPasswordEncryptionKeychain                \
-	  SC_SCHEMA_KV(kSCValNetAirPortAuthPasswordEncryptionKeychain   \
-		      ,"Keychain"                                       \
-		      ,                                                 )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkComputerName, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkComputerName                               \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkComputerName                  \
-		      ,"ComputerName"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkComputerNameEncoding, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkComputerNameEncoding                       \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkComputerNameEncoding          \
-		      ,"ComputerNameEncoding"                           \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkConfigMethod, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkConfigMethod                               \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkConfigMethod                  \
-		      ,"ConfigMethod"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkDefaultZone, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkDefaultZone                                \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkDefaultZone                   \
-		      ,"DefaultZone"                                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkNetworkID, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkNetworkID                                  \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkNetworkID                     \
-		      ,"NetworkID"                                      \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkNetworkRange, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkNetworkRange                               \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkNetworkRange                  \
-		      ,"NetworkRange"                                   \
-		      ,CFArray[CFNumber]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkNodeID, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkNodeID                                     \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkNodeID                        \
-		      ,"NodeID"                                         \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkSeedNetworkRange, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkSeedNetworkRange                           \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkSeedNetworkRange              \
-		      ,"SeedNetworkRange"                               \
-		      ,CFArray[CFNumber]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkSeedZones, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetAppleTalkSeedZones                                  \
-	  SC_SCHEMA_KV(kSCPropNetAppleTalkSeedZones                     \
-		      ,"SeedZones"                                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAppleTalkConfigMethodNode, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetAppleTalkConfigMethodNode                            \
-	  SC_SCHEMA_KV(kSCValNetAppleTalkConfigMethodNode               \
-		      ,"Node"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAppleTalkConfigMethodRouter, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetAppleTalkConfigMethodRouter                          \
-	  SC_SCHEMA_KV(kSCValNetAppleTalkConfigMethodRouter             \
-		      ,"Router"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetAppleTalkConfigMethodSeedRouter, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetAppleTalkConfigMethodSeedRouter                      \
-	  SC_SCHEMA_KV(kSCValNetAppleTalkConfigMethodSeedRouter         \
-		      ,"SeedRouter"                                     \
-		      ,                                                 )
-
-#endif	// !TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSDomainName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSDomainName                                       \
-	  SC_SCHEMA_KV(kSCPropNetDNSDomainName                          \
-		      ,"DomainName"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSOptions, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSOptions                                          \
-	  SC_SCHEMA_KV(kSCPropNetDNSOptions                             \
-		      ,"Options"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSSearchDomains, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSSearchDomains                                    \
-	  SC_SCHEMA_KV(kSCPropNetDNSSearchDomains                       \
-		      ,"SearchDomains"                                  \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSSearchOrder, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSSearchOrder                                      \
-	  SC_SCHEMA_KV(kSCPropNetDNSSearchOrder                         \
-		      ,"SearchOrder"                                    \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSServerAddresses, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSServerAddresses                                  \
-	  SC_SCHEMA_KV(kSCPropNetDNSServerAddresses                     \
-		      ,"ServerAddresses"                                \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSServerPort, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSServerPort                                       \
-	  SC_SCHEMA_KV(kSCPropNetDNSServerPort                          \
-		      ,"ServerPort"                                     \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSServerTimeout, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSServerTimeout                                    \
-	  SC_SCHEMA_KV(kSCPropNetDNSServerTimeout                       \
-		      ,"ServerTimeout"                                  \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSSortList, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSSortList                                         \
-	  SC_SCHEMA_KV(kSCPropNetDNSSortList                            \
-		      ,"SortList"                                       \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSSupplementalMatchDomains, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSSupplementalMatchDomains                         \
-	  SC_SCHEMA_KV(kSCPropNetDNSSupplementalMatchDomains            \
-		      ,"SupplementalMatchDomains"                       \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSSupplementalMatchOrders, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetDNSSupplementalMatchOrders                          \
-	  SC_SCHEMA_KV(kSCPropNetDNSSupplementalMatchOrders             \
-		      ,"SupplementalMatchOrders"                        \
-		      ,CFArray[CFNumber]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetMediaSubType, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetEthernetMediaSubType                                \
-	  SC_SCHEMA_KV(kSCPropNetEthernetMediaSubType                   \
-		      ,"MediaSubType"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetMediaOptions, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetEthernetMediaOptions                                \
-	  SC_SCHEMA_KV(kSCPropNetEthernetMediaOptions                   \
-		      ,"MediaOptions"                                   \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetMTU, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetEthernetMTU                                         \
-	  SC_SCHEMA_KV(kSCPropNetEthernetMTU                            \
-		      ,"MTU"                                            \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetInterfaceDeviceName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetInterfaceDeviceName                                 \
-	  SC_SCHEMA_KV(kSCPropNetInterfaceDeviceName                    \
-		      ,"DeviceName"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetInterfaceHardware, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetInterfaceHardware                                   \
-	  SC_SCHEMA_KV(kSCPropNetInterfaceHardware                      \
-		      ,"Hardware"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetInterfaceType, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetInterfaceType                                       \
-	  SC_SCHEMA_KV(kSCPropNetInterfaceType                          \
-		      ,"Type"                                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetInterfaceSubType, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetInterfaceSubType                                    \
-	  SC_SCHEMA_KV(kSCPropNetInterfaceSubType                       \
-		      ,"SubType"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetInterfaceSupportsModemOnHold, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetInterfaceSupportsModemOnHold                        \
-	  SC_SCHEMA_KV(kSCPropNetInterfaceSupportsModemOnHold           \
-		      ,"SupportsModemOnHold"                            \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypeEthernet, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceTypeEthernet                                \
-	  SC_SCHEMA_KV(kSCValNetInterfaceTypeEthernet                   \
-		      ,"Ethernet"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypeFireWire, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceTypeFireWire                                \
-	  SC_SCHEMA_KV(kSCValNetInterfaceTypeFireWire                   \
-		      ,"FireWire"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypePPP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceTypePPP                                     \
-	  SC_SCHEMA_KV(kSCValNetInterfaceTypePPP                        \
-		      ,"PPP"                                            \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceType6to4, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceType6to4                                    \
-	  SC_SCHEMA_KV(kSCValNetInterfaceType6to4                       \
-		      ,"6to4"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypeIPSec, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceTypeIPSec                                   \
-	  SC_SCHEMA_KV(kSCValNetInterfaceTypeIPSec                      \
-		      ,"IPSec"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceSubTypePPPoE, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceSubTypePPPoE                                \
-	  SC_SCHEMA_KV(kSCValNetInterfaceSubTypePPPoE                   \
-		      ,"PPPoE"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceSubTypePPPSerial, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceSubTypePPPSerial                            \
-	  SC_SCHEMA_KV(kSCValNetInterfaceSubTypePPPSerial               \
-		      ,"PPPSerial"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceSubTypePPTP, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceSubTypePPTP                                 \
-	  SC_SCHEMA_KV(kSCValNetInterfaceSubTypePPTP                    \
-		      ,"PPTP"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceSubTypeL2TP, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetInterfaceSubTypeL2TP                                 \
-	  SC_SCHEMA_KV(kSCValNetInterfaceSubTypeL2TP                    \
-		      ,"L2TP"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecAuthenticationMethod, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecAuthenticationMethod                           \
-	  SC_SCHEMA_KV(kSCPropNetIPSecAuthenticationMethod              \
-		      ,"AuthenticationMethod"                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecLocalCertificate, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecLocalCertificate                               \
-	  SC_SCHEMA_KV(kSCPropNetIPSecLocalCertificate                  \
-		      ,"LocalCertificate"                               \
-		      ,CFData                                           )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecLocalIdentifier, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecLocalIdentifier                                \
-	  SC_SCHEMA_KV(kSCPropNetIPSecLocalIdentifier                   \
-		      ,"LocalIdentifier"                                \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecLocalIdentifierType, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecLocalIdentifierType                            \
-	  SC_SCHEMA_KV(kSCPropNetIPSecLocalIdentifierType               \
-		      ,"LocalIdentifierType"                            \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecSharedSecret, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecSharedSecret                                   \
-	  SC_SCHEMA_KV(kSCPropNetIPSecSharedSecret                      \
-		      ,"SharedSecret"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecSharedSecretEncryption, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecSharedSecretEncryption                         \
-	  SC_SCHEMA_KV(kSCPropNetIPSecSharedSecretEncryption            \
-		      ,"SharedSecretEncryption"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecConnectTime, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecConnectTime                                    \
-	  SC_SCHEMA_KV(kSCPropNetIPSecConnectTime                       \
-		      ,"ConnectTime"                                    \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecRemoteAddress, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecRemoteAddress                                  \
-	  SC_SCHEMA_KV(kSCPropNetIPSecRemoteAddress                     \
-		      ,"RemoteAddress"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecStatus, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecStatus                                         \
-	  SC_SCHEMA_KV(kSCPropNetIPSecStatus                            \
-		      ,"Status"                                         \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecXAuthEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecXAuthEnabled                                   \
-	  SC_SCHEMA_KV(kSCPropNetIPSecXAuthEnabled                      \
-		      ,"XAuthEnabled"                                   \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecXAuthName, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecXAuthName                                      \
-	  SC_SCHEMA_KV(kSCPropNetIPSecXAuthName                         \
-		      ,"XAuthName"                                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecXAuthPassword, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecXAuthPassword                                  \
-	  SC_SCHEMA_KV(kSCPropNetIPSecXAuthPassword                     \
-		      ,"XAuthPassword"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecXAuthPasswordEncryption, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPSecXAuthPasswordEncryption                        \
-	  SC_SCHEMA_KV(kSCPropNetIPSecXAuthPasswordEncryption           \
-		      ,"XAuthPasswordEncryption"                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecAuthenticationMethodSharedSecret, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPSecAuthenticationMethodSharedSecret                \
-	  SC_SCHEMA_KV(kSCValNetIPSecAuthenticationMethodSharedSecret   \
-		      ,"SharedSecret"                                   \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecAuthenticationMethodCertificate, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPSecAuthenticationMethodCertificate                 \
-	  SC_SCHEMA_KV(kSCValNetIPSecAuthenticationMethodCertificate    \
-		      ,"Certificate"                                    \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecAuthenticationMethodHybrid, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPSecAuthenticationMethodHybrid                      \
-	  SC_SCHEMA_KV(kSCValNetIPSecAuthenticationMethodHybrid         \
-		      ,"Hybrid"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecLocalIdentifierTypeKeyID, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPSecLocalIdentifierTypeKeyID                        \
-	  SC_SCHEMA_KV(kSCValNetIPSecLocalIdentifierTypeKeyID           \
-		      ,"KeyID"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecSharedSecretEncryptionKeychain, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPSecSharedSecretEncryptionKeychain                  \
-	  SC_SCHEMA_KV(kSCValNetIPSecSharedSecretEncryptionKeychain     \
-		      ,"Keychain"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecXAuthPasswordEncryptionKeychain, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPSecXAuthPasswordEncryptionKeychain                 \
-	  SC_SCHEMA_KV(kSCValNetIPSecXAuthPasswordEncryptionKeychain    \
-		      ,"Keychain"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPSecXAuthPasswordEncryptionPrompt, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCValNetIPSecXAuthPasswordEncryptionPrompt                   \
-	  SC_SCHEMA_KV(kSCValNetIPSecXAuthPasswordEncryptionPrompt      \
-		      ,"Prompt"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4Addresses, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4Addresses                                       \
-	  SC_SCHEMA_KV(kSCPropNetIPv4Addresses                          \
-		      ,"Addresses"                                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4ConfigMethod, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4ConfigMethod                                    \
-	  SC_SCHEMA_KV(kSCPropNetIPv4ConfigMethod                       \
-		      ,"ConfigMethod"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4DHCPClientID, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4DHCPClientID                                    \
-	  SC_SCHEMA_KV(kSCPropNetIPv4DHCPClientID                       \
-		      ,"DHCPClientID"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4Router, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4Router                                          \
-	  SC_SCHEMA_KV(kSCPropNetIPv4Router                             \
-		      ,"Router"                                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4SubnetMasks, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4SubnetMasks                                     \
-	  SC_SCHEMA_KV(kSCPropNetIPv4SubnetMasks                        \
-		      ,"SubnetMasks"                                    \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4DestAddresses, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4DestAddresses                                   \
-	  SC_SCHEMA_KV(kSCPropNetIPv4DestAddresses                      \
-		      ,"DestAddresses"                                  \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4BroadcastAddresses, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv4BroadcastAddresses                              \
-	  SC_SCHEMA_KV(kSCPropNetIPv4BroadcastAddresses                 \
-		      ,"BroadcastAddresses"                             \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodAutomatic, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodAutomatic                            \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodAutomatic               \
-		      ,"Automatic"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodBOOTP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodBOOTP                                \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodBOOTP                   \
-		      ,"BOOTP"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodDHCP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodDHCP                                 \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodDHCP                    \
-		      ,"DHCP"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodINFORM, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodINFORM                               \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodINFORM                  \
-		      ,"INFORM"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodLinkLocal, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodLinkLocal                            \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodLinkLocal               \
-		      ,"LinkLocal"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodManual, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodManual                               \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodManual                  \
-		      ,"Manual"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodPPP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodPPP                                  \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodPPP                     \
-		      ,"PPP"                                            \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6Addresses, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv6Addresses                                       \
-	  SC_SCHEMA_KV(kSCPropNetIPv6Addresses                          \
-		      ,"Addresses"                                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6ConfigMethod, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv6ConfigMethod                                    \
-	  SC_SCHEMA_KV(kSCPropNetIPv6ConfigMethod                       \
-		      ,"ConfigMethod"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6DestAddresses, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv6DestAddresses                                   \
-	  SC_SCHEMA_KV(kSCPropNetIPv6DestAddresses                      \
-		      ,"DestAddresses"                                  \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6Flags, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv6Flags                                           \
-	  SC_SCHEMA_KV(kSCPropNetIPv6Flags                              \
-		      ,"Flags"                                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6PrefixLength, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv6PrefixLength                                    \
-	  SC_SCHEMA_KV(kSCPropNetIPv6PrefixLength                       \
-		      ,"PrefixLength"                                   \
-		      ,CFArray[CFNumber]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6Router, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIPv6Router                                          \
-	  SC_SCHEMA_KV(kSCPropNetIPv6Router                             \
-		      ,"Router"                                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv6ConfigMethodAutomatic, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv6ConfigMethodAutomatic                            \
-	  SC_SCHEMA_KV(kSCValNetIPv6ConfigMethodAutomatic               \
-		      ,"Automatic"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv6ConfigMethodLinkLocal, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetIPv6ConfigMethodLinkLocal                            \
-	  SC_SCHEMA_KV(kSCValNetIPv6ConfigMethodLinkLocal               \
-		      ,"LinkLocal"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv6ConfigMethodManual, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv6ConfigMethodManual                               \
-	  SC_SCHEMA_KV(kSCValNetIPv6ConfigMethodManual                  \
-		      ,"Manual"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv6ConfigMethodRouterAdvertisement, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv6ConfigMethodRouterAdvertisement                  \
-	  SC_SCHEMA_KV(kSCValNetIPv6ConfigMethodRouterAdvertisement     \
-		      ,"RouterAdvertisement"                            \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv6ConfigMethod6to4, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv6ConfigMethod6to4                                 \
-	  SC_SCHEMA_KV(kSCValNetIPv6ConfigMethod6to4                    \
-		      ,"6to4"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNet6to4Relay, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNet6to4Relay                                           \
-	  SC_SCHEMA_KV(kSCPropNet6to4Relay                              \
-		      ,"Relay"                                          \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkActive, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetLinkActive                                          \
-	  SC_SCHEMA_KV(kSCPropNetLinkActive                             \
-		      ,"Active"                                         \
-		      ,CFBoolean                                        )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkDetaching, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetLinkDetaching                                       \
-	  SC_SCHEMA_KV(kSCPropNetLinkDetaching                          \
-		      ,"Detaching"                                      \
-		      ,CFBoolean                                        )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemAccessPointName, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemAccessPointName                                \
-	  SC_SCHEMA_KV(kSCPropNetModemAccessPointName                   \
-		      ,"AccessPointName"                                \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemConnectionPersonality, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemConnectionPersonality                          \
-	  SC_SCHEMA_KV(kSCPropNetModemConnectionPersonality             \
-		      ,"ConnectionPersonality"                          \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemConnectionScript, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemConnectionScript                               \
-	  SC_SCHEMA_KV(kSCPropNetModemConnectionScript                  \
-		      ,"ConnectionScript"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemConnectSpeed, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemConnectSpeed                                   \
-	  SC_SCHEMA_KV(kSCPropNetModemConnectSpeed                      \
-		      ,"ConnectSpeed"                                   \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemDataCompression, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemDataCompression                                \
-	  SC_SCHEMA_KV(kSCPropNetModemDataCompression                   \
-		      ,"DataCompression"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemDeviceContextID, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemDeviceContextID                                \
-	  SC_SCHEMA_KV(kSCPropNetModemDeviceContextID                   \
-		      ,"DeviceContextID"                                \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemDeviceModel, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemDeviceModel                                    \
-	  SC_SCHEMA_KV(kSCPropNetModemDeviceModel                       \
-		      ,"DeviceModel"                                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemDeviceVendor, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemDeviceVendor                                   \
-	  SC_SCHEMA_KV(kSCPropNetModemDeviceVendor                      \
-		      ,"DeviceVendor"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemDialMode, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemDialMode                                       \
-	  SC_SCHEMA_KV(kSCPropNetModemDialMode                          \
-		      ,"DialMode"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemErrorCorrection, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemErrorCorrection                                \
-	  SC_SCHEMA_KV(kSCPropNetModemErrorCorrection                   \
-		      ,"ErrorCorrection"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemHoldCallWaitingAudibleAlert, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemHoldCallWaitingAudibleAlert                    \
-	  SC_SCHEMA_KV(kSCPropNetModemHoldCallWaitingAudibleAlert       \
-		      ,"HoldCallWaitingAudibleAlert"                    \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemHoldDisconnectOnAnswer, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemHoldDisconnectOnAnswer                         \
-	  SC_SCHEMA_KV(kSCPropNetModemHoldDisconnectOnAnswer            \
-		      ,"HoldDisconnectOnAnswer"                         \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemHoldEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemHoldEnabled                                    \
-	  SC_SCHEMA_KV(kSCPropNetModemHoldEnabled                       \
-		      ,"HoldEnabled"                                    \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemHoldReminder, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemHoldReminder                                   \
-	  SC_SCHEMA_KV(kSCPropNetModemHoldReminder                      \
-		      ,"HoldReminder"                                   \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemHoldReminderTime, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemHoldReminderTime                               \
-	  SC_SCHEMA_KV(kSCPropNetModemHoldReminderTime                  \
-		      ,"HoldReminderTime"                               \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemNote, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemNote                                           \
-	  SC_SCHEMA_KV(kSCPropNetModemNote                              \
-		      ,"Note"                                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemPulseDial, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemPulseDial                                      \
-	  SC_SCHEMA_KV(kSCPropNetModemPulseDial                         \
-		      ,"PulseDial"                                      \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemSpeaker, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemSpeaker                                        \
-	  SC_SCHEMA_KV(kSCPropNetModemSpeaker                           \
-		      ,"Speaker"                                        \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetModemSpeed, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetModemSpeed                                          \
-	  SC_SCHEMA_KV(kSCPropNetModemSpeed                             \
-		      ,"Speed"                                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetModemDialModeIgnoreDialTone, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetModemDialModeIgnoreDialTone                          \
-	  SC_SCHEMA_KV(kSCValNetModemDialModeIgnoreDialTone             \
-		      ,"IgnoreDialTone"                                 \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetModemDialModeManual, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetModemDialModeManual                                  \
-	  SC_SCHEMA_KV(kSCValNetModemDialModeManual                     \
-		      ,"Manual"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetModemDialModeWaitForDialTone, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetModemDialModeWaitForDialTone                         \
-	  SC_SCHEMA_KV(kSCValNetModemDialModeWaitForDialTone            \
-		      ,"WaitForDialTone"                                \
-		      ,                                                 )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropNetNetInfoBindingMethods, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetNetInfoBindingMethods                               \
-	  SC_SCHEMA_KV(kSCPropNetNetInfoBindingMethods                  \
-		      ,"BindingMethods"                                 \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetNetInfoServerAddresses, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetNetInfoServerAddresses                              \
-	  SC_SCHEMA_KV(kSCPropNetNetInfoServerAddresses                 \
-		      ,"ServerAddresses"                                \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetNetInfoServerTags, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetNetInfoServerTags                                   \
-	  SC_SCHEMA_KV(kSCPropNetNetInfoServerTags                      \
-		      ,"ServerTags"                                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetNetInfoBroadcastServerTag, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetNetInfoBroadcastServerTag                           \
-	  SC_SCHEMA_KV(kSCPropNetNetInfoBroadcastServerTag              \
-		      ,"BroadcastServerTag"                             \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetNetInfoBindingMethodsBroadcast, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetNetInfoBindingMethodsBroadcast                       \
-	  SC_SCHEMA_KV(kSCValNetNetInfoBindingMethodsBroadcast          \
-		      ,"Broadcast"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetNetInfoBindingMethodsDHCP, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetNetInfoBindingMethodsDHCP                            \
-	  SC_SCHEMA_KV(kSCValNetNetInfoBindingMethodsDHCP               \
-		      ,"DHCP"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetNetInfoBindingMethodsManual, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetNetInfoBindingMethodsManual                          \
-	  SC_SCHEMA_KV(kSCValNetNetInfoBindingMethodsManual             \
-		      ,"Manual"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetNetInfoDefaultServerTag, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))
-  #define kSCValNetNetInfoDefaultServerTag                              \
-	  SC_SCHEMA_KV(kSCValNetNetInfoDefaultServerTag                 \
-		      ,"network"                                        \
-		      ,                                                 )
-
-#endif	// !TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPACSPEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPACSPEnabled                                      \
-	  SC_SCHEMA_KV(kSCPropNetPPPACSPEnabled                         \
-		      ,"ACSPEnabled"                                    \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPConnectTime, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPConnectTime                                      \
-	  SC_SCHEMA_KV(kSCPropNetPPPConnectTime                         \
-		      ,"ConnectTime"                                    \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDeviceLastCause, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDeviceLastCause                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPDeviceLastCause                     \
-		      ,"DeviceLastCause"                                \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDialOnDemand, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDialOnDemand                                     \
-	  SC_SCHEMA_KV(kSCPropNetPPPDialOnDemand                        \
-		      ,"DialOnDemand"                                   \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnFastUserSwitch, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnFastUserSwitch                       \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnFastUserSwitch          \
-		      ,"DisconnectOnFastUserSwitch"                     \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnIdle, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnIdle                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnIdle                    \
-		      ,"DisconnectOnIdle"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnIdleTimer, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnIdleTimer                            \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnIdleTimer               \
-		      ,"DisconnectOnIdleTimer"                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnLogout, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnLogout                               \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnLogout                  \
-		      ,"DisconnectOnLogout"                             \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnSleep, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnSleep                                \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnSleep                   \
-		      ,"DisconnectOnSleep"                              \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectTime, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectTime                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectTime                      \
-		      ,"DisconnectTime"                                 \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPIdleReminderTimer, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPIdleReminderTimer                                \
-	  SC_SCHEMA_KV(kSCPropNetPPPIdleReminderTimer                   \
-		      ,"IdleReminderTimer"                              \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPIdleReminder, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPIdleReminder                                     \
-	  SC_SCHEMA_KV(kSCPropNetPPPIdleReminder                        \
-		      ,"IdleReminder"                                   \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLastCause, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLastCause                                        \
-	  SC_SCHEMA_KV(kSCPropNetPPPLastCause                           \
-		      ,"LastCause"                                      \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLogfile, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLogfile                                          \
-	  SC_SCHEMA_KV(kSCPropNetPPPLogfile                             \
-		      ,"Logfile"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPPlugins, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPPlugins                                          \
-	  SC_SCHEMA_KV(kSCPropNetPPPPlugins                             \
-		      ,"Plugins"                                        \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPRetryConnectTime, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPRetryConnectTime                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPRetryConnectTime                    \
-		      ,"RetryConnectTime"                               \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPSessionTimer, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPSessionTimer                                     \
-	  SC_SCHEMA_KV(kSCPropNetPPPSessionTimer                        \
-		      ,"SessionTimer"                                   \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPStatus, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPStatus                                           \
-	  SC_SCHEMA_KV(kSCPropNetPPPStatus                              \
-		      ,"Status"                                         \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPUseSessionTimer, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPUseSessionTimer                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPUseSessionTimer                     \
-		      ,"UseSessionTimer"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPVerboseLogging, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPVerboseLogging                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPVerboseLogging                      \
-		      ,"VerboseLogging"                                 \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPAuthEAPPlugins, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPAuthEAPPlugins                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPAuthEAPPlugins                      \
-		      ,"AuthEAPPlugins"                                 \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPAuthName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPAuthName                                         \
-	  SC_SCHEMA_KV(kSCPropNetPPPAuthName                            \
-		      ,"AuthName"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPAuthPassword, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPAuthPassword                                     \
-	  SC_SCHEMA_KV(kSCPropNetPPPAuthPassword                        \
-		      ,"AuthPassword"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPAuthPasswordEncryption, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPAuthPasswordEncryption                           \
-	  SC_SCHEMA_KV(kSCPropNetPPPAuthPasswordEncryption              \
-		      ,"AuthPasswordEncryption"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPAuthPrompt, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPAuthPrompt                                       \
-	  SC_SCHEMA_KV(kSCPropNetPPPAuthPrompt                          \
-		      ,"AuthPrompt"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPAuthProtocol, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPAuthProtocol                                     \
-	  SC_SCHEMA_KV(kSCPropNetPPPAuthProtocol                        \
-		      ,"AuthProtocol"                                   \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthPasswordEncryptionKeychain, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthPasswordEncryptionKeychain                    \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthPasswordEncryptionKeychain       \
-		      ,"Keychain"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthPasswordEncryptionToken, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthPasswordEncryptionToken                       \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthPasswordEncryptionToken          \
-		      ,"Token"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthPromptBefore, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthPromptBefore                                  \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthPromptBefore                     \
-		      ,"Before"                                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthPromptAfter, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthPromptAfter                                   \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthPromptAfter                      \
-		      ,"After"                                          \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthProtocolCHAP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthProtocolCHAP                                  \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthProtocolCHAP                     \
-		      ,"CHAP"                                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthProtocolEAP, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthProtocolEAP                                   \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthProtocolEAP                      \
-		      ,"EAP"                                            \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthProtocolMSCHAP1, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthProtocolMSCHAP1                               \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthProtocolMSCHAP1                  \
-		      ,"MSCHAP1"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthProtocolMSCHAP2, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthProtocolMSCHAP2                               \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthProtocolMSCHAP2                  \
-		      ,"MSCHAP2"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPAuthProtocolPAP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPAuthProtocolPAP                                   \
-	  SC_SCHEMA_KV(kSCValNetPPPAuthProtocolPAP                      \
-		      ,"PAP"                                            \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommAlternateRemoteAddress, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommAlternateRemoteAddress                       \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommAlternateRemoteAddress          \
-		      ,"CommAlternateRemoteAddress"                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommConnectDelay, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommConnectDelay                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommConnectDelay                    \
-		      ,"CommConnectDelay"                               \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommDisplayTerminalWindow, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommDisplayTerminalWindow                        \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommDisplayTerminalWindow           \
-		      ,"CommDisplayTerminalWindow"                      \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommRedialCount, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommRedialCount                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommRedialCount                     \
-		      ,"CommRedialCount"                                \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommRedialEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommRedialEnabled                                \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommRedialEnabled                   \
-		      ,"CommRedialEnabled"                              \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommRedialInterval, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommRedialInterval                               \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommRedialInterval                  \
-		      ,"CommRedialInterval"                             \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommRemoteAddress, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommRemoteAddress                                \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommRemoteAddress                   \
-		      ,"CommRemoteAddress"                              \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommTerminalScript, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommTerminalScript                               \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommTerminalScript                  \
-		      ,"CommTerminalScript"                             \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCommUseTerminalScript, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCommUseTerminalScript                            \
-	  SC_SCHEMA_KV(kSCPropNetPPPCommUseTerminalScript               \
-		      ,"CommUseTerminalScript"                          \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCCPEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCCPEnabled                                       \
-	  SC_SCHEMA_KV(kSCPropNetPPPCCPEnabled                          \
-		      ,"CCPEnabled"                                     \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCCPMPPE40Enabled, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCCPMPPE40Enabled                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPCCPMPPE40Enabled                    \
-		      ,"CCPMPPE40Enabled"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPCCPMPPE128Enabled, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPCCPMPPE128Enabled                                \
-	  SC_SCHEMA_KV(kSCPropNetPPPCCPMPPE128Enabled                   \
-		      ,"CCPMPPE128Enabled"                              \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPIPCPCompressionVJ, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPIPCPCompressionVJ                                \
-	  SC_SCHEMA_KV(kSCPropNetPPPIPCPCompressionVJ                   \
-		      ,"IPCPCompressionVJ"                              \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPIPCPUsePeerDNS, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPIPCPUsePeerDNS                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPIPCPUsePeerDNS                      \
-		      ,"IPCPUsePeerDNS"                                 \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPEchoEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPEchoEnabled                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPEchoEnabled                      \
-		      ,"LCPEchoEnabled"                                 \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPEchoFailure, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPEchoFailure                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPEchoFailure                      \
-		      ,"LCPEchoFailure"                                 \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPEchoInterval, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPEchoInterval                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPEchoInterval                     \
-		      ,"LCPEchoInterval"                                \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPCompressionACField, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPCompressionACField                            \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPCompressionACField               \
-		      ,"LCPCompressionACField"                          \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPCompressionPField, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPCompressionPField                             \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPCompressionPField                \
-		      ,"LCPCompressionPField"                           \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPMRU, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPMRU                                           \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPMRU                              \
-		      ,"LCPMRU"                                         \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPMTU, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPMTU                                           \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPMTU                              \
-		      ,"LCPMTU"                                         \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPReceiveACCM, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPReceiveACCM                                   \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPReceiveACCM                      \
-		      ,"LCPReceiveACCM"                                 \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPLCPTransmitACCM, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPLCPTransmitACCM                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPLCPTransmitACCM                     \
-		      ,"LCPTransmitACCM"                                \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetL2TPIPSecSharedSecret, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetL2TPIPSecSharedSecret                               \
-	  SC_SCHEMA_KV(kSCPropNetL2TPIPSecSharedSecret                  \
-		      ,"IPSecSharedSecret"                              \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetL2TPIPSecSharedSecretEncryption, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetL2TPIPSecSharedSecretEncryption                     \
-	  SC_SCHEMA_KV(kSCPropNetL2TPIPSecSharedSecretEncryption        \
-		      ,"IPSecSharedSecretEncryption"                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetL2TPTransport, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetL2TPTransport                                       \
-	  SC_SCHEMA_KV(kSCPropNetL2TPTransport                          \
-		      ,"Transport"                                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetL2TPIPSecSharedSecretEncryptionKeychain, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetL2TPIPSecSharedSecretEncryptionKeychain              \
-	  SC_SCHEMA_KV(kSCValNetL2TPIPSecSharedSecretEncryptionKeychain \
-		      ,"Keychain"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetL2TPTransportIP, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetL2TPTransportIP                                      \
-	  SC_SCHEMA_KV(kSCValNetL2TPTransportIP                         \
-		      ,"IP"                                             \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetL2TPTransportIPSec, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetL2TPTransportIPSec                                   \
-	  SC_SCHEMA_KV(kSCValNetL2TPTransportIPSec                      \
-		      ,"IPSec"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesExceptionsList, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesExceptionsList                               \
-	  SC_SCHEMA_KV(kSCPropNetProxiesExceptionsList                  \
-		      ,"ExceptionsList"                                 \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesExcludeSimpleHostnames, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesExcludeSimpleHostnames                       \
-	  SC_SCHEMA_KV(kSCPropNetProxiesExcludeSimpleHostnames          \
-		      ,"ExcludeSimpleHostnames"                         \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesFTPEnable, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesFTPEnable                                    \
-	  SC_SCHEMA_KV(kSCPropNetProxiesFTPEnable                       \
-		      ,"FTPEnable"                                      \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesFTPPassive, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesFTPPassive                                   \
-	  SC_SCHEMA_KV(kSCPropNetProxiesFTPPassive                      \
-		      ,"FTPPassive"                                     \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesFTPPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesFTPPort                                      \
-	  SC_SCHEMA_KV(kSCPropNetProxiesFTPPort                         \
-		      ,"FTPPort"                                        \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesFTPProxy, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesFTPProxy                                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesFTPProxy                        \
-		      ,"FTPProxy"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesGopherEnable, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesGopherEnable                                 \
-	  SC_SCHEMA_KV(kSCPropNetProxiesGopherEnable                    \
-		      ,"GopherEnable"                                   \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesGopherPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesGopherPort                                   \
-	  SC_SCHEMA_KV(kSCPropNetProxiesGopherPort                      \
-		      ,"GopherPort"                                     \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesGopherProxy, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesGopherProxy                                  \
-	  SC_SCHEMA_KV(kSCPropNetProxiesGopherProxy                     \
-		      ,"GopherProxy"                                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesHTTPEnable, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesHTTPEnable                                   \
-	  SC_SCHEMA_KV(kSCPropNetProxiesHTTPEnable                      \
-		      ,"HTTPEnable"                                     \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesHTTPPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesHTTPPort                                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesHTTPPort                        \
-		      ,"HTTPPort"                                       \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesHTTPProxy, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesHTTPProxy                                    \
-	  SC_SCHEMA_KV(kSCPropNetProxiesHTTPProxy                       \
-		      ,"HTTPProxy"                                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesHTTPSEnable, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesHTTPSEnable                                  \
-	  SC_SCHEMA_KV(kSCPropNetProxiesHTTPSEnable                     \
-		      ,"HTTPSEnable"                                    \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesHTTPSPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesHTTPSPort                                    \
-	  SC_SCHEMA_KV(kSCPropNetProxiesHTTPSPort                       \
-		      ,"HTTPSPort"                                      \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesHTTPSProxy, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesHTTPSProxy                                   \
-	  SC_SCHEMA_KV(kSCPropNetProxiesHTTPSProxy                      \
-		      ,"HTTPSProxy"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesRTSPEnable, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesRTSPEnable                                   \
-	  SC_SCHEMA_KV(kSCPropNetProxiesRTSPEnable                      \
-		      ,"RTSPEnable"                                     \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesRTSPPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesRTSPPort                                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesRTSPPort                        \
-		      ,"RTSPPort"                                       \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesRTSPProxy, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesRTSPProxy                                    \
-	  SC_SCHEMA_KV(kSCPropNetProxiesRTSPProxy                       \
-		      ,"RTSPProxy"                                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSOCKSEnable, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesSOCKSEnable                                  \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSOCKSEnable                     \
-		      ,"SOCKSEnable"                                    \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSOCKSPort, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesSOCKSPort                                    \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSOCKSPort                       \
-		      ,"SOCKSPort"                                      \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSOCKSProxy, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesSOCKSProxy                                   \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSOCKSProxy                      \
-		      ,"SOCKSProxy"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesProxyAutoConfigEnable, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesProxyAutoConfigEnable                        \
-	  SC_SCHEMA_KV(kSCPropNetProxiesProxyAutoConfigEnable           \
-		      ,"ProxyAutoConfigEnable"                          \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesProxyAutoConfigJavaScript, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetProxiesProxyAutoConfigJavaScript                    \
-	  SC_SCHEMA_KV(kSCPropNetProxiesProxyAutoConfigJavaScript       \
-		      ,"ProxyAutoConfigJavaScript"                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesProxyAutoConfigURLString, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesProxyAutoConfigURLString                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesProxyAutoConfigURLString        \
-		      ,"ProxyAutoConfigURLString"                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesProxyAutoDiscoveryEnable, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetProxiesProxyAutoDiscoveryEnable                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesProxyAutoDiscoveryEnable        \
-		      ,"ProxyAutoDiscoveryEnable"                       \
-		      ,CFNumber (0 or 1)                                )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropNetSMBNetBIOSName, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetSMBNetBIOSName                                      \
-	  SC_SCHEMA_KV(kSCPropNetSMBNetBIOSName                         \
-		      ,"NetBIOSName"                                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetSMBNetBIOSNodeType, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetSMBNetBIOSNodeType                                  \
-	  SC_SCHEMA_KV(kSCPropNetSMBNetBIOSNodeType                     \
-		      ,"NetBIOSNodeType"                                \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetSMBNetBIOSScope, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_7,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropNetSMBNetBIOSScope                                     \
-	  SC_SCHEMA_KV(kSCPropNetSMBNetBIOSScope                        \
-		      ,"NetBIOSScope"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetSMBWINSAddresses, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetSMBWINSAddresses                                    \
-	  SC_SCHEMA_KV(kSCPropNetSMBWINSAddresses                       \
-		      ,"WINSAddresses"                                  \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetSMBWorkgroup, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetSMBWorkgroup                                        \
-	  SC_SCHEMA_KV(kSCPropNetSMBWorkgroup                           \
-		      ,"Workgroup"                                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetSMBNetBIOSNodeTypeBroadcast, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetSMBNetBIOSNodeTypeBroadcast                          \
-	  SC_SCHEMA_KV(kSCValNetSMBNetBIOSNodeTypeBroadcast             \
-		      ,"Broadcast"                                      \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetSMBNetBIOSNodeTypePeer, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetSMBNetBIOSNodeTypePeer                               \
-	  SC_SCHEMA_KV(kSCValNetSMBNetBIOSNodeTypePeer                  \
-		      ,"Peer"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetSMBNetBIOSNodeTypeMixed, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetSMBNetBIOSNodeTypeMixed                              \
-	  SC_SCHEMA_KV(kSCValNetSMBNetBIOSNodeTypeMixed                 \
-		      ,"Mixed"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetSMBNetBIOSNodeTypeHybrid, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetSMBNetBIOSNodeTypeHybrid                             \
-	  SC_SCHEMA_KV(kSCValNetSMBNetBIOSNodeTypeHybrid                \
-		      ,"Hybrid"                                         \
-		      ,                                                 )
-
-#endif	// !TARGET_OS_IPHONE
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCEntUsersConsoleUser, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCEntUsersConsoleUser                                        \
-	  SC_SCHEMA_KV(kSCEntUsersConsoleUser                           \
-		      ,"ConsoleUser"                                    \
-		      ,                                                 )
-
-#endif	// !TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropSystemComputerName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropSystemComputerName                                     \
-	  SC_SCHEMA_KV(kSCPropSystemComputerName                        \
-		      ,"ComputerName"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropSystemComputerNameEncoding, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCPropSystemComputerNameEncoding                             \
-	  SC_SCHEMA_KV(kSCPropSystemComputerNameEncoding                \
-		      ,"ComputerNameEncoding"                           \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStoreDomainFile, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStoreDomainFile                                     \
-	  SC_SCHEMA_KV(kSCDynamicStoreDomainFile                        \
-		      ,"File:"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStoreDomainPlugin, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStoreDomainPlugin                                   \
-	  SC_SCHEMA_KV(kSCDynamicStoreDomainPlugin                      \
-		      ,"Plugin:"                                        \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStoreDomainSetup, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStoreDomainSetup                                    \
-	  SC_SCHEMA_KV(kSCDynamicStoreDomainSetup                       \
-		      ,"Setup:"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStoreDomainState, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStoreDomainState                                    \
-	  SC_SCHEMA_KV(kSCDynamicStoreDomainState                       \
-		      ,"State:"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStoreDomainPrefs, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStoreDomainPrefs                                    \
-	  SC_SCHEMA_KV(kSCDynamicStoreDomainPrefs                       \
-		      ,"Prefs:"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStorePropSetupCurrentSet, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStorePropSetupCurrentSet                            \
-	  SC_SCHEMA_KV(kSCDynamicStorePropSetupCurrentSet               \
-		      ,"CurrentSet"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStorePropSetupLastUpdated, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStorePropSetupLastUpdated                           \
-	  SC_SCHEMA_KV(kSCDynamicStorePropSetupLastUpdated              \
-		      ,"LastUpdated"                                    \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStorePropNetInterfaces, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStorePropNetInterfaces                              \
-	  SC_SCHEMA_KV(kSCDynamicStorePropNetInterfaces                 \
-		      ,"Interfaces"                                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStorePropNetPrimaryInterface, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStorePropNetPrimaryInterface                        \
-	  SC_SCHEMA_KV(kSCDynamicStorePropNetPrimaryInterface           \
-		      ,"PrimaryInterface"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStorePropNetPrimaryService, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStorePropNetPrimaryService                          \
-	  SC_SCHEMA_KV(kSCDynamicStorePropNetPrimaryService             \
-		      ,"PrimaryService"                                 \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCDynamicStorePropNetServiceIDs, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))
-  #define kSCDynamicStorePropNetServiceIDs                              \
-	  SC_SCHEMA_KV(kSCDynamicStorePropNetServiceIDs                 \
-		      ,"ServiceIDs"                                     \
-		      ,CFArray[CFString]                                )
-
-#if	!TARGET_OS_IPHONE
-
-  SC_SCHEMA_DECLARATION(kSCPropUsersConsoleUserName, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropUsersConsoleUserName                                   \
-	  SC_SCHEMA_KV(kSCPropUsersConsoleUserName                      \
-		      ,"Name"                                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropUsersConsoleUserUID, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropUsersConsoleUserUID                                    \
-	  SC_SCHEMA_KV(kSCPropUsersConsoleUserUID                       \
-		      ,"UID"                                            \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropUsersConsoleUserGID, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA))
-  #define kSCPropUsersConsoleUserGID                                    \
-	  SC_SCHEMA_KV(kSCPropUsersConsoleUserGID                       \
-		      ,"GID"                                            \
-		      ,CFNumber                                         )
-
-#endif	// !TARGET_OS_IPHONE
-
-#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
+  @discussion Value is a CFNumber
+ */
+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	/* _SCSCHEMADEFINITIONS_H */
diff --git a/src/configd/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h b/src/configd/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h
index f42980a92..35b00fd02 100644
--- a/src/configd/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2019 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,9 @@
 /*
  * Generic Keys
  *
+ *   kSCPropNetIgnoreLinkStatus                         "IgnoreLinkStatus"             CFBoolean
  *   kSCPropConfirmedInterfaceName                      "ConfirmedInterfaceName"       CFString
+ *   kSCPropDisableUntilNeeded                          "DisableUntilNeeded"           CFNumber (0 or 1)
  *
  * Preference Keys
  *
@@ -37,24 +39,29 @@
  *
  * Network Entity Keys
  *
- *   kSCEntNetActiveDuringSleepRequested                "ActiveDuringSleepRequested"   CFDictionary
- *   kSCEntNetActiveDuringSleepSupported                "ActiveDuringSleepSupported"   CFDictionary
  *   kSCEntNetAppLayer                                  "AppLayer"                     CFDictionary
  *   kSCEntNetCommCenter                                "com.apple.CommCenter"         CFDictionary
  *   kSCEntNetEAPOL                                     "EAPOL"                        CFDictionary
+ *   kSCEntNetIdleRoute                                 "IdleRoute"
+ *   kSCEntNetInterfaceActiveDuringSleepRequested       "ActiveDuringSleepRequested"   CFDictionary
+ *   kSCEntNetInterfaceActiveDuringSleepSupported       "ActiveDuringSleepSupported"   CFDictionary
+ *   kSCEntNetInterfaceDelegation                       "InterfaceDelegation"
+ *   kSCEntNetIPv4ARPCollision                          "IPv4ARPCollision"
+ *   kSCEntNetIPv4PortInUse                             "PortInUse"
  *   kSCEntNetIPv4RouterARPFailure                      "IPv4RouterARPFailure"
  *   kSCEntNetIPv4RouterARPAlive                        "IPv4RouterARPAlive"
+ *   kSCEntNetIPv6RouterExpired                         "IPv6RouterExpired"
  *   kSCEntNetLinkIssues                                "LinkIssues"                   CFDictionary
  *   kSCEntNetLinkQuality                               "LinkQuality"                  CFDictionary
  *   kSCEntNetLoopback                                  "Loopback"                     CFDictionary
+ *   kSCEntNetNAT64                                     "NAT64"                        CFDictionary
+ *   kSCEntNetNAT64PrefixRequest                        "NAT64PrefixRequest"
  *   kSCEntNetOnDemand                                  "OnDemand"                     CFDictionary
+ *   kSCEntNetQoSMarkingPolicy                          "QoSMarkingPolicy"             CFDictionary
+ *   kSCEntNetRefreshConfiguration                      "RefreshConfiguration"
  *   kSCEntNetService                                   "__SERVICE__"                  CFDictionary
  *   kSCEntNetVPN                                       "VPN"                          CFDictionary
  *
- * kSCCompNetwork Properties
- *
- *   kSCPropNetIgnoreLinkStatus                         "IgnoreLinkStatus"             CFBoolean
- *
  * kSCEntNetCommCenter Entity Keys
  *
  *   kSCPropNetCommCenterAllowNetworkAccess             "AllowNetworkAccess"           CFNumber (0 or 1)
@@ -62,6 +69,7 @@
  *
  * kSCEntNetDNS Entity Keys
  *
+ *   kSCPropNetDNSConfirmedServiceID                    "ConfirmedServiceID"           CFString
  *   kSCPropNetDNSServiceIdentifier                     "ServiceIdentifier"            CFNumber
  *   kSCPropNetDNSSupplementalMatchDomainsNoSearch      "SupplementalMatchDomainsNoSearch" CFNumber (0 or 1)
  *
@@ -100,6 +108,7 @@
  * kSCEntNetIPv4 Entity Keys
  *
  *   kSCPropNetIPv4AdditionalRoutes                     "AdditionalRoutes"             CFArray[CFDictionary]
+ *   kSCPropNetIPv4CLAT46                               "CLAT46"                       CFBoolean
  *   kSCPropNetIPv4ExcludedRoutes                       "ExcludedRoutes"               CFArray[CFDictionary]
  *   kSCPropNetIPv4IncludedRoutes                       "IncludedRoutes"               CFArray[CFDictionary]
  *
@@ -118,8 +127,11 @@
  * kSCEntNetIPv6 Entity Keys
  *
  *   kSCPropNetIPv6AdditionalRoutes                     "AdditionalRoutes"             CFArray[CFDictionary]
+ *   kSCPropNetIPv6EnableCGA                            "EnableCGA"                    CFNumber (0 or 1)
  *   kSCPropNetIPv6ExcludedRoutes                       "ExcludedRoutes"               CFArray[CFDictionary]
  *   kSCPropNetIPv6IncludedRoutes                       "IncludedRoutes"               CFArray[CFDictionary]
+ *   kSCPropNetIPv6LinkLocalAddress                     "LinkLocalAddress"             CFString
+ *   kSCPropNetIPv6PerformPLATDiscovery                 "PerformPLATDiscovery"         CFBoolean
  *
  *   --- kSCPropNetIPv6AdditionalRoutes, kSCPropNetIPv6IncludedRoutes, kSCPropNetIPv6ExcludedRoutes [CFDictionary] keys ---
  *   kSCPropNetIPv6RouteDestinationAddress              "DestinationAddress"           CFString
@@ -165,21 +177,35 @@
  *   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)
  *   kSCPropNetProxiesFallBackAllowed                   "FallBackAllowed"              CFNumber (0 or 1)
  *   kSCPropNetProxiesSupplementalMatchDomains          "SupplementalMatchDomains"     CFArray[CFString]
  *   kSCPropNetProxiesSupplementalMatchOrders           "SupplementalMatchOrders"      CFArray[CFNumber]
+ *   kSCPropNetProxiesServiceSpecific                   "ServiceSpecific"              CFNumber (0 or 1)
  *
  *   kSCPropNetProxiesScoped                            "__SCOPED__"                   CFDictionary
  *   kSCPropNetProxiesServices                          "__SERVICES__"                 CFDictionary
  *   kSCPropNetProxiesSupplemental                      "__SUPPLEMENTAL__"             CFArray[CFDictionary]
  *   kSCPropNetProxiesSupplementalMatchDomain           "__MATCH_DOMAIN__"             CFString
  *
+ * kSCEntNetQoSMarkingPolicy Entity Keys
+ *
+ *   kSCPropNetQoSMarkingAppleAudioVideoCalls           "QoSMarkingAppleAudioVideoCalls" CFBoolean
+ *   kSCPropNetQoSMarkingEnabled                        "QoSMarkingEnabled"            CFBoolean
+ *   kSCPropNetQoSMarkingWhitelistedAppIdentifiers      "QoSMarkingWhitelistedAppIdentifiers" CFArray[CFString]
+ *
  * kSCEntNetService Entity Keys
  *
  *   kSCPropNetServicePrimaryRank                       "PrimaryRank"                  CFString
+ *   kSCPropNetServiceServiceIndex                      "ServiceIndex"                 CFNumber
  *   kSCPropNetServiceUserDefinedName                   "UserDefinedName"              CFString
  *
  *   --- kSCPropNetServicePrimaryRank values ---
@@ -298,23 +324,32 @@
 #ifndef _SCSCHEMADEFINITIONSPRIVATE_H
 #define _SCSCHEMADEFINITIONSPRIVATE_H
 
-/* -------------------- Macro declarations -------------------- */
-
 #include 
 
-/* -------------------- HeaderDoc comments -------------------- */
-
-
-#if	0
 /*!
  *	@header SCSchemaDefinitionsPrivate
  */
 
+/*!
+  @const kSCPropNetIgnoreLinkStatus
+  @discussion Value is a CFBoolean
+ */
+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
-  @availability Introduced in Mac OS X 10.10.
+  @discussion Value is a CFString
+ */
+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 kSCPropConfirmedInterfaceName;
+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
 
 /*!
   @group Preference Keys
@@ -322,101 +357,159 @@ extern const CFStringRef kSCPropConfirmedInterfaceName;
 
 /*!
   @const kSCPrefVirtualNetworkInterfaces
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPrefVirtualNetworkInterfaces;
+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
 
 /*!
   @group Network Entity Keys
  */
 
 /*!
-  @const kSCEntNetActiveDuringSleepRequested
-  @availability Introduced in Mac OS X 10.10.
+  @const kSCEntNetAppLayer
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetActiveDuringSleepRequested;
+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 kSCEntNetActiveDuringSleepSupported
-  @availability Introduced in Mac OS X 10.10.
+  @const kSCEntNetCommCenter
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetActiveDuringSleepSupported;
+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 kSCEntNetAppLayer
-  @availability Introduced in Mac OS X 10.9.
+  @const kSCEntNetEAPOL
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetAppLayer;
+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 kSCEntNetCommCenter
-  @availability Introduced in iPhone OS 2.0.
+  @const kSCEntNetIdleRoute
  */
-extern const CFStringRef kSCEntNetCommCenter;
+extern const CFStringRef kSCEntNetIdleRoute                                 API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCEntNetIdleRoute kSCEntNetIdleRoute
 
 /*!
-  @const kSCEntNetEAPOL
-  @availability Introduced in Mac OS X 10.5.
+  @const kSCEntNetInterfaceActiveDuringSleepRequested
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetEAPOL;
+extern const CFStringRef kSCEntNetInterfaceActiveDuringSleepRequested       API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCEntNetInterfaceActiveDuringSleepRequested kSCEntNetInterfaceActiveDuringSleepRequested
+
+/*!
+  @const kSCEntNetInterfaceActiveDuringSleepSupported
+  @discussion Value is a CFDictionary
+ */
+extern const CFStringRef kSCEntNetInterfaceActiveDuringSleepSupported       API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCEntNetInterfaceActiveDuringSleepSupported kSCEntNetInterfaceActiveDuringSleepSupported
+
+/*!
+  @const kSCEntNetInterfaceDelegation
+ */
+extern const CFStringRef kSCEntNetInterfaceDelegation                       API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0));
+#define kSCEntNetInterfaceDelegation kSCEntNetInterfaceDelegation
+
+/*!
+  @const kSCEntNetIPv4ARPCollision
+ */
+extern const CFStringRef kSCEntNetIPv4ARPCollision                          API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCEntNetIPv4ARPCollision kSCEntNetIPv4ARPCollision
+
+/*!
+  @const kSCEntNetIPv4PortInUse
+ */
+extern const CFStringRef kSCEntNetIPv4PortInUse                             API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCEntNetIPv4PortInUse kSCEntNetIPv4PortInUse
 
 /*!
   @const kSCEntNetIPv4RouterARPFailure
-  @availability Introduced in Mac OS X 10.10.
  */
-extern const CFStringRef kSCEntNetIPv4RouterARPFailure;
+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
-  @availability Introduced in Mac OS X 10.10.
  */
-extern const CFStringRef kSCEntNetIPv4RouterARPAlive;
+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                         API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(11.0), tvos(11.0), watchos(4.0), bridgeos(2.0));
+#define kSCEntNetIPv6RouterExpired kSCEntNetIPv6RouterExpired
 
 /*!
   @const kSCEntNetLinkIssues
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetLinkIssues;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetLinkQuality;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFDictionary
+ */
+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(3.0));
+#define kSCEntNetNAT64 kSCEntNetNAT64
+
+/*!
+  @const kSCEntNetNAT64PrefixRequest
  */
-extern const CFStringRef kSCEntNetLoopback;
+extern const CFStringRef kSCEntNetNAT64PrefixRequest                        API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(11.0), tvos(11.0), watchos(4.0), bridgeos(2.0));
+#define kSCEntNetNAT64PrefixRequest kSCEntNetNAT64PrefixRequest
 
 /*!
   @const kSCEntNetOnDemand
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetOnDemand;
+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 kSCEntNetService
-  @availability Introduced in Mac OS X 10.6.
+  @const kSCEntNetQoSMarkingPolicy
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCEntNetService;
+extern const CFStringRef kSCEntNetQoSMarkingPolicy                          API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCEntNetQoSMarkingPolicy kSCEntNetQoSMarkingPolicy
 
 /*!
-  @const kSCEntNetVPN
-  @availability Introduced in Mac OS X 10.7.
+  @const kSCEntNetRefreshConfiguration
  */
-extern const CFStringRef kSCEntNetVPN;
+extern const CFStringRef kSCEntNetRefreshConfiguration                      API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCEntNetRefreshConfiguration kSCEntNetRefreshConfiguration
 
 /*!
-  @group kSCCompNetwork Properties
+  @const kSCEntNetService
+  @discussion Value is a CFDictionary
  */
+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 kSCPropNetIgnoreLinkStatus
-  @availability Introduced in Mac OS X 10.5.
+  @const kSCEntNetVPN
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPropNetIgnoreLinkStatus;
+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
 
 /*!
   @group kSCEntNetCommCenter Entity Keys
@@ -424,31 +517,42 @@ extern const CFStringRef kSCPropNetIgnoreLinkStatus;
 
 /*!
   @const kSCPropNetCommCenterAllowNetworkAccess
-  @availability Introduced in iPhone OS 2.0.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetCommCenterAllowNetworkAccess;
+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
-  @availability Introduced in iPhone OS 2.0.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetCommCenterAvailable;
+extern const CFStringRef kSCPropNetCommCenterAvailable                      SPI_AVAILABLE(macos(10.6), ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));
+#define kSCPropNetCommCenterAvailable kSCPropNetCommCenterAvailable
 
 /*!
   @group kSCEntNetDNS Entity Keys
  */
 
+/*!
+  @const kSCPropNetDNSConfirmedServiceID
+  @discussion Value is a CFString
+ */
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetDNSServiceIdentifier;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetDNSSupplementalMatchDomainsNoSearch;
+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
 
 /*!
   @group kSCEntNetEthernet (Hardware) Entity Keys
@@ -456,63 +560,73 @@ extern const CFStringRef kSCPropNetDNSSupplementalMatchDomainsNoSearch;
 
 /*!
   @const kSCPropNetEthernetCapabilityAV
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityAV;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityJUMBO_MTU;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityLRO;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityRXCSUM;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityTSO;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityTSO4;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityTSO6;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityTXCSUM;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_HWTAGGING;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_MTU;
+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
 
 /*!
   @group kSCEntNetInterface Entity Keys
@@ -520,33 +634,35 @@ extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_MTU;
 
 /*!
   @const kSCValNetInterfaceTypeCellular
-  @availability Introduced in Mac OS X 10.10.
  */
-extern const CFStringRef kSCValNetInterfaceTypeCellular;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetInterfaceTypeLoopback;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetInterfaceTypeVPN;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetIPSecDisconnectOnWake;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetIPSecDisconnectOnWakeTimer;
+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
 
 /*!
   @group kSCEntNetIPSec Entity Keys
@@ -554,33 +670,38 @@ extern const CFStringRef kSCPropNetIPSecDisconnectOnWakeTimer;
 
 /*!
   @const kSCPropNetIPSecLastCause
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetIPSecLastCause;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetIPSecOnDemandEnabled;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsAlways;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsOnRetry;
+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
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsNever;
+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
 
 /*!
   @group kSCEntNetIPv4 Entity Keys
@@ -588,63 +709,79 @@ extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsNever;
 
 /*!
   @const kSCPropNetIPv4AdditionalRoutes
-  @availability Introduced in Mac OS X 10.10.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetIPv4AdditionalRoutes;
+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(3.0));
+#define kSCPropNetIPv4CLAT46 kSCPropNetIPv4CLAT46
 
 /*!
   @const kSCPropNetIPv4ExcludedRoutes
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetIPv4ExcludedRoutes;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetIPv4IncludedRoutes;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetIPv4ConfigMethodFailover;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4RouteDestinationAddress;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4RouteSubnetMask;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4RouteGatewayAddress;
+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
-  @availability Introduced in Mac OS X 10.10.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4RouteInterfaceName;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4ARPResolvedHardwareAddress;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress;
+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
 
 /*!
   @group kSCEntNetIPv6 Entity Keys
@@ -652,45 +789,73 @@ extern const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress;
 
 /*!
   @const kSCPropNetIPv6AdditionalRoutes
-  @availability Introduced in Mac OS X 10.10.
+  @discussion Value is a CFArray[CFDictionary]
+ */
+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 kSCPropNetIPv6AdditionalRoutes;
+extern const CFStringRef kSCPropNetIPv6EnableCGA                            API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCPropNetIPv6EnableCGA kSCPropNetIPv6EnableCGA
 
 /*!
   @const kSCPropNetIPv6ExcludedRoutes
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetIPv6ExcludedRoutes;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetIPv6IncludedRoutes;
+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 kSCPropNetIPv6LinkLocalAddress
+  @discussion Value is a CFString
+ */
+extern const CFStringRef kSCPropNetIPv6LinkLocalAddress                     API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCPropNetIPv6LinkLocalAddress kSCPropNetIPv6LinkLocalAddress
+
+/*!
+  @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(3.0));
+#define kSCPropNetIPv6PerformPLATDiscovery kSCPropNetIPv6PerformPLATDiscovery
 
 /*!
   @const kSCPropNetIPv6RouteDestinationAddress
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv6RouteDestinationAddress;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetIPv6RoutePrefixLength;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv6RouteGatewayAddress;
+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
-  @availability Introduced in Mac OS X 10.10.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetIPv6RouteInterfaceName;
+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
 
 /*!
   @group kSCEntNetLink Entity Keys
@@ -698,9 +863,10 @@ extern const CFStringRef kSCPropNetIPv6RouteInterfaceName;
 
 /*!
   @const kSCPropNetLinkExpensive
-  @availability Introduced in Mac OS X 10.10.
+  @discussion Value is a CFBoolean
  */
-extern const CFStringRef kSCPropNetLinkExpensive;
+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
 
 /*!
   @group kSCEntNetLinkIssues Entity Keys
@@ -708,21 +874,24 @@ extern const CFStringRef kSCPropNetLinkExpensive;
 
 /*!
   @const kSCPropNetLinkIssuesModuleID
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFData
  */
-extern const CFStringRef kSCPropNetLinkIssuesModuleID;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFData
  */
-extern const CFStringRef kSCPropNetLinkIssuesInfo;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFDate
  */
-extern const CFStringRef kSCPropNetLinkIssuesTimeStamp;
+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
 
 /*!
   @group kSCEntNetLinkQuality Entity Keys
@@ -730,21 +899,24 @@ extern const CFStringRef kSCPropNetLinkIssuesTimeStamp;
 
 /*!
   @const kSCPropNetLinkQuality
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetLinkQuality;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnWake;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetPPPDisconnectOnWakeTimer;
+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
 
 /*!
   @group kSCEntNetPPP Entity Keys
@@ -752,87 +924,120 @@ extern const CFStringRef kSCPropNetPPPDisconnectOnWakeTimer;
 
 /*!
   @const kSCPropNetPPPOnDemandDomains
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPOnDemandDomains;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetPPPOnDemandEnabled;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPOnDemandHostName;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsAlways;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsOnRetry;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsNever;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPOnDemandMode;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetPPPOnDemandPriority;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPOnDemandModeAggressive;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPOnDemandModeConservative;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPOnDemandModeCompatible;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPOnDemandPriorityDefault;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPOnDemandPriorityHigh;
+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
-  @availability Introduced in Mac OS X 10.5.
  */
-extern const CFStringRef kSCValNetPPPOnDemandPriorityLow;
+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(3.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(3.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(3.0));
+#define kSCPropNetNAT64PLATDiscoveryCompletionTime kSCPropNetNAT64PLATDiscoveryCompletionTime
 
 /*!
   @group kSCEntNetProxies Entity Keys
@@ -840,51 +1045,91 @@ extern const CFStringRef kSCValNetPPPOnDemandPriorityLow;
 
 /*!
   @const kSCPropNetProxiesBypassAllowed
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesBypassAllowed;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetProxiesFallBackAllowed;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomains;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFNumber]
  */
-extern const CFStringRef kSCPropNetProxiesSupplementalMatchOrders;
+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                   API_AVAILABLE(macos(10.11)) SPI_AVAILABLE(ios(9.0), tvos(9.0), watchos(2.0), bridgeos(2.0));
+#define kSCPropNetProxiesServiceSpecific kSCPropNetProxiesServiceSpecific
 
 /*!
   @const kSCPropNetProxiesScoped
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPropNetProxiesScoped;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPropNetProxiesServices;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetProxiesSupplemental;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
+ */
+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
+
+/*!
+  @group kSCEntNetQoSMarkingPolicy Entity Keys
  */
-extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomain;
+
+/*!
+  @const kSCPropNetQoSMarkingAppleAudioVideoCalls
+  @discussion Value is a CFBoolean
+ */
+extern const CFStringRef kSCPropNetQoSMarkingAppleAudioVideoCalls           API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCPropNetQoSMarkingAppleAudioVideoCalls kSCPropNetQoSMarkingAppleAudioVideoCalls
+
+/*!
+  @const kSCPropNetQoSMarkingEnabled
+  @discussion Value is a CFBoolean
+ */
+extern const CFStringRef kSCPropNetQoSMarkingEnabled                        API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCPropNetQoSMarkingEnabled kSCPropNetQoSMarkingEnabled
+
+/*!
+  @const kSCPropNetQoSMarkingWhitelistedAppIdentifiers
+  @discussion Value is a CFArray[CFString]
+ */
+extern const CFStringRef kSCPropNetQoSMarkingWhitelistedAppIdentifiers      API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCPropNetQoSMarkingWhitelistedAppIdentifiers kSCPropNetQoSMarkingWhitelistedAppIdentifiers
 
 /*!
   @group kSCEntNetService Entity Keys
@@ -892,39 +1137,48 @@ extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomain;
 
 /*!
   @const kSCPropNetServicePrimaryRank
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFString
+ */
+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 kSCPropNetServicePrimaryRank;
+extern const CFStringRef kSCPropNetServiceServiceIndex                      API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));
+#define kSCPropNetServiceServiceIndex kSCPropNetServiceServiceIndex
 
 /*!
   @const kSCPropNetServiceUserDefinedName
-  @availability Introduced in Mac OS X 10.6.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetServiceUserDefinedName;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetServicePrimaryRankFirst;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetServicePrimaryRankLast;
+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
-  @availability Introduced in Mac OS X 10.6.
  */
-extern const CFStringRef kSCValNetServicePrimaryRankNever;
+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
-  @availability Introduced in Mac OS X 10.10.
  */
-extern const CFStringRef kSCValNetServicePrimaryRankScoped;
+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
 
 /*!
   @group kSCEntNetVPN Entity Keys
@@ -932,387 +1186,434 @@ extern const CFStringRef kSCValNetServicePrimaryRankScoped;
 
 /*!
   @const kSCPropNetVPNAppRules
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetVPNAppRules;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNAuthCredentialPassword;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNAuthName;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNAuthPassword;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNAuthPasswordEncryption;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNAuthPasswordPluginType;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNAuthenticationMethod;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNConnectTime;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnFastUserSwitch;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnIdle;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnIdleTimer;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnLogout;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnSleep;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnWake;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetVPNDisconnectOnWakeTimer;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFData
  */
-extern const CFStringRef kSCPropNetVPNLocalCertificate;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNLogfile;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetVPNMTU;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNOnDemandEnabled;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFBoolean
  */
-extern const CFStringRef kSCPropNetVPNOnDemandMatchAppEnabled;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsAlways;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsOnRetry;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsNever;
+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
-  @availability Introduced in Mac OS X 10.8.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRules;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetVPNOnDemandSuspended;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNPluginCapability;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNRemoteAddress;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropNetVPNStatus;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFNumber (0 or 1)
  */
-extern const CFStringRef kSCPropNetVPNVerboseLogging;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCValNetVPNAppRuleAccountIdentifierMatch;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCValNetVPNAppRuleDNSDomainMatch;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCValNetVPNAppRuleExecutableMatch;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetVPNAppRuleIdentifier;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetVPNAppRuleExecutableDesignatedRequirement;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetVPNAppRuleExecutableSigningIdentifier;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCValNetVPNAppRuleExecutableUUID;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetVPNAuthenticationMethodPassword;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetVPNAuthenticationMethodCertificate;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionExternal;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionKeychain;
+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
-  @availability Introduced in Mac OS X 10.7.
  */
-extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionPrompt;
+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
-  @availability Introduced in Mac OS X 10.8.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleAction;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFDictionary]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParameters;
+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
-  @availability Introduced in Mac OS X 10.8.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleDNSDomainMatch;
+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
-  @availability Introduced in Mac OS X 10.8.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleDNSServerAddressMatch;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleSSIDMatch;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleInterfaceTypeMatch;
+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
-  @availability Introduced in Mac OS X 10.8.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleURLStringProbe;
+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
-  @availability Introduced in Mac OS X 10.8.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionAllow;
+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
-  @availability Introduced in Mac OS X 10.8.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionIgnore;
+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
-  @availability Introduced in Mac OS X 10.8.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionConnect;
+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
-  @availability Introduced in Mac OS X 10.8.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionDisconnect;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionEvaluateConnection;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersDomainAction;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersDomains;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers;
+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
-  @availability Introduced in Mac OS X 10.9.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchCellular;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNPluginCapabilityAuth;
+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
-  @availability Introduced in Mac OS X 10.9.
  */
-extern const CFStringRef kSCValNetVPNPluginCapabilityConnect;
+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
 
 /*!
   @group kSCCompSystem Properties
@@ -1320,15 +1621,17 @@ extern const CFStringRef kSCValNetVPNPluginCapabilityConnect;
 
 /*!
   @const kSCPropSystemComputerNameRegion
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropSystemComputerNameRegion;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropSystemHostName;
+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
 
 /*!
   @group Virtual Network Interface Keys
@@ -1336,1026 +1639,59 @@ extern const CFStringRef kSCPropSystemHostName;
 
 /*!
   @const kSCPropVirtualNetworkInterfacesBondInterfaces
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesBondInterfaces;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesBondMode;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesBondOptions;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFArray[CFString]
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesBridgeInterfaces;
+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
-  @availability Introduced in Mac OS X 10.7.
+  @discussion Value is a CFDictionary
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesBridgeOptions;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFString
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANInterface;
+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
-  @availability Introduced in Mac OS X 10.5.
+  @discussion Value is a CFNumber
  */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANTag;
+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
-  @availability Introduced in Mac OS X 10.5.
- */
-extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions;
-
-#endif	/* 0 */
-
-
-/* -------------------- Schema declarations -------------------- */
-
-
-  SC_SCHEMA_DECLARATION(kSCPropConfirmedInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCPropConfirmedInterfaceName                                 \
-	  SC_SCHEMA_KV(kSCPropConfirmedInterfaceName                    \
-		      ,"ConfirmedInterfaceName"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPrefVirtualNetworkInterfaces, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPrefVirtualNetworkInterfaces                               \
-	  SC_SCHEMA_KV(kSCPrefVirtualNetworkInterfaces                  \
-		      ,"VirtualNetworkInterfaces"                       \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetActiveDuringSleepRequested, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/))
-  #define kSCEntNetActiveDuringSleepRequested                           \
-	  SC_SCHEMA_KV(kSCEntNetActiveDuringSleepRequested              \
-		      ,"ActiveDuringSleepRequested"                     \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetActiveDuringSleepSupported, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/))
-  #define kSCEntNetActiveDuringSleepSupported                           \
-	  SC_SCHEMA_KV(kSCEntNetActiveDuringSleepSupported              \
-		      ,"ActiveDuringSleepSupported"                     \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetAppLayer, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCEntNetAppLayer                                             \
-	  SC_SCHEMA_KV(kSCEntNetAppLayer                                \
-		      ,"AppLayer"                                       \
-		      ,CFDictionary                                     )
-
-
-  SC_SCHEMA_DECLARATION(kSCEntNetEAPOL, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetEAPOL                                                \
-	  SC_SCHEMA_KV(kSCEntNetEAPOL                                   \
-		      ,"EAPOL"                                          \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetIPv4RouterARPFailure, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCEntNetIPv4RouterARPFailure                                 \
-	  SC_SCHEMA_KV(kSCEntNetIPv4RouterARPFailure                    \
-		      ,"IPv4RouterARPFailure"                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetIPv4RouterARPAlive, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCEntNetIPv4RouterARPAlive                                   \
-	  SC_SCHEMA_KV(kSCEntNetIPv4RouterARPAlive                      \
-		      ,"IPv4RouterARPAlive"                             \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetLinkIssues, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCEntNetLinkIssues                                           \
-	  SC_SCHEMA_KV(kSCEntNetLinkIssues                              \
-		      ,"LinkIssues"                                     \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetLinkQuality, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCEntNetLinkQuality                                          \
-	  SC_SCHEMA_KV(kSCEntNetLinkQuality                             \
-		      ,"LinkQuality"                                    \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetLoopback, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCEntNetLoopback                                             \
-	  SC_SCHEMA_KV(kSCEntNetLoopback                                \
-		      ,"Loopback"                                       \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetOnDemand, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCEntNetOnDemand                                             \
-	  SC_SCHEMA_KV(kSCEntNetOnDemand                                \
-		      ,"OnDemand"                                       \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetService, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCEntNetService                                              \
-	  SC_SCHEMA_KV(kSCEntNetService                                 \
-		      ,"__SERVICE__"                                    \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCEntNetVPN, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCEntNetVPN                                                  \
-	  SC_SCHEMA_KV(kSCEntNetVPN                                     \
-		      ,"VPN"                                            \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIgnoreLinkStatus, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetIgnoreLinkStatus                                    \
-	  SC_SCHEMA_KV(kSCPropNetIgnoreLinkStatus                       \
-		      ,"IgnoreLinkStatus"                               \
-		      ,CFBoolean                                        )
-
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSServiceIdentifier, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetDNSServiceIdentifier                                \
-	  SC_SCHEMA_KV(kSCPropNetDNSServiceIdentifier                   \
-		      ,"ServiceIdentifier"                              \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetDNSSupplementalMatchDomainsNoSearch, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetDNSSupplementalMatchDomainsNoSearch                 \
-	  SC_SCHEMA_KV(kSCPropNetDNSSupplementalMatchDomainsNoSearch    \
-		      ,"SupplementalMatchDomainsNoSearch"               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityAV, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityAV                                \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityAV                   \
-		      ,"AV"                                             \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityJUMBO_MTU, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityJUMBO_MTU                         \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityJUMBO_MTU            \
-		      ,"JUMBO_MTU"                                      \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityLRO, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityLRO                               \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityLRO                  \
-		      ,"LRO"                                            \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityRXCSUM, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityRXCSUM                            \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityRXCSUM               \
-		      ,"RXCSUM"                                         \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityTSO, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityTSO                               \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityTSO                  \
-		      ,"TSO"                                            \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityTSO4, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityTSO4                              \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityTSO4                 \
-		      ,"TSO4"                                           \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityTSO6, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityTSO6                              \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityTSO6                 \
-		      ,"TSO6"                                           \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityTXCSUM, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityTXCSUM                            \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityTXCSUM               \
-		      ,"TXCSUM"                                         \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityVLAN_HWTAGGING, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityVLAN_HWTAGGING                    \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityVLAN_HWTAGGING       \
-		      ,"VLAN_HWTAGGING"                                 \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetEthernetCapabilityVLAN_MTU, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetEthernetCapabilityVLAN_MTU                          \
-	  SC_SCHEMA_KV(kSCPropNetEthernetCapabilityVLAN_MTU             \
-		      ,"VLAN_MTU"                                       \
-		      ,CFNumber (0 or 1)                                )
-
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypeLoopback, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetInterfaceTypeLoopback                                \
-	  SC_SCHEMA_KV(kSCValNetInterfaceTypeLoopback                   \
-		      ,"Loopback"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypeVPN, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetInterfaceTypeVPN                                     \
-	  SC_SCHEMA_KV(kSCValNetInterfaceTypeVPN                        \
-		      ,"VPN"                                            \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecDisconnectOnWake, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetIPSecDisconnectOnWake                               \
-	  SC_SCHEMA_KV(kSCPropNetIPSecDisconnectOnWake                  \
-		      ,"DisconnectOnWake"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecDisconnectOnWakeTimer, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetIPSecDisconnectOnWakeTimer                          \
-	  SC_SCHEMA_KV(kSCPropNetIPSecDisconnectOnWakeTimer             \
-		      ,"DisconnectOnWakeTimer"                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecLastCause, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCPropNetIPSecLastCause                                      \
-	  SC_SCHEMA_KV(kSCPropNetIPSecLastCause                         \
-		      ,"LastCause"                                      \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecOnDemandEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCPropNetIPSecOnDemandEnabled                                \
-	  SC_SCHEMA_KV(kSCPropNetIPSecOnDemandEnabled                   \
-		      ,"OnDemandEnabled"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecOnDemandMatchDomainsAlways, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCPropNetIPSecOnDemandMatchDomainsAlways                     \
-	  SC_SCHEMA_KV(kSCPropNetIPSecOnDemandMatchDomainsAlways        \
-		      ,"OnDemandMatchDomainsAlways"                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecOnDemandMatchDomainsOnRetry, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCPropNetIPSecOnDemandMatchDomainsOnRetry                    \
-	  SC_SCHEMA_KV(kSCPropNetIPSecOnDemandMatchDomainsOnRetry       \
-		      ,"OnDemandMatchDomainsOnRetry"                    \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPSecOnDemandMatchDomainsNever, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))
-  #define kSCPropNetIPSecOnDemandMatchDomainsNever                      \
-	  SC_SCHEMA_KV(kSCPropNetIPSecOnDemandMatchDomainsNever         \
-		      ,"OnDemandMatchDomainsNever"                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4AdditionalRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCPropNetIPv4AdditionalRoutes                                \
-	  SC_SCHEMA_KV(kSCPropNetIPv4AdditionalRoutes                   \
-		      ,"AdditionalRoutes"                               \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4ExcludedRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv4ExcludedRoutes                                  \
-	  SC_SCHEMA_KV(kSCPropNetIPv4ExcludedRoutes                     \
-		      ,"ExcludedRoutes"                                 \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4IncludedRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv4IncludedRoutes                                  \
-	  SC_SCHEMA_KV(kSCPropNetIPv4IncludedRoutes                     \
-		      ,"IncludedRoutes"                                 \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCValNetIPv4ConfigMethodFailover, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetIPv4ConfigMethodFailover                             \
-	  SC_SCHEMA_KV(kSCValNetIPv4ConfigMethodFailover                \
-		      ,"Failover"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4RouteDestinationAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv4RouteDestinationAddress                         \
-	  SC_SCHEMA_KV(kSCPropNetIPv4RouteDestinationAddress            \
-		      ,"DestinationAddress"                             \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4RouteSubnetMask, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv4RouteSubnetMask                                 \
-	  SC_SCHEMA_KV(kSCPropNetIPv4RouteSubnetMask                    \
-		      ,"SubnetMask"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4RouteGatewayAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv4RouteGatewayAddress                             \
-	  SC_SCHEMA_KV(kSCPropNetIPv4RouteGatewayAddress                \
-		      ,"GatewayAddress"                                 \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4RouteInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCPropNetIPv4RouteInterfaceName                              \
-	  SC_SCHEMA_KV(kSCPropNetIPv4RouteInterfaceName                 \
-		      ,"InterfaceName"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4ARPResolvedHardwareAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetIPv4ARPResolvedHardwareAddress                      \
-	  SC_SCHEMA_KV(kSCPropNetIPv4ARPResolvedHardwareAddress         \
-		      ,"ARPResolvedHardwareAddress"                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv4ARPResolvedIPAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetIPv4ARPResolvedIPAddress                            \
-	  SC_SCHEMA_KV(kSCPropNetIPv4ARPResolvedIPAddress               \
-		      ,"ARPResolvedIPAddress"                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6AdditionalRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCPropNetIPv6AdditionalRoutes                                \
-	  SC_SCHEMA_KV(kSCPropNetIPv6AdditionalRoutes                   \
-		      ,"AdditionalRoutes"                               \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6ExcludedRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv6ExcludedRoutes                                  \
-	  SC_SCHEMA_KV(kSCPropNetIPv6ExcludedRoutes                     \
-		      ,"ExcludedRoutes"                                 \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6IncludedRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv6IncludedRoutes                                  \
-	  SC_SCHEMA_KV(kSCPropNetIPv6IncludedRoutes                     \
-		      ,"IncludedRoutes"                                 \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6RouteDestinationAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv6RouteDestinationAddress                         \
-	  SC_SCHEMA_KV(kSCPropNetIPv6RouteDestinationAddress            \
-		      ,"DestinationAddress"                             \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6RoutePrefixLength, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv6RoutePrefixLength                               \
-	  SC_SCHEMA_KV(kSCPropNetIPv6RoutePrefixLength                  \
-		      ,"PrefixLength"                                   \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6RouteGatewayAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetIPv6RouteGatewayAddress                             \
-	  SC_SCHEMA_KV(kSCPropNetIPv6RouteGatewayAddress                \
-		      ,"GatewayAddress"                                 \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetIPv6RouteInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCPropNetIPv6RouteInterfaceName                              \
-	  SC_SCHEMA_KV(kSCPropNetIPv6RouteInterfaceName                 \
-		      ,"InterfaceName"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkExpensive, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCPropNetLinkExpensive                                       \
-	  SC_SCHEMA_KV(kSCPropNetLinkExpensive                          \
-		      ,"Expensive"                                      \
-		      ,CFBoolean                                        )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkIssuesModuleID, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetLinkIssuesModuleID                                  \
-	  SC_SCHEMA_KV(kSCPropNetLinkIssuesModuleID                     \
-		      ,"ModuleID"                                       \
-		      ,CFData                                           )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkIssuesInfo, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetLinkIssuesInfo                                      \
-	  SC_SCHEMA_KV(kSCPropNetLinkIssuesInfo                         \
-		      ,"Info"                                           \
-		      ,CFData                                           )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkIssuesTimeStamp, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetLinkIssuesTimeStamp                                 \
-	  SC_SCHEMA_KV(kSCPropNetLinkIssuesTimeStamp                    \
-		      ,"TimeStamp"                                      \
-		      ,CFDATE                                           )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetLinkQuality, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetLinkQuality                                         \
-	  SC_SCHEMA_KV(kSCPropNetLinkQuality                            \
-		      ,"LinkQuality"                                    \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnWake, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnWake                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnWake                    \
-		      ,"DisconnectOnWake"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPDisconnectOnWakeTimer, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetPPPDisconnectOnWakeTimer                            \
-	  SC_SCHEMA_KV(kSCPropNetPPPDisconnectOnWakeTimer               \
-		      ,"DisconnectOnWakeTimer"                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandDomains, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandDomains                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandDomains                     \
-		      ,"OnDemandDomains"                                \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandEnabled                                  \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandEnabled                     \
-		      ,"OnDemandEnabled"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandHostName, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandHostName                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandHostName                    \
-		      ,"OnDemandHostName"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandMatchDomainsAlways, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandMatchDomainsAlways                       \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandMatchDomainsAlways          \
-		      ,"OnDemandMatchDomainsAlways"                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandMatchDomainsOnRetry, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandMatchDomainsOnRetry                      \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandMatchDomainsOnRetry         \
-		      ,"OnDemandMatchDomainsOnRetry"                    \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandMatchDomainsNever, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandMatchDomainsNever                        \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandMatchDomainsNever           \
-		      ,"OnDemandMatchDomainsNever"                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandMode, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandMode                                     \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandMode                        \
-		      ,"OnDemandMode"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetPPPOnDemandPriority, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetPPPOnDemandPriority                                 \
-	  SC_SCHEMA_KV(kSCPropNetPPPOnDemandPriority                    \
-		      ,"OnDemandPriority"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPOnDemandModeAggressive, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPOnDemandModeAggressive                            \
-	  SC_SCHEMA_KV(kSCValNetPPPOnDemandModeAggressive               \
-		      ,"Aggressive"                                     \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPOnDemandModeConservative, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPOnDemandModeConservative                          \
-	  SC_SCHEMA_KV(kSCValNetPPPOnDemandModeConservative             \
-		      ,"Conservative"                                   \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPOnDemandModeCompatible, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPOnDemandModeCompatible                            \
-	  SC_SCHEMA_KV(kSCValNetPPPOnDemandModeCompatible               \
-		      ,"Compatible"                                     \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPOnDemandPriorityDefault, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPOnDemandPriorityDefault                           \
-	  SC_SCHEMA_KV(kSCValNetPPPOnDemandPriorityDefault              \
-		      ,"Default"                                        \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPOnDemandPriorityHigh, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPOnDemandPriorityHigh                              \
-	  SC_SCHEMA_KV(kSCValNetPPPOnDemandPriorityHigh                 \
-		      ,"High"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetPPPOnDemandPriorityLow, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetPPPOnDemandPriorityLow                               \
-	  SC_SCHEMA_KV(kSCValNetPPPOnDemandPriorityLow                  \
-		      ,"Low"                                            \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesBypassAllowed, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetProxiesBypassAllowed                                \
-	  SC_SCHEMA_KV(kSCPropNetProxiesBypassAllowed                   \
-		      ,"BypassAllowed"                                  \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesFallBackAllowed, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_6_0/*SPI*/))
-  #define kSCPropNetProxiesFallBackAllowed                              \
-	  SC_SCHEMA_KV(kSCPropNetProxiesFallBackAllowed                 \
-		      ,"FallBackAllowed"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSupplementalMatchDomains, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetProxiesSupplementalMatchDomains                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSupplementalMatchDomains        \
-		      ,"SupplementalMatchDomains"                       \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSupplementalMatchOrders, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetProxiesSupplementalMatchOrders                      \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSupplementalMatchOrders         \
-		      ,"SupplementalMatchOrders"                        \
-		      ,CFArray[CFNumber]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesScoped, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetProxiesScoped                                       \
-	  SC_SCHEMA_KV(kSCPropNetProxiesScoped                          \
-		      ,"__SCOPED__"                                     \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesServices, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetProxiesServices                                     \
-	  SC_SCHEMA_KV(kSCPropNetProxiesServices                        \
-		      ,"__SERVICES__"                                   \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSupplemental, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetProxiesSupplemental                                 \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSupplemental                    \
-		      ,"__SUPPLEMENTAL__"                               \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetProxiesSupplementalMatchDomain, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))
-  #define kSCPropNetProxiesSupplementalMatchDomain                      \
-	  SC_SCHEMA_KV(kSCPropNetProxiesSupplementalMatchDomain         \
-		      ,"__MATCH_DOMAIN__"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetServicePrimaryRank, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetServicePrimaryRank                                  \
-	  SC_SCHEMA_KV(kSCPropNetServicePrimaryRank                     \
-		      ,"PrimaryRank"                                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetServiceUserDefinedName, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCPropNetServiceUserDefinedName                              \
-	  SC_SCHEMA_KV(kSCPropNetServiceUserDefinedName                 \
-		      ,"UserDefinedName"                                \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetServicePrimaryRankFirst, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetServicePrimaryRankFirst                              \
-	  SC_SCHEMA_KV(kSCValNetServicePrimaryRankFirst                 \
-		      ,"First"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetServicePrimaryRankLast, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetServicePrimaryRankLast                               \
-	  SC_SCHEMA_KV(kSCValNetServicePrimaryRankLast                  \
-		      ,"Last"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetServicePrimaryRankNever, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))
-  #define kSCValNetServicePrimaryRankNever                              \
-	  SC_SCHEMA_KV(kSCValNetServicePrimaryRankNever                 \
-		      ,"Never"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetServicePrimaryRankScoped, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))
-  #define kSCValNetServicePrimaryRankScoped                             \
-	  SC_SCHEMA_KV(kSCValNetServicePrimaryRankScoped                \
-		      ,"Scoped"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAppRules, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNAppRules                                         \
-	  SC_SCHEMA_KV(kSCPropNetVPNAppRules                            \
-		      ,"AppRules"                                       \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAuthCredentialPassword, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNAuthCredentialPassword                           \
-	  SC_SCHEMA_KV(kSCPropNetVPNAuthCredentialPassword              \
-		      ,"AuthCredentialPassword"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAuthName, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNAuthName                                         \
-	  SC_SCHEMA_KV(kSCPropNetVPNAuthName                            \
-		      ,"AuthName"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAuthPassword, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNAuthPassword                                     \
-	  SC_SCHEMA_KV(kSCPropNetVPNAuthPassword                        \
-		      ,"AuthPassword"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAuthPasswordEncryption, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNAuthPasswordEncryption                           \
-	  SC_SCHEMA_KV(kSCPropNetVPNAuthPasswordEncryption              \
-		      ,"AuthPasswordEncryption"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAuthPasswordPluginType, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNAuthPasswordPluginType                           \
-	  SC_SCHEMA_KV(kSCPropNetVPNAuthPasswordPluginType              \
-		      ,"AuthPasswordPluginType"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNAuthenticationMethod, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNAuthenticationMethod                             \
-	  SC_SCHEMA_KV(kSCPropNetVPNAuthenticationMethod                \
-		      ,"AuthenticationMethod"                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNConnectTime, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNConnectTime                                      \
-	  SC_SCHEMA_KV(kSCPropNetVPNConnectTime                         \
-		      ,"ConnectTime"                                    \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnFastUserSwitch, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnFastUserSwitch                       \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnFastUserSwitch          \
-		      ,"DisconnectOnFastUserSwitch"                     \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnIdle, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnIdle                                 \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnIdle                    \
-		      ,"DisconnectOnIdle"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnIdleTimer, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnIdleTimer                            \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnIdleTimer               \
-		      ,"DisconnectOnIdleTimer"                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnLogout, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnLogout                               \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnLogout                  \
-		      ,"DisconnectOnLogout"                             \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnSleep, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnSleep                                \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnSleep                   \
-		      ,"DisconnectOnSleep"                              \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnWake, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnWake                                 \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnWake                    \
-		      ,"DisconnectOnWake"                               \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNDisconnectOnWakeTimer, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNDisconnectOnWakeTimer                            \
-	  SC_SCHEMA_KV(kSCPropNetVPNDisconnectOnWakeTimer               \
-		      ,"DisconnectOnWakeTimer"                          \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNLocalCertificate, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNLocalCertificate                                 \
-	  SC_SCHEMA_KV(kSCPropNetVPNLocalCertificate                    \
-		      ,"LocalCertificate"                               \
-		      ,CFData                                           )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNLogfile, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNLogfile                                          \
-	  SC_SCHEMA_KV(kSCPropNetVPNLogfile                             \
-		      ,"Logfile"                                        \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNMTU, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNMTU                                              \
-	  SC_SCHEMA_KV(kSCPropNetVPNMTU                                 \
-		      ,"MTU"                                            \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandEnabled                                  \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandEnabled                     \
-		      ,"OnDemandEnabled"                                \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandMatchAppEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandMatchAppEnabled                          \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandMatchAppEnabled             \
-		      ,"OnDemandMatchAppEnabled"                        \
-		      ,CFBoolean                                        )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandMatchDomainsAlways, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandMatchDomainsAlways                       \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandMatchDomainsAlways          \
-		      ,"OnDemandMatchDomainsAlways"                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandMatchDomainsOnRetry, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandMatchDomainsOnRetry                      \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandMatchDomainsOnRetry         \
-		      ,"OnDemandMatchDomainsOnRetry"                    \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandMatchDomainsNever, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandMatchDomainsNever                        \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandMatchDomainsNever           \
-		      ,"OnDemandMatchDomainsNever"                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRules, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRules                                    \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRules                       \
-		      ,"OnDemandRules"                                  \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandSuspended, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandSuspended                                \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandSuspended                   \
-		      ,"OnDemandSuspended"                              \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNPluginCapability, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNPluginCapability                                 \
-	  SC_SCHEMA_KV(kSCPropNetVPNPluginCapability                    \
-		      ,"PluginCapability"                               \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNRemoteAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNRemoteAddress                                    \
-	  SC_SCHEMA_KV(kSCPropNetVPNRemoteAddress                       \
-		      ,"RemoteAddress"                                  \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNStatus, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNStatus                                           \
-	  SC_SCHEMA_KV(kSCPropNetVPNStatus                              \
-		      ,"Status"                                         \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNVerboseLogging, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropNetVPNVerboseLogging                                   \
-	  SC_SCHEMA_KV(kSCPropNetVPNVerboseLogging                      \
-		      ,"VerboseLogging"                                 \
-		      ,CFNumber (0 or 1)                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleAccountIdentifierMatch, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleAccountIdentifierMatch                     \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleAccountIdentifierMatch        \
-		      ,"AccountIdentifierMatch"                         \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleDNSDomainMatch, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleDNSDomainMatch                             \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleDNSDomainMatch                \
-		      ,"DNSDomainMatch"                                 \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleExecutableMatch, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleExecutableMatch                            \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleExecutableMatch               \
-		      ,"ExecutableMatch"                                \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleIdentifier, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleIdentifier                                 \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleIdentifier                    \
-		      ,"Identifier"                                     \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleExecutableDesignatedRequirement, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleExecutableDesignatedRequirement              \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleExecutableDesignatedRequirement \
-		      ,"DesignatedRequirement"                          \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleExecutableSigningIdentifier, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleExecutableSigningIdentifier                \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleExecutableSigningIdentifier   \
-		      ,"SigningIdentifier"                              \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleExecutableUUID, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAppRuleExecutableUUID                             \
-	  SC_SCHEMA_KV(kSCValNetVPNAppRuleExecutableUUID                \
-		      ,"UUID"                                           \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAuthenticationMethodPassword, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetVPNAuthenticationMethodPassword                      \
-	  SC_SCHEMA_KV(kSCValNetVPNAuthenticationMethodPassword         \
-		      ,"Password"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAuthenticationMethodCertificate, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetVPNAuthenticationMethodCertificate                   \
-	  SC_SCHEMA_KV(kSCValNetVPNAuthenticationMethodCertificate      \
-		      ,"Certificate"                                    \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAuthPasswordEncryptionExternal, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNAuthPasswordEncryptionExternal                    \
-	  SC_SCHEMA_KV(kSCValNetVPNAuthPasswordEncryptionExternal       \
-		      ,"External"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAuthPasswordEncryptionKeychain, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetVPNAuthPasswordEncryptionKeychain                    \
-	  SC_SCHEMA_KV(kSCValNetVPNAuthPasswordEncryptionKeychain       \
-		      ,"Keychain"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNAuthPasswordEncryptionPrompt, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCValNetVPNAuthPasswordEncryptionPrompt                      \
-	  SC_SCHEMA_KV(kSCValNetVPNAuthPasswordEncryptionPrompt         \
-		      ,"Prompt"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleAction, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleAction                               \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleAction                  \
-		      ,"Action"                                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleActionParameters, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleActionParameters                     \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleActionParameters        \
-		      ,"ActionParameters"                               \
-		      ,CFArray[CFDictionary]                            )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleDNSDomainMatch, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleDNSDomainMatch                       \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleDNSDomainMatch          \
-		      ,"DNSDomainMatch"                                 \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleDNSServerAddressMatch, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleDNSServerAddressMatch                \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleDNSServerAddressMatch   \
-		      ,"DNSServerAddressMatch"                          \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleSSIDMatch, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleSSIDMatch                            \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleSSIDMatch               \
-		      ,"SSIDMatch"                                      \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleInterfaceTypeMatch, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleInterfaceTypeMatch                   \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleInterfaceTypeMatch      \
-		      ,"InterfaceTypeMatch"                             \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleURLStringProbe, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleURLStringProbe                       \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleURLStringProbe          \
-		      ,"URLStringProbe"                                 \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionAllow, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionAllow                           \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionAllow              \
-		      ,"Allow"                                          \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionIgnore, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionIgnore                          \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionIgnore             \
-		      ,"Ignore"                                         \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionConnect, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionConnect                         \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionConnect            \
-		      ,"Connect"                                        \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionDisconnect, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionDisconnect                      \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionDisconnect         \
-		      ,"Disconnect"                                     \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionEvaluateConnection, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionEvaluateConnection              \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionEvaluateConnection \
-		      ,"EvaluateConnection"                             \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleActionParametersDomainAction, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleActionParametersDomainAction              \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleActionParametersDomainAction \
-		      ,"DomainAction"                                   \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleActionParametersDomains, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleActionParametersDomains              \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleActionParametersDomains \
-		      ,"Domains"                                        \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers              \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers \
-		      ,"RequiredDNSServers"                             \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe              \
-	  SC_SCHEMA_KV(kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe \
-		      ,"RequiredURLStringProbe"                         \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded              \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded \
-		      ,"ConnectIfNeeded"                                \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect              \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect \
-		      ,"NeverConnect"                                   \
-		      ,                                                 )
-
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet              \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet \
-		      ,"Ethernet"                                       \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi                \
-	  SC_SCHEMA_KV(kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi   \
-		      ,"WiFi"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNPluginCapabilityAuth, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNPluginCapabilityAuth                              \
-	  SC_SCHEMA_KV(kSCValNetVPNPluginCapabilityAuth                 \
-		      ,"Auth"                                           \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCValNetVPNPluginCapabilityConnect, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))
-  #define kSCValNetVPNPluginCapabilityConnect                           \
-	  SC_SCHEMA_KV(kSCValNetVPNPluginCapabilityConnect              \
-		      ,"Connect"                                        \
-		      ,                                                 )
-
-  SC_SCHEMA_DECLARATION(kSCPropSystemComputerNameRegion, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropSystemComputerNameRegion                               \
-	  SC_SCHEMA_KV(kSCPropSystemComputerNameRegion                  \
-		      ,"ComputerNameRegion"                             \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropSystemHostName, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropSystemHostName                                         \
-	  SC_SCHEMA_KV(kSCPropSystemHostName                            \
-		      ,"HostName"                                       \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesBondInterfaces, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesBondInterfaces                 \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesBondInterfaces    \
-		      ,"Interfaces"                                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesBondMode, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesBondMode                       \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesBondMode          \
-		      ,"Mode"                                           \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesBondOptions, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesBondOptions                    \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesBondOptions       \
-		      ,"Options"                                        \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesBridgeInterfaces, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesBridgeInterfaces               \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesBridgeInterfaces  \
-		      ,"Interfaces"                                     \
-		      ,CFArray[CFString]                                )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesBridgeOptions, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesBridgeOptions                  \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesBridgeOptions     \
-		      ,"Options"                                        \
-		      ,CFDictionary                                     )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesVLANInterface, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesVLANInterface                  \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesVLANInterface     \
-		      ,"Interface"                                      \
-		      ,CFString                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesVLANTag, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesVLANTag                        \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesVLANTag           \
-		      ,"Tag"                                            \
-		      ,CFNumber                                         )
-
-  SC_SCHEMA_DECLARATION(kSCPropVirtualNetworkInterfacesVLANOptions, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))
-  #define kSCPropVirtualNetworkInterfacesVLANOptions                    \
-	  SC_SCHEMA_KV(kSCPropVirtualNetworkInterfacesVLANOptions       \
-		      ,"Options"                                        \
-		      ,CFDictionary                                     )
+  @discussion Value is a CFDictionary
+ */
+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
+
 
 #endif	/* _SCSCHEMADEFINITIONSPRIVATE_H */
diff --git a/src/configd/SystemConfiguration.fproj/SNHelper.c b/src/configd/SystemConfiguration.fproj/SNHelper.c
index 097232b97..7e825c81b 100644
--- a/src/configd/SystemConfiguration.fproj/SNHelper.c
+++ b/src/configd/SystemConfiguration.fproj/SNHelper.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014 Apple Inc.
+ * Copyright (c) 2013-2015 Apple Inc.
  * All rights reserved.
  */
 #include 
@@ -18,9 +18,9 @@ create_connection(dispatch_queue_t queue)
 		xpc_connection_set_event_handler(new_connection,
 			^(xpc_object_t message) {
 				if (isa_xpc_error(message)) {
-					syslog(LOG_INFO, "Got an error on the snhelper connection");
+					syslog(LOG_INFO, "Got an error on the SNHelper connection");
 				} else if (isa_xpc_dictionary(message)) {
-					syslog(LOG_INFO, "Got an unexpected message on the snhelper connection");
+					syslog(LOG_INFO, "Got an unexpected message on the SNHelper connection");
 				}
 			});
 		xpc_connection_resume(new_connection);
@@ -163,4 +163,3 @@ isa_xpc_error(xpc_object_t obj)
 {
 	return isa_xpc_object_of_type(obj, XPC_TYPE_ERROR);
 }
-
diff --git a/src/configd/SystemConfiguration.fproj/SystemConfiguration.h b/src/configd/SystemConfiguration.fproj/SystemConfiguration.h
index 9cb4bc274..fab6098b0 100644
--- a/src/configd/SystemConfiguration.fproj/SystemConfiguration.h
+++ b/src/configd/SystemConfiguration.fproj/SystemConfiguration.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2004, 2006, 2008-2010, 2012 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 */
 };
 
 
@@ -136,12 +138,15 @@ enum {
 #include 
 #include 
 
+CF_IMPLICIT_BRIDGING_ENABLED
+CF_ASSUME_NONNULL_BEGIN
+
 /*!
 	@const kCFErrorDomainSystemConfiguration
 	@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
 
@@ -151,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
@@ -159,17 +164,21 @@ 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
 	@discussion Returns a pointer to the message string
-		associated with the specified status or error.
-	@param status The SCDynamicStoreStatus to be returned.
+		associated with the specified status or error
+		number.
+	@param status The status or error number.
 	@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
 
-#endif /* _SYSTEMCONFIGURATION_H */
+CF_ASSUME_NONNULL_END
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif	/* _SYSTEMCONFIGURATION_H */
diff --git a/src/configd/SystemConfiguration.fproj/SystemConfigurationInternal.h b/src/configd/SystemConfiguration.fproj/SystemConfigurationInternal.h
new file mode 100644
index 000000000..a961d6474
--- /dev/null
+++ b/src/configd/SystemConfiguration.fproj/SystemConfigurationInternal.h
@@ -0,0 +1,50 @@
+/*
+ * 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"
+
+#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/src/configd/SystemConfiguration.fproj/VLANConfiguration.c b/src/configd/SystemConfiguration.fproj/VLANConfiguration.c
index badc2c7d8..e505e579b 100644
--- a/src/configd/SystemConfiguration.fproj/VLANConfiguration.c
+++ b/src/configd/SystemConfiguration.fproj/VLANConfiguration.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2003-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-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@
  */
 
@@ -35,11 +35,8 @@
 #include 
 #include 
 
-#include 
 #include "SCNetworkConfigurationInternal.h"
 #include "SCPreferencesInternal.h"
-#include 
-#include 
 
 #include 
 #include 
@@ -64,7 +61,7 @@ inet_dgram_socket()
 
 	s = socket(AF_INET, SOCK_DGRAM, 0);
 	if (s == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("socket() failed: %s"), strerror(errno));
+		SC_log(LOG_ERR, "socket() failed: %s", strerror(errno));
 	}
 
 	return s;
@@ -221,12 +218,10 @@ SCVLANInterfaceCopyAll(SCPreferencesRef prefs)
 	CFDictionaryRef		dict;
 	SCPreferencesRef	ni_prefs;
 	CFStringRef		path;
-	
-	if ((prefs == NULL) ||
-	    (__SCPreferencesUsingDefaultPrefs(prefs) == TRUE)) {
+
+	if (__SCPreferencesUsingDefaultPrefs(prefs)) {
 		ni_prefs = NULL;
-	}
-	else {
+	} else {
 		ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs);
 	}
 	context.vlans = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
@@ -284,7 +279,9 @@ CFArrayRef
 SCVLANInterfaceCopyAvailablePhysicalInterfaces()
 {
 	CFMutableArrayRef	available;
+#if	!TARGET_OS_IPHONE
 	CFArrayRef		bond_interfaces		= NULL;
+#endif	// !TARGET_OS_IPHONE
 	CFArrayRef		bridge_interfaces	= NULL;
 	CFMutableSetRef		excluded		= NULL;
 	CFArrayRef		interfaces;
@@ -314,17 +311,19 @@ SCVLANInterfaceCopyAvailablePhysicalInterfaces()
 	}
 
 	// add real interfaces that aren't part of a bond or bridge
-	interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface();
+	interfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(FALSE);
 	if (interfaces != NULL) {
 		addAvailableInterfaces(available, interfaces, excluded);
 		CFRelease(interfaces);
 	}
 
+#if	!TARGET_OS_IPHONE
 	// add bond interfaces
 	if (bond_interfaces != NULL) {
 		addAvailableInterfaces(available, bond_interfaces, NULL);
 		CFRelease(bond_interfaces);
 	}
+#endif	// !TARGET_OS_IPHONE
 
 	// add bridge interfaces
 	if (bridge_interfaces != NULL) {
@@ -349,7 +348,7 @@ _SCVLANInterfaceCopyActive(void)
 	CFMutableArrayRef	vlans	= NULL;
 
 	if (getifaddrs(&ifap) == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("getifaddrs() failed: %s"), strerror(errno));
+		SC_log(LOG_NOTICE, "getifaddrs() failed: %s", strerror(errno));
 		_SCErrorSet(kSCStatusFailed);
 		return NULL;
 	}
@@ -381,13 +380,13 @@ _SCVLANInterfaceCopyActive(void)
 			continue;
 		}
 
-		bzero(&ifr, sizeof(ifr));
-		bzero(&vreq, sizeof(vreq));
+		memset(&ifr, 0, sizeof(ifr));
+		memset(&vreq, 0, sizeof(vreq));
 		strlcpy(ifr.ifr_name, ifp->ifa_name, sizeof(ifr.ifr_name));
 		ifr.ifr_data = (caddr_t)&vreq;
 
 		if (ioctl(s, SIOCGIFVLAN, (caddr_t)&ifr) == -1) {
-			SCLog(TRUE, LOG_ERR, CFSTR("ioctl(SIOCGIFVLAN) failed: %s"), strerror(errno));
+			SC_log(LOG_NOTICE, "ioctl(SIOCGIFVLAN) failed: %s", strerror(errno));
 			CFRelease(vlans);
 			vlans = NULL;
 			_SCErrorSet(kSCStatusFailed);
@@ -443,7 +442,7 @@ SCVLANInterfaceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef physical, CF
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return NULL;
 	}
-	
+
 	if (!isA_SCNetworkInterface(physical)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return NULL;
@@ -451,10 +450,9 @@ SCVLANInterfaceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef physical, CF
 
 	interfacePrivate = (SCNetworkInterfacePrivateRef)physical;
 	if (!interfacePrivate->supportsVLAN) {
-		if (__SCPreferencesUsingDefaultPrefs(prefs) == FALSE) {
+		if (!__SCPreferencesUsingDefaultPrefs(prefs)) {
 			interfacePrivate->supportsVLAN = TRUE;
-		}
-		else {
+		} else {
 			_SCErrorSet(kSCStatusInvalidArgument);
 			return NULL;
 		}
@@ -616,7 +614,7 @@ SCVLANInterfaceSetPhysicalInterfaceAndTag(SCVLANInterfaceRef vlan, SCNetworkInte
 	SCNetworkInterfacePrivateRef	interfacePrivate;
 	Boolean				ok			= TRUE;
 	SCPreferencesRef		prefs;
-	
+
 	if (!isA_SCVLANInterface(vlan)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
@@ -629,12 +627,11 @@ SCVLANInterfaceSetPhysicalInterfaceAndTag(SCVLANInterfaceRef vlan, SCNetworkInte
 
 	interfacePrivate = (SCNetworkInterfacePrivateRef)physical;
 	prefs = interfacePrivate->prefs;
-	
+
 	if (!interfacePrivate->supportsVLAN) {
-		if (__SCPreferencesUsingDefaultPrefs(prefs) == FALSE) {
+		if (!__SCPreferencesUsingDefaultPrefs(prefs)) {
 			interfacePrivate->supportsVLAN = TRUE;
-		}
-		else {
+		} else {
 			_SCErrorSet(kSCStatusInvalidArgument);
 			return FALSE;
 		}
@@ -860,8 +857,8 @@ __vlan_set(int s, CFStringRef interface_if, CFStringRef physical_if, CFNumberRef
 	int		tag_val;
 	struct vlanreq	vreq;
 
-	bzero(&ifr, sizeof(ifr));
-	bzero(&vreq, sizeof(vreq));
+	memset(&ifr, 0, sizeof(ifr));
+	memset(&vreq, 0, sizeof(vreq));
 
 	// interface
 	(void) _SC_cfstring_to_cstring(interface_if,
@@ -882,7 +879,7 @@ __vlan_set(int s, CFStringRef interface_if, CFStringRef physical_if, CFNumberRef
 
 	// update physical interface and tag
 	if (ioctl(s, SIOCSIFVLAN, (caddr_t)&ifr) == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("ioctl(SIOCSIFVLAN) failed: %s"), strerror(errno));
+		SC_log(LOG_NOTICE, "ioctl(SIOCSIFVLAN) failed: %s", strerror(errno));
 		_SCErrorSet(kSCStatusFailed);
 		return FALSE;
 	}
@@ -897,8 +894,8 @@ __vlan_clear(int s, CFStringRef interface_if)
 	struct ifreq	ifr;
 	struct vlanreq	vreq;
 
-	bzero(&ifr, sizeof(ifr));
-	bzero(&vreq, sizeof(vreq));
+	memset(&ifr, 0, sizeof(ifr));
+	memset(&vreq, 0, sizeof(vreq));
 
 	// interface
 	(void) _SC_cfstring_to_cstring(interface_if,
@@ -908,14 +905,14 @@ __vlan_clear(int s, CFStringRef interface_if)
 	ifr.ifr_data = (caddr_t)&vreq;
 
 	// clear physical interface
-	bzero(&vreq.vlr_parent, sizeof(vreq.vlr_parent));
+	memset(&vreq.vlr_parent, 0, sizeof(vreq.vlr_parent));
 
 	// clear tag
 	vreq.vlr_tag = 0;
 
 	// update physical interface and tag
 	if (ioctl(s, SIOCSIFVLAN, (caddr_t)&ifr) == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("ioctl(SIOCSIFVLAN) failed: %s"), strerror(errno));
+		SC_log(LOG_NOTICE, "ioctl(SIOCSIFVLAN) failed: %s", strerror(errno));
 		_SCErrorSet(kSCStatusFailed);
 		return FALSE;
 	}
diff --git a/src/configd/SystemConfiguration.fproj/VPNAppLayer.c b/src/configd/SystemConfiguration.fproj/VPNAppLayer.c
index b6763c59f..90e32e10f 100644
--- a/src/configd/SystemConfiguration.fproj/VPNAppLayer.c
+++ b/src/configd/SystemConfiguration.fproj/VPNAppLayer.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Apple Inc.
+ * Copyright (c) 2012-2018 Apple Inc.
  * All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNAppLayerPrivate.h b/src/configd/SystemConfiguration.fproj/VPNAppLayerPrivate.h
index b6763c59f..b8ad741ec 100644
--- a/src/configd/SystemConfiguration.fproj/VPNAppLayerPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/VPNAppLayerPrivate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Apple Inc.
+ * Copyright (c) 2012-2015, 2018 Apple Inc.
  * All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNConfiguration.c b/src/configd/SystemConfiguration.fproj/VPNConfiguration.c
index 834c983a3..f5cfcb93a 100644
--- a/src/configd/SystemConfiguration.fproj/VPNConfiguration.c
+++ b/src/configd/SystemConfiguration.fproj/VPNConfiguration.c
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2009-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2009-2018 Apple Inc. All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNConfiguration.h b/src/configd/SystemConfiguration.fproj/VPNConfiguration.h
index 31255b2a4..b86cebd1c 100644
--- a/src/configd/SystemConfiguration.fproj/VPNConfiguration.h
+++ b/src/configd/SystemConfiguration.fproj/VPNConfiguration.h
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2009-2011, 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2009-2011, 2013-2015, 2017, 2018 Apple Inc. All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNFlow.c b/src/configd/SystemConfiguration.fproj/VPNFlow.c
index ea516fb38..8033ce0ab 100644
--- a/src/configd/SystemConfiguration.fproj/VPNFlow.c
+++ b/src/configd/SystemConfiguration.fproj/VPNFlow.c
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2012-2015 Apple Inc. All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNFlow.h b/src/configd/SystemConfiguration.fproj/VPNFlow.h
index d286c3dbf..116481069 100644
--- a/src/configd/SystemConfiguration.fproj/VPNFlow.h
+++ b/src/configd/SystemConfiguration.fproj/VPNFlow.h
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2012-2015, 2017, 2018 Apple Inc. All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNFlowPrivate.h b/src/configd/SystemConfiguration.fproj/VPNFlowPrivate.h
deleted file mode 100644
index ea516fb38..000000000
--- a/src/configd/SystemConfiguration.fproj/VPNFlowPrivate.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- * Copyright (c) 2012-2014 Apple Inc. All rights reserved.
- */
-
diff --git a/src/configd/SystemConfiguration.fproj/VPNPrivate.c b/src/configd/SystemConfiguration.fproj/VPNPrivate.c
index bb973ec65..0bd84d506 100644
--- a/src/configd/SystemConfiguration.fproj/VPNPrivate.c
+++ b/src/configd/SystemConfiguration.fproj/VPNPrivate.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2009-2018 Apple Inc. All rights reserved.
  */
 
 
diff --git a/src/configd/SystemConfiguration.fproj/VPNPrivate.h b/src/configd/SystemConfiguration.fproj/VPNPrivate.h
index b22496f66..7803a4a8a 100644
--- a/src/configd/SystemConfiguration.fproj/VPNPrivate.h
+++ b/src/configd/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/src/configd/SystemConfiguration.fproj/VPNService.c b/src/configd/SystemConfiguration.fproj/VPNService.c
index d5091c97d..b4dd2f0cd 100644
--- a/src/configd/SystemConfiguration.fproj/VPNService.c
+++ b/src/configd/SystemConfiguration.fproj/VPNService.c
@@ -1,9 +1,8 @@
 /*
- * Copyright (c) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2012, 2013, 2016, 2017 Apple Inc. All rights reserved.
  */
 
-#include 
-#include 
+#include "SCNetworkConfigurationInternal.h"
 #include "dy_framework.h"
 
 static CFStringRef g_apple_app_prefix = CFSTR("com.apple.");
@@ -39,7 +38,7 @@ static CFArrayRef
 copy_matching_services(SCPreferencesRef prefs, CFStringRef identifierDomain, CFStringRef identifier)
 {
 	CFMutableArrayRef	results		= NULL;
-	CFArrayRef			services;
+	CFArrayRef		services;
 
 	services = SCNetworkServiceCopyAll(prefs);
 	if (services != NULL) {
@@ -47,8 +46,8 @@ copy_matching_services(SCPreferencesRef prefs, CFStringRef identifierDomain, CFS
 		CFIndex	service_count = CFArrayGetCount(services);
 
 		for (idx = 0; idx < service_count; idx++) {
-			SCNetworkServiceRef		service = CFArrayGetValueAtIndex(services, idx);
-			Boolean					matches	= FALSE;
+			SCNetworkServiceRef	service = CFArrayGetValueAtIndex(services, idx);
+			Boolean			matches	= FALSE;
 
 			if (isA_VPNService(service)) {
 				if (isA_CFString(identifierDomain) && isA_CFString(identifier)) {
@@ -135,7 +134,7 @@ validate_app_rule(CFDictionaryRef ruleSettings, Boolean check_for_apple_apps)
 
 				if (check_for_apple_apps && CFStringHasPrefix(signingID, g_apple_app_prefix)) {
 					for (exception_idx = 0;
-					     exception_idx < sizeof(g_apple_app_exceptions) / sizeof(g_apple_app_exceptions[0]);
+					     exception_idx < (CFIndex)(sizeof(g_apple_app_exceptions) / sizeof(g_apple_app_exceptions[0]));
 					     exception_idx++)
 					{
 						if (CFStringCompare(signingID, g_apple_app_exceptions[exception_idx].signing_id, 0) == 0) {
@@ -263,16 +262,22 @@ VPNServiceCopyAll(SCPreferencesRef prefs)
 CFArrayRef
 VPNServiceCopyAppRuleIDs(VPNServiceRef service)
 {
-	CFMutableArrayRef		results		= NULL;
-	CFDictionaryRef			vpn_config;
+	SCNetworkInterfaceRef	interface;
+	CFMutableArrayRef	results		= NULL;
+	CFDictionaryRef		vpn_config;
 
 	if (!isA_VPNService(service)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return NULL;
 	}
 
-	vpn_config = SCNetworkInterfaceGetConfiguration(SCNetworkServiceGetInterface(service));
+	interface = SCNetworkServiceGetInterface(service);
+	if (interface == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return NULL;
+	}
 
+	vpn_config = SCNetworkInterfaceGetConfiguration(interface);
 	if (isA_CFDictionary(vpn_config)) {
 		CFArrayRef	app_rules = CFDictionaryGetValue(vpn_config, kSCPropNetVPNAppRules);
 		if (isA_CFArray(app_rules)) {
@@ -306,15 +311,16 @@ VPNServiceCopyAppRuleIDs(VPNServiceRef service)
 Boolean
 VPNServiceSetAppRule(VPNServiceRef service, CFStringRef ruleIdentifier, CFDictionaryRef ruleSettings)
 {
-	CFArrayRef				accounts;
-	CFArrayRef				app_rules;
-	CFArrayRef				executables;
-	CFIndex					existing_idx		= -1;
-	CFArrayRef				match_domains;
-	CFMutableArrayRef		new_app_rules;
+	CFArrayRef		accounts;
+	CFArrayRef		app_rules;
+	CFArrayRef		executables;
+	CFIndex			existing_idx	= -1;
+	SCNetworkInterfaceRef	interface;
+	CFArrayRef		match_domains;
+	CFMutableArrayRef	new_app_rules;
 	CFMutableDictionaryRef	new_settings;
 	CFMutableDictionaryRef	new_vpn_config;
-	CFDictionaryRef			vpn_config;
+	CFDictionaryRef		vpn_config;
 
 	/* Basic parameter validation */
 
@@ -328,21 +334,27 @@ VPNServiceSetAppRule(VPNServiceRef service, CFStringRef ruleIdentifier, CFDictio
 		return FALSE;
 	}
 
+	interface = SCNetworkServiceGetInterface(service);
+	if (interface == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
 	executables = CFDictionaryGetValue(ruleSettings, kSCValNetVPNAppRuleExecutableMatch);
 	match_domains = CFDictionaryGetValue(ruleSettings, kSCValNetVPNAppRuleDNSDomainMatch);
 	accounts = CFDictionaryGetValue(ruleSettings, kSCValNetVPNAppRuleAccountIdentifierMatch);
 
 	/* Set the new rule config, replacing any existing rule */
 
-	vpn_config = SCNetworkInterfaceGetConfiguration(SCNetworkServiceGetInterface(service));
+	vpn_config = SCNetworkInterfaceGetConfiguration(interface);
 	if (isA_CFDictionary(vpn_config)) {
 		existing_idx = find_app_rule(vpn_config, ruleIdentifier);
 		new_vpn_config = CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, vpn_config);
 	} else {
 		new_vpn_config = CFDictionaryCreateMutable(kCFAllocatorDefault,
-												   0,
-												   &kCFTypeDictionaryKeyCallBacks,
-												   &kCFTypeDictionaryValueCallBacks);
+							   0,
+							   &kCFTypeDictionaryKeyCallBacks,
+							   &kCFTypeDictionaryValueCallBacks);
 	}
 
 	app_rules = CFDictionaryGetValue(new_vpn_config, kSCPropNetVPNAppRules);
@@ -350,14 +362,14 @@ VPNServiceSetAppRule(VPNServiceRef service, CFStringRef ruleIdentifier, CFDictio
 		new_app_rules = CFArrayCreateMutableCopy(kCFAllocatorDefault, 0, app_rules);
 	} else {
 		new_app_rules = CFArrayCreateMutable(kCFAllocatorDefault,
-										     0,
-										     &kCFTypeArrayCallBacks);
+						     0,
+						     &kCFTypeArrayCallBacks);
 	}
 
 	new_settings = CFDictionaryCreateMutable(kCFAllocatorDefault,
-											 0,
-											 &kCFTypeDictionaryKeyCallBacks,
-											 &kCFTypeDictionaryValueCallBacks);
+						 0,
+						 &kCFTypeDictionaryKeyCallBacks,
+						 &kCFTypeDictionaryValueCallBacks);
 
 	CFDictionarySetValue(new_settings, kSCValNetVPNAppRuleIdentifier, ruleIdentifier);
 	if (executables != NULL && CFArrayGetCount(executables) > 0) {
@@ -378,7 +390,7 @@ VPNServiceSetAppRule(VPNServiceRef service, CFStringRef ruleIdentifier, CFDictio
 
 	CFDictionarySetValue(new_vpn_config, kSCPropNetVPNAppRules, new_app_rules);
 
-	SCNetworkInterfaceSetConfiguration(SCNetworkServiceGetInterface(service), new_vpn_config);
+	SCNetworkInterfaceSetConfiguration(interface, new_vpn_config);
 
 	CFRelease(new_vpn_config);
 	CFRelease(new_app_rules);
@@ -391,14 +403,21 @@ VPNServiceSetAppRule(VPNServiceRef service, CFStringRef ruleIdentifier, CFDictio
 CFDictionaryRef
 VPNServiceCopyAppRule(VPNServiceRef service, CFStringRef ruleIdentifier)
 {
-	CFDictionaryRef	vpn_config;
+	SCNetworkInterfaceRef	interface;
+	CFDictionaryRef		vpn_config;
 
 	if (!isA_VPNService(service) || !isA_CFString(ruleIdentifier)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return NULL;
 	}
 
-	vpn_config = SCNetworkInterfaceGetConfiguration(SCNetworkServiceGetInterface(service));
+	interface = SCNetworkServiceGetInterface(service);
+	if (interface == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
+	vpn_config = SCNetworkInterfaceGetConfiguration(interface);
 	if (isA_CFDictionary(vpn_config)) {
 		CFIndex	idx = find_app_rule(vpn_config, ruleIdentifier);
 		if (idx >= 0) {
@@ -424,14 +443,21 @@ VPNServiceCopyAppRule(VPNServiceRef service, CFStringRef ruleIdentifier)
 Boolean
 VPNServiceRemoveAppRule(VPNServiceRef service, CFStringRef ruleIdentifier)
 {
-	CFDictionaryRef	vpn_config;
+	SCNetworkInterfaceRef	interface;
+	CFDictionaryRef		vpn_config;
 
 	if (!isA_VPNService(service) || !isA_CFString(ruleIdentifier)) {
 		_SCErrorSet(kSCStatusInvalidArgument);
 		return FALSE;
 	}
 
-	vpn_config = SCNetworkInterfaceGetConfiguration(SCNetworkServiceGetInterface(service));
+	interface = SCNetworkServiceGetInterface(service);
+	if (interface == NULL) {
+		_SCErrorSet(kSCStatusInvalidArgument);
+		return FALSE;
+	}
+
+	vpn_config = SCNetworkInterfaceGetConfiguration(interface);
 	if (isA_CFDictionary(vpn_config)) {
 		CFIndex	idx = find_app_rule(vpn_config, ruleIdentifier);
 		if (idx >= 0) {
@@ -451,7 +477,7 @@ VPNServiceRemoveAppRule(VPNServiceRef service, CFStringRef ruleIdentifier)
 					CFDictionaryRemoveValue(new_vpn_config, kSCPropNetVPNAppRules);
 				}
 
-				SCNetworkInterfaceSetConfiguration(SCNetworkServiceGetInterface(service), new_vpn_config);
+				SCNetworkInterfaceSetConfiguration(interface, new_vpn_config);
 
 				CFRelease(new_vpn_config);
 				CFRelease(new_app_rules);
diff --git a/src/configd/SystemConfiguration.fproj/VPNTunnel.h b/src/configd/SystemConfiguration.fproj/VPNTunnel.h
index 58acb5556..ceb63ff40 100644
--- a/src/configd/SystemConfiguration.fproj/VPNTunnel.h
+++ b/src/configd/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/src/configd/SystemConfiguration.fproj/VPNTunnelPrivate.h b/src/configd/SystemConfiguration.fproj/VPNTunnelPrivate.h
index 58acb5556..9e9a69345 100644
--- a/src/configd/SystemConfiguration.fproj/VPNTunnelPrivate.h
+++ b/src/configd/SystemConfiguration.fproj/VPNTunnelPrivate.h
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2009-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2009-2013, 2015, 2018 Apple Inc. All rights reserved.
  */
 
diff --git a/src/configd/SystemConfiguration.fproj/com.apple.SystemConfiguration.plist b/src/configd/SystemConfiguration.fproj/com.apple.SystemConfiguration.plist
new file mode 100644
index 000000000..7ba694551
--- /dev/null
+++ b/src/configd/SystemConfiguration.fproj/com.apple.SystemConfiguration.plist
@@ -0,0 +1,148 @@
+
+
+
+
+	DEFAULT-OPTIONS
+	
+		Default-Privacy-Setting
+		Public
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SCDynamicStore
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SCNetworkConfiguration
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SCNetworkConnection
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SCNetworkReachability
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SCPreferences
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	InterfaceNamer
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	IPMonitor
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	KernelEventMonitor
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	LinkConfiguration
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	PreferencesMonitor
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	QoSMarking
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SimulatorSupport
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+	SCMonitor
+	
+		Level
+		
+			Enable
+			Inherit
+			Persist
+			Inherit
+		
+	
+
+
diff --git a/src/configd/SystemConfiguration.fproj/config.defs b/src/configd/SystemConfiguration.fproj/config.defs
index a6665c3f1..4d0c29439 100644
--- a/src/configd/SystemConfiguration.fproj/config.defs
+++ b/src/configd/SystemConfiguration.fproj/config.defs
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2003-2005, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2003-2005, 2011, 2012, 2015, 2018-2019 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@
  */
 
@@ -36,6 +36,7 @@
 
 subsystem config 20000;
 serverprefix _;
+UseSpecialReplyPort 1;
 
 import "config_types.h";
 
@@ -60,6 +61,21 @@ type task_move_send_t = MACH_MSG_TYPE_MOVE_SEND
 */
 
 
+/*
+ * CAUTION CAUTION CAUTION CAUTION CAUTION CAUTION
+ *
+ * Be very careful when adding, removing, or changing any
+ * of the MiG routes below.  Everything tends to work fine
+ * when the SCDynamicStore client code (in the framework)
+ * and SCDynamicStore server code (in configd) are in sync.
+ * But, when the two are NOT in sync as is often the
+ * case when running the iOS Simulator, the conflict can
+ * be problematic.
+ *
+ * CAUTION CAUTION CAUTION CAUTION CAUTION CAUTION
+ */
+
+
 /*
  * Connection management API's
  */
@@ -94,14 +110,14 @@ routine configlist	(	server		: mach_port_t;
 routine configadd	(	server		: mach_port_t;
 				key		: xmlData;
 				data		: xmlData;
-			 out	newInstance	: int;
+			 out	newInstance	: int;		// no longer used
 			 out	status		: int;
 	    ServerAuditToken	audit_token	: audit_token_t);
 
 routine configget	(	server		: mach_port_t;
 				key		: xmlData;
 			 out	data		: xmlDataOut, dealloc;
-			 out	newInstance	: int;
+			 out	newInstance	: int;		// no longer used
 			 out	status		: int;
 	    ServerAuditToken	audit_token	: audit_token_t);
 
@@ -109,7 +125,7 @@ routine configset	(	server		: mach_port_t;
 				key		: xmlData;
 				data		: xmlData;
 				instance	: int;
-			 out	newInstance	: int;
+			 out	newInstance	: int;		// no longer used
 			 out	status		: int;
 	    ServerAuditToken	audit_token	: audit_token_t);
 
@@ -123,7 +139,7 @@ routine configremove	(	server		: mach_port_t;
 routine configadd_s	(	server		: mach_port_t;
 				key		: xmlData;
 				data		: xmlData;
-			 out	newInstance	: int;
+			 out	newInstance	: int;		// no longer used
 			 out	status		: int);
 
 routine confignotify	(	server		: mach_port_t;
@@ -165,18 +181,12 @@ routine notifychanges	(	server		: mach_port_t;
 
 routine notifyviaport	(	server		: mach_port_t;
 				port		: mach_port_move_send_t;
-				msgid           : mach_msg_id_t;
+				msgid           : mach_msg_id_t;	/* must be zero */
 			 out	status		: int);
 
-routine notifyviafd	(	server		: mach_port_t;
-				path		: xmlData;
-				identifier	: int;
-			 out	status		: int);
+	skip;	/* was notifyviafd (passing UNIX domain socket filename) */
 
-routine notifyviasignal	(	server		: mach_port_t;
-				task		: task_t /*task_move_send_t*/;
-				sig		: int;
-			 out	status		: int);
+	skip;	/* was notifyviasignal */
 
 routine notifycancel	(	server		: mach_port_t;
 			 out	status		: int);
@@ -186,7 +196,11 @@ routine notifyset	(	server		: mach_port_t;
 				patterns	: xmlData;
 			 out	status		: int);
 
-	skip;	/* reserved for future use */
+routine notifyviafd	(	server		: mach_port_t;
+				fileport	: mach_port_move_send_t;
+				identifier	: int;
+			 out	status		: int);
+
 	skip;	/* reserved for future use */
 	skip;	/* reserved for future use */
 
diff --git a/src/configd/SystemConfiguration.fproj/config_types.h b/src/configd/SystemConfiguration.fproj/config_types.h
index fb930198d..22a705332 100644
--- a/src/configd/SystemConfiguration.fproj/config_types.h
+++ b/src/configd/SystemConfiguration.fproj/config_types.h
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000, 2001, 2003, 2005, 2007, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000, 2001, 2003, 2005, 2007, 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,12 +41,12 @@
 /*
  * Mach server port name
  */
-#if	!TARGET_IPHONE_SIMULATOR
+#if	!TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC
 #define SCD_SERVER	"com.apple.SystemConfiguration.configd"
-#else	// !TARGET_IPHONE_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_IPHONE_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/src/configd/SystemConfiguration.fproj/dy_framework.c b/src/configd/SystemConfiguration.fproj/dy_framework.c
index 8af8be9e6..ba030bc4f 100644
--- a/src/configd/SystemConfiguration.fproj/dy_framework.c
+++ b/src/configd/SystemConfiguration.fproj/dy_framework.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002-2008, 2010-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2008, 2010-2015, 2017 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  *
@@ -33,31 +33,60 @@
 #include 
 #include 
 #include 
+#include 
 
+#include 
 #include "dy_framework.h"
 
 
-#pragma mark -
-#pragma mark IOKit.framework APIs
+void *
+_SC_dlopen(const char *framework)
+{
+	void			*image;
+	static dispatch_once_t	once;
+	static const char	*suffix	= NULL;
 
-static void *
-__loadIOKit(void) {
-	static void *image = NULL;
-	if (NULL == image) {
-		const char	*framework		= "/System/Library/Frameworks/IOKit.framework/IOKit";
+	dispatch_once(&once, ^{
+		if (!dyld_process_is_restricted()) {
+			suffix = getenv("DYLD_IMAGE_SUFFIX");
+			if ((suffix != NULL) &&
+			    ((strlen(suffix) < 2) || (suffix[0] != '_'))) {
+				// if too short or no leading "_"
+				suffix = NULL;
+			}
+		}
+	});
+
+	if (suffix != NULL) {
 		struct stat	statbuf;
-		const char	*suffix			= getenv("DYLD_IMAGE_SUFFIX");
 		char		path[MAXPATHLEN];
 
 		strlcpy(path, framework, sizeof(path));
-		if (suffix) strlcat(path, suffix, sizeof(path));
+		strlcat(path, suffix, sizeof(path));
 		if (0 <= stat(path, &statbuf)) {
 			image = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
-		} else {
-			image = dlopen(framework, RTLD_LAZY | RTLD_LOCAL);
+			return image;
 		}
 	}
-	return (void *)image;
+
+	image = dlopen(framework, RTLD_LAZY | RTLD_LOCAL);
+	return image;
+}
+
+
+#pragma mark -
+#pragma mark IOKit.framework APIs
+
+static void *
+__loadIOKit(void) {
+	static void		*image	= NULL;
+	static dispatch_once_t	once;
+
+	dispatch_once(&once, ^{
+		image = _SC_dlopen("/System/Library/Frameworks/IOKit.framework/IOKit");
+	});
+
+	return image;
 }
 
 
@@ -384,27 +413,19 @@ _IOServiceMatching(const char *name)
 
 static void *
 __loadSecurity(void) {
-	static void *image = NULL;
-	if (NULL == image) {
-		const char	*framework		= "/System/Library/Frameworks/Security.framework/Security";
-		struct stat	statbuf;
-		const char	*suffix			= getenv("DYLD_IMAGE_SUFFIX");
-		char		path[MAXPATHLEN];
+	static void		*image	= NULL;
+	static dispatch_once_t	once;
 
-		strlcpy(path, framework, sizeof(path));
-		if (suffix) strlcat(path, suffix, sizeof(path));
-		if (0 <= stat(path, &statbuf)) {
-			image = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
-		} else {
-			image = dlopen(framework, RTLD_LAZY | RTLD_LOCAL);
-		}
-	}
-	return (void *)image;
+	dispatch_once(&once, ^{
+		image = _SC_dlopen("/System/Library/Frameworks/Security.framework/Security");
+	});
+
+	return image;
 }
 
 #define	SECURITY_FRAMEWORK_EXTERN(t, s)				\
 	__private_extern__ t					\
-	_ ## s()						\
+	_ ## s(void)						\
 	{							\
 		static t	*dysym = NULL;			\
 		if (!dysym) {					\
@@ -631,4 +652,3 @@ _SecCertificateCreateWithData(CFAllocatorRef allocator, CFDataRef data)
 
 
 
-
diff --git a/src/configd/SystemConfiguration.fproj/dy_framework.h b/src/configd/SystemConfiguration.fproj/dy_framework.h
index c37e1ca1c..6bbf287cb 100644
--- a/src/configd/SystemConfiguration.fproj/dy_framework.h
+++ b/src/configd/SystemConfiguration.fproj/dy_framework.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002-2008, 2010-2014 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
@@ -404,7 +404,6 @@ _SecCertificateCreateWithData		(
 
 
 
-
 __END_DECLS
 
 #endif	// _DY_FRAMEWORK_H
diff --git a/src/configd/SystemConfiguration.fproj/en.lproj/Localizable.strings b/src/configd/SystemConfiguration.fproj/en.lproj/Localizable.strings
new file mode 100644
index 0000000000000000000000000000000000000000..f930b18cb482aff42fe8234b21246eb50a41a981
GIT binary patch
literal 3482
zcmezWkBdQ{L5qQlL4iSwL4m=KA(f$op`0O~p@<=yL4iSup%^Tp#Gt^S!H~m{&ydWJ
z$WX$N$&k;G$Dqlez);Lk!cfGJ$&km8&QJ_BN1uUpP`%)Ql8Dbd}
z7`z!$87di)88R3W!7fl>NMT52C}v0oyQl!}&SC}yhBUCB6c_@)5aM5mJG~iP86p{+
z89W#q89W*M7~&bc!L$oQJXmc2n090cW(Z~oXYgkTVsJrnJH$MYxrq$L48_o}OQE3;
zJQ)HQf*Dd7l2Jk%pD!RfTp66fu>kUC5Q8fN$bXk(g8{t84UCcUke5U1|tSN21AAjXb3AX
zfFOF_a0cgrJaA0Fas()sxH6P5WH6*M6fuD0N*FXrHU*M8L3S!IAiD-L6d)>brDISI
z3}yhuFDO()7(5yL!RgzT!I2?=!Jom0As(F4Ll|5cg1~vz86{s5>tj_02L??%>4C62
z5M==|c0x)A{3#FNM}*nw@GT1%_mB4l8EJXMl)9`~j(jvcV;i9yn)${0Q;`$VKH03gEf`
zWNr}y!X+^OL2?YlEg-+9fI|f2f<%TiuxmiR_F?d6a0ZubkWvygQEQ1_g#3
zaCroZ<9u)m!0sMceucOMmTN&_11dW}DH(Tu^@X-MLA4&PJR8hFO0Ff=L|l0nRI3rr
zx1e|^2bZ9r(hStjrfuFO)>i|YgNqr+&%?y}5SEi6Z7vXrnVUg93rM`Afa^#|Sz8P(
jJwQDk)bayVXP~yMKxxjC!JWYm+>1c&0U?)3kP-p_AIu+P

literal 0
HcmV?d00001

diff --git a/src/configd/SystemConfiguration.fproj/English.lproj/NetworkInterface.strings b/src/configd/SystemConfiguration.fproj/en.lproj/NetworkInterface.strings
similarity index 98%
rename from src/configd/SystemConfiguration.fproj/English.lproj/NetworkInterface.strings
rename to src/configd/SystemConfiguration.fproj/en.lproj/NetworkInterface.strings
index aba71b56672fc53e7aabd2d775de7a1abe1f3404..dd0b14bef0fc9f3312aca03bdd6ff65f0b586418 100644
GIT binary patch
delta 84
zcmaE7^vZa{8Zlud21kYhh608hhExUxhERrJ2B*o5jG~isn7QOr8HyN`7!(+6859`s
PsAEoLDB8SO>@*VqL{JkG

delta 12
TcmaE5{LW~@8nMk9;)j?3DCGra

diff --git a/src/configd/SystemConfiguration.fproj/genSCPreferences.c b/src/configd/SystemConfiguration.fproj/genSCPreferences.c
index 7689c0ee4..07ba69359 100644
--- a/src/configd/SystemConfiguration.fproj/genSCPreferences.c
+++ b/src/configd/SystemConfiguration.fproj/genSCPreferences.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2019 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@
  */
 
@@ -31,6 +31,9 @@
 /*
  * Modification History
  *
+ * 12 March 2015		Sushant Chavan (sushant_chavan@apple.com)
+ * - cleanup of SC_SCHEMA_DECLARATION and SC_SCHEMA_KV macros.
+ *
  * 4 March 2004			Allan Nathanson (ajn@apple.com)
  * - an alternate scheme to help facilitate access to the schema
  *   definitions for cross-compilation to earlier releases AND
@@ -59,17 +62,17 @@
 
 char copyright_string[] =
 "/*\n"
-" * Copyright (c) 2000-2014 Apple Inc. All rights reserved.\n"
+" * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n"
 " *\n"
 " * @APPLE_LICENSE_HEADER_START@\n"
-" * \n"
+" *\n"
 " * This file contains Original Code and/or Modifications of Original Code\n"
 " * as defined in and that are subject to the Apple Public Source License\n"
 " * Version 2.0 (the 'License'). You may not use this file except in\n"
 " * compliance with the License. Please obtain a copy of the License at\n"
 " * http://www.opensource.apple.com/apsl/ and read it before using this\n"
 " * file.\n"
-" * \n"
+" *\n"
 " * The Original Code and all software distributed under the License are\n"
 " * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n"
 " * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n"
@@ -77,7 +80,7 @@ char copyright_string[] =
 " * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n"
 " * Please see the License for the specific language governing rights and\n"
 " * limitations under the License.\n"
-" * \n"
+" *\n"
 " * @APPLE_LICENSE_HEADER_END@\n"
 " */\n";
 
@@ -88,18 +91,20 @@ 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_1_10_5,	// deprecated in 10.5
 	SC_10_5,
-	SC_10_5_10_7,	// deprecated in 10.7
-	SC_10_1_10_6,	// deprecated in 10.6
-	SC_10_2_10_6,	// deprecated in 10.6
+	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
+	SC_10_2_10_15,  // deprecated in 10.15
 	SC_10_3_10_9,	// deprecated in 10.9
+	SC_10_3_10_15,  // deprecated in 10.15
 	SC_10_4_10_9,	// deprecated in 10.9
 	SC_10_6_IPHONE_2_0,
 	SC_10_6_IPHONE_3_0,
@@ -107,6 +112,8 @@ typedef enum {
 	COMMENT_PRIVATE,
 	GROUP_PRIVATE,
 	SC_10_5_PRIVATE,
+	SC_10_2_10_12_IPHONE_2_0_10_0,  // deprecated in OSX 10.12, iOS 10.0
+	SC_10_3_10_12_IPHONE_2_0_10_0,	// deprecated in OSX 10.12, iOS 10.0
 	SC_10_6_IPHONE_2_0_PRIVATE,
 	SC_10_6_IPHONE_3_0_PRIVATE,
 	SC_10_7_IPHONE_4_0_PRIVATE,
@@ -116,9 +123,20 @@ typedef enum {
 	SC_10_9_IPHONE_7_0_PRIVATE,
 	SC_10_10_IPHONE_7_0_PRIVATE,
 	SC_10_10_IPHONE_8_0_PRIVATE,
+	SC_10_11_IPHONE_9_0_PRIVATE,
+	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_10_15_IPHONE_13_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,
+	GROUP_DEPRECATED_NO_HEADER,
+	DEPRECATED_NO_HEADER,
 	END
 } controlType;
 
@@ -156,8 +174,6 @@ typedef enum {
 #define CFNUMBER_BOOL		"CFNumber (0 or 1)"
 #define CFSTRING		"CFString"
 
-#define APP			"App"
-#define ARP			"ARP"
 #define ACCESSPOINTNAME		"AccessPointName"
 #define ACCOUNT			"Account"
 #define ACSP			"ACSP"			// Apple Client Server Protocol
@@ -177,7 +193,11 @@ typedef enum {
 #define ALTERNATE		"Alternate"
 #define ALWAYS			"Always"
 #define ANYREGEX		"AnyRegex"
+#define APP			"App"
+#define APPLE			"Apple"
 #define APPLETALK		"AppleTalk"
+#define ARP			"ARP"
+#define AUDIOVIDEOCALLS		"AudioVideoCalls"
 #define AUTH			"Auth"
 #define AUTHENTICATIONMETHOD	"AuthenticationMethod"
 #define AUTOCONFIG		"AutoConfig"
@@ -186,26 +206,31 @@ typedef enum {
 #define AV			"AV"
 #define BEFORE			"Before"
 #define BINDINGMETHODS		"BindingMethods"
-#define	BOND			"Bond"
+#define BOND			"Bond"
 #define BOOTP			"BOOTP"
-#define	BRIDGE			"Bridge"
+#define BRIDGE			"Bridge"
 #define BROADCAST		"Broadcast"
 #define BYPASS			"Bypass"
 #define CALLWAITINGAUDIBLEALERT	"CallWaitingAudibleAlert"
-#define CAPABILITY		"Capability"
 #define CAPABILITIES		"Capabilities"
+#define CAPABILITY		"Capability"
 #define CAUSE			"Cause"
 #define CCP			"CCP"
-#define CHAP			"CHAP"
 #define CELLULAR		"Cellular"
 #define CERTIFICATE		"Certificate"
+#define CGA			"CGA"
+#define CHAP			"CHAP"
+#define CLAT46			"CLAT46"
+#define COLLISION		"Collision"
 #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 CONFIGURATION		"Configuration"
 #define CONFIRMED		"Confirmed"
 #define CONNECT			"Connect"
 #define CONNECTDELAY		"ConnectDelay"
@@ -220,6 +245,7 @@ typedef enum {
 #define DATACOMPRESSION		"DataCompression"
 #define DEFAULT			"Default"
 #define DEFAULTZONE		"DefaultZone"
+#define DELEGATION		"Delegation"
 #define DESIGNATED		"Designated"
 #define DEST			"Dest"
 #define DESTINATION		"Destination"
@@ -230,6 +256,7 @@ typedef enum {
 #define DHCPCLIENTID		"DHCPClientID"
 #define DIALMODE		"DialMode"
 #define DIALONDEMAND		"DialOnDemand"
+#define DISABLEUNTILNEEDED	"DisableUntilNeeded"
 #define DISCONNECT		"Disconnect"
 #define DISCONNECTONANSWER	"DisconnectOnAnswer"
 #define DISCONNECTONFASTUSERSWITCH	"DisconnectOnFastUserSwitch"
@@ -240,6 +267,7 @@ typedef enum {
 #define DISCONNECTONWAKE	"DisconnectOnWake"
 #define DISCONNECTONWAKETIMER	"DisconnectOnWakeTimer"
 #define DISCONNECTTIME		"DisconnectTime"
+#define DISCOVERY		"Discovery"
 #define DISPLAYTERMINALWINDOW	"DisplayTerminalWindow"
 #define DNS			"DNS"
 #define DOMAIN 			"Domain"
@@ -262,10 +290,11 @@ typedef enum {
 #define EXCLUDESIMPLEHOSTNAMES	"ExcludeSimpleHostnames"
 #define EXECUTABLE		"Executable"
 #define EXPENSIVE		"Expensive"
+#define EXPIRED			"Expired"
 #define EXTERNAL		"External"
 #define FAILOVER		"Failover"
 #define FAILURE			"Failure"
-#define	FALLBACK		"FallBack"
+#define FALLBACK		"FallBack"
 #define FILE			"File"
 #define FIREWIRE		"FireWire"
 #define FIRST			"First"
@@ -284,24 +313,24 @@ typedef enum {
 #define HTTPS			"HTTPS"
 #define HYBRID			"Hybrid"
 #define IDENTIFIER		"Identifier"
-#define IDLEREMINDER		"IdleReminder"
-#define IDLEREMINDERTIMER	"IdleReminderTimer"
+#define IDENTIFIERS		"Identifiers"
+#define IDLE			"Idle"
 #define IFNEEDED		"IfNeeded"
 #define IGNORE			"Ignore"
 #define IGNOREDIALTONE		"IgnoreDialTone"
 #define IGNORELINKSTATUS	"IgnoreLinkStatus"
 #define INACTIVE		"Inactive"
 #define INCLUDED		"Included"
-#define	INFO			"Info"
+#define INFO			"Info"
 #define INFORM			"INFORM"
 #define INTERFACE		"Interface"
 #define INTERFACENAME		"InterfaceName"
 #define INTERFACES		"Interfaces"
 #define IP			"IP"
 #define IPCP			"IPCP"
+#define IPSEC			"IPSec"
 #define IPV4			"IPv4"
 #define IPV6			"IPv6"
-#define IPSEC			"IPSec"
 #define JAVASCRIPT		"JavaScript"
 #define JOIN			"Join"
 #define JUMBO_MTU		"JUMBO_MTU"
@@ -327,17 +356,18 @@ typedef enum {
 #define MATCH			"Match"
 #define MEDIA			"Media"
 #define MIXED			"Mixed"
-#define MODEL			"Model"
 #define MODE			"Mode"
+#define MODEL			"Model"
 #define MODEM			"Modem"
 #define MODULEID		"ModuleID"
-#define MPPE40			"MPPE40"
 #define MPPE128			"MPPE128"
+#define MPPE40			"MPPE40"
 #define MRU			"MRU"
 #define MSCHAP1			"MSCHAP1"
 #define MSCHAP2			"MSCHAP2"
 #define MTU			"MTU"
 #define NAME			"Name"
+#define NAT64			"NAT64"
 #define NETBIOS			"NetBIOS"
 #define NETINFO			"NetInfo"
 #define NETWORK			"Network"
@@ -360,17 +390,23 @@ 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 POWER			"Power"
+#define POLICY			"Policy"
 #define PORT			"Port"
+#define PORTINUSE		"PortInUse"
+#define POWER			"Power"
 #define PPP			"PPP"
 #define PPPOE			"PPPoE"
 #define PPPSERIAL		"PPPSerial"
 #define PPTP			"PPTP"
 #define PREFERRED		"Preferred"
+#define PREFIX			"Prefix"
 #define PREFIXLENGTH		"PrefixLength"
+#define PREFIXLIST		"PrefixList"
 #define PREFS			"Prefs"
 #define PRIMARYINTERFACE	"PrimaryInterface"
 #define PRIMARYRANK		"PrimaryRank"
@@ -382,17 +418,20 @@ typedef enum {
 #define PROXIES			"Proxies"
 #define PROXY			"Proxy"
 #define PULSEDIAL		"PulseDial"
+#define QOSMARKING		"QoSMarking"
 #define RANKED			"Ranked"
 #define RECEIVEACCM		"ReceiveACCM"
 #define RECENT			"Recent"
-#define REDIALCOUNT		"RedialCount"
 #define REDIAL			"Redial"
+#define REDIALCOUNT		"RedialCount"
 #define REDIALINTERVAL		"RedialInterval"
+#define REFRESH			"Refresh"
 #define REGION			"Region"
 #define RELAY			"Relay"
 #define REMINDER		"Reminder"
 #define REMINDERTIME		"ReminderTime"
 #define REMOTEADDRESS		"RemoteAddress"
+#define REQUEST			"Request"
 #define REQUESTED		"Requested"
 #define REQUIRED		"Required"
 #define REQUIREMENT		"Requirement"
@@ -401,8 +440,8 @@ typedef enum {
 #define ROOTSEPARATOR		"RootSeparator"
 #define ROUTE			"Route"
 #define ROUTER			"Router"
-#define ROUTES			"Routes"
 #define ROUTERADVERTISEMENT	"RouterAdvertisement"
+#define ROUTES			"Routes"
 #define RTSP			"RTSP"
 #define RULE			"Rule"
 #define RULES			"Rules"
@@ -418,19 +457,23 @@ typedef enum {
 #define SERVER			"Server"
 #define SERVERS			"Servers"
 #define SERVICE			"Service"
-#define SERVICES		"Services"
+#define SERVICEID		"ServiceID"
 #define SERVICEIDS		"ServiceIDs"
+#define SERVICEINDEX		"ServiceIndex"
+#define SERVICES		"Services"
 #define SESSIONTIMER		"SessionTimer"
 #define SETS			"Sets"
 #define SETUP			"Setup"
-#define	SHAREDSECRET		"SharedSecret"
+#define SHAREDSECRET		"SharedSecret"
 #define SIGNING			"Signing"
 #define SMB			"SMB"
 #define SOCKS			"SOCKS"
 #define SORTLIST		"SortList"
 #define SPEAKER			"Speaker"
+#define SPECIFIC		"Specific"
 #define SPEED			"Speed"
 #define SSID			"SSID"
+#define STARTTIME		"StartTime"
 #define STATE			"State"
 #define STATUS			"Status"
 #define STF			"6to4"
@@ -447,6 +490,7 @@ typedef enum {
 #define TAGS			"Tags"
 #define TERMINALSCRIPT		"TerminalScript"
 #define TIMEOUT			"Timeout"
+#define TIMER			"Timer"
 #define TIMESTAMP		"TimeStamp"
 #define TOKEN			"Token"
 #define TRANSMITACCM		"TransmitACCM"
@@ -459,18 +503,19 @@ typedef enum {
 #define UID			"UID"
 #define UPDATED			"Updated"
 #define URLSTRING		"URLString"
-#define USERDEFINEDNAME		"UserDefinedName"
 #define USE			"Use"
+#define USERDEFINEDNAME		"UserDefinedName"
 #define USERS			"Users"
 #define UUID			"UUID"
 #define VENDOR			"Vendor"
 #define VERBOSELOGGING		"VerboseLogging"
 #define VIRTUALNETWORKINTERFACES	"VirtualNetworkInterfaces"
-#define	VLAN			"VLAN"
+#define VLAN			"VLAN"
 #define VLAN_HWTAGGING		"VLAN_HWTAGGING"
 #define VLAN_MTU		"VLAN_MTU"
-#define	VPN			"VPN"
+#define VPN			"VPN"
 #define WAITFORDIALTONE		"WaitForDialTone"
+#define WHITELISTED		"Whitelisted"
 #define WIFI			"WiFi"
 #define WINS			"WINS"
 #define WORKGROUP		"Workgroup"
@@ -502,7 +547,9 @@ static schemaDefinition names[] = {
     { COMMENT, "", NULL, NULL, NULL },
 
   { GROUP_PRIVATE, NULL, "Generic Keys", NULL, NULL },
+    { SC_10_5_PRIVATE, NETPROP, IGNORELINKSTATUS, NULL, CFBOOLEAN },
     { SC_10_10_IPHONE_8_0_PRIVATE, PROP, CONFIRMED INTERFACENAME, NULL, CFSTRING },
+    { SC_10_11_IPHONE_9_0_PRIVATE, PROP, DISABLEUNTILNEEDED, NULL, CFNUMBER_BOOL },
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
 
 
@@ -538,7 +585,7 @@ static schemaDefinition names[] = {
 
     { SC_10_1, NETENT, AIRPORT, NULL, CFDICTIONARY },
     { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
-    { SC_10_1_10_6, NETENT, APPLETALK, NULL, CFDICTIONARY },
+    { DEPRECATED_NO_HEADER, NETENT, APPLETALK, NULL, CFDICTIONARY },
     { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
     { SC_10_1, NETENT, DHCP, NULL, CFDICTIONARY },
     { SC_10_1, NETENT, DNS, NULL, CFDICTIONARY },
@@ -552,31 +599,40 @@ static schemaDefinition names[] = {
     { SC_10_1, NETENT, LINK, NULL, CFDICTIONARY },
     { SC_10_1, NETENT, MODEM, NULL, CFDICTIONARY },
     { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
-    { SC_10_1_10_5, NETENT, NETINFO, NULL, CFDICTIONARY },
+    { DEPRECATED_NO_HEADER, NETENT, NETINFO, NULL, CFDICTIONARY },
     { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
     { SC_10_1, NETENT, PPP, NULL, CFDICTIONARY },
     { SC_10_1, NETENT, PPPOE, NULL, CFDICTIONARY },
     { SC_10_3, NETENT, PPPSERIAL, NULL, CFDICTIONARY },
-    { SC_10_3, NETENT, PPTP, NULL, CFDICTIONARY },
+    { 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 },
 
   { GROUP_PRIVATE, NETENT, "Network Entity Keys", NULL, NULL },
 
-    { SC_10_10_IPHONE_7_0_PRIVATE, NETENT, ACTIVE DURINGSLEEP REQUESTED, NULL, CFDICTIONARY},
-    { SC_10_10_IPHONE_7_0_PRIVATE, NETENT, ACTIVE DURINGSLEEP SUPPORTED, NULL, CFDICTIONARY},
     { SC_10_9_IPHONE_7_0_PRIVATE, NETENT, APP LAYER, NULL, CFDICTIONARY},
     { SC_10_5_PRIVATE, NETENT, EAPOL, NULL, CFDICTIONARY },
-    { SC_10_10_IPHONE_8_0_PRIVATE, NETENT, IPV4 ROUTER ARP FAILURE, NULL, NULL},
-    { SC_10_10_IPHONE_8_0_PRIVATE, NETENT, IPV4 ROUTER ARP ALIVE, NULL, NULL},
+    { SC_10_7_IPHONE_5_0_PRIVATE, NETENT, IDLE ROUTE, NULL, NULL},			// notification
+    { SC_10_10_IPHONE_7_0_PRIVATE, NETENT, INTERFACE ACTIVE DURINGSLEEP REQUESTED, ACTIVE DURINGSLEEP REQUESTED, CFDICTIONARY},
+    { SC_10_10_IPHONE_7_0_PRIVATE, NETENT, INTERFACE ACTIVE DURINGSLEEP SUPPORTED, ACTIVE DURINGSLEEP SUPPORTED, CFDICTIONARY},
+    { SC_10_15_IPHONE_13_0_PRIVATE, NETENT, INTERFACE DELEGATION, NULL, NULL},		// notification
+    { SC_10_6_IPHONE_2_0_PRIVATE, NETENT, IPV4 ARP COLLISION, NULL, NULL},		// notification
+    { SC_10_6_IPHONE_2_0_PRIVATE, NETENT, IPV4 PORTINUSE, PORTINUSE, NULL},		// notification
+    { SC_10_10_IPHONE_8_0_PRIVATE, NETENT, IPV4 ROUTER ARP FAILURE, NULL, NULL},	// notification
+    { SC_10_10_IPHONE_8_0_PRIVATE, NETENT, IPV4 ROUTER ARP ALIVE, NULL, NULL},		// notification
+    { SC_10_13_IPHONE_11_0_PRIVATE, NETENT, IPV6 ROUTER EXPIRED, NULL, NULL},		// notification
     { 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_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},		// notification
     { SC_10_6_IPHONE_3_0_PRIVATE, NETENT, ONDEMAND, NULL, CFDICTIONARY },
+    { SC_10_13_IPHONE_10_0_PRIVATE, NETENT, QOSMARKING POLICY, NULL, CFDICTIONARY },
+    { SC_10_5_PRIVATE, NETENT, REFRESH CONFIGURATION, NULL, NULL },			// notification
     { SC_10_6_IPHONE_2_0_PRIVATE, NETENT, SERVICE, "__SERVICE__", CFDICTIONARY },
     { SC_10_7_IPHONE_4_0_PRIVATE, NETENT, VPN, NULL, CFDICTIONARY },
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
@@ -588,11 +644,6 @@ static schemaDefinition names[] = {
     { SC_10_1, NETPROP, PPP OVERRIDEPRIMARY, NULL, CFNUMBER_BOOL },
     { COMMENT, "", NULL, NULL, NULL },
 
-  { GROUP_PRIVATE, NETPROP, KEY_PREFIX COMP NETWORK " Properties", NULL, NULL },
-
-    { SC_10_5_PRIVATE, NETPROP, IGNORELINKSTATUS, NULL, CFBOOLEAN },
-    { COMMENT_PRIVATE, "", NULL, NULL, NULL },	
-
   { GROUP, NETPROP INTERFACES, KEY_PREFIX COMP NETWORK INTERFACE " Properties", NULL, NULL },
 
     { SC_10_2, NETPROP, INTERFACES, NULL, CFARRAY_CFSTRING },
@@ -624,25 +675,25 @@ static schemaDefinition names[] = {
     { SC_10_3_10_9, NETVAL AIRPORT AUTH PASSWORD ENCRYPTION, KEYCHAIN, NULL, NULL },
     { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
 
-  { GROUP_DEPRECATED, NETPROP APPLETALK, KEY_PREFIX NETENT APPLETALK " Entity Keys", NULL, NULL },
+  { GROUP_DEPRECATED_NO_HEADER, NETPROP APPLETALK, KEY_PREFIX NETENT APPLETALK " Entity Keys", NULL, NULL },
 
     { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
-    { SC_10_1_10_6, NETPROP APPLETALK, COMPUTERNAME, NULL, CFSTRING },
-    { SC_10_1_10_6, NETPROP APPLETALK, COMPUTERNAME ENCODING, NULL, CFNUMBER },
-    { SC_10_1_10_6, NETPROP APPLETALK, CONFIGMETHOD, NULL, CFSTRING },
-    { SC_10_1_10_6, NETPROP APPLETALK, DEFAULTZONE, NULL, CFSTRING },
-    { SC_10_1_10_6, NETPROP APPLETALK, NETWORKID, NULL, CFNUMBER },
-    { SC_10_2_10_6, NETPROP APPLETALK, NETWORKRANGE, NULL, CFARRAY_CFNUMBER },
-    { SC_10_1_10_6, NETPROP APPLETALK, NODEID, NULL, CFNUMBER },
-    { SC_10_1_10_6, NETPROP APPLETALK, SEEDNETWORKRANGE, NULL, CFARRAY_CFNUMBER },
-    { SC_10_1_10_6, NETPROP APPLETALK, SEEDZONES, NULL, CFARRAY_CFSTRING },
-    { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
-    { COMMENT_DEPRECATED, "--- " KEY_PREFIX NETPROP APPLETALK CONFIGMETHOD " values ---", NULL, NULL, NULL },
-    { SC_10_1_10_6, NETVAL APPLETALK CONFIGMETHOD, NODE, NULL, NULL },
-    { SC_10_1_10_6, NETVAL APPLETALK CONFIGMETHOD, ROUTER, NULL, NULL },
-    { SC_10_1_10_6, NETVAL APPLETALK CONFIGMETHOD, SEEDROUTER, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETPROP APPLETALK, COMPUTERNAME, NULL, CFSTRING },
+//  { DEPRECATED_NO_HEADER, NETPROP APPLETALK, COMPUTERNAME ENCODING, NULL, CFNUMBER },
+    { DEPRECATED_NO_HEADER, NETPROP APPLETALK, CONFIGMETHOD, NULL, CFSTRING },
+    { DEPRECATED_NO_HEADER, NETPROP APPLETALK, DEFAULTZONE, NULL, CFSTRING },
+    { DEPRECATED_NO_HEADER, NETPROP APPLETALK, NETWORKID, NULL, CFNUMBER },
+//  { DEPRECATED_NO_HEADER, NETPROP APPLETALK, NETWORKRANGE, NULL, CFARRAY_CFNUMBER },
+    { DEPRECATED_NO_HEADER, NETPROP APPLETALK, NODEID, NULL, CFNUMBER },
+//  { DEPRECATED_NO_HEADER, NETPROP APPLETALK, SEEDNETWORKRANGE, NULL, CFARRAY_CFNUMBER },
+//  { DEPRECATED_NO_HEADER, NETPROP APPLETALK, SEEDZONES, NULL, CFARRAY_CFSTRING },
+    { COMMENT_DEPRECATED_NO_HEADER, "", NULL, NULL, NULL },
+    { COMMENT_DEPRECATED_NO_HEADER, "--- " KEY_PREFIX NETPROP APPLETALK CONFIGMETHOD " values ---", NULL, NULL, NULL },
+    { DEPRECATED_NO_HEADER, NETVAL APPLETALK CONFIGMETHOD, NODE, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETVAL APPLETALK CONFIGMETHOD, ROUTER, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETVAL APPLETALK CONFIGMETHOD, SEEDROUTER, NULL, NULL },
     { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
-    { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
+    { COMMENT_DEPRECATED_NO_HEADER, "", NULL, NULL, NULL },
 
 
   { GROUP, NETPROP DNS, KEY_PREFIX NETENT DNS " Entity Keys", NULL, NULL },
@@ -661,8 +712,9 @@ static schemaDefinition names[] = {
 
   { GROUP_PRIVATE, NETPROP DNS, KEY_PREFIX NETENT DNS " Entity Keys", NULL, NULL },
 
-	{ SC_10_9_IPHONE_7_0_PRIVATE, NETPROP DNS, SERVICE IDENTIFIER, NULL, CFNUMBER },
-	{ SC_10_9_IPHONE_7_0_PRIVATE, NETPROP DNS, SUPPLEMENTAL MATCH DOMAINS NO SEARCH, NULL, CFNUMBER_BOOL},
+    { SC_10_11_IPHONE_9_0_PRIVATE, NETPROP DNS, CONFIRMED SERVICEID, NULL, CFSTRING },
+    { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP DNS, SERVICE IDENTIFIER, NULL, CFNUMBER },
+    { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP DNS, SUPPLEMENTAL MATCH DOMAINS NO SEARCH, NULL, CFNUMBER_BOOL},
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
 
   { GROUP, NETPROP ETHERNET, KEY_PREFIX NETENT ETHERNET " (Hardware) Entity Keys", NULL, NULL },
@@ -697,7 +749,7 @@ static schemaDefinition names[] = {
     { SC_10_1, NETPROP INTERFACE, HARDWARE, NULL, CFSTRING },
     { SC_10_1, NETPROP INTERFACE, TYPE, NULL, CFSTRING },
     { SC_10_1, NETPROP INTERFACE, SUBTYPE, NULL, CFSTRING },
-    { SC_10_2, NETPROP INTERFACE, SUPPORTSMODEMONHOLD, NULL, CFNUMBER_BOOL },
+    { SC_10_2_10_13, NETPROP INTERFACE, SUPPORTSMODEMONHOLD, NULL, CFNUMBER_BOOL },
     { COMMENT, "", NULL, NULL, NULL },
     { COMMENT, "--- " KEY_PREFIX NETPROP INTERFACE TYPE " values ---", NULL, NULL, NULL },
     { SC_10_1, NETVAL INTERFACE TYPE, ETHERNET, NULL, NULL },
@@ -709,7 +761,7 @@ static schemaDefinition names[] = {
     { COMMENT, "--- " KEY_PREFIX NETPROP SERVICE SUBTYPE " values (for " PPP ") ---", NULL, NULL, NULL },
     { SC_10_1, NETVAL INTERFACE SUBTYPE, PPPOE, NULL, NULL },
     { SC_10_1, NETVAL INTERFACE SUBTYPE, PPPSERIAL, NULL, NULL },
-    { SC_10_2, NETVAL INTERFACE SUBTYPE, PPTP, NULL, NULL },
+    { SC_10_2_10_12_IPHONE_2_0_10_0, NETVAL INTERFACE SUBTYPE, PPTP, NULL, NULL },
     { SC_10_3, NETVAL INTERFACE SUBTYPE, L2TP, NULL, NULL },
     { COMMENT, "", NULL, NULL, NULL },
 
@@ -787,6 +839,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 },
@@ -827,8 +880,11 @@ static schemaDefinition names[] = {
 
   { GROUP_PRIVATE, NETPROP IPV6, KEY_PREFIX NETENT IPV6 " Entity Keys", NULL, NULL },
     { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP IPV6, ADDITIONAL ROUTES, NULL, CFARRAY_CFDICTIONARY },
+    { 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_12_IPHONE_10_0_PRIVATE, NETPROP IPV6, LINKLOCAL ADDRESS, NULL, CFSTRING },
+    { SC_10_14_IPHONE_12_0_PRIVATE, NETPROP IPV6, PERFORM PLAT DISCOVERY, NULL, CFBOOLEAN },
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
     { COMMENT_PRIVATE,
       "--- "
@@ -856,7 +912,7 @@ static schemaDefinition names[] = {
   { GROUP_PRIVATE, NETPROP LINK, KEY_PREFIX NETENT LINK " Entity Keys", NULL, NULL },
     { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP LINK, EXPENSIVE, NULL, CFBOOLEAN },
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
-    
+
   { GROUP_PRIVATE, NETPROP LINK, KEY_PREFIX NETENT LINKISSUES " Entity Keys", NULL, NULL },
 
     { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP LINKISSUES, MODULEID, NULL, CFDATA },
@@ -897,23 +953,23 @@ static schemaDefinition names[] = {
     { SC_10_1, NETVAL MODEM DIALMODE, WAITFORDIALTONE, NULL, NULL },
     { COMMENT, "", NULL, NULL, NULL },
 
-  { GROUP_DEPRECATED, NETPROP NETINFO, KEY_PREFIX NETENT NETINFO " Entity Keys", NULL, NULL },
-
-    { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
-    { SC_10_1_10_5, NETPROP NETINFO, BINDINGMETHODS, NULL, CFSTRING },
-    { SC_10_1_10_5, NETPROP NETINFO, SERVER ADDRESSES, NULL, CFARRAY_CFSTRING },
-    { SC_10_1_10_5, NETPROP NETINFO, SERVER TAGS, NULL, CFARRAY_CFSTRING },
-    { SC_10_1_10_5, NETPROP NETINFO, BROADCAST SERVER TAG, NULL, CFSTRING },
-    { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
-    { COMMENT_DEPRECATED, "--- " KEY_PREFIX NETPROP NETINFO BINDINGMETHODS " values ---", NULL, NULL, NULL },
-    { SC_10_1_10_5, NETVAL NETINFO BINDINGMETHODS, BROADCAST, NULL, NULL },
-    { SC_10_1_10_5, NETVAL NETINFO BINDINGMETHODS, DHCP, NULL, NULL },
-    { SC_10_1_10_5, NETVAL NETINFO BINDINGMETHODS, MANUAL, NULL, NULL },
-    { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
-    { COMMENT_DEPRECATED, "--- " KEY_PREFIX NETPROP NETINFO BROADCAST SERVER TAG " default value ---", NULL, NULL, NULL },
-    { SC_10_1_10_5, NETVAL NETINFO, DEFAULT SERVER TAG, "network", NULL },
-    { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
-    { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
+//{ GROUP_DEPRECATED_NO_HEADER, NETPROP NETINFO, KEY_PREFIX NETENT NETINFO " Entity Keys", NULL, NULL },
+//
+//  { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETPROP NETINFO, BINDINGMETHODS, NULL, CFSTRING },
+//  { DEPRECATED_NO_HEADER, NETPROP NETINFO, SERVER ADDRESSES, NULL, CFARRAY_CFSTRING },
+//  { DEPRECATED_NO_HEADER, NETPROP NETINFO, SERVER TAGS, NULL, CFARRAY_CFSTRING },
+//  { DEPRECATED_NO_HEADER, NETPROP NETINFO, BROADCAST SERVER TAG, NULL, CFSTRING },
+//  { COMMENT_DEPRECATED_NO_HEADER, "", NULL, NULL, NULL },
+//  { COMMENT_DEPRECATED_NO_HEADER, "--- " KEY_PREFIX NETPROP NETINFO BINDINGMETHODS " values ---", NULL, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETVAL NETINFO BINDINGMETHODS, BROADCAST, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETVAL NETINFO BINDINGMETHODS, DHCP, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETVAL NETINFO BINDINGMETHODS, MANUAL, NULL, NULL },
+//  { COMMENT_DEPRECATED_NO_HEADER, "", NULL, NULL, NULL },
+//  { COMMENT_DEPRECATED_NO_HEADER, "--- " KEY_PREFIX NETPROP NETINFO BROADCAST SERVER TAG " default value ---", NULL, NULL, NULL },
+//  { DEPRECATED_NO_HEADER, NETVAL NETINFO, DEFAULT SERVER TAG, "network", NULL },
+//  { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
+//  { COMMENT_DEPRECATED_NO_HEADER, "", NULL, NULL, NULL },
 
   { GROUP, NETPROP PPP, KEY_PREFIX NETENT PPP " Entity Keys", NULL, NULL },
 
@@ -929,11 +985,11 @@ static schemaDefinition names[] = {
     { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP PPP, DISCONNECTONWAKE, NULL, CFNUMBER_BOOL },
     { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP PPP, DISCONNECTONWAKETIMER, NULL, CFNUMBER },
     { SC_10_3, NETPROP PPP, DISCONNECTTIME, NULL, CFNUMBER },
-    { SC_10_1, NETPROP PPP, IDLEREMINDERTIMER, NULL, CFNUMBER },
-    { SC_10_1, NETPROP PPP, IDLEREMINDER, NULL, CFNUMBER_BOOL },
+    { SC_10_1, NETPROP PPP, IDLE REMINDER, NULL, CFNUMBER_BOOL },
+    { SC_10_1, NETPROP PPP, IDLE REMINDER TIMER, NULL, CFNUMBER },
     { SC_10_2, NETPROP PPP, LAST CAUSE, NULL, CFNUMBER },
     { SC_10_1, NETPROP PPP, LOGFILE, NULL, CFSTRING },
-    { SC_10_2, NETPROP PPP, PLUGINS, NULL, CFARRAY_CFSTRING },
+    { SC_10_2_10_15, NETPROP PPP, PLUGINS, NULL, CFARRAY_CFSTRING },
     { SC_10_3, NETPROP PPP, RETRYCONNECTTIME, NULL, CFNUMBER },
     { SC_10_1, NETPROP PPP, SESSIONTIMER, NULL, CFNUMBER },
     { SC_10_2, NETPROP PPP, STATUS, NULL, CFNUMBER },
@@ -942,7 +998,7 @@ static schemaDefinition names[] = {
     { COMMENT, "", NULL, NULL, NULL },
 
     { COMMENT, "--- " AUTH ": ---", NULL, NULL, NULL },
-    { SC_10_3, NETPROP PPP, AUTH EAP PLUGINS, NULL, CFARRAY_CFSTRING },
+    { SC_10_3_10_15, NETPROP PPP, AUTH EAP PLUGINS, NULL, CFARRAY_CFSTRING },
     { SC_10_1, NETPROP PPP, AUTH NAME, NULL, CFSTRING },
     { SC_10_1, NETPROP PPP, AUTH PASSWORD, NULL, CFSTRING },
     { SC_10_1, NETPROP PPP, AUTH PASSWORD ENCRYPTION, NULL, CFSTRING },
@@ -1033,11 +1089,6 @@ static schemaDefinition names[] = {
     { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL },
     { COMMENT, "", NULL, NULL, NULL },
 
-  { GROUP, NETPROP PPTP, KEY_PREFIX NETENT PPTP " Entity Keys", NULL, NULL },
-
-    { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL },
-    { COMMENT, "", NULL, NULL, NULL },
-
   { GROUP, NETPROP L2TP, KEY_PREFIX NETENT L2TP " Entity Keys", NULL, NULL },
 
     { SC_10_3, NETPROP L2TP, IPSEC SHAREDSECRET, NULL, CFSTRING },
@@ -1052,6 +1103,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 },
@@ -1087,6 +1145,7 @@ static schemaDefinition names[] = {
     { SC_10_9_IPHONE_6_0_PRIVATE, NETPROP PROXIES, FALLBACK ALLOWED, NULL, CFNUMBER_BOOL },
     { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH DOMAINS, NULL, CFARRAY_CFSTRING},
     { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH ORDERS, NULL, CFARRAY_CFNUMBER},
+    { SC_10_11_IPHONE_9_0_PRIVATE, NETPROP PROXIES, SERVICE SPECIFIC, NULL, CFNUMBER_BOOL },
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
     { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SCOPED, "__SCOPED__", CFDICTIONARY},
     { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP PROXIES, SERVICES, "__SERVICES__", CFDICTIONARY},
@@ -1094,9 +1153,23 @@ static schemaDefinition names[] = {
     { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH DOMAIN, "__MATCH_DOMAIN__", CFSTRING},
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
 
+   { GROUP_PRIVATE, NETPROP LINK, KEY_PREFIX NETENT QOSMARKING POLICY " Entity Keys", NULL, NULL },
+
+    { SC_10_13_IPHONE_10_0_PRIVATE, NETPROP QOSMARKING, APPLE AUDIOVIDEOCALLS,
+				    QOSMARKING APPLE AUDIOVIDEOCALLS,
+				    CFBOOLEAN},
+    { SC_10_13_IPHONE_10_0_PRIVATE, NETPROP QOSMARKING, ENABLED,
+				    QOSMARKING ENABLED,
+				    CFBOOLEAN},
+    { SC_10_13_IPHONE_10_0_PRIVATE, NETPROP QOSMARKING, WHITELISTED APP IDENTIFIERS,
+				    QOSMARKING WHITELISTED APP IDENTIFIERS,
+				    CFARRAY_CFSTRING},
+    { COMMENT_PRIVATE, "", NULL, NULL, NULL },
+
   { GROUP_PRIVATE, NETPROP SERVICE, KEY_PREFIX NETENT SERVICE " Entity Keys", NULL, NULL },
 
     { SC_10_6_IPHONE_2_0_PRIVATE, NETPROP SERVICE, PRIMARYRANK, NULL, CFSTRING },
+    { SC_10_12_IPHONE_10_0_PRIVATE, NETPROP SERVICE, SERVICEINDEX, NULL, CFNUMBER },
     { SC_10_6_IPHONE_2_0_PRIVATE, NETPROP SERVICE, USERDEFINEDNAME, NULL, CFSTRING },
     { COMMENT_PRIVATE, "", NULL, NULL, NULL },
     { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP SERVICE PRIMARYRANK " values ---", NULL, NULL, NULL },
@@ -1109,17 +1182,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 },
 
@@ -1213,7 +1286,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 },
 
@@ -1278,33 +1351,12 @@ static schemaDefinition names[] = {
     { END, NULL, NULL, NULL, NULL },
 };
 
-static int	maxkbuf		= 0;
-static char	*maxkstr	= NULL;
-static int	maxvbuf		= 0;
-static char	*maxvstr	= NULL;
-
-static __inline__ void
-setmax(int *max, char **maxstr, char *str)
-{
-    int l;
-
-    l = strlen(str);
-    if (l > *max) {
-	if (*maxstr) free(*maxstr);
-	*maxstr = strdup(str);
-	*max = l;
-    }
-    return;
-}
-
 enum {
     gen_header_e,
     gen_comments_e,
     gen_comments_private_e,
     gen_headerdoc_e,
     gen_headerdoc_private_e,
-    gen_hfile_e,
-    gen_hfile_private_e,
     gen_cfile_e,
 };
 
@@ -1344,205 +1396,144 @@ print_headerdoc(schemaDefinition *def)
 
 	snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
 		 def->prefix, def->key);
-	setmax(&maxkbuf, &maxkstr, kbuf);
 
 	snprintf(vbuf, sizeof(vbuf), "\"%s\"",
 		 def->value ? def->value : def->key);
-	setmax(&maxvbuf, &maxvstr, vbuf);
 
-	printf("\n");
 
+	printf("\n");
 	printf("/*!\n");
 	printf("  @const %s\n", kbuf);
+	if (def->type) {
+	    printf("  @discussion Value is a %s\n", def->type);
+	}
+	printf(" */\n");
+	printf("extern const CFStringRef %-49s", kbuf);
 	switch (def->control) {
 	    case SC_10_1:
-		printf("  @availability Introduced in Mac OS X 10.1.\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("  @availability Introduced in Mac OS X 10.2.\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("  @availability Introduced in Mac OS X 10.3.\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("  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.4.\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("  @availability Introduced in Mac OS X 10.4.\n");
-		break;
-	    case SC_10_1_10_5:
-		printf("  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.\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("  @availability Introduced in Mac OS X 10.5.\n");
-		break;
-	    case SC_10_5_10_7:
-		printf("  @availability Introduced in Mac OS X 10.5, but later deprecated in Mac OS X 10.7.\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_PRIVATE:
-		printf("  @availability Introduced in Mac OS X 10.5.\n");
+	    case SC_10_5_IPHONE_NA:
+		printf("  API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);\n");
 		break;
-	    case SC_10_1_10_6:
-		printf("  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.\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_2_10_6:
-		printf("  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.6.\n");
+	    case SC_10_5_PRIVATE:
+		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("  @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.9.\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("  @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.9.\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("  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_2_10_15:
+		printf("  API_DEPRECATED(\"No longer supported\", macos(10.2,10.15)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n");
 		break;
 	    case SC_10_3_10_9:
-		printf("  @availability Introduced in Mac OS X 10.3, but later deprecated in Mac OS X 10.9.\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_3_10_15:
+		printf("  API_DEPRECATED(\"No longer supported\", macos(10.3,10.15)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n");
 		break;
 	    case SC_10_4_10_9:
-		printf("  @availability Introduced in Mac OS X 10.4, but later deprecated in Mac OS X 10.9.\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(" "
+		       " 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(" "
+		       " 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("  @availability Introduced in Mac OS X 10.6.\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("  @availability Introduced in Mac OS X 10.6.\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("  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("  @availability Introduced in Mac OS X 10.7.\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("  @availability Introduced in Mac OS X 10.8.\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("  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("  @availability Introduced in Mac OS X 10.9.\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:
-	    case SC_10_10_IPHONE_8_0_PRIVATE:
-		printf("  @availability Introduced in Mac OS X 10.10.\n");
-		break;
-	    case SC_IPHONE_2_0_PRIVATE:
-		printf("  @availability Introduced in iPhone OS 2.0.\n");
-		break;
-	}
-	printf(" */\n");
-	printf("extern const CFStringRef %s;\n", kbuf);
-
-	return;
-}
-
-void
-print_hfile(schemaDefinition *def)
-{
-	char kbuf[256];
-	char vbuf[256];
-
-	snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
-		 def->prefix, def->key);
-	setmax(&maxkbuf, &maxkstr, kbuf);
-
-	snprintf(vbuf, sizeof(vbuf), "\"%s\"",
-		 def->value ? def->value : def->key);
-	setmax(&maxvbuf, &maxvstr, vbuf);
-
-	printf("\n");
-
-	switch (def->control) {
-	    case SC_10_1:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_2:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_3:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_1_10_4:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
-		break;
-	    case SC_10_4:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_1_10_5:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
-		break;
-	    case SC_10_5:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_5_10_7:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_7,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
-		break;
-	    case SC_10_5_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))\n", kbuf);
+		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_1_10_6:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
-		break;
-	    case SC_10_2_10_6:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
-		break;
-	    case SC_10_1_10_9:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_2_10_9:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_3_10_9:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))\n", kbuf);
+	    case SC_10_10_IPHONE_8_0_PRIVATE:
+		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_4_10_9:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/))\n", kbuf);
+	    case SC_10_11_IPHONE_9_0_PRIVATE:
+		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_6_IPHONE_2_0:
-	    case SC_10_6_IPHONE_2_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))\n", kbuf);
+	    case SC_10_12_IPHONE_10_0_PRIVATE:
+		printf("  API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));\n");
 		break;
-	    case SC_10_6_IPHONE_3_0:
-	    case SC_10_6_IPHONE_3_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))\n", kbuf);
+	    case SC_10_13_IPHONE_10_0_PRIVATE:
+		printf("  API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(2.0));\n");
 		break;
-	    case SC_10_7_IPHONE_4_0:
-	    case SC_10_7_IPHONE_4_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_7_IPHONE_5_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))\n", kbuf);
+	    case SC_10_13_IPHONE_11_0_PRIVATE:
+		printf("  API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(11.0), tvos(11.0), watchos(4.0), bridgeos(2.0));\n");
 		break;
-	    case SC_10_8_IPHONE_6_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/))\n", kbuf);
-		break;
-	    case SC_10_9_IPHONE_6_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_6_0/*SPI*/))\n", kbuf);
+	    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(3.0));\n");
 		break;
-	    case SC_10_9_IPHONE_7_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))\n", kbuf);
+	    case SC_10_15_IPHONE_13_0_PRIVATE:
+		printf("  API_AVAILABLE(macos(10.15)) SPI_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0), bridgeos(4.0));\n");
 		break;
-	    case SC_10_10_IPHONE_7_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/))\n", kbuf);
+	    case SC_IPHONE_2_0_PRIVATE:
+		printf("  SPI_AVAILABLE(macos(10.6), ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n");
 		break;
-	    case SC_10_10_IPHONE_8_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))\n", kbuf);
+	    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_2_0_PRIVATE:
-		printf("  " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/))\n", kbuf);
+	    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("  " SC_SCHEMA_DECLARATION "(%s,)\n", kbuf);
+		printf("\n");
 		break;
 	}
 
-	printf("  #define %-48s              \\\n",
-	       kbuf);
-	printf("	  " SC_SCHEMA_KV "(%-48s \\\n",
-	       kbuf);
-	printf("		      ,%-48s \\\n",
-	       vbuf);
-	printf("		      ,%-48s )\n",
-	       def->type ? def->type : "");
-
+	printf("#define %s %s\n", kbuf, kbuf);
 	return;
 }
 
@@ -1589,16 +1580,13 @@ dump_names(int type)
 		break;
 	    }
 
-	    case COMMENT_DEPRECATED: {
+	    case COMMENT_DEPRECATED:
+	    case COMMENT_DEPRECATED_NO_HEADER: {
 		break;
 	    }
 
 	    case DEFINE: {
 		switch (type) {
-		    case gen_hfile_e:
-			printf("\n");
-			print_define(&names[i]);
-			break;
 		    case gen_cfile_e:
 			if ((strcmp(names[i].prefix, "#if") == 0) ||
 			    (strcmp(names[i].prefix, "#ifdef") == 0) ||
@@ -1616,10 +1604,6 @@ dump_names(int type)
 
 	    case DEFINE_PRIVATE: {
 		switch (type) {
-		    case gen_hfile_private_e:
-			printf("\n");
-			print_define(&names[i]);
-			break;
 		    case gen_cfile_e:
 			if ((strcmp(names[i].prefix, "#if") == 0) ||
 			    (strcmp(names[i].prefix, "#ifdef") == 0) ||
@@ -1654,6 +1638,10 @@ dump_names(int type)
 		break;
 	    }
 
+	    case GROUP_DEPRECATED_NO_HEADER: {
+		break;
+	    }
+
 	    case GROUP_PRIVATE: {
 		switch (type) {
 		    case gen_comments_private_e:
@@ -1692,13 +1680,14 @@ dump_names(int type)
 
 		    case gen_comments_e:
 			switch (names[i].control) {
+			    case DEPRECATED_NO_HEADER:
 			    case SC_10_1_10_4:
-			    case SC_10_1_10_5:
-			    case SC_10_1_10_6:
-			    case SC_10_2_10_6:
 			    case SC_10_1_10_9:
 			    case SC_10_2_10_9:
+			    case SC_10_2_10_13:
+			    case SC_10_2_10_15:
 			    case SC_10_3_10_9:
+			    case SC_10_3_10_15:
 			    case SC_10_4_10_9:
 				// don't report deprecated keys
 				break;
@@ -1712,7 +1701,15 @@ dump_names(int type)
 			    case SC_10_9_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_8_0_PRIVATE:
+			    case SC_10_11_IPHONE_9_0_PRIVATE:
+			    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_10_15_IPHONE_13_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,13 +1719,14 @@ dump_names(int type)
 			break;
 		    case gen_comments_private_e:
 			switch (names[i].control) {
+			    case DEPRECATED_NO_HEADER:
 			    case SC_10_1_10_4:
-			    case SC_10_1_10_5:
-			    case SC_10_1_10_6:
-			    case SC_10_2_10_6:
 			    case SC_10_1_10_9:
 			    case SC_10_2_10_9:
+			    case SC_10_2_10_13:
+			    case SC_10_2_10_15:
 			    case SC_10_3_10_9:
+			    case SC_10_3_10_15:
 			    case SC_10_4_10_9:
 				// don't report deprecated keys
 				break;
@@ -1742,7 +1740,15 @@ dump_names(int type)
 			    case SC_10_9_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_8_0_PRIVATE:
+			    case SC_10_11_IPHONE_9_0_PRIVATE:
+			    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_10_15_IPHONE_13_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:
@@ -1753,6 +1759,7 @@ dump_names(int type)
 
 		    case gen_headerdoc_e:
 			switch (names[i].control) {
+			    case DEPRECATED_NO_HEADER:
 			    case SC_10_5_PRIVATE:
 			    case SC_10_6_IPHONE_2_0_PRIVATE:
 			    case SC_10_6_IPHONE_3_0_PRIVATE:
@@ -1763,7 +1770,15 @@ dump_names(int type)
 			    case SC_10_9_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_8_0_PRIVATE:
+			    case SC_10_11_IPHONE_9_0_PRIVATE:
+			    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_10_15_IPHONE_13_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:
@@ -1783,7 +1798,15 @@ dump_names(int type)
 			    case SC_10_9_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_7_0_PRIVATE:
 			    case SC_10_10_IPHONE_8_0_PRIVATE:
+			    case SC_10_11_IPHONE_9_0_PRIVATE:
+			    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_10_15_IPHONE_13_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:
@@ -1791,48 +1814,6 @@ dump_names(int type)
 				break;
 			}
 			break;
-
-		    case gen_hfile_e:
-			switch (names[i].control) {
-			    case SC_10_5_PRIVATE:
-			    case SC_10_6_IPHONE_2_0_PRIVATE:
-			    case SC_10_6_IPHONE_3_0_PRIVATE:
-			    case SC_10_7_IPHONE_4_0_PRIVATE:
-			    case SC_10_7_IPHONE_5_0_PRIVATE:
-			    case SC_10_8_IPHONE_6_0_PRIVATE:
-			    case SC_10_9_IPHONE_6_0_PRIVATE:
-			    case SC_10_9_IPHONE_7_0_PRIVATE:
-			    case SC_10_10_IPHONE_7_0_PRIVATE:
-			    case SC_10_10_IPHONE_8_0_PRIVATE:
-			    case SC_IPHONE_2_0_PRIVATE:
-				break;
-				// don't report private definitions
-			    default:
-				print_hfile(&names[i]);
-				break;
-			}
-			break;
-		    case gen_hfile_private_e:
-			switch (names[i].control) {
-			    case SC_10_5_PRIVATE:
-			    case SC_10_6_IPHONE_2_0_PRIVATE:
-			    case SC_10_6_IPHONE_3_0_PRIVATE:
-			    case SC_10_7_IPHONE_4_0_PRIVATE:
-			    case SC_10_7_IPHONE_5_0_PRIVATE:
-			    case SC_10_8_IPHONE_6_0_PRIVATE:
-			    case SC_10_9_IPHONE_6_0_PRIVATE:
-			    case SC_10_9_IPHONE_7_0_PRIVATE:
-			    case SC_10_10_IPHONE_7_0_PRIVATE:
-			    case SC_10_10_IPHONE_8_0_PRIVATE:
-			    case SC_IPHONE_2_0_PRIVATE:
-				print_hfile(&names[i]);
-				break;
-			    default:
-				// don't report public definitions
-				break;
-			}
-			break;
-
 		    case gen_cfile_e:
 			snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
 				 names[i].prefix, names[i].key);
@@ -1852,12 +1833,6 @@ dump_names(int type)
 	}
     }
  done:
-    switch (type) {
-	case gen_hfile_e:
-	    fprintf(stderr, "max key: length = %2d, string = %s\n", maxkbuf, maxkstr);
-	    fprintf(stderr, "max val: length = %2d, string = %s\n", maxvbuf, maxvstr);
-	    break;
-    }
     return;
 }
 
@@ -1877,92 +1852,28 @@ main(int argc, char * argv[])
 	dump_names(gen_comments_e);
 	printf(" */\n\n\n");
 
-	printf("/*\n");
-	printf(" * Note: The MACOSX_DEPLOYMENT_TARGET environment variable should be used\n");
-	printf(" *       when building an application targeted for an earlier version of\n");
-	printf(" *       Mac OS X.  Please reference Technical Note TN2064 for more details.\n");
-	printf(" */\n\n");
-
-	printf("/*\n");
-	printf(" * Note: For Cocoa/Obj-C/Foundation applications accessing these preference\n");
-	printf(" *       keys you may want to consider the following :\n");
-	printf(" *\n");
-	printf(" *       #define " SC_SCHEMA_DECLARATION "(k,q)\textern NSString * k;\n");
-	printf(" *       #import \n");
-	printf(" */\n\n");
-
-	printf("/*\n");
-	printf(" * Note: For CFM applications using these schema keys you may want to\n");
-	printf(" *       consider the following :\n");
-	printf(" *\n");
-	printf(" *       #define " SC_SCHEMA_DECLARATION "(k,q)\n");
-	printf(" *       #define " SC_SCHEMA_KV "(k,v,t)\tlookup_SC_key( CFSTR( #k ) )\n");
-	printf(" *       #include \n");
-	printf(" *\n");
-	printf(" *       CFStringRef lookup_SC_key(CFStringRef key)\n");
-	printf(" *       {\n");
-	printf(" *         // this function should [dynamically, on-demand] load the\n");
-	printf(" *         // SystemConfiguration.framework, look up the provided key,\n");
-	printf(" *         // and return the associated value.\n");
-	printf(" *       }\n");
-	printf(" */\n\n");
-
-	printf("/*\n");
-	printf(" * Note: Earlier versions of this header file defined a \"SCSTR\" macro\n");
-	printf(" *       which helped to facilitate Obj-C development. Use of this macro\n");
-	printf(" *       has been deprecated (in Mac OS X 10.4) in favor of the newer\n");
-	printf(" *       \"" SC_SCHEMA_DECLARATION "\" and \"" SC_SCHEMA_KV "\" macros\n");
-	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("/* -------------------- Macro declarations -------------------- */\n\n");
-
-	printf("#include \n");
+	printf("#include \n");
 	printf("#include \n");
+	printf("#include \n");
 	printf("\n");
 
-	printf("/*\n");
-	printf(" * Define a schema key/value/type tuple\n");
-	printf(" */\n");
-	printf("#ifndef " SC_SCHEMA_KV "\n");
-	printf("  #define " SC_SCHEMA_KV "(k,v,t)\tk\n");
-	printf("#endif\n\n");
-
-	printf("/*\n");
-	printf(" * Provide an \"extern\" for the key/value\n");
-	printf(" */\n");
-	printf("#ifndef " SC_SCHEMA_DECLARATION "\n");
-	printf("  #ifndef SCSTR\n");
-	printf("    #include \n");
-	printf("    #define " SC_SCHEMA_DECLARATION "(k,q)\textern const CFStringRef k q;\n");
-	printf("  #else\n");
-	printf("    #import \n");
-	printf("    #define " SC_SCHEMA_DECLARATION "(k,q)\textern NSString * k q;\n");
-	printf("  #endif\n");
-	printf("#endif\n");
-
-	printf("/* -------------------- HeaderDoc comments -------------------- */\n\n\n");
-	printf("#if\t0\n");
 	printf("/*!\n");
 	printf(" *\t@header SCSchemaDefinitions\n");
-	printf(" */\n");
-	dump_names(gen_headerdoc_e);
-	printf("\n");
-	printf("#endif\t/* 0 */\n\n\n");
+	printf(" */\n\n");
 
-	printf("/* -------------------- Schema declarations -------------------- */\n\n");
+	printf("\n");
+	printf("CF_ASSUME_NONNULL_BEGIN\n");
 
+	dump_names(gen_headerdoc_e);
 
-	dump_names(gen_hfile_e);
 	printf("\n");
+	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) {
@@ -1977,22 +1888,13 @@ main(int argc, char * argv[])
 	printf("#define _SCSCHEMADEFINITIONSPRIVATE_H\n");
 	printf("\n");
 
-	printf("/* -------------------- Macro declarations -------------------- */\n\n");
-
 	printf("#include \n\n");
 
-	printf("/* -------------------- HeaderDoc comments -------------------- */\n\n\n");
-	printf("#if\t0\n");
 	printf("/*!\n");
 	printf(" *\t@header SCSchemaDefinitionsPrivate\n");
 	printf(" */\n");
 	dump_names(gen_headerdoc_private_e);
-	printf("\n");
-	printf("#endif\t/* 0 */\n\n\n");
-
-	printf("/* -------------------- Schema declarations -------------------- */\n\n");
-	dump_names(gen_hfile_private_e);
-	printf("\n");
+	printf("\n\n");
 
 	printf("#endif\t/* _SCSCHEMADEFINITIONSPRIVATE_H */\n");
     }
@@ -2002,7 +1904,6 @@ main(int argc, char * argv[])
 	printf(" * DO NOT EDIT!\n");
 	printf(" */\n");
 	printf("\n");
-	printf("#include \n");
 	printf("#include \n");
 	printf("#include \n");
 	printf("\n");
diff --git a/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.c b/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.c
index 7525dc1a6..0418706ea 100644
--- a/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.c
+++ b/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2005-2008, 2010, 2011, 2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2005-2008, 2010, 2011, 2013, 2015, 2016, 2018, 2019 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@
  */
 
@@ -39,9 +39,7 @@
 #include 
 #include 
 
-#include 
-#include 
-
+#include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
 #include "helper.h"		// MiG generated file
 
@@ -53,8 +51,8 @@
 #define	SUFFIX_SYM_LEN				(sizeof(SUFFIX_SYM) - 1)
 
 
-static pthread_mutex_t	_helper_lock	= PTHREAD_MUTEX_INITIALIZER;
-static mach_port_t	_helper_server	= MACH_PORT_NULL;
+static pthread_mutex_t	_helper_lock		= PTHREAD_MUTEX_INITIALIZER;
+static mach_port_t	_helper_server		= MACH_PORT_NULL;
 
 
 static mach_port_t
@@ -90,9 +88,8 @@ __SCHelperServerPort(kern_return_t *status)
 			break;
 		default :
 #ifdef	DEBUG
-			SCLog(_sc_verbose, LOG_DEBUG,
-			      CFSTR("__SCHelperServerPort bootstrap_look_up() failed: status=%s"),
-			      bootstrap_strerror(*status));
+			SC_log(LOG_INFO, "bootstrap_look_up() failed: status=%s",
+			       bootstrap_strerror(*status));
 #endif	/* DEBUG */
 			break;
 	}
@@ -160,21 +157,20 @@ _SCHelperOpen(CFDataRef authorizationData, mach_port_t *helper_port)
 	__MACH_PORT_DEBUG(TRUE, "*** _SCHelperOpen", *helper_port);
 
 	if (*helper_port == MACH_PORT_NULL) {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("_SCHelperOpen: could not contact server: %s"),
+		SC_log(LOG_NOTICE, "could not contact \"" HELPER "\": %s",
 		      SCErrorString(status));
 		return FALSE;
 	}
 
 	ok = _SCHelperExec(*helper_port, SCHELPER_MSG_AUTH, authorizationData, &status, NULL);
 	if (!ok) {
-		SCLog(TRUE, LOG_INFO, CFSTR("_SCHelperOpen: could not send authorization"));
+		SC_log(LOG_NOTICE, "could not send authorization");
 		goto error;
 	}
 
 	ok = (status == 0);
 	if (!ok) {
-		SCLog(TRUE, LOG_INFO, CFSTR("could not start \"" HELPER "\", status = %u"), status);
+		SC_log(LOG_NOTICE, "could not start \"" HELPER "\", status = %u", status);
 		goto error;
 	}
 
@@ -197,7 +193,7 @@ void
 _SCHelperClose(mach_port_t *helper_port)
 {
 	if (!_SCHelperExec(*helper_port, SCHELPER_MSG_EXIT, NULL, NULL, NULL)) {
-		SCLog(TRUE, LOG_INFO, CFSTR("_SCHelperOpen: could not send exit request"));
+		SC_log(LOG_INFO, "could not send exit request");
 	}
 
 	if (*helper_port != MACH_PORT_NULL) {
@@ -227,7 +223,7 @@ _SCHelperExecCopyBacktrace()
 
 		backtrace = _SC_copyBacktrace();
 		if (backtrace != NULL) {
-			_SCSerializeString(backtrace, &traceData, NULL, NULL);
+			(void)_SCSerializeString(backtrace, &traceData, NULL, NULL);
 			CFRelease(backtrace);
 		}
 	}
@@ -236,6 +232,7 @@ _SCHelperExecCopyBacktrace()
 }
 
 
+__private_extern__
 Boolean
 _SCHelperExec(mach_port_t port, uint32_t msgID, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
@@ -269,7 +266,7 @@ _SCHelperExec(mach_port_t port, uint32_t msgID, CFDataRef data, uint32_t *status
 
 		if (kr != MACH_SEND_INVALID_DEST) {
 			// if we got an unexpected error
-			SCLog(TRUE, LOG_ERR, CFSTR("_SCHelperExec() failed: %s"), mach_error_string(kr));
+			SC_log(LOG_NOTICE, "_SCHelperExec() failed: %s", mach_error_string(kr));
 		}
 		_SCErrorSet(kr);
 
@@ -290,7 +287,7 @@ _SCHelperExec(mach_port_t port, uint32_t msgID, CFDataRef data, uint32_t *status
 	if (reply != NULL) {
 		*reply = myData;
 	} else if (myData != NULL) {
-		SCLog(TRUE, LOG_DEBUG, CFSTR("_SCHelperExec() data available with no place to go"));
+		SC_log(LOG_INFO, "data available with no place to go");
 		CFRelease(myData);
 	}
 
diff --git a/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.h b/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.h
index 0db8a119f..1e7296a96 100644
--- a/src/configd/SystemConfiguration.fproj/helper/SCHelper_client.h
+++ b/src/configd/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/src/configd/SystemConfiguration.fproj/helper/SCHelper_server.c b/src/configd/SystemConfiguration.fproj/helper/SCHelper_server.c
index 23ad5e047..f7ded0e12 100644
--- a/src/configd/SystemConfiguration.fproj/helper/SCHelper_server.c
+++ b/src/configd/SystemConfiguration.fproj/helper/SCHelper_server.c
@@ -1,15 +1,15 @@
 /*
- * Copyright (c) 2005-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2005-2019 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@
  */
 
@@ -37,10 +37,9 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
+#define SC_LOG_HANDLE		__log_SCHelper
+#define SC_LOG_HANDLE_TYPE	static
 #include "SCPreferencesInternal.h"
 #include "SCHelper_client.h"
 #include "helper_types.h"
@@ -50,7 +49,7 @@
 
 
 //
-// entitlement used to control write access to a given "prefsID"
+// entitlement used to control read (or write) access to a given "prefsID"
 //
 #define	kSCReadEntitlementName		CFSTR("com.apple.SystemConfiguration.SCPreferences-read-access")
 #define	kSCWriteEntitlementName		CFSTR("com.apple.SystemConfiguration.SCPreferences-write-access")
@@ -118,6 +117,23 @@ static int		sessions_generation		= 0;
 static pthread_mutex_t	sessions_lock			= PTHREAD_MUTEX_INITIALIZER;
 
 
+#pragma mark -
+#pragma mark Logging
+
+
+static os_log_t
+__log_SCHelper(void)
+{
+	static os_log_t	log	= NULL;
+
+	if (log == NULL) {
+		log = os_log_create("com.apple.SystemConfiguration", "SCPreferences");
+	}
+
+	return log;
+}
+
+
 #pragma mark -
 #pragma mark Helper session management
 
@@ -165,8 +181,7 @@ __SCHelperSessionSetAuthorization(SCHelperSessionRef session, CFTypeRef authoriz
 			status = AuthorizationFree(sessionPrivate->authorization, kAuthorizationFlagDefaults);
 //			status = AuthorizationFree(sessionPrivate->authorization, kAuthorizationFlagDestroyRights);
 			if (status != errAuthorizationSuccess) {
-				SCLog(TRUE, LOG_DEBUG,
-				      CFSTR("AuthorizationFree() failed: status = %d"),
+				SC_log(LOG_DEBUG, "AuthorizationFree() failed: status = %d",
 				      (int)status);
 			}
 		} else {
@@ -186,13 +201,12 @@ __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) {
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("AuthorizationCreateFromExternalForm() failed: status = %d"),
-				      (int)status);
+				SC_log(LOG_NOTICE, "AuthorizationCreateFromExternalForm() failed: status = %d",
+				       (int)status);
 				sessionPrivate->authorization = NULL;
 				ok = FALSE;
 			}
@@ -232,7 +246,6 @@ __SCHelperSessionSetThreadName(SCHelperSessionRef session)
 	char				*path_s		= NULL;
 	SCHelperSessionPrivateRef	sessionPrivate	= (SCHelperSessionPrivateRef)session;
 
-
 	if (sessionPrivate->mp == NULL) {
 		return;
 	}
@@ -259,7 +272,7 @@ __SCHelperSessionSetThreadName(SCHelperSessionRef session)
 	if (caller != NULL) {
 		snprintf(name, sizeof(name), "SESSION|%p|%s|%s%s",
 			(void *)(uintptr_t)CFMachPortGetPort(sessionPrivate->mp),
-			(caller != NULL) ? caller : "?",
+			caller,
 			(path_s != NULL) ? "*/"   : "",
 			(path   != NULL) ? path   : "?");
 		CFAllocatorDeallocate(NULL, caller);
@@ -285,16 +298,11 @@ __SCHelperSessionSetPreferences(SCHelperSessionRef session, SCPreferencesRef pre
 		CFRetain(prefs);
 	}
 	if (sessionPrivate->prefs != NULL) {
-		SCLog(debug, LOG_DEBUG,
-		      CFSTR("%p : close"),
-		      session);
+		SC_log(LOG_INFO, "%p : close", session);
 		CFRelease(sessionPrivate->prefs);
 	}
 	if (prefs != NULL) {
-		SCLog(debug, LOG_DEBUG,
-		      CFSTR("%p : open, prefs = %@"),
-		      session,
-		      prefs);
+		SC_log(LOG_INFO, "%p : open, prefs = %@", session, prefs);
 	}
 	sessionPrivate->prefs = prefs;
 
@@ -353,7 +361,7 @@ __SCHelperSessionSetVPNFilter(SCHelperSessionRef session, Boolean vpnChange, CFA
 }
 
 
-static CFArrayRef
+static Boolean
 __SCHelperSessionUseVPNFilter(SCHelperSessionRef session, CFArrayRef *vpnTypes)
 {
 	SCHelperSessionPrivateRef	sessionPrivate	= (SCHelperSessionPrivateRef)session;
@@ -375,13 +383,12 @@ __SCHelperSessionLog(const void *value, void *context)
 	if ((sessionPrivate->mp != NULL) && (sessionPrivate->prefs != NULL)) {
 		SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)sessionPrivate->prefs;
 
-		SCLog(TRUE, LOG_NOTICE,
-		      CFSTR("  %p {port = %p, caller = %@, path = %s%s}"),
-		      session,
-		      (void *)(uintptr_t)CFMachPortGetPort(sessionPrivate->mp),
-		      prefsPrivate->name,
-		      prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path,
-		      prefsPrivate->locked ? ", locked" : "");
+		SC_log(LOG_INFO, "  %p {port = %p, caller = %@, path = %s%s}",
+		       session,
+		       (void *)(uintptr_t)CFMachPortGetPort(sessionPrivate->mp),
+		       prefsPrivate->name,
+		       prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path,
+		       prefsPrivate->locked ? ", locked" : "");
 
 		if ((sessionPrivate->backtraces != NULL) &&
 		    (CFSetGetCount(sessionPrivate->backtraces) > 0)) {
@@ -507,22 +514,19 @@ __SCHelperSessionCreate(CFAllocatorRef allocator)
 		return NULL;
 	}
 
+	/* initialize non-zero/NULL members */
 	if (pthread_mutex_init(&sessionPrivate->lock, NULL) != 0) {
-		SCLog(TRUE, LOG_ERR, CFSTR("pthread_mutex_init(): failure to initialize per session lock"));
+		SC_log(LOG_NOTICE, "pthread_mutex_init(): failure to initialize per session lock");
 		CFRelease(sessionPrivate);
 		return NULL;
 	}
-	sessionPrivate->authorization		= NULL;
-	sessionPrivate->use_entitlement		= FALSE;
-	sessionPrivate->port			= MACH_PORT_NULL;
-	sessionPrivate->mp			= NULL;
+
+	pthread_mutex_lock(&sessionPrivate->lock);
 	sessionPrivate->callerReadAccess	= UNKNOWN;
 	sessionPrivate->callerWriteAccess	= UNKNOWN;
 	sessionPrivate->isSetChange		= UNKNOWN;
 	sessionPrivate->isVPNChange		= UNKNOWN;
-	sessionPrivate->vpnTypes		= NULL;
-	sessionPrivate->prefs			= NULL;
-	sessionPrivate->backtraces		= NULL;
+	pthread_mutex_unlock(&sessionPrivate->lock);
 
 	// keep track this session
 	pthread_mutex_lock(&sessions_lock);
@@ -633,7 +637,7 @@ __SCHelperSessionLogBacktrace(const void *value, void *context)
 
 		snprintf(path,
 			 sizeof(path),
-			 "/Library/Logs/CrashReporter/SCHelper-%4d-%02d-%02d-%02d%02d%02d.log",
+			 _SC_CRASH_DIR "/" "SCHelper-%4d-%02d-%02d-%02d%02d%02d.log",
 			 tm_now.tm_year + 1900,
 			 tm_now.tm_mon + 1,
 			 tm_now.tm_mday,
@@ -647,7 +651,7 @@ __SCHelperSessionLogBacktrace(const void *value, void *context)
 			return;
 		}
 
-		SCLog(TRUE, LOG_INFO, CFSTR("created backtrace log: %s"), path);
+		SC_log(LOG_INFO, "created backtrace log: %s", path);
 	}
 
 	SCPrint(TRUE, *logFile, CFSTR("%@\n"), backtrace);
@@ -659,6 +663,9 @@ __SCHelperSessionLogBacktrace(const void *value, void *context)
 #pragma mark Helpers
 
 
+#define	HELPER_STATUS_NO_REPLY	UINT32_MAX
+
+
 /*
  * EXIT
  *   (in)  data   = N/A
@@ -668,7 +675,11 @@ __SCHelperSessionLogBacktrace(const void *value, void *context)
 static Boolean
 do_Exit(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
-	*status = -1;
+#pragma unused(session)
+#pragma unused(info)
+#pragma unused(data)
+#pragma unused(reply)
+	*status = HELPER_STATUS_NO_REPLY;
 	return FALSE;
 }
 
@@ -684,13 +695,15 @@ do_Exit(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status
 static Boolean
 do_Auth(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(reply)
 	CFDictionaryRef	authorizationDict;
 #if	!TARGET_OS_IPHONE
 	CFDataRef	authorizationData	= NULL;
-#endif
+#endif	// !TARGET_OS_IPHONE
 	Boolean		ok			= FALSE;
 
-	if (_SCUnserialize((CFPropertyListRef*)&authorizationDict, data, NULL, 0) == FALSE) {
+	if (!_SCUnserialize((CFPropertyListRef*)&authorizationDict, data, NULL, 0)) {
 		return FALSE;
 	}
 
@@ -708,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;
 
@@ -736,6 +749,7 @@ do_Auth(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status
 static Boolean
 do_keychain_copy(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
 	Boolean			ok		= FALSE;
 	SCPreferencesRef	prefs;
 	CFStringRef		unique_id	= NULL;
@@ -770,6 +784,8 @@ do_keychain_copy(SCHelperSessionRef session, void *info, CFDataRef data, uint32_
 static Boolean
 do_keychain_exists(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(reply)
 	Boolean			ok		= FALSE;
 	SCPreferencesRef	prefs;
 	CFStringRef		unique_id	= NULL;
@@ -803,6 +819,8 @@ do_keychain_exists(SCHelperSessionRef session, void *info, CFDataRef data, uint3
 static Boolean
 do_keychain_remove(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(reply)
 	Boolean			ok		= FALSE;
 	SCPreferencesRef	prefs;
 	CFStringRef		unique_id	= NULL;
@@ -836,6 +854,8 @@ do_keychain_remove(SCHelperSessionRef session, void *info, CFDataRef data, uint3
 static Boolean
 do_keychain_set(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(reply)
 	CFStringRef		account;
 	CFStringRef		description;
 	CFArrayRef		executablePaths	= NULL;
@@ -927,18 +947,21 @@ do_keychain_set(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 static Boolean
 do_interface_refresh(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(session)
+#pragma unused(info)
+#pragma unused(reply)
 	CFStringRef	ifName	= NULL;
 	Boolean		ok	= FALSE;
 
 	if ((data != NULL) && !_SCUnserializeString(&ifName, data, NULL, 0)) {
 		*status = kSCStatusInvalidArgument;
-		SCLog(TRUE, LOG_ERR, CFSTR("interface name not valid"));
+		SC_log(LOG_NOTICE, "interface name not valid");
 		return FALSE;
 	}
 
 	if (ifName == NULL) {
 		*status = kSCStatusInvalidArgument;
-		SCLog(TRUE, LOG_ERR, CFSTR("interface name not valid"));
+		SC_log(LOG_NOTICE, "interface name not valid");
 		return FALSE;
 	}
 
@@ -946,14 +969,13 @@ do_interface_refresh(SCHelperSessionRef session, void *info, CFDataRef data, uin
 		ok = _SCNetworkInterfaceForceConfigurationRefresh(ifName);
 		if (!ok) {
 			*status = SCError();
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("interface \"%@\" not refreshed: %s"),
+			SC_log(LOG_NOTICE, "interface \"%@\" not refreshed: %s",
 			      ifName,
 			      SCErrorString(*status));
 		}
 	} else {
 		*status = kSCStatusInvalidArgument;
-		SCLog(TRUE, LOG_ERR, CFSTR("interface name not valid"));
+		SC_log(LOG_NOTICE, "interface name not valid");
 	}
 
 	CFRelease(ifName);
@@ -971,6 +993,8 @@ do_interface_refresh(SCHelperSessionRef session, void *info, CFDataRef data, uin
 static Boolean
 do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(reply)
 	CFStringRef		name;
 	CFDictionaryRef		options;
 	CFNumberRef		pid;
@@ -985,12 +1009,12 @@ do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 	}
 
 	if ((data != NULL) && !_SCUnserialize((CFPropertyListRef *)&prefsInfo, data, NULL, 0)) {
-		SCLog(TRUE, LOG_ERR, CFSTR("data not valid, %@"), data);
+		SC_log(LOG_NOTICE, "data not valid, %@", data);
 		return FALSE;
 	}
 
 	if ((prefsInfo == NULL) || !isA_CFDictionary(prefsInfo)) {
-		SCLog(TRUE, LOG_ERR, CFSTR("info not valid"));
+		SC_log(LOG_NOTICE, "info not valid");
 		if (prefsInfo != NULL) CFRelease(prefsInfo);
 		return FALSE;
 	}
@@ -1004,7 +1028,7 @@ do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 		    CFStringHasSuffix(prefsID, CFSTR("/..")) ||
 		    (CFStringFind(prefsID, CFSTR("/../"), 0).location != kCFNotFound)) {
 			// if we're trying to escape from the preferences directory
-			SCLog(TRUE, LOG_ERR, CFSTR("prefsID (%@) not valid"), prefsID);
+			SC_log(LOG_NOTICE, "prefsID (%@) not valid", prefsID);
 			CFRelease(prefsInfo);
 			*status = kSCStatusInvalidArgument;
 			return TRUE;
@@ -1018,7 +1042,7 @@ do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 	// get preferences session "name"
 	name = CFDictionaryGetValue(prefsInfo, CFSTR("name"));
 	if (!isA_CFString(name)) {
-		SCLog(TRUE, LOG_ERR, CFSTR("session \"name\" not valid"));
+		SC_log(LOG_NOTICE, "session \"name\" not valid");
 		CFRelease(prefsInfo);
 		return FALSE;
 	}
@@ -1026,7 +1050,7 @@ do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 	// get PID of caller
 	pid = CFDictionaryGetValue(prefsInfo, CFSTR("PID"));
 	if (!isA_CFNumber(pid)) {
-		SCLog(TRUE, LOG_ERR, CFSTR("PID not valid"));
+		SC_log(LOG_NOTICE, "PID not valid");
 		CFRelease(prefsInfo);
 		return FALSE;
 	}
@@ -1034,7 +1058,7 @@ do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 	// get process name of caller
 	proc_name = CFDictionaryGetValue(prefsInfo, CFSTR("PROC_NAME"));
 	if (!isA_CFString(proc_name)) {
-		SCLog(TRUE, LOG_ERR, CFSTR("process name not valid"));
+		SC_log(LOG_NOTICE, "process name not valid");
 		CFRelease(prefsInfo);
 		return FALSE;
 	}
@@ -1085,6 +1109,8 @@ do_prefs_Open(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 static Boolean
 do_prefs_Access(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(data)
 	Boolean			ok;
 	SCPreferencesRef	prefs		= __SCHelperSessionGetPreferences(session);
 	CFDataRef		signature;
@@ -1135,6 +1161,7 @@ do_prefs_Access(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 static Boolean
 do_prefs_Lock(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(reply)
 	CFDataRef		clientSignature	= (CFDataRef)data;
 	Boolean			ok;
 	SCPreferencesRef	prefs		= __SCHelperSessionGetPreferences(session);
@@ -1173,13 +1200,18 @@ do_prefs_Lock(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *
 static Boolean
 do_prefs_Commit(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
 	Boolean			ok;
-	SCPreferencesRef	prefs		= __SCHelperSessionGetPreferences(session);
-	CFPropertyListRef	prefsData	= NULL;
-	SCPreferencesPrivateRef	prefsPrivate	= (SCPreferencesPrivateRef)prefs;
+	SCPreferencesRef	prefs			= __SCHelperSessionGetPreferences(session);
+	CFPropertyListRef	prefsData		= NULL;
+	SCPreferencesPrivateRef	prefsPrivate		= (SCPreferencesPrivateRef)prefs;
+	Boolean			saveAccessed;
+	Boolean			saveChanged;
+	CFMutableDictionaryRef	savePrefs		= NULL;
+	Boolean			saveValid		= FALSE;
 	Boolean			useSetFilter;
 	Boolean			useVPNFilter;
-	CFArrayRef		vpnTypes	= NULL;
+	CFArrayRef		vpnTypes		= NULL;
 
 	if (prefs == NULL) {
 		return FALSE;
@@ -1293,20 +1325,39 @@ do_prefs_Commit(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 		}
 	}
 
-	if (prefsPrivate->prefs != NULL) {
-		CFRelease(prefsPrivate->prefs);
-	}
-	prefsPrivate->prefs    = CFDictionaryCreateMutableCopy(NULL, 0, prefsData);
-	prefsPrivate->accessed = TRUE;
-	prefsPrivate->changed  = TRUE;
+	/* Take a backup of prefs, accessed bit, changed bit to
+	 restore them IFF the commit fails. Pretend as if the
+	 commit never happened!
+	 */
+	savePrefs = prefsPrivate->prefs;
+	saveAccessed = prefsPrivate->accessed;
+	saveChanged = prefsPrivate->changed;
+
+	prefsPrivate->prefs	= CFDictionaryCreateMutableCopy(NULL, 0, prefsData);
+	prefsPrivate->accessed	= TRUE;
+	prefsPrivate->changed	= TRUE;
+	saveValid		= TRUE;
 
     commit :
 
 	ok = SCPreferencesCommitChanges(prefs);
 	if (ok) {
+		if (savePrefs != NULL) {
+			CFRelease(savePrefs);
+		}
 		*reply = SCPreferencesGetSignature(prefs);
 		CFRetain(*reply);
 	} else {
+		/* Restore the backup we took earlier */
+		if (saveValid) {
+			if (prefsPrivate->prefs != NULL) {
+				CFRelease(prefsPrivate->prefs);
+			}
+
+			prefsPrivate->prefs = savePrefs;
+			prefsPrivate->accessed = saveAccessed;
+			prefsPrivate->changed = saveChanged;
+		}
 		*status = SCError();
 	}
 
@@ -1326,6 +1377,9 @@ do_prefs_Commit(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 static Boolean
 do_prefs_Apply(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(data)
+#pragma unused(reply)
 	Boolean			ok;
 	SCPreferencesRef	prefs	= __SCHelperSessionGetPreferences(session);
 
@@ -1351,6 +1405,9 @@ do_prefs_Apply(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 static Boolean
 do_prefs_Unlock(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(data)
+#pragma unused(reply)
 	Boolean			ok;
 	SCPreferencesRef	prefs	= __SCHelperSessionGetPreferences(session);
 
@@ -1376,6 +1433,9 @@ do_prefs_Unlock(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 static Boolean
 do_prefs_Close(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(data)
+#pragma unused(reply)
 	SCPreferencesRef	prefs	= __SCHelperSessionGetPreferences(session);
 
 	if (prefs == NULL) {
@@ -1383,7 +1443,7 @@ do_prefs_Close(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 	}
 
 	__SCHelperSessionSetPreferences(session, NULL);
-	*status = -1;
+	*status = HELPER_STATUS_NO_REPLY;
 	return TRUE;
 }
 
@@ -1397,6 +1457,9 @@ do_prefs_Close(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t
 static Boolean
 do_prefs_Synchronize(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status, CFDataRef *reply)
 {
+#pragma unused(info)
+#pragma unused(data)
+#pragma unused(reply)
 	SCPreferencesRef	prefs	= __SCHelperSessionGetPreferences(session);
 
 	if (prefs == NULL) {
@@ -1469,20 +1532,18 @@ copyEntitlement(SCHelperSessionRef session, CFStringRef entitlement)
 			if (!CFEqual(domain, kCFErrorDomainMach) ||
 			    ((code != kIOReturnInvalid) && (code != kIOReturnNotFound))) {
 				// if unexpected error
-				SCLog(TRUE, LOG_ERR,
-				      CFSTR("SecTaskCopyValueForEntitlement(,\"%@\",) failed, error = %@ : %@"),
-				      entitlement,
-				      error,
-				      sessionName(session));
+				SC_log(LOG_NOTICE, "SecTaskCopyValueForEntitlement(,\"%@\",) failed, error = %@ : %@",
+				       entitlement,
+				       error,
+				       sessionName(session));
 			}
 			CFRelease(error);
 		}
 
 		CFRelease(task);
 	} else {
-		SCLog(TRUE, LOG_ERR,
-		      CFSTR("SecTaskCreateWithAuditToken() failed: %@"),
-		      sessionName(session));
+		SC_log(LOG_NOTICE, "SecTaskCreateWithAuditToken() failed: %@",
+		       sessionName(session));
 	}
 
 	return value;
@@ -1592,10 +1653,9 @@ checkEntitlement(SCHelperSessionRef session, CFStringRef prefsID, CFStringRef en
 				hasEntitlement = TRUE;
 			}
 		} else {
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("hasAuthorization() session=%@: entitlement=%@: not valid"),
-			      sessionName(session),
-			      entitlement_name);
+			SC_log(LOG_NOTICE, "hasAuthorization() session=%@: entitlement=%@: not valid",
+			       sessionName(session),
+			       entitlement_name);
 		}
 
 		CFRelease(entitlement);
@@ -1665,9 +1725,8 @@ hasAuthorization(SCHelperSessionRef session, Boolean needWrite)
 						 flags,
 						 NULL);
 		if (status != errAuthorizationSuccess) {
-			SCLog(TRUE, LOG_DEBUG,
-			      CFSTR("AuthorizationCopyRights() failed: status = %d"),
-			      (int)status);
+			SC_log(LOG_INFO, "AuthorizationCopyRights() failed: status = %d",
+			       (int)status);
 			return FALSE;
 		}
 
@@ -1690,10 +1749,9 @@ hasAuthorization(SCHelperSessionRef session, Boolean needWrite)
 		if (sessionPrivate->callerWriteAccess == YES) {
 			return TRUE;
 		} else {
-			SCLog(TRUE, LOG_ERR,
-			      CFSTR("SCPreferences write access to \"%@\" denied, no entitlement for \"%@\""),
-			      prefsID,
-			      sessionName(session));
+			SC_log(LOG_NOTICE, "SCPreferences write access to \"%@\" denied, no entitlement for \"%@\"",
+			       prefsID,
+			       sessionName(session));
 			return FALSE;
 		}
 	}
@@ -1710,10 +1768,9 @@ hasAuthorization(SCHelperSessionRef session, Boolean needWrite)
 		return TRUE;
 	}
 
-	SCLog(TRUE, LOG_ERR,
-	      CFSTR("SCPreferences access to \"%@\" denied, no entitlement for \"%@\""),
-	      prefsID,
-	      sessionName(session));
+	SC_log(LOG_NOTICE, "SCPreferences access to \"%@\" denied, no entitlement for \"%@\"",
+	       prefsID,
+	       sessionName(session));
 	return FALSE;
 }
 
@@ -1760,11 +1817,9 @@ static const struct helper {
 
 
 static int
-findCommand(uint32_t command)
+findCommand(int command)
 {
-	int	i;
-
-	for (i = 0; i < (int)nHELPERS; i++) {
+	for (int i = 0; i < (int)nHELPERS; i++) {
 		if (helpers[i].command == command) {
 			return i;
 		}
@@ -1777,6 +1832,7 @@ findCommand(uint32_t command)
 static void *
 newHelper(void *arg)
 {
+	int				ret;
 	CFRunLoopSourceRef		rls		= NULL;
 	SCHelperSessionRef		session		= (SCHelperSessionRef)arg;
 	SCHelperSessionPrivateRef	sessionPrivate	= (SCHelperSessionPrivateRef)session;
@@ -1786,6 +1842,11 @@ newHelper(void *arg)
 
 	__SCHelperSessionSetThreadName(session);
 
+	ret = pthread_set_qos_class_self_np(QOS_CLASS_USER_INITIATED, 0);
+	if (ret != 0) {
+		SC_log(LOG_ERR, "pthread_set_qos_class_self_np() failed: %s", strerror(errno));
+	}
+
 	rls = CFMachPortCreateRunLoopSource(NULL, sessionPrivate->mp, 0);
 	CFRelease(sessionPrivate->mp);
 
@@ -1793,9 +1854,9 @@ newHelper(void *arg)
 		CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode);
 		CFRelease(rls);
 
-		SCLog(debug, LOG_DEBUG, CFSTR("%p : start"), session);
+		SC_log(LOG_INFO, "%p : start", session);
 		CFRunLoopRun();
-		SCLog(debug, LOG_DEBUG, CFSTR("%p : stop"), session);
+		SC_log(LOG_INFO, "%p : stop", session);
 	}
 
 	return NULL;
@@ -1863,9 +1924,9 @@ notify_server(mach_msg_header_t *request, mach_msg_header_t *reply)
 			break;
 	}
 
-	SCLog(TRUE, LOG_ERR, CFSTR("HELP!, Received notification: port=%d, msgh_id=%d"),
-	      Request->not_header.msgh_local_port,
-	      Request->not_header.msgh_id);
+	SC_log(LOG_NOTICE, "HELP!, Received notification: port=%d, msgh_id=%d",
+	       Request->not_header.msgh_local_port,
+	       Request->not_header.msgh_id);
 
 	Reply->NDR     = NDR_record;
 	Reply->RetCode = MIG_BAD_ID;
@@ -1898,7 +1959,7 @@ helper_demux(mach_msg_header_t *request, mach_msg_header_t *reply)
 	/*
 	 * unknown message ID, log and return an error.
 	 */
-	SCLog(TRUE, LOG_ERR, CFSTR("helper_demux(): unknown message ID (%d) received"), request->msgh_id);
+	SC_log(LOG_NOTICE, "helper_demux(): unknown message ID (%d) received", request->msgh_id);
 	reply->msgh_bits        = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request->msgh_bits), 0);
 	reply->msgh_remote_port = request->msgh_remote_port;
 	reply->msgh_size        = sizeof(mig_reply_error_t);	/* Minimal size */
@@ -1917,10 +1978,13 @@ helper_demux(mach_msg_header_t *request, mach_msg_header_t *reply)
 static void
 helperCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
 {
+#pragma unused(port)
+#pragma unused(size)
+#pragma unused(info)
 	mig_reply_error_t *	bufRequest	= msg;
 	uint32_t		bufReply_q[MACH_MSG_BUFFER_SIZE/sizeof(uint32_t)];
 	mig_reply_error_t *	bufReply	= (mig_reply_error_t *)bufReply_q;
-	static CFIndex		bufSize		= 0;
+	static size_t		bufSize		= 0;
 	mach_msg_return_t	mr;
 	int			options;
 
@@ -1930,9 +1994,8 @@ helperCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
 
 		// check if our on-the-stack reply buffer will be big enough
 		if (bufSize > sizeof(bufReply_q)) {
-			SCLog(TRUE, LOG_NOTICE,
-			      CFSTR("helperCallback(): buffer size should be increased > %d"),
-			      _helper_subsystem.maxsize);
+			SC_log(LOG_NOTICE, "buffer size should be increased > %d",
+			       _helper_subsystem.maxsize);
 		}
 	}
 
@@ -2001,6 +2064,7 @@ helperCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
 
 	if (bufReply != (mig_reply_error_t *)bufReply_q)
 		CFAllocatorDeallocate(NULL, bufReply);
+
 	return;
 }
 
@@ -2008,6 +2072,7 @@ helperCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
 static CFStringRef
 initMPCopyDescription(const void *info)
 {
+#pragma unused(info)
 	return CFStringCreateWithFormat(NULL, NULL, CFSTR(""));
 }
 
@@ -2032,10 +2097,12 @@ _helperinit(mach_port_t			server,
 	pthread_attr_t			tattr;
 	pthread_t			tid;
 
+	*newSession = MACH_PORT_NULL;
+
 	session = __SCHelperSessionFindWithPort(server);
 	if (session != NULL) {
 #ifdef	DEBUG
-		SCLog(TRUE, LOG_DEBUG, CFSTR("_helperinit(): session is already open."));
+		SC_log(LOG_DEBUG, "session is already open");
 #endif	/* DEBUG */
 		*status = kSCStatusFailed;	/* you can't re-open an "open" session */
 		return KERN_SUCCESS;
@@ -2046,11 +2113,9 @@ _helperinit(mach_port_t			server,
 	sessionPrivate = (SCHelperSessionPrivateRef)session;
 
 	// create per-session port
-	kr = mach_port_allocate(mach_task_self(),
-				MACH_PORT_RIGHT_RECEIVE,
-				&sessionPrivate->port);
+	kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &sessionPrivate->port);
 	if (kr != KERN_SUCCESS) {
-		SCLog(TRUE, LOG_ERR, CFSTR("_helperinit(): mach_port_allocate() failed: %s"), mach_error_string(kr));
+		SC_log(LOG_ERR, "mach_port_allocate() failed: %s", mach_error_string(kr));
 		*status = kr;
 		goto done;
 	}
@@ -2083,7 +2148,7 @@ _helperinit(mach_port_t			server,
 					    MACH_MSG_TYPE_MAKE_SEND_ONCE,
 					    &oldNotify);
 	if (kr != KERN_SUCCESS) {
-		SCLog(TRUE, LOG_ERR, CFSTR("_helperinit() mach_port_request_notification() failed: %s"), mach_error_string(kr));
+		SC_log(LOG_NOTICE, "mach_port_request_notification() failed: %s", mach_error_string(kr));
 
 		// clean up CFMachPort, mach port rights
 		CFMachPortInvalidate(sessionPrivate->mp);
@@ -2096,7 +2161,7 @@ _helperinit(mach_port_t			server,
 	}
 
 	if (oldNotify != MACH_PORT_NULL) {
-		SCLog(TRUE, LOG_ERR, CFSTR("_helperinit(): oldNotify != MACH_PORT_NULL"));
+		SC_log(LOG_NOTICE, "oldNotify != MACH_PORT_NULL");
 	}
 
 	// add send right (that will be passed back to the client)
@@ -2118,7 +2183,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);
 
@@ -2177,23 +2242,21 @@ _helperexec(mach_port_t			server,
 
 	i = findCommand(msgID);
 	if (i == -1) {
-		SCLog(TRUE, LOG_ERR, CFSTR("received unknown command : %u"), msgID);
+		SC_log(LOG_NOTICE, "received unknown command : %u", msgID);
 		*status = kSCStatusInvalidArgument;
 		goto done;
 	}
 
-	SCLog(debug, LOG_DEBUG,
-	      CFSTR("%p : processing command \"%s\"%s"),
-	      session,
-	      helpers[i].commandName,
-	      (data != NULL) ? " w/data" : "");
+	SC_log(LOG_INFO, "%p : processing command \"%s\"%s",
+	       session,
+	       helpers[i].commandName,
+	       (data != NULL) ? " w/data" : "");
 
 	if (helpers[i].needsAuthorization &&
 	    !hasAuthorization(session, helpers[i].needsWrite)) {
-		SCLog(debug, LOG_DEBUG,
-		      CFSTR("%p : command \"%s\" : not authorized"),
-		      session,
-		      helpers[i].commandName);
+		SC_log(LOG_INFO, "%p : command \"%s\" : not authorized",
+		       session,
+		       helpers[i].commandName);
 		*status = kSCStatusAccessError;
 	}
 
@@ -2204,14 +2267,13 @@ _helperexec(mach_port_t			server,
 		(*helpers[i].func)(session, helpers[i].info, data, status, &reply);
 	}
 
-	if ((*status != -1) || (reply != NULL)) {
+	if ((*status != HELPER_STATUS_NO_REPLY) || (reply != NULL)) {
 		Boolean	ok;
 
-		SCLog(debug, LOG_DEBUG,
-		      CFSTR("%p : sending status %u%s"),
-		      session,
-		      *status,
-		      (reply != NULL) ? " w/reply" : "");
+		SC_log(LOG_INFO, "%p : sending status %u%s",
+		       session,
+		       *status,
+		       (reply != NULL) ? " w/reply" : "");
 
 		/* serialize the data */
 		if (reply != NULL) {
@@ -2219,8 +2281,6 @@ _helperexec(mach_port_t			server,
 
 			ok = _SCSerializeData(reply, (void **)replyRef, &len);
 			*replyLen = (mach_msg_type_number_t)len;
-			CFRelease(reply);
-			reply = NULL;
 			if (!ok) {
 				*status = SCError();
 				goto done;
@@ -2240,6 +2300,7 @@ _helperexec(mach_port_t			server,
 static CFStringRef
 helperMPCopyDescription(const void *info)
 {
+#pragma unused(info)
 	return CFStringCreateWithFormat(NULL, NULL, CFSTR("
")); } @@ -2260,9 +2321,8 @@ init_MiG(const char *service_name, int *n_listeners) kr = bootstrap_check_in(bootstrap_port, service_name, &service_port); if (kr != BOOTSTRAP_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCHelper: bootstrap_check_in() failed: %s"), - bootstrap_strerror(kr)); + SC_log(LOG_NOTICE, "bootstrap_check_in() failed: %s", + bootstrap_strerror(kr)); return 1; } @@ -2303,6 +2363,7 @@ main(int argc, char **argv) // extern int optind; int opt; int opti; + int ret; openlog("SCHelper", LOG_CONS|LOG_PID, LOG_DAEMON); @@ -2318,8 +2379,7 @@ main(int argc, char **argv) break; case '?': default : - SCLog(TRUE, LOG_ERR, - CFSTR("ignoring unknown or ambiguous command line option")); + SC_log(LOG_NOTICE, "ignoring unknown or ambiguous command line option"); break; } } @@ -2327,7 +2387,7 @@ main(int argc, char **argv) // argv += optind; if (geteuid() != 0) { - SCLog(TRUE, LOG_ERR, CFSTR("%s"), strerror(EACCES)); + SC_log(LOG_NOTICE, "%s", strerror(EACCES)); exit(EACCES); } @@ -2340,6 +2400,11 @@ main(int argc, char **argv) pthread_setname_np("SCHelper main thread"); + ret = pthread_set_qos_class_self_np(QOS_CLASS_USER_INITIATED, 0); + if (ret != 0) { + SC_log(LOG_ERR, "pthread_set_qos_class_self_np() failed: %s", strerror(errno)); + } + while (!done) { SInt32 rlStatus; int gen_current; @@ -2368,7 +2433,7 @@ main(int argc, char **argv) if (gen_reported != gen_current) { FILE *logFile = NULL; - SCLog(TRUE, LOG_NOTICE, CFSTR("active (but IDLE) sessions")); + SC_log(LOG_INFO, "active (but IDLE) sessions"); CFSetApplyFunction(sessions, __SCHelperSessionLog, (void *)&logFile); gen_reported = gen_current; diff --git a/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper-embedded.plist b/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper-embedded.plist index bafb82f92..3b1ec03ae 100644 --- a/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper-embedded.plist +++ b/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper-embedded.plist @@ -2,6 +2,10 @@ + EnableTransactions + + EnablePressuredExit + Label com.apple.SCHelper Program @@ -12,6 +16,6 @@ POSIXSpawnType - Adaptive + Interactive diff --git a/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper.plist b/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper.plist index b6612a4f8..c364cf0c9 100644 --- a/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper.plist +++ b/src/configd/SystemConfiguration.fproj/helper/com.apple.SCHelper.plist @@ -12,6 +12,6 @@ POSIXSpawnType - Adaptive + Interactive diff --git a/src/configd/SystemConfiguration.fproj/moh.c b/src/configd/SystemConfiguration.fproj/moh.c deleted file mode 100644 index e4853aac4..000000000 --- a/src/configd/SystemConfiguration.fproj/moh.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) 2002, 2003, 2005, 2013, 2014 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 - * - * May 29, 2002 Roger Smith - * - initial revision - */ - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "moh.h" -#include "moh_msg.h" - -// Note: right now we are not currently using the deviceName. This could be the raw -// tty name such as "modem" since this is guaranteed to be unique in the /dev. -// We would use this deviceName to differientate between multiple MOH devices -// present in the system when we create the socket. - - -static ssize_t -readn(int ref, void *data, size_t len) -{ - size_t left = len; - ssize_t n; - void *p = data; - - while (left > 0) { - if ((n = read(ref, p, left)) == -1) { - if (errno != EINTR) { - return -1; - } - n = 0; - } else if (n == 0) { - break; /* EOF */ - } - - left -= n; - p += n; - } - return (len - left); -} - - -static ssize_t -writen(int ref, const void *data, size_t len) -{ - size_t left = len; - ssize_t n; - const void *p = data; - - while (left > 0) { - if ((n = write(ref, p, left)) == -1) { - if (errno != EINTR) { - return -1; - } - n = 0; - } - left -= n; - p += n; - } - return len; -} - - -__private_extern__ -int -MOHInit(int *ref, CFStringRef deviceName) -{ - int sock; - int status; - struct sockaddr_un sun; - - sock = socket(AF_LOCAL, SOCK_STREAM, 0); - - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_LOCAL; - strncpy(sun.sun_path, MOH_PATH, sizeof(sun.sun_path)); - - status = connect(sock, (struct sockaddr *)&sun, sizeof(sun)); - if (status == -1) { - return errno; - } - - *ref = sock; - return 0; -} - - -__private_extern__ -int -MOHDispose(int ref) -{ - if (close(ref) == -1) { - return errno; - } - return 0; -} - - -__private_extern__ -int -MOHExec(int ref, - uint32_t link, - uint32_t cmd, - void *request, - size_t requestLen, - void **reply, - size_t *replyLen) -{ - struct moh_msg_hdr msg; - char *buf = NULL; - ssize_t n; - - bzero(&msg, sizeof(msg)); - msg.m_type = cmd; - msg.m_link = link; - msg.m_len = ((request != NULL) && (requestLen > 0)) ? (uint32_t)requestLen : 0; - - // send the command - n = writen(ref, &msg, sizeof(msg)); - if (n == -1) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: %s"), strerror(errno)); - return errno; - } else if (n != sizeof(msg)) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: wrote=%ld"), n); - return -1; - } - - if ((request != NULL) && (requestLen > 0)) { - n = writen(ref, request, requestLen); - if (n == -1) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: %s"), strerror(errno)); - return errno; - } else if (n != (ssize_t)requestLen) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: wrote=%ld"), n); - return -1; - } - } - - // always expect a reply - n = readn(ref, &msg, sizeof(msg)); - if (n == -1) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: error=%s"), strerror(errno)); - return errno; - } else if (n != sizeof(msg)) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: insufficent data, read=%ld"), n); - return -1; - } - - if (msg.m_len) { - buf = CFAllocatorAllocate(NULL, msg.m_len, 0); - if (buf) { - // read reply - n = readn(ref, buf, msg.m_len); - if (n == -1) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: error=%s"), strerror(errno)); - CFAllocatorDeallocate(NULL, buf); - return errno; - } else if (n != (ssize_t)msg.m_len) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: insufficent data, read=%ld"), n); - CFAllocatorDeallocate(NULL, buf); - return -1; - } - } - } - - if (reply && replyLen) { - *reply = buf; - *replyLen = msg.m_len; - } else if (buf) { - // if additional returned data is unwanted - CFAllocatorDeallocate(NULL, buf); - } - - return msg.m_result; -} - diff --git a/src/configd/SystemConfiguration.fproj/moh_msg.h b/src/configd/SystemConfiguration.fproj/moh_msg.h deleted file mode 100644 index 77b120f95..000000000 --- a/src/configd/SystemConfiguration.fproj/moh_msg.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2002, 2003, 2005 Apple Computer, 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 _MOH_MSG_H -#define _MOH_MSG_H - -#include - -/* local socket path */ -#define MOH_PATH "/tmp/.modemOnHold" -#define CURRENT_VERSION 1 - -/* MOH message paquets */ -struct moh_msg_hdr { - uint32_t m_type; // type of the message - uint32_t m_result; // error code of notification message - uint32_t m_cookie; // user param - uint32_t m_link; // link for this message - uint32_t m_len; // len of the following data -}; - -struct moh_msg { - uint32_t m_type; // type of the message - uint32_t m_result; // error code of notification message - uint32_t m_cookie; // user param, or error num for event - uint32_t m_link; // link for this message - uint32_t m_len; // len of the following data - u_char m_data[1]; // msg data sent or received -}; - -/* codes for MOH messages */ -enum { - /* API client commands */ - MOH_VERSION = 1, - MOH_DEVICE_SUPPORTS_HOLD, - MOH_SESSION_SUPPORTS_HOLD, - MOH_PUT_SESSION_ON_HOLD, - MOH_RESUME_SESSION_ON_HOLD, - MOH_SESSION_IS_ON_HOLD, - MOH_SESSION_GET_STATUS -}; - -#endif /* _MOH_MSG_H */ - diff --git a/src/configd/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c b/src/configd/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c deleted file mode 100644 index 41fc8023c..000000000 --- a/src/configd/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c +++ /dev/null @@ -1,1218 +0,0 @@ -/* - * Copyright (c) 2011-2014 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@ - */ - -#include -#include -#include -#include "SCNetworkReachabilityInternal.h" - -#include -#include -#include - - -#pragma mark - -#pragma mark Globals - - -static Boolean serverAvailable = TRUE; - - -#pragma mark - -#pragma mark Support functions - - -static void -log_xpc_object(const char *msg, xpc_object_t obj) -{ - char *desc; - - desc = xpc_copy_description(obj); - SCLog(TRUE, LOG_DEBUG, CFSTR("%s = %s"), msg, desc); - free(desc); -} - - -#pragma mark - -#pragma mark Reachability [RBT] client support - - -typedef struct { - rb_node_t rbn; - SCNetworkReachabilityRef target; -} reach_request_t; - - -static int -_rbt_compare_transaction_nodes(void *context, const void *n1, const void *n2) -{ - uint64_t a = (uintptr_t)(((reach_request_t *)n1)->target); - uint64_t b = (uintptr_t)(((reach_request_t *)n2)->target); - - if (a == b) { - return 0; - } else if (a < b) { - return -1; - } else { - return 1; - } -} - - -static int -_rbt_compare_transaction_key(void *context, const void *n1, const void *key) -{ - uint64_t a = (uintptr_t)(((reach_request_t *)n1)->target); - uint64_t b = *(uint64_t *)key; - - if (a == b) { - return 0; - } else if (a < b) { - return -1; - } else { - return 1; - } -} - - -static rb_tree_t * -_reach_requests_rbt() -{ - static dispatch_once_t once; - static const rb_tree_ops_t ops = { - .rbto_compare_nodes = _rbt_compare_transaction_nodes, - .rbto_compare_key = _rbt_compare_transaction_key, - .rbto_node_offset = offsetof(reach_request_t, rbn), - .rbto_context = NULL - }; - static rb_tree_t rbt; - - dispatch_once(&once, ^{ - rb_tree_init(&rbt, &ops); - }); - - return &rbt; -} - - -static dispatch_queue_t -_reach_requests_rbt_queue() -{ - static dispatch_once_t once; - static dispatch_queue_t q; - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME ".requests.rbt", NULL); - }); - - return q; -} - - -static reach_request_t * -_reach_request_create(SCNetworkReachabilityRef target) -{ - reach_request_t *request; - - request = calloc(1, sizeof(*request)); - request->target = CFRetain(target); - - return request; -} - - -static void -_reach_request_release(reach_request_t *request) -{ - SCNetworkReachabilityRef target = request->target; - - CFRelease(target); - free(request); - - return; -} - - -static void -_reach_request_add(SCNetworkReachabilityRef target) -{ - uint64_t target_id = (uintptr_t)target; - - dispatch_sync(_reach_requests_rbt_queue(), ^{ - rb_tree_t *rbt = _reach_requests_rbt(); - reach_request_t *request; - - request = rb_tree_find_node(rbt, &target_id); - if (request == NULL) { - request = _reach_request_create(target); - rb_tree_insert_node(rbt, request); - } - }); - - return; -} - - -static void -_reach_request_remove(SCNetworkReachabilityRef target) -{ - uint64_t target_id = (uintptr_t)target; - - dispatch_sync(_reach_requests_rbt_queue(), ^{ // FIXME ?? use dispatch_async? - rb_tree_t *rbt = _reach_requests_rbt(); - reach_request_t *request; - - request = rb_tree_find_node(rbt, &target_id); - if (request != NULL) { - rb_tree_remove_node(rbt, request); - _reach_request_release(request); - } - }); - - return; -} - - -static SCNetworkReachabilityRef -_reach_request_copy_target(uint64_t target_id) -{ - __block SCNetworkReachabilityRef target = NULL; - - dispatch_sync(_reach_requests_rbt_queue(), ^{ - rb_tree_t *rbt = _reach_requests_rbt(); - reach_request_t *request; - - request = rb_tree_find_node(rbt, &target_id); - if (request != NULL) { - target = request->target; - CFRetain(target); - } - }); - - return target; -} - - -#pragma mark - -#pragma mark Reachability [XPC] client support - - -static void -handle_reachability_status(SCNetworkReachabilityRef target, xpc_object_t dict) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (_sc_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%sgot [async] notification"), - targetPrivate->log_prefix); -// log_xpc_object(" status", dict); - } - - __SCNetworkReachabilityUpdateConcurrent(target); - - return; -} - - -static void -handle_async_notification(SCNetworkReachabilityRef target, xpc_object_t dict) -{ - int64_t op; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - op = xpc_dictionary_get_int64(dict, MESSAGE_NOTIFY); - switch (op) { - case MESSAGE_REACHABILITY_STATUS : - handle_reachability_status(target, dict); - break; - default : - SCLog(TRUE, LOG_ERR, CFSTR("%sgot [async] unknown reply : %lld"), - targetPrivate->log_prefix, - op); - log_xpc_object(" reply", dict); - break; - } - - return; -} - - -static dispatch_queue_t -_reach_xpc_queue() -{ - static dispatch_once_t once; - static dispatch_queue_t q; - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME ".xpc", NULL); - }); - - return q; -} - - -static void -_reach_connection_reconnect(xpc_connection_t connection); - - -static xpc_connection_t -_reach_connection_create() -{ - xpc_connection_t c; -#if !TARGET_IPHONE_SIMULATOR - const uint64_t flags = XPC_CONNECTION_MACH_SERVICE_PRIVILEGED; -#else // !TARGET_IPHONE_SIMULATOR - const uint64_t flags = 0; -#endif // !TARGET_IPHONE_SIMULATOR - const char *name; - dispatch_queue_t q = _reach_xpc_queue(); - - // create XPC connection - name = getenv("REACH_SERVER"); - if ((name == NULL) || (issetugid() != 0)) { - name = REACH_SERVICE_NAME; - } - - c = xpc_connection_create_mach_service(name, q, flags); - - xpc_connection_set_event_handler(c, ^(xpc_object_t xobj) { - xpc_type_t type; - - type = xpc_get_type(xobj); - if (type == XPC_TYPE_DICTIONARY) { - SCNetworkReachabilityRef target; - uint64_t target_id; - - target_id = xpc_dictionary_get_uint64(xobj, REACH_CLIENT_TARGET_ID); - if (target_id == 0) { - SCLog(TRUE, LOG_ERR, - CFSTR("reach client %p: async reply with no target [ID]"), - c); - log_xpc_object(" reply", xobj); - return; - } - - target = _reach_request_copy_target(target_id); - if (target == NULL) { -// SCLog(TRUE, LOG_ERR, -// CFSTR("received unexpected target [ID] from SCNetworkReachability server")); -// log_xpc_object(" reply", xobj); - return; - } - - xpc_retain(xobj); - dispatch_async(__SCNetworkReachability_concurrent_queue(), ^{ - handle_async_notification(target, xobj); - CFRelease(target); - xpc_release(xobj); - }); - - } else if (type == XPC_TYPE_ERROR) { - if (xobj == XPC_ERROR_CONNECTION_INVALID) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - } else if (xobj == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("SCNetworkReachability server failure, reconnecting")); - _reach_connection_reconnect(c); - } else { - const char *desc; - - desc = xpc_dictionary_get_string(xobj, XPC_ERROR_KEY_DESCRIPTION); - SCLog(TRUE, LOG_ERR, - CFSTR("reach client %p: Connection error: %s"), - c, - desc); - } - - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach client %p: unknown event type : %p"), - c, - type); - } - }); - xpc_connection_resume(c); - - return c; -} - - -static xpc_connection_t -_reach_connection() -{ - static xpc_connection_t c; - static dispatch_once_t once; - static dispatch_queue_t q; - - if (!serverAvailable) { - // if SCNetworkReachability [XPC] server not available - return NULL; - } - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME ".connection", NULL); - }); - - dispatch_sync(q, ^{ - if (c == NULL) { - c = _reach_connection_create(); - } - }); - - return c; -} - - -typedef void (^reach_server_reply_handler_t)(xpc_object_t reply); - - -static void -add_proc_name(xpc_object_t reqdict) -{ - static const char *name = NULL; - static dispatch_once_t once; - - // add the process name - dispatch_once(&once, ^{ - name = getprogname(); - }); - xpc_dictionary_set_string(reqdict, REACH_CLIENT_PROC_NAME, name); - - return; -} - - -static void -_reach_server_target_reconnect(xpc_connection_t connection, SCNetworkReachabilityRef target, Boolean disconnect); - - -static Boolean -_reach_server_target_add(xpc_connection_t connection, SCNetworkReachabilityRef target) -{ - Boolean ok = FALSE; - xpc_object_t reply; - xpc_object_t reqdict; - Boolean retry = FALSE; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // create message - reqdict = xpc_dictionary_create(NULL, NULL, 0); - - // set request - xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_CREATE); - - // add reachability target info - switch (targetPrivate->type) { - case reachabilityTypeName : - xpc_dictionary_set_string(reqdict, - REACH_TARGET_NAME, - targetPrivate->name); - break; - case reachabilityTypeAddress : - case reachabilityTypeAddressPair : - if (targetPrivate->localAddress != NULL) { - xpc_dictionary_set_data(reqdict, - REACH_TARGET_LOCAL_ADDR, - targetPrivate->localAddress, - targetPrivate->localAddress->sa_len); - } - if (targetPrivate->remoteAddress != NULL) { - xpc_dictionary_set_data(reqdict, - REACH_TARGET_REMOTE_ADDR, - targetPrivate->remoteAddress, - targetPrivate->remoteAddress->sa_len); - } - break; - case reachabilityTypePTR : - xpc_dictionary_set_data(reqdict, - REACH_TARGET_PTR_ADDR, - targetPrivate->remoteAddress, - targetPrivate->remoteAddress->sa_len); - break; - } - if (targetPrivate->if_index != 0) { - xpc_dictionary_set_int64(reqdict, - REACH_TARGET_IF_INDEX, - targetPrivate->if_index); - xpc_dictionary_set_string(reqdict, - REACH_TARGET_IF_NAME, - targetPrivate->if_name); - } - if (targetPrivate->onDemandBypass) { - xpc_dictionary_set_bool(reqdict, - REACH_TARGET_ONDEMAND_BYPASS, - TRUE); - } - if (targetPrivate->resolverBypass) { - xpc_dictionary_set_bool(reqdict, - REACH_TARGET_RESOLVER_BYPASS, - TRUE); - } - - - - // add the target [ID] - xpc_dictionary_set_uint64(reqdict, REACH_CLIENT_TARGET_ID, (uintptr_t)target); - - // add the process name (for debugging) - add_proc_name(reqdict); - - retry : - - // send request to the SCNetworkReachability server - reply = xpc_connection_send_message_with_reply_sync(connection, reqdict); - if (reply != NULL) { - xpc_type_t type; - - type = xpc_get_type(reply); - if (type == XPC_TYPE_DICTIONARY) { - int64_t status; - - status = xpc_dictionary_get_int64(reply, REACH_REQUEST_REPLY); - ok = (status == REACH_REQUEST_REPLY_OK); - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("reach target %p: SCNetworkReachability server failure, retrying"), - target); - retry = TRUE; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach target %p: _targetAdd with unexpected reply"), - target); - log_xpc_object(" reply", reply); - } - - xpc_release(reply); - } - - if (retry) { - retry = FALSE; - goto retry; - } - - xpc_release(reqdict); - return ok; -} - - -static Boolean -_reach_server_target_remove(xpc_connection_t connection, SCNetworkReachabilityRef target) -{ - Boolean ok = FALSE; - xpc_object_t reply; - xpc_object_t reqdict; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // create message - reqdict = xpc_dictionary_create(NULL, NULL, 0); - - // set request - xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_REMOVE); - - // add the target [ID] - xpc_dictionary_set_uint64(reqdict, REACH_CLIENT_TARGET_ID, (uintptr_t)target); - - reply = xpc_connection_send_message_with_reply_sync(connection, reqdict); - if (reply != NULL) { - xpc_type_t type; - - type = xpc_get_type(reply); - if (type == XPC_TYPE_DICTIONARY) { - int64_t status; - - status = xpc_dictionary_get_int64(reply, REACH_REQUEST_REPLY); - switch (status) { - case REACH_REQUEST_REPLY_OK : - ok = TRUE; - break; - case REACH_REQUEST_REPLY_UNKNOWN : - // target not known by the server (most likely due to a - // SCNetworkReachability server failure), no need to - // remove. - ok = TRUE; - break; - default : { - SCLog(TRUE, LOG_ERR, CFSTR("%s target remove failed"), - targetPrivate->log_prefix); - log_xpc_object(" reply", reply); - } - } - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - ok = TRUE; - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("reach target %p: SCNetworkReachability server failure, no need to remove"), - target); - ok = TRUE; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach target %p: _targetRemove with unexpected reply"), - target); - log_xpc_object(" reply", reply); - } - - xpc_release(reply); - } - - xpc_release(reqdict); - return ok; -} - - -static Boolean -_reach_server_target_schedule(xpc_connection_t connection, SCNetworkReachabilityRef target) -{ - Boolean ok = FALSE; - xpc_object_t reply; - xpc_object_t reqdict; - Boolean retry = FALSE; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // create message - reqdict = xpc_dictionary_create(NULL, NULL, 0); - - // set request - xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_SCHEDULE); - - // add the target [ID] - xpc_dictionary_set_uint64(reqdict, REACH_CLIENT_TARGET_ID, (uintptr_t)target); - - retry : - - reply = xpc_connection_send_message_with_reply_sync(connection, reqdict); - if (reply != NULL) { - xpc_type_t type; - - type = xpc_get_type(reply); - if (type == XPC_TYPE_DICTIONARY) { - int64_t status; - - status = xpc_dictionary_get_int64(reply, REACH_REQUEST_REPLY); - switch (status) { - case REACH_REQUEST_REPLY_OK : - ok = TRUE; - break; - case REACH_REQUEST_REPLY_UNKNOWN : - // target not known by the server (most likely due to a - // SCNetworkReachability server failure), re-establish - // and retry scheduling. - retry = TRUE; - break; - default : { - SCLog(TRUE, LOG_ERR, CFSTR("%s target schedule failed"), - targetPrivate->log_prefix); - log_xpc_object(" reply", reply); - } - } - - if (ok) { - CFRetain(target); - } - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("reach target %p: SCNetworkReachability server failure, retry schedule"), - target); - retry = TRUE; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach target %p: _targetSchedule with unexpected reply"), - target); - log_xpc_object(" reply", reply); - } - - xpc_release(reply); - } - - if (retry) { - // reconnect - _reach_server_target_reconnect(connection, target, FALSE); - - // and retry - retry = FALSE; - goto retry; - } - - xpc_release(reqdict); - return ok; -} - - -static void -_reach_reply_set_reachability(SCNetworkReachabilityRef target, - xpc_object_t reply) -{ - char *if_name; - size_t len = 0; - - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - targetPrivate->serverInfo.cycle = xpc_dictionary_get_uint64(reply, - REACH_STATUS_CYCLE); - - targetPrivate->serverInfo.flags = (SCNetworkReachabilityFlags)xpc_dictionary_get_uint64(reply, - REACH_STATUS_FLAGS); - - targetPrivate->serverInfo.if_index = (unsigned int)xpc_dictionary_get_uint64(reply, - REACH_STATUS_IF_INDEX); - - bzero(&targetPrivate->serverInfo.if_name, sizeof(targetPrivate->serverInfo.if_name)); - if_name = (void *)xpc_dictionary_get_data(reply, - REACH_STATUS_IF_NAME, - &len); - if ((if_name != NULL) && (len > 0)) { - if (len > sizeof(targetPrivate->serverInfo.if_name)) { - len = sizeof(targetPrivate->serverInfo.if_name); - } - - bcopy(if_name, targetPrivate->serverInfo.if_name, len); - } - - targetPrivate->serverInfo.sleeping = xpc_dictionary_get_bool(reply, - REACH_STATUS_SLEEPING); - - if (isReachabilityTypeName(targetPrivate->type)) { - xpc_object_t addresses; - - if (targetPrivate->resolvedAddresses != NULL) { - CFRelease(targetPrivate->resolvedAddresses); - targetPrivate->resolvedAddresses = NULL; - } - - targetPrivate->resolvedError = (int)xpc_dictionary_get_int64(reply, - REACH_STATUS_RESOLVED_ERROR); - - addresses = xpc_dictionary_get_value(reply, REACH_STATUS_RESOLVED_ADDRESSES); - if ((addresses != NULL) && (xpc_get_type(addresses) != XPC_TYPE_ARRAY)) { - addresses = NULL; - } - - if ((targetPrivate->resolvedError == NETDB_SUCCESS) && (addresses != NULL)) { - int i; - size_t n; - CFMutableArrayRef newAddresses; - - newAddresses = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - n = xpc_array_get_count(addresses); - for (i = 0; i < n; i++) { - if (targetPrivate->type == reachabilityTypeName) { - struct sockaddr *sa; - size_t len; - CFDataRef newAddress; - - sa = (struct sockaddr *)xpc_array_get_data(addresses, i, &len); - newAddress = CFDataCreate(NULL, (const UInt8 *)sa, len); - CFArrayAppendValue(newAddresses, newAddress); - CFRelease(newAddress); - } else if (targetPrivate->type == reachabilityTypePTR) { - const char *str; - CFStringRef newName; - - str = xpc_array_get_string(addresses, i); - newName = CFStringCreateWithCString(NULL, str, kCFStringEncodingUTF8); - CFArrayAppendValue(newAddresses, newName); - CFRelease(newName); - } - } - - targetPrivate->resolvedAddresses = newAddresses; - } else { - /* save the error associated with the attempt to resolve the name */ - targetPrivate->resolvedAddresses = CFRetain(kCFNull); - } - - targetPrivate->dnsFlags = (uint32_t)xpc_dictionary_get_uint64(reply, - REACH_STATUS_DNS_FLAGS); - - targetPrivate->needResolve = FALSE; - } - - return; -} - - -static Boolean -_reach_server_target_status(xpc_connection_t connection, SCNetworkReachabilityRef target) -{ - Boolean ok = FALSE; - xpc_object_t reply; - xpc_object_t reqdict; - Boolean retry = FALSE; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (_sc_debug) { - CFStringRef str; - - str = _SCNetworkReachabilityCopyTargetDescription(target); - SCLog(TRUE, LOG_INFO, CFSTR("%scheckReachability(%@)"), - targetPrivate->log_prefix, - str); - CFRelease(str); - } - - // create message - reqdict = xpc_dictionary_create(NULL, NULL, 0); - - // set request - xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_STATUS); - - // add the target [ID] - xpc_dictionary_set_uint64(reqdict, REACH_CLIENT_TARGET_ID, (uintptr_t)target); - - retry : - - reply = xpc_connection_send_message_with_reply_sync(connection, reqdict); - if (reply != NULL) { - xpc_type_t type; - - type = xpc_get_type(reply); - if (type == XPC_TYPE_DICTIONARY) { - int64_t status; - - status = xpc_dictionary_get_int64(reply, REACH_REQUEST_REPLY); - switch (status) { - case REACH_REQUEST_REPLY_OK : - ok = TRUE; - break; - case REACH_REQUEST_REPLY_UNKNOWN : - // target not known by the server (most likely due to a - // SCNetworkReachability server failure), re-establish - // and retry status. - retry = TRUE; - break; - default : - SCLog(TRUE, LOG_INFO, CFSTR("%s target status failed"), - targetPrivate->log_prefix); - log_xpc_object(" reply", reply); - } - - if (ok) { - _reach_reply_set_reachability(target, reply); - - if (_sc_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s flags = 0x%08x"), - targetPrivate->log_prefix, - targetPrivate->serverInfo.flags); - if (targetPrivate->serverInfo.if_index != 0) { - SCLog(TRUE, LOG_INFO, CFSTR("%s device = %s (%u%s)"), - targetPrivate->log_prefix, - targetPrivate->serverInfo.if_name, - targetPrivate->serverInfo.if_index, - targetPrivate->serverInfo.sleeping ? ", z" : ""); - } - if (targetPrivate->serverInfo.cycle != targetPrivate->cycle) { - SCLog(TRUE, LOG_INFO, CFSTR("%s forced"), - targetPrivate->log_prefix); - } - } - } - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - ok = TRUE; - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("reach target %p: SCNetworkReachability server failure, retry status"), - target); - retry = TRUE; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach target %p: _targetStatus with unexpected reply"), - target); - log_xpc_object(" reply", reply); - } - - xpc_release(reply); - } - - if (retry) { - // reconnect - _reach_server_target_reconnect(connection, target, FALSE); - - // and retry - retry = FALSE; - goto retry; - } - - xpc_release(reqdict); - return ok; -} - - -static Boolean -_reach_server_target_unschedule(xpc_connection_t connection, SCNetworkReachabilityRef target) -{ - Boolean ok = FALSE; - xpc_object_t reply; - xpc_object_t reqdict; - Boolean retry = FALSE; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // create message - reqdict = xpc_dictionary_create(NULL, NULL, 0); - - // set request - xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_UNSCHEDULE); - - // add the target [ID] - xpc_dictionary_set_uint64(reqdict, REACH_CLIENT_TARGET_ID, (uintptr_t)target); - - reply = xpc_connection_send_message_with_reply_sync(connection, reqdict); - if (reply != NULL) { - xpc_type_t type; - - type = xpc_get_type(reply); - if (type == XPC_TYPE_DICTIONARY) { - int64_t status; - - status = xpc_dictionary_get_int64(reply, REACH_REQUEST_REPLY); - switch (status) { - case REACH_REQUEST_REPLY_OK : - ok = TRUE; - break; - case REACH_REQUEST_REPLY_UNKNOWN : - // target not known by the server (most likely due to a - // SCNetworkReachability server failure), re-establish - // but no need to unschedule. - retry = TRUE; - break; - default : - SCLog(TRUE, LOG_INFO, CFSTR("%s target unschedule failed"), - targetPrivate->log_prefix); - log_xpc_object(" reply", reply); - } - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - ok = TRUE; - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("reach target %p: SCNetworkReachability server failure, re-establish (but do not re-schedule)"), - target); - retry = TRUE; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach target %p: _targetUnschedule with unexpected reply"), - target); - log_xpc_object(" reply", reply); - } - - xpc_release(reply); - } - - if (retry) { - // reconnect - targetPrivate->serverScheduled = FALSE; - _reach_server_target_reconnect(connection, target, FALSE); - ok = TRUE; - } - - if (ok) { - CFRelease(target); - } - - xpc_release(reqdict); - return ok; -} - - -#pragma mark - -#pragma mark Reconnect - - -static void -_reach_server_target_reconnect(xpc_connection_t connection, SCNetworkReachabilityRef target, Boolean disconnect) -{ - Boolean ok; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (!targetPrivate->serverActive) { - // if target already removed - return; - } - - if (disconnect) { - // if we should first disconnect (unschedule, remove) - if (targetPrivate->serverScheduled) { - (void) _reach_server_target_unschedule(connection, target); - } - - (void) _reach_server_target_remove(connection, target); - } else { - // server has been restarted - targetPrivate->cycle = 0; - } - - // re-associate with server - ok = _reach_server_target_add(connection, target); - if (!ok) { - // if we could not add the target - return; - } - - if (!targetPrivate->serverScheduled) { - // if not scheduled - return; - } - - // ... and re-schedule with server - ok = _reach_server_target_schedule(connection, target); - if (!ok) { - // if we could not reschedule the target - return; - } - - // For addresses, update our status now. For names, queries will - // be updated with a callback - if (isReachabilityTypeAddress(targetPrivate->type)) { - __SCNetworkReachabilityUpdate(target); - } - - return; -} - - -static void -_reach_connection_reconnect(xpc_connection_t connection) -{ - dispatch_sync(_reach_requests_rbt_queue(), ^{ - rb_tree_t *rbt = _reach_requests_rbt(); - reach_request_t *request; - - RB_TREE_FOREACH(request, rbt) { - SCNetworkReachabilityRef target; - - xpc_retain(connection); - target = request->target; - CFRetain(target); - dispatch_async(__SCNetworkReachability_concurrent_queue(), ^{ - _reach_server_target_reconnect(connection, target, FALSE); - CFRelease(target); - xpc_release(connection); - }); - } - }); - - return; -} - - -#pragma mark - -#pragma mark SPI (exposed) - - -Boolean -_SCNetworkReachabilityServer_snapshot(void) -{ - xpc_connection_t c; - Boolean ok = FALSE; - xpc_object_t reply; - xpc_object_t reqdict; - - // initialize connection with SCNetworkReachability server - c = _reach_connection(); - if (c == NULL) { - return FALSE; - } - - // create message - reqdict = xpc_dictionary_create(NULL, NULL, 0); - - // set request - xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_SNAPSHOT); - - // add the process name (for debugging) - add_proc_name(reqdict); - - retry : - - // send request - reply = xpc_connection_send_message_with_reply_sync(c, reqdict); - if (reply != NULL) { - xpc_type_t type; - - type = xpc_get_type(reply); - if (type == XPC_TYPE_DICTIONARY) { - int64_t status; - - status = xpc_dictionary_get_int64(reply, REACH_REQUEST_REPLY); - ok = (status == REACH_REQUEST_REPLY_OK); - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability server not available")); - serverAvailable = FALSE; - } else if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("SCNetworkReachability server failure, retrying")); - xpc_release(reply); - goto retry; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("_snapshot with unexpected reply")); - log_xpc_object(" reply", reply); - } - - xpc_release(reply); - } - - xpc_release(reqdict); - return ok; -} - - -__private_extern__ -Boolean -__SCNetworkReachabilityServer_targetAdd(SCNetworkReachabilityRef target) -{ - xpc_connection_t c; - Boolean ok; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - c = _reach_connection(); - if (c == NULL) { - return FALSE; - } - - ok = _reach_server_target_add(c, target); - if (ok) { - _SC_ATOMIC_CMPXCHG(&targetPrivate->serverActive, FALSE, TRUE); - } - - return ok; -} - - -__private_extern__ -void -__SCNetworkReachabilityServer_targetRemove(SCNetworkReachabilityRef target) -{ - xpc_connection_t c; - Boolean ok; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (!targetPrivate->serverActive) { - // if not active - return; - } - - c = _reach_connection(); - if (c == NULL) { - return; - } - - ok = _reach_server_target_remove(c, target); - if (ok) { - _SC_ATOMIC_CMPXCHG(&targetPrivate->serverActive, TRUE, FALSE); - } - - return; -} - - -__private_extern__ -Boolean -__SCNetworkReachabilityServer_targetSchedule(SCNetworkReachabilityRef target) -{ - xpc_connection_t c; - Boolean ok; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - c = _reach_connection(); - if (c == NULL) { - return FALSE; - } - - _reach_request_add(target); - ok = _reach_server_target_schedule(c, target); - if (ok) { - _SC_ATOMIC_CMPXCHG(&targetPrivate->serverScheduled, FALSE, TRUE); - } else { - _reach_request_remove(target); - } - - return ok; -} - - -__private_extern__ -Boolean -__SCNetworkReachabilityServer_targetStatus(SCNetworkReachabilityRef target) -{ - xpc_connection_t c; - Boolean ok; - - c = _reach_connection(); - if (c == NULL) { - return FALSE; - } - - ok = _reach_server_target_status(c, target); - return ok; -} - - -__private_extern__ -Boolean -__SCNetworkReachabilityServer_targetUnschedule(SCNetworkReachabilityRef target) -{ - xpc_connection_t c; - Boolean ok; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (!targetPrivate->serverScheduled) { - // if not scheduled - return TRUE; - } - - c = _reach_connection(); - if (c == NULL) { - return FALSE; - } - - ok = _reach_server_target_unschedule(c, target); - if (ok) { - _SC_ATOMIC_CMPXCHG(&targetPrivate->serverScheduled, TRUE, FALSE); - _reach_request_remove(target); - } else { - // if unschedule failed - } - - return ok; -} - - diff --git a/src/configd/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c b/src/configd/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c deleted file mode 100644 index 50f090c01..000000000 --- a/src/configd/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c +++ /dev/null @@ -1,2125 +0,0 @@ -/* - * Copyright (c) 2011-2014 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@ - */ - -#include -#include -#include -#include "SCNetworkReachabilityInternal.h" - -#include -#include -#include -#include -#include -#include -#include -#include - - -#pragma mark - -#pragma mark Globals - - -/* - * S_debug - * A boolean that enables additional logging. - */ -static boolean_t S_debug = FALSE; - - -#pragma mark - -#pragma mark Support functions - - -static void -log_xpc_object(const char *msg, xpc_object_t obj) -{ - char *desc; - - desc = xpc_copy_description(obj); - SCLog(S_debug, LOG_INFO, CFSTR("%s = %s"), msg, desc); - free(desc); -} - - -static __inline__ void -my_CFDictionaryApplyFunction(CFDictionaryRef theDict, - CFDictionaryApplierFunction applier, - void *context) -{ - CFAllocatorRef myAllocator; - CFDictionaryRef myDict; - - myAllocator = CFGetAllocator(theDict); - myDict = CFDictionaryCreateCopy(myAllocator, theDict); - CFDictionaryApplyFunction(myDict, applier, context); - CFRelease(myDict); - return; -} - - -#pragma mark - -#pragma mark SCNetworkReachability target support - - -static CFMutableDictionaryRef reach_digest_map; - - -static dispatch_queue_t -_server_concurrent_queue() -{ - static dispatch_once_t once; - static dispatch_queue_t q; - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME ".concurrent", - DISPATCH_QUEUE_CONCURRENT); - }); - - return q; -} - - -static dispatch_queue_t -_server_digest_queue() -{ - static dispatch_once_t once; - static dispatch_queue_t q; - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME ".digest", NULL); - }); - - return q; -} - - -static dispatch_group_t -_target_group(SCNetworkReachabilityRef target) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - return targetPrivate->serverGroup; -} - - -static dispatch_queue_t -_target_queue(SCNetworkReachabilityRef target) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - return targetPrivate->serverQueue; -} - - -#pragma mark - - - -/* - * _target_reference_add - * - * Note: use dispatch_sync(_server_digest_queue(), ^{ ... }); - */ -static void -_target_reference_add(SCNetworkReachabilityRef target, CFDataRef digest, xpc_connection_t connection) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // take a reference to the target - CFRetain(target); - - // ensure that we have a dispatch group - if (targetPrivate->serverGroup == NULL) { - targetPrivate->serverGroup = dispatch_group_create(); - } - - // ensure that we have a dispatch queue - if (targetPrivate->serverQueue == NULL) { - char qname[256]; - - snprintf(qname, sizeof(qname), "com.apple.SCNetworkReachability.%p.server", target); - targetPrivate->serverQueue = dispatch_queue_create(qname, NULL); - } - - // bump the reference count - if (_SC_ATOMIC_INC(&targetPrivate->serverReferences) == 0) { - // and maintain a digest-->target mapping - targetPrivate->serverDigest = CFRetain(digest); - CFDictionarySetValue(reach_digest_map, digest, target); - } - - if (S_debug) { - CFStringRef str; - - str = _SCNetworkReachabilityCopyTargetDescription(target); - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: reference added (%@, %d)"), - connection, - target, - str, - targetPrivate->serverReferences); - CFRelease(str); - } - - return; -} - - -/* - * _target_reference_remove - * - * Note: use dispatch_sync(_server_digest_queue(), ^{ ... }); - */ -static void -_target_reference_remove(SCNetworkReachabilityRef target, xpc_connection_t connection) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // drop the reference count - if (_SC_ATOMIC_DEC(&targetPrivate->serverReferences) == 0) { - /* - * if that was the last reference, we no longer need to - * keep the digest-->target mapping - */ - CFDictionaryRemoveValue(reach_digest_map, targetPrivate->serverDigest); - CFRelease(targetPrivate->serverDigest); - targetPrivate->serverDigest = NULL; - } - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: reference removed (%d)"), - connection, - target, - targetPrivate->serverReferences); - } - - // release a reference to the target - CFRelease(target); - - return; -} - - -#pragma mark - - - -#define MUTEX_LOCK(m) { \ - int _lock_ = (pthread_mutex_lock(m) == 0); \ - assert(_lock_); \ -} - -#define MUTEX_UNLOCK(m) { \ - int _unlock_ = (pthread_mutex_unlock(m) == 0); \ - assert(_unlock_); \ -} - - -static void -_target_reply_add_reachability(SCNetworkReachabilityRef target, - xpc_object_t reply) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_LOCK(&targetPrivate->lock); - - xpc_dictionary_set_uint64(reply, - REACH_STATUS_CYCLE, - targetPrivate->info.cycle); - xpc_dictionary_set_uint64(reply, - REACH_STATUS_FLAGS, - targetPrivate->info.flags); - xpc_dictionary_set_uint64(reply, - REACH_STATUS_IF_INDEX, - targetPrivate->info.if_index); - xpc_dictionary_set_data (reply, - REACH_STATUS_IF_NAME, - targetPrivate->info.if_name, - sizeof(targetPrivate->info.if_name)); - xpc_dictionary_set_bool (reply, - REACH_STATUS_SLEEPING, - targetPrivate->info.sleeping); - if (isReachabilityTypeName(targetPrivate->type)) { - if (isA_CFArray(targetPrivate->resolvedAddresses)) { - xpc_object_t addresses; - CFIndex i; - CFIndex n; - - addresses = xpc_array_create(NULL, 0); - - n = CFArrayGetCount(targetPrivate->resolvedAddresses); - for (i = 0; i < n; i++) { - if (targetPrivate->type == reachabilityTypeName) { - CFDataRef address; - - address = CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i); - xpc_array_set_data(addresses, - XPC_ARRAY_APPEND, - CFDataGetBytePtr(address), - CFDataGetLength(address)); - } else if (targetPrivate->type == reachabilityTypePTR) { - CFStringRef name; - char str[MAXHOSTNAMELEN]; - - name = CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i); - _SC_cfstring_to_cstring(name, str, sizeof(str), kCFStringEncodingUTF8); - xpc_array_set_string(addresses, XPC_ARRAY_APPEND, str); - } - } - - xpc_dictionary_set_value(reply, - REACH_STATUS_RESOLVED_ADDRESSES, - addresses); - xpc_release(addresses); - } - xpc_dictionary_set_int64(reply, - REACH_STATUS_RESOLVED_ERROR, - targetPrivate->resolvedError); - xpc_dictionary_set_uint64(reply, - REACH_STATUS_DNS_FLAGS, - targetPrivate->dnsFlags); - - } - - MUTEX_UNLOCK(&targetPrivate->lock); - - return; -} - - -#pragma mark - - - -typedef struct { - xpc_connection_t connection; - uint64_t target_id; -} reach_watcher_key_t; - -typedef struct { - unsigned int n_changes; -} reach_watcher_val_t; - - -static CFDataRef -_target_watcher_key_create(xpc_connection_t connection, - uint64_t target_id) -{ - CFDataRef key; - reach_watcher_key_t watcher_key; - - watcher_key.connection = connection; - watcher_key.target_id = target_id; - - key = CFDataCreate(NULL, (UInt8 *)&watcher_key, sizeof(watcher_key)); - return key; -} - - -static Boolean -_target_watcher_add(SCNetworkReachabilityRef target, - xpc_connection_t connection, - uint64_t target_id) -{ - __block Boolean ok = TRUE; - dispatch_queue_t q; - - q = _target_queue(target); - dispatch_sync(q, ^{ - CFDataRef key; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (targetPrivate->serverWatchers == NULL) { - ok = SCNetworkReachabilitySetDispatchQueue(target, q); - if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target %p: _watcher_add SCNetworkReachabilitySetDispatchQueue() failed: %s"), - connection, - target, - SCErrorString(SCError())); - return; - } - - targetPrivate->serverWatchers = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - } - - xpc_retain(connection); - - key = _target_watcher_key_create(connection, target_id); - if (CFDictionaryContainsKey(targetPrivate->serverWatchers, key)) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target %p: watcher not added, c=0x%0llx, \"serverWatchers\" key exists"), - connection, - target, - target_id); - } else { - CFDataRef val; - static const reach_watcher_val_t watcher_val0 = { 0 }; - - val = CFDataCreate(NULL, (UInt8 *)&watcher_val0, sizeof(watcher_val0)); - CFDictionaryAddValue(targetPrivate->serverWatchers, key, val); - CFRelease(val); - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: watcher added, c=0x%0llx, n=%ld"), - connection, - target, - target_id, - CFDictionaryGetCount(targetPrivate->serverWatchers)); - } - } - CFRelease(key); - }); - - return ok; -} - - -static Boolean -_target_watcher_checkin(SCNetworkReachabilityRef target, - xpc_connection_t connection, - uint64_t target_id) -{ - __block Boolean scheduled = FALSE; - - dispatch_sync(_target_queue(target), ^{ - CFDataRef key; - unsigned int n; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - CFDataRef val; - reach_watcher_val_t *watcher_val; - - if (targetPrivate->serverWatchers == NULL) { - // if no watchers - return; - } - - key = _target_watcher_key_create(connection, target_id); - val = CFDictionaryGetValue(targetPrivate->serverWatchers, key); - CFRelease(key); - if (val == NULL) { - // if the target [for this client] was not scheduled - return; - } - - // indicate that the target was scheduled - scheduled = TRUE; - - /* - * and note that the reachability flags for this target have - * been picked up by the client - */ - /* ALIGN: CF aligns to at least >8 byte boundries */ - watcher_val = (reach_watcher_val_t *)(void *)CFDataGetBytePtr(val); - n = _SC_ATOMIC_ZERO(&watcher_val->n_changes); - if (S_debug && (n > 0)) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: SCNetworkReachabilityGetFlags() after %d notification%s"), - connection, - target, - n, - (n == 1) ? "" : "s"); - } - }); - - return scheduled; -} - - -static Boolean -_target_watcher_remove(SCNetworkReachabilityRef target, - xpc_connection_t connection, - uint64_t target_id) -{ - __block Boolean ok = TRUE; - - dispatch_sync(_target_queue(target), ^{ - CFDataRef key; - CFIndex n; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (targetPrivate->serverWatchers == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target %p: watcher not removed, c=0x%0llx, no \"serverWatchers\""), - connection, - target, - target_id); - ok = FALSE; - return; - } - - key = _target_watcher_key_create(connection, target_id); - if (!CFDictionaryContainsKey(targetPrivate->serverWatchers, key)) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target %p: watcher not removed, c=0x%0llx, no \"serverWatchers\" key"), - connection, - target, - target_id); - CFRelease(key); - ok = FALSE; - return; - } - - CFDictionaryRemoveValue(targetPrivate->serverWatchers, key); - CFRelease(key); - - n = CFDictionaryGetCount(targetPrivate->serverWatchers); - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: watcher removed, c=0x%0llx, n=%ld"), - connection, - target, // server - target_id, // client - n); - } - - if (n == 0) { - CFRelease(targetPrivate->serverWatchers); - targetPrivate->serverWatchers = NULL; - - ok = SCNetworkReachabilitySetDispatchQueue(target, NULL); - if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target %p: _watcher_remove SCNetworkReachabilitySetDispatchQueue() failed: %s"), - connection, - target, - SCErrorString(SCError())); - return; - } - - // no more watchers, flags are no longer valid - if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, TRUE, FALSE)) { - if (S_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s flags are no longer \"valid\""), - targetPrivate->log_prefix); - } - } - } - - xpc_release(connection); - }); - - return ok; -} - - -#pragma mark - -#pragma mark Reachability [RBT] client support - - -typedef struct { - rb_node_t rbn; - xpc_connection_t connection; - pid_t pid; - const char *proc_name; - CFMutableDictionaryRef targets; // target_id --> SCNetworkReachabilityRef -} reach_client_t; - - -static int -_rbt_compare_transaction_nodes(void *context, const void *n1, const void *n2) -{ - uint64_t a = (uintptr_t)((reach_client_t *)n1)->connection; - uint64_t b = (uintptr_t)((reach_client_t *)n2)->connection; - - if (a == b) { - return 0; - } else if (a < b) { - return -1; - } else { - return 1; - } -} - - -static int -_rbt_compare_transaction_key(void *context, const void *n1, const void *key) -{ - uint64_t a = (uintptr_t)((reach_client_t *)n1)->connection; - uint64_t b = *(uintptr_t *)key; - - if (a == b) { - return 0; - } else if (a < b) { - return -1; - } else { - return 1; - } -} - - -static rb_tree_t * -_reach_clients_rbt() -{ - static dispatch_once_t once; - static const rb_tree_ops_t ops = { - .rbto_compare_nodes = _rbt_compare_transaction_nodes, - .rbto_compare_key = _rbt_compare_transaction_key, - .rbto_node_offset = offsetof(reach_client_t, rbn), - .rbto_context = NULL - }; - static rb_tree_t rbt; - - dispatch_once(&once, ^{ - rb_tree_init(&rbt, &ops); - }); - - return &rbt; -} - - -static dispatch_queue_t -_reach_clients_rbt_queue() -{ - static dispatch_once_t once; - static dispatch_queue_t q; - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME ".clients.rbt", NULL); - }); - - return q; -} - - -static reach_client_t * -_reach_client_create(xpc_connection_t connection) -{ - reach_client_t *client; - - client = calloc(1, sizeof(*client)); - client->connection = connection; - client->pid = xpc_connection_get_pid(connection); - client->proc_name = NULL; - client->targets = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - - return client; -} - - -static void -_reach_client_release(reach_client_t *client) -{ - if (client->proc_name != NULL) { - free((void *)client->proc_name); - } - CFRelease(client->targets); - free(client); - return; -} - - -static void -_reach_client_remove_target(const void *key, const void *value, void *context) -{ - xpc_connection_t connection = (xpc_connection_t)context; - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)value; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // check if we have anyone watching this target - if (targetPrivate->serverWatchers != NULL) { - CFIndex n; - - n = CFDictionaryGetCount(targetPrivate->serverWatchers); - if (n > 0) { - CFIndex i; - CFDictionaryRef serverWatchers; - const void * watchers_q[32]; - const void ** watchers = watchers_q; - - serverWatchers = CFDictionaryCreateCopy(NULL, targetPrivate->serverWatchers); - - if (n > sizeof(watchers_q)/sizeof(watchers[0])) { - watchers = CFAllocatorAllocate(NULL, n * sizeof(CFDataRef), 0); - } - CFDictionaryGetKeysAndValues(serverWatchers, watchers, NULL); - - for (i = 0; i < n; i++) { - CFDataRef key; - reach_watcher_key_t *watcher_key; - - key = (CFDataRef)watchers[i]; - /* ALIGN: CF aligns to >8 byte boundries */ - watcher_key = (reach_watcher_key_t *)(void *)CFDataGetBytePtr(key); - if (watcher_key->connection == connection) { - // remove watcher references for THIS connection - _target_watcher_remove(target, - watcher_key->connection, - watcher_key->target_id); - } - } - - if (watchers != watchers_q) { - CFAllocatorDeallocate(NULL, watchers); - } - - CFRelease(serverWatchers); - } - } - - // remove our reference to this target - dispatch_sync(_server_digest_queue(), ^{ - _target_reference_remove(target, connection); - }); - - return; -} - - -static void -_reach_client_remove(xpc_connection_t connection) -{ - uint64_t connection_id = (uintptr_t)connection; - - dispatch_sync(_reach_clients_rbt_queue(), ^{ - reach_client_t *client; - rb_tree_t *rbt = _reach_clients_rbt(); - - client = rb_tree_find_node(rbt, &connection_id); - if (client != NULL) { - // remove any remaining target references (for this client) - my_CFDictionaryApplyFunction(client->targets, - _reach_client_remove_target, - (void *)connection); - - rb_tree_remove_node(rbt, client); - _reach_client_release(client); - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> _reach_client_remove: unexpected client"), - connection); - } - }); - - return; -} - - -static __inline__ CFDataRef -_client_target_key_create(uint64_t target_id) -{ - CFDataRef target_key; - - target_key = CFDataCreate(NULL, (UInt8 *)&target_id, sizeof(target_id)); - return target_key; -} - - -static SCNetworkReachabilityRef -_client_target_copy(reach_client_t *client, uint64_t target_id) -{ - SCNetworkReachabilityRef target; - CFDataRef target_key; - - target_key = _client_target_key_create(target_id); - target = CFDictionaryGetValue(client->targets, target_key); - CFRelease(target_key); - - if (target != NULL) { - CFRetain(target); - } - - return target; -} - - -static Boolean -_client_target_set(reach_client_t *client, uint64_t target_id, SCNetworkReachabilityRef target) -{ - Boolean added; - CFDataRef target_key; - - target_key = _client_target_key_create(target_id); - added = !CFDictionaryContainsKey(client->targets, target_key); - if (added) { - CFDictionarySetValue(client->targets, target_key, target); - } - CFRelease(target_key); - - return added; -} - - -static void -_client_target_remove(reach_client_t *client, uint64_t target_id) -{ - CFDataRef target_key; - - target_key = _client_target_key_create(target_id); - CFDictionaryRemoveValue(client->targets, target_key); - CFRelease(target_key); - - return; -} - - -#pragma mark - -#pragma mark Reachability [XPC] server functions - - -static dispatch_queue_t -_reach_server_queue() -{ - static dispatch_once_t once; - static dispatch_queue_t q; - - dispatch_once(&once, ^{ - q = dispatch_queue_create(REACH_SERVICE_NAME, NULL); - }); - - return q; -} - - -/* - * _reach_changed - * - * Note: should be exec'd on the target queue - */ -static void -_reach_changed(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) -{ - CFIndex i; - CFIndex n; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - const void * watcher_keys_q[32]; - const void ** watcher_keys = watcher_keys_q; - const void * watcher_vals_q[32]; - const void ** watcher_vals = watcher_vals_q; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("%sprocess reachability changed, flags = 0x%08x"), - targetPrivate->log_prefix, - flags); - } - - if (targetPrivate->serverWatchers == NULL) { - // if no watchers - return; - } - - n = CFDictionaryGetCount(targetPrivate->serverWatchers); - if (n == 0) { - // if no watchers - return; - } - - if (!isReachabilityTypeName(targetPrivate->type) || !targetPrivate->dnsNoAddressesSinceLastTimeout) { - /* - * Because we are actively watching for additional changes - * we mark the flags as "valid" - */ - if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { - if (S_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\""), - targetPrivate->log_prefix); - } - } - } - - // notify all of the watchers - if (n > sizeof(watcher_keys_q)/sizeof(watcher_keys[0])) { - watcher_keys = CFAllocatorAllocate(NULL, n * sizeof(CFDataRef), 0); - watcher_vals = CFAllocatorAllocate(NULL, n * sizeof(CFDataRef), 0); - } - - CFDictionaryGetKeysAndValues(targetPrivate->serverWatchers, - watcher_keys, - watcher_vals); - - for (i = 0; i < n; i++) { - xpc_connection_t connection; - CFDataRef key; - uint64_t target_id; - CFDataRef val; - reach_watcher_key_t *watcher_key; - reach_watcher_val_t *watcher_val; - - val = (CFDataRef)watcher_vals[i]; - /* ALIGN: CF aligns to >8 byte boundries */ - watcher_val = (reach_watcher_val_t *)(void *)CFDataGetBytePtr(val); - - if (_SC_ATOMIC_INC(&watcher_val->n_changes) > 0) { - // if we've already sent a notification - continue; - } - - key = (CFDataRef)watcher_keys[i]; - /* ALIGN: CF aligns to >8 byte boundries */ - watcher_key = (reach_watcher_key_t *)(void *)CFDataGetBytePtr(key); - - connection = xpc_retain(watcher_key->connection); - target_id = watcher_key->target_id; - dispatch_async(_reach_server_queue(), ^{ - xpc_object_t reply; - - // create our [async] notification - reply = xpc_dictionary_create(NULL, NULL, 0); - - // set notification - xpc_dictionary_set_int64(reply, - MESSAGE_NOTIFY, - MESSAGE_REACHABILITY_STATUS); - - // set target ID - xpc_dictionary_set_uint64(reply, - REACH_CLIENT_TARGET_ID, - target_id); - - log_xpc_object(" reply [async]", reply); - xpc_connection_send_message(connection, reply); - - xpc_release(reply); - xpc_release(connection); - }); - } - - if (n > sizeof(watcher_keys_q)/sizeof(watcher_keys[0])) { - CFAllocatorDeallocate(NULL, watcher_keys); - CFAllocatorDeallocate(NULL, watcher_vals); - } - - return; -} - - -static void -sanitize_address(const struct sockaddr *from, struct sockaddr *to) -{ - switch (from->sa_family) { - case AF_INET : { - /* ALIGN: cast okay, alignment not assumed. */ - struct sockaddr_in *from4 = (struct sockaddr_in *)(void *)from; - struct sockaddr_in *to4 = (struct sockaddr_in *)(void *)to; - - bzero(to4, sizeof(*to4)); - to4->sin_len = sizeof(*to4); - to4->sin_family = AF_INET; - bcopy(&from4->sin_addr, &to4->sin_addr, sizeof(to4->sin_addr)); - break; - } - - case AF_INET6 : { - /* ALIGN: cast okay, alignment not assumed. */ - struct sockaddr_in6 *from6 = (struct sockaddr_in6 *)(void *)from; - struct sockaddr_in6 *to6 = (struct sockaddr_in6 *)(void *)to; - - bzero(to6, sizeof(*to6)); - to6->sin6_len = sizeof(*to6); - to6->sin6_family = AF_INET6; - bcopy(&from6->sin6_addr, &to6->sin6_addr, sizeof(to6->sin6_addr)); - to6->sin6_scope_id = from6->sin6_scope_id; - break; - } - - default: - bcopy(from, to, from->sa_len); - break; - } - - return; -} - - -static void -target_add(reach_client_t *client, xpc_object_t request) -{ - const char *name; - const struct sockaddr *localAddress; - struct sockaddr_storage localAddress0; - const struct sockaddr *remoteAddress; - struct sockaddr_storage remoteAddress0; - const struct sockaddr *ptrAddress; - struct sockaddr_storage ptrAddress0; - int64_t if_index; - const char *if_name = NULL; - bool onDemandBypass = FALSE; - bool resolverBypass = FALSE; - uint64_t target_id; - uid_t uid = 0; - - - unsigned char bytes[CC_SHA1_DIGEST_LENGTH]; - CC_SHA1_CTX ctx; - CFDataRef digest = NULL; - size_t len; - xpc_connection_t remote; - xpc_object_t reply; - uint64_t status = REACH_REQUEST_REPLY_FAILED; - - Boolean added; - __block Boolean ok = TRUE; - __block SCNetworkReachabilityRef target = NULL; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> create reachability target"), - client->connection); -// log_xpc_object(" create", request); - } - - remote = xpc_dictionary_get_remote_connection(request); - reply = xpc_dictionary_create_reply(request); - if (reply == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_add: xpc_dictionary_create_reply: failed"), - client->connection); - return; - } - - target_id = xpc_dictionary_get_uint64(request, REACH_CLIENT_TARGET_ID); - if (target_id == 0) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target ID"); - goto done; - } - - // create a "digest" of the [new] target - - CC_SHA1_Init(&ctx); - - name = xpc_dictionary_get_string(request, REACH_TARGET_NAME); - if (name != NULL) { - CC_SHA1_Update(&ctx, REACH_TARGET_NAME, sizeof(REACH_TARGET_NAME)); - CC_SHA1_Update(&ctx, name, (CC_LONG)strlen(name)); - } - - localAddress = xpc_dictionary_get_data(request, REACH_TARGET_LOCAL_ADDR, &len); - if (localAddress != NULL) { - if ((len == localAddress->sa_len) && (len <= sizeof(struct sockaddr_storage))) { - sanitize_address(localAddress, (struct sockaddr *)&localAddress0); - CC_SHA1_Update(&ctx, REACH_TARGET_LOCAL_ADDR, sizeof(REACH_TARGET_LOCAL_ADDR)); - CC_SHA1_Update(&ctx, &localAddress0, (CC_LONG)len); - } else { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "local address: size error"); - goto done; - } - } - - remoteAddress = xpc_dictionary_get_data(request, REACH_TARGET_REMOTE_ADDR, &len); - if (remoteAddress != NULL) { - if ((len == remoteAddress->sa_len) && (len <= sizeof(struct sockaddr_storage))) { - sanitize_address(remoteAddress, (struct sockaddr *)&remoteAddress0); - CC_SHA1_Update(&ctx, REACH_TARGET_REMOTE_ADDR, sizeof(REACH_TARGET_REMOTE_ADDR)); - CC_SHA1_Update(&ctx, &remoteAddress0, (CC_LONG)len); - } else { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "remote address: size error"); - goto done; - } - } - - ptrAddress = xpc_dictionary_get_data(request, REACH_TARGET_PTR_ADDR, &len); - if (ptrAddress != NULL) { - if ((len == ptrAddress->sa_len) && (len <= sizeof(struct sockaddr_storage))) { - sanitize_address(ptrAddress, (struct sockaddr *)&ptrAddress0); - CC_SHA1_Update(&ctx, REACH_TARGET_PTR_ADDR, sizeof(REACH_TARGET_PTR_ADDR)); - CC_SHA1_Update(&ctx, &ptrAddress0, (CC_LONG)len); - } else { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "ptr address: size error"); - goto done; - } - } - - if_index = xpc_dictionary_get_int64(request, REACH_TARGET_IF_INDEX); - if (if_index != 0) { - if_name = xpc_dictionary_get_string(request, REACH_TARGET_IF_NAME); - if (if_name != NULL) { - CC_SHA1_Update(&ctx, REACH_TARGET_IF_NAME, sizeof(REACH_TARGET_IF_NAME)); - CC_SHA1_Update(&ctx, if_name, (CC_LONG)strlen(if_name)); - } - } - - - onDemandBypass = xpc_dictionary_get_bool(request, REACH_TARGET_ONDEMAND_BYPASS); - if (onDemandBypass) { - CC_SHA1_Update(&ctx, REACH_TARGET_ONDEMAND_BYPASS, sizeof(REACH_TARGET_ONDEMAND_BYPASS)); - CC_SHA1_Update(&ctx, &onDemandBypass, sizeof(onDemandBypass)); - } - - resolverBypass = xpc_dictionary_get_bool(request, REACH_TARGET_RESOLVER_BYPASS); - if (resolverBypass) { - CC_SHA1_Update(&ctx, REACH_TARGET_RESOLVER_BYPASS, sizeof(REACH_TARGET_RESOLVER_BYPASS)); - CC_SHA1_Update(&ctx, &resolverBypass, sizeof(resolverBypass)); - } - - // Grab UID from XPC connection - uid = xpc_connection_get_euid(remote); - CC_SHA1_Update(&ctx, &uid, sizeof(uid)); - - - CC_SHA1_Final(bytes, &ctx); - digest = CFDataCreate(NULL, bytes, sizeof(bytes)); - - /* - * Check to see if we already have a SCNetworkReachability object - * for this digest. If so, we'll share the existing target. If not, - * create a new [shared] target. - */ - dispatch_sync(_server_digest_queue(), ^{ - target = CFDictionaryGetValue(reach_digest_map, digest); - if (target != NULL) { - CFRetain(target); - } else { - CFDataRef data; - CFMutableDictionaryRef options; - CFStringRef str; - - options = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - if (name != NULL) { - str = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8); - CFDictionarySetValue(options, kSCNetworkReachabilityOptionNodeName, str); - CFRelease(str); - } - if (localAddress != NULL) { - data = CFDataCreate(NULL, (const UInt8 *)&localAddress0, localAddress0.ss_len); - CFDictionarySetValue(options, kSCNetworkReachabilityOptionLocalAddress, data); - CFRelease(data); - } - if (remoteAddress != NULL) { - data = CFDataCreate(NULL, (const UInt8 *)&remoteAddress0, remoteAddress0.ss_len); - CFDictionarySetValue(options, kSCNetworkReachabilityOptionRemoteAddress, data); - CFRelease(data); - } - if (ptrAddress != NULL) { - data = CFDataCreate(NULL, (const UInt8 *)&ptrAddress0, ptrAddress0.ss_len); - CFDictionarySetValue(options, kSCNetworkReachabilityOptionPTRAddress, data); - CFRelease(data); - } - if (onDemandBypass) { - CFDictionarySetValue(options, - kSCNetworkReachabilityOptionConnectionOnDemandBypass, - kCFBooleanTrue); - } - if (resolverBypass) { - CFDictionarySetValue(options, - kSCNetworkReachabilityOptionResolverBypass, - kCFBooleanTrue); - } - CFDictionarySetValue(options, - kSCNetworkReachabilityOptionServerBypass, - kCFBooleanTrue); - target = SCNetworkReachabilityCreateWithOptions(NULL, options); - CFRelease(options); - if (target == NULL) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "SCNetworkReachabilityCreateWithOptions failed"); - ok = FALSE; - return; - } - - // Set the UID on the target - ((SCNetworkReachabilityPrivateRef)target)->uid = uid; - - // because the interface name may not (no longer) be valid we set - // this after we've created the SCNetworkReachability object - if ((if_index != 0) && (if_name != NULL)) { - SCNetworkReachabilityPrivateRef targetPrivate; - - targetPrivate = (SCNetworkReachabilityPrivateRef)target; - targetPrivate->if_index = (unsigned int)if_index; - strlcpy(targetPrivate->if_name, if_name, sizeof(targetPrivate->if_name)); - } - - - ok = SCNetworkReachabilitySetCallback(target, _reach_changed, NULL); - if (!ok) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "SCNetworkReachabilitySetCallback failed"); - CFRelease(target); - target = NULL; - return; - } - } - - // bump the number of references to this target - _target_reference_add(target, digest, client->connection); - }); - - if (!ok) { - goto done; - } - - /* - * add an association for the client's target_id to the [shared] - * SCNetworkReachability object. - */ - added = _client_target_set(client, target_id, target); - if (!added) { - // if we already had a reference to the target (e.g. reconnect) - dispatch_sync(_server_digest_queue(), ^{ - _target_reference_remove(target, client->connection); - }); - } - - status = REACH_REQUEST_REPLY_OK; - - done : - - xpc_dictionary_set_int64(reply, REACH_REQUEST_REPLY, status); -// log_xpc_object(" reply", reply); - xpc_connection_send_message(remote, reply); - xpc_release(reply); - - if (digest != NULL) CFRelease(digest); - if (target != NULL) CFRelease(target); - return; -} - - -static void -target_remove(reach_client_t *client, xpc_object_t request) -{ - xpc_connection_t remote; - xpc_object_t reply; - uint64_t status = REACH_REQUEST_REPLY_FAILED; - SCNetworkReachabilityRef target = NULL; - uint64_t target_id; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> remove reachability target"), - client->connection); -// log_xpc_object(" remove", request); - } - - remote = xpc_dictionary_get_remote_connection(request); - reply = xpc_dictionary_create_reply(request); - if (reply == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_remove: xpc_dictionary_create_reply: failed"), - client->connection); - return; - } - - target_id = xpc_dictionary_get_uint64(request, REACH_CLIENT_TARGET_ID); - if (target_id == 0) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target ID"); - goto done; - } - - target = _client_target_copy(client, target_id); - if (target == NULL) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target"); - status = REACH_REQUEST_REPLY_UNKNOWN; - goto done; - } - - /* - * remove the association from the client's target_id to the [shared] - * SCNetworkReachability object. - */ - _client_target_remove(client, target_id); - - // drop the number of references to this target - dispatch_sync(_server_digest_queue(), ^{ - _target_reference_remove(target, client->connection); - }); - - status = REACH_REQUEST_REPLY_OK; - - done : - - xpc_dictionary_set_int64(reply, REACH_REQUEST_REPLY, status); -// log_xpc_object(" reply", reply); - xpc_connection_send_message(remote, reply); - xpc_release(reply); - - if (target != NULL) CFRelease(target); - return; -} - - -static void -target_schedule(reach_client_t *client, xpc_object_t request) -{ - Boolean ok; - xpc_connection_t remote; - xpc_object_t reply; - uint64_t status = REACH_REQUEST_REPLY_FAILED; - SCNetworkReachabilityRef target = NULL; - uint64_t target_id; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> schedule reachability target"), - client->connection); -// log_xpc_object(" schedule", request); - } - - remote = xpc_dictionary_get_remote_connection(request); - reply = xpc_dictionary_create_reply(request); - if (reply == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_schedule: xpc_dictionary_create_reply: failed"), - client->connection); - return; - } - - target_id = xpc_dictionary_get_uint64(request, REACH_CLIENT_TARGET_ID); - if (target_id == 0) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target ID"); - goto done; - } - - target = _client_target_copy(client, target_id); - if (target == NULL) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target"); - status = REACH_REQUEST_REPLY_UNKNOWN; - goto done; - } - - // enable monitoring - ok = _target_watcher_add(target, client->connection, target_id); - if (!ok) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "could not add watcher"); - goto done; - } - - status = REACH_REQUEST_REPLY_OK; - - done : - - xpc_dictionary_set_int64(reply, REACH_REQUEST_REPLY, status); -// log_xpc_object(" reply", reply); - xpc_connection_send_message(remote, reply); - xpc_release(reply); - - if (target != NULL) CFRelease(target); - return; -} - - -static void -target_status(reach_client_t *client, xpc_object_t request) -{ - xpc_connection_t remote; - xpc_object_t reply; - __block Boolean reply_now = TRUE; - Boolean scheduled; - uint64_t status = REACH_REQUEST_REPLY_FAILED; - SCNetworkReachabilityRef target = NULL; - uint64_t target_id; - - if(S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> get status of reachability target"), - client->connection); -// log_xpc_object(" status", request); - } - - remote = xpc_dictionary_get_remote_connection(request); - reply = xpc_dictionary_create_reply(request); - if (reply == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_status: xpc_dictionary_create_reply: failed"), - client->connection); - return; - } - - target_id = xpc_dictionary_get_uint64(request, REACH_CLIENT_TARGET_ID); - if (target_id == 0) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_status: no target"), - client->connection); - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target ID"); - goto done; - } - - target = _client_target_copy(client, target_id); - if (target == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_status: no target (0x%0llx)"), - client->connection, - target_id); - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target"); - status = REACH_REQUEST_REPLY_UNKNOWN; - goto done; - } - - /* - * Check to see if the target [for this client] had been "scheduled". - * - * If so, also mark that we've picked up the current reachability - * flags and that any pending notifications have been processed. - */ - scheduled = _target_watcher_checkin(target, client->connection, target_id); - - /* - * return current reachability information to the caller - */ - dispatch_sync(_target_queue(target), ^{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (scheduled) { - /* - * The client "scheduled" this target. As such, we - * know that this is an async query and that we only - * need to return the "last known" flags. - */ - _target_reply_add_reachability(target, reply); -// log_xpc_object(" reply [scheduled]", reply); - - /* - * ... and if it's not a "name" query then we can mark the - * flags as valid. - */ - if (!isReachabilityTypeName(targetPrivate->type)) { - if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { - if (S_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\"."), - targetPrivate->log_prefix); - } - } - } - - if (S_debug) { - CFStringRef str; - - str = _SCNetworkReachabilityCopyTargetFlags(target); - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> reply [scheduled%s], %@"), - client->connection, - targetPrivate->serverInfoValid ? "/valid" : "", - str); - CFRelease(str); - } - } else { - /* - * The client has NOT "scheduled" this target. As - * such, we know that this is a sync query and that - * we must return "current" flags. - */ - if (targetPrivate->scheduled && targetPrivate->serverInfoValid) { - /* - * The server target has been "scheduled" and we - * have flags that are "current". - */ - _target_reply_add_reachability(target, reply); -// log_xpc_object(" reply [scheduled/valid]", reply); - - if (S_debug) { - CFStringRef str; - - str = _SCNetworkReachabilityCopyTargetFlags(target); - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> reply [scheduled/valid], %@"), - client->connection, - str); - CFRelease(str); - } - } else { - dispatch_group_t group; - - /* - * The server target has NOT been "scheduled" or - * we do not have "current" flags. This means that - * we must query for the current information and - * return the flags to the client when they are - * available. - */ - - reply_now = FALSE; - - group = _target_group(target); - if (_SC_ATOMIC_INC(&targetPrivate->serverSyncQueryActive) == 0) { - CFRetain(target); - dispatch_group_async(group, _server_concurrent_queue(), ^{ - SCNetworkReachabilityFlags flags; - unsigned int n; - Boolean ok; - - // query for the flags - ok = SCNetworkReachabilityGetFlags(target, &flags); - flags = targetPrivate->info.flags; // get the "raw" flags - if (!ok) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachabilityGetFlags() [sync query] failed" - "\n target = %@" - "\n status = %s"), - target, - SCErrorString(SCError())); - } - - /* - * if we have current flags, if the target has since been - * scheduled, and this is not a "name" query, then mark as - * valid. - */ - if (ok && - targetPrivate->scheduled && - !isReachabilityTypeName(targetPrivate->type)) { - if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { - if (S_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\"!"), - targetPrivate->log_prefix); - } - } - } - - // sync query complete - n = _SC_ATOMIC_ZERO(&targetPrivate->serverSyncQueryActive); - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("%sSCNetworkReachabilityGetFlags() [sync query] complete, n = %d"), - targetPrivate->log_prefix, - n); - } - - CFRelease(target); - }); - } - - CFRetain(target); - dispatch_group_notify(group, _target_queue(target), ^{ - // flags are now available - _target_reply_add_reachability(target, reply); - xpc_dictionary_set_int64(reply, REACH_REQUEST_REPLY, REACH_REQUEST_REPLY_OK); -// log_xpc_object(" reply [delayed]", reply); - - if (S_debug) { - CFStringRef str; - - str = _SCNetworkReachabilityCopyTargetFlags(target); - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> reply [delayed], %@"), - client->connection, - str); - CFRelease(str); - } - - xpc_connection_send_message(remote, reply); - xpc_release(reply); - - CFRelease(target); - }); - } - } - }); - - status = REACH_REQUEST_REPLY_OK; - - done : - - if (reply_now) { - xpc_dictionary_set_int64(reply, REACH_REQUEST_REPLY, status); - - if (status != REACH_REQUEST_REPLY_OK) { -// log_xpc_object(" reply [!]", reply); - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> reply [!]"), - client->connection); - } - } - - xpc_connection_send_message(remote, reply); - xpc_release(reply); - } else if (S_debug) { - CFStringRef str; - - str = _SCNetworkReachabilityCopyTargetFlags(target); - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> no reply [yet], %@"), - client->connection, - str); - CFRelease(str); - } - - if (target != NULL) CFRelease(target); - return; -} - - -static void -target_unschedule(reach_client_t *client, xpc_object_t request) -{ - xpc_connection_t remote; - xpc_object_t reply; - uint64_t status = REACH_REQUEST_REPLY_FAILED; - SCNetworkReachabilityRef target = NULL; - uint64_t target_id; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> unschedule reachability target"), - client->connection); -// log_xpc_object(" unschedule", request); - } - - remote = xpc_dictionary_get_remote_connection(request); - reply = xpc_dictionary_create_reply(request); - if (reply == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> target_unschedule: xpc_dictionary_create_reply: failed"), - client->connection); - return; - } - - target_id = xpc_dictionary_get_uint64(request, REACH_CLIENT_TARGET_ID); - if (target_id == 0) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target ID"); - goto done; - } - - target = _client_target_copy(client, target_id); - if (target == NULL) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "no target"); - status = REACH_REQUEST_REPLY_UNKNOWN; - goto done; - } - - // disable monitoring - _target_watcher_remove(target, client->connection, target_id); - - status = REACH_REQUEST_REPLY_OK; - - done : - - xpc_dictionary_set_int64(reply, REACH_REQUEST_REPLY, status); -// log_xpc_object(" reply", reply); - xpc_connection_send_message(remote, reply); - xpc_release(reply); - - if (target != NULL) CFRelease(target); - return; -} - - -#define SNAPSHOT_PATH_STATE _PATH_VARTMP "configd-reachability" - - -static void -_snapshot_digest_watcher(const void *key, const void *value, void *context) -{ - __block reach_client_t *client = NULL; - FILE *f = (FILE *)context; - static reach_client_t no_client = { - .pid = 0, - .proc_name = "?", - }; - reach_watcher_key_t *watcher_key; - reach_watcher_val_t *watcher_val; - - /* ALIGN: CF aligns to >8 byte boundries */ - watcher_key = (reach_watcher_key_t *)(void *)CFDataGetBytePtr(key); - watcher_val = (reach_watcher_val_t *)(void *)CFDataGetBytePtr(value); - - dispatch_sync(_reach_clients_rbt_queue(), ^{ - uint64_t connection_id = (uintptr_t)watcher_key->connection; - rb_tree_t *rbt = _reach_clients_rbt(); - - client = rb_tree_find_node(rbt, &connection_id); - if (client == NULL) { - client = &no_client; - } - }); - - SCPrint(TRUE, f, - CFSTR(" connection = %p, target(c) = 0x%0llx, command = %s, pid = %d, changes = %u\n"), - watcher_key->connection, - watcher_key->target_id, - client->proc_name, - client->pid, - watcher_val->n_changes); - - return; -} - - -static void -_snapshot_digest(const void *key, const void *value, void *context) -{ - FILE *f = (FILE *)context; - CFStringRef digest = (CFStringRef)key; - dispatch_queue_t q; - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)value; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - q = _target_queue(target); - dispatch_sync(q, ^{ - CFIndex nWatchers = 0; - - if (targetPrivate->serverWatchers != NULL) { - nWatchers = CFDictionaryGetCount(targetPrivate->serverWatchers); - } - - SCPrint(TRUE, f, CFSTR("\n digest : %@\n"), digest); - SCPrint(TRUE, f, CFSTR(" %@\n"), target); - SCPrint(TRUE, f, CFSTR(" valid = %s, async watchers = %ld, sync queries = %u, refs = %u\n"), - targetPrivate->serverInfoValid ? "Y" : "N", - nWatchers, - targetPrivate->serverSyncQueryActive, - targetPrivate->serverReferences); - - SCPrint(TRUE, f, CFSTR(" network %ld.%3.3d"), - targetPrivate->last_network.tv_sec, - targetPrivate->last_network.tv_usec / 1000); -#if !TARGET_OS_IPHONE - SCPrint(TRUE, f, CFSTR(", power %ld.%3.3d"), - targetPrivate->last_power.tv_sec, - targetPrivate->last_power.tv_usec / 1000); -#endif // !TARGET_OS_IPHONE - if (isReachabilityTypeName(targetPrivate->type)) { - SCPrint(TRUE, f, CFSTR(", DNS %ld.%3.3d"), - targetPrivate->last_dns.tv_sec, - targetPrivate->last_dns.tv_usec / 1000); - if (timerisset(&targetPrivate->dnsQueryEnd)) { - struct timeval dnsQueryElapsed; - - timersub(&targetPrivate->dnsQueryEnd, - &targetPrivate->dnsQueryStart, - &dnsQueryElapsed); - SCPrint(TRUE, f, CFSTR(" (query %ld.%3.3d / reply %ld.%3.3d)"), - targetPrivate->dnsQueryStart.tv_sec, - targetPrivate->dnsQueryStart.tv_usec / 1000, - dnsQueryElapsed.tv_sec, - dnsQueryElapsed.tv_usec / 1000); - } - } - if (timerisset(&targetPrivate->last_push)) { - SCPrint(TRUE, f, CFSTR(", last notify %ld.%3.3d"), - targetPrivate->last_push.tv_sec, - targetPrivate->last_push.tv_usec / 1000); - } - SCPrint(TRUE, f, CFSTR(", uid %d"), - targetPrivate->uid); - SCPrint(TRUE, f, CFSTR("\n")); - - if (nWatchers > 0) { - CFDictionaryApplyFunction(targetPrivate->serverWatchers, - _snapshot_digest_watcher, - f); - } - }); - - return; -} - - -static void -_snapshot_target(const void *key, const void *value, void *context) -{ - FILE *f = (FILE *)context; - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)value; - uint64_t target_id; - CFDataRef target_key = (CFDataRef)key; - - /* ALIGN: CF aligns > 8 byte boundries */ - target_id = *(uint64_t *)(void *)CFDataGetBytePtr(target_key); - - SCPrint(TRUE, f, - CFSTR(" target(c) = 0x%0llx, target(s) = %@\n"), - target_id, - target); - - return; -} - - -static void -_snapshot(reach_client_t *client, xpc_object_t request) -{ - uid_t euid; - FILE *f; - int fd; - Boolean ok = FALSE; - xpc_connection_t remote; - xpc_object_t reply; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p> snapshot"), - client->connection); -// log_xpc_object(" create", request); - } - - remote = xpc_dictionary_get_remote_connection(request); - reply = xpc_dictionary_create_reply(request); - if (reply == NULL) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> _snapshot: xpc_dictionary_create_reply: failed"), - client->connection); - return; - } - - euid = xpc_connection_get_euid(remote); - if (euid != 0) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "Permission denied."); - goto done; - } - - // Save a snapshot of the SCNetworkReachability server "state" - - (void) unlink(SNAPSHOT_PATH_STATE); - fd = open(SNAPSHOT_PATH_STATE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644); - if (fd == -1) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "open: failed"); - goto done; - } - f = fdopen(fd, "w"); - if (f == NULL) { - xpc_dictionary_set_string(reply, - REACH_REQUEST_REPLY_DETAIL, - "fdopen: failed"); - goto done; - } - - // provide connection/client info - - dispatch_sync(_reach_clients_rbt_queue(), ^{ - rb_tree_t *rbt = _reach_clients_rbt(); - - SCPrint(TRUE, f, CFSTR("Clients :\n")); - - if (rb_tree_count(rbt) > 0) { - reach_client_t *client; - - RB_TREE_FOREACH(client, rbt) { - SCPrint(TRUE, f, - CFSTR("\n connection = %p, client = %p, command = %s, pid = %d\n"), - client->connection, - client, - client->proc_name != NULL ? client->proc_name : "?", - client->pid); - my_CFDictionaryApplyFunction(client->targets, - _snapshot_target, - f); - } - } else { - SCPrint(TRUE, f, CFSTR(" None.\n")); - } - - SCPrint(TRUE, f, CFSTR("\n")); - }); - - // provide "digest" info - - SCPrint(TRUE, f, CFSTR("Digests :\n")); - dispatch_sync(_server_digest_queue(), ^{ - if (reach_digest_map != NULL) { - CFDictionaryApplyFunction(reach_digest_map, - _snapshot_digest, - f); - } - }); - - (void) fclose(f); - - ok = TRUE; - - done : - - xpc_dictionary_set_int64(reply, - REACH_REQUEST_REPLY, - ok ? REACH_REQUEST_REPLY_OK : REACH_REQUEST_REPLY_FAILED); -// log_xpc_object(" reply", reply); - xpc_connection_send_message(remote, reply); - xpc_release(reply); - - return; -} - - -static __inline__ void -_extract_client_info(reach_client_t *client, xpc_object_t request) -{ - // if available/needed, save the process name - if (client->proc_name == NULL) { - const char *proc_name; - - proc_name = xpc_dictionary_get_string(request, REACH_CLIENT_PROC_NAME); - if (proc_name != NULL) { - client->proc_name = strdup(proc_name); - } - } - - return; -} - - -static void -process_request(reach_client_t *client, xpc_object_t request) -{ - int64_t op; - - op = xpc_dictionary_get_int64(request, REACH_REQUEST); - switch (op) { - case REACH_REQUEST_CREATE : - _extract_client_info(client, request); - target_add(client, request); - break; - case REACH_REQUEST_REMOVE : - target_remove(client, request); - break; - case REACH_REQUEST_STATUS : - target_status(client, request); - break; - case REACH_REQUEST_SCHEDULE : - target_schedule(client, request); - break; - case REACH_REQUEST_UNSCHEDULE : - target_unschedule(client, request); - break; - case REACH_REQUEST_SNAPSHOT : - _extract_client_info(client, request); - _snapshot(client, request); - break; - default : - SCLog(TRUE, LOG_ERR, - CFSTR("<%p> unknown request : %lld"), - client->connection, - op); - break; - } - - return; -} - - -static void -process_new_connection(xpc_connection_t connection) -{ - reach_client_t *client; - - if (S_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("<%p> new reach client, pid=%d"), - connection, - xpc_connection_get_pid(connection)); - } - - client = _reach_client_create(connection); - assert(client != NULL); - - dispatch_sync(_reach_clients_rbt_queue(), ^{ - rb_tree_t *rbt = _reach_clients_rbt(); - - rb_tree_insert_node(rbt, client); - }); - - xpc_connection_set_target_queue(connection, _reach_server_queue()); - - xpc_connection_set_event_handler(connection, ^(xpc_object_t xobj) { - xpc_type_t type; - - type = xpc_get_type(xobj); - if (type == XPC_TYPE_DICTIONARY) { - __block reach_client_t *client = NULL; - - dispatch_sync(_reach_clients_rbt_queue(), ^{ - uint64_t connection_id = (uintptr_t)connection; - rb_tree_t *rbt = _reach_clients_rbt(); - - client = rb_tree_find_node(rbt, &connection_id); - }); - - if (client != NULL) { - // process the request - process_request(client, xobj); - } else { - char *desc; - - SCLog(TRUE, LOG_ERR, - CFSTR("<%p:%d> unexpected SCNetworkReachability request"), - connection, - xpc_connection_get_pid(connection)); - - desc = xpc_copy_description(xobj); - SCLog(TRUE, LOG_ERR, - CFSTR(" request = %s"), - desc); - free(desc); - - xpc_connection_cancel(connection); - } - - } else if (type == XPC_TYPE_ERROR) { - const char *desc; - - desc = xpc_dictionary_get_string(xobj, XPC_ERROR_KEY_DESCRIPTION); - if (xobj == XPC_ERROR_CONNECTION_INVALID) { - if (S_debug) { - SCLog(TRUE, LOG_INFO, - CFSTR("<%p:%d> %s"), - connection, - xpc_connection_get_pid(connection), - desc); - } - - _reach_client_remove(connection); - - } else if (xobj == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p:%d> %s"), - connection, - xpc_connection_get_pid(connection), - desc); - - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p:%d> Connection error: %p : %s"), - connection, - xpc_connection_get_pid(connection), - xobj, - desc); - } - - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("<%p:%d> unknown event type : %p"), - connection, - xpc_connection_get_pid(connection), - type); - } - }); - - xpc_connection_resume(connection); - - return; -} - - -#pragma mark - -#pragma mark Reachability server "main" - - -__private_extern__ -void -load_SCNetworkReachability(CFBundleRef bundle, Boolean bundleVerbose) -{ - xpc_connection_t connection; - const char *name; - - S_debug = bundleVerbose; - - /* - * create a dictionary mapping SCNetworkReachability [CFData] digests - * to SCNetworkReachability objects. - */ - reach_digest_map = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - - // create XPC listener - name = getenv("REACH_SERVER"); - if (name == NULL) { - name = REACH_SERVICE_NAME; - } - connection = xpc_connection_create_mach_service(name, - _reach_server_queue(), - XPC_CONNECTION_MACH_SERVICE_LISTENER); - - xpc_connection_set_event_handler(connection, ^(xpc_object_t event) { - xpc_type_t type; - - type = xpc_get_type(event); - if (type == XPC_TYPE_CONNECTION) { - process_new_connection(event); - - } else if (type == XPC_TYPE_ERROR) { - const char *desc; - - desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); - if (event == XPC_ERROR_CONNECTION_INVALID) { - SCLog(TRUE, LOG_ERR, CFSTR("reach server: %s"), desc); - xpc_release(connection); - } else if (event == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLog(TRUE, LOG_ERR, CFSTR("reach server: %s"), desc); - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach server: Connection error: %p : %s"), - event, - desc); - } - - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("reach server: unknown event type : %p"), - type); - } - }); - xpc_connection_resume(connection); - - return; -} - -#ifdef MAIN - -int -main(int argc, char **argv) -{ -// _sc_log = FALSE; - _sc_verbose = (argc > 1) ? TRUE : FALSE; - _sc_debug = TRUE; - - load_SCNetworkReachability(CFBundleGetMainBundle(), (argc > 1) ? TRUE : FALSE); - CFRunLoopRun(); - /* not reached */ - exit(0); - return 0; -} - -#endif /* MAIN */ diff --git a/src/configd/SystemConfiguration.fproj/reachability/client.c b/src/configd/SystemConfiguration.fproj/reachability/client.c deleted file mode 100644 index 85279fb70..000000000 --- a/src/configd/SystemConfiguration.fproj/reachability/client.c +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "SCNetworkReachabilityInternal.h" - -int -main(int argc, char **argv) -{ - Boolean ok; - SCNetworkReachabilityRef target1; - SCNetworkReachabilityRef target2; - SCNetworkReachabilityRef target3; - SCNetworkReachabilityRef target4; - SCNetworkReachabilityRef target5; - - _sc_log = FALSE; - _sc_debug = TRUE; // extra reachability logging - - target1 = SCNetworkReachabilityCreateWithName(NULL, "web.apple.com"); - ok = __SCNetworkReachabilityServer_targetAdd(target1); - if (!ok) { - SCLog(TRUE, LOG_ERR, CFSTR("No reachability server")); - exit(1); - } - - target2 = SCNetworkReachabilityCreateWithName(NULL, "www.comcast.net"); - __SCNetworkReachabilityServer_targetAdd(target2); - - target3 = SCNetworkReachabilityCreateWithName(NULL, "www.comcast.net"); - __SCNetworkReachabilityServer_targetAdd(target3); - - target4 = SCNetworkReachabilityCreateWithName(NULL, "www.nonexistenthost.com"); - __SCNetworkReachabilityServer_targetAdd(target4); - - target5 = SCNetworkReachabilityCreateWithName(NULL, "www.washingtonpost.com"); - __SCNetworkReachabilityServer_targetAdd(target5); - - __SCNetworkReachabilityServer_targetStatus(target1); - __SCNetworkReachabilityServer_targetStatus(target2); - __SCNetworkReachabilityServer_targetStatus(target3); - __SCNetworkReachabilityServer_targetStatus(target4); - - __SCNetworkReachabilityServer_targetMonitor(target1, TRUE); - __SCNetworkReachabilityServer_targetMonitor(target4, TRUE); - __SCNetworkReachabilityServer_targetMonitor(target5, TRUE); - - __SCNetworkReachabilityServer_targetStatus(target4); - __SCNetworkReachabilityServer_targetStatus(target3); - __SCNetworkReachabilityServer_targetStatus(target2); - __SCNetworkReachabilityServer_targetStatus(target1); - - sleep(2); - - __SCNetworkReachabilityServer_targetStatus(target1); - __SCNetworkReachabilityServer_targetStatus(target4); - __SCNetworkReachabilityServer_targetStatus(target1); - __SCNetworkReachabilityServer_targetStatus(target4); - - __SCNetworkReachabilityServer_targetMonitor(target1, FALSE); - - __SCNetworkReachabilityServer_targetStatus(target1); - __SCNetworkReachabilityServer_targetStatus(target4); - __SCNetworkReachabilityServer_targetStatus(target1); - __SCNetworkReachabilityServer_targetStatus(target4); - - __SCNetworkReachabilityServer_targetMonitor(target4, FALSE); - - __SCNetworkReachabilityServer_targetStatus(target1); - __SCNetworkReachabilityServer_targetStatus(target4); - -// SCLog(TRUE, LOG_DEBUG, CFSTR("starting CFRunLoop")); -// CFRunLoopRun(); -// SCLog(TRUE, LOG_DEBUG, CFSTR("CFRunLoop complete")); - - SCLog(TRUE, LOG_DEBUG, CFSTR("sleeping")); - sleep(60); - - __SCNetworkReachabilityServer_targetStatus(target5); - __SCNetworkReachabilityServer_targetRemove(target5); - CFRelease(target5); - - __SCNetworkReachabilityServer_targetRemove(target4); - CFRelease(target4); - - __SCNetworkReachabilityServer_targetRemove(target3); - CFRelease(target3); - -// __SCNetworkReachabilityServer_targetRemove(target2); -// CFRelease(target2); - -// __SCNetworkReachabilityServer_targetRemove(target1); -// CFRelease(target1); - - exit(0); -} - diff --git a/src/configd/SystemConfiguration.fproj/reachability/server.c b/src/configd/SystemConfiguration.fproj/reachability/server.c deleted file mode 100644 index 09e97c69d..000000000 --- a/src/configd/SystemConfiguration.fproj/reachability/server.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "SCNetworkReachabilityInternal.h" - -int -main(int argc, char **argv) -{ - _sc_log = FALSE; // no syslog - _sc_debug = TRUE; // extra reachability logging - - _SCNetworkReachabilityServer_start(); - - SCLog(TRUE, LOG_DEBUG, CFSTR("starting CFRunLoop")); - CFRunLoopRun(); - SCLog(TRUE, LOG_DEBUG, CFSTR("CFRunLoop complete")); - - exit(0); -} diff --git a/src/configd/SystemConfiguration.fproj/restore-temporary-headers b/src/configd/SystemConfiguration.fproj/restore-temporary-headers new file mode 100644 index 000000000..fb1e9ba28 --- /dev/null +++ b/src/configd/SystemConfiguration.fproj/restore-temporary-headers @@ -0,0 +1,51 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo "Cannot update headers, private header directory not specified" + exit 1 +fi + +SPI_BASE="${1}" + +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/src/configd/SystemConfiguration.fproj/scprefs_observer.c b/src/configd/SystemConfiguration.fproj/scprefs_observer.c index 7ac28981b..74369faa0 100644 --- a/src/configd/SystemConfiguration.fproj/scprefs_observer.c +++ b/src/configd/SystemConfiguration.fproj/scprefs_observer.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012, 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,25 +17,43 @@ * 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@ */ #include #include #include +#include #include #include #include #include + +#ifndef SC_LOG_HANDLE +#define SC_LOG_HANDLE __log_SCPreferences +#endif //SC_LOG_HANDLE +os_log_t SC_LOG_HANDLE(void); + #include #include +#define MANAGED_PREFERENCES_PATH "/Library/Managed Preferences" +#if TARGET_OS_IPHONE +#define MOBILE_PREFERENCES_PATH "/var/mobile/Library/Preferences" +#endif // TARGET_OS_IPHONE + +#if !TARGET_OS_IPHONE +#define PREFS_OBSERVER_KEY "com.apple.MCX._managementStatusChangedForDomains" +#else // !TARGET_OS_IPHONE +#define PREFS_OBSERVER_KEY "com.apple.ManagedConfiguration.profileListChanged" +#endif // !TARGET_OS_IPHONE + #pragma mark - #pragma mark Utils static void iterate_dir(const char *d_name, const char *f_name, - CC_SHA1_CTX *ctxP, Boolean *found) + CC_SHA256_CTX *ctxP, Boolean *found) { DIR *dir; struct dirent * dp; @@ -68,8 +86,8 @@ iterate_dir(const char *d_name, const char *f_name, * the path and last modification time in * the digest */ - CC_SHA1_Update(ctxP, full_path, (CC_LONG)strlen(full_path)); - CC_SHA1_Update(ctxP, + CC_SHA256_Update(ctxP, full_path, (CC_LONG)strlen(full_path)); + CC_SHA256_Update(ctxP, (void *)&s.st_mtimespec.tv_sec, sizeof(s.st_mtimespec.tv_sec)); *found = TRUE; @@ -83,15 +101,15 @@ iterate_dir(const char *d_name, const char *f_name, static CF_RETURNS_RETAINED CFDataRef build_digest(const char *top_dir, const char *file) { - unsigned char bytes[CC_SHA1_DIGEST_LENGTH]; - CC_SHA1_CTX ctx; + unsigned char bytes[CC_SHA256_DIGEST_LENGTH]; + CC_SHA256_CTX ctx; CFDataRef digest = NULL; Boolean found = FALSE; - CC_SHA1_Init(&ctx); + CC_SHA256_Init(&ctx); iterate_dir(top_dir, file, &ctx, &found); - CC_SHA1_Final(bytes, &ctx); - if (found == TRUE) { + CC_SHA256_Final(bytes, &ctx); + if (found) { digest = CFDataCreate(NULL, bytes, sizeof(bytes)); } return (digest); @@ -109,17 +127,16 @@ struct _scprefs_observer_t { char file[0]; }; -#define MOBILE_PREFERENCES_PATH "/var/mobile/Library/Preferences" static const char * prefs_observer_get_prefs_path(scprefs_observer_t observer) { switch (observer->type) { #if !TARGET_OS_IPHONE case scprefs_observer_type_mcx: - return ("/Library/Managed Preferences"); + return MANAGED_PREFERENCES_PATH; #else // !TARGET_OS_IPHONE case scprefs_observer_type_global: - return ("/Library/Managed Preferences"); + return MANAGED_PREFERENCES_PATH; case scprefs_observer_type_profile: return MOBILE_PREFERENCES_PATH; #endif // !TARGET_OS_IPHONE @@ -153,9 +170,11 @@ has_changed(scprefs_observer_t observer) { observer->digest = digest; - SCLog(_sc_verbose, LOG_NOTICE, CFSTR("The following file: %s, %s \n"), - observer->file, (changed)?"has changed":"has not changed"); - return (changed); + SC_log(changed ? LOG_INFO : LOG_DEBUG, + "preferences file: \"%s\" %s", + observer->file, + changed ? "changed" : "did not change"); + return changed; } static dispatch_queue_t @@ -182,31 +201,36 @@ prefs_observer_handle_notifications() { scprefs_observer_t observer; - SCLog(_sc_verbose, LOG_NOTICE, CFSTR("PrefsObserver Notification received \n")); + SC_log(LOG_DEBUG, "PrefsObserver notification received"); SLIST_FOREACH(observer, &head, next) { - /* if the preferences plist has changed, - * called the block */ + /* if the preferences plist changed, call the block */ if (has_changed(observer)) { dispatch_async(observer->queue, observer->block); } } } -#define PREFS_OBSERVER_KEY "com.apple.ManagedConfiguration.profileListChanged" static void _prefs_observer_init() { - static int token; + uint32_t status; + static int token; prefs_observer_queue = dispatch_queue_create("com.apple.SystemConfiguration.SCPreferencesObserver", NULL); SLIST_INIT(&head); - notify_register_dispatch(PREFS_OBSERVER_KEY, - &token, - prefs_observer_queue, - ^(int token) { prefs_observer_handle_notifications(); }); + status = notify_register_dispatch(PREFS_OBSERVER_KEY, + &token, + prefs_observer_queue, + ^(int token) { +#pragma unused(token) + prefs_observer_handle_notifications(); + }); + if (status != NOTIFY_STATUS_OK) { + SC_log(LOG_INFO, "notify_register_dispatch() failed: %d", status); + } } static scprefs_observer_t @@ -221,7 +245,7 @@ prefs_observer_priv_create(_scprefs_observer_type type, path_buflen = strlen(plist_name) + 1; observer = (scprefs_observer_t)malloc(sizeof(struct _scprefs_observer_t) + path_buflen); - bzero((void *)observer, sizeof(struct _scprefs_observer_t)); + memset((void *)observer, 0, sizeof(struct _scprefs_observer_t)); /* Create the observer */ observer->type = type; @@ -247,8 +271,7 @@ _scprefs_observer_watch(_scprefs_observer_type type, const char *plist_name, }); elem = prefs_observer_priv_create(type, plist_name, queue, block); - SCLog(_sc_verbose, LOG_NOTICE, CFSTR("Created a new element to watch for %s \n"), - elem->file); + SC_log(LOG_INFO, "Created a new element to watch for %s", elem->file); dispatch_sync(prefs_observer_queue, ^{ /* Enqueue the request */ @@ -281,18 +304,18 @@ int main() dispatch_queue_t q1 = dispatch_queue_create("com.apple.SystemConfiguration.PrefsObserver.testQ1", NULL); dispatch_block_t b1 = ^{ - printf("Block 1 executed \n"); + printf("Block 1 executed\n"); }; dispatch_queue_t q2 = dispatch_queue_create("com.apple.SystemConfiguration.PrefsObserver.testQ2", NULL); dispatch_block_t b2 = ^{ - printf("Block 2 executed \n"); + printf("Block 2 executed\n"); }; dispatch_queue_t q3 = dispatch_queue_create("com.apple.SystemConfiguration.PrefsObserver.testQ2", NULL); dispatch_block_t b3 = ^{ - printf("Block 3 executed \n"); + printf("Block 3 executed\n"); }; __block scprefs_observer_t observer1 = _scprefs_observer_watch(scprefs_observer_type_mcx, "com.apple.SystemConfiguration", q1, b1); diff --git a/src/configd/SystemConfiguration.fproj/scprefs_observer.h b/src/configd/SystemConfiguration.fproj/scprefs_observer.h index 6839dc1ee..831909401 100644 --- a/src/configd/SystemConfiguration.fproj/scprefs_observer.h +++ b/src/configd/SystemConfiguration.fproj/scprefs_observer.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012-2014 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 @@ -47,7 +47,7 @@ __BEGIN_DECLS @discussion Sends a notification to interested configuration agents when a particular preference file has changed. @param type the type of preference (MCX on OSX, Global/Profiles on iOS) to watch. - @param plist the name of the plist file to watch. + @param plist_name the name of the plist file to watch. @param queue the queue to be called back on. @param block the block to be called back on. @result Returns the created preferences observer @@ -66,4 +66,4 @@ _scprefs_observer_cancel(scprefs_observer_t observer); __END_DECLS -#endif /* _SCPREFS_OBSERVER_H */ +#endif /* _SCPREFS_OBSERVER_H */ diff --git a/src/configd/SystemConfiguration.fproj/update-headers b/src/configd/SystemConfiguration.fproj/update-headers deleted file mode 100755 index c1c1104fd..000000000 --- a/src/configd/SystemConfiguration.fproj/update-headers +++ /dev/null @@ -1,128 +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"); - -$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; -} - -# -# 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); - if ($api ne $api_new) { - 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); - } - } - } -} -$/ = "\n"; - -exit 0; diff --git a/src/configd/common/reference_output.sh b/src/configd/common/reference_output.sh new file mode 100644 index 000000000..b21ea5e1b --- /dev/null +++ b/src/configd/common/reference_output.sh @@ -0,0 +1,87 @@ +#!/bin/sh + +tmpfile=/tmp/test_reference_output$$.txt + +cleanup() +{ + if [ -f "${tmpfile}" ]; then + echo removing "${tmpfile}" + rm -f "${tmpfile}" + fi + exit 1 +} + +trap cleanup 1 2 3 15 + +run_program() +{ + program="${1}" + filter="${2}" + if [ "${filter}" = "" ]; then + ${program} + else + ${program} | ${filter} + fi +} + +usage() +{ + echo "usage: $0 ( create | test ) [ ]" + exit 1 +} + +command="${1}" +program="${2}" +ref_file="${3}" +filter="${4}" + +if [ "${ref_file}" = "" ]; then + usage "${0}" +fi + +if [ "${program}" = "" ]; then + usage "${0}" +fi + +if [ ! -f "${program}" ]; then + echo "program '${program}' doesn't exit" + exit 1 +fi +if [ ! -x "${program}" ]; then + program="sh ${program}" +fi +# echo "The program is ${program}" + +if [ ! "${filter}" = "" ]; then + if [ ! -f "${filter}" ]; then + echo "filter '${filter}' doesn't exit" + exit 1 + fi + if [ ! -x "${filter}" ]; then + filter="sh ${filter}" + fi +# echo "The filter is ${filter}" +else + echo no filter +fi + +if [ "${command}" = "create" ]; then + run_program "${program}" "${filter}" > "${ref_file}" +elif [ "${command}" = "test" ]; then + if [ ! -f "${ref_file}" ]; then + echo "reference file '${ref_file}' doesn't exist" + exit 1 + fi + run_program "${program}" "${filter}" > "${tmpfile}" + cmp "${tmpfile}" "${ref_file}" + if [ ! $? -eq 0 ]; then + echo FAILURE + diff "${tmpfile}" "${ref_file}" + exit 1 + fi + echo SUCCESS +else + usage "${0}" +fi + +exit 0 diff --git a/src/configd/config-agent-info/config_agent_info.c b/src/configd/config-agent-info/config_agent_info.c new file mode 100644 index 000000000..3cb9963e4 --- /dev/null +++ b/src/configd/config-agent-info/config_agent_info.c @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2015-2017, 2019 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@ + */ + + +#include "config_agent_info.h" +#include "configAgentDefines.h" +#include "network_config_agent_info_priv.h" + +#include + +static void +get_agent_uuid_if_OOB_data_required(xpc_object_t info, uuid_t uuid) +{ + __block xpc_object_t agent_uuid = NULL; + + if (xpc_get_type(info) == XPC_TYPE_ARRAY) { + xpc_array_apply(info, ^bool(size_t index, xpc_object_t value) { +#pragma unused(index) + if ((value != NULL) && + (xpc_get_type(value) == XPC_TYPE_DICTIONARY)) { + agent_uuid = xpc_dictionary_get_value(value, + kConfigAgentOutOfBandDataUUID); + if (agent_uuid != NULL) { + return false; + } + } + return true; + }); + } else if (xpc_get_type(info) == XPC_TYPE_DICTIONARY) { + agent_uuid = xpc_dictionary_get_value(info, + kConfigAgentOutOfBandDataUUID); + } + + if ((agent_uuid != NULL) && + (xpc_get_type(agent_uuid) == XPC_TYPE_DATA) && + (xpc_data_get_length(agent_uuid) >= sizeof(uuid_t))) { + const void *bytes = xpc_data_get_bytes_ptr(agent_uuid); + uuid_copy(uuid, bytes); + } else { + uuid_clear(uuid); + } +} + +static boolean_t +is_a_config_agent(const struct netagent *agent) +{ + const char *agentDomain; + + if (agent == NULL) { + return false; + } + + agentDomain = agent->netagent_domain; + if (agentDomain == NULL || strcmp(agentDomain, kConfigAgentDomain)) { + return false; + } + + return true; +} + +boolean_t +is_config_agent_type_dns(const struct netagent *agent) +{ + if (!is_a_config_agent(agent)) { + return false; + } + + const char *agentDesc = agent->netagent_type; + if (agentDesc == NULL || strcmp(agentDesc, kConfigAgentTypeDNS)) { + return false; + } + + return true; +} + +boolean_t +is_config_agent_type_proxy(const struct netagent *agent) +{ + if (!is_a_config_agent(agent)) { + return false; + } + + const char *agentDesc = agent->netagent_type; + if (agentDesc == NULL || strcmp(agentDesc, kConfigAgentTypeProxy)) { + return false; + } + + return true; +} + +static boolean_t +is_config_agent_type_dns_multicast(const struct netagent *agent) +{ + if (strncmp(agent->netagent_desc, kConfigAgentTypeDNSMulticast, sizeof(kConfigAgentTypeDNSMulticast)-1) == 0) { + return true; + } + + return false; +} + +static boolean_t +is_config_agent_type_dns_private(const struct netagent *agent) +{ + if (strncmp(agent->netagent_desc, kConfigAgentTypeDNSPrivate, sizeof(kConfigAgentTypeDNSPrivate)-1) == 0) { + return true; + } + + return false; +} + +xpc_object_t +config_agent_copy_dns_information(const struct netagent *agent) +{ + xpc_object_t resolver = NULL; + + if (!is_config_agent_type_dns(agent)) { + goto done; + } + + if (agent->netagent_data_size <= 0 ) { + if (!is_config_agent_type_dns_private(agent) && !is_config_agent_type_dns_multicast(agent)) { + const char *agent_desc = (*(agent->netagent_desc) != '\0') ? agent->netagent_desc : kConfigAgentTypeDNS; + syslog(LOG_ERR, "Cannot parse config agent (%s). No data available", agent_desc); + } + + goto done; + } + + resolver = xpc_create_from_plist(agent->netagent_data, agent->netagent_data_size); + +done: + return resolver; +} + +xpc_object_t +config_agent_get_dns_nameservers(xpc_object_t resolver) +{ + if ((resolver == NULL) || + (xpc_get_type(resolver) != XPC_TYPE_DICTIONARY)) { + return NULL; + } + + return xpc_dictionary_get_value(resolver, kConfigAgentDNSNameServers); +} + +xpc_object_t +config_agent_get_dns_searchdomains(xpc_object_t resolver) +{ + if ((resolver == NULL) || + (xpc_get_type(resolver) != XPC_TYPE_DICTIONARY)) { + return NULL; + } + + return xpc_dictionary_get_value(resolver, kConfigAgentDNSSearchDomains); +} + +void +config_agent_free_dns_information(xpc_object_t resolver) +{ + if (resolver == NULL) { + syslog(LOG_ERR, "Attempting to free invalid resolver"); + return; + } + + xpc_release(resolver); +} + +xpc_object_t +config_agent_copy_proxy_information(const struct netagent *agent) +{ + xpc_object_t info = NULL; + + if (!is_config_agent_type_proxy(agent)) { + goto done; + } + + if (agent->netagent_data_size <= 0 ) { + const char *agent_desc = (*(agent->netagent_desc) != '\0') ? agent->netagent_desc : kConfigAgentTypeProxy; + syslog(LOG_ERR, "Cannot parse config agent (%s). No data available", agent_desc); + goto done; + } + + info = xpc_create_from_plist(agent->netagent_data, agent->netagent_data_size); + +done: + return info; +} + +xpc_object_t +config_agent_update_proxy_information(xpc_object_t proxyConfig) +{ + if (proxyConfig == NULL) { + return NULL; + } + + xpc_object_t newProxyConfig = NULL; + struct netagent agent; + + get_agent_uuid_if_OOB_data_required(proxyConfig, agent.netagent_uuid); + + if (uuid_is_null(agent.netagent_uuid) == 0) { + strlcpy(agent.netagent_type, kConfigAgentTypeProxy, sizeof(agent.netagent_type)); + + uint64_t length; + const void *buffer = _nwi_config_agent_copy_data(&agent, &length); + if (buffer != NULL && length > 0) { + newProxyConfig = xpc_create_from_plist(buffer, (size_t)length); + free((void *)buffer); + } + } + + return newProxyConfig; +} + +void +config_agent_free_proxy_information(xpc_object_t proxyConfig) +{ + if (proxyConfig == NULL) { + syslog(LOG_ERR, "Attempting to free proxy configuration"); + return; + } + + xpc_release(proxyConfig); +} diff --git a/src/configd/config-agent-info/config_agent_info.h b/src/configd/config-agent-info/config_agent_info.h new file mode 100644 index 000000000..63ed9cfa6 --- /dev/null +++ b/src/configd/config-agent-info/config_agent_info.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 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, + * 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 CONFIG_AGENT_INFO_H +#define CONFIG_AGENT_INFO_H + +#include +#include +#include + +__BEGIN_DECLS + +#define kConfigAgentDomain "SystemConfig" + +#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) 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) 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) 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) 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) 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) 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) API_AVAILABLE(macos(10.12), ios(10.0)); + +/* + 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) 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) API_AVAILABLE(macos(10.12), ios(10.0)); + +__END_DECLS + +#endif /* CONFIG_AGENT_INFO_H */ diff --git a/src/configd/configd.tproj/_SCD.c b/src/configd/configd.tproj/_SCD.c index c54f4ba4c..eedd1ec75 100644 --- a/src/configd/configd.tproj/_SCD.c +++ b/src/configd/configd.tproj/_SCD.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2009, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2009, 2011, 2012, 2015-2019 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@ */ @@ -39,8 +39,6 @@ #include "session.h" -__private_extern__ CFMutableDictionaryRef sessionData = NULL; - __private_extern__ CFMutableDictionaryRef storeData = NULL; __private_extern__ CFMutableDictionaryRef patternData = NULL; @@ -72,7 +70,7 @@ _addWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) * Get the dictionary associated with this key out of the store */ dict = CFDictionaryGetValue(storeData, watchedKey); - if (dict) { + if (dict != NULL) { newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); } else { newDict = CFDictionaryCreateMutable(NULL, @@ -132,7 +130,7 @@ _addWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) CFRelease(newDict); #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" _addWatcher: %@, %@"), sessionNum, watchedKey); + SC_log(LOG_DEBUG, " _addWatcher: %@, %@", sessionNum, watchedKey); #endif /* DEBUG */ return; @@ -157,10 +155,10 @@ _removeWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) * Get the dictionary associated with this key out of the store */ dict = CFDictionaryGetValue(storeData, watchedKey); - if ((dict == NULL) || (CFDictionaryContainsKey(dict, kSCDWatchers) == FALSE)) { + if ((dict == NULL) || !CFDictionaryContainsKey(dict, kSCDWatchers)) { /* key doesn't exist (isn't this really fatal?) */ #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" _removeWatcher: %@, %@, key not watched"), sessionNum, watchedKey); + SC_log(LOG_DEBUG, " _removeWatcher: %@, %@, key not watched", sessionNum, watchedKey); #endif /* DEBUG */ return; } @@ -182,7 +180,7 @@ _removeWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) sessionNum); if (i == kCFNotFound) { #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" _removeWatcher: %@, %@, session not watching"), sessionNum, watchedKey); + SC_log(LOG_DEBUG, " _removeWatcher: %@, %@, session not watching", sessionNum, watchedKey); #endif /* DEBUG */ CFRelease(newDict); CFRelease(newWatchers); @@ -225,7 +223,7 @@ _removeWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) CFRelease(newDict); #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" _removeWatcher: %@, %@"), sessionNum, watchedKey); + SC_log(LOG_DEBUG, " _removeWatcher: %@, %@", sessionNum, watchedKey); #endif /* DEBUG */ return; @@ -237,7 +235,7 @@ _removeWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) __private_extern__ void -pushNotifications(FILE *_configd_trace) +pushNotifications(void) { CFIndex notifyCnt; int server; @@ -258,23 +256,25 @@ pushNotifications(FILE *_configd_trace) kCFNumberIntType, &server); theSession = getSession(server); + assert(theSession != NULL); + storePrivate = (SCDynamicStorePrivateRef)theSession->store; /* - * deliver notifications to client sessions + * deliver [CFRunLoop/dispatch] notifications to client sessions */ if ((storePrivate->notifyStatus == Using_NotifierInformViaMachPort) && (storePrivate->notifyPort != MACH_PORT_NULL)) { /* * Post notification as mach message */ - if (_configd_trace != NULL) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : port = %d, msgid = %d\n"), - "-->port", - storePrivate->server, - storePrivate->notifyPort, - storePrivate->notifyPortIdentifier); + SC_trace("-->port : %5d : port = %d", + storePrivate->server, + storePrivate->notifyPort); + + /* use a random (and non-zero) identifier */ + while (storePrivate->notifyPortIdentifier == 0) { + storePrivate->notifyPortIdentifier = (mach_msg_id_t)random(); } _SC_sendMachMessage(storePrivate->notifyPort, storePrivate->notifyPortIdentifier); @@ -284,14 +284,10 @@ pushNotifications(FILE *_configd_trace) (storePrivate->notifyFile >= 0)) { ssize_t written; - if (_configd_trace != NULL) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : fd = %d, msgid = %d\n"), - "-->fd ", - storePrivate->server, - storePrivate->notifyFile, - storePrivate->notifyFileIdentifier); - } + SC_trace("-->fd : %5d : fd = %d, msgid = %d", + storePrivate->server, + storePrivate->notifyFile, + storePrivate->notifyFileIdentifier); written = write(storePrivate->notifyFile, &storePrivate->notifyFileIdentifier, @@ -299,72 +295,22 @@ pushNotifications(FILE *_configd_trace) if (written == -1) { if (errno == EWOULDBLOCK) { #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, - CFSTR("sorry, only one outstanding notification per session.")); + SC_log(LOG_DEBUG, "sorry, only one outstanding notification per session"); #endif /* DEBUG */ } else { #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, - CFSTR("could not send notification, write() failed: %s"), + SC_log(LOG_DEBUG, "could not send notification, write() failed: %s", strerror(errno)); #endif /* DEBUG */ storePrivate->notifyFile = -1; } } else if (written != sizeof(storePrivate->notifyFileIdentifier)) { #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, - CFSTR("could not send notification, incomplete write()")); + SC_log(LOG_DEBUG, "could not send notification, incomplete write()"); #endif /* DEBUG */ storePrivate->notifyFile = -1; } } - - if ((storePrivate->notifyStatus == Using_NotifierInformViaSignal) && - (storePrivate->notifySignal > 0)) { - kern_return_t status; - pid_t pid; - /* - * Post notification as signal - */ - status = pid_for_task(storePrivate->notifySignalTask, &pid); - if (status == KERN_SUCCESS) { - if (_configd_trace != NULL) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : pid = %d, signal = sig%s (%d)\n"), - "-->sig ", - storePrivate->server, - pid, - sys_signame[storePrivate->notifySignal], - storePrivate->notifySignal); - } - - if (kill(pid, storePrivate->notifySignal) != 0) { - if (errno != ESRCH) { - SCLog(TRUE, LOG_ERR, - CFSTR("could not send sig%s to PID %d: %s"), - sys_signame[storePrivate->notifySignal], - pid, - strerror(errno)); - } - } - } else { - mach_port_type_t pt; - - __MACH_PORT_DEBUG(TRUE, "*** pushNotifications pid_for_task failed: releasing task", storePrivate->notifySignalTask); - if (mach_port_type(mach_task_self(), storePrivate->notifySignalTask, &pt) == KERN_SUCCESS) { - if ((pt & MACH_PORT_TYPE_DEAD_NAME) != 0) { - SCLog(TRUE, LOG_ERR, CFSTR("pushNotifications pid_for_task() failed: %s"), mach_error_string(status)); - } - } else { - SCLog(TRUE, LOG_ERR, CFSTR("pushNotifications mach_port_type() failed: %s"), mach_error_string(status)); - } - - /* don't bother with any more attempts */ - (void) mach_port_deallocate(mach_task_self(), storePrivate->notifySignalTask); - storePrivate->notifySignal = 0; - storePrivate->notifySignalTask = TASK_NULL; - } - } } if (sessionsToNotify != sessionsToNotify_q) CFAllocatorDeallocate(NULL, sessionsToNotify); diff --git a/src/configd/configd.tproj/_SCD.h b/src/configd/configd.tproj/_SCD.h index bcc94e4bc..3325c4f94 100644 --- a/src/configd/configd.tproj/_SCD.h +++ b/src/configd/configd.tproj/_SCD.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2009, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2009, 2011, 2015, 2016, 2018, 2019 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@ */ @@ -59,26 +59,7 @@ #define kSCDSession CFSTR("session") -/* - * keys in the "sessionData" dictionary - */ - -/* - * the name of the calling application / plug-in - */ -#define kSCDName CFSTR("name") -/* - * keys which have changed since last call to SCDNotifierGetChanges() - */ -#define kSCDChangedKeys CFSTR("changedKeys") -/* - * keys which are to be removed when the session is closed - */ -#define kSCDSessionKeys CFSTR("sessionKeys") - - extern CFMutableDictionaryRef storeData; -extern CFMutableDictionaryRef sessionData; extern CFMutableDictionaryRef patternData; extern CFMutableSetRef changedKeys; extern CFMutableSetRef deferredRemovals; @@ -172,14 +153,7 @@ __SCDynamicStoreNotifyMachPort (SCDynamicStoreRef store, mach_port_t port); int -__SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store, - int32_t identifier, - int *fd); - -int -__SCDynamicStoreNotifySignal (SCDynamicStoreRef store, - pid_t pid, - int sig); +__SCDynamicStoreNotifyFileDescriptor (SCDynamicStoreRef store); int __SCDynamicStoreNotifyCancel (SCDynamicStoreRef store); @@ -193,8 +167,8 @@ _removeWatcher (CFNumberRef sessionNum, CFStringRef watchedKey); void -pushNotifications (FILE *_configd_trace); +pushNotifications (void); __END_DECLS -#endif /* !_S_SCD_H */ +#endif /* !_S_SCD_H */ diff --git a/src/configd/configd.tproj/_configadd.c b/src/configd/configd.tproj/_configadd.c index 0f5b11e5b..b43e1974c 100644 --- a/src/configd/configd.tproj/_configadd.c +++ b/src/configd/configd.tproj/_configadd.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2008, 2011, 2012, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2008, 2011, 2012, 2014-2017, 2019 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@ */ @@ -42,14 +42,10 @@ __SCDynamicStoreAddValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef val SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; CFDataRef tempValue; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s%s : %5d : %@\n"), - "add ", - storePrivate->useSessionKeys ? "t " : " ", - storePrivate->server, - key); - } + SC_trace("add %s : %5d : %@", + storePrivate->useSessionKeys ? "t " : " ", + storePrivate->server, + key); /* * Ensure that this is a new key. @@ -68,7 +64,7 @@ __SCDynamicStoreAddValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef val default : #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("__SCDynamicStoreAddValue __SCDynamicStoreCopyValue(): %s"), SCErrorString(sc_status)); + SC_log(LOG_DEBUG, "__SCDynamicStoreCopyValue() failed: %s", SCErrorString(sc_status)); #endif /* DEBUG */ goto done; } @@ -102,12 +98,12 @@ _configadd(mach_port_t server, CFDataRef data = NULL; /* data (un-serialized) */ serverSessionRef mySession; + *newInstance = 0; *sc_status = kSCStatusOK; /* un-serialize the key */ if (!_SCUnserializeString(&key, NULL, (void *)keyRef, keyLen)) { *sc_status = kSCStatusFailed; - goto done; } /* un-serialize the data */ @@ -134,15 +130,12 @@ _configadd(mach_port_t server, } } - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "add", key)) { *sc_status = kSCStatusAccessError; goto done; } *sc_status = __SCDynamicStoreAddValue(mySession->store, key, data); - if (*sc_status == kSCStatusOK) { - *newInstance = 0; - } done : @@ -169,6 +162,7 @@ _configadd_s(mach_port_t server, SCDynamicStorePrivateRef storePrivate; Boolean useSessionKeys; + *newInstance = 0; *sc_status = kSCStatusOK; /* un-serialize the key */ @@ -197,7 +191,7 @@ _configadd_s(mach_port_t server, goto done; } - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "add (session)", key)) { *sc_status = kSCStatusAccessError; goto done; } @@ -208,9 +202,6 @@ _configadd_s(mach_port_t server, storePrivate->useSessionKeys = TRUE; *sc_status = __SCDynamicStoreAddValue(mySession->store, key, data); - if (*sc_status == kSCStatusOK) { - *newInstance = 0; - } // restore "useSessionKeys" storePrivate->useSessionKeys = useSessionKeys; diff --git a/src/configd/configd.tproj/_configclose.c b/src/configd/configd.tproj/_configclose.c index 61729e48f..c739e4bd2 100644 --- a/src/configd/configd.tproj/_configclose.c +++ b/src/configd/configd.tproj/_configclose.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003, 2004, 2006-2012 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2004, 2006-2012, 2015, 2016, 2019 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@ */ @@ -94,18 +94,11 @@ __private_extern__ int __SCDynamicStoreClose(SCDynamicStoreRef *store) { - CFDictionaryRef dict; - CFArrayRef keys; - CFIndex keyCnt; serverSessionRef mySession; - CFStringRef sessionKey; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)*store; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("close : %5d\n"), - storePrivate->server); - } + SC_trace("close : %5d", + storePrivate->server); /* Remove all notification keys and patterns */ removeAllKeys(*store, FALSE); // keys @@ -116,45 +109,31 @@ __SCDynamicStoreClose(SCDynamicStoreRef *store) (void) __SCDynamicStoreNotifyCancel(*store); /* Remove any session keys */ - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); - dict = CFDictionaryGetValue(sessionData, sessionKey); - keys = CFDictionaryGetValue(dict, kSCDSessionKeys); - if (keys && ((keyCnt = CFArrayGetCount(keys)) > 0)) { - CFIndex i; - Boolean push = FALSE; - - /* remove session keys */ - for (i = 0; i < keyCnt; i++) { - if (isMySessionKey(sessionKey, CFArrayGetValueAtIndex(keys, i))) { - (void) __SCDynamicStoreRemoveValue(*store, CFArrayGetValueAtIndex(keys, i), TRUE); + mySession = getSession(storePrivate->server); + if (mySession->sessionKeys != NULL) { + CFIndex n = CFArrayGetCount(mySession->sessionKeys); + Boolean push = FALSE; + CFStringRef sessionKey; + + sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); + for (CFIndex i = 0; i < n; i++) { + CFStringRef key = CFArrayGetValueAtIndex(mySession->sessionKeys, i); + + if (isMySessionKey(sessionKey, key)) { + (void) __SCDynamicStoreRemoveValue(*store, key, TRUE); push = TRUE; } } + CFRelease(sessionKey); if (push) { /* push changes */ (void) __SCDynamicStorePush(); } } - CFRelease(sessionKey); - - /* - * invalidate and release our run loop source on the server - * port (for this client). Then, release the port. - */ - mySession = getSession(storePrivate->server); - if (mySession->serverRunLoopSource) { - CFRunLoopSourceInvalidate(mySession->serverRunLoopSource); - CFRelease(mySession->serverRunLoopSource); - mySession->serverRunLoopSource = NULL; - } - if (mySession->serverPort != NULL) { - CFMachPortInvalidate(mySession->serverPort); - CFRelease(mySession->serverPort); - mySession->serverPort = NULL; - } storePrivate->server = MACH_PORT_NULL; + CFRelease(*store); *store = NULL; diff --git a/src/configd/configd.tproj/_configget.c b/src/configd/configd.tproj/_configget.c index ec842f767..936bd46a6 100644 --- a/src/configd/configd.tproj/_configget.c +++ b/src/configd/configd.tproj/_configget.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2006, 2008, 2011, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2008, 2011, 2013-2016, 2019 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,16 +41,13 @@ __SCDynamicStoreCopyValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef *v SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; CFDictionaryRef dict; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : %@\n"), - internal ? "*copy " : "copy ", - storePrivate->server, - key); - } + SC_trace("%s : %5d : %@", + internal ? "*copy " : "copy ", + storePrivate->server, + key); dict = CFDictionaryGetValue(storeData, key); - if ((dict == NULL) || (CFDictionaryContainsKey(dict, kSCDData) == FALSE)) { + if ((dict == NULL) || !CFDictionaryContainsKey(dict, kSCDData)) { /* key doesn't exist (or data never defined) */ return kSCStatusNoKey; } @@ -80,6 +77,7 @@ _configget(mach_port_t server, *dataRef = NULL; *dataLen = 0; + *newInstance = 0; /* un-serialize the key */ if (!_SCUnserializeString(&key, NULL, (void *)keyRef, keyLen)) { @@ -116,11 +114,6 @@ _configget(mach_port_t server, goto done; } - /* - * return the instance number associated with the returned data. - */ - *newInstance = 1; - done : if (key != NULL) CFRelease(key); @@ -187,13 +180,10 @@ __SCDynamicStoreCopyMultiple(SCDynamicStoreRef store, CFArrayRef keys, CFArrayRe SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; addSpecific myContext; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("copy m : %5d : %ld keys, %ld patterns\n"), - storePrivate->server, - keys ? CFArrayGetCount(keys) : 0, - patterns ? CFArrayGetCount(patterns) : 0); - } + SC_trace("copy m : %5d : %ld keys, %ld patterns", + storePrivate->server, + keys ? CFArrayGetCount(keys) : 0, + patterns ? CFArrayGetCount(patterns) : 0); myContext.store = store; myContext.dict = CFDictionaryCreateMutable(NULL, diff --git a/src/configd/configd.tproj/_configlist.c b/src/configd/configd.tproj/_configlist.c index 95f655c1d..6ec426ee6 100644 --- a/src/configd/configd.tproj/_configlist.c +++ b/src/configd/configd.tproj/_configlist.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2008, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2011, 2013, 2015, 2016 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@ */ @@ -43,9 +43,15 @@ __SCDynamicStoreCopyKeyList(SCDynamicStoreRef store, CFStringRef key, Boolean is { CFMutableArrayRef keyArray; CFIndex storeCnt; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; CFStringRef storeStr; CFDictionaryRef storeValue; + SC_trace("list : %5d : %s : %@", + storePrivate->server, + isRegex ? "pattern" : "key", + key); + if (isRegex) { *subKeys = patternCopyMatches(key); return (*subKeys != NULL) ? kSCStatusOK : kSCStatusFailed; diff --git a/src/configd/configd.tproj/_confignotify.c b/src/configd/configd.tproj/_confignotify.c index ee85c5ce7..f3eb16673 100644 --- a/src/configd/configd.tproj/_confignotify.c +++ b/src/configd/configd.tproj/_confignotify.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012, 2015-2017 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,13 +41,10 @@ __SCDynamicStoreNotifyValue(SCDynamicStoreRef store, CFStringRef key, Boolean in int sc_status = kSCStatusOK; CFDataRef value; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : %@\n"), - internal ? "*notify" : "notify ", - storePrivate->server, - key); - } + SC_trace("%s : %5d : %@", + internal ? "*notify" : "notify ", + storePrivate->server, + key); /* * Tickle the value in the dynamic store @@ -109,7 +106,7 @@ _confignotify(mach_port_t server, } } - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "notify", key)) { *sc_status = kSCStatusAccessError; goto done; } diff --git a/src/configd/configd.tproj/_configopen.c b/src/configd/configd.tproj/_configopen.c index 07a49f961..dad6bc6f7 100644 --- a/src/configd/configd.tproj/_configopen.c +++ b/src/configd/configd.tproj/_configopen.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2009, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2009, 2011, 2015-2017, 2019 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@ */ @@ -52,10 +52,6 @@ __SCDynamicStoreOpen(SCDynamicStoreRef *store, CFStringRef name) * If necessary, initialize the store and session data dictionaries */ if (storeData == NULL) { - sessionData = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); storeData = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, @@ -79,13 +75,6 @@ __SCDynamicStoreOpen(SCDynamicStoreRef *store, CFStringRef name) } -static CFStringRef -openMPCopyDescription(const void *info) -{ - return CFStringCreateWithFormat(NULL, NULL, CFSTR("")); -} - - __private_extern__ kern_return_t _configopen(mach_port_t server, @@ -97,17 +86,13 @@ _configopen(mach_port_t server, int *sc_status, audit_token_t audit_token) { - CFDictionaryRef info; serverSessionRef mySession; CFStringRef name = NULL; /* name (un-serialized) */ - CFMutableDictionaryRef newInfo; - mach_port_t oldNotify; CFDictionaryRef options = NULL; /* options (un-serialized) */ - CFStringRef sessionKey; - kern_return_t status; SCDynamicStorePrivateRef storePrivate; CFBooleanRef useSessionKeys = NULL; + *newServer = MACH_PORT_NULL; *sc_status = kSCStatusOK; /* un-serialize the name */ @@ -152,33 +137,19 @@ _configopen(mach_port_t server, /* * establish the new session */ - mySession = addSession(server, openMPCopyDescription); + mySession = addClient(server, audit_token); if (mySession == NULL) { -#ifdef DEBUG - SCLog(TRUE, LOG_DEBUG, CFSTR("_configopen(): session is already open.")); -#endif /* DEBUG */ + SC_log(LOG_NOTICE, "session is already open"); *sc_status = kSCStatusFailed; /* you can't re-open an "open" session */ goto done; } *newServer = mySession->key; - __MACH_PORT_DEBUG(TRUE, "*** _configopen (after addSession)", *newServer); - - /* save the audit_token in case we need to check the callers credentials */ - mySession->auditToken = audit_token; - - /* Create and add a run loop source for the port */ - mySession->serverRunLoopSource = CFMachPortCreateRunLoopSource(NULL, mySession->serverPort, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), - mySession->serverRunLoopSource, - kCFRunLoopDefaultMode); - - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("open : %5d : %@\n"), - *newServer, - name); - } + __MACH_PORT_DEBUG(TRUE, "*** _configopen (after addClient)", *newServer); + + SC_trace("open : %5d : %@", + *newServer, + name); *sc_status = __SCDynamicStoreOpen(&mySession->store, name); storePrivate = (SCDynamicStorePrivateRef)mySession->store; @@ -196,44 +167,10 @@ _configopen(mach_port_t server, storePrivate->useSessionKeys = CFBooleanGetValue(useSessionKeys); } - /* Request a notification when/if the client dies */ - status = mach_port_request_notification(mach_task_self(), - *newServer, - MACH_NOTIFY_NO_SENDERS, - 1, - *newServer, - MACH_MSG_TYPE_MAKE_SEND_ONCE, - &oldNotify); - if (status != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, CFSTR("_configopen() mach_port_request_notification() failed: %s"), mach_error_string(status)); - cleanupSession(*newServer); - *newServer = MACH_PORT_NULL; - *sc_status = kSCStatusFailed; - goto done; - } - __MACH_PORT_DEBUG(TRUE, "*** _configopen (after mach_port_request_notification)", *newServer); - - if (oldNotify != MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("_configopen(): oldNotify != MACH_PORT_NULL")); - } - /* * Save the name of the calling application / plug-in with the session data. */ - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), *newServer); - info = CFDictionaryGetValue(sessionData, sessionKey); - if (info != NULL) { - newInfo = CFDictionaryCreateMutableCopy(NULL, 0, info); - } else { - newInfo = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - } - CFDictionarySetValue(newInfo, kSCDName, name); - CFDictionarySetValue(sessionData, sessionKey, newInfo); - CFRelease(newInfo); - CFRelease(sessionKey); + mySession->name = name; /* * Note: at this time we should be holding ONE send right and @@ -243,7 +180,6 @@ _configopen(mach_port_t server, done : - if (name != NULL) CFRelease(name); if (options != NULL) CFRelease(options); return KERN_SUCCESS; } diff --git a/src/configd/configd.tproj/_configremove.c b/src/configd/configd.tproj/_configremove.c index eb27106ea..25d2e7730 100644 --- a/src/configd/configd.tproj/_configremove.c +++ b/src/configd/configd.tproj/_configremove.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012, 2015-2017 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@ */ @@ -44,19 +44,16 @@ __SCDynamicStoreRemoveValue(SCDynamicStoreRef store, CFStringRef key, Boolean in int sc_status = kSCStatusOK; CFStringRef sessionKey; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : %@\n"), - internal ? "*remove" : "remove ", - storePrivate->server, - key); - } + SC_trace("%s : %5d : %@", + internal ? "*remove" : "remove ", + storePrivate->server, + key); /* * Ensure that this key exists. */ dict = CFDictionaryGetValue(storeData, key); - if ((dict == NULL) || (CFDictionaryContainsKey(dict, kSCDData) == FALSE)) { + if ((dict == NULL) || !CFDictionaryContainsKey(dict, kSCDData)) { /* key doesn't exist (or data never defined) */ sc_status = kSCStatusNoKey; goto done; @@ -149,7 +146,7 @@ _configremove(mach_port_t server, } } - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "remove", key)) { *sc_status = kSCStatusAccessError; goto done; } diff --git a/src/configd/configd.tproj/_configset.c b/src/configd/configd.tproj/_configset.c index 9ab272501..50ab03f60 100644 --- a/src/configd/configd.tproj/_configset.c +++ b/src/configd/configd.tproj/_configset.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012, 2014-2017, 2019 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@ */ @@ -42,6 +42,7 @@ int __SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef value, Boolean internal) { CFDictionaryRef dict; + serverSessionRef mySession; CFMutableDictionaryRef newDict; Boolean newEntry = FALSE; int sc_status = kSCStatusOK; @@ -49,14 +50,11 @@ __SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef val SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; CFStringRef storeSessionKey; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s%s : %5d : %@\n"), - internal ? "*set " : "set ", - storePrivate->useSessionKeys ? "t " : " ", - storePrivate->server, - key); - } + SC_trace("%s%s : %5d : %@", + internal ? "*set " : "set ", + storePrivate->useSessionKeys ? "t " : " ", + storePrivate->server, + key); /* * Grab the current (or establish a new) dictionary for this key. @@ -80,46 +78,29 @@ __SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef val newEntry = !CFDictionaryContainsKey(newDict, kSCDData); CFDictionarySetValue(newDict, kSCDData, value); - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); - /* * Manage per-session keys. */ + sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); if (storePrivate->useSessionKeys) { if (newEntry) { - CFArrayRef keys; - CFMutableDictionaryRef newSession; - CFMutableArrayRef newKeys; - CFDictionaryRef session; - /* * Add this key to my list of per-session keys */ - session = CFDictionaryGetValue(sessionData, sessionKey); - keys = CFDictionaryGetValue(session, kSCDSessionKeys); - if ((keys == NULL) || - (CFArrayGetFirstIndexOfValue(keys, - CFRangeMake(0, CFArrayGetCount(keys)), - key) == kCFNotFound)) { + mySession = getSession(storePrivate->server); + if ((mySession->sessionKeys == NULL) || + !CFArrayContainsValue(mySession->sessionKeys, + CFRangeMake(0, CFArrayGetCount(mySession->sessionKeys)), + key)) { /* * if no session keys defined "or" keys defined but not * this one... */ - if (keys != NULL) { - /* this is the first session key */ - newKeys = CFArrayCreateMutableCopy(NULL, 0, keys); - } else { + if (mySession->sessionKeys == NULL) { /* this is an additional session key */ - newKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + mySession->sessionKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } - CFArrayAppendValue(newKeys, key); - - /* update session dictionary */ - newSession = CFDictionaryCreateMutableCopy(NULL, 0, session); - CFDictionarySetValue(newSession, kSCDSessionKeys, newKeys); - CFRelease(newKeys); - CFDictionarySetValue(sessionData, sessionKey, newSession); - CFRelease(newSession); + CFArrayAppendValue(mySession->sessionKeys, key); } /* @@ -164,7 +145,6 @@ __SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFDataRef val CFRelease(removedKey); } } - CFRelease(sessionKey); /* @@ -220,10 +200,12 @@ _configset(mach_port_t server, int *sc_status, audit_token_t audit_token) { +#pragma unused(oldInstance) CFDataRef data = NULL; /* data (un-serialized) */ CFStringRef key = NULL; /* key (un-serialized) */ serverSessionRef mySession; + *newInstance = 0; *sc_status = kSCStatusOK; /* un-serialize the key */ @@ -255,13 +237,12 @@ _configset(mach_port_t server, } } - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "set", key)) { *sc_status = kSCStatusAccessError; goto done; } *sc_status = __SCDynamicStoreSetValue(mySession->store, key, data, FALSE); - *newInstance = 0; done : @@ -327,14 +308,11 @@ __SCDynamicStoreSetMultiple(SCDynamicStoreRef store, CFDictionaryRef keysToSet, int sc_status = kSCStatusOK; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("set m : %5d : %ld set, %ld remove, %ld notify\n"), - storePrivate->server, - keysToSet ? CFDictionaryGetCount(keysToSet) : 0, - keysToRemove ? CFArrayGetCount (keysToRemove) : 0, - keysToNotify ? CFArrayGetCount (keysToNotify) : 0); - } + SC_trace("set m : %5d : %ld set, %ld remove, %ld notify", + storePrivate->server, + keysToSet ? CFDictionaryGetCount(keysToSet) : 0, + keysToRemove ? CFArrayGetCount (keysToRemove) : 0, + keysToNotify ? CFArrayGetCount (keysToNotify) : 0); /* * Set the new/updated keys @@ -458,7 +436,7 @@ _configset_m(mach_port_t server, CFStringRef key; key = (CFStringRef)keys[i]; - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "set (multiple)", key)) { writeOK = FALSE; break; } @@ -481,7 +459,7 @@ _configset_m(mach_port_t server, CFStringRef key; key = CFArrayGetValueAtIndex(remove, i); - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "set/remove (multiple)", key)) { *sc_status = kSCStatusAccessError; goto done; } @@ -496,7 +474,7 @@ _configset_m(mach_port_t server, CFStringRef key; key = CFArrayGetValueAtIndex(notify, i); - if (!hasWriteAccess(mySession, key)) { + if (!hasWriteAccess(mySession, "set/notify (multiple)", key)) { *sc_status = kSCStatusAccessError; goto done; } diff --git a/src/configd/configd.tproj/_configunlock.c b/src/configd/configd.tproj/_configunlock.c index c5df46379..8cd913828 100644 --- a/src/configd/configd.tproj/_configunlock.c +++ b/src/configd/configd.tproj/_configunlock.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2011, 2015, 2017, 2019 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@ */ @@ -58,18 +58,15 @@ _notifyWatchers() CFSetGetValues(changedKeys, keys); while (--keyCnt >= 0) { - CFArrayRef changes; + CFStringRef changedKey = (CFStringRef)keys[keyCnt]; CFDictionaryRef dict; - CFDictionaryRef info; - CFMutableDictionaryRef newInfo; - CFMutableArrayRef newChanges; CFArrayRef sessionsWatchingKey; CFIndex watcherCnt; const void * watchers_q[N_QUICK]; const void ** watchers = watchers_q; - dict = CFDictionaryGetValue(storeData, (CFStringRef)keys[keyCnt]); - if ((dict == NULL) || (CFDictionaryContainsKey(dict, kSCDWatchers) == FALSE)) { + dict = CFDictionaryGetValue(storeData, changedKey); + if ((dict == NULL) || !CFDictionaryContainsKey(dict, kSCDWatchers)) { /* key doesn't exist or nobody cares if it changed */ continue; } @@ -91,36 +88,18 @@ _notifyWatchers() CFArrayGetValues(sessionsWatchingKey, CFRangeMake(0, watcherCnt), watchers); while (--watcherCnt >= 0) { - CFStringRef sessionKey; - - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@"), watchers[watcherCnt]); - info = CFDictionaryGetValue(sessionData, sessionKey); - if (info) { - newInfo = CFDictionaryCreateMutableCopy(NULL, 0, info); - } else { - newInfo = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - } + serverSessionRef session; + CFNumberRef watchedSession = watchers[watcherCnt]; - changes = CFDictionaryGetValue(newInfo, kSCDChangedKeys); - if (changes) { - newChanges = CFArrayCreateMutableCopy(NULL, 0, changes); - } else { - newChanges = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + session = getSessionNum(watchedSession); + if (session->changedKeys == NULL) { + session->changedKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } - - if (CFArrayContainsValue(newChanges, - CFRangeMake(0, CFArrayGetCount(newChanges)), - (CFStringRef)keys[keyCnt]) == FALSE) { - CFArrayAppendValue(newChanges, (CFStringRef)keys[keyCnt]); + if (!CFArrayContainsValue(session->changedKeys, + CFRangeMake(0, CFArrayGetCount(session->changedKeys)), + changedKey)) { + CFArrayAppendValue(session->changedKeys, changedKey); } - CFDictionarySetValue(newInfo, kSCDChangedKeys, newChanges); - CFRelease(newChanges); - CFDictionarySetValue(sessionData, sessionKey, newInfo); - CFRelease(newInfo); - CFRelease(sessionKey); /* * flag this session as needing a kick @@ -129,7 +108,7 @@ _notifyWatchers() needsNotification = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); - CFSetAddValue(needsNotification, watchers[watcherCnt]); + CFSetAddValue(needsNotification, watchedSession); } if (watchers != watchers_q) CFAllocatorDeallocate(NULL, watchers); @@ -182,14 +161,13 @@ _processDeferredRemovals() static void _cleanupRemovedSessionKeys(const void *value, void *context) { +#pragma unused(context) CFStringRef removedKey = (CFStringRef)value; CFRange dRange; + serverSessionRef session; CFStringRef sessionKey; CFStringRef key; - CFDictionaryRef sessionDict; - CFArrayRef sessionKeys; CFIndex i; - CFMutableDictionaryRef newSessionDict; dRange = CFStringFind(removedKey, CFSTR(":"), 0); sessionKey = CFStringCreateWithSubstring(NULL, @@ -200,44 +178,24 @@ _cleanupRemovedSessionKeys(const void *value, void *context) CFRangeMake(dRange.location+dRange.length, CFStringGetLength(removedKey)-dRange.location-dRange.length)); - /* - * remove the key from the session key list - */ - sessionDict = CFDictionaryGetValue(sessionData, sessionKey); - if (!sessionDict) { + session = getSessionStr(sessionKey); + if (session == NULL) { /* if no session */ goto done; } - sessionKeys = CFDictionaryGetValue(sessionDict, kSCDSessionKeys); - if (!sessionKeys) { - /* if no session keys */ - goto done; - } - - i = CFArrayGetFirstIndexOfValue(sessionKeys, - CFRangeMake(0, CFArrayGetCount(sessionKeys)), + i = CFArrayGetFirstIndexOfValue(session->sessionKeys, + CFRangeMake(0, CFArrayGetCount(session->sessionKeys)), key); if (i == kCFNotFound) { /* if this session key has already been removed */ goto done; } - - newSessionDict = CFDictionaryCreateMutableCopy(NULL, 0, sessionDict); - if (CFArrayGetCount(sessionKeys) == 1) { - /* remove the last (session) key */ - CFDictionaryRemoveValue(newSessionDict, kSCDSessionKeys); - } else { - CFMutableArrayRef newSessionKeys; - - /* remove the (session) key */ - newSessionKeys = CFArrayCreateMutableCopy(NULL, 0, sessionKeys); - CFArrayRemoveValueAtIndex(newSessionKeys, i); - CFDictionarySetValue(newSessionDict, kSCDSessionKeys, newSessionKeys); - CFRelease(newSessionKeys); + CFArrayRemoveValueAtIndex(session->sessionKeys, i); + if (CFArrayGetCount(session->sessionKeys) == 0) { + CFRelease(session->sessionKeys); + session->sessionKeys = NULL; } - CFDictionarySetValue(sessionData, sessionKey, newSessionDict); - CFRelease(newSessionDict); done: diff --git a/src/configd/configd.tproj/_notifyadd.c b/src/configd/configd.tproj/_notifyadd.c index c486ce68f..76f35643e 100644 --- a/src/configd/configd.tproj/_notifyadd.c +++ b/src/configd/configd.tproj/_notifyadd.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2010, 2011, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2010, 2011, 2014-2016 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@ */ @@ -89,14 +89,11 @@ __SCDynamicStoreAddWatchedKey(SCDynamicStoreRef store, CFStringRef key, Boolean CFNumberRef sessionNum = NULL; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : %s : %@\n"), - internal ? "*watch+" : "watch+ ", - storePrivate->server, - isRegex ? "pattern" : "key", - key); - } + SC_trace("%s : %5d : %s : %@", + internal ? "*watch+" : "watch+ ", + storePrivate->server, + isRegex ? "pattern" : "key", + key); sessionNum = CFNumberCreate(NULL, kCFNumberIntType, &storePrivate->server); @@ -246,13 +243,10 @@ __SCDynamicStoreSetNotificationKeys(SCDynamicStoreRef store, CFArrayRef keys, CF updateKeysContext myContext; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("watch : %5d : %ld keys, %ld patterns\n"), - storePrivate->server, - keys ? CFArrayGetCount(keys) : 0, - patterns ? CFArrayGetCount(patterns) : 0); - } + SC_trace("watch : %5d : %ld keys, %ld patterns", + storePrivate->server, + keys ? CFArrayGetCount(keys) : 0, + patterns ? CFArrayGetCount(patterns) : 0); myContext.store = store; myContext.sc_status = kSCStatusOK; diff --git a/src/configd/configd.tproj/_notifycancel.c b/src/configd/configd.tproj/_notifycancel.c index 36311c75f..1d4c727f5 100644 --- a/src/configd/configd.tproj/_notifycancel.c +++ b/src/configd/configd.tproj/_notifycancel.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2006, 2009 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2006, 2009, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -61,16 +61,6 @@ __SCDynamicStoreNotifyCancel(SCDynamicStoreRef store) storePrivate->notifyFile = -1; } - /* - * cleanup any signal notifications. - */ - if (storePrivate->notifySignal > 0) { - __MACH_PORT_DEBUG(TRUE, "*** __SCDynamicStoreNotifyCancel (signal)", storePrivate->notifySignalTask); - (void) mach_port_deallocate(mach_task_self(), storePrivate->notifySignalTask); - storePrivate->notifySignal = 0; - storePrivate->notifySignalTask = TASK_NULL; - } - /* remove this session from the to-be-notified list */ if (needsNotification) { CFNumberRef num; diff --git a/src/configd/configd.tproj/_notifychanges.c b/src/configd/configd.tproj/_notifychanges.c index b8aad1be8..31f64c751 100644 --- a/src/configd/configd.tproj/_notifychanges.c +++ b/src/configd/configd.tproj/_notifychanges.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2011, 2013, 2015, 2019 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@ */ @@ -38,32 +38,16 @@ __private_extern__ int __SCDynamicStoreCopyNotifiedKeys(SCDynamicStoreRef store, CFArrayRef *notifierKeys) { + serverSessionRef mySession; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - CFStringRef sessionKey; - CFDictionaryRef info; - CFMutableDictionaryRef newInfo; - - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); - info = CFDictionaryGetValue(sessionData, sessionKey); - if ((info == NULL) || - (CFDictionaryContainsKey(info, kSCDChangedKeys) == FALSE)) { - CFRelease(sessionKey); - *notifierKeys = CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks); - return kSCStatusOK; - } - newInfo = CFDictionaryCreateMutableCopy(NULL, 0, info); - *notifierKeys = CFDictionaryGetValue(newInfo, kSCDChangedKeys); - CFRetain(*notifierKeys); - - CFDictionaryRemoveValue(newInfo, kSCDChangedKeys); - if (CFDictionaryGetCount(newInfo) > 0) { - CFDictionarySetValue(sessionData, sessionKey, newInfo); + mySession = getSession(storePrivate->server); + if (mySession->changedKeys != NULL) { + *notifierKeys = mySession->changedKeys; + mySession->changedKeys = NULL; } else { - CFDictionaryRemoveValue(sessionData, sessionKey); + *notifierKeys = CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks); } - CFRelease(newInfo); - CFRelease(sessionKey); return kSCStatusOK; } diff --git a/src/configd/configd.tproj/_notifyremove.c b/src/configd/configd.tproj/_notifyremove.c index 9c894a570..811290b7d 100644 --- a/src/configd/configd.tproj/_notifyremove.c +++ b/src/configd/configd.tproj/_notifyremove.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2010-2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2010-2012, 2015, 2016 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@ */ @@ -69,14 +69,11 @@ __SCDynamicStoreRemoveWatchedKey(SCDynamicStoreRef store, CFStringRef key, Boole CFNumberRef sessionNum; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, - CFSTR("%s : %5d : %s : %@\n"), - internal ? "*watch-" : "watch- ", - storePrivate->server, - isRegex ? "pattern" : "key", - key); - } + SC_trace("%s : %5d : %s : %@", + internal ? "*watch-" : "watch- ", + storePrivate->server, + isRegex ? "pattern" : "key", + key); /* * remove key from this sessions notifier list after checking that diff --git a/src/configd/configd.tproj/_notifyviafd.c b/src/configd/configd.tproj/_notifyviafd.c index f855c6bd4..5001a67fd 100644 --- a/src/configd/configd.tproj/_notifyviafd.c +++ b/src/configd/configd.tproj/_notifyviafd.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2006, 2008-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2006, 2008-2011, 2015, 2019 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@ */ @@ -32,6 +32,7 @@ */ #include +#include #include #include #include @@ -44,32 +45,19 @@ __private_extern__ int -__SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store, - int32_t identifier, - int *fd) +__SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store) { + serverSessionRef mySession; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - int sock; - CFStringRef sessionKey; - CFDictionaryRef info; if (storePrivate->notifyStatus != NotifierNotRegistered) { /* sorry, you can only have one notification registered at once */ return kSCStatusNotifierActive; } - if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { - SCLog(TRUE, LOG_NOTICE, CFSTR("__SCDynamicStoreNotifyFileDescriptor socket() failed: %s"), strerror(errno)); - return kSCStatusFailed; - } - - *fd = sock; - /* push out a notification if any changes are pending */ - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); - info = CFDictionaryGetValue(sessionData, sessionKey); - CFRelease(sessionKey); - if (info && CFDictionaryContainsKey(info, kSCDChangedKeys)) { + mySession = getSession(storePrivate->server); + if (mySession->changedKeys != NULL) { CFNumberRef sessionNum; if (needsNotification == NULL) @@ -88,102 +76,60 @@ __SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store, __private_extern__ kern_return_t -_notifyviafd(mach_port_t server, - xmlData_t pathRef, - mach_msg_type_number_t pathLen, - int identifier, - int *sc_status +_notifyviafd(mach_port_t server, + fileport_t fileport, + int identifier, + int *sc_status ) { - int bufSiz; + int fd = -1; + int flags; serverSessionRef mySession = getSession(server); - int nbioYes; - int sock; SCDynamicStorePrivateRef storePrivate; - struct sockaddr_un un; - - /* - * if socket currently open, close it! - */ - /* validate the UNIX domain socket path */ - if (pathLen > (sizeof(un.sun_path) - 1)) { - SCLog(TRUE, LOG_NOTICE, CFSTR("_notifyviafd(): domain socket path length too long!")); - (void) vm_deallocate(mach_task_self(), (vm_address_t)pathRef, pathLen); - *sc_status = kSCStatusFailed; + + /* get notification file descriptor */ + fd = fileport_makefd(fileport); + mach_port_deallocate(mach_task_self(), fileport); + if (fd < 0) { + *sc_status = errno; return KERN_SUCCESS; } - /* un-serialize the UNIX domain socket path */ - un.sun_family = AF_UNIX; - bcopy(pathRef, un.sun_path, pathLen); - un.sun_path[pathLen] = '\0'; - (void) vm_deallocate(mach_task_self(), (vm_address_t)pathRef, pathLen); - - if (mySession == NULL) { - *sc_status = kSCStatusNoStoreSession; /* you must have an open session to play */ - return KERN_SUCCESS; + flags = fcntl(fd, F_GETFL, 0); + if (flags == -1) { + *sc_status = errno; + goto fail; } - storePrivate = (SCDynamicStorePrivateRef)mySession->store; - /* check permissions */ - if (!hasRootAccess(mySession)) { - struct stat statbuf; - - bzero(&statbuf, sizeof(statbuf)); - if (stat(un.sun_path, &statbuf) == -1) { - *sc_status = errno; - SCLog(TRUE, LOG_DEBUG, CFSTR("_notifyviafd stat() failed: %s"), strerror(errno)); - return KERN_SUCCESS; - } - if (mySession->callerEUID != statbuf.st_uid) { - *sc_status = kSCStatusAccessError; - SCLog(TRUE, LOG_DEBUG, CFSTR("_notifyviafd permissions error")); - return KERN_SUCCESS; - } + flags |= O_NONBLOCK; + if (fcntl(fd, F_SETFL, flags) == -1) { + *sc_status = errno; + goto fail; } - if (!hasPathAccess(mySession, un.sun_path)) { - *sc_status = kSCStatusAccessError; - SCLog(TRUE, LOG_DEBUG, CFSTR("_notifyviafd permissions error")); - return KERN_SUCCESS; + if (mySession == NULL) { + *sc_status = kSCStatusNoStoreSession; /* you must have an open session to play */ + goto fail; } + storePrivate = (SCDynamicStorePrivateRef)mySession->store; - /* do common sanity checks, get socket */ - *sc_status = __SCDynamicStoreNotifyFileDescriptor(mySession->store, identifier, &sock); + /* do common sanity checks */ + *sc_status = __SCDynamicStoreNotifyFileDescriptor(mySession->store); /* check status of __SCDynamicStoreNotifyFileDescriptor() */ if (*sc_status != kSCStatusOK) { - return KERN_SUCCESS; - } - - /* establish the connection, get ready for a read() */ - if (connect(sock, (struct sockaddr *)&un, sizeof(un)) == -1) { - *sc_status = errno; - SCLog(TRUE, LOG_DEBUG, CFSTR("_notifyviafd connect() failed: %s"), strerror(errno)); - (void) close(sock); - return KERN_SUCCESS; - } - - bufSiz = sizeof(storePrivate->notifyFileIdentifier); - if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &bufSiz, sizeof(bufSiz)) == -1) { - *sc_status = errno; - SCLog(TRUE, LOG_DEBUG, CFSTR("_notifyviafd setsockopt() failed: %s"), strerror(errno)); - (void) close(sock); - return KERN_SUCCESS; - } - - nbioYes = 1; - if (ioctl(sock, FIONBIO, &nbioYes) == -1) { - *sc_status = errno; - SCLog(TRUE, LOG_DEBUG, CFSTR("_notifyviafd ioctl(,FIONBIO,) failed: %s"), strerror(errno)); - (void) close(sock); - return KERN_SUCCESS; + goto fail; } /* set notifier active */ storePrivate->notifyStatus = Using_NotifierInformViaFD; - storePrivate->notifyFile = sock; + storePrivate->notifyFile = fd; storePrivate->notifyFileIdentifier = identifier; return KERN_SUCCESS; + + fail : + + if (fd >= 0) close(fd); + return KERN_SUCCESS; } diff --git a/src/configd/configd.tproj/_notifyviaport.c b/src/configd/configd.tproj/_notifyviaport.c index 8f52a7822..e8740de99 100644 --- a/src/configd/configd.tproj/_notifyviaport.c +++ b/src/configd/configd.tproj/_notifyviaport.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2009, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2009, 2011, 2015, 2019 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@ */ @@ -40,25 +40,27 @@ __SCDynamicStoreNotifyMachPort(SCDynamicStoreRef store, mach_msg_id_t identifier, mach_port_t port) { + serverSessionRef mySession; SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - CFStringRef sessionKey; - CFDictionaryRef info; if (storePrivate->notifyStatus != NotifierNotRegistered) { /* sorry, you can only have one notification registered at once */ return kSCStatusNotifierActive; } + if (identifier != 0) { + /* sorry, the message ID (never used, no longer supported) must be zero */ + return kSCStatusInvalidArgument; + } + if (port == MACH_PORT_NULL) { /* sorry, you must specify a valid mach port */ return kSCStatusInvalidArgument; } /* push out a notification if any changes are pending */ - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); - info = CFDictionaryGetValue(sessionData, sessionKey); - CFRelease(sessionKey); - if (info && CFDictionaryContainsKey(info, kSCDChangedKeys)) { + mySession = getSession(storePrivate->server); + if (mySession->changedKeys != NULL) { CFNumberRef sessionNum; if (needsNotification == NULL) @@ -110,7 +112,6 @@ _notifyviaport(mach_port_t server, __MACH_PORT_DEBUG(TRUE, "*** _notifyviaport", port); storePrivate->notifyStatus = Using_NotifierInformViaMachPort; storePrivate->notifyPort = port; - storePrivate->notifyPortIdentifier = identifier; return KERN_SUCCESS; } diff --git a/src/configd/configd.tproj/_notifyviasignal.c b/src/configd/configd.tproj/_notifyviasignal.c deleted file mode 100644 index 9d15ce935..000000000 --- a/src/configd/configd.tproj/_notifyviasignal.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2000-2004, 2006, 2009, 2011 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 - * - * June 1, 2001 Allan Nathanson - * - public API conversion - * - * March 24, 2000 Allan Nathanson - * - initial revision - */ - -#include -#include - -#include "configd.h" -#include "configd_server.h" -#include "session.h" - -__private_extern__ -int -__SCDynamicStoreNotifySignal(SCDynamicStoreRef store, pid_t pid, int sig) -{ - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; - CFStringRef sessionKey; - CFDictionaryRef info; - - if (storePrivate->notifyStatus != NotifierNotRegistered) { - /* sorry, you can only have one notification registered at once */ - return kSCStatusNotifierActive; - } - - if (pid == getpid()) { - /* sorry, you can't request that configd be signalled */ - return kSCStatusInvalidArgument; - } - - if ((sig <= 0) || (sig > NSIG)) { - /* sorry, you must specify a valid signal */ - return kSCStatusInvalidArgument; - } - - /* push out a notification if any changes are pending */ - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server); - info = CFDictionaryGetValue(sessionData, sessionKey); - CFRelease(sessionKey); - if (info && CFDictionaryContainsKey(info, kSCDChangedKeys)) { - CFNumberRef sessionNum; - - if (needsNotification == NULL) - needsNotification = CFSetCreateMutable(NULL, - 0, - &kCFTypeSetCallBacks); - - sessionNum = CFNumberCreate(NULL, kCFNumberIntType, &storePrivate->server); - CFSetAddValue(needsNotification, sessionNum); - CFRelease(sessionNum); - } - - return kSCStatusOK; -} - - -__private_extern__ -kern_return_t -_notifyviasignal(mach_port_t server, - task_t task, - int sig, - int *sc_status) -{ - serverSessionRef mySession = getSession(server); - pid_t pid; - kern_return_t status; - SCDynamicStorePrivateRef storePrivate; - - if (mySession == NULL) { - /* sorry, you must have an open session to play */ - *sc_status = kSCStatusNoStoreSession; - if (task != TASK_NULL) { - (void) mach_port_deallocate(mach_task_self(), task); - } - return KERN_SUCCESS; - } - storePrivate = (SCDynamicStorePrivateRef)mySession->store; - - if (task != TASK_NULL) { - status = pid_for_task(task, &pid); - if (status != KERN_SUCCESS) { - /* could not determine pid for task */ - *sc_status = kSCStatusFailed; - (void) mach_port_deallocate(mach_task_self(), task); - return KERN_SUCCESS; - } - } else { - /* sorry, you must specify a valid task */ - *sc_status = kSCStatusInvalidArgument; - return KERN_SUCCESS; - } - - *sc_status = __SCDynamicStoreNotifySignal(mySession->store, pid, sig); - if (*sc_status != kSCStatusOK) { - __MACH_PORT_DEBUG(TRUE, "*** _notifyviasignal __SCDynamicStoreNotifySignal failed: releasing task)", task); - (void) mach_port_deallocate(mach_task_self(), task); - return KERN_SUCCESS; - } - - __MACH_PORT_DEBUG(TRUE, "*** _notifyviasignal", task); - storePrivate->notifyStatus = Using_NotifierInformViaSignal; - storePrivate->notifySignal = sig; - storePrivate->notifySignalTask = task; - - return KERN_SUCCESS; -} diff --git a/src/configd/configd.tproj/_snapshot.c b/src/configd/configd.tproj/_snapshot.c index be7b77b3e..5197780b0 100644 --- a/src/configd/configd.tproj/_snapshot.c +++ b/src/configd/configd.tproj/_snapshot.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2006, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2009-2011, 2015, 2018, 2019 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@ */ @@ -44,7 +44,6 @@ #define SNAPSHOT_PATH_STATE _PATH_VARTMP "configd-state" #define SNAPSHOT_PATH_STORE _PATH_VARTMP "configd-store.plist" #define SNAPSHOT_PATH_PATTERN _PATH_VARTMP "configd-pattern.plist" -#define SNAPSHOT_PATH_SESSION _PATH_VARTMP "configd-session.plist" #define N_QUICK 100 @@ -70,7 +69,7 @@ _expandStore(CFDictionaryRef storeData) oValues = CFAllocatorAllocate(NULL, nElements * sizeof(CFTypeRef), 0); nValues = CFAllocatorAllocate(NULL, nElements * sizeof(CFTypeRef), 0); } - bzero(nValues, nElements * sizeof(CFTypeRef)); + memset(nValues, 0, nElements * sizeof(CFTypeRef)); CFDictionaryGetKeysAndValues(storeData, keys, oValues); for (i = 0; i < nElements; i++) { @@ -82,7 +81,11 @@ _expandStore(CFDictionaryRef storeData) nValues[i] = CFDictionaryCreateMutableCopy(NULL, 0, oValues[i]); - _SCUnserialize(&plist, data, NULL, 0); + if (!_SCUnserialize(&plist, data, NULL, 0)) { + SC_log(LOG_NOTICE, "_SCUnserialize() failed, key=%@", keys[i]); + continue; + } + CFDictionarySetValue((CFMutableDictionaryRef)nValues[i], kSCDData, plist); @@ -122,6 +125,7 @@ __private_extern__ int __SCDynamicStoreSnapshot(SCDynamicStoreRef store) { +#pragma unused(store) CFDictionaryRef expandedStoreData; FILE *f; int fd; @@ -159,7 +163,7 @@ __SCDynamicStoreSnapshot(SCDynamicStoreRef store) xmlData = CFPropertyListCreateData(NULL, expandedStoreData, kCFPropertyListXMLFormat_v1_0, 0, NULL); CFRelease(expandedStoreData); if (xmlData == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("__SCDynamicStoreSnapshot CFPropertyListCreateData() failed")); + SC_log(LOG_NOTICE, "CFPropertyListCreateData() failed"); close(fd); return kSCStatusFailed; } @@ -177,25 +181,7 @@ __SCDynamicStoreSnapshot(SCDynamicStoreRef store) xmlData = CFPropertyListCreateData(NULL, patternData, kCFPropertyListXMLFormat_v1_0, 0, NULL); if (xmlData == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("__SCDynamicStoreSnapshot CFPropertyListCreateData() failed")); - close(fd); - return kSCStatusFailed; - } - (void) write(fd, CFDataGetBytePtr(xmlData), CFDataGetLength(xmlData)); - (void) close(fd); - CFRelease(xmlData); - - /* Save a snapshot of the "session" data */ - - (void) unlink(SNAPSHOT_PATH_SESSION); - fd = open(SNAPSHOT_PATH_SESSION, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644); - if (fd == -1) { - return kSCStatusFailed; - } - - xmlData = CFPropertyListCreateData(NULL, sessionData, kCFPropertyListXMLFormat_v1_0, 0, NULL); - if (xmlData == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("__SCDynamicStoreSnapshot CFPropertyListCreateData() failed")); + SC_log(LOG_NOTICE, "CFPropertyListCreateData() failed"); close(fd); return kSCStatusFailed; } diff --git a/src/configd/configd.tproj/com.apple.configd.plist b/src/configd/configd.tproj/com.apple.configd.plist index 983b4ffc6..b45f46ca5 100644 --- a/src/configd/configd.tproj/com.apple.configd.plist +++ b/src/configd/configd.tproj/com.apple.configd.plist @@ -21,5 +21,7 @@ Umask 18 + MinimalBootProfile + diff --git a/src/configd/configd.tproj/configd.h b/src/configd/configd.tproj/configd.h index 15e251cfd..8e1cdef8f 100644 --- a/src/configd/configd.tproj/configd.h +++ b/src/configd/configd.tproj/configd.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003, 2006, 2007, 2011, 2013 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@ - * + * * 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@ */ @@ -36,28 +36,31 @@ #include #include -#include -#include -#include /* configd doesn't need the preference keys */ #define _SCSCHEMADEFINITIONS_H #define _SCSCHEMADEFINITIONSPRIVATE_H -#include -#include +#define SC_LOG_HANDLE __configd_SCDynamicStore #include "SCDynamicStoreInternal.h" -#include #include "config_types.h" #include "_SCD.h" -extern Boolean _configd_verbose; /* TRUE if verbose logging enabled */ -extern FILE *_configd_trace; /* non-NULL if tracing enabled */ -extern CFMutableSetRef _plugins_allowed; /* bundle identifiers to allow when loading */ -extern CFMutableSetRef _plugins_exclude; /* bundle identifiers to exclude from loading */ -extern CFMutableSetRef _plugins_verbose; /* bundle identifiers to enable verbose logging */ +extern Boolean _configd_verbose; /* TRUE if verbose logging enabled */ +extern CFMutableSetRef _plugins_allowed; /* bundle identifiers to allow when loading */ +extern CFMutableSetRef _plugins_exclude; /* bundle identifiers to exclude from loading */ +extern CFMutableSetRef _plugins_verbose; /* bundle identifiers to enable verbose logging */ + + +#define SC_trace(__string, ...) \ + os_log_debug(SC_LOG_HANDLE(), __string, ## __VA_ARGS__) + __BEGIN_DECLS + +os_log_t +__configd_SCDynamicStore (void); + __END_DECLS #endif /* !_S_CONFIGD_H */ diff --git a/src/configd/configd.tproj/configd.m b/src/configd/configd.tproj/configd.m index c734112cb..d94730f27 100644 --- a/src/configd/configd.tproj/configd.m +++ b/src/configd/configd.tproj/configd.m @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2011, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2011, 2013-2019 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@ */ @@ -54,17 +54,15 @@ #include "configd.h" #include "configd_server.h" #include "plugin_support.h" +#include "SCDynamicStoreInternal.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 */ -__private_extern__ -FILE *_configd_trace = NULL; /* non-NULL if tracing enabled */ - __private_extern__ CFMutableSetRef _plugins_allowed = NULL; /* bundle identifiers to allow when loading */ @@ -108,6 +106,19 @@ usage(const char *prog) } +__private_extern__ os_log_t +__configd_SCDynamicStore() +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "SCDynamicStore"); + } + + return log; +} + + static void catcher(int signum) { @@ -144,13 +155,16 @@ catcher(int signum) static void term(CFMachPortRef port, void *msg, CFIndex size, void *info) { +#pragma unused(port) +#pragma unused(msg) +#pragma unused(size) +#pragma unused(info) int status = EX_OK; Boolean wait; wait = plugin_term(&status); if (!wait) { // if we are not waiting on a plugin - status = server_shutdown(); exit (status); } @@ -161,6 +175,7 @@ term(CFMachPortRef port, void *msg, CFIndex size, void *info) static void parent_exit(int i) { +#pragma unused(i) _exit (0); } @@ -197,23 +212,6 @@ init_fds() } } - SCTrace(TRUE, stdout, CFSTR("start\n")); - return; -} - - -static void -set_trace() -{ - int fd; - - /* set _configd_trace */ - fd = open("/var/log/configd.trace", O_WRONLY|O_APPEND, 0); - if (fd != -1) { - _configd_trace = fdopen(fd, "a"); - SCTrace(TRUE, _configd_trace, CFSTR("start\n")); - } - return; } @@ -264,6 +262,7 @@ fork_child() static CFStringRef termMPCopyDescription(const void *info) { +#pragma unused(info) return CFStringCreateWithFormat(NULL, NULL, CFSTR("")); } @@ -339,17 +338,17 @@ main(int argc, char * const argv[]) // argv += optind; /* check credentials */ -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR if (getuid() != 0) { fprintf(stderr, "%s: permission denied.\n", prog); exit (EX_NOPERM); } -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR /* 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; @@ -374,10 +373,10 @@ 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) && (getenv("__FORKED_PLUGIN__") != NULL)) { + if (testBundle != NULL) { forcePlugin = TRUE; } @@ -390,7 +389,7 @@ main(int argc, char * const argv[]) * daemonize ourself. */ if (fork_child() == -1) { - fprintf(stderr, "configd: fork() failed, %s\n", strerror(errno)); + fprintf(stderr, "configd: fork() failed: %s\n", strerror(errno)); exit (1); } @@ -407,7 +406,6 @@ main(int argc, char * const argv[]) if (!forceForeground || forcePlugin) { int facility = LOG_DAEMON; int logopt = LOG_CONS|LOG_NDELAY|LOG_PID; - struct stat statbuf; if (!is_launchd_job && !forcePlugin) { init_fds(); @@ -417,7 +415,7 @@ main(int argc, char * const argv[]) logopt |= LOG_CONS; } - if (stat("/etc/rc.cdrom", &statbuf) == 0) { + if (_SC_isInstallEnvironment()) { facility = LOG_INSTALL; } @@ -426,38 +424,27 @@ main(int argc, char * const argv[]) _sc_log = FALSE; /* redirect SCLog() to stdout/stderr */ } - /* check/enable trace logging */ - set_trace(); - /* add signal handler to catch a SIGHUP */ nact.sa_handler = catcher; sigemptyset(&nact.sa_mask); nact.sa_flags = SA_RESTART; if (sigaction(SIGHUP, &nact, NULL) == -1) { - SCLog(_configd_verbose, LOG_ERR, - CFSTR("sigaction(SIGHUP, ...) failed: %s"), - strerror(errno)); + SC_log(LOG_ERR, "sigaction(SIGHUP, ...) failed: %s", strerror(errno)); } /* add signal handler to catch a SIGPIPE */ if (sigaction(SIGPIPE, &nact, NULL) == -1) { - SCLog(_configd_verbose, LOG_ERR, - CFSTR("sigaction(SIGPIPE, ...) failed: %s"), - strerror(errno)); + SC_log(LOG_ERR, "sigaction(SIGPIPE, ...) failed: %s", strerror(errno)); } /* add signal handler to catch a SIGTERM */ if (sigaction(SIGTERM, &nact, NULL) == -1) { - SCLog(_configd_verbose, LOG_ERR, - CFSTR("sigaction(SIGTERM, ...) failed: %s"), - strerror(errno)); + SC_log(LOG_ERR, "sigaction(SIGTERM, ...) failed: %s", strerror(errno)); } /* add signal handler to catch a SIGINT */ if (sigaction(SIGINT, &nact, NULL) == -1) { - SCLog(_configd_verbose, LOG_ERR, - CFSTR("sigaction(SIGINT, ...) failed: %s"), - strerror(errno)); + SC_log(LOG_ERR, "sigaction(SIGINT, ...) failed: %s", strerror(errno)); } /* create the "shutdown requested" notification port */ @@ -480,6 +467,9 @@ main(int argc, char * const argv[]) CFRelease(rls); if (testBundle == NULL) { + /* don't complain about having lots of SCDynamicStore objects */ + _SCDynamicStoreSetSessionWatchLimit(0); + /* initialize primary (store management) thread */ server_init(); @@ -494,8 +484,8 @@ main(int argc, char * const argv[]) plugin_init(); } - /* start primary (store management) thread */ - server_loop(); + /* start main thread */ + CFRunLoopRun(); } else { /* load/initialize/start specified plug-in */ plugin_exec((void *)testBundle); diff --git a/src/configd/configd.tproj/configd_server.c b/src/configd/configd.tproj/configd_server.c index bbbb9c1a6..a5229850b 100644 --- a/src/configd/configd.tproj/configd_server.c +++ b/src/configd/configd.tproj/configd_server.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2011, 2013, 2015-2017, 2019 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@ */ @@ -42,153 +42,78 @@ #include "configd.h" #include "configd_server.h" -#include "notify_server.h" #include "session.h" /* MiG generated externals and functions */ extern struct mig_subsystem _config_subsystem; -extern boolean_t config_server(mach_msg_header_t *, mach_msg_header_t *); - -/* configd server port (for new session requests) */ -static CFMachPortRef configd_port = NULL; - -__private_extern__ -boolean_t -config_demux(mach_msg_header_t *request, mach_msg_header_t *reply) -{ - Boolean processed = FALSE; - - /* - * (attempt to) process SCDynamicStore requests. - */ - processed = config_server(request, reply); - if (processed) { - return TRUE; - } - - /* - * (attempt to) process (NO MORE SENDERS) notification messages. - */ - processed = notify_server(request, reply); - if (processed) { - return TRUE; - } - - /* - * unknown message ID, log and return an error. - */ - SCLog(TRUE, LOG_ERR, CFSTR("config_demux(): unknown message ID (%d) received"), request->msgh_id); - reply->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request->msgh_bits), 0); - reply->msgh_remote_port = request->msgh_remote_port; - reply->msgh_size = sizeof(mig_reply_error_t); /* Minimal size */ - reply->msgh_local_port = MACH_PORT_NULL; - reply->msgh_id = request->msgh_id + 100; - ((mig_reply_error_t *)reply)->NDR = NDR_record; - ((mig_reply_error_t *)reply)->RetCode = MIG_BAD_ID; - - return FALSE; -} - - -#define MACH_MSG_BUFFER_SIZE 128 __private_extern__ void -configdCallback(CFMachPortRef port, void *msg, CFIndex size, void *info) +server_mach_channel_handler(void *context, // serverSessionRef + dispatch_mach_reason_t reason, + dispatch_mach_msg_t message, + mach_error_t error) { - mig_reply_error_t * bufRequest = msg; - uint32_t bufReply_q[MACH_MSG_BUFFER_SIZE/sizeof(uint32_t)]; - mig_reply_error_t * bufReply = (mig_reply_error_t *)bufReply_q; - static CFIndex bufSize = 0; - mach_msg_return_t mr; - int options; - - if (bufSize == 0) { - // get max size for MiG reply buffers - bufSize = _config_subsystem.maxsize; - - // check if our on-the-stack reply buffer will be big enough - if (bufSize > sizeof(bufReply_q)) { - SCLog(TRUE, LOG_NOTICE, - CFSTR("configdCallback(): buffer size should be increased > %d"), - _config_subsystem.maxsize); - } - } - - if (bufSize > sizeof(bufReply_q)) { - bufReply = CFAllocatorAllocate(NULL, _config_subsystem.maxsize, 0); - } - bufReply->RetCode = 0; - - /* we have a request message */ - (void) config_demux(&bufRequest->Head, &bufReply->Head); - - if (!(bufReply->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX)) { - if (bufReply->RetCode == MIG_NO_REPLY) { - bufReply->Head.msgh_remote_port = MACH_PORT_NULL; - } else if ((bufReply->RetCode != KERN_SUCCESS) && - (bufRequest->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX)) { - /* - * destroy the request - but not the reply port - */ - bufRequest->Head.msgh_remote_port = MACH_PORT_NULL; - mach_msg_destroy(&bufRequest->Head); - } - } - - if (bufReply->Head.msgh_remote_port != MACH_PORT_NULL) { - /* - * send reply. - * - * We don't want to block indefinitely because the client - * isn't receiving messages from the reply port. - * If we have a send-once right for the reply port, then - * this isn't a concern because the send won't block. - * If we have a send right, we need to use MACH_SEND_TIMEOUT. - * To avoid falling off the kernel's fast RPC path unnecessarily, - * we only supply MACH_SEND_TIMEOUT when absolutely necessary. - */ +#pragma unused(error) + bool ok; + serverSessionRef session = (serverSessionRef)context; + + static const struct mig_subsystem * const subsystems[] = { + (mig_subsystem_t)&_config_subsystem, + }; + + switch (reason) { + case DISPATCH_MACH_MESSAGE_RECEIVED: + ok = dispatch_mach_mig_demux(context, subsystems, 1, message); + if (ok) { + /* + * the dispatch mach message has been consumed as per + * usual MIG rules. Check for, and if necessary, push + * out [SCDynamicStore] change notifications to other + * processes. + */ + pushNotifications(); + } else { + /* + * no subsystem claimed the message, destroy it + */ + mach_msg_destroy(dispatch_mach_msg_get_msg(message, NULL)); + } + break; - options = MACH_SEND_MSG; - if (MACH_MSGH_BITS_REMOTE(bufReply->Head.msgh_bits) != MACH_MSG_TYPE_MOVE_SEND_ONCE) { - options |= MACH_SEND_TIMEOUT; - } - mr = mach_msg(&bufReply->Head, /* msg */ - options, /* option */ - bufReply->Head.msgh_size, /* send_size */ - 0, /* rcv_size */ - MACH_PORT_NULL, /* rcv_name */ - MACH_MSG_TIMEOUT_NONE, /* timeout */ - MACH_PORT_NULL); /* notify */ + case DISPATCH_MACH_NO_SENDERS: + __MACH_PORT_DEBUG(TRUE, "*** server_mach_channel_handler DISPATCH_MACH_NO_SENDERS", session->key); + closeSession(session); + break; - /* Has a message error occurred? */ - switch (mr) { - case MACH_SEND_INVALID_DEST: - case MACH_SEND_TIMED_OUT: - break; - default : - /* Includes success case. */ - goto done; - } - } + case DISPATCH_MACH_CANCELED: + __MACH_PORT_DEBUG(TRUE, "*** server_mach_channel_handler DISPATCH_MACH_CANCELED", session->key); + cleanupSession(session); + break; - if (bufReply->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) { - mach_msg_destroy(&bufReply->Head); + default: + break; } - done : - - if (bufReply != (mig_reply_error_t *)bufReply_q) - CFAllocatorDeallocate(NULL, bufReply); return; } -static CFStringRef -serverMPCopyDescription(const void *info) +__private_extern__ +dispatch_workloop_t +server_queue(void) { - return CFStringCreateWithFormat(NULL, NULL, CFSTR("
")); + static dispatch_once_t once; + static dispatch_workloop_t workloop; + + dispatch_once(&once, ^{ + workloop = dispatch_workloop_create_inactive("configd/SCDynamicStore"); + dispatch_set_qos_class_fallback(workloop, QOS_CLASS_UTILITY); + dispatch_activate(workloop); + }); + + return workloop; } @@ -196,14 +121,12 @@ __private_extern__ void server_init() { - serverSessionRef mySession; - CFRunLoopSourceRef rls; char *service_name; mach_port_t service_port = MACH_PORT_NULL; kern_return_t status; service_name = getenv("SCD_SERVER"); - if (!service_name) { + if (service_name == NULL) { service_name = SCD_SERVER; } @@ -215,75 +138,21 @@ server_init() break; case BOOTSTRAP_NOT_PRIVILEGED : /* if another instance of the server is starting */ - SCLog(TRUE, LOG_ERR, CFSTR("'%s' server already starting"), service_name); + SC_log(LOG_ERR, "'%s' server already starting", service_name); exit (EX_UNAVAILABLE); case BOOTSTRAP_SERVICE_ACTIVE : /* if another instance of the server is active */ - SCLog(TRUE, LOG_ERR, CFSTR("'%s' server already active"), service_name); + SC_log(LOG_ERR, "'%s' server already active", service_name); exit (EX_UNAVAILABLE); default : - SCLog(TRUE, LOG_ERR, - CFSTR("server_init bootstrap_check_in(..., '%s', ...) failed: %s"), - service_name, - bootstrap_strerror(status)); + SC_log(LOG_ERR, "server_init bootstrap_check_in(..., '%s', ...) failed: %s", + service_name, + bootstrap_strerror(status)); exit (EX_UNAVAILABLE); } /* Create the primary / new connection port and backing session */ - mySession = addSession(service_port, serverMPCopyDescription); - configd_port = mySession->serverPort; - - /* - * Create and add a run loop source for the port and add this source - * to the default run loop mode. - */ - rls = CFMachPortCreateRunLoopSource(NULL, configd_port, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); + addServer(service_port); return; } - - -__private_extern__ -int -server_shutdown() -{ - if (configd_port != NULL) { - mach_port_t service_port = CFMachPortGetPort(configd_port); - - CFMachPortInvalidate(configd_port); - CFRelease(configd_port); - configd_port = NULL; - - if (service_port != MACH_PORT_NULL) { - (void) mach_port_mod_refs(mach_task_self(), - service_port, - MACH_PORT_RIGHT_RECEIVE, - -1); - } - } - - return EX_OK; -} - - -__private_extern__ -void -server_loop() -{ - pthread_setname_np("SCDynamicStore"); - - while (TRUE) { - /* - * process one run loop event - */ - CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e10, TRUE); - - /* - * check for, and if necessary, push out change notifications - * to other processes. - */ - pushNotifications(_configd_trace); - } -} diff --git a/src/configd/configd.tproj/configd_server.h b/src/configd/configd.tproj/configd_server.h index 7363bd68d..0e8bc31a9 100644 --- a/src/configd/configd.tproj/configd_server.h +++ b/src/configd/configd.tproj/configd_server.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2006, 2008, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2008, 2011. 2015, 2018-2019 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,21 +35,24 @@ #define _S_CONFIGD_SERVER_H #include +#include #include #include -__BEGIN_DECLS +#define DISPATCH_MACH_SPI 1 +#import -void configdCallback (CFMachPortRef port, - void *msg, - CFIndex size, - void *info); +__BEGIN_DECLS -void server_init (void); +void server_mach_channel_handler + (void *context, // serverSessionRef + dispatch_mach_reason_t reason, + dispatch_mach_msg_t message, + mach_error_t error); -int server_shutdown (void); +void server_init (void); -void server_loop (void); +dispatch_workloop_t server_queue (void); kern_return_t _snapshot (mach_port_t server, int *sc_status, @@ -78,7 +81,7 @@ kern_return_t _configadd (mach_port_t server, mach_msg_type_number_t keyLen, xmlData_t dataRef, mach_msg_type_number_t dataLen, - int *newInstance, + int *newInstance, // no longer used int *sc_status, audit_token_t audit_token); @@ -87,7 +90,7 @@ kern_return_t _configadd_s (mach_port_t server, mach_msg_type_number_t keyLen, xmlData_t dataRef, mach_msg_type_number_t dataLen, - int *newInstance, + int *newInstance, // no longer used int *sc_status); kern_return_t _configget (mach_port_t server, @@ -95,7 +98,7 @@ kern_return_t _configget (mach_port_t server, mach_msg_type_number_t keyLen, xmlDataOut_t *dataRef, mach_msg_type_number_t *dataLen, - int *newInstance, + int *newInstance, // no longer used int *sc_status, audit_token_t audit_token); @@ -104,7 +107,7 @@ kern_return_t _configset (mach_port_t server, mach_msg_type_number_t keyLen, xmlData_t dataRef, mach_msg_type_number_t dataLen, - int *newInstance, + int *newInstance, // no longer used int *sc_status, audit_token_t audit_token); @@ -163,17 +166,10 @@ kern_return_t _notifyviaport (mach_port_t server, int *status); kern_return_t _notifyviafd (mach_port_t server, - xmlData_t pathRef, - mach_msg_type_number_t pathLen, + fileport_t fileport, int identifier, int *status); -kern_return_t _notifyviasignal - (mach_port_t server, - task_t task, - int signal, - int *status); - kern_return_t _notifycancel (mach_port_t server, int *sc_status); @@ -186,4 +182,4 @@ kern_return_t _notifyset (mach_port_t server, __END_DECLS -#endif /* !_S_CONFIGD_SERVER_H */ +#endif /* !_S_CONFIGD_SERVER_H */ diff --git a/src/configd/configd.tproj/entitlements-ios.plist b/src/configd/configd.tproj/entitlements-ios.plist index a1438de84..deff580c7 100644 --- a/src/configd/configd.tproj/entitlements-ios.plist +++ b/src/configd/configd.tproj/entitlements-ios.plist @@ -2,32 +2,61 @@ + com.apple.multitasking.systemappassertions + keychain-access-groups apple com.apple.certificates com.apple.identities - com.apple.coretelephony.Identity.get - + com.apple.CommCenter.fine-grained + + spi + identity + com.apple.multitasking.unlimitedassertions com.apple.private.SCNetworkConnection-proxy-user + com.apple.private.lockdown.is-host-trusted + + com.apple.SystemConfiguration.InterfaceNamer + com.apple.private.mobileinstall.allowedSPI Uninstall Lookup + com.apple.private.necp.drop_all_bypass + com.apple.private.necp.match + com.apple.private.necp.policies + + com.apple.private.nehelper.privileged + com.apple.private.snhelper - com.apple.springboard.launchapplications + com.apple.security.network.client + + com.apple.security.network.server com.apple.wifi.manager-access com.apple.wlan.authentication + com.apple.captiveagent.privileged + + com.apple.networkd_privileged + + com.apple.networkd.modify_settings + + com.apple.frontboard.launchapplications + + com.apple.private.usbdevice.setdescription + + com.apple.carousel.modalappservice + diff --git a/src/configd/configd.tproj/notify_server.c b/src/configd/configd.tproj/notify_server.c deleted file mode 100644 index 75992381c..000000000 --- a/src/configd/configd.tproj/notify_server.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2000-2004, 2007 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 - * - * March 24, 2000 Allan Nathanson - * - initial revision - */ - -#include "configd.h" -#include "session.h" - -__private_extern__ -boolean_t -notify_server(mach_msg_header_t *request, mach_msg_header_t *reply) -{ - mach_no_senders_notification_t *Request = (mach_no_senders_notification_t *)request; - mig_reply_error_t *Reply = (mig_reply_error_t *)reply; - - reply->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request->msgh_bits), 0); - reply->msgh_remote_port = request->msgh_remote_port; - reply->msgh_size = sizeof(mig_reply_error_t); /* Minimal size: update as needed */ - reply->msgh_local_port = MACH_PORT_NULL; - reply->msgh_id = request->msgh_id + 100; - - if ((Request->not_header.msgh_id > MACH_NOTIFY_LAST) || - (Request->not_header.msgh_id < MACH_NOTIFY_FIRST)) { - Reply->NDR = NDR_record; - Reply->RetCode = MIG_BAD_ID; - return FALSE; /* if this is not a notification message */ - } - - switch (Request->not_header.msgh_id) { - case MACH_NOTIFY_NO_SENDERS : - __MACH_PORT_DEBUG(TRUE, "*** notify_server MACH_NOTIFY_NO_SENDERS", Request->not_header.msgh_local_port); - cleanupSession(Request->not_header.msgh_local_port); - - Reply->Head.msgh_bits = 0; - Reply->Head.msgh_remote_port = MACH_PORT_NULL; - Reply->RetCode = KERN_SUCCESS; - return TRUE; - default : - break; - } - - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("HELP!, Received notification: port=%d, msgh_id=%d"), - Request->not_header.msgh_local_port, - Request->not_header.msgh_id); - - Reply->NDR = NDR_record; - Reply->RetCode = MIG_BAD_ID; - return FALSE; /* if this is not a notification we are handling */ -} diff --git a/src/configd/configd.tproj/pattern.c b/src/configd/configd.tproj/pattern.c index 87bcbb103..909075762 100644 --- a/src/configd/configd.tproj/pattern.c +++ b/src/configd/configd.tproj/pattern.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2003, 2004, 2006-2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2003, 2004, 2006-2008, 2011, 2012, 2015 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@ */ @@ -82,7 +82,7 @@ keyMatchesPattern(CFStringRef key, CFDataRef pRegex) if (len > (CFIndex)sizeof(str_q)) str = CFAllocatorAllocate(NULL, len, 0); if (_SC_cfstring_to_cstring(key, str, len, kCFStringEncodingASCII) == NULL) { - SCLog(TRUE, LOG_DEBUG, CFSTR("keyMatchesPattern(): could not convert store key to C string")); + SC_log(LOG_INFO, "could not convert store key to C string"); goto done; } @@ -102,7 +102,7 @@ keyMatchesPattern(CFStringRef key, CFDataRef pRegex) char reErrBuf[256]; (void)regerror(reError, preg, reErrBuf, sizeof(reErrBuf)); - SCLog(TRUE, LOG_DEBUG, CFSTR("keyMatchesPattern regexec(): %s"), reErrBuf); + SC_log(LOG_INFO, "regexec() failed: %s", reErrBuf); break; } } @@ -148,7 +148,7 @@ patternCompile(CFStringRef pattern, CFDataRef pRegex, CFStringRef *error) char * str = str_q; if (CFStringGetLength(pattern) == 0) { - SCLog(TRUE, LOG_ERR, CFSTR("patternCompile(): empty string")); + SC_log(LOG_NOTICE, "empty regex pattern"); } if (!CFStringHasPrefix(pattern, CFSTR("^"))) { @@ -179,7 +179,7 @@ patternCompile(CFStringRef pattern, CFDataRef pRegex, CFStringRef *error) 0, &len); if (len_c <= 0) { - SCLog(TRUE, LOG_ERR, CFSTR("patternCompile(): could not get buffer length for \"%@\""), pattern); + SC_log(LOG_NOTICE, "could not get buffer length for \"%@\"", pattern); len = sizeof(str_q) - 1; } if (++len > (CFIndex)sizeof(str_q)) { @@ -203,14 +203,14 @@ patternCompile(CFStringRef pattern, CFDataRef pRegex, CFStringRef *error) (void)regerror(reError, preg, reErrBuf, sizeof(reErrBuf)); *error = CFStringCreateWithCString(NULL, reErrBuf, kCFStringEncodingASCII); #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("patternCompile regcomp(%s) failed: %s"), str, reErrBuf); + SC_log(LOG_DEBUG, "regcomp(%s) failed: %s", str, reErrBuf); #endif /* DEBUG */ ok = FALSE; } } else { *error = CFRetain(CFSTR("could not convert pattern to regex string")); #ifdef DEBUG - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("%@"), *error); + SC_log(LOG_DEBUG, "%@", *error); #endif /* DEBUG */ } @@ -475,7 +475,7 @@ addKeyForPattern(const void *key, void *val, void *context) if (len > (CFIndex)sizeof(str_q)) str = CFAllocatorAllocate(NULL, len, 0); if (_SC_cfstring_to_cstring(storeKey, str, len, kCFStringEncodingASCII) == NULL) { - SCLog(TRUE, LOG_DEBUG, CFSTR("addKeyForPattern(): could not convert store key to C string")); + SC_log(LOG_INFO, "could not convert store key to C string"); goto done; } @@ -516,7 +516,7 @@ addKeyForPattern(const void *key, void *val, void *context) char reErrBuf[256]; (void)regerror(reError, preg, reErrBuf, sizeof(reErrBuf)); - SCLog(TRUE, LOG_DEBUG, CFSTR("addKeyForPattern regexec(): %s"), reErrBuf); + SC_log(LOG_INFO, "%s", reErrBuf); break; } } diff --git a/src/configd/configd.tproj/plugin_support.c b/src/configd/configd.tproj/plugin_support.c index 9a130b9ef..760cc9a3f 100644 --- a/src/configd/configd.tproj/plugin_support.c +++ b/src/configd/configd.tproj/plugin_support.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-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@ */ @@ -42,15 +42,14 @@ #include #include #include +#include #include #include -#include #include "configd.h" #include "configd_server.h" #include -#include "SCNetworkReachabilityInternal.h" -void _SCDPluginExecInit(); +#include "SystemConfigurationInternal.h" /* @@ -79,10 +78,9 @@ static const CFStringRef pluginWhitelist[] = { PLUGIN_ALL ("com.apple.SystemConfiguration.InterfaceNamer"), PLUGIN_ALL ("com.apple.SystemConfiguration.KernelEventMonitor"), PLUGIN_ALL ("com.apple.SystemConfiguration.LinkConfiguration"), - PLUGIN_ALL ("com.apple.SystemConfiguration.Logger"), PLUGIN_ALL ("com.apple.SystemConfiguration.PPPController"), PLUGIN_ALL ("com.apple.SystemConfiguration.PreferencesMonitor"), - PLUGIN_ALL ("com.apple.SystemConfiguration.SCNetworkReachability"), + PLUGIN_ALL ("com.apple.SystemConfiguration.QoSMarking"), PLUGIN_MACOSX("com.apple.print.notification"), }; #define N_PLUGIN_WHITELIST (sizeof(pluginWhitelist) / sizeof(pluginWhitelist[0])) @@ -95,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; @@ -115,98 +113,74 @@ CFRunLoopRef plugin_runLoop = NULL; extern SCDynamicStoreBundleLoadFunction load_IPMonitor; extern SCDynamicStoreBundlePrimeFunction prime_IPMonitor; -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR extern SCDynamicStoreBundleLoadFunction load_InterfaceNamer; extern SCDynamicStoreBundleLoadFunction load_KernelEventMonitor; extern SCDynamicStoreBundlePrimeFunction prime_KernelEventMonitor; extern SCDynamicStoreBundleLoadFunction load_LinkConfiguration; extern SCDynamicStoreBundleLoadFunction load_PreferencesMonitor; extern SCDynamicStoreBundlePrimeFunction prime_PreferencesMonitor; -#endif // !TARGET_IPHONE_SIMULATOR -extern SCDynamicStoreBundleLoadFunction load_SCNetworkReachability; +extern SCDynamicStoreBundleLoadFunction load_QoSMarking; +#endif // !TARGET_OS_SIMULATOR 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_IPHONE_SIMULATOR +#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 }, -#endif // !TARGET_IPHONE_SIMULATOR { - CFSTR("com.apple.SystemConfiguration.SCNetworkReachability"), - &load_SCNetworkReachability, + CFSTR("com.apple.SystemConfiguration.QoSMarking"), + load_QoSMarking, NULL, NULL, NULL }, +#endif // !TARGET_OS_SIMULATOR }; -#ifdef DEBUG -static void -traceBundle(const char *op, CFBundleRef bundle) -{ - if (_configd_trace != NULL) { - if (bundle != NULL) { - CFStringRef bundleID = CFBundleGetIdentifier(bundle); - - SCTrace(TRUE, _configd_trace, - CFSTR("bundle : %s %@\n"), - op, - bundleID); - } else { - SCTrace(TRUE, _configd_trace, - CFSTR("bundle : %s\n"), - op); - } - } - - return; -} -#endif /* DEBUG */ - - static void addBundle(CFBundleRef bundle, Boolean forceEnabled) { @@ -358,7 +332,7 @@ loadBundle(const void *value, void *context) { bundleID = CFBundleGetIdentifier(bundleInfo->bundle); if (bundleID == NULL) { // sorry, no bundles without a bundle identifier - SCLog(TRUE, LOG_NOTICE, CFSTR("skipped %@ (no bundle ID)"), bundleInfo->bundle); + SC_log(LOG_NOTICE, "skipped %@ (no bundle ID)", bundleInfo->bundle); return; } @@ -371,7 +345,7 @@ loadBundle(const void *value, void *context) { bundleInfo->forced // if "testing" plugin ); if (!bundleAllowed) { - SCLog(TRUE, LOG_WARNING, CFSTR("skipped %@ (not allowed)"), bundleID); + SC_log(LOG_INFO, "skipped %@ (not allowed)", bundleID); goto done; } @@ -381,13 +355,13 @@ loadBundle(const void *value, void *context) { ); if (bundleExclude) { // sorry, this bundle has been excluded - SCLog(TRUE, LOG_NOTICE, CFSTR("skipped %@ (excluded)"), bundleID); + SC_log(LOG_INFO, "skipped %@ (excluded)", bundleID); goto done; } if (!bundleInfo->enabled && !bundleInfo->forced) { // sorry, this bundle has not been enabled - SCLog(TRUE, LOG_INFO, CFSTR("skipped %@ (disabled)"), bundleID); + SC_log(LOG_INFO, "skipped %@ (disabled)", bundleID); goto done; } @@ -401,11 +375,9 @@ loadBundle(const void *value, void *context) { } if (bundleInfo->builtin) { - int i; - - SCLog(TRUE, LOG_DEBUG, CFSTR("adding %@"), bundleID); + SC_log(LOG_INFO, "adding %@", bundleID); - for (i = 0; i < sizeof(builtin_plugins)/sizeof(builtin_plugins[0]); i++) { + for (size_t i = 0; i < sizeof(builtin_plugins)/sizeof(builtin_plugins[0]); i++) { if (CFEqual(bundleID, builtin_plugins[i].bundleID)) { bundleInfo->load = builtin_plugins[i].load; bundleInfo->start = builtin_plugins[i].start; @@ -419,22 +391,18 @@ loadBundle(const void *value, void *context) { (bundleInfo->start == NULL) && (bundleInfo->prime == NULL) && (bundleInfo->stop == NULL)) { - SCLog(TRUE, LOG_NOTICE, CFSTR("%@ add failed"), bundleID); + SC_log(LOG_NOTICE, "%@ add failed", bundleID); goto done; } } else { CFErrorRef error = NULL; - SCLog(TRUE, LOG_DEBUG, CFSTR("loading %@"), bundleID); - -#ifdef DEBUG - traceBundle("loading", bundleInfo->bundle); -#endif /* DEBUG */ + SC_log(LOG_INFO, "loading %@", bundleID); if (!CFBundleLoadExecutableAndReturnError(bundleInfo->bundle, &error)) { CFDictionaryRef user_info; - - SCLog(TRUE, LOG_NOTICE, CFSTR("%@ load failed"), bundleID); + + SC_log(LOG_NOTICE, "%@ load failed", bundleID); user_info = CFErrorCopyUserInfo(error); if (user_info != NULL) { CFStringRef link_error_string; @@ -442,7 +410,7 @@ loadBundle(const void *value, void *context) { link_error_string = CFDictionaryGetValue(user_info, CFSTR("NSDebugDescription")); if (link_error_string != NULL) { - SCLog(TRUE, LOG_NOTICE, CFSTR("%@"), link_error_string); + SC_log(LOG_NOTICE, "%@", link_error_string); } CFRelease(user_info); } @@ -471,7 +439,9 @@ loadBundle(const void *value, void *context) { void -callLoadFunction(const void *value, void *context) { +callLoadFunction(const void *value, void *context) +{ +#pragma unused(context) bundleInfoRef bundleInfo = (bundleInfoRef)value; if (!bundleInfo->loaded) { @@ -483,9 +453,8 @@ callLoadFunction(const void *value, void *context) { return; } -#ifdef DEBUG - traceBundle("calling load() for", bundleInfo->bundle); -#endif /* DEBUG */ + SC_log(LOG_DEBUG, "calling load() for %@", + CFBundleGetIdentifier(bundleInfo->bundle)); (*bundleInfo->load)(bundleInfo->bundle, bundleInfo->verbose); @@ -498,7 +467,9 @@ callLoadFunction(const void *value, void *context) { void -callStartFunction(const void *value, void *context) { +callStartFunction(const void *value, void *context) +{ +#pragma unused(context) const char *bundleDirName; bundleInfoRef bundleInfo = (bundleInfoRef)value; char bundleName[MAXNAMLEN + 1]; @@ -529,9 +500,8 @@ callStartFunction(const void *value, void *context) { len = strlen(bundleName) - (sizeof(BUNDLE_DIR_EXTENSION) - 1); bundleName[len] = '\0'; -#ifdef DEBUG - traceBundle("calling start() for", bundleInfo->bundle); -#endif /* DEBUG */ + SC_log(LOG_DEBUG, "calling start() for %@", + CFBundleGetIdentifier(bundleInfo->bundle)); (*bundleInfo->start)(bundleName, bundlePath); @@ -544,7 +514,9 @@ callStartFunction(const void *value, void *context) { void -callPrimeFunction(const void *value, void *context) { +callPrimeFunction(const void *value, void *context) +{ +#pragma unused(context) bundleInfoRef bundleInfo = (bundleInfoRef)value; if (!bundleInfo->loaded) { @@ -556,9 +528,8 @@ callPrimeFunction(const void *value, void *context) { return; } -#ifdef DEBUG - traceBundle("calling prime() for", bundleInfo->bundle); -#endif /* DEBUG */ + SC_log(LOG_DEBUG, "calling prime() for %@", + CFBundleGetIdentifier(bundleInfo->bundle)); (*bundleInfo->prime)(); @@ -577,7 +548,7 @@ stopComplete(void *info) CFStringRef bundleID = CFBundleGetIdentifier(bundle); CFRunLoopSourceRef stopRls; - SCLog(TRUE, LOG_DEBUG, CFSTR("** %@ complete (%f)"), bundleID, CFAbsoluteTimeGetCurrent()); + SC_log(LOG_INFO, "** %@ complete (%f)", bundleID, CFAbsoluteTimeGetCurrent()); stopRls = (CFRunLoopSourceRef)CFDictionaryGetValue(exiting, bundle); if (stopRls == NULL) { @@ -589,12 +560,9 @@ stopComplete(void *info) CFDictionaryRemoveValue(exiting, bundle); if (CFDictionaryGetCount(exiting) == 0) { - int status; - // if all of the plugins are happy - status = server_shutdown(); - SCLog(TRUE, LOG_DEBUG, CFSTR("server shutdown complete (%f)"), CFAbsoluteTimeGetCurrent()); - exit (status); + SC_log(LOG_INFO, "server shutdown complete (%f)", CFAbsoluteTimeGetCurrent()); + exit (EX_OK); } return; @@ -604,12 +572,13 @@ stopComplete(void *info) static void stopDelayed(CFRunLoopTimerRef timer, void *info) { +#pragma unused(timer) +#pragma unused(info) const void **keys; CFIndex i; CFIndex n; - int status; - SCLog(TRUE, LOG_ERR, CFSTR("server shutdown was delayed, unresponsive plugins:")); + SC_log(LOG_INFO, "server shutdown was delayed, unresponsive plugins:"); /* * we've asked our plugins to shutdown but someone @@ -624,12 +593,11 @@ stopDelayed(CFRunLoopTimerRef timer, void *info) bundle = (CFBundleRef)keys[i]; bundleID = CFBundleGetIdentifier(bundle); - SCLog(TRUE, LOG_ERR, CFSTR("** %@"), bundleID); + SC_log(LOG_NOTICE, "** %@", bundleID); } CFAllocatorDeallocate(NULL, keys); - status = server_shutdown(); - exit (status); + exit (EX_OK); } static CFStringRef @@ -646,7 +614,9 @@ stopRLSCopyDescription(const void *info) static void -stopBundle(const void *value, void *context) { +stopBundle(const void *value, void *context) +{ +#pragma unused(context) bundleInfoRef bundleInfo = (bundleInfoRef)value; CFRunLoopSourceRef stopRls; CFRunLoopSourceContext stopContext = { 0 // version @@ -673,9 +643,8 @@ stopBundle(const void *value, void *context) { stopRls = CFRunLoopSourceCreate(NULL, 0, &stopContext); CFRunLoopAddSource(CFRunLoopGetCurrent(), stopRls, kCFRunLoopDefaultMode); CFDictionaryAddValue(exiting, bundleInfo->bundle, stopRls); - CFRelease(stopRls); - (*bundleInfo->stop)(stopRls); + CFRelease(stopRls); return; } @@ -690,19 +659,16 @@ stopBundles() * function should signal the provided run loop source when it is "ready" * for the shut down to proceeed. */ - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("calling bundle stop() functions")); + SC_log(LOG_DEBUG, "calling bundle stop() functions"); CFArrayApplyFunction(allBundles, CFRangeMake(0, CFArrayGetCount(allBundles)), stopBundle, NULL); if (CFDictionaryGetCount(exiting) == 0) { - int status; - // if all of the plugins are happy - status = server_shutdown(); - SCLog(TRUE, LOG_DEBUG, CFSTR("server shutdown complete (%f)"), CFAbsoluteTimeGetCurrent()); - exit (status); + SC_log(LOG_INFO, "server shutdown complete (%f)", CFAbsoluteTimeGetCurrent()); + exit (EX_OK); } else { CFRunLoopTimerRef timer; @@ -734,6 +700,7 @@ stopBundles() static CFStringRef termRLSCopyDescription(const void *info) { +#pragma unused(info) return CFStringCreateWithFormat(NULL, NULL, CFSTR("")); } @@ -766,7 +733,7 @@ plugin_term(int *status) return TRUE; } - SCLog(TRUE, LOG_DEBUG, CFSTR("starting server shutdown (%f)"), CFAbsoluteTimeGetCurrent()); + SC_log(LOG_INFO, "starting server shutdown (%f)", CFAbsoluteTimeGetCurrent()); exiting = CFDictionaryCreateMutable(NULL, 0, @@ -787,23 +754,6 @@ plugin_term(int *status) #pragma mark initialization -#ifdef DEBUG -static void -timerCallback(CFRunLoopTimerRef timer, void *info) -{ - static int pass = 0; - - pass++; - if ((pass > 120) && ((pass % 60) != 0)) { - return; - } - - traceBundle("the [plugin] CFRunLoop is waiting...", NULL); - return; -} -#endif /* DEBUG */ - - static void sortBundles(CFMutableArrayRef orig) { @@ -879,8 +829,8 @@ sortBundles(CFMutableArrayRef orig) } } - if (inserted == FALSE) { - SCLog(TRUE, LOG_NOTICE, CFSTR("Bundles have circular dependency!!!")); + if (!inserted) { + SC_log(LOG_NOTICE, "Bundles have circular dependency!!!"); break; } @@ -919,14 +869,13 @@ __private_extern__ void * plugin_exec(void *arg) { - int i; CFIndex nLoaded = 0; /* keep track of bundles */ allBundles = CFArrayCreateMutable(NULL, 0, NULL); /* add white-listed plugins to those we'll allow to be loaded */ - for (i = 0; i < N_PLUGIN_WHITELIST; i++) { + for (size_t i = 0; i < N_PLUGIN_WHITELIST; i++) { if (pluginWhitelist[i] != NULL) { CFSetSetValue(_plugins_allowed, pluginWhitelist[i]); } @@ -936,19 +885,19 @@ plugin_exec(void *arg) _SCDPluginExecInit(); if (arg == NULL) { - char path[MAXPATHLEN]; - NSSearchPathEnumerationState state; + char path[MAXPATHLEN]; + sysdir_search_path_enumeration_state state; /* * identify and load all bundles */ - state = NSStartSearchPathEnumeration(NSLibraryDirectory, - NSSystemDomainMask); - while ((state = NSGetNextSearchPathEnumeration(state, path))) { + state = sysdir_start_search_path_enumeration(SYSDIR_DIRECTORY_LIBRARY, + SYSDIR_DOMAIN_MASK_SYSTEM); + while ((state = sysdir_get_next_search_path_enumeration(state, path))) { CFArrayRef bundles; CFURLRef url; -#if TARGET_IPHONE_SIMULATOR +#if TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC const char *path_sim_prefix; path_sim_prefix = getenv("IPHONE_SIMULATOR_ROOT"); @@ -961,11 +910,11 @@ plugin_exec(void *arg) } else { path[0] = '\0'; } -#endif // TARGET_IPHONE_SIMULATOR +#endif // TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC /* load any available bundle */ strlcat(path, BUNDLE_DIRECTORY, sizeof(path)); - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("searching for bundles in \"%s\""), path); + SC_log(LOG_DEBUG, "searching for bundles in \"%s\"", path); url = CFURLCreateFromFileSystemRepresentation(NULL, (UInt8 *)path, strlen(path), @@ -1039,7 +988,7 @@ plugin_exec(void *arg) * Since xpcd calls getpwuid_r() during its initialization, it will * block until the platform UUID is available. */ - for (i = 0; i < CFArrayGetCount(allBundles); i++) { + for (CFIndex i = 0; i < CFArrayGetCount(allBundles); i++) { bundleInfoRef bi = (bundleInfoRef)CFArrayGetValueAtIndex(allBundles, i); CFStringRef bundleID = CFBundleGetIdentifier(bi->bundle); @@ -1052,14 +1001,10 @@ plugin_exec(void *arg) } } -#ifdef DEBUG - traceBundle("before loading any plugins", NULL); -#endif /* DEBUG */ - /* * load each bundle. */ - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("loading bundles")); + SC_log(LOG_DEBUG, "loading bundles"); CFArrayApplyFunction(allBundles, CFRangeMake(0, CFArrayGetCount(allBundles)), loadBundle, @@ -1076,7 +1021,7 @@ plugin_exec(void *arg) * data has changed will have an opportunity to install a * notification handler. */ - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("calling bundle load() functions")); + SC_log(LOG_DEBUG, "calling bundle load() functions"); CFArrayApplyFunction(allBundles, CFRangeMake(0, CFArrayGetCount(allBundles)), callLoadFunction, @@ -1099,7 +1044,7 @@ plugin_exec(void *arg) * data has changed will have an opportunity to install a * notification handler. */ - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("calling bundle start() functions")); + SC_log(LOG_DEBUG, "calling bundle start() functions"); CFArrayApplyFunction(allBundles, CFRangeMake(0, CFArrayGetCount(allBundles)), callStartFunction, @@ -1111,33 +1056,12 @@ plugin_exec(void *arg) * functions have been called. It should initialize any configuration * information and/or state in the store. */ - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("calling bundle prime() functions")); + SC_log(LOG_DEBUG, "calling bundle prime() functions"); CFArrayApplyFunction(allBundles, CFRangeMake(0, CFArrayGetCount(allBundles)), callPrimeFunction, NULL); -#ifdef DEBUG - if (arg == NULL && (nLoaded > 0)) { - CFRunLoopTimerRef timer; - - /* allocate a periodic event (to help show we're not blocking) */ - timer = CFRunLoopTimerCreate(NULL, /* allocator */ - CFAbsoluteTimeGetCurrent() + 1.0, /* fireDate */ - 1.0, /* interval */ - 0, /* flags */ - 0, /* order */ - timerCallback, /* callout */ - NULL); /* context */ - CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopDefaultMode); - CFRelease(timer); - } -#endif /* DEBUG */ - -#ifdef DEBUG - traceBundle("about to start plugin CFRunLoop", NULL); -#endif /* DEBUG */ - /* * The assumption is that each loaded plugin will establish CFMachPortRef, * CFSocketRef, and CFRunLoopTimerRef input sources to handle any events @@ -1145,14 +1069,14 @@ plugin_exec(void *arg) * needs to wait and/or block at any time it should do so only in its a * private thread. */ - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("starting plugin CFRunLoop")); + SC_log(LOG_DEBUG, "starting plugin CFRunLoop"); plugin_runLoop = CFRunLoopGetCurrent(); pthread_setname_np("Main plugin thread"); CFRunLoopRun(); done : - SCLog(_configd_verbose, LOG_INFO, CFSTR("No more work for the \"configd\" plugins")); + SC_log(LOG_INFO, "No more work for the \"configd\" plugin thread"); plugin_runLoop = NULL; return NULL; } @@ -1165,14 +1089,14 @@ plugin_init() pthread_attr_t tattr; pthread_t tid; - SCLog(_configd_verbose, LOG_DEBUG, CFSTR("Starting thread for plug-ins...")); + SC_log(LOG_DEBUG, "Starting \"configd\" plugin thread"); 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_create(&tid, &tattr, plugin_exec, NULL); pthread_attr_destroy(&tattr); - SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" thread id=%p"), tid); + SC_log(LOG_DEBUG, " thread id=%p", tid); return; } diff --git a/src/configd/configd.tproj/session.c b/src/configd/configd.tproj/session.c index 60b824e5b..f3cc0d8d8 100644 --- a/src/configd/configd.tproj/session.c +++ b/src/configd/configd.tproj/session.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2007-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2007-2019 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@ */ @@ -39,180 +39,140 @@ #include #include +#include #include -#if !TARGET_IPHONE_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 -/* information maintained for each active session */ -static serverSessionRef *sessions = NULL; -static int nSessions = 0; /* # of allocated sessions */ -static int lastSession = -1; /* # of last used session */ - -/* CFMachPortInvalidation runloop */ -static CFRunLoopRef sessionRunLoop = NULL; +/* information maintained for the main listener */ +static serverSessionRef server_session = NULL; -/* temp session */ -static serverSessionRef temp_session = NULL; +/* + * information maintained for each active session + * Note: sync w/sessionQueue() + */ +static CFMutableDictionaryRef client_sessions = NULL; -__private_extern__ -serverSessionRef -getSession(mach_port_t server) +static dispatch_queue_t +sessionQueue(void) { - int i; + static dispatch_once_t once; + static dispatch_queue_t q; - if (server == MACH_PORT_NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("Excuse me, why is getSession() being called with an invalid port?")); - return NULL; - } + dispatch_once(&once, ^{ + // allocate mapping between [client] session mach port and session info + client_sessions = CFDictionaryCreateMutable(NULL, + 0, + NULL, // use the actual mach_port_t as the key + &kCFTypeDictionaryValueCallBacks); + + // and a queue to synchronize access to the mapping + q = dispatch_queue_create("SCDynamicStore/sessions", NULL); + }); + + return q; +} - /* look for matching session (note: slot 0 is the "server" port) */ - for (i = 1; i <= lastSession; i++) { - serverSessionRef thisSession = sessions[i]; - if (thisSession == NULL) { - /* found an empty slot, skip it */ - continue; - } +#pragma mark - +#pragma mark __serverSession object - if (thisSession->key == server) { - /* we've seen this server before */ - return thisSession; - } +static CFStringRef __serverSessionCopyDescription (CFTypeRef cf); +static void __serverSessionDeallocate (CFTypeRef cf); - if ((thisSession->store != NULL) && - (((SCDynamicStorePrivateRef)thisSession->store)->notifySignalTask == server)) { - /* we've seen this task port before */ - return thisSession; - } - } +static const CFRuntimeClass __serverSessionClass = { + 0, // version + "serverSession", // className + NULL, // init + NULL, // copy + __serverSessionDeallocate, // dealloc + NULL, // equal + NULL, // hash + NULL, // copyFormattingDesc + __serverSessionCopyDescription // copyDebugDesc +}; - /* no sessions available */ - return NULL; -} +static CFTypeID __serverSessionTypeID = _kCFRuntimeNotATypeID; -__private_extern__ -serverSessionRef -tempSession(mach_port_t server, CFStringRef name, audit_token_t auditToken) +static CFStringRef +__serverSessionCopyDescription(CFTypeRef cf) { - static dispatch_once_t once; - SCDynamicStorePrivateRef storePrivate; + CFAllocatorRef allocator = CFGetAllocator(cf); + CFMutableStringRef result; + serverSessionRef session = (serverSessionRef)cf; - if (sessions[0]->key != server) { - // if not SCDynamicStore "server" port - return NULL; - } + result = CFStringCreateMutable(allocator, 0); + CFStringAppendFormat(result, NULL, CFSTR(" {"), cf, allocator); - dispatch_once(&once, ^{ - temp_session = sessions[0]; /* use "server" session */ - (void) __SCDynamicStoreOpen(&temp_session->store, NULL); - }); + // add client port + CFStringAppendFormat(result, NULL, CFSTR("port = 0x%x (%d)"), session->key, session->key); - /* save audit token, caller entitlements */ - temp_session->auditToken = auditToken; - temp_session->callerEUID = 1; /* not "root" */ - temp_session->callerRootAccess = UNKNOWN; - if ((temp_session->callerWriteEntitlement != NULL) && - (temp_session->callerWriteEntitlement != kCFNull)) { - CFRelease(temp_session->callerWriteEntitlement); + // add session info + if (session->name != NULL) { + CFStringAppendFormat(result, NULL, CFSTR(", name = %@"), session->name); } - temp_session->callerWriteEntitlement = kCFNull; /* UNKNOWN */ - - /* save name */ - storePrivate = (SCDynamicStorePrivateRef)temp_session->store; - if (storePrivate->name != NULL) CFRelease(storePrivate->name); - storePrivate->name = CFRetain(name); - return temp_session; + CFStringAppendFormat(result, NULL, CFSTR("}")); + return result; } -__private_extern__ -serverSessionRef -addSession(mach_port_t server, CFStringRef (*copyDescription)(const void *info)) +static void +__serverSessionDeallocate(CFTypeRef cf) { - CFMachPortContext context = { 0, NULL, NULL, NULL, NULL }; - kern_return_t kr; - mach_port_t mp = server; - int n = -1; - serverSessionRef newSession = NULL; - - /* save current (SCDynamicStore) runloop */ - if (sessionRunLoop == NULL) { - sessionRunLoop = CFRunLoopGetCurrent(); - } - - if (nSessions <= 0) { - /* if first session (the "server" port) */ - n = 0; /* use slot "0" */ - lastSession = 0; /* last used slot */ - - nSessions = 64; - sessions = malloc(nSessions * sizeof(serverSessionRef)); - - // allocate a new session for "the" server - newSession = calloc(1, sizeof(serverSession)); - } else { - int i; -#ifdef HAVE_MACHPORT_GUARDS - mach_port_options_t opts; -#endif // HAVE_MACHPORT_GUARDS +#pragma unused(cf) + serverSessionRef session = (serverSessionRef)cf; - /* check to see if we already have an open session (note: slot 0 is the "server" port) */ - for (i = 1; i <= lastSession; i++) { - serverSessionRef thisSession = sessions[i]; - - if (thisSession == NULL) { - /* found an empty slot */ - if (n < 0) { - /* keep track of the first [empty] slot */ - n = i; - } + if (session->changedKeys != NULL) CFRelease(session->changedKeys); + if (session->name != NULL) CFRelease(session->name); + if (session->sessionKeys != NULL) CFRelease(session->sessionKeys); - /* and keep looking for a matching session */ - continue; - } + return; +} - if (thisSession->key == server) { - /* we've seen this server before */ - return NULL; - } - if ((thisSession->store != NULL) && - (((SCDynamicStorePrivateRef)thisSession->store)->notifySignalTask == server)) { - /* we've seen this task port before */ - return NULL; - } - } +static serverSessionRef +__serverSessionCreate(CFAllocatorRef allocator, mach_port_t server) +{ + static dispatch_once_t once; + serverSessionRef session; + uint32_t size; - /* add a new session */ - if (n < 0) { - /* if no empty slots */ - n = ++lastSession; - if (lastSession >= nSessions) { - /* expand the session list */ - nSessions *= 2; - sessions = reallocf(sessions, (nSessions * sizeof(serverSessionRef))); - } - } + // initialize runtime + dispatch_once(&once, ^{ + __serverSessionTypeID = _CFRuntimeRegisterClass(&__serverSessionClass); + }); - // allocate a session for this client - newSession = calloc(1, sizeof(serverSession)); + // allocate session + size = sizeof(serverSession) - sizeof(CFRuntimeBase); + session = (serverSessionRef)_CFRuntimeCreateInstance(allocator, + __serverSessionTypeID, + size, + NULL); + if (session == NULL) { + return NULL; + } - // create mach port for SCDynamicStore client - mp = MACH_PORT_NULL; + // if needed, allocate a mach port for SCDynamicStore client + if (server == MACH_PORT_NULL) { + kern_return_t kr; + mach_port_t mp = MACH_PORT_NULL; +#ifdef HAVE_MACHPORT_GUARDS + mach_port_options_t opts; +#endif // HAVE_MACHPORT_GUARDS retry_allocate : #ifdef HAVE_MACHPORT_GUARDS - bzero(&opts, sizeof(opts)); + memset(&opts, 0, sizeof(opts)); opts.flags = MPO_CONTEXT_AS_GUARD; - kr = mach_port_construct(mach_task_self(), &opts, newSession, &mp); + kr = mach_port_construct(mach_task_self(), &opts, (mach_port_context_t)session, &mp); #else // HAVE_MACHPORT_GUARDS kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp); #endif // HAVE_MACHPORT_GUARDS @@ -220,38 +180,21 @@ addSession(mach_port_t server, CFStringRef (*copyDescription)(const void *info)) if (kr != KERN_SUCCESS) { char *err = NULL; - SCLog(TRUE, LOG_ERR, CFSTR("addSession: could not allocate mach port: %s"), mach_error_string(kr)); + 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; } - (void) asprintf(&err, "addSession: could not allocate mach port: %s", mach_error_string(kr)); - _SC_crash(err != NULL ? err : "addSession: could not allocate mach port", + (void) asprintf(&err, "Could not allocate mach port: %s", mach_error_string(kr)); + _SC_crash(err != NULL ? err : "Could not allocate new session (mach) port", NULL, NULL); if (err != NULL) free(err); - - free(newSession); + CFRelease(session); return NULL; } - } - // create server port - context.info = newSession; - context.copyDescription = copyDescription; - - // - // Note: we create the CFMachPort *before* we insert a send - // right present to ensure that CF does not establish - // its dead name notification. - // - newSession->serverPort = _SC_CFMachPortCreateWithPort("SCDynamicStore/session", - mp, - configdCallback, - &context); - - if (n > 0) { // insert send right that will be moved to the client kr = mach_port_insert_right(mach_task_self(), mp, @@ -263,185 +206,398 @@ addSession(mach_port_t server, CFStringRef (*copyDescription)(const void *info)) * only happen if someone stomped on OUR port (so let's leave * the port alone). */ - SCLog(TRUE, LOG_ERR, CFSTR("addSession mach_port_insert_right(): %s"), mach_error_string(kr)); - - free(newSession); + SC_log(LOG_ERR, "mach_port_insert_right() failed: %s", mach_error_string(kr)); + CFRelease(session); return NULL; } + + server = mp; } - sessions[n] = newSession; - sessions[n]->key = mp; -// sessions[n]->serverRunLoopSource = NULL; -// sessions[n]->store = NULL; - sessions[n]->callerEUID = 1; /* not "root" */ - sessions[n]->callerRootAccess = UNKNOWN; - sessions[n]->callerWriteEntitlement = kCFNull; /* UNKNOWN */ + session->callerEUID = 1; /* not "root" */ + session->callerRootAccess = UNKNOWN; + session->callerWriteEntitlement = kCFNull; /* UNKNOWN */ + session->key = server; +// session->store = NULL; - return newSession; + return session; } -__private_extern__ -void -cleanupSession(mach_port_t server) +#pragma mark - +#pragma mark SCDynamicStore state handler + + +static void +addSessionReference(const void *key, const void *value, void *context) { - int i; +#pragma unused(key) + CFMutableDictionaryRef dict = (CFMutableDictionaryRef)context; + serverSessionRef session = (serverSessionRef)value; + + if (session->name != NULL) { + int cnt; + CFNumberRef num; + + if (!CFDictionaryGetValueIfPresent(dict, + session->name, + (const void **)&num) || + !CFNumberGetValue(num, kCFNumberIntType, &cnt)) { + // if first session + cnt = 0; + } + cnt++; + num = CFNumberCreate(NULL, kCFNumberIntType, &cnt); + CFDictionarySetValue(dict, session->name, num); + CFRelease(num); + } + + return; +} - for (i = 1; i <= lastSession; i++) { - CFStringRef sessionKey; - serverSessionRef thisSession = sessions[i]; - if (thisSession == NULL) { - /* found an empty slot, skip it */ - continue; +static void +add_state_handler() +{ + os_state_block_t state_block; + + state_block = ^os_state_data_t(os_state_hints_t hints) { +#pragma unused(hints) + CFDataRef data = NULL; + CFIndex n; + Boolean ok; + os_state_data_t state_data; + size_t state_data_size; + CFIndex state_len; + + n = CFDictionaryGetCount(client_sessions); + if (n < 500) { + CFStringRef str; + + str = CFStringCreateWithFormat(NULL, NULL, CFSTR("n = %ld"), n); + ok = _SCSerialize(str, &data, NULL, NULL); + CFRelease(str); + } else { + CFMutableDictionaryRef dict; + + dict = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionaryApplyFunction(client_sessions, addSessionReference, dict); + ok = _SCSerialize(dict, &data, NULL, NULL); + CFRelease(dict); } - if (thisSession->key == server) { - /* - * session entry still exists. - */ + state_len = (ok && (data != NULL)) ? CFDataGetLength(data) : 0; + state_data_size = OS_STATE_DATA_SIZE_NEEDED(state_len); + if (state_data_size > MAX_STATEDUMP_SIZE) { + SC_log(LOG_ERR, "SCDynamicStore/sessions : state data too large (%zd > %zd)", + state_data_size, + (size_t)MAX_STATEDUMP_SIZE); + if (data != NULL) CFRelease(data); + return NULL; + } - if (_configd_trace) { - SCTrace(TRUE, _configd_trace, CFSTR("cleanup : %5d\n"), server); - } + state_data = calloc(1, state_data_size); + if (state_data == NULL) { + SC_log(LOG_ERR, "SCDynamicStore/sessions: could not allocate state data"); + if (data != NULL) CFRelease(data); + return NULL; + } - /* - * Close any open connections including cancelling any outstanding - * notification requests and releasing any locks. - */ - __MACH_PORT_DEBUG(TRUE, "*** cleanupSession", server); - (void) __SCDynamicStoreClose(&thisSession->store); - __MACH_PORT_DEBUG(TRUE, "*** cleanupSession (after __SCDynamicStoreClose)", server); + state_data->osd_type = OS_STATE_DATA_SERIALIZED_NSCF_OBJECT; + state_data->osd_data_size = (uint32_t)state_len; + strlcpy(state_data->osd_title, "SCDynamicStore/sessions", sizeof(state_data->osd_title)); + if (state_len > 0) { + memcpy(state_data->osd_data, CFDataGetBytePtr(data), state_len); + } + if (data != NULL) CFRelease(data); - /* - * Our send right has already been removed. Remove our receive right. - */ -#ifdef HAVE_MACHPORT_GUARDS - (void) mach_port_destruct(mach_task_self(), server, 0, thisSession); -#else // HAVE_MACHPORT_GUARDS - (void) mach_port_mod_refs(mach_task_self(), server, MACH_PORT_RIGHT_RECEIVE, -1); -#endif // HAVE_MACHPORT_GUARDS + return state_data; + }; - /* - * release any entitlement info - */ - if ((thisSession->callerWriteEntitlement != NULL) && - (thisSession->callerWriteEntitlement != kCFNull)) { - CFRelease(thisSession->callerWriteEntitlement); - } + (void) os_state_add_handler(sessionQueue(), state_block); + return; +} - /* - * We don't need any remaining information in the - * sessionData dictionary, remove it. - */ - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), server); - CFDictionaryRemoveValue(sessionData, sessionKey); - CFRelease(sessionKey); - /* - * get rid of the per-session structure. - */ - free(thisSession); - sessions[i] = NULL; - - if (i == lastSession) { - /* we are removing the last session, update last used slot */ - while (--lastSession > 0) { - if (sessions[lastSession] != NULL) { - break; - } - } - } +#pragma mark - +#pragma mark SCDynamicStore session management - return; - } + +__private_extern__ +serverSessionRef +getSession(mach_port_t server) +{ + __block serverSessionRef session; + + assert(server != MACH_PORT_NULL); + dispatch_sync(sessionQueue(), ^{ + session = (serverSessionRef)CFDictionaryGetValue(client_sessions, + (const void *)(uintptr_t)server); + }); + + return session; +} + + +__private_extern__ +serverSessionRef +getSessionNum(CFNumberRef serverNum) +{ + union { + mach_port_t mp; + uint64_t val; + } server; + serverSessionRef session; + + (void) CFNumberGetValue(serverNum, kCFNumberSInt64Type, &server.val); + session = getSession(server.mp); + + return session; +} + + +__private_extern__ +serverSessionRef +getSessionStr(CFStringRef serverKey) +{ + mach_port_t server; + serverSessionRef session; + char str[16]; + + (void) _SC_cfstring_to_cstring(serverKey, str, sizeof(str), kCFStringEncodingASCII); + server = atoi(str); + session = getSession(server); + + return session; +} + + +__private_extern__ +serverSessionRef +tempSession(mach_port_t server, CFStringRef name, audit_token_t auditToken) +{ + static dispatch_once_t once; + SCDynamicStorePrivateRef storePrivate; /* temp session */ + static serverSession temp_session; + + dispatch_once(&once, ^{ + temp_session = *server_session; /* use "server" session clone */ + (void) __SCDynamicStoreOpen(&temp_session.store, NULL); + }); + + if (temp_session.key != server) { + // if not SCDynamicStore "server" port + return NULL; } - SCLog(TRUE, LOG_ERR, CFSTR("MACH_NOTIFY_NO_SENDERS w/no session, port = %d"), server); - __MACH_PORT_DEBUG(TRUE, "*** cleanupSession w/no session", server); - return; + /* save audit token, caller entitlements */ + temp_session.auditToken = auditToken; + temp_session.callerEUID = 1; /* not "root" */ + temp_session.callerRootAccess = UNKNOWN; + if ((temp_session.callerWriteEntitlement != NULL) && + (temp_session.callerWriteEntitlement != kCFNull)) { + CFRelease(temp_session.callerWriteEntitlement); + } + temp_session.callerWriteEntitlement = kCFNull; /* UNKNOWN */ + + /* save name */ + storePrivate = (SCDynamicStorePrivateRef)temp_session.store; + if (storePrivate->name != NULL) CFRelease(storePrivate->name); + storePrivate->name = CFRetain(name); + + return &temp_session; } __private_extern__ void -listSessions(FILE *f) +addSession(serverSessionRef session, Boolean isMain) { - int i; + session->serverChannel = dispatch_mach_create_f("configd/SCDynamicStore", + server_queue(), + (void *)session, + server_mach_channel_handler); + if (!isMain) { + // if not main SCDynamicStore port, watch for exit + dispatch_mach_request_no_senders(session->serverChannel); + } +#if TARGET_OS_SIMULATOR + // simulators don't support MiG QoS propagation yet + dispatch_set_qos_class_fallback(session->serverChannel, QOS_CLASS_USER_INITIATED); +#else + dispatch_set_qos_class_fallback(session->serverChannel, QOS_CLASS_BACKGROUND); +#endif + dispatch_mach_connect(session->serverChannel, session->key, MACH_PORT_NULL, NULL); + return; +} - SCPrint(TRUE, f, CFSTR("Current sessions :\n")); - for (i = 0; i <= lastSession; i++) { - serverSessionRef thisSession = sessions[i]; - if (thisSession == NULL) { - continue; - } +__private_extern__ +serverSessionRef +addClient(mach_port_t server, audit_token_t audit_token) +{ - SCPrint(TRUE, f, CFSTR("\t%d : port = 0x%x"), i, thisSession->key); + __block serverSessionRef newSession = NULL; - if (thisSession->store != NULL) { - SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)thisSession->store; + dispatch_sync(sessionQueue(), ^{ + Boolean ok; - if (storePrivate->notifySignalTask != TASK_NULL) { - SCPrint(TRUE, f, CFSTR(", task = %d"), storePrivate->notifySignalTask); - } + // check to see if we already have an open session + ok = CFDictionaryContainsKey(client_sessions, + (const void *)(uintptr_t)server); + if (ok) { + // if we've already added a session for this port + return; } - if (sessionData != NULL) { - CFDictionaryRef info; - CFStringRef key; + // allocate a new session for "the" server + newSession = __serverSessionCreate(NULL, MACH_PORT_NULL); + if (newSession != NULL) { + // and add a port --> session mapping + CFDictionarySetValue(client_sessions, + (const void *)(uintptr_t)newSession->key, + newSession); - key = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), thisSession->key); - info = CFDictionaryGetValue(sessionData, key); - CFRelease(key); - if (info != NULL) { - CFStringRef name; + // save the audit_token in case we need to check the callers credentials + newSession->auditToken = audit_token; - name = CFDictionaryGetValue(info, kSCDName); - if (name != NULL) { - SCPrint(TRUE, f, CFSTR(", name = %@"), name); - } - } + CFRelease(newSession); // reference held by dictionary } + }); - if (thisSession->serverPort != NULL) { - SCPrint(TRUE, f, CFSTR("\n\t\t%@"), thisSession->serverPort); - } + if (newSession != NULL) { + addSession(newSession, FALSE); + } - if (thisSession->serverRunLoopSource != NULL) { - SCPrint(TRUE, f, CFSTR("\n\t\t%@"), thisSession->serverRunLoopSource); - } + return newSession; +} - SCPrint(TRUE, f, CFSTR("\n")); + +__private_extern__ +serverSessionRef +addServer(mach_port_t server) +{ + // allocate a session for "the" server + server_session = __serverSessionCreate(NULL, server); + addSession(server_session, TRUE); + + // add a state dump handler + add_state_handler(); + + return server_session; +} + + +__private_extern__ +void +cleanupSession(serverSessionRef session) +{ + mach_port_t server = session->key; + + SC_trace("cleanup : %5d", server); + + /* + * Close any open connections including cancelling any outstanding + * notification requests and releasing any locks. + */ + __MACH_PORT_DEBUG(TRUE, "*** cleanupSession", server); + (void) __SCDynamicStoreClose(&session->store); + __MACH_PORT_DEBUG(TRUE, "*** cleanupSession (after __SCDynamicStoreClose)", server); + + /* + * Our send right has already been removed. Remove our receive right. + */ +#ifdef HAVE_MACHPORT_GUARDS + (void) mach_port_destruct(mach_task_self(), server, 0, (mach_port_context_t)session); +#else // HAVE_MACHPORT_GUARDS + (void) mach_port_mod_refs(mach_task_self(), server, MACH_PORT_RIGHT_RECEIVE, -1); +#endif // HAVE_MACHPORT_GUARDS + + /* + * release any entitlement info + */ + if ((session->callerWriteEntitlement != NULL) && + (session->callerWriteEntitlement != kCFNull)) { + CFRelease(session->callerWriteEntitlement); } - SCPrint(TRUE, f, CFSTR("\n")); + /* + * get rid of the per-session structure. + */ + dispatch_sync(sessionQueue(), ^{ + CFDictionaryRemoveValue(client_sessions, + (const void *)(uintptr_t)server); + }); + return; } -#include -#include - -static CFStringRef -sessionName(serverSessionRef session) +__private_extern__ +void +closeSession(serverSessionRef session) { - CFDictionaryRef info; - CFStringRef name = NULL; - CFStringRef sessionKey; + /* + * cancel and release the mach channel + */ + if (session->serverChannel != NULL) { + dispatch_mach_cancel(session->serverChannel); + dispatch_release(session->serverChannel); + session->serverChannel = NULL; + } + + return; +} - sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), session->key); - info = CFDictionaryGetValue(sessionData, sessionKey); - CFRelease(sessionKey); - if (info != NULL) { - name = CFDictionaryGetValue(info, kSCDName); +typedef struct ReportSessionInfo { + FILE *f; + int n; +} ReportSessionInfo, *ReportSessionInfoRef; + +static void +printOne(const void *key, const void *value, void *context) +{ +#pragma unused(key) + ReportSessionInfoRef reportInfo = (ReportSessionInfoRef)context; + serverSessionRef session = (serverSessionRef)value; + + SCPrint(TRUE, reportInfo->f, CFSTR(" %d : port = 0x%x"), ++reportInfo->n, session->key); + SCPrint(TRUE, reportInfo->f, CFSTR(", name = %@"), session->name); + if (session->changedKeys != NULL) { + SCPrint(TRUE, reportInfo->f, CFSTR("\n changedKeys = %@"), session->changedKeys); } + if (session->sessionKeys != NULL) { + SCPrint(TRUE, reportInfo->f, CFSTR("\n sessionKeys = %@"), session->sessionKeys); + } + SCPrint(TRUE, reportInfo->f, CFSTR("\n")); + return; +} - return (name != NULL) ? name : CFSTR("???"); + +__private_extern__ +void +listSessions(FILE *f) +{ + dispatch_sync(sessionQueue(), ^{ + ReportSessionInfo reportInfo = { .f = f, .n = 0 }; + + SCPrint(TRUE, f, CFSTR("Current sessions :\n")); + CFDictionaryApplyFunction(client_sessions, + printOne, + (void *)&reportInfo); + SCPrint(TRUE, f, CFSTR("\n")); + }); + return; } + +#include +#include + static CFTypeRef copyEntitlement(serverSessionRef session, CFStringRef entitlement) { @@ -462,20 +618,18 @@ copyEntitlement(serverSessionRef session, CFStringRef entitlement) if (!CFEqual(domain, kCFErrorDomainMach) || ((code != kIOReturnInvalid) && (code != kIOReturnNotFound))) { // if unexpected error - SCLog(TRUE, LOG_ERR, - CFSTR("SecTaskCopyValueForEntitlement(,\"%@\",) failed, error = %@ : %@"), - entitlement, - error, - sessionName(session)); + SC_log(LOG_NOTICE, "SecTaskCopyValueForEntitlement(,\"%@\",) failed, error = %@ : %@", + entitlement, + error, + session->name); } CFRelease(error); } CFRelease(task); } else { - SCLog(TRUE, LOG_ERR, - CFSTR("SecTaskCreateWithAuditToken() failed: %@"), - sessionName(session)); + SC_log(LOG_NOTICE, "SecTaskCreateWithAuditToken() failed: %@", + session->name); } return value; @@ -509,7 +663,7 @@ __private_extern__ Boolean hasRootAccess(serverSessionRef session) { -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR if (session->callerRootAccess == UNKNOWN) { #if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) && !TARGET_OS_IPHONE @@ -530,7 +684,8 @@ hasRootAccess(serverSessionRef session) return (session->callerRootAccess == YES) ? TRUE : FALSE; -#else // !TARGET_IPHONE_SIMULATOR +#else // !TARGET_OS_SIMULATOR +#pragma unused(session) /* * assume that all processes interacting with @@ -538,13 +693,13 @@ hasRootAccess(serverSessionRef session) */ return TRUE; -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR } __private_extern__ Boolean -hasWriteAccess(serverSessionRef session, CFStringRef key) +hasWriteAccess(serverSessionRef session, const char *op, CFStringRef key) { Boolean isSetup; @@ -566,10 +721,10 @@ hasWriteAccess(serverSessionRef session, CFStringRef key) * general, this is unwise and we should at the * very least complain. */ - SCLog(TRUE, LOG_ERR, - CFSTR("*** Non-configd process (pid=%d) attempting to modify \"%@\" ***"), - pid, - key); + SC_log(LOG_NOTICE, "*** Non-configd process (pid=%d) attempting to %s \"%@\" ***", + pid, + op, + key); } return TRUE; @@ -584,12 +739,11 @@ hasWriteAccess(serverSessionRef session, CFStringRef key) * something we should ever allow (regardless of * any entitlements). */ - SCLog(TRUE, LOG_ERR, - CFSTR("*** Non-root process (pid=%d) attempting to modify \"%@\" ***"), - sessionPid(session), - key); + SC_log(LOG_NOTICE, "*** Non-root process (pid=%d) attempting to modify \"%@\" ***", + sessionPid(session), + key); - //return FALSE; // return FALSE when rdar://9811832 has beed fixed + return FALSE; } if (session->callerWriteEntitlement == kCFNull) { @@ -654,7 +808,7 @@ hasPathAccess(serverSessionRef session, const char *path) char realPath[PATH_MAX]; if (realpath(path, realPath) == NULL) { - SCLog(TRUE, LOG_DEBUG, CFSTR("hasPathAccess realpath() failed: %s"), strerror(errno)); + SC_log(LOG_INFO, "realpath() failed: %s", strerror(errno)); return FALSE; } @@ -675,7 +829,7 @@ hasPathAccess(serverSessionRef session, const char *path) "file-write-data", // operation SANDBOX_FILTER_PATH | SANDBOX_CHECK_NO_REPORT, // sandbox_filter_type realPath) > 0) { // ... - SCLog(TRUE, LOG_DEBUG, CFSTR("hasPathAccess sandbox access denied: %s"), strerror(errno)); + SC_log(LOG_INFO, "sandbox access denied: %s", strerror(errno)); return FALSE; } diff --git a/src/configd/configd.tproj/session.h b/src/configd/configd.tproj/session.h index 273f8f389..0d2cdb3a9 100644 --- a/src/configd/configd.tproj/session.h +++ b/src/configd/configd.tproj/session.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2005-2007, 2009-2012, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2005-2007, 2009-2012, 2014, 2016-2019 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,9 +35,11 @@ #define _S_SESSION_H #include -#include +#include #include +#define DISPATCH_MACH_SPI 1 +#import /* * SCDynamicStore write access entitlement @@ -64,14 +66,19 @@ typedef enum { NO = 0, YES, UNKNOWN } lazyBoolean; /* Per client server state */ typedef struct { + // base CFType information + CFRuntimeBase cfBase; + /* mach port used as the key to this session */ mach_port_t key; - /* mach port associated with this session */ - CFMachPortRef serverPort; - CFRunLoopSourceRef serverRunLoopSource; + /* mach channel associated with this session */ + dispatch_mach_t serverChannel; /* data associated with this "open" session */ + CFMutableArrayRef changedKeys; + CFStringRef name; + CFMutableArrayRef sessionKeys; SCDynamicStoreRef store; /* credentials associated with this "open" session */ @@ -98,22 +105,31 @@ typedef struct { __BEGIN_DECLS +serverSessionRef addClient (mach_port_t server, + audit_token_t audit_token); + +serverSessionRef addServer (mach_port_t server); + serverSessionRef getSession (mach_port_t server); +serverSessionRef getSessionNum (CFNumberRef serverKey); + +serverSessionRef getSessionStr (CFStringRef serverKey); + serverSessionRef tempSession (mach_port_t server, CFStringRef name, audit_token_t auditToken); -serverSessionRef addSession (mach_port_t server, - CFStringRef (*copyDescription)(const void *info)); +void cleanupSession (serverSessionRef session); -void cleanupSession (mach_port_t server); +void closeSession (serverSessionRef session); void listSessions (FILE *f); Boolean hasRootAccess (serverSessionRef session); Boolean hasWriteAccess (serverSessionRef session, + const char *op, CFStringRef key); Boolean hasPathAccess (serverSessionRef session, @@ -121,4 +137,4 @@ Boolean hasPathAccess (serverSessionRef session, __END_DECLS -#endif /* !_S_SESSION_H */ +#endif /* !_S_SESSION_H */ diff --git a/src/configd/configd.tproj/update-mach-services b/src/configd/configd.tproj/update-mach-services old mode 100755 new mode 100644 index 584617304..22775b801 --- a/src/configd/configd.tproj/update-mach-services +++ b/src/configd/configd.tproj/update-mach-services @@ -1,6 +1,6 @@ #!/bin/sh -CONFIGD_LAUNCHD_PLIST=${INSTALL_DIR}/../../System/Library/LaunchDaemons/${1} +CONFIGD_LAUNCHD_PLIST=${DSTROOT}/System/Library/LaunchDaemons/${1} CONFIGD_PLUGINS=/tmp/plugins.$$ EMBEDDED_PROJECTS=/tmp/projects.$$ PLUGIN_MACHSERVICES=/tmp/plugin.$$ @@ -9,8 +9,8 @@ HAVE_CONFIGD_PLUGINS="MISSING" HAVE_IPCONFIGURATION="MISSING" cp /dev/null ${CONFIGD_PLUGINS} -if [ -d ${INSTALL_DIR}/../../System/Library/SystemConfiguration ]; then - (cd ${INSTALL_DIR}/../../System/Library/SystemConfiguration ; ls -1d *.bundle >> ${CONFIGD_PLUGINS} 2>/dev/null ) +if [ -d ${DSTROOT}/System/Library/SystemConfiguration ]; then + (cd ${DSTROOT}/System/Library/SystemConfiguration ; ls -1d *.bundle >> ${CONFIGD_PLUGINS} 2>/dev/null ) fi cp /dev/null ${EMBEDDED_PROJECTS} @@ -41,14 +41,14 @@ do PLUGIN_PLIST="" # if [ -z "${PLUGIN_PLIST}" ]; then - PLUGIN_INF=${INSTALL_DIR}/../../System/Library/SystemConfiguration/${PLUGIN}/Contents/Info.plist + PLUGIN_INF=${DSTROOT}/System/Library/SystemConfiguration/${PLUGIN}/Contents/Info.plist if [ -f ${PLUGIN_INF} ]; then PLUGIN_PLIST=${PLUGIN_INF} fi # fi if [ -z "${PLUGIN_PLIST}" ]; then - PLUGIN_INF=${INSTALL_DIR}/../../System/Library/SystemConfiguration/${PLUGIN}/Info.plist + PLUGIN_INF=${DSTROOT}/System/Library/SystemConfiguration/${PLUGIN}/Info.plist if [ -f ${PLUGIN_INF} ]; then PLUGIN_PLIST=${PLUGIN_INF} fi @@ -109,10 +109,10 @@ do if [ $? -eq 0 ]; then echo "Merging \"MachServices\" from: ${PLUGIN_INF}" /usr/libexec/PlistBuddy -c "Merge ${PLUGIN_MACHSERVICES} :MachServices" ${CONFIGD_LAUNCHD_PLIST} 2>/dev/null - if [ -n "${IPHONEOS_DEPLOYMENT_TARGET}" ]; then - /usr/bin/plutil -convert binary1 ${CONFIGD_LAUNCHD_PLIST} - else + if [ -n "${MACOSX_DEPLOYMENT_TARGET}" ]; then /usr/bin/plutil -convert xml1 ${CONFIGD_LAUNCHD_PLIST} + else + /usr/bin/plutil -convert binary1 ${CONFIGD_LAUNCHD_PLIST} fi fi @@ -128,16 +128,31 @@ done rm -f ${PLUGIN_MACHSERVICES} ${CONFIGD_PLUGINS} ${EMBEDDED_PROJECTS} +MISSING="" if [ "${HAVE_CONFIGD_PLUGINS}" != "OK" ]; then + MISSING="configd_plugins" +elif [ "${HAVE_IPCONFIGURATION}" != "OK" ]; then + case "${PLATFORM_NAME}" in + *simulator ) + ;; + * ) + MISSING="bootp" + ;; + esac +fi + +if [ -n "${MISSING}" ]; then echo "" echo "**************************************************************************************" - echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (configd_plugins)" + echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (${MISSING})" echo "**************************************************************************************" - exit 1 -elif [ "${HAVE_IPCONFIGURATION}" != "OK" -a "${PLATFORM_NAME}" != "iphonesimulator" ] ; then - echo "" - echo "****************************************************************************" - echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (bootp)" - echo "****************************************************************************" - exit 1 + if [ -z "${RC_RELEASE}" ]; then + echo "* REMOVING CONFIGD's LAUNCHD .plist FROM INSTALL ROOT" + echo "**************************************************************************************" + rm -f ${CONFIGD_LAUNCHD_PLIST} + else + # if B&I or "buildit", configd's launchd .plist is required (and must be viable) + exit 1 + fi fi + diff --git a/src/configd/configd.xcodeproj/project.pbxproj b/src/configd/configd.xcodeproj/project.pbxproj index 41c044f33..fd9a358dd 100644 --- a/src/configd/configd.xcodeproj/project.pbxproj +++ b/src/configd/configd.xcodeproj/project.pbxproj @@ -17,6 +17,9 @@ 158317100CFB77D1006F62B9 /* PBXTargetDependency */, 158317160CFB783B006F62B9 /* PBXTargetDependency */, 158317180CFB784D006F62B9 /* PBXTargetDependency */, + 15401C2E21991B1B006326B7 /* PBXTargetDependency */, + 15EF89C221894837003B2C5C /* PBXTargetDependency */, + 15EF89C421894837003B2C5C /* PBXTargetDependency */, ); name = "All-Embedded"; productName = Embedded; @@ -30,8 +33,6 @@ 15A5A2710D5B942D0087BDA0 /* PBXTargetDependency */, 15E1B06416EBAF2A00E5F06F /* PBXTargetDependency */, 15E1B06616EBAF2A00E5F06F /* PBXTargetDependency */, - 15AB752216EC005A00FAA8CE /* PBXTargetDependency */, - 15AB752416EC005A00FAA8CE /* PBXTargetDependency */, 15D3083016F3EAD000014F82 /* PBXTargetDependency */, 15D3083216F3EAD000014F82 /* PBXTargetDependency */, 15E1B03E16EBAB8A00E5F06F /* PBXTargetDependency */, @@ -40,21 +41,72 @@ name = "configd_base-EmbeddedSimulator"; productName = Frameworks; }; + 15401C1C21991506006326B7 /* configd_extras */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 15401C1D21991506006326B7 /* Build configuration list for PBXAggregateTarget "configd_extras" */; + buildPhases = ( + 15401C2021991549006326B7 /* Create non-empty Root */, + ); + dependencies = ( + ); + name = configd_extras; + productName = configd_extras; + }; + 15401C21219915BC006326B7 /* configd_extras-Embedded */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 15401C23219915BC006326B7 /* Build configuration list for PBXAggregateTarget "configd_extras-Embedded" */; + buildPhases = ( + 15401C22219915BC006326B7 /* Create non-empty Root */, + ); + dependencies = ( + 155C626121C2B6FD008DCB1A /* PBXTargetDependency */, + 155C626521C2B6FD008DCB1A /* PBXTargetDependency */, + ); + name = "configd_extras-Embedded"; + productName = configd_extras; + }; + 15401C26219915C6006326B7 /* configd_extras-EmbeddedSimulator */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 15401C28219915C6006326B7 /* Build configuration list for PBXAggregateTarget "configd_extras-EmbeddedSimulator" */; + buildPhases = ( + 15401C27219915C6006326B7 /* Create non-empty Root */, + ); + dependencies = ( + ); + name = "configd_extras-EmbeddedSimulator"; + productName = configd_extras; + }; 155847FA07550D210046C2E9 /* configd_executables */ = { isa = PBXAggregateTarget; buildConfigurationList = 156EB62E0905594A00EEF749 /* Build configuration list for PBXAggregateTarget "configd_executables" */; buildPhases = ( ); dependencies = ( + 15631D111ECF92E70088EEDD /* PBXTargetDependency */, 1558480607550D470046C2E9 /* PBXTargetDependency */, 1558480807550D470046C2E9 /* PBXTargetDependency */, - 1558480A07550D470046C2E9 /* PBXTargetDependency */, + 72C4A4801BE44D19009D570E /* PBXTargetDependency */, D6DDAC3D147A24BC00A2E902 /* PBXTargetDependency */, 150ECB300D0042DA0065E94D /* PBXTargetDependency */, + 72C12CB11D6EA2CA000EE61C /* PBXTargetDependency */, + C453EED22086992B00BF504E /* PBXTargetDependency */, ); name = configd_executables; productName = configd_executables; }; + 15631D161ECF98FB0088EEDD /* configd_executables-EmbeddedSimulator */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 15631D231ECF98FB0088EEDD /* Build configuration list for PBXAggregateTarget "configd_executables-EmbeddedSimulator" */; + buildPhases = ( + ); + dependencies = ( + 15631D271ECF99800088EEDD /* PBXTargetDependency */, + 15631D291ECF99800088EEDD /* PBXTargetDependency */, + 15631D2B1ECF99800088EEDD /* PBXTargetDependency */, + ); + name = "configd_executables-EmbeddedSimulator"; + productName = configd_executables; + }; 157BB8AE075924360025DA7A /* configd_base */ = { isa = PBXAggregateTarget; buildConfigurationList = 156EB5E60905594A00EEF749 /* Build configuration list for PBXAggregateTarget "configd_base" */; @@ -84,7 +136,6 @@ ); dependencies = ( 158317120CFB77E1006F62B9 /* PBXTargetDependency */, - 158317140CFB77E8006F62B9 /* PBXTargetDependency */, ); name = "configd_base-Embedded"; productName = Frameworks; @@ -103,11 +154,10 @@ 158317B70CFB8660006F62B9 /* PBXTargetDependency */, 157A854E0D56CA6F00B6F1A0 /* PBXTargetDependency */, 158317B50CFB8660006F62B9 /* PBXTargetDependency */, - 156CA4A80EF8550800C59A18 /* PBXTargetDependency */, 157A85520D56CA9E00B6F1A0 /* PBXTargetDependency */, 157A85540D56CACA00B6F1A0 /* PBXTargetDependency */, - 1528C00F135741C300691881 /* PBXTargetDependency */, - 1528C011135741C300691881 /* PBXTargetDependency */, + 155F49AD1C86511300E47D08 /* PBXTargetDependency */, + 155F49AF1C86511300E47D08 /* PBXTargetDependency */, ); name = "configd_plugins-Embedded"; productName = Plugins; @@ -118,8 +168,9 @@ buildPhases = ( ); dependencies = ( + 15631D131ECF93040088EEDD /* PBXTargetDependency */, 158317660CFB80D5006F62B9 /* PBXTargetDependency */, - 157434210D4A8166002ACA73 /* PBXTargetDependency */, + 1523BBE21E075859006281F1 /* PBXTargetDependency */, 1574341F0D4A815E002ACA73 /* PBXTargetDependency */, ); name = "configd_executables-Embedded"; @@ -139,11 +190,10 @@ 158AD9860754E72500124717 /* PBXTargetDependency */, 159D542A07528E85004F8947 /* PBXTargetDependency */, 158AD98C0754E72500124717 /* PBXTargetDependency */, - 1521405B0E9400BF00DACD2C /* PBXTargetDependency */, 159D542C07528E85004F8947 /* PBXTargetDependency */, 158AD98E0754E72500124717 /* PBXTargetDependency */, - 1528BFEC135731B800691881 /* PBXTargetDependency */, - 1528BFEE135731B800691881 /* PBXTargetDependency */, + 155F49A91C8650E900E47D08 /* PBXTargetDependency */, + 155F49AB1C8650E900E47D08 /* PBXTargetDependency */, ); name = configd_plugins; productName = Plugins; @@ -152,6 +202,7 @@ isa = PBXAggregateTarget; buildConfigurationList = 15C64A270F684C6B00D78394 /* Build configuration list for PBXAggregateTarget "configd_libSystem" */; buildPhases = ( + 1502C5611BDD4936005CF7EA /* Move libsystem_configuration_(asan|tsan).dylib */, ); dependencies = ( 15C64A220F684C4900D78394 /* PBXTargetDependency */, @@ -163,6 +214,7 @@ isa = PBXAggregateTarget; buildConfigurationList = 15C64A2B0F684C6B00D78394 /* Build configuration list for PBXAggregateTarget "configd_libSystem-Embedded" */; buildPhases = ( + 15AC9A4C1BE3ED87003071BD /* Move libsystem_configuration_(asan|tsan).dylib */, ); dependencies = ( 15C64A310F684C8F00D78394 /* PBXTargetDependency */, @@ -180,6 +232,9 @@ 157BB8C40759244B0025DA7A /* PBXTargetDependency */, 159D542E07529008004F8947 /* PBXTargetDependency */, 1558480F07550DD00046C2E9 /* PBXTargetDependency */, + 15401C2C21991B05006326B7 /* PBXTargetDependency */, + 150EC101210171AE0047F4BF /* PBXTargetDependency */, + 150EC103210171B60047F4BF /* PBXTargetDependency */, ); name = All; productName = "configd (Aggregate)"; @@ -205,6 +260,10 @@ dependencies = ( 157FDE44164A079B0040D6A8 /* PBXTargetDependency */, 151FE37A0D5B713C000D6DB1 /* PBXTargetDependency */, + 15631D2D1ECF99A00088EEDD /* PBXTargetDependency */, + 15401C3021991B31006326B7 /* PBXTargetDependency */, + 15EF89C62189484C003B2C5C /* PBXTargetDependency */, + 15EF89C82189484C003B2C5C /* PBXTargetDependency */, ); name = "All-EmbeddedSimulator"; productName = EmbeddedSimulator; @@ -212,31 +271,28 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 1501F7691EA80189006A71B0 /* nat64-configuration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15812A2D1EA5540B001CF384 /* nat64-configuration.c */; }; + 1501F76A1EA8019D006A71B0 /* nat64-configuration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15812A2D1EA5540B001CF384 /* nat64-configuration.c */; }; + 1505A8D81EC3E1470089FC6A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CB7541BF439C6000C05A8 /* Foundation.framework */; }; 15060818075A00A300B147BA /* SCSchemaDefinitions.c in Sources */ = {isa = PBXBuildFile; fileRef = 150607BD075A00A200B147BA /* SCSchemaDefinitions.c */; }; 1506081A075A00A300B147BA /* SCSchemaDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = 150607DE075A00A300B147BA /* SCSchemaDefinitions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 150BEC1814CA24F900237116 /* dnsinfo_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0D05FD1B670096477F /* dnsinfo_server.c */; }; 150BEC1A14CA252200237116 /* dnsinfo_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0D05FD1B670096477F /* dnsinfo_server.c */; }; 150D7E1E0D16DC6C00AF4BED /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1520A3DE0846B2DC0010B584 /* Security.framework */; }; + 150EC0FF21016BFD0047F4BF /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */; }; + 151D060E1EC14C8600E02E48 /* liblog_SystemConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 151D060D1EC14C6700E02E48 /* liblog_SystemConfiguration.m */; }; 1520A3870846829A0010B584 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 1520A3DF0846B2DD0010B584 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1520A3DE0846B2DC0010B584 /* Security.framework */; }; - 152140020E93EC6500DACD2C /* logger.c in Sources */ = {isa = PBXBuildFile; fileRef = 1531D3DB0E93E6DA00248432 /* logger.c */; }; - 1521400C0E93FFF500DACD2C /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; - 152140580E93FFFC00DACD2C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1559C4440D349A4E0098FD59 /* SystemConfiguration.framework */; }; 1522FCFB0FA7FE4B00B24128 /* dnsinfo_flatfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 1522FCE50FA7FD7000B24128 /* dnsinfo_flatfile.c */; }; 152439E518038E5B00D91708 /* ev_extra.h in Headers */ = {isa = PBXBuildFile; fileRef = 152439E318038E5B00D91708 /* ev_extra.h */; }; 152439E618038E5B00D91708 /* ev_extra.m in Sources */ = {isa = PBXBuildFile; fileRef = 152439E418038E5B00D91708 /* ev_extra.m */; }; 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 */; }; 152691DF1129EEC8006BD2D5 /* VLANConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B605C0722B0099E85F /* VLANConfiguration.c */; }; - 1528BFEF135733F500691881 /* SCNetworkReachabilityServer_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */; }; - 1528BFF313573FEE00691881 /* SCNetworkReachabilityServer_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */; }; - 1528C0171357465900691881 /* libSCNetworkReachability.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1528BFF713573FEE00691881 /* libSCNetworkReachability.a */; }; - 1528C019135746BB00691881 /* libSCNetworkReachability.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1528BFE21357305400691881 /* libSCNetworkReachability.a */; }; 152E0E7F10FE820E00E402F2 /* helper.defs in Sources */ = {isa = PBXBuildFile; fileRef = 152E0E7E10FE820E00E402F2 /* helper.defs */; settings = {ATTRIBUTES = (Server, ); }; }; 152E0E8010FE820E00E402F2 /* helper.defs in Sources */ = {isa = PBXBuildFile; fileRef = 152E0E7E10FE820E00E402F2 /* helper.defs */; settings = {ATTRIBUTES = (Server, ); }; }; 152E0E8910FE824000E402F2 /* helper_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 152E0E8810FE824000E402F2 /* helper_types.h */; }; @@ -251,12 +307,22 @@ 153ACCA914E322D5005029A5 /* network_information_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 153ACCA614E322D5005029A5 /* network_information_server.c */; }; 153ACCAB14E322D5005029A5 /* network_information_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 153ACCA714E322D5005029A5 /* network_information_server.h */; }; 153ACCAC14E322D5005029A5 /* network_information_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 153ACCA714E322D5005029A5 /* network_information_server.h */; }; - 1540E3610987DA9500157C07 /* com.apple.configd.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1540E3600987DA9500157C07 /* com.apple.configd.plist */; }; + 153E16A51EE500810027698E /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; + 153E16A61EE5008A0027698E /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; + 153E16A71EE5008F0027698E /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; + 153E16A81EE500E70027698E /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; + 153E16A91EE500ED0027698E /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; + 153E16AA1EE500EF0027698E /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; + 1540E3610987DA9500157C07 /* com.apple.configd.plist in Copy Files */ = {isa = PBXBuildFile; fileRef = 1540E3600987DA9500157C07 /* com.apple.configd.plist */; }; + 1542400521626F5A00C7CE8B /* SCDCache.c in Sources */ = {isa = PBXBuildFile; fileRef = 1542400421626DD300C7CE8B /* SCDCache.c */; }; + 1542400621626F5C00C7CE8B /* SCDCache.c in Sources */ = {isa = PBXBuildFile; fileRef = 1542400421626DD300C7CE8B /* SCDCache.c */; }; + 1542400721626F6000C7CE8B /* SCDCache.c in Sources */ = {isa = PBXBuildFile; fileRef = 1542400421626DD300C7CE8B /* SCDCache.c */; }; 154361E00752C81800A8EC6C /* set-hostname.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53AB07528B36004F8947 /* set-hostname.c */; }; 1543636B0752D03C00A8EC6C /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1543636A0752D03C00A8EC6C /* IOKit.framework */; }; 154707300D1F70C80075C28D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */; }; 154707350D1F70C80075C28D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */; }; 154CF3F407E1EA4D00D8302E /* SCPreferencesGetSpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 154CF3F307E1EA4D00D8302E /* SCPreferencesGetSpecificPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 154FD13B1EC4062C00EDA8B9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72573D331D66800C004975AD /* SystemConfiguration.framework */; }; 155281020E3E4A0F00C54315 /* ip_plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53A707528B36004F8947 /* ip_plugin.c */; }; 155847470754FDCD0046C2E9 /* scutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB6A4305C0722B0099E85F /* scutil.h */; }; 155847480754FDCD0046C2E9 /* commands.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB6A4505C0722B0099E85F /* commands.h */; }; @@ -301,40 +367,42 @@ 155D223B0AF13A7300D52ED0 /* dns-configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D22380AF13A7300D52ED0 /* dns-configuration.h */; }; 155D223C0AF13A7300D52ED0 /* set-hostname.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D22390AF13A7300D52ED0 /* set-hostname.h */; }; 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 */; settings = {ATTRIBUTES = (Weak, ); }; }; 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, ); }; }; - 156CA47B0EF853BB00C59A18 /* logger.c in Sources */ = {isa = PBXBuildFile; fileRef = 1531D3DB0E93E6DA00248432 /* logger.c */; }; - 156CA47D0EF853BB00C59A18 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; - 156CA47E0EF853BB00C59A18 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1559C4440D349A4E0098FD59 /* SystemConfiguration.framework */; }; - 156CA47F0EF853BB00C59A18 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1543636A0752D03C00A8EC6C /* IOKit.framework */; }; + 1572AA8D1D8235940021E093 /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; + 1572AA8E1D8235A40021E093 /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; + 1572AA8F1D82375A0021E093 /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; + 1572AA901D8237810021E093 /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; + 1572AA911D82379E0021E093 /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; + 1572AA921D8237A30021E093 /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; 1572C4A90CFB55B400E2776E /* SCSchemaDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = 150607DE075A00A300B147BA /* SCSchemaDefinitions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1572C4AA0CFB55B400E2776E /* SystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691305C0722B0099E85F /* SystemConfiguration.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 1572C4AA0CFB55B400E2776E /* SystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691305C0722B0099E85F /* SystemConfiguration.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 1572C4AB0CFB55B400E2776E /* SCPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691505C0722B0099E85F /* SCPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 1572C4AC0CFB55B400E2776E /* SCDPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691705C0722B0099E85F /* SCDPlugin.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1572C4AD0CFB55B400E2776E /* SCDynamicStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691B05C0722B0099E85F /* SCDynamicStoreInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1572C4AE0CFB55B400E2776E /* SCDynamicStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691D05C0722B0099E85F /* SCDynamicStore.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 1572C4AE0CFB55B400E2776E /* SCDynamicStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691D05C0722B0099E85F /* SCDynamicStore.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 1572C4AF0CFB55B400E2776E /* SCDynamicStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691F05C0722B0099E85F /* SCDynamicStorePrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; - 1572C4B00CFB55B400E2776E /* SCDynamicStoreKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692105C0722B0099E85F /* SCDynamicStoreKey.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 1572C4B10CFB55B400E2776E /* SCDynamicStoreCopySpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692305C0722B0099E85F /* SCDynamicStoreCopySpecific.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 1572C4B00CFB55B400E2776E /* SCDynamicStoreKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692105C0722B0099E85F /* SCDynamicStoreKey.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 1572C4B10CFB55B400E2776E /* SCDynamicStoreCopySpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692305C0722B0099E85F /* SCDynamicStoreCopySpecific.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 1572C4B20CFB55B400E2776E /* SCDynamicStoreCopySpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692505C0722B0099E85F /* SCDynamicStoreCopySpecificPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 1572C4B30CFB55B400E2776E /* SCDynamicStoreSetSpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692705C0722B0099E85F /* SCDynamicStoreSetSpecificPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 1572C4B40CFB55B400E2776E /* SCPreferencesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692905C0722B0099E85F /* SCPreferencesInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1572C4B50CFB55B400E2776E /* SCPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692B05C0722B0099E85F /* SCPreferences.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 1572C4B50CFB55B400E2776E /* SCPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692B05C0722B0099E85F /* SCPreferences.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 1572C4B60CFB55B400E2776E /* SCPreferencesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692D05C0722B0099E85F /* SCPreferencesPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; - 1572C4B70CFB55B400E2776E /* SCPreferencesPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692F05C0722B0099E85F /* SCPreferencesPath.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 1572C4B80CFB55B400E2776E /* SCPreferencesSetSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693105C0722B0099E85F /* SCPreferencesSetSpecific.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 1572C4B70CFB55B400E2776E /* SCPreferencesPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692F05C0722B0099E85F /* SCPreferencesPath.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 1572C4B80CFB55B400E2776E /* SCPreferencesSetSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693105C0722B0099E85F /* SCPreferencesSetSpecific.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 1572C4B90CFB55B400E2776E /* SCNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AD7A380670A85900BFE03C /* SCNetworkConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1572C4BA0CFB55B400E2776E /* SCNetworkConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AD7A3A0670A85900BFE03C /* SCNetworkConfigurationInternal.h */; settings = {ATTRIBUTES = (); }; }; - 1572C4BB0CFB55B400E2776E /* SCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693305C0722B0099E85F /* SCNetwork.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 1572C4BC0CFB55B400E2776E /* SCNetworkConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693505C0722B0099E85F /* SCNetworkConnection.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 1572C4BD0CFB55B400E2776E /* SCNetworkReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693705C0722B0099E85F /* SCNetworkReachability.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 1572C4BB0CFB55B400E2776E /* SCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693305C0722B0099E85F /* SCNetwork.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 1572C4BC0CFB55B400E2776E /* SCNetworkConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693505C0722B0099E85F /* SCNetworkConnection.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 1572C4BD0CFB55B400E2776E /* SCNetworkReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693705C0722B0099E85F /* SCNetworkReachability.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 1572C4BE0CFB55B400E2776E /* SCValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693905C0722B0099E85F /* SCValidation.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 1572C4BF0CFB55B400E2776E /* DHCPClientPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693D05C0722B0099E85F /* DHCPClientPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1572C4C00CFB55B400E2776E /* SCDynamicStoreCopyDHCPInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693F05C0722B0099E85F /* SCDynamicStoreCopyDHCPInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1572C4C10CFB55B400E2776E /* moh_msg.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694105C0722B0099E85F /* moh_msg.h */; }; - 1572C4C20CFB55B400E2776E /* moh.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694305C0722B0099E85F /* moh.h */; }; - 1572C4C30CFB55B400E2776E /* DeviceOnHold.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694505C0722B0099E85F /* DeviceOnHold.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1572C4C50CFB55B400E2776E /* dy_framework.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694905C0722B0099E85F /* dy_framework.h */; }; 1572C4C70CFB55B400E2776E /* SCPreferencesPathKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 151BDA2B05D9E28B00657BC7 /* SCPreferencesPathKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1572C4CA0CFB55B400E2776E /* pppcontroller_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 23C1E2B4062DD2C700835B54 /* pppcontroller_types.h */; }; @@ -371,7 +439,6 @@ 1572C4F20CFB55B400E2776E /* SCDNotifierWait.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697605C0722B0099E85F /* SCDNotifierWait.c */; settings = {ATTRIBUTES = (); }; }; 1572C4F30CFB55B400E2776E /* SCDNotifierInformViaCallback.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697805C0722B0099E85F /* SCDNotifierInformViaCallback.c */; settings = {ATTRIBUTES = (); }; }; 1572C4F50CFB55B400E2776E /* SCDNotifierInformViaFD.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697C05C0722B0099E85F /* SCDNotifierInformViaFD.c */; settings = {ATTRIBUTES = (); }; }; - 1572C4F60CFB55B400E2776E /* SCDNotifierInformViaSignal.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697E05C0722B0099E85F /* SCDNotifierInformViaSignal.c */; settings = {ATTRIBUTES = (); }; }; 1572C4F70CFB55B400E2776E /* SCDNotifierCancel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698005C0722B0099E85F /* SCDNotifierCancel.c */; settings = {ATTRIBUTES = (); }; }; 1572C4F80CFB55B400E2776E /* SCDSnapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698205C0722B0099E85F /* SCDSnapshot.c */; settings = {ATTRIBUTES = (); }; }; 1572C4F90CFB55B400E2776E /* SCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698405C0722B0099E85F /* SCP.c */; settings = {ATTRIBUTES = (); }; }; @@ -388,15 +455,12 @@ 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 */; }; 1572C50C0CFB55B400E2776E /* SCNetworkReachability.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A605C0722B0099E85F /* SCNetworkReachability.c */; settings = {ATTRIBUTES = (); }; }; 1572C50D0CFB55B400E2776E /* SCProxies.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A805C0722B0099E85F /* SCProxies.c */; settings = {ATTRIBUTES = (); }; }; 1572C50E0CFB55B400E2776E /* DHCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69AC05C0722B0099E85F /* DHCP.c */; settings = {ATTRIBUTES = (); }; }; - 1572C50F0CFB55B400E2776E /* moh.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69AE05C0722B0099E85F /* moh.c */; settings = {ATTRIBUTES = (); }; }; - 1572C5100CFB55B400E2776E /* DeviceOnHold.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B005C0722B0099E85F /* DeviceOnHold.c */; settings = {ATTRIBUTES = (); }; }; 1572C5110CFB55B400E2776E /* LinkConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B205C0722B0099E85F /* LinkConfiguration.c */; settings = {ATTRIBUTES = (); }; }; 1572C5120CFB55B400E2776E /* dy_framework.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B405C0722B0099E85F /* dy_framework.c */; settings = {ATTRIBUTES = (); }; }; 1572C5140CFB55B400E2776E /* config.defs in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69BE05C0722B0099E85F /* config.defs */; settings = {ATTRIBUTES = (Client, ); }; }; @@ -417,14 +481,12 @@ 15732A7816EA503200F3AC4C /* configd.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69CF05C0722B0099E85F /* configd.h */; }; 15732A7916EA503200F3AC4C /* _SCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D105C0722B0099E85F /* _SCD.h */; }; 15732A7A16EA503200F3AC4C /* configd_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D305C0722B0099E85F /* configd_server.h */; }; - 15732A7B16EA503200F3AC4C /* notify_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D505C0722B0099E85F /* notify_server.h */; }; 15732A7C16EA503200F3AC4C /* plugin_support.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D705C0722B0099E85F /* plugin_support.h */; }; 15732A7D16EA503200F3AC4C /* session.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D905C0722B0099E85F /* session.h */; }; 15732A7E16EA503200F3AC4C /* pattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69DB05C0722B0099E85F /* pattern.h */; }; 15732A8016EA503200F3AC4C /* configd.m in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E005C0722B0099E85F /* configd.m */; settings = {ATTRIBUTES = (); }; }; 15732A8116EA503200F3AC4C /* _SCD.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E205C0722B0099E85F /* _SCD.c */; settings = {ATTRIBUTES = (); }; }; 15732A8216EA503200F3AC4C /* configd_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E405C0722B0099E85F /* configd_server.c */; settings = {ATTRIBUTES = (); }; }; - 15732A8316EA503200F3AC4C /* notify_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E605C0722B0099E85F /* notify_server.c */; settings = {ATTRIBUTES = (); }; }; 15732A8416EA503200F3AC4C /* plugin_support.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E805C0722B0099E85F /* plugin_support.c */; settings = {ATTRIBUTES = (); }; }; 15732A8516EA503200F3AC4C /* session.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69EA05C0722B0099E85F /* session.c */; settings = {ATTRIBUTES = (); }; }; 15732A8616EA503200F3AC4C /* pattern.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69EC05C0722B0099E85F /* pattern.c */; settings = {ATTRIBUTES = (); }; }; @@ -442,12 +504,9 @@ 15732A9216EA503200F3AC4C /* _notifychanges.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A0C05C0722B0099E85F /* _notifychanges.c */; settings = {ATTRIBUTES = (); }; }; 15732A9316EA503200F3AC4C /* _notifyviaport.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A0E05C0722B0099E85F /* _notifyviaport.c */; settings = {ATTRIBUTES = (); }; }; 15732A9416EA503200F3AC4C /* _notifyviafd.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1005C0722B0099E85F /* _notifyviafd.c */; settings = {ATTRIBUTES = (); }; }; - 15732A9516EA503200F3AC4C /* _notifyviasignal.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1205C0722B0099E85F /* _notifyviasignal.c */; settings = {ATTRIBUTES = (); }; }; 15732A9616EA503200F3AC4C /* _notifycancel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1405C0722B0099E85F /* _notifycancel.c */; settings = {ATTRIBUTES = (); }; }; 15732A9716EA503200F3AC4C /* _snapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1605C0722B0099E85F /* _snapshot.c */; settings = {ATTRIBUTES = (); }; }; 15732A9816EA503200F3AC4C /* config.defs in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69BE05C0722B0099E85F /* config.defs */; settings = {ATTRIBUTES = (Server, ); }; }; - 15732A9916EA503200F3AC4C /* dnsinfo_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0D05FD1B670096477F /* dnsinfo_server.c */; }; - 15732A9A16EA503200F3AC4C /* SCNetworkReachabilityServer_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */; }; 15732A9C16EA503200F3AC4C /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 15732A9D16EA503200F3AC4C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */; }; 15732A9E16EA503200F3AC4C /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1543636A0752D03C00A8EC6C /* IOKit.framework */; }; @@ -537,12 +596,10 @@ 157A84FB0D56C7E800B6F1A0 /* dns-configuration.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53AA07528B36004F8947 /* dns-configuration.c */; }; 157A84FC0D56C7E800B6F1A0 /* set-hostname.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53AB07528B36004F8947 /* set-hostname.c */; }; 157A85080D56C8AA00B6F1A0 /* ifnamer.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53AE07528B36004F8947 /* ifnamer.c */; }; - 157A85120D56C8E000B6F1A0 /* cache.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53CB07528B36004F8947 /* cache.h */; }; 157A85140D56C8E000B6F1A0 /* ev_dlil.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53B207528B36004F8947 /* ev_dlil.h */; }; 157A85150D56C8E000B6F1A0 /* ev_ipv4.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53B807528B36004F8947 /* ev_ipv4.h */; }; 157A85160D56C8E000B6F1A0 /* ev_ipv6.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53BA07528B36004F8947 /* ev_ipv6.h */; }; 157A85170D56C8E000B6F1A0 /* eventmon.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53B707528B36004F8947 /* eventmon.h */; }; - 157A85190D56C8E000B6F1A0 /* cache.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53CA07528B36004F8947 /* cache.c */; }; 157A851B0D56C8E000B6F1A0 /* ev_dlil.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53B107528B36004F8947 /* ev_dlil.c */; }; 157A851C0D56C8E000B6F1A0 /* ev_ipv4.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53B307528B36004F8947 /* ev_ipv4.c */; }; 157A851D0D56C8E000B6F1A0 /* ev_ipv6.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53B407528B36004F8947 /* ev_ipv6.c */; }; @@ -550,17 +607,24 @@ 157A85290D56C91100B6F1A0 /* linkconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53C107528B36004F8947 /* linkconfig.c */; }; 157A853F0D56C96F00B6F1A0 /* prefsmon.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53C307528B36004F8947 /* prefsmon.c */; }; 157A88890A470D0F003A4256 /* SCSchemaDefinitionsPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 157A88880A470D0F003A4256 /* SCSchemaDefinitionsPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 1581BCD21E28673600F69B1E /* InterfaceNamerControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB1F891E27E9A000B4F809 /* InterfaceNamerControlPrefs.h */; }; + 1581BCD31E28679A00F69B1E /* InterfaceNamerControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB1F891E27E9A000B4F809 /* InterfaceNamerControlPrefs.h */; }; + 1581BCD41E2867A300F69B1E /* IPMonitorControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */; }; + 1581BCD51E2867A500F69B1E /* IPMonitorControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */; }; + 1581BCD61E2867AF00F69B1E /* IPMonitorControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */; }; + 1581BCD71E2867B200F69B1E /* IPMonitorControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */; }; + 1581BCD81E2867BA00F69B1E /* IPMonitorControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */; }; + 1581BCD91E2867C100F69B1E /* IPMonitorControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */; }; + 1581BCDD1E286E0000F69B1E /* InterfaceNamerControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 15FB1F891E27E9A000B4F809 /* InterfaceNamerControlPrefs.h */; }; 158317250CFB80A1006F62B9 /* configd.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69CF05C0722B0099E85F /* configd.h */; }; 158317260CFB80A1006F62B9 /* _SCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D105C0722B0099E85F /* _SCD.h */; }; 158317270CFB80A1006F62B9 /* configd_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D305C0722B0099E85F /* configd_server.h */; }; - 158317280CFB80A1006F62B9 /* notify_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D505C0722B0099E85F /* notify_server.h */; }; 158317290CFB80A1006F62B9 /* plugin_support.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D705C0722B0099E85F /* plugin_support.h */; }; 1583172A0CFB80A1006F62B9 /* session.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D905C0722B0099E85F /* session.h */; }; 1583172B0CFB80A1006F62B9 /* pattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69DB05C0722B0099E85F /* pattern.h */; }; 1583172D0CFB80A1006F62B9 /* configd.m in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E005C0722B0099E85F /* configd.m */; settings = {ATTRIBUTES = (); }; }; 1583172E0CFB80A1006F62B9 /* _SCD.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E205C0722B0099E85F /* _SCD.c */; settings = {ATTRIBUTES = (); }; }; 1583172F0CFB80A1006F62B9 /* configd_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E405C0722B0099E85F /* configd_server.c */; settings = {ATTRIBUTES = (); }; }; - 158317300CFB80A1006F62B9 /* notify_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E605C0722B0099E85F /* notify_server.c */; settings = {ATTRIBUTES = (); }; }; 158317310CFB80A1006F62B9 /* plugin_support.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E805C0722B0099E85F /* plugin_support.c */; settings = {ATTRIBUTES = (); }; }; 158317320CFB80A1006F62B9 /* session.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69EA05C0722B0099E85F /* session.c */; settings = {ATTRIBUTES = (); }; }; 158317330CFB80A1006F62B9 /* pattern.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69EC05C0722B0099E85F /* pattern.c */; settings = {ATTRIBUTES = (); }; }; @@ -578,29 +642,43 @@ 158317410CFB80A1006F62B9 /* _notifychanges.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A0C05C0722B0099E85F /* _notifychanges.c */; settings = {ATTRIBUTES = (); }; }; 158317420CFB80A1006F62B9 /* _notifyviaport.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A0E05C0722B0099E85F /* _notifyviaport.c */; settings = {ATTRIBUTES = (); }; }; 158317430CFB80A1006F62B9 /* _notifyviafd.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1005C0722B0099E85F /* _notifyviafd.c */; settings = {ATTRIBUTES = (); }; }; - 158317440CFB80A1006F62B9 /* _notifyviasignal.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1205C0722B0099E85F /* _notifyviasignal.c */; settings = {ATTRIBUTES = (); }; }; 158317450CFB80A1006F62B9 /* _notifycancel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1405C0722B0099E85F /* _notifycancel.c */; settings = {ATTRIBUTES = (); }; }; 158317460CFB80A1006F62B9 /* _snapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1605C0722B0099E85F /* _snapshot.c */; settings = {ATTRIBUTES = (); }; }; 158317470CFB80A1006F62B9 /* config.defs in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69BE05C0722B0099E85F /* config.defs */; settings = {ATTRIBUTES = (Server, ); }; }; - 158317490CFB80A1006F62B9 /* dnsinfo_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0D05FD1B670096477F /* dnsinfo_server.c */; }; 1583174C0CFB80A1006F62B9 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 1583174E0CFB80A1006F62B9 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1543636A0752D03C00A8EC6C /* IOKit.framework */; }; 158317500CFB80A1006F62B9 /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; - 158317520CFB80A1006F62B9 /* libKernelEventMonitor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53D407528BDA004F8947 /* libKernelEventMonitor.a */; }; - 158317530CFB80A1006F62B9 /* libInterfaceNamer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53E507528C4A004F8947 /* libInterfaceNamer.a */; }; - 158317540CFB80A1006F62B9 /* libIPMonitor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53EC07528C61004F8947 /* libIPMonitor.a */; }; - 158317550CFB80A1006F62B9 /* libLinkConfiguration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53F307528C79004F8947 /* libLinkConfiguration.a */; }; - 158317570CFB80A1006F62B9 /* libPreferencesMonitor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53FA07528C95004F8947 /* libPreferencesMonitor.a */; }; 1583175C0CFB80A1006F62B9 /* com.apple.configd.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1540E3600987DA9500157C07 /* com.apple.configd.plist */; }; 1583379C0CFB6B9E0033AB93 /* SCHelper_client.h in Headers */ = {isa = PBXBuildFile; fileRef = 155B7BF60847776D00F0E262 /* SCHelper_client.h */; }; 1583379E0CFB6B9E0033AB93 /* SCHelper_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15DAF2D908466D4900D1B2BD /* SCHelper_server.c */; }; 158337A00CFB6B9E0033AB93 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 158337A20CFB6B9E0033AB93 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1520A3DE0846B2DC0010B584 /* Security.framework */; }; 158337AD0CFB6BDC0033AB93 /* com.apple.SCHelper-embedded.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 151356AD0CE0CF2F0017E523 /* com.apple.SCHelper-embedded.plist */; }; + 158D6D891C974E9E00A08E78 /* com.apple.SystemConfiguration.plist in Logging Preferences */ = {isa = PBXBuildFile; fileRef = 158D6D871C974DBA00A08E78 /* com.apple.SystemConfiguration.plist */; }; + 158D6D8B1C974F1800A08E78 /* com.apple.SystemConfiguration.plist in Logging Preferences */ = {isa = PBXBuildFile; fileRef = 158D6D871C974DBA00A08E78 /* com.apple.SystemConfiguration.plist */; }; + 158D6D8D1C974F5800A08E78 /* com.apple.SystemConfiguration.plist in Logging Preferences */ = {isa = PBXBuildFile; fileRef = 158D6D871C974DBA00A08E78 /* com.apple.SystemConfiguration.plist */; }; 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 */; }; - 15943D440E94081800B87535 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1543636A0752D03C00A8EC6C /* IOKit.framework */; }; + 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 */; }; @@ -618,8 +696,6 @@ 159A752C107FEAA400A57EAB /* VPNPrivate.c in Sources */ = {isa = PBXBuildFile; fileRef = 159A7517107FEAA400A57EAB /* VPNPrivate.c */; }; 159A752E107FEAA400A57EAB /* VPNConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 159A7519107FEAA400A57EAB /* VPNConfiguration.c */; }; 159C32B60F583724008A72EE /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1520A3DE0846B2DC0010B584 /* Security.framework */; }; - 159D540907528D3A004F8947 /* cache.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53CA07528B36004F8947 /* cache.c */; }; - 159D540A07528D3B004F8947 /* cache.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53CB07528B36004F8947 /* cache.h */; }; 159D540D07528DAE004F8947 /* ev_dlil.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53B107528B36004F8947 /* ev_dlil.c */; }; 159D540E07528DAE004F8947 /* ev_dlil.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53B207528B36004F8947 /* ev_dlil.h */; }; 159D540F07528DB0004F8947 /* ev_ipv4.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53B307528B36004F8947 /* ev_ipv4.c */; }; @@ -636,14 +712,12 @@ 159D54A407529FFF004F8947 /* configd.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69CF05C0722B0099E85F /* configd.h */; }; 159D54A507529FFF004F8947 /* _SCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D105C0722B0099E85F /* _SCD.h */; }; 159D54A607529FFF004F8947 /* configd_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D305C0722B0099E85F /* configd_server.h */; }; - 159D54A707529FFF004F8947 /* notify_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D505C0722B0099E85F /* notify_server.h */; }; 159D54A807529FFF004F8947 /* plugin_support.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D705C0722B0099E85F /* plugin_support.h */; }; 159D54A907529FFF004F8947 /* session.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69D905C0722B0099E85F /* session.h */; }; 159D54AA07529FFF004F8947 /* pattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB69DB05C0722B0099E85F /* pattern.h */; }; 159D54AC07529FFF004F8947 /* configd.m in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E005C0722B0099E85F /* configd.m */; settings = {ATTRIBUTES = (); }; }; 159D54AD07529FFF004F8947 /* _SCD.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E205C0722B0099E85F /* _SCD.c */; settings = {ATTRIBUTES = (); }; }; 159D54AE07529FFF004F8947 /* configd_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E405C0722B0099E85F /* configd_server.c */; settings = {ATTRIBUTES = (); }; }; - 159D54AF07529FFF004F8947 /* notify_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E605C0722B0099E85F /* notify_server.c */; settings = {ATTRIBUTES = (); }; }; 159D54B007529FFF004F8947 /* plugin_support.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69E805C0722B0099E85F /* plugin_support.c */; settings = {ATTRIBUTES = (); }; }; 159D54B107529FFF004F8947 /* session.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69EA05C0722B0099E85F /* session.c */; settings = {ATTRIBUTES = (); }; }; 159D54B207529FFF004F8947 /* pattern.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69EC05C0722B0099E85F /* pattern.c */; settings = {ATTRIBUTES = (); }; }; @@ -661,18 +735,13 @@ 159D54C007529FFF004F8947 /* _notifychanges.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A0C05C0722B0099E85F /* _notifychanges.c */; settings = {ATTRIBUTES = (); }; }; 159D54C107529FFF004F8947 /* _notifyviaport.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A0E05C0722B0099E85F /* _notifyviaport.c */; settings = {ATTRIBUTES = (); }; }; 159D54C207529FFF004F8947 /* _notifyviafd.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1005C0722B0099E85F /* _notifyviafd.c */; settings = {ATTRIBUTES = (); }; }; - 159D54C307529FFF004F8947 /* _notifyviasignal.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1205C0722B0099E85F /* _notifyviasignal.c */; settings = {ATTRIBUTES = (); }; }; 159D54C407529FFF004F8947 /* _notifycancel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1405C0722B0099E85F /* _notifycancel.c */; settings = {ATTRIBUTES = (); }; }; 159D54C507529FFF004F8947 /* _snapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB6A1605C0722B0099E85F /* _snapshot.c */; settings = {ATTRIBUTES = (); }; }; 159D54C607529FFF004F8947 /* config.defs in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69BE05C0722B0099E85F /* config.defs */; settings = {ATTRIBUTES = (Server, ); }; }; - 159D54C807529FFF004F8947 /* dnsinfo_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0D05FD1B670096477F /* dnsinfo_server.c */; }; 159D54CC07529FFF004F8947 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; - 159D54CE07529FFF004F8947 /* libKernelEventMonitor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53D407528BDA004F8947 /* libKernelEventMonitor.a */; }; - 159D54D007529FFF004F8947 /* libInterfaceNamer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53E507528C4A004F8947 /* libInterfaceNamer.a */; }; - 159D54D107529FFF004F8947 /* libIPMonitor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53EC07528C61004F8947 /* libIPMonitor.a */; }; - 159D54D207529FFF004F8947 /* libLinkConfiguration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53F307528C79004F8947 /* libLinkConfiguration.a */; }; - 159D54D307529FFF004F8947 /* libPreferencesMonitor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 159D53FA07528C95004F8947 /* libPreferencesMonitor.a */; }; 159D54D607529FFF004F8947 /* configd.8 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 15CB6A2005C0722B0099E85F /* configd.8 */; }; + 159FFD5F2110EA44009311DD /* dnsinfo_flatfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 1522FCE50FA7FD7000B24128 /* dnsinfo_flatfile.c */; }; + 159FFD612110EA71009311DD /* dnsinfo_flatfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 1522FCE50FA7FD7000B24128 /* dnsinfo_flatfile.c */; }; 15A1FF3210597F17004C9CC9 /* CaptiveNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A1FF3010597F17004C9CC9 /* CaptiveNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15A1FF3310597F17004C9CC9 /* CaptiveNetwork.c in Sources */ = {isa = PBXBuildFile; fileRef = 15A1FF3110597F17004C9CC9 /* CaptiveNetwork.c */; }; 15A1FF3410597F17004C9CC9 /* CaptiveNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A1FF3010597F17004C9CC9 /* CaptiveNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -680,32 +749,29 @@ 15A2972F0A13C08C009879B3 /* SCNetworkConnectionPrivate.c in Sources */ = {isa = PBXBuildFile; fileRef = 15A2972D0A13C08C009879B3 /* SCNetworkConnectionPrivate.c */; }; 15A297300A13C08C009879B3 /* SCNetworkConnectionPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A2972E0A13C08C009879B3 /* SCNetworkConnectionPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15A5A1E70D5B94190087BDA0 /* SCSchemaDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = 150607DE075A00A300B147BA /* SCSchemaDefinitions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15A5A1E80D5B94190087BDA0 /* SystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691305C0722B0099E85F /* SystemConfiguration.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15A5A1E80D5B94190087BDA0 /* SystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691305C0722B0099E85F /* SystemConfiguration.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15A5A1E90D5B94190087BDA0 /* SCPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691505C0722B0099E85F /* SCPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15A5A1EA0D5B94190087BDA0 /* SCDPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691705C0722B0099E85F /* SCDPlugin.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15A5A1EB0D5B94190087BDA0 /* SCDynamicStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691B05C0722B0099E85F /* SCDynamicStoreInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 15A5A1EC0D5B94190087BDA0 /* SCDynamicStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691D05C0722B0099E85F /* SCDynamicStore.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15A5A1EC0D5B94190087BDA0 /* SCDynamicStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691D05C0722B0099E85F /* SCDynamicStore.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15A5A1ED0D5B94190087BDA0 /* SCDynamicStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691F05C0722B0099E85F /* SCDynamicStorePrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; - 15A5A1EE0D5B94190087BDA0 /* SCDynamicStoreKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692105C0722B0099E85F /* SCDynamicStoreKey.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15A5A1EF0D5B94190087BDA0 /* SCDynamicStoreCopySpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692305C0722B0099E85F /* SCDynamicStoreCopySpecific.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15A5A1EE0D5B94190087BDA0 /* SCDynamicStoreKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692105C0722B0099E85F /* SCDynamicStoreKey.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15A5A1EF0D5B94190087BDA0 /* SCDynamicStoreCopySpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692305C0722B0099E85F /* SCDynamicStoreCopySpecific.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15A5A1F00D5B94190087BDA0 /* SCDynamicStoreCopySpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692505C0722B0099E85F /* SCDynamicStoreCopySpecificPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15A5A1F10D5B94190087BDA0 /* SCDynamicStoreSetSpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692705C0722B0099E85F /* SCDynamicStoreSetSpecificPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15A5A1F20D5B94190087BDA0 /* SCPreferencesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692905C0722B0099E85F /* SCPreferencesInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 15A5A1F30D5B94190087BDA0 /* SCPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692B05C0722B0099E85F /* SCPreferences.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15A5A1F30D5B94190087BDA0 /* SCPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692B05C0722B0099E85F /* SCPreferences.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15A5A1F40D5B94190087BDA0 /* SCPreferencesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692D05C0722B0099E85F /* SCPreferencesPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; - 15A5A1F50D5B94190087BDA0 /* SCPreferencesPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692F05C0722B0099E85F /* SCPreferencesPath.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15A5A1F60D5B94190087BDA0 /* SCPreferencesSetSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693105C0722B0099E85F /* SCPreferencesSetSpecific.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15A5A1F50D5B94190087BDA0 /* SCPreferencesPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692F05C0722B0099E85F /* SCPreferencesPath.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15A5A1F60D5B94190087BDA0 /* SCPreferencesSetSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693105C0722B0099E85F /* SCPreferencesSetSpecific.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15A5A1F70D5B94190087BDA0 /* SCNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AD7A380670A85900BFE03C /* SCNetworkConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15A5A1F80D5B94190087BDA0 /* SCNetworkConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AD7A3A0670A85900BFE03C /* SCNetworkConfigurationInternal.h */; settings = {ATTRIBUTES = (); }; }; - 15A5A1F90D5B94190087BDA0 /* SCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693305C0722B0099E85F /* SCNetwork.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15A5A1FA0D5B94190087BDA0 /* SCNetworkConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693505C0722B0099E85F /* SCNetworkConnection.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15A5A1FB0D5B94190087BDA0 /* SCNetworkReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693705C0722B0099E85F /* SCNetworkReachability.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15A5A1F90D5B94190087BDA0 /* SCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693305C0722B0099E85F /* SCNetwork.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15A5A1FA0D5B94190087BDA0 /* SCNetworkConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693505C0722B0099E85F /* SCNetworkConnection.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15A5A1FB0D5B94190087BDA0 /* SCNetworkReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693705C0722B0099E85F /* SCNetworkReachability.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15A5A1FC0D5B94190087BDA0 /* SCValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693905C0722B0099E85F /* SCValidation.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15A5A1FD0D5B94190087BDA0 /* DHCPClientPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693D05C0722B0099E85F /* DHCPClientPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15A5A1FE0D5B94190087BDA0 /* SCDynamicStoreCopyDHCPInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693F05C0722B0099E85F /* SCDynamicStoreCopyDHCPInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15A5A1FF0D5B94190087BDA0 /* moh_msg.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694105C0722B0099E85F /* moh_msg.h */; }; - 15A5A2000D5B94190087BDA0 /* moh.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694305C0722B0099E85F /* moh.h */; }; - 15A5A2010D5B94190087BDA0 /* DeviceOnHold.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694505C0722B0099E85F /* DeviceOnHold.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15A5A2030D5B94190087BDA0 /* dy_framework.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694905C0722B0099E85F /* dy_framework.h */; }; 15A5A2050D5B94190087BDA0 /* SCPreferencesPathKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 151BDA2B05D9E28B00657BC7 /* SCPreferencesPathKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15A5A2060D5B94190087BDA0 /* dnsinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B73F0905FD1B670096477F /* dnsinfo.h */; }; @@ -743,7 +809,6 @@ 15A5A2310D5B94190087BDA0 /* SCDNotifierWait.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697605C0722B0099E85F /* SCDNotifierWait.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2320D5B94190087BDA0 /* SCDNotifierInformViaCallback.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697805C0722B0099E85F /* SCDNotifierInformViaCallback.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2340D5B94190087BDA0 /* SCDNotifierInformViaFD.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697C05C0722B0099E85F /* SCDNotifierInformViaFD.c */; settings = {ATTRIBUTES = (); }; }; - 15A5A2350D5B94190087BDA0 /* SCDNotifierInformViaSignal.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697E05C0722B0099E85F /* SCDNotifierInformViaSignal.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2360D5B94190087BDA0 /* SCDNotifierCancel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698005C0722B0099E85F /* SCDNotifierCancel.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2370D5B94190087BDA0 /* SCDSnapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698205C0722B0099E85F /* SCDSnapshot.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2380D5B94190087BDA0 /* SCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698405C0722B0099E85F /* SCP.c */; settings = {ATTRIBUTES = (); }; }; @@ -760,15 +825,12 @@ 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 */; }; 15A5A24B0D5B94190087BDA0 /* SCNetworkReachability.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A605C0722B0099E85F /* SCNetworkReachability.c */; settings = {ATTRIBUTES = (); }; }; 15A5A24C0D5B94190087BDA0 /* SCProxies.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A805C0722B0099E85F /* SCProxies.c */; settings = {ATTRIBUTES = (); }; }; 15A5A24D0D5B94190087BDA0 /* DHCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69AC05C0722B0099E85F /* DHCP.c */; settings = {ATTRIBUTES = (); }; }; - 15A5A24E0D5B94190087BDA0 /* moh.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69AE05C0722B0099E85F /* moh.c */; settings = {ATTRIBUTES = (); }; }; - 15A5A24F0D5B94190087BDA0 /* DeviceOnHold.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B005C0722B0099E85F /* DeviceOnHold.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2500D5B94190087BDA0 /* LinkConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B205C0722B0099E85F /* LinkConfiguration.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2510D5B94190087BDA0 /* dy_framework.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B405C0722B0099E85F /* dy_framework.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2530D5B94190087BDA0 /* config.defs in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69BE05C0722B0099E85F /* config.defs */; settings = {ATTRIBUTES = (Client, ); }; }; @@ -783,68 +845,88 @@ 15A5A2610D5B94190087BDA0 /* SCNetworkSignature.c in Sources */ = {isa = PBXBuildFile; fileRef = F95B8A420B03E07A00993BA3 /* SCNetworkSignature.c */; }; 15A5A2630D5B94190087BDA0 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 15A6F7C40A4B266D00B907EA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 15A6F7C20A4B266D00B907EA /* Localizable.strings */; }; + 15A9BDA81D8DEA67007024DB /* plugin_shared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1572AA8B1D8234500021E093 /* plugin_shared.h */; }; 15AAA7F4108E310700C2A607 /* VPNTunnelPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F1108E310700C2A607 /* VPNTunnelPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15AAA7F5108E310700C2A607 /* VPNTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F2108E310700C2A607 /* VPNTunnel.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15AAA7F6108E310700C2A607 /* VPNTunnel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15AAA7F3108E310700C2A607 /* VPNTunnel.c */; }; 15AAA7F7108E310700C2A607 /* VPNTunnelPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F1108E310700C2A607 /* VPNTunnelPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15AAA7F8108E310700C2A607 /* VPNTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F2108E310700C2A607 /* VPNTunnel.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15AAA7F9108E310700C2A607 /* VPNTunnel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15AAA7F3108E310700C2A607 /* VPNTunnel.c */; }; - 15AB751516EBFF3400FAA8CE /* SCNetworkReachabilityServer_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */; }; - 15AB752D16EC2AE900FAA8CE /* libIPMonitor_sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15E1B05916EBAE3C00E5F06F /* libIPMonitor_sim.a */; }; - 15AB752E16EC2AE900FAA8CE /* libSCNetworkReachability_sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15AB751916EBFF3400FAA8CE /* libSCNetworkReachability_sim.a */; }; 15BAA32307F0699A00D9EC95 /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; - 15C330BC134B92780028E36B /* SCNetworkReachabilityServer_client.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330B7134B92780028E36B /* SCNetworkReachabilityServer_client.c */; }; - 15C330BD134B92780028E36B /* SCNetworkReachabilityServer_client.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330B7134B92780028E36B /* SCNetworkReachabilityServer_client.c */; }; - 15C330BE134B92780028E36B /* SCNetworkReachabilityServer_client.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330B7134B92780028E36B /* SCNetworkReachabilityServer_client.c */; }; 15C330D1134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; 15C330D2134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; 15C330D3134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */; }; - 15C330E5134BD2AC0028E36B /* SCNetworkReachabilityServer_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */; }; - 15C8C6BF170AAB4E005375CE /* cache.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53CA07528B36004F8947 /* cache.c */; }; - 15C8C6C0170AAB4E005375CE /* cache.h in Headers */ = {isa = PBXBuildFile; fileRef = 159D53CB07528B36004F8947 /* cache.h */; }; + 15CB8F701EE4DCFC00726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F711EE4DCFF00726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F721EE4DD0400726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F731EE4DD0B00726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F741EE4DD1000726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F751EE4DD1100726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F761EE4DD1600726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F771EE4DD1900726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F781EE4DD1B00726685 /* network_state_information_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */; }; + 15CB8F791EE4DD3B00726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F7A1EE4DD3E00726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F7B1EE4DD3F00726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F7C1EE4DD4300726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F7D1EE4DD4600726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F7E1EE4DD4800726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F7F1EE4DD4B00726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F801EE4DD4D00726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F811EE4DD4E00726685 /* dnsinfo_logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */; }; + 15CB8F821EE4DE1F00726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F831EE4DE2200726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F841EE4DE2600726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F851EE4DE2B00726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F861EE4DE2E00726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F871EE4DE3000726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F881EE4DE3300726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F891EE4DE3600726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; + 15CB8F8A1EE4DE3B00726685 /* SCNetworkReachabilityLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */; }; 15D2E437167643460078F547 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1520A3DE0846B2DC0010B584 /* Security.framework */; }; - 15D3083316F3EB0700014F82 /* libSimulatorSupport_sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D3082716F3E4DA00014F82 /* libSimulatorSupport_sim.a */; }; 15D3083916F3EB8600014F82 /* simulator_support.c in Sources */ = {isa = PBXBuildFile; fileRef = 15D3083816F3EB8600014F82 /* simulator_support.c */; }; 15D3083B16F4E81C00014F82 /* com.apple.configd_sim.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 15D3083A16F4E6D900014F82 /* com.apple.configd_sim.plist */; }; 15D48EBF0F67061600B4711E /* dnsinfo_create.c in Sources */ = {isa = PBXBuildFile; fileRef = 1521FC5C060F296A003B28F5 /* dnsinfo_create.c */; }; 15D48EC00F67061700B4711E /* dnsinfo_create.h in Headers */ = {isa = PBXBuildFile; fileRef = 1532629006281C9D00B1C10C /* dnsinfo_create.h */; }; 15D48EC10F67061F00B4711E /* dnsinfo_create.c in Sources */ = {isa = PBXBuildFile; fileRef = 1521FC5C060F296A003B28F5 /* dnsinfo_create.c */; }; 15D48EC20F67061F00B4711E /* dnsinfo_create.h in Headers */ = {isa = PBXBuildFile; fileRef = 1532629006281C9D00B1C10C /* dnsinfo_create.h */; }; - 15D54E2715B4FA4600F5229A /* com.apple.networking.IPMonitor in com.apple.networking.IPMonitor */ = {isa = PBXBuildFile; fileRef = D68AD25F159BCD5900D4F1BE /* com.apple.networking.IPMonitor */; }; - 15D54E2B15B4FB0300F5229A /* com.apple.networking.IPMonitor in com.apple.networking.IPMonitor */ = {isa = PBXBuildFile; fileRef = D68AD25F159BCD5900D4F1BE /* com.apple.networking.IPMonitor */; }; 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 */; }; - 15D9DCFB10DD90A1004E545D /* AppWorkaround.plist in AppWorkaround.plist */ = {isa = PBXBuildFile; fileRef = 15D9DCFA10DD90A1004E545D /* AppWorkaround.plist */; }; + 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 */; settings = {ATTRIBUTES = (Weak, ); }; }; 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 */; }; 15DAD5E6075913CE0084A6ED /* dnsinfo_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0805FD1B670096477F /* dnsinfo_copy.c */; }; - 15DAD64307591A1A0084A6ED /* SystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691305C0722B0099E85F /* SystemConfiguration.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15DAD64307591A1A0084A6ED /* SystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691305C0722B0099E85F /* SystemConfiguration.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15DAD64407591A1A0084A6ED /* SCPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691505C0722B0099E85F /* SCPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15DAD64507591A1A0084A6ED /* SCDPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691705C0722B0099E85F /* SCDPlugin.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15DAD64607591A1A0084A6ED /* SCDynamicStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691B05C0722B0099E85F /* SCDynamicStoreInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 15DAD64707591A1A0084A6ED /* SCDynamicStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691D05C0722B0099E85F /* SCDynamicStore.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15DAD64707591A1A0084A6ED /* SCDynamicStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691D05C0722B0099E85F /* SCDynamicStore.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15DAD64807591A1A0084A6ED /* SCDynamicStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB691F05C0722B0099E85F /* SCDynamicStorePrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; - 15DAD64907591A1A0084A6ED /* SCDynamicStoreKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692105C0722B0099E85F /* SCDynamicStoreKey.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15DAD64A07591A1A0084A6ED /* SCDynamicStoreCopySpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692305C0722B0099E85F /* SCDynamicStoreCopySpecific.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15DAD64907591A1A0084A6ED /* SCDynamicStoreKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692105C0722B0099E85F /* SCDynamicStoreKey.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15DAD64A07591A1A0084A6ED /* SCDynamicStoreCopySpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692305C0722B0099E85F /* SCDynamicStoreCopySpecific.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15DAD64B07591A1A0084A6ED /* SCDynamicStoreCopySpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692505C0722B0099E85F /* SCDynamicStoreCopySpecificPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15DAD64C07591A1A0084A6ED /* SCDynamicStoreSetSpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692705C0722B0099E85F /* SCDynamicStoreSetSpecificPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15DAD64D07591A1A0084A6ED /* SCPreferencesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692905C0722B0099E85F /* SCPreferencesInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 15DAD64E07591A1A0084A6ED /* SCPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692B05C0722B0099E85F /* SCPreferences.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15DAD64E07591A1A0084A6ED /* SCPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692B05C0722B0099E85F /* SCPreferences.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15DAD64F07591A1A0084A6ED /* SCPreferencesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692D05C0722B0099E85F /* SCPreferencesPrivate.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; - 15DAD65007591A1A0084A6ED /* SCPreferencesPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692F05C0722B0099E85F /* SCPreferencesPath.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15DAD65107591A1A0084A6ED /* SCPreferencesSetSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693105C0722B0099E85F /* SCPreferencesSetSpecific.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15DAD65007591A1A0084A6ED /* SCPreferencesPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB692F05C0722B0099E85F /* SCPreferencesPath.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15DAD65107591A1A0084A6ED /* SCPreferencesSetSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693105C0722B0099E85F /* SCPreferencesSetSpecific.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15DAD65207591A1A0084A6ED /* SCNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AD7A380670A85900BFE03C /* SCNetworkConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15DAD65307591A1A0084A6ED /* SCNetworkConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AD7A3A0670A85900BFE03C /* SCNetworkConfigurationInternal.h */; settings = {ATTRIBUTES = (); }; }; - 15DAD65407591A1A0084A6ED /* SCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693305C0722B0099E85F /* SCNetwork.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15DAD65507591A1A0084A6ED /* SCNetworkConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693505C0722B0099E85F /* SCNetworkConnection.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; - 15DAD65607591A1A0084A6ED /* SCNetworkReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693705C0722B0099E85F /* SCNetworkReachability.h */; settings = {ATTRIBUTES = (Public, Project, ); }; }; + 15DAD65407591A1A0084A6ED /* SCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693305C0722B0099E85F /* SCNetwork.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15DAD65507591A1A0084A6ED /* SCNetworkConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693505C0722B0099E85F /* SCNetworkConnection.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; + 15DAD65607591A1A0084A6ED /* SCNetworkReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693705C0722B0099E85F /* SCNetworkReachability.h */; settings = {ATTRIBUTES = (Project, Public, ); }; }; 15DAD65707591A1A0084A6ED /* SCValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693905C0722B0099E85F /* SCValidation.h */; settings = {ATTRIBUTES = (Private, Project, ); }; }; 15DAD65807591A1A0084A6ED /* DHCPClientPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693D05C0722B0099E85F /* DHCPClientPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15DAD65907591A1A0084A6ED /* SCDynamicStoreCopyDHCPInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB693F05C0722B0099E85F /* SCDynamicStoreCopyDHCPInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15DAD65A07591A1A0084A6ED /* moh_msg.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694105C0722B0099E85F /* moh_msg.h */; }; - 15DAD65B07591A1A0084A6ED /* moh.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694305C0722B0099E85F /* moh.h */; }; - 15DAD65C07591A1A0084A6ED /* DeviceOnHold.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694505C0722B0099E85F /* DeviceOnHold.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15DAD65E07591A1A0084A6ED /* dy_framework.h in Headers */ = {isa = PBXBuildFile; fileRef = 15CB694905C0722B0099E85F /* dy_framework.h */; }; 15DAD66107591A1A0084A6ED /* SCPreferencesPathKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 151BDA2B05D9E28B00657BC7 /* SCPreferencesPathKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15DAD66407591A1A0084A6ED /* pppcontroller_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 23C1E2B4062DD2C700835B54 /* pppcontroller_types.h */; }; @@ -870,7 +952,6 @@ 15DAD67F07591A1A0084A6ED /* SCDNotifierWait.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697605C0722B0099E85F /* SCDNotifierWait.c */; settings = {ATTRIBUTES = (); }; }; 15DAD68007591A1A0084A6ED /* SCDNotifierInformViaCallback.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697805C0722B0099E85F /* SCDNotifierInformViaCallback.c */; settings = {ATTRIBUTES = (); }; }; 15DAD68207591A1A0084A6ED /* SCDNotifierInformViaFD.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697C05C0722B0099E85F /* SCDNotifierInformViaFD.c */; settings = {ATTRIBUTES = (); }; }; - 15DAD68307591A1A0084A6ED /* SCDNotifierInformViaSignal.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB697E05C0722B0099E85F /* SCDNotifierInformViaSignal.c */; settings = {ATTRIBUTES = (); }; }; 15DAD68407591A1A0084A6ED /* SCDNotifierCancel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698005C0722B0099E85F /* SCDNotifierCancel.c */; settings = {ATTRIBUTES = (); }; }; 15DAD68507591A1A0084A6ED /* SCDSnapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698205C0722B0099E85F /* SCDSnapshot.c */; settings = {ATTRIBUTES = (); }; }; 15DAD68607591A1A0084A6ED /* SCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB698405C0722B0099E85F /* SCP.c */; settings = {ATTRIBUTES = (); }; }; @@ -894,8 +975,6 @@ 15DAD69807591A1A0084A6ED /* SCNetworkReachability.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A605C0722B0099E85F /* SCNetworkReachability.c */; settings = {ATTRIBUTES = (); }; }; 15DAD69907591A1A0084A6ED /* SCProxies.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A805C0722B0099E85F /* SCProxies.c */; settings = {ATTRIBUTES = (); }; }; 15DAD69A07591A1A0084A6ED /* DHCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69AC05C0722B0099E85F /* DHCP.c */; settings = {ATTRIBUTES = (); }; }; - 15DAD69B07591A1A0084A6ED /* moh.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69AE05C0722B0099E85F /* moh.c */; settings = {ATTRIBUTES = (); }; }; - 15DAD69C07591A1A0084A6ED /* DeviceOnHold.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B005C0722B0099E85F /* DeviceOnHold.c */; settings = {ATTRIBUTES = (); }; }; 15DAD69D07591A1A0084A6ED /* LinkConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B205C0722B0099E85F /* LinkConfiguration.c */; settings = {ATTRIBUTES = (); }; }; 15DAD69E07591A1A0084A6ED /* dy_framework.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B405C0722B0099E85F /* dy_framework.c */; settings = {ATTRIBUTES = (); }; }; 15DAD69F07591A1A0084A6ED /* VLANConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B605C0722B0099E85F /* VLANConfiguration.c */; settings = {ATTRIBUTES = (); COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; @@ -912,7 +991,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_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_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 */; }; @@ -920,13 +998,38 @@ 15E1B04C16EBAE3C00E5F06F /* dnsinfo_create.c in Sources */ = {isa = PBXBuildFile; fileRef = 1521FC5C060F296A003B28F5 /* dnsinfo_create.c */; }; 15E1B04D16EBAE3C00E5F06F /* dnsinfo_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15B73F0D05FD1B670096477F /* dnsinfo_server.c */; }; 15E1B04E16EBAE3C00E5F06F /* ip_plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 159D53A707528B36004F8947 /* ip_plugin.c */; }; - 15E1B04F16EBAE3C00E5F06F /* network_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_information_priv.c */; }; + 15E1B04F16EBAE3C00E5F06F /* network_state_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_state_information_priv.c */; }; 15E1B05016EBAE3C00E5F06F /* network_information_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 153ACCA614E322D5005029A5 /* network_information_server.c */; }; 15E1B05116EBAE3C00E5F06F /* proxy-configuration.c in Sources */ = {isa = PBXBuildFile; fileRef = 1575FD2512CD15C60003D86E /* proxy-configuration.c */; }; 15E1B05316EBAE3C00E5F06F /* libSystemConfiguration_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 1596A7AF14EDB73D00798C39 /* libSystemConfiguration_server.c */; }; 15E1B05416EBAE3C00E5F06F /* scprefs_observer.c in Sources */ = {isa = PBXBuildFile; fileRef = D61AAEAD1522C99C0066B003 /* scprefs_observer.c */; }; 15E1B05516EBAE3C00E5F06F /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; + 15E56C552193840000088C51 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A5A26A0D5B94190087BDA0 /* SystemConfiguration.framework */; }; + 15E56C5921939B6400088C51 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CB7541BF439C6000C05A8 /* Foundation.framework */; }; + 15E56C5B21939B7B00088C51 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15E56C5A21939B7B00088C51 /* Foundation.framework */; }; + 15E56C5C21939B8E00088C51 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15E56C5A21939B7B00088C51 /* Foundation.framework */; }; + 15E91DB721893E83001155DC /* test-objC.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D3E66B1AE6EAF600DB4C69 /* test-objC.m */; }; + 15E91DB921893E83001155DC /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */; }; + 15E91DD021893EE1001155DC /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72D3E6601AE6EA3A00DB4C69 /* main.swift */; }; + 15EF899F21894452003B2C5C /* SCNetworkInterfaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F90E43542012AD3900EF27C4 /* SCNetworkInterfaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 15EF89A021894533003B2C5C /* SNHelperPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0C967F717441F0E00889853 /* SNHelperPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 15EF89AA21894636003B2C5C /* test-objC.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D3E66B1AE6EAF600DB4C69 /* test-objC.m */; }; + 15EF89AC21894636003B2C5C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */; }; + 15EF89B621894665003B2C5C /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72D3E6601AE6EA3A00DB4C69 /* main.swift */; }; + 15EF89C921894AA5003B2C5C /* SCNetworkInterfaceProvider.c in Sources */ = {isa = PBXBuildFile; fileRef = F90E43552012AD4500EF27C4 /* SCNetworkInterfaceProvider.c */; }; + 15EF89CA21894AB4003B2C5C /* SNHelper.c in Sources */ = {isa = PBXBuildFile; fileRef = B0C9689B174426C200889853 /* SNHelper.c */; }; + 15EF89CB21894B1A003B2C5C /* IPMonitorControlPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */; }; + 15EF89CC21894B28003B2C5C /* IPMonitorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */; }; + 15EF89CD21894B32003B2C5C /* IPMonitorControl.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */; }; 15F21618110F823500E89CF7 /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; + 15F742DD1EC6370000DA2E7A /* liblog_SystemConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 151D060D1EC14C6700E02E48 /* liblog_SystemConfiguration.m */; }; + 15F742DF1EC6370000DA2E7A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CB7541BF439C6000C05A8 /* Foundation.framework */; }; + 15F742E01EC6370000DA2E7A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72573D331D66800C004975AD /* SystemConfiguration.framework */; }; + 15F742EA1EC638D100DA2E7A /* liblog_SystemConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 151D060D1EC14C6700E02E48 /* liblog_SystemConfiguration.m */; }; + 15F742EC1EC638D100DA2E7A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CB7541BF439C6000C05A8 /* Foundation.framework */; }; + 15F742ED1EC638D100DA2E7A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72573D331D66800C004975AD /* SystemConfiguration.framework */; }; + 15FB1F8A1E27EA8700B4F809 /* InterfaceNamerControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FB1F881E27E9A000B4F809 /* InterfaceNamerControlPrefs.c */; }; + 15FB1F8B1E27EA8900B4F809 /* InterfaceNamerControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FB1F881E27E9A000B4F809 /* InterfaceNamerControlPrefs.c */; }; 15FBB54C17D6834C0035D752 /* libCrashReporterClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */; }; 15FC130B0CCEA59E0013872C /* monitor.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FC130A0CCEA59E0013872C /* monitor.c */; }; 15FC13180CCF74740013872C /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; @@ -935,38 +1038,108 @@ 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 */; }; + 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 */; }; + 720A4C0C1C585C97007436B8 /* dnsAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7280157C1BE16833009F4F60 /* dnsAgent.h */; }; + 720A4C0D1C585C9F007436B8 /* proxyAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7280157F1BE16833009F4F60 /* proxyAgent.h */; }; + 7214BCE31BEB392000A8F056 /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015951BE16B6C009F4F60 /* Network.framework */; }; + 7214BCE41BEB392300A8F056 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015961BE16B6C009F4F60 /* NetworkExtension.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 72499BA41AC9B7AB0090C49F /* get-network-info in Resources */ = {isa = PBXBuildFile; fileRef = 72499BA31AC9B7AB0090C49F /* get-network-info */; }; + 72499BA51AC9B7AB0090C49F /* get-network-info in Resources */ = {isa = PBXBuildFile; fileRef = 72499BA31AC9B7AB0090C49F /* get-network-info */; }; + 72573D291D667372004975AD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D281D667372004975AD /* main.m */; }; + 72573D2E1D6673B6004975AD /* SCTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D2D1D6673B6004975AD /* SCTest.m */; }; + 72573D321D667686004975AD /* SCTestUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D311D667686004975AD /* SCTestUtils.m */; }; + 72573D351D6680AA004975AD /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72573D331D66800C004975AD /* SystemConfiguration.framework */; }; + 72573D3A1D6692BA004975AD /* SCTestOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D391D6692BA004975AD /* SCTestOptions.m */; }; + 72573D3C1D6695B4004975AD /* SCTestDynamicStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D3B1D6695B4004975AD /* SCTestDynamicStore.m */; }; + 72573D3E1D669AA6004975AD /* SCTestPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D3D1D669AA6004975AD /* SCTestPreferences.m */; }; + 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 */; }; + 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 */; }; + 725CB7591BF514F5000C05A8 /* configAgentDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 725CB7571BF51476000C05A8 /* configAgentDefines.h */; }; 7264C144147319E7004FD76D /* CaptiveNetwork.c in Sources */ = {isa = PBXBuildFile; fileRef = 15A1FF3110597F17004C9CC9 /* CaptiveNetwork.c */; }; 7264C14614731A1F004FD76D /* CaptiveNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A1FF3010597F17004C9CC9 /* CaptiveNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 727AF25419138699009AB153 /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 726DB2F41BEA80E5001B2C6C /* config_agent_info.c in Sources */ = {isa = PBXBuildFile; fileRef = 726DB2F11BEA80E5001B2C6C /* config_agent_info.c */; }; + 726DB2F61BEA80E5001B2C6C /* config_agent_info.h in Headers */ = {isa = PBXBuildFile; fileRef = 726DB2F21BEA80E5001B2C6C /* config_agent_info.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7271EA1E1D76600B0055B1AA /* SCTestDynamicStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D3B1D6695B4004975AD /* SCTestDynamicStore.m */; }; + 7271EA1F1D76600B0055B1AA /* SCTestOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D391D6692BA004975AD /* SCTestOptions.m */; }; + 7271EA201D76600B0055B1AA /* SCTestUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D311D667686004975AD /* SCTestUtils.m */; }; + 7271EA211D76600B0055B1AA /* SCTestUnitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D3F1D67B2BE004975AD /* SCTestUnitTest.m */; }; + 7271EA221D76600B0055B1AA /* SCTestReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 728E0E951D70229A00E0613A /* SCTestReachability.m */; }; + 7271EA231D76600B0055B1AA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D281D667372004975AD /* main.m */; }; + 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 */; }; + 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 */; }; 727AF255191386A0009AB153 /* VPNFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8111631933400819B44 /* VPNFlow.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 727AF256191386CB009AB153 /* VPNFlowPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8121631933400819B44 /* VPNFlowPrivate.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, ); }; }; 727AF25919138E24009AB153 /* VPNTunnel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15AAA7F3108E310700C2A607 /* VPNTunnel.c */; }; + 728015811BE1683B009F4F60 /* agent-monitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 728015751BE16833009F4F60 /* agent-monitor.m */; }; + 728015821BE16840009F4F60 /* agent-monitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 728015751BE16833009F4F60 /* agent-monitor.m */; }; + 728015871BE1684E009F4F60 /* configAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 728015791BE16833009F4F60 /* configAgent.m */; }; + 728015881BE16851009F4F60 /* configAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 728015791BE16833009F4F60 /* configAgent.m */; }; + 7280158B1BE1685B009F4F60 /* controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7280157B1BE16833009F4F60 /* controller.m */; }; + 7280158C1BE1685D009F4F60 /* controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7280157B1BE16833009F4F60 /* controller.m */; }; + 7280158D1BE16861009F4F60 /* dnsAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 7280157D1BE16833009F4F60 /* dnsAgent.m */; }; + 7280158E1BE16863009F4F60 /* dnsAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 7280157D1BE16833009F4F60 /* dnsAgent.m */; }; + 728015911BE1686C009F4F60 /* proxyAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 728015801BE16833009F4F60 /* proxyAgent.m */; }; + 728015921BE1686F009F4F60 /* proxyAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 728015801BE16833009F4F60 /* proxyAgent.m */; }; + 728015971BE16B6C009F4F60 /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015951BE16B6C009F4F60 /* Network.framework */; }; + 728015981BE16B6C009F4F60 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015961BE16B6C009F4F60 /* NetworkExtension.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 728015991BE1812B009F4F60 /* agent-monitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 728015931BE1697E009F4F60 /* agent-monitor.h */; }; + 7280159B1BE1812B009F4F60 /* configAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 728015781BE16833009F4F60 /* configAgent.h */; }; + 7280159C1BE1812B009F4F60 /* controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 7280157A1BE16833009F4F60 /* controller.h */; }; + 7280159D1BE1812B009F4F60 /* dnsAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7280157C1BE16833009F4F60 /* dnsAgent.h */; }; + 7280159E1BE1812B009F4F60 /* proxyAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7280157F1BE16833009F4F60 /* proxyAgent.h */; }; + 728CEAFF1BEA951A00F13F92 /* config_agent_info.c in Sources */ = {isa = PBXBuildFile; fileRef = 726DB2F11BEA80E5001B2C6C /* config_agent_info.c */; }; + 728CEB001BEA993100F13F92 /* config_agent_info.h in Headers */ = {isa = PBXBuildFile; fileRef = 726DB2F21BEA80E5001B2C6C /* config_agent_info.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 728E0E961D70229A00E0613A /* SCTestReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 728E0E951D70229A00E0613A /* SCTestReachability.m */; }; + 728E0E971D70348D00E0613A /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015961BE16B6C009F4F60 /* NetworkExtension.framework */; }; 72B43728113C7BFC00EBF1B6 /* nc.h in Headers */ = {isa = PBXBuildFile; fileRef = 72B43726113C7BFC00EBF1B6 /* nc.h */; }; 72B43729113C7BFC00EBF1B6 /* nc.c in Sources */ = {isa = PBXBuildFile; fileRef = 72B43727113C7BFC00EBF1B6 /* nc.c */; }; 72B4372A113C7BFC00EBF1B6 /* nc.h in Headers */ = {isa = PBXBuildFile; fileRef = 72B43726113C7BFC00EBF1B6 /* nc.h */; }; 72B4372B113C7BFC00EBF1B6 /* nc.c in Sources */ = {isa = PBXBuildFile; fileRef = 72B43727113C7BFC00EBF1B6 /* nc.c */; }; + 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 */; }; + 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 */; }; B0C9689E174426DD00889853 /* SNHelperPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0C967F717441F0E00889853 /* SNHelperPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 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 */; }; + C469CB2920EED6C100A7AD35 /* StateDumpParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C469CB2820EED6C100A7AD35 /* StateDumpParser.m */; }; + C496A09620F909FF0098B3E5 /* IPConfigurationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C496A09520F909FF0098B3E5 /* IPConfigurationParser.m */; }; + C4C5FB0520EA9B6F00F35614 /* SCLogParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C4C5FB0420EA9B6F00F35614 /* SCLogParser.m */; }; + C4C5FB0620EA9C3200F35614 /* KernelEventMonitorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C4C5FB0220EA9A5A00F35614 /* KernelEventMonitorParser.m */; }; + C4C5FB0920EAB0DD00F35614 /* InterfaceNamerParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C4C5FB0820EAB0DD00F35614 /* InterfaceNamerParser.m */; }; + C4C5FB0C20EABD9E00F35614 /* IPMonitorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C4C5FB0B20EABD9E00F35614 /* IPMonitorParser.m */; }; + C4C5FB0F20EAC05200F35614 /* PreferencesMonitorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = C4C5FB0E20EAC05200F35614 /* PreferencesMonitorParser.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, ); }; }; - C4CDB8181631938400819B44 /* VPNFlowPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8121631933400819B44 /* VPNFlowPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; C4CDB819163193AA00819B44 /* VPNFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8111631933400819B44 /* VPNFlow.h */; settings = {ATTRIBUTES = (Private, ); }; }; - C4CDB81A163193AF00819B44 /* VPNFlowPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8121631933400819B44 /* VPNFlowPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; C4F1848016237AFC00D97043 /* VPNService.c in Sources */ = {isa = PBXBuildFile; fileRef = C4F1847F16237AFC00D97043 /* VPNService.c */; }; C4F1848116237AFC00D97043 /* VPNService.c in Sources */ = {isa = PBXBuildFile; fileRef = C4F1847F16237AFC00D97043 /* VPNService.c */; }; C4F1848316237B1400D97043 /* VPNService.c in Sources */ = {isa = PBXBuildFile; fileRef = C4F1847F16237AFC00D97043 /* VPNService.c */; }; @@ -983,10 +1156,12 @@ D661C2F21368BB720030B977 /* network_information.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A781368913C0091C931 /* network_information.h */; settings = {ATTRIBUTES = (Public, ); }; }; D6623873120B2AA7007F8E95 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1520A3DE0846B2DC0010B584 /* Security.framework */; }; D6986A79136891650091C931 /* network_information.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A77136891300091C931 /* network_information.c */; }; - E49173E1137C4E4F0000089F /* network_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_information_priv.c */; }; - E4F211D3137B0AB900BBB915 /* network_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_information_priv.c */; }; - E4F211D4137B0ABD00BBB915 /* network_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_information_priv.h */; }; - E4F211D7137B0AF200BBB915 /* network_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_information_priv.h */; }; + 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 */; }; + F90E43562012AD4F00EF27C4 /* SCNetworkInterfaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F90E43542012AD3900EF27C4 /* SCNetworkInterfaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F90E43572012AD6000EF27C4 /* SCNetworkInterfaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F90E43542012AD3900EF27C4 /* SCNetworkInterfaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F90E43582012AD6900EF27C4 /* SCNetworkInterfaceProvider.c in Sources */ = {isa = PBXBuildFile; fileRef = F90E43552012AD4500EF27C4 /* SCNetworkInterfaceProvider.c */; }; + F90E43592012AD6B00EF27C4 /* SCNetworkInterfaceProvider.c in Sources */ = {isa = PBXBuildFile; fileRef = F90E43552012AD4500EF27C4 /* SCNetworkInterfaceProvider.c */; }; 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 */; }; @@ -994,6 +1169,10 @@ 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, ); }; }; + F963401020FE8E6000F1E1F1 /* AwdMetadata-0x81-IPMonitor.bin in CopyFiles */ = {isa = PBXBuildFile; fileRef = F963400E20FE8E1D00F1E1F1 /* AwdMetadata-0x81-IPMonitor.bin */; }; + F97289D322652D0600080596 /* serviceIDNumber.c in Sources */ = {isa = PBXBuildFile; fileRef = F97289D122652CE600080596 /* serviceIDNumber.c */; }; + F97289D422652D0A00080596 /* serviceIDNumber.c in Sources */ = {isa = PBXBuildFile; fileRef = F97289D122652CE600080596 /* serviceIDNumber.c */; }; + F97289D522652D0D00080596 /* serviceIDNumber.c in Sources */ = {isa = PBXBuildFile; fileRef = F97289D122652CE600080596 /* serviceIDNumber.c */; }; F9A3781016A4847700C57CDC /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9A3781116A4849100C57CDC /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9B50FF316A4CBB200CA274E /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; @@ -1010,9 +1189,31 @@ 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 */; settings = {ATTRIBUTES = (Weak, ); }; }; + F9D7305120E41DD500521181 /* WirelessDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9D7305020E41DD500521181 /* WirelessDiagnostics.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 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 */ + 150EC100210171AE0047F4BF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 72D3E6681AE6EAF600DB4C69; + remoteInfo = "SCTest-ObjC"; + }; + 150EC102210171B60047F4BF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 72D3E65D1AE6EA3900DB4C69; + remoteInfo = "SCTest-Swift"; + }; 150ECB2F0D0042DA0065E94D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; @@ -1027,40 +1228,33 @@ remoteGlobalIDString = 151FE2DD0D5B7046000D6DB1; remoteInfo = "configd_base-EmbeddedSimulator"; }; - 1521405A0E9400BF00DACD2C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 15213FF90E93E9F500DACD2C; - remoteInfo = Logger.bundle; - }; - 1528BFEB135731B800691881 /* PBXContainerItemProxy */ = { + 1523BBE11E075859006281F1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 1528BFDB1357305400691881; - remoteInfo = SCNetworkReachability; + remoteGlobalIDString = 158337990CFB6B9E0033AB93; + remoteInfo = "SCHelper-Embedded"; }; - 1528BFED135731B800691881 /* PBXContainerItemProxy */ = { + 15401C2B21991B05006326B7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 1528BFE31357309700691881; - remoteInfo = SCNetworkReachability.bundle; + remoteGlobalIDString = 15401C1C21991506006326B7; + remoteInfo = configd_extras; }; - 1528C00E135741C300691881 /* PBXContainerItemProxy */ = { + 15401C2D21991B1B006326B7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 1528BFF013573FEE00691881; - remoteInfo = "SCNetworkReachability-Embedded"; + remoteGlobalIDString = 15401C21219915BC006326B7; + remoteInfo = "configd_extras-Embedded"; }; - 1528C010135741C300691881 /* PBXContainerItemProxy */ = { + 15401C2F21991B31006326B7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 1528BFF813573FF500691881; - remoteInfo = "SCNetworkReachability.bundle-Embedded"; + remoteGlobalIDString = 15401C26219915C6006326B7; + remoteInfo = "configd_extras-EmbeddedSimulator"; }; 1558480507550D470046C2E9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -1076,26 +1270,96 @@ remoteGlobalIDString = 1558481207550EC10046C2E9; remoteInfo = scselect; }; - 1558480907550D470046C2E9 /* PBXContainerItemProxy */ = { + 1558480E07550DD00046C2E9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 155847430754FDCD0046C2E9; - remoteInfo = scutil; + remoteGlobalIDString = 155847FA07550D210046C2E9; + remoteInfo = configd_executables; }; - 1558480E07550DD00046C2E9 /* PBXContainerItemProxy */ = { + 155C626021C2B6FD008DCB1A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 155847FA07550D210046C2E9; - remoteInfo = configd_executables; + remoteGlobalIDString = 157433DD0D4A8122002ACA73; + remoteInfo = "scselect-Embedded"; + }; + 155C626421C2B6FD008DCB1A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7271EA1B1D76600B0055B1AA; + remoteInfo = "sctest-Embedded"; + }; + 155F49A81C8650E900E47D08 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 155F49861C864F1400E47D08; + remoteInfo = QoSMarking; + }; + 155F49AA1C8650E900E47D08 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 155F498E1C864F3700E47D08; + remoteInfo = QoSMarking.bundle; + }; + 155F49AC1C86511300E47D08 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 155F49951C864F4E00E47D08; + remoteInfo = "QoSMarking-Embedded"; + }; + 155F49AE1C86511300E47D08 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 155F499D1C864F5400E47D08; + remoteInfo = "QoSMarking.bundle-Embedded"; + }; + 15631D101ECF92E70088EEDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 151D05FA1EC1491600E02E48; + remoteInfo = liblog_SystemConfiguration; + }; + 15631D121ECF93040088EEDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15F742DA1EC6370000DA2E7A; + remoteInfo = "liblog_SystemConfiguration-Embedded"; + }; + 15631D261ECF99800088EEDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15F742E71EC638D100DA2E7A; + remoteInfo = "liblog_SystemConfiguration-EmbeddedSimulator"; + }; + 15631D281ECF99800088EEDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15732A7616EA503200F3AC4C; + remoteInfo = "configd-EmbeddedSimulator"; + }; + 15631D2A1ECF99800088EEDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15732AAD16EA511900F3AC4C; + remoteInfo = "scutil-EmbeddedSimulator"; }; - 156CA4A70EF8550800C59A18 /* PBXContainerItemProxy */ = { + 15631D2C1ECF99A00088EEDD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; proxyType = 1; - remoteGlobalIDString = 156CA4790EF853BB00C59A18; - remoteInfo = "Logger.bundle-Embedded"; + remoteGlobalIDString = 15631D161ECF98FB0088EEDD; + remoteInfo = "configd_executables-EmbeddedSimulator"; }; 15732AE516EA6BCE00F3AC4C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -1111,13 +1375,6 @@ remoteGlobalIDString = 157433F00D4A8137002ACA73; remoteInfo = "scutil-Embedded"; }; - 157434200D4A8166002ACA73 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 157433DD0D4A8122002ACA73; - remoteInfo = "scselect-Embedded"; - }; 157A85470D56CA0B00B6F1A0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; @@ -1202,13 +1459,6 @@ remoteGlobalIDString = 1572C4A60CFB55B400E2776E; remoteInfo = "SystemConfiguration.framework-Embedded"; }; - 158317130CFB77E8006F62B9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 158337990CFB6B9E0033AB93; - remoteInfo = "SCHelper-Embedded"; - }; 158317150CFB783B006F62B9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; @@ -1335,20 +1585,6 @@ remoteGlobalIDString = 15A5A1E40D5B94190087BDA0; remoteInfo = "SystemConfiguration.framework-EmbeddedSimulator"; }; - 15AB752116EC005A00FAA8CE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 15AB751216EBFF3400FAA8CE; - remoteInfo = "SCNetworkReachability-EmbeddedSimulator"; - }; - 15AB752316EC005A00FAA8CE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 15AB751A16EBFF8A00FAA8CE; - remoteInfo = "SCNetworkReachability.bundle-EmbeddedSimulator"; - }; 15AB752916EC254D00FAA8CE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; @@ -1356,13 +1592,6 @@ remoteGlobalIDString = 15E1B04116EBAE3C00E5F06F; remoteInfo = "IPMonitor-EmbeddedSimulator"; }; - 15AB752B16EC254D00FAA8CE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 15AB751216EBFF3400FAA8CE; - remoteInfo = "SCNetworkReachability-EmbeddedSimulator"; - }; 15C64A210F684C4900D78394 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; @@ -1461,6 +1690,97 @@ remoteGlobalIDString = 15FD13BF0D59485000F9409C; remoteInfo = "All-EmbeddedSimulator"; }; + 15EF89A121894601003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1572C4A60CFB55B400E2776E; + remoteInfo = "SystemConfiguration.framework-Embedded"; + }; + 15EF89A32189461B003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1572C4A60CFB55B400E2776E; + remoteInfo = "SystemConfiguration.framework-Embedded"; + }; + 15EF89BD2189467B003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15A5A1E40D5B94190087BDA0; + remoteInfo = "SystemConfiguration.framework-EmbeddedSimulator"; + }; + 15EF89BF21894688003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15A5A1E40D5B94190087BDA0; + remoteInfo = "SystemConfiguration.framework-EmbeddedSimulator"; + }; + 15EF89C121894837003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15E91DB221893E83001155DC; + remoteInfo = "SCTest-ObjC-Embedded"; + }; + 15EF89C321894837003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15E91DCC21893EE1001155DC; + remoteInfo = "SCTest-Swift-Embedded"; + }; + 15EF89C52189484C003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15EF89A521894636003B2C5C; + remoteInfo = "SCTest-ObjC-EmbeddedSimulator"; + }; + 15EF89C72189484C003B2C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15EF89B221894665003B2C5C; + remoteInfo = "SCTest-Swift-EmbeddedSimulator"; + }; + 723050311AE6F292004AC149 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15DAD63F07591A1A0084A6ED; + remoteInfo = SystemConfiguration.framework; + }; + 723050331AE6F29D004AC149 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15DAD63F07591A1A0084A6ED; + remoteInfo = SystemConfiguration.framework; + }; + 72C12CB01D6EA2CA000EE61C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 72573D251D667372004975AD; + remoteInfo = sctest; + }; + 72C4A47F1BE44D19009D570E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + 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 */; @@ -1494,7 +1814,7 @@ 15732AA716EA503200F3AC4C /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 8; - dstPath = "$(INSTALL_PATH_PREFIX)/System/Library/LaunchDaemons"; + dstPath = /System/Library/LaunchDaemons; dstSubfolderSpec = 0; files = ( 15D3083B16F4E81C00014F82 /* com.apple.configd_sim.plist in CopyFiles */, @@ -1521,6 +1841,39 @@ ); runOnlyForDeploymentPostprocessing = 1; }; + 158D6D881C974E7E00A08E78 /* Logging Preferences */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /System/Library/Preferences/Logging/Subsystems; + dstSubfolderSpec = 0; + files = ( + 158D6D891C974E9E00A08E78 /* com.apple.SystemConfiguration.plist in Logging Preferences */, + ); + name = "Logging Preferences"; + runOnlyForDeploymentPostprocessing = 1; + }; + 158D6D8A1C974EF700A08E78 /* Logging Preferences */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /System/Library/Preferences/Logging/Subsystems; + dstSubfolderSpec = 0; + files = ( + 158D6D8B1C974F1800A08E78 /* com.apple.SystemConfiguration.plist in Logging Preferences */, + ); + name = "Logging Preferences"; + runOnlyForDeploymentPostprocessing = 1; + }; + 158D6D8C1C974F4800A08E78 /* Logging Preferences */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /System/Library/Preferences/Logging/Subsystems; + dstSubfolderSpec = 0; + files = ( + 158D6D8D1C974F5800A08E78 /* com.apple.SystemConfiguration.plist in Logging Preferences */, + ); + name = "Logging Preferences"; + runOnlyForDeploymentPostprocessing = 1; + }; 159D54D507529FFF004F8947 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 8; @@ -1531,47 +1884,51 @@ ); runOnlyForDeploymentPostprocessing = 1; }; - 159D54D707529FFF004F8947 /* CopyFiles */ = { + 159D54D707529FFF004F8947 /* Copy Files */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 8; dstPath = /System/Library/LaunchDaemons; dstSubfolderSpec = 0; files = ( - 1540E3610987DA9500157C07 /* com.apple.configd.plist in CopyFiles */, + 1540E3610987DA9500157C07 /* com.apple.configd.plist in Copy Files */, ); + name = "Copy Files"; runOnlyForDeploymentPostprocessing = 1; }; - 15D54E2515B4FA1900F5229A /* com.apple.networking.IPMonitor */ = { + 15E91DBA21893E83001155DC /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /private/etc/asl; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( - 15D54E2715B4FA4600F5229A /* com.apple.networking.IPMonitor in com.apple.networking.IPMonitor */, ); - name = com.apple.networking.IPMonitor; runOnlyForDeploymentPostprocessing = 1; }; - 15D54E2A15B4FAF100F5229A /* com.apple.networking.IPMonitor */ = { + 15E91DD221893EE1001155DC /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /private/etc/asl; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( - 15D54E2B15B4FB0300F5229A /* com.apple.networking.IPMonitor in com.apple.networking.IPMonitor */, ); - name = com.apple.networking.IPMonitor; runOnlyForDeploymentPostprocessing = 1; }; - 15D9DCF910DD909F004E545D /* AppWorkaround.plist */ = { + 15EF89AD21894636003B2C5C /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/local/AppSpecificWorkaround/SystemConfiguration; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + 15EF89B821894665003B2C5C /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( - 15D9DCFB10DD90A1004E545D /* AppWorkaround.plist in AppWorkaround.plist */, ); - name = AppWorkaround.plist; runOnlyForDeploymentPostprocessing = 1; }; 15FF5C380CDF778F00EEC8AA /* CopyFiles */ = { @@ -1584,44 +1941,97 @@ ); runOnlyForDeploymentPostprocessing = 1; }; + 72573D241D667372004975AD /* npt_configd.plist */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /AppleInternal/CoreOS/BATS/npt_tests; + dstSubfolderSpec = 0; + files = ( + 72C12CAB1D6E9F45000EE61C /* npt_configd.plist in npt_configd.plist */, + ); + name = npt_configd.plist; + runOnlyForDeploymentPostprocessing = 1; + }; + 7271EA2C1D76600B0055B1AA /* npt_configd.plist */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /AppleInternal/CoreOS/BATS/npt_tests; + dstSubfolderSpec = 0; + files = ( + 7271EA2D1D76600B0055B1AA /* npt_configd.plist in npt_configd.plist */, + ); + name = npt_configd.plist; + runOnlyForDeploymentPostprocessing = 1; + }; + 72D3E65C1AE6EA3900DB4C69 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + 72D3E6671AE6EAF600DB4C69 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + F963400F20FE8E4100F1E1F1 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /System/Library/AWD/Metadata; + dstSubfolderSpec = 0; + files = ( + F963401020FE8E6000F1E1F1 /* AwdMetadata-0x81-IPMonitor.bin in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 150607BD075A00A200B147BA /* SCSchemaDefinitions.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SCSchemaDefinitions.c; sourceTree = ""; }; 150607DE075A00A300B147BA /* SCSchemaDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCSchemaDefinitions.h; sourceTree = ""; }; 151356AD0CE0CF2F0017E523 /* com.apple.SCHelper-embedded.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "com.apple.SCHelper-embedded.plist"; path = "helper/com.apple.SCHelper-embedded.plist"; sourceTree = ""; }; + 1513C3551F1849B50022398F /* update-sanitizer-dylib-references */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text; path = "update-sanitizer-dylib-references"; sourceTree = SOURCE_ROOT; tabWidth = 8; }; 1514D76D05C08A5F00757DC9 /* config_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config_types.h; path = SystemConfiguration.fproj/config_types.h; sourceTree = SOURCE_ROOT; }; 151BDA2B05D9E28B00657BC7 /* SCPreferencesPathKey.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SCPreferencesPathKey.h; path = SystemConfiguration.fproj/SCPreferencesPathKey.h; sourceTree = SOURCE_ROOT; }; 151BDA5D05D9E2ED00657BC7 /* SCPreferencesPathKey.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SCPreferencesPathKey.c; path = SystemConfiguration.fproj/SCPreferencesPathKey.c; sourceTree = SOURCE_ROOT; }; + 151D060B1EC1491600E02E48 /* liblog_SystemConfiguration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = liblog_SystemConfiguration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 151D060D1EC14C6700E02E48 /* liblog_SystemConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = liblog_SystemConfiguration.m; path = logging/liblog_SystemConfiguration.m; sourceTree = SOURCE_ROOT; }; 151F5D9A0CCE98E50093AC3B /* SCMonitor.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCMonitor.plugin; sourceTree = BUILT_PRODUCTS_DIR; }; 151F63EC09328A3C0096DCC9 /* genSCPreferences */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = genSCPreferences; sourceTree = BUILT_PRODUCTS_DIR; }; 1520A3DE0846B2DC0010B584 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = ""; }; - 15213FFA0E93E9F500DACD2C /* Logger.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Logger.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 1521FC5C060F296A003B28F5 /* dnsinfo_create.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dnsinfo_create.c; path = dnsinfo/dnsinfo_create.c; sourceTree = SOURCE_ROOT; }; 1522FCE50FA7FD7000B24128 /* dnsinfo_flatfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dnsinfo_flatfile.c; path = dnsinfo/dnsinfo_flatfile.c; sourceTree = ""; }; 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; }; - 1528BFE21357305400691881 /* libSCNetworkReachability.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSCNetworkReachability.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 1528BFE81357309800691881 /* SCNetworkReachability.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCNetworkReachability.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - 1528BFE91357312E00691881 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Plugins/SCNetworkReachability/Info.plist; sourceTree = ""; }; - 1528BFF713573FEE00691881 /* libSCNetworkReachability.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSCNetworkReachability.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 1528BFFE13573FF500691881 /* SCNetworkReachability.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCNetworkReachability.bundle; sourceTree = BUILT_PRODUCTS_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 = ""; }; 152E0E7E10FE820E00E402F2 /* helper.defs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.mig; name = helper.defs; path = SystemConfiguration.fproj/helper/helper.defs; sourceTree = ""; }; 152E0E8810FE824000E402F2 /* helper_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = helper_types.h; path = SystemConfiguration.fproj/helper/helper_types.h; sourceTree = ""; }; 152E68C00A2C89C70011FDA8 /* SCPreferencesKeychainPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCPreferencesKeychainPrivate.h; sourceTree = ""; }; 152E68C20A2C89E30011FDA8 /* SCPreferencesKeychainPrivate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SCPreferencesKeychainPrivate.c; sourceTree = ""; }; - 1531D3DA0E93E6DA00248432 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Plugins/Logger/Info.plist; sourceTree = ""; }; - 1531D3DB0E93E6DA00248432 /* logger.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = logger.c; path = Plugins/Logger/logger.c; sourceTree = ""; }; + 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCNetworkReachabilityLogging.h; sourceTree = ""; }; 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; explicitFileType = text.plist.xml; fileEncoding = 30; path = com.apple.configd.plist; sourceTree = ""; }; + 1540E3600987DA9500157C07 /* com.apple.configd.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = com.apple.configd.plist; sourceTree = ""; }; + 1542400421626DD300C7CE8B /* SCDCache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SCDCache.c; sourceTree = ""; }; + 15436251218AA22800283462 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = SCMonitor/en.lproj/Localizable.strings; sourceTree = ""; }; + 15436253218AA26100283462 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 15436255218AA27400283462 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/NetworkInterface.strings; sourceTree = ""; }; 1543636A0752D03C00A8EC6C /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 1547001D08455B98006787CE /* SCHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SCHelper; sourceTree = BUILT_PRODUCTS_DIR; }; 1547072E0D1F70C80075C28D /* SystemConfiguration.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SystemConfiguration.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1641,20 +2051,25 @@ 155D22380AF13A7300D52ED0 /* dns-configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "dns-configuration.h"; sourceTree = ""; }; 155D22390AF13A7300D52ED0 /* set-hostname.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "set-hostname.h"; sourceTree = ""; }; 155D223A0AF13A7300D52ED0 /* smb-configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "smb-configuration.h"; sourceTree = ""; }; + 155F498D1C864F1400E47D08 /* libQoSMarking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libQoSMarking.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 155F49931C864F3700E47D08 /* QoSMarking.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QoSMarking.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 155F499C1C864F4E00E47D08 /* libQoSMarking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libQoSMarking.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; - 156CA4850EF853BB00C59A18 /* Logger.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Logger.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - 156CA48D0EF853BB00C59A18 /* Info-Embedded.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-Embedded.plist"; path = "Plugins/Logger/Info-Embedded.plist"; sourceTree = ""; }; + 1572AA8B1D8234500021E093 /* plugin_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plugin_shared.h; sourceTree = ""; }; 1572C57E171CCF9500870549 /* pppcontroller_mach_defines.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; name = pppcontroller_mach_defines.h; path = usr/local/include/ppp/pppcontroller_mach_defines.h; sourceTree = SDKROOT; }; 1572EB7A0A506D3B00D02459 /* smb-configuration.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "smb-configuration.c"; sourceTree = ""; }; 15732AAC16EA503300F3AC4C /* configd_sim */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = configd_sim; sourceTree = BUILT_PRODUCTS_DIR; }; 15732AD516EA511900F3AC4C /* scutil_sim */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = scutil_sim; sourceTree = BUILT_PRODUCTS_DIR; }; - 15732AE416EA6B6700F3AC4C /* libsystem_sim_configuration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libsystem_sim_configuration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 15732AE416EA6B6700F3AC4C /* libsystem_configuration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libsystem_configuration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 157433EC0D4A8122002ACA73 /* scselect */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = scselect; sourceTree = BUILT_PRODUCTS_DIR; }; 1574341A0D4A8137002ACA73 /* scutil */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = scutil; sourceTree = BUILT_PRODUCTS_DIR; }; 1575FD2512CD15C60003D86E /* proxy-configuration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "proxy-configuration.c"; sourceTree = ""; }; 1575FD2612CD15C60003D86E /* proxy-configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "proxy-configuration.h"; sourceTree = ""; }; - 1577252F06EFB96700D7B52B /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/NetworkInterface.strings; sourceTree = ""; }; 157A84E80D56C63900B6F1A0 /* libsystem_configuration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libsystem_configuration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 157A85020D56C7E800B6F1A0 /* libIPMonitor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIPMonitor.a; sourceTree = BUILT_PRODUCTS_DIR; }; 157A850D0D56C8AA00B6F1A0 /* libInterfaceNamer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libInterfaceNamer.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1662,22 +2077,31 @@ 157A852E0D56C91100B6F1A0 /* libLinkConfiguration.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libLinkConfiguration.a; sourceTree = BUILT_PRODUCTS_DIR; }; 157A85440D56C96F00B6F1A0 /* libPreferencesMonitor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPreferencesMonitor.a; sourceTree = BUILT_PRODUCTS_DIR; }; 157A88880A470D0F003A4256 /* SCSchemaDefinitionsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCSchemaDefinitionsPrivate.h; sourceTree = ""; }; + 15812A2D1EA5540B001CF384 /* nat64-configuration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "nat64-configuration.c"; sourceTree = ""; }; + 15812A2E1EA5540B001CF384 /* nat64-configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "nat64-configuration.h"; sourceTree = ""; }; 15828AE70753B5F900AD4710 /* KernelEventMonitor.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KernelEventMonitor.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 158AD8700754E3D400124717 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 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 = ""; }; - 159D53B007528B36004F8947 /* eventmon.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = eventmon.c; sourceTree = ""; }; + 159D53B007528B36004F8947 /* eventmon.c */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = eventmon.c; sourceTree = ""; }; 159D53B107528B36004F8947 /* ev_dlil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ev_dlil.c; sourceTree = ""; }; 159D53B207528B36004F8947 /* ev_dlil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ev_dlil.h; sourceTree = ""; }; 159D53B307528B36004F8947 /* ev_ipv4.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ev_ipv4.c; sourceTree = ""; }; @@ -1687,8 +2111,6 @@ 159D53BA07528B36004F8947 /* ev_ipv6.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ev_ipv6.h; sourceTree = ""; }; 159D53C107528B36004F8947 /* linkconfig.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = linkconfig.c; sourceTree = ""; }; 159D53C307528B36004F8947 /* prefsmon.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = prefsmon.c; sourceTree = ""; }; - 159D53CA07528B36004F8947 /* cache.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cache.c; sourceTree = ""; }; - 159D53CB07528B36004F8947 /* cache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cache.h; sourceTree = ""; }; 159D53D407528BDA004F8947 /* libKernelEventMonitor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libKernelEventMonitor.a; sourceTree = BUILT_PRODUCTS_DIR; }; 159D53E507528C4A004F8947 /* libInterfaceNamer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libInterfaceNamer.a; sourceTree = BUILT_PRODUCTS_DIR; }; 159D53EC07528C61004F8947 /* libIPMonitor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIPMonitor.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1702,13 +2124,9 @@ 15A509A306C2518F001F0AB7 /* net.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = net.c; sourceTree = ""; }; 15A509A406C2518F001F0AB7 /* net.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = net.h; sourceTree = ""; }; 15A5A26A0D5B94190087BDA0 /* SystemConfiguration.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SystemConfiguration.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 15A6F7C30A4B266D00B907EA /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; 15AAA7F1108E310700C2A607 /* VPNTunnelPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPNTunnelPrivate.h; sourceTree = ""; }; 15AAA7F2108E310700C2A607 /* VPNTunnel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPNTunnel.h; sourceTree = ""; }; 15AAA7F3108E310700C2A607 /* VPNTunnel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNTunnel.c; sourceTree = ""; }; - 15AB751916EBFF3400FAA8CE /* libSCNetworkReachability_sim.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSCNetworkReachability_sim.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 15AB751F16EBFF8A00FAA8CE /* SCNetworkReachability.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCNetworkReachability.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - 15AC2D8816C574FE00340E28 /* libcupolicy.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcupolicy.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.Internal.sdk/usr/lib/libcupolicy.dylib; sourceTree = DEVELOPER_DIR; }; 15AD7A380670A85900BFE03C /* SCNetworkConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCNetworkConfiguration.h; sourceTree = ""; }; 15AD7A390670A85900BFE03C /* SCNetworkConfigurationInternal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SCNetworkConfigurationInternal.c; sourceTree = ""; }; 15AD7A3A0670A85900BFE03C /* SCNetworkConfigurationInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCNetworkConfigurationInternal.h; sourceTree = ""; }; @@ -1723,10 +2141,7 @@ 15B73F0D05FD1B670096477F /* dnsinfo_server.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dnsinfo_server.c; path = dnsinfo/dnsinfo_server.c; sourceTree = ""; }; 15B73F0E05FD1B670096477F /* dnsinfo_server.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dnsinfo_server.h; path = dnsinfo/dnsinfo_server.h; sourceTree = ""; }; 15BAA32207F0699A00D9EC95 /* libbsm.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbsm.dylib; path = /usr/lib/libbsm.dylib; sourceTree = ""; }; - 15C330B7134B92780028E36B /* SCNetworkReachabilityServer_client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SCNetworkReachabilityServer_client.c; path = reachability/SCNetworkReachabilityServer_client.c; sourceTree = ""; }; - 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SCNetworkReachabilityServer_server.c; path = reachability/SCNetworkReachabilityServer_server.c; sourceTree = ""; }; 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCNetworkReachabilityInternal.h; sourceTree = ""; }; - 15CAEF381712690500367CE1 /* libcupolicy.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcupolicy.dylib; path = Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/local/lib/libcupolicy.dylib; sourceTree = DEVELOPER_DIR; }; 15CB691305C0722B0099E85F /* SystemConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemConfiguration.h; sourceTree = ""; }; 15CB691505C0722B0099E85F /* SCPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCPrivate.h; sourceTree = ""; }; 15CB691705C0722B0099E85F /* SCDPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCDPlugin.h; sourceTree = ""; }; @@ -1748,9 +2163,6 @@ 15CB693905C0722B0099E85F /* SCValidation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCValidation.h; sourceTree = ""; }; 15CB693D05C0722B0099E85F /* DHCPClientPreferences.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DHCPClientPreferences.h; sourceTree = ""; }; 15CB693F05C0722B0099E85F /* SCDynamicStoreCopyDHCPInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCDynamicStoreCopyDHCPInfo.h; sourceTree = ""; }; - 15CB694105C0722B0099E85F /* moh_msg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = moh_msg.h; sourceTree = ""; }; - 15CB694305C0722B0099E85F /* moh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = moh.h; sourceTree = ""; }; - 15CB694505C0722B0099E85F /* DeviceOnHold.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceOnHold.h; sourceTree = ""; }; 15CB694905C0722B0099E85F /* dy_framework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dy_framework.h; sourceTree = ""; }; 15CB695005C0722B0099E85F /* SCD.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCD.c; sourceTree = ""; }; 15CB695205C0722B0099E85F /* SCDKeys.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDKeys.c; sourceTree = ""; }; @@ -1770,7 +2182,6 @@ 15CB697605C0722B0099E85F /* SCDNotifierWait.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDNotifierWait.c; sourceTree = ""; }; 15CB697805C0722B0099E85F /* SCDNotifierInformViaCallback.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDNotifierInformViaCallback.c; sourceTree = ""; }; 15CB697C05C0722B0099E85F /* SCDNotifierInformViaFD.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDNotifierInformViaFD.c; sourceTree = ""; }; - 15CB697E05C0722B0099E85F /* SCDNotifierInformViaSignal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDNotifierInformViaSignal.c; sourceTree = ""; }; 15CB698005C0722B0099E85F /* SCDNotifierCancel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDNotifierCancel.c; sourceTree = ""; }; 15CB698205C0722B0099E85F /* SCDSnapshot.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCDSnapshot.c; sourceTree = ""; }; 15CB698405C0722B0099E85F /* SCP.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCP.c; sourceTree = ""; }; @@ -1793,8 +2204,6 @@ 15CB69A605C0722B0099E85F /* SCNetworkReachability.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = SCNetworkReachability.c; sourceTree = ""; }; 15CB69A805C0722B0099E85F /* SCProxies.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCProxies.c; sourceTree = ""; }; 15CB69AC05C0722B0099E85F /* DHCP.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = DHCP.c; sourceTree = ""; }; - 15CB69AE05C0722B0099E85F /* moh.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = moh.c; sourceTree = ""; }; - 15CB69B005C0722B0099E85F /* DeviceOnHold.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = DeviceOnHold.c; sourceTree = ""; }; 15CB69B205C0722B0099E85F /* LinkConfiguration.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = LinkConfiguration.c; sourceTree = ""; }; 15CB69B405C0722B0099E85F /* dy_framework.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dy_framework.c; sourceTree = ""; }; 15CB69B605C0722B0099E85F /* VLANConfiguration.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = VLANConfiguration.c; sourceTree = ""; }; @@ -1803,14 +2212,12 @@ 15CB69CF05C0722B0099E85F /* configd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = configd.h; sourceTree = ""; }; 15CB69D105C0722B0099E85F /* _SCD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _SCD.h; sourceTree = ""; }; 15CB69D305C0722B0099E85F /* configd_server.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = configd_server.h; sourceTree = ""; }; - 15CB69D505C0722B0099E85F /* notify_server.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = notify_server.h; sourceTree = ""; }; 15CB69D705C0722B0099E85F /* plugin_support.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = plugin_support.h; sourceTree = ""; }; 15CB69D905C0722B0099E85F /* session.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = session.h; sourceTree = ""; }; 15CB69DB05C0722B0099E85F /* pattern.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pattern.h; sourceTree = ""; }; 15CB69E005C0722B0099E85F /* configd.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = configd.m; sourceTree = ""; }; 15CB69E205C0722B0099E85F /* _SCD.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _SCD.c; sourceTree = ""; }; 15CB69E405C0722B0099E85F /* configd_server.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = configd_server.c; sourceTree = ""; }; - 15CB69E605C0722B0099E85F /* notify_server.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = notify_server.c; sourceTree = ""; }; 15CB69E805C0722B0099E85F /* plugin_support.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = plugin_support.c; sourceTree = ""; }; 15CB69EA05C0722B0099E85F /* session.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = session.c; sourceTree = ""; }; 15CB69EC05C0722B0099E85F /* pattern.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = pattern.c; sourceTree = ""; }; @@ -1828,7 +2235,6 @@ 15CB6A0C05C0722B0099E85F /* _notifychanges.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _notifychanges.c; sourceTree = ""; }; 15CB6A0E05C0722B0099E85F /* _notifyviaport.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _notifyviaport.c; sourceTree = ""; }; 15CB6A1005C0722B0099E85F /* _notifyviafd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _notifyviafd.c; sourceTree = ""; }; - 15CB6A1205C0722B0099E85F /* _notifyviasignal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _notifyviasignal.c; sourceTree = ""; }; 15CB6A1405C0722B0099E85F /* _notifycancel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _notifycancel.c; sourceTree = ""; }; 15CB6A1605C0722B0099E85F /* _snapshot.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = _snapshot.c; sourceTree = ""; }; 15CB6A2005C0722B0099E85F /* configd.8 */ = {isa = PBXFileReference; explicitFileType = text.man; path = configd.8; sourceTree = ""; }; @@ -1859,7 +2265,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 = ""; }; - 15D9DCFA10DD90A1004E545D /* AppWorkaround.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AppWorkaround.plist; 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; }; 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 = ""; }; 15DAF2D908466D4900D1B2BD /* SCHelper_server.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SCHelper_server.c; path = helper/SCHelper_server.c; sourceTree = ""; }; @@ -1873,13 +2282,22 @@ 15DC346E0711D49400A3311C /* net_set.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = net_set.h; sourceTree = ""; }; 15E1B05916EBAE3C00E5F06F /* libIPMonitor_sim.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIPMonitor_sim.a; sourceTree = BUILT_PRODUCTS_DIR; }; 15E1B06116EBAE7800E5F06F /* IPMonitor.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPMonitor.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 15E56C5A21939B7B00088C51 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.Internal.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 15E91DBE21893E83001155DC /* SCTest-ObjC-Embedded */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SCTest-ObjC-Embedded"; sourceTree = BUILT_PRODUCTS_DIR; }; + 15E91DD621893EE1001155DC /* SCTest-Swift-Embedded */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SCTest-Swift-Embedded"; sourceTree = BUILT_PRODUCTS_DIR; }; + 15EF89B121894636003B2C5C /* SCTest-ObjC-EmbeddedSimulator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SCTest-ObjC-EmbeddedSimulator"; sourceTree = BUILT_PRODUCTS_DIR; }; + 15EF89BC21894665003B2C5C /* SCTest-Swift-EmbeddedSimulator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SCTest-Swift-EmbeddedSimulator"; 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 = ""; }; 15FBB54E17D7899C0035D752 /* Info-EmbeddedSimulator.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-EmbeddedSimulator.plist"; sourceTree = ""; }; - 15FBB54F17D789B50035D752 /* Info-EmbeddedSimulator.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-EmbeddedSimulator.plist"; path = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; sourceTree = ""; }; 15FBB55017D78A780035D752 /* update-mach-services */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "update-mach-services"; sourceTree = ""; }; 15FC12F20CCEA4F00013872C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SCMonitor/Info.plist; sourceTree = ""; }; 15FC130A0CCEA59E0013872C /* monitor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = monitor.c; path = SCMonitor/monitor.c; sourceTree = ""; }; - 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = SimulatorSupport.xcconfig; path = AppleInternal/XcodeConfig/SimulatorSupport.xcconfig; sourceTree = DEVELOPER_DIR; }; 15FD72970754DA2B001CC321 /* InterfaceNamer.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InterfaceNamer.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 15FD72A50754DA4C001CC321 /* IPMonitor.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPMonitor.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 15FD72B50754DA69001CC321 /* LinkConfiguration.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LinkConfiguration.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1888,35 +2306,96 @@ 15FD743E0754DE7A001CC321 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BridgeConfiguration.c; sourceTree = ""; }; 15FEE80D0CCFD341001312F9 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; - 15FEE8160CD03CA3001312F9 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = SCMonitor/English.lproj/Localizable.strings; sourceTree = ""; }; 15FF5C290CDF770500EEC8AA /* com.apple.SCHelper.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.SCHelper.plist; path = helper/com.apple.SCHelper.plist; sourceTree = ""; }; 23C1E2B4062DD2C700835B54 /* pppcontroller_types.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = pppcontroller_types.h; path = usr/local/include/ppp/pppcontroller_types.h; sourceTree = SDKROOT; }; 23C1E2B8062DD45900835B54 /* pppcontroller.defs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.mig; name = pppcontroller.defs; path = SystemConfiguration.fproj/pppcontroller.defs; sourceTree = ""; }; 23C1E2BE062DD5DB00835B54 /* pppcontroller.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pppcontroller.h; path = configd.build/SystemConfiguration.framework.build/DerivedSources/pppcontroller.h; sourceTree = BUILT_PRODUCTS_DIR; }; 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCNetworkMigration.c; sourceTree = ""; }; + 720985431C580D9F00966D30 /* network_config_agent_info_priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network_config_agent_info_priv.h; path = nwi/network_config_agent_info_priv.h; sourceTree = ""; }; + 72499BA31AC9B7AB0090C49F /* get-network-info */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "get-network-info"; sourceTree = SOURCE_ROOT; }; + 72573D261D667372004975AD /* sctest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 72573D281D667372004975AD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 72573D2D1D6673B6004975AD /* SCTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTest.m; sourceTree = ""; }; + 72573D2F1D6673C6004975AD /* SCTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCTest.h; sourceTree = ""; }; + 72573D301D6675AF004975AD /* SCTestUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCTestUtils.h; sourceTree = ""; }; + 72573D311D667686004975AD /* SCTestUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestUtils.m; sourceTree = ""; }; + 72573D331D66800C004975AD /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 72573D361D668B3C004975AD /* genSCTestOptions.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = genSCTestOptions.c; path = sctest/genSCTestOptions.c; sourceTree = SOURCE_ROOT; }; + 72573D381D6692BA004975AD /* SCTestOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCTestOptions.h; sourceTree = ""; }; + 72573D391D6692BA004975AD /* SCTestOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestOptions.m; sourceTree = ""; }; + 72573D3B1D6695B4004975AD /* SCTestDynamicStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestDynamicStore.m; sourceTree = ""; }; + 72573D3D1D669AA6004975AD /* SCTestPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestPreferences.m; sourceTree = ""; }; + 72573D3F1D67B2BE004975AD /* SCTestUnitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestUnitTest.m; sourceTree = ""; }; + 72573D411D6B7989004975AD /* SCTestConfigAgents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestConfigAgents.m; sourceTree = ""; }; + 72573D431D6B9E72004975AD /* sctest-entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "sctest-entitlements.plist"; path = "sctest/sctest-entitlements.plist"; sourceTree = SOURCE_ROOT; }; + 725CB7541BF439C6000C05A8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 725CB7571BF51476000C05A8 /* configAgentDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = configAgentDefines.h; sourceTree = ""; }; + 726DB2F11BEA80E5001B2C6C /* config_agent_info.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config_agent_info.c; path = "config-agent-info/config_agent_info.c"; sourceTree = ""; }; + 726DB2F21BEA80E5001B2C6C /* config_agent_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config_agent_info.h; path = "config-agent-info/config_agent_info.h"; sourceTree = ""; }; + 7271EA321D76600B0055B1AA /* sctest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 728015751BE16833009F4F60 /* agent-monitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "agent-monitor.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 728015781BE16833009F4F60 /* configAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = configAgent.h; sourceTree = ""; }; + 728015791BE16833009F4F60 /* configAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = configAgent.m; sourceTree = ""; }; + 7280157A1BE16833009F4F60 /* controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = controller.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 7280157B1BE16833009F4F60 /* controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = controller.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 7280157C1BE16833009F4F60 /* dnsAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dnsAgent.h; sourceTree = ""; }; + 7280157D1BE16833009F4F60 /* dnsAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = dnsAgent.m; sourceTree = ""; }; + 7280157F1BE16833009F4F60 /* proxyAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = proxyAgent.h; sourceTree = ""; }; + 728015801BE16833009F4F60 /* proxyAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = proxyAgent.m; sourceTree = ""; }; + 728015931BE1697E009F4F60 /* agent-monitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "agent-monitor.h"; sourceTree = ""; }; + 728015951BE16B6C009F4F60 /* Network.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Network.framework; path = System/Library/PrivateFrameworks/Network.framework; sourceTree = SDKROOT; }; + 728015961BE16B6C009F4F60 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; + 728E0E951D70229A00E0613A /* SCTestReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCTestReachability.m; sourceTree = ""; }; 72B43726113C7BFC00EBF1B6 /* nc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nc.h; sourceTree = ""; }; 72B43727113C7BFC00EBF1B6 /* nc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nc.c; sourceTree = ""; }; + 72C12CAA1D6E9ED4000EE61C /* npt_configd.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = npt_configd.plist; sourceTree = ""; }; + 72D3E6591AE6E8A900DB4C69 /* Modules */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Modules; path = SystemConfiguration.fproj/Modules; sourceTree = SOURCE_ROOT; }; + 72D3E65E1AE6EA3A00DB4C69 /* SCTest-Swift */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SCTest-Swift"; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; + 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 = ""; }; + C43F873A226D3A18000E8CE5 /* entitlements.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = entitlements.plist; 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 = ""; }; + C469CB2720EED63C00A7AD35 /* StateDumpParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StateDumpParser.h; sourceTree = ""; }; + C469CB2820EED6C100A7AD35 /* StateDumpParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StateDumpParser.m; sourceTree = ""; }; + C496A09420F909BD0098B3E5 /* IPConfigurationParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPConfigurationParser.h; sourceTree = ""; }; + C496A09520F909FF0098B3E5 /* IPConfigurationParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IPConfigurationParser.m; sourceTree = ""; }; + C4C5FB0020EA98AC00F35614 /* KernelEventMonitorParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KernelEventMonitorParser.h; sourceTree = ""; }; + C4C5FB0120EA992700F35614 /* SCLogParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCLogParser.h; sourceTree = ""; }; + C4C5FB0220EA9A5A00F35614 /* KernelEventMonitorParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KernelEventMonitorParser.m; sourceTree = ""; }; + C4C5FB0420EA9B6F00F35614 /* SCLogParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SCLogParser.m; sourceTree = ""; }; + C4C5FB0720EAB0BC00F35614 /* InterfaceNamerParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InterfaceNamerParser.h; sourceTree = ""; }; + C4C5FB0820EAB0DD00F35614 /* InterfaceNamerParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InterfaceNamerParser.m; sourceTree = ""; }; + C4C5FB0A20EABD5F00F35614 /* IPMonitorParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorParser.h; sourceTree = ""; }; + C4C5FB0B20EABD9E00F35614 /* IPMonitorParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IPMonitorParser.m; sourceTree = ""; }; + C4C5FB0D20EAC01900F35614 /* PreferencesMonitorParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PreferencesMonitorParser.h; sourceTree = ""; }; + C4C5FB0E20EAC05200F35614 /* PreferencesMonitorParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PreferencesMonitorParser.m; sourceTree = ""; }; C4CDB8111631933400819B44 /* VPNFlow.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = VPNFlow.h; sourceTree = ""; tabWidth = 4; }; - C4CDB8121631933400819B44 /* VPNFlowPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VPNFlowPrivate.h; sourceTree = ""; }; 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 = ""; }; D61AAEAD1522C99C0066B003 /* scprefs_observer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scprefs_observer.c; sourceTree = ""; }; D61AAEB41522C9BD0066B003 /* scprefs_observer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scprefs_observer.h; sourceTree = ""; }; - D68AD25F159BCD5900D4F1BE /* com.apple.networking.IPMonitor */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = com.apple.networking.IPMonitor; sourceTree = ""; }; - D6986A75136891120091C931 /* network_information_priv.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = network_information_priv.c; path = nwi/network_information_priv.c; sourceTree = ""; }; - D6986A761368911E0091C931 /* network_information_priv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = network_information_priv.h; path = nwi/network_information_priv.h; sourceTree = ""; }; + D6986A75136891120091C931 /* network_state_information_priv.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = network_state_information_priv.c; path = nwi/network_state_information_priv.c; sourceTree = ""; }; + D6986A761368911E0091C931 /* network_state_information_priv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = network_state_information_priv.h; path = nwi/network_state_information_priv.h; sourceTree = ""; }; D6986A77136891300091C931 /* network_information.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = network_information.c; path = nwi/network_information.c; sourceTree = ""; }; D6986A781368913C0091C931 /* network_information.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = network_information.h; path = nwi/network_information.h; sourceTree = ""; }; D6AEB89815AE4446009F2FAF /* ip_plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ip_plugin.h; sourceTree = ""; }; + F90E43542012AD3900EF27C4 /* SCNetworkInterfaceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCNetworkInterfaceProvider.h; sourceTree = ""; }; + F90E43552012AD4500EF27C4 /* SCNetworkInterfaceProvider.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SCNetworkInterfaceProvider.c; sourceTree = ""; }; 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 = ""; }; + F963400E20FE8E1D00F1E1F1 /* AwdMetadata-0x81-IPMonitor.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = "AwdMetadata-0x81-IPMonitor.bin"; sourceTree = ""; }; + F97289D122652CE600080596 /* serviceIDNumber.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = serviceIDNumber.c; sourceTree = ""; }; + F97289D222652CE600080596 /* serviceIDNumber.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = serviceIDNumber.h; 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 = ""; }; @@ -1927,28 +2406,36 @@ 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 */ - 151F5D980CCE98E50093AC3B /* Frameworks */ = { + 151D06061EC1491600E02E48 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 15FC13180CCF74740013872C /* CoreFoundation.framework in Frameworks */, - 1559C4490D349A4E0098FD59 /* SystemConfiguration.framework in Frameworks */, - 15792B9B0DA2C190008DDED9 /* IOKit.framework in Frameworks */, - 15FEE80E0CCFD341001312F9 /* ApplicationServices.framework in Frameworks */, - 150D7E1E0D16DC6C00AF4BED /* Security.framework in Frameworks */, + 1505A8D81EC3E1470089FC6A /* Foundation.framework in Frameworks */, + 154FD13B1EC4062C00EDA8B9 /* SystemConfiguration.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1521400B0E93FF8600DACD2C /* Frameworks */ = { + 151F5D980CCE98E50093AC3B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1521400C0E93FFF500DACD2C /* CoreFoundation.framework in Frameworks */, - 152140580E93FFFC00DACD2C /* SystemConfiguration.framework in Frameworks */, - 15943D440E94081800B87535 /* IOKit.framework in Frameworks */, + 15FC13180CCF74740013872C /* CoreFoundation.framework in Frameworks */, + 1559C4490D349A4E0098FD59 /* SystemConfiguration.framework in Frameworks */, + 15792B9B0DA2C190008DDED9 /* IOKit.framework in Frameworks */, + 15FEE80E0CCFD341001312F9 /* ApplicationServices.framework in Frameworks */, + 150D7E1E0D16DC6C00AF4BED /* Security.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1982,22 +2469,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 156CA47C0EF853BB00C59A18 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 156CA47D0EF853BB00C59A18 /* CoreFoundation.framework in Frameworks */, - 156CA47E0EF853BB00C59A18 /* SystemConfiguration.framework in Frameworks */, - 156CA47F0EF853BB00C59A18 /* IOKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 1572C5230CFB55B400E2776E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1572C5240CFB55B400E2776E /* CoreFoundation.framework in Frameworks */, B03FEFBB16382C1300A1B88F /* libbsm.dylib in Frameworks */, + 15D92BA31FFC647800DF2632 /* libnetwork.tbd in Frameworks */, + 158FC7951FE08CC000B2493C /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2010,9 +2489,7 @@ 15732A9E16EA503200F3AC4C /* IOKit.framework in Frameworks */, 15732A9F16EA503200F3AC4C /* Security.framework in Frameworks */, 15732AA016EA503200F3AC4C /* libbsm.dylib in Frameworks */, - 15AB752D16EC2AE900FAA8CE /* libIPMonitor_sim.a in Frameworks */, - 15AB752E16EC2AE900FAA8CE /* libSCNetworkReachability_sim.a in Frameworks */, - 15D3083316F3EB0700014F82 /* libSimulatorSupport_sim.a in Frameworks */, + 15D92B9E1FFC61F400DF2632 /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2063,18 +2540,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 */, - 158317520CFB80A1006F62B9 /* libKernelEventMonitor.a in Frameworks */, - 158317530CFB80A1006F62B9 /* libInterfaceNamer.a in Frameworks */, - 158317540CFB80A1006F62B9 /* libIPMonitor.a in Frameworks */, - 158317550CFB80A1006F62B9 /* libLinkConfiguration.a in Frameworks */, - 158317570CFB80A1006F62B9 /* libPreferencesMonitor.a in Frameworks */, - 1528C0171357465900691881 /* libSCNetworkReachability.a in Frameworks */, + 1562569120856CCC00FCD61E /* liblockdown.dylib in Frameworks */, + 15D92BA51FFC64DB00DF2632 /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2093,18 +2571,18 @@ 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 */, 159D54CC07529FFF004F8947 /* CoreFoundation.framework in Frameworks */, 1559C44A0D349A4E0098FD59 /* SystemConfiguration.framework in Frameworks */, 152439E8180399D800D91708 /* CoreWLAN.framework in Frameworks */, 1543636B0752D03C00A8EC6C /* IOKit.framework in Frameworks */, D6623873120B2AA7007F8E95 /* Security.framework in Frameworks */, 15BAA32307F0699A00D9EC95 /* libbsm.dylib in Frameworks */, - 159D54CE07529FFF004F8947 /* libKernelEventMonitor.a in Frameworks */, - 159D54D007529FFF004F8947 /* libInterfaceNamer.a in Frameworks */, - 159D54D107529FFF004F8947 /* libIPMonitor.a in Frameworks */, - 159D54D207529FFF004F8947 /* libLinkConfiguration.a in Frameworks */, - 159D54D307529FFF004F8947 /* libPreferencesMonitor.a in Frameworks */, - 1528C019135746BB00691881 /* libSCNetworkReachability.a in Frameworks */, + 78C951FE1F797B44000EA36B /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2114,6 +2592,8 @@ files = ( 15A5A2630D5B94190087BDA0 /* CoreFoundation.framework in Frameworks */, B0FEF41A164406F400174B99 /* libbsm.dylib in Frameworks */, + 15D92BA21FFC646600DF2632 /* libnetwork.tbd in Frameworks */, + 158FC7931FE08B3900B2493C /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2130,40 +2610,136 @@ files = ( 15DAD6AE07591A1A0084A6ED /* CoreFoundation.framework in Frameworks */, B03FEFBA16382C0700A1B88F /* libbsm.dylib in Frameworks */, + 15D92BA41FFC648900DF2632 /* libnetwork.tbd in Frameworks */, 15FBB54C17D6834C0035D752 /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; + 15E91DB821893E83001155DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E91DB921893E83001155DC /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15E91DD121893EE1001155DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E56C5B21939B7B00088C51 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15EF89AB21894636003B2C5C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15EF89AC21894636003B2C5C /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15EF89B721894665003B2C5C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E56C5C21939B8E00088C51 /* Foundation.framework in Frameworks */, + 15E56C552193840000088C51 /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15F742DE1EC6370000DA2E7A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15F742DF1EC6370000DA2E7A /* Foundation.framework in Frameworks */, + 15F742E01EC6370000DA2E7A /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15F742EB1EC638D100DA2E7A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15F742EC1EC638D100DA2E7A /* Foundation.framework in Frameworks */, + 15F742ED1EC638D100DA2E7A /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72573D231D667372004975AD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 72573D441D6BA051004975AD /* Network.framework in Frameworks */, + 72573D351D6680AA004975AD /* SystemConfiguration.framework in Frameworks */, + 728E0E971D70348D00E0613A /* NetworkExtension.framework in Frameworks */, + 15D92B9F1FFC640200DF2632 /* libnetwork.tbd in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7271EA271D76600B0055B1AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7271EA291D76600B0055B1AA /* Network.framework in Frameworks */, + 7271EA2A1D76600B0055B1AA /* SystemConfiguration.framework in Frameworks */, + 7271EA2B1D76600B0055B1AA /* NetworkExtension.framework in Frameworks */, + 15D92BA11FFC641500DF2632 /* libnetwork.tbd in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72D3E65B1AE6EA3900DB4C69 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E56C5921939B6400088C51 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72D3E6661AE6EAF600DB4C69 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 150EC0FF21016BFD0047F4BF /* SystemConfiguration.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C4666C6E206ED01800247AB6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C4666C72206ED01800247AB6 /* EventFactory.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 151F5DA80CCE995D0093AC3B /* SCMonitor */ = { + 1513C3541F1849920022398F /* Build Support */ = { isa = PBXGroup; children = ( - 15FC130A0CCEA59E0013872C /* monitor.c */, - 15FC12F20CCEA4F00013872C /* Info.plist */, - 15FEE8180CD03CBB001312F9 /* Localizable.strings */, + 1513C3551F1849B50022398F /* update-sanitizer-dylib-references */, ); - name = SCMonitor; + name = "Build Support"; sourceTree = ""; }; - 1528BFDA13572FC200691881 /* SCNetworkReachability */ = { + 151D060C1EC14C3900E02E48 /* Logging */ = { isa = PBXGroup; children = ( - 1528BFE91357312E00691881 /* Info.plist */, - 15FBB54F17D789B50035D752 /* Info-EmbeddedSimulator.plist */, + 158FC78C1FDB566300B2493C /* liblog_SystemConfiguration_internal.h */, + 151D060D1EC14C6700E02E48 /* liblog_SystemConfiguration.m */, ); - name = SCNetworkReachability; + name = Logging; sourceTree = ""; }; - 1531D3D90E93E6AA00248432 /* Logger */ = { + 151F5DA80CCE995D0093AC3B /* SCMonitor */ = { isa = PBXGroup; children = ( - 1531D3DB0E93E6DA00248432 /* logger.c */, - 1531D3DA0E93E6DA00248432 /* Info.plist */, - 156CA48D0EF853BB00C59A18 /* Info-Embedded.plist */, + 15FC130A0CCEA59E0013872C /* monitor.c */, + 15FC12F20CCEA4F00013872C /* Info.plist */, + 15FEE8180CD03CBB001312F9 /* Localizable.strings */, ); - name = Logger; + name = SCMonitor; sourceTree = ""; }; 154083530D5B824400E07907 /* MacOSX */ = { @@ -2212,11 +2788,8 @@ 1559C4520D349A4E0098FD59 /* KernelEventMonitor.bundle */, 157A852E0D56C91100B6F1A0 /* libLinkConfiguration.a */, 1559C4530D349A4E0098FD59 /* LinkConfiguration.bundle */, - 156CA4850EF853BB00C59A18 /* Logger.bundle */, 157A85440D56C96F00B6F1A0 /* libPreferencesMonitor.a */, 1559C4540D349A4E0098FD59 /* PreferencesMonitor.bundle */, - 1528BFF713573FEE00691881 /* libSCNetworkReachability.a */, - 1528BFFE13573FF500691881 /* SCNetworkReachability.bundle */, ); name = Plugins; sourceTree = ""; @@ -2272,6 +2845,16 @@ name = Sources; sourceTree = ""; }; + 155F49851C864ED400E47D08 /* QoSMarking */ = { + isa = PBXGroup; + children = ( + 155F49A51C864FE500E47D08 /* qos-marking.m */, + 155F49A41C864FE500E47D08 /* Info.plist */, + 1524FE1920619BAF0010091E /* Info-Embedded.plist */, + ); + name = QoSMarking; + sourceTree = ""; + }; 1582B36B05FD1A4D009C2750 /* DNSConfiguration */ = { isa = PBXGroup; children = ( @@ -2287,6 +2870,7 @@ 15B73F0905FD1B670096477F /* dnsinfo.h */, 1532629006281C9D00B1C10C /* dnsinfo_create.h */, 159C9A8D17399609003DDA1D /* dnsinfo_internal.h */, + 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */, 15B73F0C05FD1B670096477F /* dnsinfo_private.h */, 15B73F0E05FD1B670096477F /* dnsinfo_server.h */, ); @@ -2315,11 +2899,8 @@ 15828AE70753B5F900AD4710 /* KernelEventMonitor.bundle */, 159D53F307528C79004F8947 /* libLinkConfiguration.a */, 15FD72B50754DA69001CC321 /* LinkConfiguration.bundle */, - 15213FFA0E93E9F500DACD2C /* Logger.bundle */, 159D53FA07528C95004F8947 /* libPreferencesMonitor.a */, 15FD72C90754DA7E001CC321 /* PreferencesMonitor.bundle */, - 1528BFE21357305400691881 /* libSCNetworkReachability.a */, - 1528BFE81357309800691881 /* SCNetworkReachability.bundle */, ); name = Plugins; sourceTree = ""; @@ -2342,9 +2923,8 @@ 159D53AC07528B36004F8947 /* InterfaceNamer */, 159D53AF07528B36004F8947 /* KernelEventMonitor */, 159D53C007528B36004F8947 /* LinkConfiguration */, - 1531D3D90E93E6AA00248432 /* Logger */, 159D53C207528B36004F8947 /* PreferencesMonitor */, - 1528BFDA13572FC200691881 /* SCNetworkReachability */, + 155F49851C864ED400E47D08 /* QoSMarking */, 15D3080E16F3E49F00014F82 /* SimulatorSupport */, ); name = Plugins; @@ -2353,19 +2933,23 @@ 159D53A607528B36004F8947 /* IPMonitor */ = { isa = PBXGroup; children = ( + 728015741BE1681B009F4F60 /* AgentMonitor */, D6AEB89815AE4446009F2FAF /* ip_plugin.h */, 159D53A707528B36004F8947 /* ip_plugin.c */, 155D22380AF13A7300D52ED0 /* dns-configuration.h */, 159D53AA07528B36004F8947 /* dns-configuration.c */, - 1575FD2512CD15C60003D86E /* proxy-configuration.c */, + 15812A2E1EA5540B001CF384 /* nat64-configuration.h */, + 15812A2D1EA5540B001CF384 /* nat64-configuration.c */, 1575FD2612CD15C60003D86E /* proxy-configuration.h */, + 1575FD2512CD15C60003D86E /* proxy-configuration.c */, + F97289D122652CE600080596 /* serviceIDNumber.c */, + F97289D222652CE600080596 /* serviceIDNumber.h */, 155D22390AF13A7300D52ED0 /* set-hostname.h */, 159D53AB07528B36004F8947 /* set-hostname.c */, 155D223A0AF13A7300D52ED0 /* smb-configuration.h */, 1572EB7A0A506D3B00D02459 /* smb-configuration.c */, 15FD743E0754DE7A001CC321 /* Info.plist */, 15FBB54E17D7899C0035D752 /* Info-EmbeddedSimulator.plist */, - D68AD25F159BCD5900D4F1BE /* com.apple.networking.IPMonitor */, ); name = IPMonitor; path = Plugins/IPMonitor; @@ -2423,10 +3007,11 @@ 159D53C907528B36004F8947 /* common */ = { isa = PBXGroup; children = ( - F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */, + 15FB1F891E27E9A000B4F809 /* InterfaceNamerControlPrefs.h */, + 15FB1F881E27E9A000B4F809 /* InterfaceNamerControlPrefs.c */, F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */, - 159D53CA07528B36004F8947 /* cache.c */, - 159D53CB07528B36004F8947 /* cache.h */, + F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */, + 1572AA8B1D8234500021E093 /* plugin_shared.h */, ); name = common; path = Plugins/common; @@ -2435,12 +3020,14 @@ 15B534AD14BE778800EA6522 /* libsystem_configuration */ = { isa = PBXGroup; children = ( + 158FC77A1FDAD9BC00B2493C /* libSystemConfiguration_internal.h */, 153338BB14BE7978004FCE22 /* libSystemConfiguration_client.h */, 153338BA14BE7978004FCE22 /* libSystemConfiguration_client.c */, 1596A7B014EDB73D00798C39 /* libSystemConfiguration_server.h */, 1596A7AF14EDB73D00798C39 /* libSystemConfiguration_server.c */, 1582B36B05FD1A4D009C2750 /* DNSConfiguration */, D6986A70136890B60091C931 /* NetworkInformation */, + 726DB2F01BEA8075001B2C6C /* ConfigAgentInformation */, ); name = libsystem_configuration; sourceTree = ""; @@ -2448,12 +3035,13 @@ 15B6861D0678B61900FF4023 /* Supporting Files */ = { isa = PBXGroup; children = ( - 15D9DCFA10DD90A1004E545D /* AppWorkaround.plist */, 15A6F7C20A4B266D00B907EA /* Localizable.strings */, 15B686220678B65C00FF4023 /* NetworkConfiguration.plist */, 1577253606EFBF3100D7B52B /* NetworkInterface.strings */, + 158D6D871C974DBA00A08E78 /* com.apple.SystemConfiguration.plist */, 15CFC229068B222F00123568 /* get-mobility-info */, - 153393E20D34994100FE74E7 /* update-headers */, + 72499BA31AC9B7AB0090C49F /* get-network-info */, + 153393E20D34994100FE74E7 /* restore-temporary-headers */, ); name = "Supporting Files"; sourceTree = ""; @@ -2472,6 +3060,7 @@ children = ( 15CB693705C0722B0099E85F /* SCNetworkReachability.h */, 15C330D0134B95AA0028E36B /* SCNetworkReachabilityInternal.h */, + 152EC34B1EE1B10200A1D27B /* SCNetworkReachabilityLogging.h */, ); name = Headers; sourceTree = ""; @@ -2481,8 +3070,6 @@ children = ( 15CB69A205C0722B0099E85F /* SCNetwork.c */, 15CB69A605C0722B0099E85F /* SCNetworkReachability.c */, - 15C330B7134B92780028E36B /* SCNetworkReachabilityServer_client.c */, - 15C330BB134B92780028E36B /* SCNetworkReachabilityServer_server.c */, ); name = Sources; sourceTree = ""; @@ -2518,6 +3105,7 @@ 15CB695805C0722B0099E85F /* SCDOpen.c */, 15CB695E05C0722B0099E85F /* SCDList.c */, 15CB696005C0722B0099E85F /* SCDAdd.c */, + 1542400421626DD300C7CE8B /* SCDCache.c */, 15CB696405C0722B0099E85F /* SCDGet.c */, 15CB696605C0722B0099E85F /* SCDSet.c */, 15CB696805C0722B0099E85F /* SCDRemove.c */, @@ -2529,7 +3117,6 @@ 15CB697605C0722B0099E85F /* SCDNotifierWait.c */, 15CB697805C0722B0099E85F /* SCDNotifierInformViaCallback.c */, 15CB697C05C0722B0099E85F /* SCDNotifierInformViaFD.c */, - 15CB697E05C0722B0099E85F /* SCDNotifierInformViaSignal.c */, 15CB698005C0722B0099E85F /* SCDNotifierCancel.c */, 15CB698205C0722B0099E85F /* SCDSnapshot.c */, ); @@ -2640,10 +3227,10 @@ 15C330E0134B9C4C0028E36B /* Headers */ = { isa = PBXGroup; children = ( + 23C1E2BE062DD5DB00835B54 /* pppcontroller.h */, B084710E16385121006C92A3 /* SCNetworkConnectionInternal.h */, 15CB693505C0722B0099E85F /* SCNetworkConnection.h */, 15A2972E0A13C08C009879B3 /* SCNetworkConnectionPrivate.h */, - 23C1E2BE062DD5DB00835B54 /* pppcontroller.h */, ); name = Headers; sourceTree = ""; @@ -2676,7 +3263,6 @@ B0C967F717441F0E00889853 /* SNHelperPrivate.h */, B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */, C4CDB8111631933400819B44 /* VPNFlow.h */, - C4CDB8121631933400819B44 /* VPNFlowPrivate.h */, 159A7513107FEAA400A57EAB /* VPNPrivate.h */, 159A7515107FEAA400A57EAB /* VPNConfiguration.h */, 15AAA7F2108E310700C2A607 /* VPNTunnel.h */, @@ -2688,19 +3274,25 @@ 15CB68FC05C072220099E85F /* configd */ = { isa = PBXGroup; children = ( + 1513C3541F1849920022398F /* Build Support */, 15CB6A8605C072500099E85F /* MiG */, 15CB6A8305C072410099E85F /* Schema */, 15B534AD14BE778800EA6522 /* libsystem_configuration */, + 151D060C1EC14C3900E02E48 /* Logging */, 15CB690705C0722A0099E85F /* SystemConfiguration */, 151F5DA80CCE995D0093AC3B /* SCMonitor */, 15CB69C205C0722B0099E85F /* configd */, - 15CB6A2205C0722B0099E85F /* scselect */, - 15CB6A3705C0722B0099E85F /* scutil */, 159D53A207528B06004F8947 /* Plugins */, F9B7AE5B1862116500C78D18 /* IPMonitorControl */, - 15CB6A6E05C0722B0099E85F /* External Frameworks and Libraries */, + 15CB6A3705C0722B0099E85F /* scutil */, + 15CB6A2205C0722B0099E85F /* scselect */, + 72573D271D667372004975AD /* sctest */, + C4666C73206ED01800247AB6 /* EventFactory */, + 72D3E66A1AE6EAF600DB4C69 /* SCTest-ObjC */, + 72D3E65F1AE6EA3A00DB4C69 /* SCTest-Swift */, 15CB690F05C0722B0099E85F /* Products */, - 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */, + 90507AAE1CE2F55B0067D16B /* Frameworks */, + 15CB6A6E05C0722B0099E85F /* External Frameworks and Libraries */, ); indentWidth = 8; name = configd; @@ -2711,11 +3303,13 @@ 15CB690705C0722A0099E85F /* SystemConfiguration */ = { isa = PBXGroup; children = ( + 72D3E6591AE6E8A900DB4C69 /* Modules */, 15C330D5134B99EF0028E36B /* SCDynamicStore */, 15C330D8134B9A730028E36B /* SCPreferences */, 1547002E084561B4006787CE /* SCHelper */, 15C330DB134B9B8B0028E36B /* SCNetworkConfiguration */, 15C330DE134B9C290028E36B /* SCNetworkConnection */, + F90E43512012ACF900EF27C4 /* SCNetworkInterfaceProvider */, 15C330B4134B91930028E36B /* SCNetworkReachability */, 15C330E1134B9C8E0028E36B /* VPN */, 15CB691205C0722B0099E85F /* Other Headers */, @@ -2735,13 +3329,27 @@ 154083890D5B82A900E07907 /* EmbeddedSimulator */, 15732AAC16EA503300F3AC4C /* configd_sim */, 15732AD516EA511900F3AC4C /* scutil_sim */, - 15732AE416EA6B6700F3AC4C /* libsystem_sim_configuration.dylib */, + 15732AE416EA6B6700F3AC4C /* libsystem_configuration.dylib */, 15E1B05916EBAE3C00E5F06F /* libIPMonitor_sim.a */, 15E1B06116EBAE7800E5F06F /* IPMonitor.bundle */, - 15AB751916EBFF3400FAA8CE /* libSCNetworkReachability_sim.a */, - 15AB751F16EBFF8A00FAA8CE /* SCNetworkReachability.bundle */, 15D3082716F3E4DA00014F82 /* libSimulatorSupport_sim.a */, 15D3082D16F3E4E100014F82 /* SimulatorSupport.bundle */, + 72D3E65E1AE6EA3A00DB4C69 /* SCTest-Swift */, + 72D3E6691AE6EAF600DB4C69 /* SCTest-ObjC */, + 155F498D1C864F1400E47D08 /* libQoSMarking.a */, + 155F49931C864F3700E47D08 /* QoSMarking.bundle */, + 155F499C1C864F4E00E47D08 /* libQoSMarking.a */, + 155F49A21C864F5400E47D08 /* QoSMarking.bundle */, + 72573D261D667372004975AD /* sctest */, + 7271EA321D76600B0055B1AA /* sctest */, + 151D060B1EC1491600E02E48 /* liblog_SystemConfiguration.dylib */, + 15F742E41EC6370000DA2E7A /* liblog_SystemConfiguration.dylib */, + 15F742F11EC638D100DA2E7A /* liblog_SystemConfiguration.dylib */, + C4666C71206ED01800247AB6 /* SystemConfigurationEventFactory.bundle */, + 15E91DBE21893E83001155DC /* SCTest-ObjC-Embedded */, + 15E91DD621893EE1001155DC /* SCTest-Swift-Embedded */, + 15EF89B121894636003B2C5C /* SCTest-ObjC-EmbeddedSimulator */, + 15EF89BC21894665003B2C5C /* SCTest-Swift-EmbeddedSimulator */, ); name = Products; sourceTree = ""; @@ -2749,6 +3357,7 @@ 15CB691205C0722B0099E85F /* Other Headers */ = { isa = PBXGroup; children = ( + 158FC77E1FDAE27900B2493C /* SystemConfigurationInternal.h */, 15D8B2291450D8450090CECF /* SCD.h */, 15CB691305C0722B0099E85F /* SystemConfiguration.h */, 150607DE075A00A300B147BA /* SCSchemaDefinitions.h */, @@ -2760,12 +3369,9 @@ F95B8A450B03E09300993BA3 /* SCNetworkSignaturePrivate.h */, 15CB693905C0722B0099E85F /* SCValidation.h */, 15A1FF3010597F17004C9CC9 /* CaptiveNetwork.h */, - 15CB694505C0722B0099E85F /* DeviceOnHold.h */, 15CB693D05C0722B0099E85F /* DHCPClientPreferences.h */, 15CB694905C0722B0099E85F /* dy_framework.h */, D61AAEB41522C9BD0066B003 /* scprefs_observer.h */, - 15CB694305C0722B0099E85F /* moh.h */, - 15CB694105C0722B0099E85F /* moh_msg.h */, ); name = "Other Headers"; sourceTree = ""; @@ -2785,8 +3391,6 @@ 15CB69A805C0722B0099E85F /* SCProxies.c */, 15A1FF3110597F17004C9CC9 /* CaptiveNetwork.c */, 15CB69AC05C0722B0099E85F /* DHCP.c */, - 15CB69AE05C0722B0099E85F /* moh.c */, - 15CB69B005C0722B0099E85F /* DeviceOnHold.c */, 15CB69B405C0722B0099E85F /* dy_framework.c */, ); name = "Other Sources"; @@ -2809,7 +3413,6 @@ 15CB69CF05C0722B0099E85F /* configd.h */, 15CB69D105C0722B0099E85F /* _SCD.h */, 15CB69D305C0722B0099E85F /* configd_server.h */, - 15CB69D505C0722B0099E85F /* notify_server.h */, 15CB69D705C0722B0099E85F /* plugin_support.h */, 15CB69D905C0722B0099E85F /* session.h */, 15CB69DB05C0722B0099E85F /* pattern.h */, @@ -2823,7 +3426,6 @@ 15CB69E005C0722B0099E85F /* configd.m */, 15CB69E205C0722B0099E85F /* _SCD.c */, 15CB69E405C0722B0099E85F /* configd_server.c */, - 15CB69E605C0722B0099E85F /* notify_server.c */, 15CB69E805C0722B0099E85F /* plugin_support.c */, 15CB69EA05C0722B0099E85F /* session.c */, 15CB69EC05C0722B0099E85F /* pattern.c */, @@ -2841,7 +3443,6 @@ 15CB6A0C05C0722B0099E85F /* _notifychanges.c */, 15CB6A0E05C0722B0099E85F /* _notifyviaport.c */, 15CB6A1005C0722B0099E85F /* _notifyviafd.c */, - 15CB6A1205C0722B0099E85F /* _notifyviasignal.c */, 15CB6A1405C0722B0099E85F /* _notifycancel.c */, 15CB6A1605C0722B0099E85F /* _snapshot.c */, ); @@ -2943,6 +3544,7 @@ isa = PBXGroup; children = ( 15CB6A6A05C0722B0099E85F /* scutil.8 */, + C43F873A226D3A18000E8CE5 /* entitlements.plist */, ); name = "Supporting Files"; sourceTree = ""; @@ -2950,17 +3552,19 @@ 15CB6A6E05C0722B0099E85F /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( + 725CB7541BF439C6000C05A8 /* Foundation.framework */, + 728015961BE16B6C009F4F60 /* NetworkExtension.framework */, + 728015951BE16B6C009F4F60 /* Network.framework */, 15FEE80D0CCFD341001312F9 /* ApplicationServices.framework */, 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */, 152439E7180399D800D91708 /* CoreWLAN.framework */, + 15FA0F73203A379600C7702F /* EventFactory.framework */, 1543636A0752D03C00A8EC6C /* IOKit.framework */, 152439EB180716ED00D91708 /* MobileWiFi.framework */, 1520A3DE0846B2DC0010B584 /* Security.framework */, 15BAA32207F0699A00D9EC95 /* libbsm.dylib */, - 15AC2D8816C574FE00340E28 /* libcupolicy.dylib */, 152CEED0070CF6640050F23C /* libedit.dylib */, 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */, - 15CAEF381712690500367CE1 /* libcupolicy.dylib */, ); name = "External Frameworks and Libraries"; sourceTree = ""; @@ -3005,6 +3609,113 @@ name = "Supporting Files"; sourceTree = ""; }; + 72573D271D667372004975AD /* sctest */ = { + isa = PBXGroup; + children = ( + 72573D361D668B3C004975AD /* genSCTestOptions.c */, + 72573D381D6692BA004975AD /* SCTestOptions.h */, + 72573D391D6692BA004975AD /* SCTestOptions.m */, + 72573D301D6675AF004975AD /* SCTestUtils.h */, + 72573D311D667686004975AD /* SCTestUtils.m */, + 72573D2F1D6673C6004975AD /* SCTest.h */, + 72573D281D667372004975AD /* main.m */, + 72573D2D1D6673B6004975AD /* SCTest.m */, + 72573D3B1D6695B4004975AD /* SCTestDynamicStore.m */, + 72573D3D1D669AA6004975AD /* SCTestPreferences.m */, + 72573D411D6B7989004975AD /* SCTestConfigAgents.m */, + 728E0E951D70229A00E0613A /* SCTestReachability.m */, + 72573D3F1D67B2BE004975AD /* SCTestUnitTest.m */, + 72573D431D6B9E72004975AD /* sctest-entitlements.plist */, + 72C12CAA1D6E9ED4000EE61C /* npt_configd.plist */, + ); + path = sctest; + sourceTree = ""; + }; + 726DB2F01BEA8075001B2C6C /* ConfigAgentInformation */ = { + isa = PBXGroup; + children = ( + 726DB2F11BEA80E5001B2C6C /* config_agent_info.c */, + 726DB2F21BEA80E5001B2C6C /* config_agent_info.h */, + ); + name = ConfigAgentInformation; + sourceTree = ""; + }; + 728015741BE1681B009F4F60 /* AgentMonitor */ = { + isa = PBXGroup; + children = ( + 728015751BE16833009F4F60 /* agent-monitor.m */, + 728015931BE1697E009F4F60 /* agent-monitor.h */, + 728015781BE16833009F4F60 /* configAgent.h */, + 725CB7571BF51476000C05A8 /* configAgentDefines.h */, + 728015791BE16833009F4F60 /* configAgent.m */, + 7280157A1BE16833009F4F60 /* controller.h */, + 7280157B1BE16833009F4F60 /* controller.m */, + 7280157C1BE16833009F4F60 /* dnsAgent.h */, + 7280157D1BE16833009F4F60 /* dnsAgent.m */, + 7280157F1BE16833009F4F60 /* proxyAgent.h */, + 728015801BE16833009F4F60 /* proxyAgent.m */, + ); + name = AgentMonitor; + sourceTree = ""; + }; + 72D3E65F1AE6EA3A00DB4C69 /* SCTest-Swift */ = { + isa = PBXGroup; + children = ( + 72D3E6601AE6EA3A00DB4C69 /* main.swift */, + ); + path = "SCTest-Swift"; + sourceTree = ""; + }; + 72D3E66A1AE6EAF600DB4C69 /* SCTest-ObjC */ = { + isa = PBXGroup; + children = ( + 72D3E66B1AE6EAF600DB4C69 /* test-objC.m */, + ); + path = "SCTest-ObjC"; + sourceTree = ""; + }; + 90507AAE1CE2F55B0067D16B /* Frameworks */ = { + isa = PBXGroup; + children = ( + 15E56C5A21939B7B00088C51 /* Foundation.framework */, + F9D7305020E41DD500521181 /* WirelessDiagnostics.framework */, + F9D7304E20E41D9C00521181 /* ProtocolBuffer.framework */, + 1562569020856CCC00FCD61E /* liblockdown.dylib */, + 15FA0F74203A390E00C7702F /* EventFactory.framework */, + 15D92BA61FFC669000DF2632 /* MobileWiFi.framework */, + 72573D331D66800C004975AD /* SystemConfiguration.framework */, + 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 */, + C4C5FB0120EA992700F35614 /* SCLogParser.h */, + C4C5FB0420EA9B6F00F35614 /* SCLogParser.m */, + C4C5FB0020EA98AC00F35614 /* KernelEventMonitorParser.h */, + C4C5FB0220EA9A5A00F35614 /* KernelEventMonitorParser.m */, + C4C5FB0720EAB0BC00F35614 /* InterfaceNamerParser.h */, + C4C5FB0820EAB0DD00F35614 /* InterfaceNamerParser.m */, + C496A09420F909BD0098B3E5 /* IPConfigurationParser.h */, + C496A09520F909FF0098B3E5 /* IPConfigurationParser.m */, + C4C5FB0A20EABD5F00F35614 /* IPMonitorParser.h */, + C4C5FB0B20EABD9E00F35614 /* IPMonitorParser.m */, + C4C5FB0D20EAC01900F35614 /* PreferencesMonitorParser.h */, + C4C5FB0E20EAC05200F35614 /* PreferencesMonitorParser.m */, + C469CB2720EED63C00A7AD35 /* StateDumpParser.h */, + C469CB2820EED6C100A7AD35 /* StateDumpParser.m */, + C4666C74206ED01800247AB6 /* Info.plist */, + ); + path = EventFactory; + sourceTree = ""; + }; D6986A70136890B60091C931 /* NetworkInformation */ = { isa = PBXGroup; children = ( @@ -3018,7 +3729,10 @@ isa = PBXGroup; children = ( D6986A781368913C0091C931 /* network_information.h */, - D6986A761368911E0091C931 /* network_information_priv.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 */, 153ACCA714E322D5005029A5 /* network_information_server.h */, ); name = Headers; @@ -3028,15 +3742,44 @@ isa = PBXGroup; children = ( D6986A77136891300091C931 /* network_information.c */, - D6986A75136891120091C931 /* network_information_priv.c */, + D6986A75136891120091C931 /* network_state_information_priv.c */, 153ACCA614E322D5005029A5 /* network_information_server.c */, ); name = Sources; sourceTree = ""; }; + F90E43512012ACF900EF27C4 /* SCNetworkInterfaceProvider */ = { + isa = PBXGroup; + children = ( + F90E43522012AD1900EF27C4 /* Headers */, + F90E43532012AD2300EF27C4 /* Source */, + ); + name = SCNetworkInterfaceProvider; + sourceTree = ""; + }; + F90E43522012AD1900EF27C4 /* Headers */ = { + isa = PBXGroup; + children = ( + F90E43542012AD3900EF27C4 /* SCNetworkInterfaceProvider.h */, + ); + name = Headers; + sourceTree = ""; + }; + F90E43532012AD2300EF27C4 /* Source */ = { + isa = PBXGroup; + children = ( + F90E43552012AD4500EF27C4 /* SCNetworkInterfaceProvider.c */, + ); + name = Source; + 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 */, @@ -3049,20 +3792,30 @@ path = IPMonitorControl; sourceTree = ""; }; + F9D7304420DD89C600521181 /* AWD */ = { + isa = PBXGroup; + children = ( + F963400E20FE8E1D00F1E1F1 /* 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 */ - 1528BFDC1357305400691881 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1528BFF113573FEE00691881 /* Headers */ = { + 151D05FB1EC1491600E02E48 /* Headers */ = { 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; }; @@ -3079,20 +3832,26 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 155847470754FDCD0046C2E9 /* scutil.h in Headers */, + 1558474B0754FDCD0046C2E9 /* cache.h in Headers */, 155847480754FDCD0046C2E9 /* commands.h in Headers */, 155847490754FDCD0046C2E9 /* dictionary.h in Headers */, - 1558474A0754FDCD0046C2E9 /* session.h in Headers */, - 1558474B0754FDCD0046C2E9 /* cache.h in Headers */, - 1558474C0754FDCD0046C2E9 /* notifications.h in Headers */, - 1558474D0754FDCD0046C2E9 /* tests.h in Headers */, - 1558474E0754FDCD0046C2E9 /* prefs.h in Headers */, + 15CB8F7B1EE4DD3F00726685 /* dnsinfo_logging.h in Headers */, + 72B43728113C7BFC00EBF1B6 /* nc.h in Headers */, 1558474F0754FDCD0046C2E9 /* net.h in Headers */, + 15CB8F711EE4DCFF00726685 /* network_state_information_logging.h in Headers */, 155847500754FDCD0046C2E9 /* net_interface.h in Headers */, 155847510754FDCD0046C2E9 /* net_protocol.h in Headers */, 155847520754FDCD0046C2E9 /* net_service.h in Headers */, 155847530754FDCD0046C2E9 /* net_set.h in Headers */, - 72B43728113C7BFC00EBF1B6 /* nc.h in Headers */, + 1558474C0754FDCD0046C2E9 /* notifications.h in Headers */, + 1558474E0754FDCD0046C2E9 /* prefs.h in Headers */, + 155847470754FDCD0046C2E9 /* scutil.h in Headers */, + 1558474A0754FDCD0046C2E9 /* session.h in Headers */, + 1558474D0754FDCD0046C2E9 /* tests.h in Headers */, + 1581BCD31E28679A00F69B1E /* InterfaceNamerControlPrefs.h in Headers */, + 1581BCD51E2867A500F69B1E /* IPMonitorControlPrefs.h in Headers */, + 153E16A81EE500E70027698E /* SCNetworkReachabilityInternal.h in Headers */, + 15CB8F831EE4DE2200726685 /* SCNetworkReachabilityLogging.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3103,10 +3862,27 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 155F49871C864F1400E47D08 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 155F49961C864F4E00E47D08 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 1572C4A80CFB55B400E2776E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 1572C4CB0CFB55B400E2776E /* pppcontroller.h in Headers */, + 1572C4CA0CFB55B400E2776E /* pppcontroller_types.h in Headers */, + 1572C581171CD00E00870549 /* pppcontroller_mach_defines.h in Headers */, 1572C4A90CFB55B400E2776E /* SCSchemaDefinitions.h in Headers */, 1572C4AA0CFB55B400E2776E /* SystemConfiguration.h in Headers */, 1572C4AB0CFB55B400E2776E /* SCPrivate.h in Headers */, @@ -3126,20 +3902,16 @@ 1572C4B90CFB55B400E2776E /* SCNetworkConfiguration.h in Headers */, 1572C4BA0CFB55B400E2776E /* SCNetworkConfigurationInternal.h in Headers */, D61AAEB61522C9E60066B003 /* scprefs_observer.h in Headers */, + F90E43572012AD6000EF27C4 /* SCNetworkInterfaceProvider.h in Headers */, 1572C4BB0CFB55B400E2776E /* SCNetwork.h in Headers */, 1572C4BC0CFB55B400E2776E /* SCNetworkConnection.h in Headers */, 1572C4BD0CFB55B400E2776E /* SCNetworkReachability.h in Headers */, 1572C4BE0CFB55B400E2776E /* SCValidation.h in Headers */, 1572C4BF0CFB55B400E2776E /* DHCPClientPreferences.h in Headers */, 1572C4C00CFB55B400E2776E /* SCDynamicStoreCopyDHCPInfo.h in Headers */, - 1572C4C10CFB55B400E2776E /* moh_msg.h in Headers */, - 1572C4C20CFB55B400E2776E /* moh.h in Headers */, - C4CDB81A163193AF00819B44 /* VPNFlowPrivate.h in Headers */, - 1572C4C30CFB55B400E2776E /* DeviceOnHold.h in Headers */, 1572C4C50CFB55B400E2776E /* dy_framework.h in Headers */, 1572C4C70CFB55B400E2776E /* SCPreferencesPathKey.h in Headers */, - 1572C4CA0CFB55B400E2776E /* pppcontroller_types.h in Headers */, - 1572C581171CD00E00870549 /* pppcontroller_mach_defines.h in Headers */, + 158FC7801FDAE32A00B2493C /* SystemConfigurationInternal.h in Headers */, 1572C4CE0CFB55B400E2776E /* SCPreferencesSetSpecificPrivate.h in Headers */, C4CDB819163193AA00819B44 /* VPNFlow.h in Headers */, 1572C4CF0CFB55B400E2776E /* SCPreferencesGetSpecificPrivate.h in Headers */, @@ -3149,6 +3921,7 @@ 1572C4D40CFB55B400E2776E /* SCNetworkConnectionPrivate.h in Headers */, 1572C4D50CFB55B400E2776E /* SCPreferencesKeychainPrivate.h in Headers */, F9347FF8187C7993003D4178 /* IPMonitorControl.h in Headers */, + 1572AA901D8237810021E093 /* plugin_shared.h in Headers */, F9347FF9187C7993003D4178 /* IPMonitorControlPrivate.h in Headers */, F9347FFA187C7993003D4178 /* symbol_scope.h in Headers */, 1572C4D60CFB55B400E2776E /* SCSchemaDefinitionsPrivate.h in Headers */, @@ -3163,7 +3936,6 @@ 15C330D2134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */, 15D8B22B1450D8450090CECF /* SCD.h in Headers */, B084711016385121006C92A3 /* SCNetworkConnectionInternal.h in Headers */, - 1572C4CB0CFB55B400E2776E /* pppcontroller.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3174,7 +3946,6 @@ 15732A7816EA503200F3AC4C /* configd.h in Headers */, 15732A7916EA503200F3AC4C /* _SCD.h in Headers */, 15732A7A16EA503200F3AC4C /* configd_server.h in Headers */, - 15732A7B16EA503200F3AC4C /* notify_server.h in Headers */, 15732A7C16EA503200F3AC4C /* plugin_support.h in Headers */, 15732A7D16EA503200F3AC4C /* session.h in Headers */, 15732A7E16EA503200F3AC4C /* pattern.h in Headers */, @@ -3185,20 +3956,25 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 15732AAF16EA511900F3AC4C /* scutil.h in Headers */, + 15732AB316EA511900F3AC4C /* cache.h in Headers */, 15732AB016EA511900F3AC4C /* commands.h in Headers */, 15732AB116EA511900F3AC4C /* dictionary.h in Headers */, - 15732AB216EA511900F3AC4C /* session.h in Headers */, - 15732AB316EA511900F3AC4C /* cache.h in Headers */, - 15732AB416EA511900F3AC4C /* notifications.h in Headers */, - 15732AB516EA511900F3AC4C /* tests.h in Headers */, - 15732AB616EA511900F3AC4C /* prefs.h in Headers */, + 15CB8F811EE4DD4E00726685 /* dnsinfo_logging.h in Headers */, + 15732ABC16EA511900F3AC4C /* nc.h in Headers */, 15732AB716EA511900F3AC4C /* net.h in Headers */, + 15CB8F771EE4DD1900726685 /* network_state_information_logging.h in Headers */, 15732AB816EA511900F3AC4C /* net_interface.h in Headers */, 15732AB916EA511900F3AC4C /* net_protocol.h in Headers */, 15732ABA16EA511900F3AC4C /* net_service.h in Headers */, 15732ABB16EA511900F3AC4C /* net_set.h in Headers */, - 15732ABC16EA511900F3AC4C /* nc.h in Headers */, + 15732AB416EA511900F3AC4C /* notifications.h in Headers */, + 15732AB616EA511900F3AC4C /* prefs.h in Headers */, + 15732AAF16EA511900F3AC4C /* scutil.h in Headers */, + 15732AB216EA511900F3AC4C /* session.h in Headers */, + 15732AB516EA511900F3AC4C /* tests.h in Headers */, + 1581BCD91E2867C100F69B1E /* IPMonitorControlPrefs.h in Headers */, + 153E16AA1EE500EF0027698E /* SCNetworkReachabilityInternal.h in Headers */, + 15CB8F8A1EE4DE3B00726685 /* SCNetworkReachabilityLogging.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3206,8 +3982,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 */, ); @@ -3224,20 +4002,26 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 157433F20D4A8137002ACA73 /* scutil.h in Headers */, + 157433F60D4A8137002ACA73 /* cache.h in Headers */, 157433F30D4A8137002ACA73 /* commands.h in Headers */, 157433F40D4A8137002ACA73 /* dictionary.h in Headers */, - 157433F50D4A8137002ACA73 /* session.h in Headers */, - 157433F60D4A8137002ACA73 /* cache.h in Headers */, - 157433F70D4A8137002ACA73 /* notifications.h in Headers */, - 157433F80D4A8137002ACA73 /* tests.h in Headers */, - 157433F90D4A8137002ACA73 /* prefs.h in Headers */, + 15CB8F7E1EE4DD4800726685 /* dnsinfo_logging.h in Headers */, + 72B4372A113C7BFC00EBF1B6 /* nc.h in Headers */, 157433FA0D4A8137002ACA73 /* net.h in Headers */, + 15CB8F751EE4DD1100726685 /* network_state_information_logging.h in Headers */, 157433FB0D4A8137002ACA73 /* net_interface.h in Headers */, 157433FC0D4A8137002ACA73 /* net_protocol.h in Headers */, 157433FD0D4A8137002ACA73 /* net_service.h in Headers */, 157433FE0D4A8137002ACA73 /* net_set.h in Headers */, - 72B4372A113C7BFC00EBF1B6 /* nc.h in Headers */, + 157433F70D4A8137002ACA73 /* notifications.h in Headers */, + 157433F90D4A8137002ACA73 /* prefs.h in Headers */, + 157433F20D4A8137002ACA73 /* scutil.h in Headers */, + 157433F50D4A8137002ACA73 /* session.h in Headers */, + 157433F80D4A8137002ACA73 /* tests.h in Headers */, + 1581BCDD1E286E0000F69B1E /* InterfaceNamerControlPrefs.h in Headers */, + 1581BCD71E2867B200F69B1E /* IPMonitorControlPrefs.h in Headers */, + 153E16A91EE500ED0027698E /* SCNetworkReachabilityInternal.h in Headers */, + 15CB8F861EE4DE2E00726685 /* SCNetworkReachabilityLogging.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3246,9 +4030,12 @@ 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 */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3256,16 +4043,27 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F9B7AE6C186211DE00C78D18 /* IPMonitorControlServer.h in Headers */, - 157A84F60D56C7E800B6F1A0 /* dns-configuration.h in Headers */, + 720985471C5835DB00966D30 /* agent-monitor.h in Headers */, + 720A4C0B1C585C93007436B8 /* controller.h in Headers */, + 720A4C0A1C585C7D007436B8 /* configAgent.h in Headers */, + 725CB7591BF514F5000C05A8 /* configAgentDefines.h in Headers */, + 720A4C0C1C585C97007436B8 /* dnsAgent.h in Headers */, 15D48EC20F67061F00B4711E /* dnsinfo_create.h in Headers */, - E4F211D4137B0ABD00BBB915 /* network_information_priv.h in Headers */, + 15CB8F7C1EE4DD4300726685 /* dnsinfo_logging.h in Headers */, + 157A84F60D56C7E800B6F1A0 /* dns-configuration.h in Headers */, + 1596A7B514EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, + 153ACCAC14E322D5005029A5 /* network_information_server.h in Headers */, + 15CB8F731EE4DD0B00726685 /* network_state_information_logging.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 */, F9B7AE6F186211F600C78D18 /* symbol_scope.h in Headers */, + 1581BCD61E2867AF00F69B1E /* IPMonitorControlPrefs.h in Headers */, F9B7AE68186211C900C78D18 /* IPMonitorControlPrivate.h in Headers */, - 157A84F70D56C7E800B6F1A0 /* set-hostname.h in Headers */, - 153ACCAC14E322D5005029A5 /* network_information_server.h in Headers */, - 1596A7B514EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, + F9B7AE6C186211DE00C78D18 /* IPMonitorControlServer.h in Headers */, + 153E16A61EE5008A0027698E /* SCNetworkReachabilityInternal.h in Headers */, + 15CB8F851EE4DE2B00726685 /* SCNetworkReachabilityLogging.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3273,6 +4071,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 15A9BDA81D8DEA67007024DB /* plugin_shared.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3281,7 +4080,6 @@ buildActionMask = 2147483647; files = ( 157A85170D56C8E000B6F1A0 /* eventmon.h in Headers */, - 157A85120D56C8E000B6F1A0 /* cache.h in Headers */, 157A85140D56C8E000B6F1A0 /* ev_dlil.h in Headers */, 157A85150D56C8E000B6F1A0 /* ev_ipv4.h in Headers */, 157A85160D56C8E000B6F1A0 /* ev_ipv6.h in Headers */, @@ -3300,6 +4098,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 1572AA911D82379E0021E093 /* plugin_shared.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3310,7 +4109,6 @@ 158317250CFB80A1006F62B9 /* configd.h in Headers */, 158317260CFB80A1006F62B9 /* _SCD.h in Headers */, 158317270CFB80A1006F62B9 /* configd_server.h in Headers */, - 158317280CFB80A1006F62B9 /* notify_server.h in Headers */, 158317290CFB80A1006F62B9 /* plugin_support.h in Headers */, 1583172A0CFB80A1006F62B9 /* session.h in Headers */, 1583172B0CFB80A1006F62B9 /* pattern.h in Headers */, @@ -3331,7 +4129,6 @@ buildActionMask = 2147483647; files = ( 159D541407528DB5004F8947 /* eventmon.h in Headers */, - 159D540A07528D3B004F8947 /* cache.h in Headers */, 159D540E07528DAE004F8947 /* ev_dlil.h in Headers */, 159D541007528DB1004F8947 /* ev_ipv4.h in Headers */, 159D541207528DB3004F8947 /* ev_ipv6.h in Headers */, @@ -3343,6 +4140,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 1572AA8F1D82375A0021E093 /* plugin_shared.h in Headers */, + 1581BCD21E28673600F69B1E /* InterfaceNamerControlPrefs.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3350,17 +4149,28 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 155D223B0AF13A7300D52ED0 /* dns-configuration.h in Headers */, + 728015991BE1812B009F4F60 /* agent-monitor.h in Headers */, + 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 */, - E4F211D7137B0AF200BBB915 /* network_information_priv.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 */, + 153ACCAB14E322D5005029A5 /* network_information_server.h in Headers */, + 15CB8F701EE4DCFC00726685 /* network_state_information_logging.h in Headers */, + 7280159E1BE1812B009F4F60 /* proxyAgent.h in Headers */, 1575FD2A12CD15C60003D86E /* proxy-configuration.h in Headers */, 155D223C0AF13A7300D52ED0 /* set-hostname.h in Headers */, - F9B7AE67186211C200C78D18 /* IPMonitorControlPrivate.h in Headers */, - F9B7AE6E186211F000C78D18 /* symbol_scope.h in Headers */, 155D223D0AF13A7300D52ED0 /* smb-configuration.h in Headers */, + F9B7AE6E186211F000C78D18 /* symbol_scope.h in Headers */, + 1581BCD41E2867A300F69B1E /* IPMonitorControlPrefs.h in Headers */, + F9B7AE67186211C200C78D18 /* IPMonitorControlPrivate.h in Headers */, F9B7AE6B186211DA00C78D18 /* IPMonitorControlServer.h in Headers */, - 153ACCAB14E322D5005029A5 /* network_information_server.h in Headers */, - 1596A7B414EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, + 153E16A51EE500810027698E /* SCNetworkReachabilityInternal.h in Headers */, + 15CB8F821EE4DE1F00726685 /* SCNetworkReachabilityLogging.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3375,6 +4185,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 1572AA8D1D8235940021E093 /* plugin_shared.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3385,7 +4196,6 @@ 159D54A407529FFF004F8947 /* configd.h in Headers */, 159D54A507529FFF004F8947 /* _SCD.h in Headers */, 159D54A607529FFF004F8947 /* configd_server.h in Headers */, - 159D54A707529FFF004F8947 /* notify_server.h in Headers */, 159D54A807529FFF004F8947 /* plugin_support.h in Headers */, 159D54A907529FFF004F8947 /* session.h in Headers */, 159D54AA07529FFF004F8947 /* pattern.h in Headers */, @@ -3396,8 +4206,12 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 15A5A2090D5B94190087BDA0 /* pppcontroller.h in Headers */, + 15EF899F21894452003B2C5C /* SCNetworkInterfaceProvider.h in Headers */, + 15EF89CC21894B28003B2C5C /* IPMonitorControl.h in Headers */, + 15A5A2080D5B94190087BDA0 /* pppcontroller_types.h in Headers */, + 1572C57F171CCFE200870549 /* pppcontroller_mach_defines.h in Headers */, 15A5A1E70D5B94190087BDA0 /* SCSchemaDefinitions.h in Headers */, - 727AF256191386CB009AB153 /* VPNFlowPrivate.h in Headers */, 15A5A1E80D5B94190087BDA0 /* SystemConfiguration.h in Headers */, 15A5A1E90D5B94190087BDA0 /* SCPrivate.h in Headers */, 15A5A1EA0D5B94190087BDA0 /* SCDPlugin.h in Headers */, @@ -3423,16 +4237,13 @@ 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 */, - 15A5A1FF0D5B94190087BDA0 /* moh_msg.h in Headers */, - 15A5A2000D5B94190087BDA0 /* moh.h in Headers */, - 15A5A2010D5B94190087BDA0 /* DeviceOnHold.h in Headers */, 15A5A2030D5B94190087BDA0 /* dy_framework.h in Headers */, 15A5A2050D5B94190087BDA0 /* SCPreferencesPathKey.h in Headers */, 15A5A2060D5B94190087BDA0 /* dnsinfo.h in Headers */, 15A5A2070D5B94190087BDA0 /* dnsinfo_private.h in Headers */, - 15A5A2080D5B94190087BDA0 /* pppcontroller_types.h in Headers */, - 1572C57F171CCFE200870549 /* pppcontroller_mach_defines.h in Headers */, + 15EF89CB21894B1A003B2C5C /* IPMonitorControlPrivate.h in Headers */, 15A5A20C0D5B94190087BDA0 /* SCPreferencesSetSpecificPrivate.h in Headers */, 15A5A20D0D5B94190087BDA0 /* SCPreferencesGetSpecificPrivate.h in Headers */, 727AF255191386A0009AB153 /* VPNFlow.h in Headers */, @@ -3440,42 +4251,39 @@ 15A5A2100D5B94190087BDA0 /* SCHelper_client.h in Headers */, 15A5A2110D5B94190087BDA0 /* SCNetworkConnectionPrivate.h in Headers */, 15A5A2120D5B94190087BDA0 /* SCPreferencesKeychainPrivate.h in Headers */, + 15EF89A021894533003B2C5C /* SNHelperPrivate.h in Headers */, 15A5A2130D5B94190087BDA0 /* SCSchemaDefinitionsPrivate.h in Headers */, 15A5A2140D5B94190087BDA0 /* SCNetworkSignature.h in Headers */, 15A5A2150D5B94190087BDA0 /* SCNetworkSignaturePrivate.h in Headers */, 15A1FF3410597F17004C9CC9 /* CaptiveNetwork.h in Headers */, 159A7528107FEAA400A57EAB /* VPNPrivate.h in Headers */, 159A752A107FEAA400A57EAB /* VPNConfiguration.h in Headers */, + 1572AA921D8237A30021E093 /* plugin_shared.h in Headers */, 15C330D3134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */, 727AF25419138699009AB153 /* VPNAppLayerPrivate.h in Headers */, 15D8B22C1450D8450090CECF /* SCD.h in Headers */, - 15A5A2090D5B94190087BDA0 /* pppcontroller.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 15AB751316EBFF3400FAA8CE /* Headers */ = { + 15D3081016F3E4DA00014F82 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 15D3081016F3E4DA00014F82 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 15C8C6C0170AAB4E005375CE /* cache.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 15DAD5E0075913CE0084A6ED /* Headers */ = { + 15DAD5E0075913CE0084A6ED /* Headers */ = { isa = PBXHeadersBuildPhase; 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; }; @@ -3483,6 +4291,9 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 15DAD66507591A1A0084A6ED /* pppcontroller.h in Headers */, + 1572C580171CCFF000870549 /* pppcontroller_mach_defines.h in Headers */, + 15DAD66407591A1A0084A6ED /* pppcontroller_types.h in Headers */, 1506081A075A00A300B147BA /* SCSchemaDefinitions.h in Headers */, 15DAD64307591A1A0084A6ED /* SystemConfiguration.h in Headers */, 15DAD64407591A1A0084A6ED /* SCPrivate.h in Headers */, @@ -3502,6 +4313,7 @@ 15DAD65107591A1A0084A6ED /* SCPreferencesSetSpecific.h in Headers */, 15DAD65207591A1A0084A6ED /* SCNetworkConfiguration.h in Headers */, D61AAEB51522C9D00066B003 /* scprefs_observer.h in Headers */, + F90E43562012AD4F00EF27C4 /* SCNetworkInterfaceProvider.h in Headers */, 15DAD65307591A1A0084A6ED /* SCNetworkConfigurationInternal.h in Headers */, F9B7AE66186211BE00C78D18 /* IPMonitorControlPrivate.h in Headers */, 15DAD65407591A1A0084A6ED /* SCNetwork.h in Headers */, @@ -3510,21 +4322,17 @@ 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 */, - 15DAD65A07591A1A0084A6ED /* moh_msg.h in Headers */, - 15DAD65B07591A1A0084A6ED /* moh.h in Headers */, - 15DAD65C07591A1A0084A6ED /* DeviceOnHold.h in Headers */, - C4CDB8181631938400819B44 /* VPNFlowPrivate.h in Headers */, 15DAD65E07591A1A0084A6ED /* dy_framework.h in Headers */, 15DAD66107591A1A0084A6ED /* SCPreferencesPathKey.h in Headers */, - 15DAD66407591A1A0084A6ED /* pppcontroller_types.h in Headers */, - 1572C580171CCFF000870549 /* pppcontroller_mach_defines.h in Headers */, B0A88CA716397A1200A60B3A /* VPNAppLayerPrivate.h in Headers */, 156BD6BC07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h in Headers */, 154CF3F407E1EA4D00D8302E /* SCPreferencesGetSpecificPrivate.h in Headers */, C4CDB8171631938000819B44 /* VPNFlow.h in Headers */, 155A1E6C081079CC00F70D98 /* SCNetworkConfigurationPrivate.h in Headers */, + 1572AA8E1D8235A40021E093 /* plugin_shared.h in Headers */, 155B7BF80847776D00F0E262 /* SCHelper_client.h in Headers */, 15D8B22A1450D8450090CECF /* SCD.h in Headers */, 15A297300A13C08C009879B3 /* SCNetworkConnectionPrivate.h in Headers */, @@ -3539,7 +4347,6 @@ 15AAA7F7108E310700C2A607 /* VPNTunnelPrivate.h in Headers */, 15C330D1134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */, B084710F16385121006C92A3 /* SCNetworkConnectionInternal.h in Headers */, - 15DAD66507591A1A0084A6ED /* pppcontroller.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3547,18 +4354,64 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 15E1B04316EBAE3C00E5F06F /* dns-configuration.h in Headers */, 15E1B04416EBAE3C00E5F06F /* dnsinfo_create.h in Headers */, - 15E1B04516EBAE3C00E5F06F /* network_information_priv.h in Headers */, - 15E1B04616EBAE3C00E5F06F /* proxy-configuration.h in Headers */, - 15E1B04816EBAE3C00E5F06F /* network_information_server.h in Headers */, + 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 */, + 15E1B04616EBAE3C00E5F06F /* proxy-configuration.h in Headers */, + 1581BCD81E2867BA00F69B1E /* IPMonitorControlPrefs.h in Headers */, + 153E16A71EE5008F0027698E /* SCNetworkReachabilityInternal.h in Headers */, + 15CB8F881EE4DE3300726685 /* SCNetworkReachabilityLogging.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15F742DB1EC6370000DA2E7A /* Headers */ = { + 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 */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15F742E81EC638D100DA2E7A /* Headers */ = { + 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 */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 151D05FA1EC1491600E02E48 /* liblog_SystemConfiguration */ = { + isa = PBXNativeTarget; + buildConfigurationList = 151D06081EC1491600E02E48 /* Build configuration list for PBXNativeTarget "liblog_SystemConfiguration" */; + buildPhases = ( + 151D05FB1EC1491600E02E48 /* Headers */, + 151D06011EC1491600E02E48 /* Sources */, + 151D06061EC1491600E02E48 /* Frameworks */, + 1513C35A1F186A700022398F /* Update "install_path" for address|thread sanitizers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = liblog_SystemConfiguration; + productInstallPath = /usr/local/lib/system; + productName = DNSConfiguration; + productReference = 151D060B1EC1491600E02E48 /* liblog_SystemConfiguration.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; 151F5D990CCE98E50093AC3B /* SCMonitor */ = { isa = PBXNativeTarget; buildConfigurationList = 151F5D9F0CCE98E60093AC3B /* Build configuration list for PBXNativeTarget "SCMonitor" */; @@ -3566,6 +4419,7 @@ 151F5D960CCE98E50093AC3B /* Resources */, 151F5D970CCE98E50093AC3B /* Sources */, 151F5D980CCE98E50093AC3B /* Frameworks */, + 1513C3591F18697C0022398F /* Update "install_path" for address|thread sanitizers */, ); buildRules = ( ); @@ -3592,87 +4446,6 @@ productReference = 151F63EC09328A3C0096DCC9 /* genSCPreferences */; productType = "com.apple.product-type.tool"; }; - 15213FF90E93E9F500DACD2C /* Logger.bundle */ = { - isa = PBXNativeTarget; - buildConfigurationList = 15213FFF0E93E9F600DACD2C /* Build configuration list for PBXNativeTarget "Logger.bundle" */; - buildPhases = ( - 15213FF70E93E9F500DACD2C /* Sources */, - 1521400B0E93FF8600DACD2C /* Frameworks */, - 15213FF60E93E9F500DACD2C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Logger.bundle; - productName = Logger.bundle; - productReference = 15213FFA0E93E9F500DACD2C /* Logger.bundle */; - productType = "com.apple.product-type.bundle"; - }; - 1528BFDB1357305400691881 /* SCNetworkReachability */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1528BFDF1357305400691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability" */; - buildPhases = ( - 1528BFDC1357305400691881 /* Headers */, - 1528BFDD1357305400691881 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SCNetworkReachability; - productName = PreferencesMonitor; - productReference = 1528BFE21357305400691881 /* libSCNetworkReachability.a */; - productType = "com.apple.product-type.library.static"; - }; - 1528BFE31357309700691881 /* SCNetworkReachability.bundle */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1528BFE51357309700691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability.bundle" */; - buildPhases = ( - 1528BFE41357309700691881 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SCNetworkReachability.bundle; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = PreferencesMonitor.bundle; - productReference = 1528BFE81357309800691881 /* SCNetworkReachability.bundle */; - productType = "com.apple.product-type.bundle"; - }; - 1528BFF013573FEE00691881 /* SCNetworkReachability-Embedded */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1528BFF413573FEE00691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability-Embedded" */; - buildPhases = ( - 1528BFF113573FEE00691881 /* Headers */, - 1528BFF213573FEE00691881 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SCNetworkReachability-Embedded"; - productName = PreferencesMonitor; - productReference = 1528BFF713573FEE00691881 /* libSCNetworkReachability.a */; - productType = "com.apple.product-type.library.static"; - }; - 1528BFF813573FF500691881 /* SCNetworkReachability.bundle-Embedded */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1528BFFB13573FF500691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability.bundle-Embedded" */; - buildPhases = ( - 1528BFF913573FF500691881 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SCNetworkReachability.bundle-Embedded"; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = PreferencesMonitor.bundle; - productReference = 1528BFFE13573FF500691881 /* SCNetworkReachability.bundle */; - productType = "com.apple.product-type.bundle"; - }; 1547001808455B98006787CE /* SCHelper */ = { isa = PBXNativeTarget; buildConfigurationList = 156EB5E20905594A00EEF749 /* Build configuration list for PBXNativeTarget "SCHelper" */; @@ -3680,6 +4453,7 @@ 1547001908455B98006787CE /* Headers */, 1547001A08455B98006787CE /* Sources */, 1547001B08455B98006787CE /* Frameworks */, + 15A66BB21F1817AC00F7253B /* Update "install_path" for address|thread sanitizers */, 15FF5C380CDF778F00EEC8AA /* CopyFiles */, ); buildRules = ( @@ -3699,6 +4473,7 @@ 155847460754FDCD0046C2E9 /* Headers */, 155847540754FDCD0046C2E9 /* Sources */, 155847620754FDCD0046C2E9 /* Frameworks */, + 1513C3581F1869630022398F /* Update "install_path" for address|thread sanitizers */, 155847680754FDCD0046C2E9 /* CopyFiles */, ); buildRules = ( @@ -3718,6 +4493,7 @@ 1558481407550EC10046C2E9 /* Headers */, 1558481507550EC10046C2E9 /* Sources */, 1558481707550EC10046C2E9 /* Frameworks */, + 1513C3571F1869530022398F /* Update "install_path" for address|thread sanitizers */, 1558481B07550EC10046C2E9 /* CopyFiles */, ); buildRules = ( @@ -3730,21 +4506,68 @@ productReference = 1558481D07550EC10046C2E9 /* scselect */; productType = "com.apple.product-type.tool"; }; - 156CA4790EF853BB00C59A18 /* Logger.bundle-Embedded */ = { + 155F49861C864F1400E47D08 /* QoSMarking */ = { + isa = PBXNativeTarget; + buildConfigurationList = 155F498A1C864F1400E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking" */; + buildPhases = ( + 155F49871C864F1400E47D08 /* Headers */, + 155F49881C864F1400E47D08 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = QoSMarking; + productName = QoSMarking; + productReference = 155F498D1C864F1400E47D08 /* libQoSMarking.a */; + productType = "com.apple.product-type.library.static"; + }; + 155F498E1C864F3700E47D08 /* QoSMarking.bundle */ = { + isa = PBXNativeTarget; + buildConfigurationList = 155F49901C864F3700E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking.bundle" */; + buildPhases = ( + 155F498F1C864F3700E47D08 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = QoSMarking.bundle; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = QoSMarking.bundle; + productReference = 155F49931C864F3700E47D08 /* QoSMarking.bundle */; + productType = "com.apple.product-type.bundle"; + }; + 155F49951C864F4E00E47D08 /* QoSMarking-Embedded */ = { + isa = PBXNativeTarget; + buildConfigurationList = 155F49991C864F4E00E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking-Embedded" */; + buildPhases = ( + 155F49961C864F4E00E47D08 /* Headers */, + 155F49971C864F4E00E47D08 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "QoSMarking-Embedded"; + productName = QoSMarking; + productReference = 155F499C1C864F4E00E47D08 /* libQoSMarking.a */; + productType = "com.apple.product-type.library.static"; + }; + 155F499D1C864F5400E47D08 /* QoSMarking.bundle-Embedded */ = { isa = PBXNativeTarget; - buildConfigurationList = 156CA4820EF853BB00C59A18 /* Build configuration list for PBXNativeTarget "Logger.bundle-Embedded" */; + buildConfigurationList = 155F499F1C864F5400E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking.bundle-Embedded" */; buildPhases = ( - 156CA47A0EF853BB00C59A18 /* Sources */, - 156CA47C0EF853BB00C59A18 /* Frameworks */, - 156CA4810EF853BB00C59A18 /* Resources */, + 155F499E1C864F5400E47D08 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = "Logger.bundle-Embedded"; - productName = Logger.bundle; - productReference = 156CA4850EF853BB00C59A18 /* Logger.bundle */; + name = "QoSMarking.bundle-Embedded"; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = QoSMarking.bundle; + productReference = 155F49A21C864F5400E47D08 /* QoSMarking.bundle */; productType = "com.apple.product-type.bundle"; }; 1572C4A60CFB55B400E2776E /* SystemConfiguration.framework-Embedded */ = { @@ -3752,11 +4575,14 @@ buildConfigurationList = 1572C5290CFB55B400E2776E /* Build configuration list for PBXNativeTarget "SystemConfiguration.framework-Embedded" */; buildPhases = ( 1572C4A80CFB55B400E2776E /* Headers */, - 153393E40D34999D00FE74E7 /* Update Headers */, - 1572C4D90CFB55B400E2776E /* Resources */, + 153393E40D34999D00FE74E7 /* Restore temporary headers */, 1572C4DE0CFB55B400E2776E /* Sources */, 1572C5230CFB55B400E2776E /* Frameworks */, + 1513C35C1F186BF90022398F /* Update "install_path" for address|thread sanitizers */, + 1572C4D90CFB55B400E2776E /* Resources */, + 1510A7301B17E1AF00125A85 /* Add framework symlink (TEMPORARY) */, 1572C5270CFB55B400E2776E /* get-mobility-info */, + 158D6D8A1C974EF700A08E78 /* Logging Preferences */, ); buildRules = ( ); @@ -3782,7 +4608,6 @@ ); dependencies = ( 15AB752A16EC254D00FAA8CE /* PBXTargetDependency */, - 15AB752C16EC254D00FAA8CE /* PBXTargetDependency */, 15D3083516F3EB2500014F82 /* PBXTargetDependency */, ); name = "configd-EmbeddedSimulator"; @@ -3824,7 +4649,7 @@ name = "libsystem_configuration-EmbeddedSimulator"; productInstallPath = /usr/local/lib/system; productName = DNSConfiguration; - productReference = 15732AE416EA6B6700F3AC4C /* libsystem_sim_configuration.dylib */; + productReference = 15732AE416EA6B6700F3AC4C /* libsystem_configuration.dylib */; productType = "com.apple.product-type.library.dynamic"; }; 157433DD0D4A8122002ACA73 /* scselect-Embedded */ = { @@ -3834,6 +4659,7 @@ 157433DE0D4A8122002ACA73 /* Headers */, 157433DF0D4A8122002ACA73 /* Sources */, 157433E10D4A8122002ACA73 /* Frameworks */, + 1513C3601F186C460022398F /* Update "install_path" for address|thread sanitizers */, ); buildRules = ( ); @@ -3852,6 +4678,7 @@ 157433F10D4A8137002ACA73 /* Headers */, 157433FF0D4A8137002ACA73 /* Sources */, 1574340D0D4A8137002ACA73 /* Frameworks */, + 1513C3611F186C4D0022398F /* Update "install_path" for address|thread sanitizers */, ); buildRules = ( ); @@ -3870,6 +4697,7 @@ 157A84D90D56C63900B6F1A0 /* Headers */, 157A84DD0D56C63900B6F1A0 /* Sources */, 157A84E20D56C63900B6F1A0 /* Frameworks */, + 154070A11B98E8D3003195EF /* Update "install_path" for address|thread sanitizers */, ); buildRules = ( ); @@ -3887,6 +4715,7 @@ buildPhases = ( 157A84F50D56C7E800B6F1A0 /* Headers */, 157A84F90D56C7E800B6F1A0 /* Sources */, + F963400F20FE8E4100F1E1F1 /* CopyFiles */, ); buildRules = ( ); @@ -3983,6 +4812,7 @@ 158317240CFB80A1006F62B9 /* Headers */, 1583172C0CFB80A1006F62B9 /* Sources */, 1583174B0CFB80A1006F62B9 /* Frameworks */, + 1513C35F1F186C3A0022398F /* Update "install_path" for address|thread sanitizers */, 1583175B0CFB80A1006F62B9 /* CopyFiles */, 15FBB55117D78B670035D752 /* Update MachServices */, ); @@ -4001,7 +4831,6 @@ buildConfigurationList = 158317800CFB85C8006F62B9 /* Build configuration list for PBXNativeTarget "IPMonitor.bundle-Embedded" */; buildPhases = ( 1583177E0CFB85C8006F62B9 /* Resources */, - 15D54E2515B4FA1900F5229A /* com.apple.networking.IPMonitor */, ); buildRules = ( ); @@ -4083,7 +4912,9 @@ 1583379A0CFB6B9E0033AB93 /* Headers */, 1583379D0CFB6B9E0033AB93 /* Sources */, 1583379F0CFB6B9E0033AB93 /* Frameworks */, + 1513C35D1F186C0B0022398F /* Update "install_path" for address|thread sanitizers */, 158337A40CFB6B9E0033AB93 /* CopyFiles */, + 1595B4B81B0C02FA0087944E /* Rename/update SCHelper launchd .plist */, ); buildRules = ( ); @@ -4182,8 +5013,9 @@ 159D54A307529FFF004F8947 /* Headers */, 159D54AB07529FFF004F8947 /* Sources */, 159D54CA07529FFF004F8947 /* Frameworks */, + 1513C3561F1857E00022398F /* Update "install_path" for address|thread sanitizers */, 159D54D507529FFF004F8947 /* CopyFiles */, - 159D54D707529FFF004F8947 /* CopyFiles */, + 159D54D707529FFF004F8947 /* Copy Files */, 15FBB54D17D75DE70035D752 /* Update MachServices */, ); buildRules = ( @@ -4201,10 +5033,12 @@ buildConfigurationList = 15A5A2660D5B94190087BDA0 /* Build configuration list for PBXNativeTarget "SystemConfiguration.framework-EmbeddedSimulator" */; buildPhases = ( 15A5A1E60D5B94190087BDA0 /* Headers */, - 15A5A2170D5B94190087BDA0 /* Update Headers */, - 15A5A2180D5B94190087BDA0 /* Resources */, + 15A5A2170D5B94190087BDA0 /* Restore temporary headers */, 15A5A21D0D5B94190087BDA0 /* Sources */, 15A5A2620D5B94190087BDA0 /* Frameworks */, + 15A5A2180D5B94190087BDA0 /* Resources */, + 1535FEDC1B0FDDCD00B2A3AD /* Add framework symlink (TEMPORARY) */, + 158D6D8C1C974F4800A08E78 /* Logging Preferences */, ); buildRules = ( ); @@ -4216,38 +5050,6 @@ productReference = 15A5A26A0D5B94190087BDA0 /* SystemConfiguration.framework */; productType = "com.apple.product-type.framework"; }; - 15AB751216EBFF3400FAA8CE /* SCNetworkReachability-EmbeddedSimulator */ = { - isa = PBXNativeTarget; - buildConfigurationList = 15AB751616EBFF3400FAA8CE /* Build configuration list for PBXNativeTarget "SCNetworkReachability-EmbeddedSimulator" */; - buildPhases = ( - 15AB751316EBFF3400FAA8CE /* Headers */, - 15AB751416EBFF3400FAA8CE /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SCNetworkReachability-EmbeddedSimulator"; - productName = PreferencesMonitor; - productReference = 15AB751916EBFF3400FAA8CE /* libSCNetworkReachability_sim.a */; - productType = "com.apple.product-type.library.static"; - }; - 15AB751A16EBFF8A00FAA8CE /* SCNetworkReachability.bundle-EmbeddedSimulator */ = { - isa = PBXNativeTarget; - buildConfigurationList = 15AB751C16EBFF8A00FAA8CE /* Build configuration list for PBXNativeTarget "SCNetworkReachability.bundle-EmbeddedSimulator" */; - buildPhases = ( - 15AB751B16EBFF8A00FAA8CE /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SCNetworkReachability.bundle-EmbeddedSimulator"; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = PreferencesMonitor.bundle; - productReference = 15AB751F16EBFF8A00FAA8CE /* SCNetworkReachability.bundle */; - productType = "com.apple.product-type.bundle"; - }; 15D3080F16F3E4DA00014F82 /* SimulatorSupport-EmbeddedSimulator */ = { isa = PBXNativeTarget; buildConfigurationList = 15D3082416F3E4DA00014F82 /* Build configuration list for PBXNativeTarget "SimulatorSupport-EmbeddedSimulator" */; @@ -4287,6 +5089,7 @@ 15DAD5E0075913CE0084A6ED /* Headers */, 15DAD5E4075913CE0084A6ED /* Sources */, 15DAD5E9075913CE0084A6ED /* Frameworks */, + 154070A01B968548003195EF /* Update "install_path" for address|thread sanitizers */, ); buildRules = ( ); @@ -4304,12 +5107,12 @@ buildPhases = ( 15DAD6AC07591A1A0084A6ED /* SystemConfiguration.order */, 15DAD64107591A1A0084A6ED /* Headers */, - 15AC82480D376E2400A579D0 /* Update Headers */, - 15DAD66807591A1A0084A6ED /* Resources */, 15DAD66C07591A1A0084A6ED /* Sources */, 15DAD6AD07591A1A0084A6ED /* Frameworks */, + 15A66BB11F18177100F7253B /* Update "install_path" for address|thread sanitizers */, + 15DAD66807591A1A0084A6ED /* Resources */, 15DAD6B007591A1A0084A6ED /* get-mobility-info */, - 15D9DCF910DD909F004E545D /* AppWorkaround.plist */, + 158D6D881C974E7E00A08E78 /* Logging Preferences */, ); buildRules = ( ); @@ -4353,6 +5156,117 @@ productReference = 15E1B06116EBAE7800E5F06F /* IPMonitor.bundle */; productType = "com.apple.product-type.bundle"; }; + 15E91DB221893E83001155DC /* SCTest-ObjC-Embedded */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15E91DBB21893E83001155DC /* Build configuration list for PBXNativeTarget "SCTest-ObjC-Embedded" */; + buildPhases = ( + 15E91DB521893E83001155DC /* Flush Module Cache */, + 15E91DB621893E83001155DC /* Sources */, + 15E91DB821893E83001155DC /* Frameworks */, + 15E91DBA21893E83001155DC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 15EF89A221894601003B2C5C /* PBXTargetDependency */, + ); + name = "SCTest-ObjC-Embedded"; + productName = "SCTest-ObjC"; + productReference = 15E91DBE21893E83001155DC /* SCTest-ObjC-Embedded */; + productType = "com.apple.product-type.tool"; + }; + 15E91DCC21893EE1001155DC /* SCTest-Swift-Embedded */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15E91DD321893EE1001155DC /* Build configuration list for PBXNativeTarget "SCTest-Swift-Embedded" */; + buildPhases = ( + 15E91DCF21893EE1001155DC /* Sources */, + 15E91DD121893EE1001155DC /* Frameworks */, + 15E91DD221893EE1001155DC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 15EF89A42189461B003B2C5C /* PBXTargetDependency */, + ); + name = "SCTest-Swift-Embedded"; + productName = "SCTest-Swift"; + productReference = 15E91DD621893EE1001155DC /* SCTest-Swift-Embedded */; + productType = "com.apple.product-type.tool"; + }; + 15EF89A521894636003B2C5C /* SCTest-ObjC-EmbeddedSimulator */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15EF89AE21894636003B2C5C /* Build configuration list for PBXNativeTarget "SCTest-ObjC-EmbeddedSimulator" */; + buildPhases = ( + 15EF89A821894636003B2C5C /* Flush Module Cache */, + 15EF89A921894636003B2C5C /* Sources */, + 15EF89AB21894636003B2C5C /* Frameworks */, + 15EF89AD21894636003B2C5C /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 15EF89BE2189467B003B2C5C /* PBXTargetDependency */, + ); + name = "SCTest-ObjC-EmbeddedSimulator"; + productName = "SCTest-ObjC"; + productReference = 15EF89B121894636003B2C5C /* SCTest-ObjC-EmbeddedSimulator */; + productType = "com.apple.product-type.tool"; + }; + 15EF89B221894665003B2C5C /* SCTest-Swift-EmbeddedSimulator */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15EF89B921894665003B2C5C /* Build configuration list for PBXNativeTarget "SCTest-Swift-EmbeddedSimulator" */; + buildPhases = ( + 15EF89B521894665003B2C5C /* Sources */, + 15EF89B721894665003B2C5C /* Frameworks */, + 15EF89B821894665003B2C5C /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 15EF89C021894688003B2C5C /* PBXTargetDependency */, + ); + name = "SCTest-Swift-EmbeddedSimulator"; + productName = "SCTest-Swift"; + productReference = 15EF89BC21894665003B2C5C /* SCTest-Swift-EmbeddedSimulator */; + productType = "com.apple.product-type.tool"; + }; + 15F742DA1EC6370000DA2E7A /* liblog_SystemConfiguration-Embedded */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15F742E11EC6370000DA2E7A /* Build configuration list for PBXNativeTarget "liblog_SystemConfiguration-Embedded" */; + buildPhases = ( + 15F742DB1EC6370000DA2E7A /* Headers */, + 15F742DC1EC6370000DA2E7A /* Sources */, + 15F742DE1EC6370000DA2E7A /* Frameworks */, + 1513C35E1F186C310022398F /* Update "install_path" for address|thread sanitizers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "liblog_SystemConfiguration-Embedded"; + productInstallPath = /usr/local/lib/system; + productName = DNSConfiguration; + productReference = 15F742E41EC6370000DA2E7A /* liblog_SystemConfiguration.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + 15F742E71EC638D100DA2E7A /* liblog_SystemConfiguration-EmbeddedSimulator */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15F742EE1EC638D100DA2E7A /* Build configuration list for PBXNativeTarget "liblog_SystemConfiguration-EmbeddedSimulator" */; + buildPhases = ( + 15F742E81EC638D100DA2E7A /* Headers */, + 15F742E91EC638D100DA2E7A /* Sources */, + 15F742EB1EC638D100DA2E7A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "liblog_SystemConfiguration-EmbeddedSimulator"; + productInstallPath = /usr/local/lib/system; + productName = DNSConfiguration; + productReference = 15F742F11EC638D100DA2E7A /* liblog_SystemConfiguration.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; 15FD72930754DA2B001CC321 /* InterfaceNamer.bundle */ = { isa = PBXNativeTarget; buildConfigurationList = 156EB5FA0905594A00EEF749 /* Build configuration list for PBXNativeTarget "InterfaceNamer.bundle" */; @@ -4374,7 +5288,6 @@ buildConfigurationList = 156EB5F20905594A00EEF749 /* Build configuration list for PBXNativeTarget "IPMonitor.bundle" */; buildPhases = ( 15FD72A20754DA4C001CC321 /* Resources */, - 15D54E2A15B4FAF100F5229A /* com.apple.networking.IPMonitor */, ); buildRules = ( ); @@ -4418,23 +5331,131 @@ productReference = 15FD72C90754DA7E001CC321 /* PreferencesMonitor.bundle */; productType = "com.apple.product-type.bundle"; }; + 72573D251D667372004975AD /* sctest */ = { + isa = PBXNativeTarget; + buildConfigurationList = 72573D2A1D667372004975AD /* Build configuration list for PBXNativeTarget "sctest" */; + buildPhases = ( + 72573D221D667372004975AD /* Sources */, + 72573D231D667372004975AD /* Frameworks */, + 1513C35B1F186AE20022398F /* Update "install_path" for address|thread sanitizers */, + 72573D241D667372004975AD /* npt_configd.plist */, + 72C12CB21D6FEFBE000EE61C /* Fix plist ownership */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = sctest; + productName = sctest; + productReference = 72573D261D667372004975AD /* sctest */; + productType = "com.apple.product-type.tool"; + }; + 7271EA1B1D76600B0055B1AA /* sctest-Embedded */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7271EA2F1D76600B0055B1AA /* Build configuration list for PBXNativeTarget "sctest-Embedded" */; + buildPhases = ( + 7271EA1D1D76600B0055B1AA /* Sources */, + 7271EA271D76600B0055B1AA /* Frameworks */, + 1513C3621F186C560022398F /* Update "install_path" for address|thread sanitizers */, + 7271EA2C1D76600B0055B1AA /* npt_configd.plist */, + 7271EA2E1D76600B0055B1AA /* Fix plist ownership */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "sctest-Embedded"; + productName = sctest; + productReference = 7271EA321D76600B0055B1AA /* sctest */; + productType = "com.apple.product-type.tool"; + }; + 72D3E65D1AE6EA3900DB4C69 /* SCTest-Swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 72D3E6621AE6EA3A00DB4C69 /* Build configuration list for PBXNativeTarget "SCTest-Swift" */; + buildPhases = ( + 72D3E65A1AE6EA3900DB4C69 /* Sources */, + 72D3E65B1AE6EA3900DB4C69 /* Frameworks */, + 72D3E65C1AE6EA3900DB4C69 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 723050321AE6F292004AC149 /* PBXTargetDependency */, + ); + name = "SCTest-Swift"; + productName = "SCTest-Swift"; + productReference = 72D3E65E1AE6EA3A00DB4C69 /* SCTest-Swift */; + productType = "com.apple.product-type.tool"; + }; + 72D3E6681AE6EAF600DB4C69 /* SCTest-ObjC */ = { + isa = PBXNativeTarget; + buildConfigurationList = 72D3E66D1AE6EAF600DB4C69 /* Build configuration list for PBXNativeTarget "SCTest-ObjC" */; + buildPhases = ( + 150EC0FE21016BAA0047F4BF /* Flush Module Cache */, + 72D3E6651AE6EAF600DB4C69 /* Sources */, + 72D3E6661AE6EAF600DB4C69 /* Frameworks */, + 72D3E6671AE6EAF600DB4C69 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 723050341AE6F29D004AC149 /* PBXTargetDependency */, + ); + name = "SCTest-ObjC"; + productName = "SCTest-ObjC"; + 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 */, + ); + 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 = 0600; + LastUpgradeCheck = 1100; + TargetAttributes = { + 15401C1C21991506006326B7 = { + CreatedOnToolsVersion = 11.0; + }; + 72573D251D667372004975AD = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + }; + 72D3E65D1AE6EA3900DB4C69 = { + CreatedOnToolsVersion = 7.0; + }; + 72D3E6681AE6EAF600DB4C69 = { + CreatedOnToolsVersion = 7.0; + }; + C4666C70206ED01800247AB6 = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; + }; }; buildConfigurationList = 156EB63E0905594A00EEF749 /* Build configuration list for PBXProject "configd" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + en, + Base, ); mainGroup = 15CB68FC05C072220099E85F /* configd */; productRefGroup = 15CB690F05C0722B0099E85F /* Products */; @@ -4446,50 +5467,55 @@ 15DAD5DF075913CE0084A6ED /* libsystem_configuration */, 157BB8AE075924360025DA7A /* configd_base */, 15DAD63F07591A1A0084A6ED /* SystemConfiguration.framework */, - 1547001808455B98006787CE /* SCHelper */, 159D542007528E7C004F8947 /* configd_plugins */, - 159D53EB07528C61004F8947 /* IPMonitor */, - 15FD72A10754DA4C001CC321 /* IPMonitor.bundle */, - 159D53E407528C4A004F8947 /* InterfaceNamer */, - 15FD72930754DA2B001CC321 /* InterfaceNamer.bundle */, 159D53D307528BDA004F8947 /* KernelEventMonitor */, 15828AE60753B5F900AD4710 /* KernelEventMonitor.bundle */, + 159D53E407528C4A004F8947 /* InterfaceNamer */, + 15FD72930754DA2B001CC321 /* InterfaceNamer.bundle */, + 159D53EB07528C61004F8947 /* IPMonitor */, + 15FD72A10754DA4C001CC321 /* IPMonitor.bundle */, 159D53F207528C79004F8947 /* LinkConfiguration */, 15FD72B10754DA69001CC321 /* LinkConfiguration.bundle */, - 15213FF90E93E9F500DACD2C /* Logger.bundle */, 159D53F907528C95004F8947 /* PreferencesMonitor */, 15FD72C50754DA7E001CC321 /* PreferencesMonitor.bundle */, - 1528BFDB1357305400691881 /* SCNetworkReachability */, - 1528BFE31357309700691881 /* SCNetworkReachability.bundle */, + 155F49861C864F1400E47D08 /* QoSMarking */, + 155F498E1C864F3700E47D08 /* QoSMarking.bundle */, 155847FA07550D210046C2E9 /* configd_executables */, + 151D05FA1EC1491600E02E48 /* liblog_SystemConfiguration */, 159D549F07529FFF004F8947 /* configd */, 1558481207550EC10046C2E9 /* scselect */, 155847430754FDCD0046C2E9 /* scutil */, + 1547001808455B98006787CE /* SCHelper */, 151F5D990CCE98E50093AC3B /* SCMonitor */, + 72573D251D667372004975AD /* sctest */, + C4666C70206ED01800247AB6 /* SystemConfigurationEventFactory */, + 15401C1C21991506006326B7 /* configd_extras */, 151C1CC60CFB487000C5AFD6 /* All-Embedded */, 15C64A280F684C6B00D78394 /* configd_libSystem-Embedded */, 157A84D80D56C63900B6F1A0 /* libsystem_configuration-Embedded */, 158316CF0CFB774B006F62B9 /* configd_base-Embedded */, 1572C4A60CFB55B400E2776E /* SystemConfiguration.framework-Embedded */, - 158337990CFB6B9E0033AB93 /* SCHelper-Embedded */, 158316E30CFB7761006F62B9 /* configd_plugins-Embedded */, - 157A84F40D56C7E800B6F1A0 /* IPMonitor-Embedded */, - 1583177D0CFB85C8006F62B9 /* IPMonitor.bundle-Embedded */, 157A85050D56C8AA00B6F1A0 /* InterfaceNamer-Embedded */, 158317870CFB85DD006F62B9 /* InterfaceNamer.bundle-Embedded */, + 157A84F40D56C7E800B6F1A0 /* IPMonitor-Embedded */, + 1583177D0CFB85C8006F62B9 /* IPMonitor.bundle-Embedded */, 157A85100D56C8E000B6F1A0 /* KernelEventMonitor-Embedded */, 158317900CFB85F7006F62B9 /* KernelEventMonitor.bundle-Embedded */, 157A85260D56C91100B6F1A0 /* LinkConfiguration-Embedded */, 158317980CFB860C006F62B9 /* LinkConfiguration.bundle-Embedded */, - 156CA4790EF853BB00C59A18 /* Logger.bundle-Embedded */, 157A853C0D56C96F00B6F1A0 /* PreferencesMonitor-Embedded */, 158317A80CFB8639006F62B9 /* PreferencesMonitor.bundle-Embedded */, - 1528BFF013573FEE00691881 /* SCNetworkReachability-Embedded */, - 1528BFF813573FF500691881 /* SCNetworkReachability.bundle-Embedded */, + 155F49951C864F4E00E47D08 /* QoSMarking-Embedded */, + 155F499D1C864F5400E47D08 /* QoSMarking.bundle-Embedded */, 158317040CFB7782006F62B9 /* configd_executables-Embedded */, + 15F742DA1EC6370000DA2E7A /* liblog_SystemConfiguration-Embedded */, 158317230CFB80A1006F62B9 /* configd-Embedded */, 157433DD0D4A8122002ACA73 /* scselect-Embedded */, 157433F00D4A8137002ACA73 /* scutil-Embedded */, + 158337990CFB6B9E0033AB93 /* SCHelper-Embedded */, + 7271EA1B1D76600B0055B1AA /* sctest-Embedded */, + 15401C21219915BC006326B7 /* configd_extras-Embedded */, 15FD13BF0D59485000F9409C /* All-EmbeddedSimulator */, 157FDE3B164A075F0040D6A8 /* configd_libSystem-EmbeddedSimulator */, 15732AD616EA6B6700F3AC4C /* libsystem_configuration-EmbeddedSimulator */, @@ -4497,14 +5523,21 @@ 15A5A1E40D5B94190087BDA0 /* SystemConfiguration.framework-EmbeddedSimulator */, 15E1B04116EBAE3C00E5F06F /* IPMonitor-EmbeddedSimulator */, 15E1B05A16EBAE7800E5F06F /* IPMonitor.bundle-EmbeddedSimulator */, - 15AB751216EBFF3400FAA8CE /* SCNetworkReachability-EmbeddedSimulator */, - 15AB751A16EBFF8A00FAA8CE /* SCNetworkReachability.bundle-EmbeddedSimulator */, 15D3080F16F3E4DA00014F82 /* SimulatorSupport-EmbeddedSimulator */, 15D3082816F3E4E100014F82 /* SimulatorSupport.bundle-EmbeddedSimulator */, + 15631D161ECF98FB0088EEDD /* configd_executables-EmbeddedSimulator */, + 15F742E71EC638D100DA2E7A /* liblog_SystemConfiguration-EmbeddedSimulator */, 15732A7616EA503200F3AC4C /* configd-EmbeddedSimulator */, 15732AAD16EA511900F3AC4C /* scutil-EmbeddedSimulator */, - 151F63DA09328A3C0096DCC9 /* Schema */, + 15401C26219915C6006326B7 /* configd_extras-EmbeddedSimulator */, 15E83104167F9AF600FD51EC /* EVERYTHING */, + 151F63DA09328A3C0096DCC9 /* Schema */, + 72D3E6681AE6EAF600DB4C69 /* SCTest-ObjC */, + 15E91DB221893E83001155DC /* SCTest-ObjC-Embedded */, + 15EF89A521894636003B2C5C /* SCTest-ObjC-EmbeddedSimulator */, + 72D3E65D1AE6EA3900DB4C69 /* SCTest-Swift */, + 15E91DCC21893EE1001155DC /* SCTest-Swift-Embedded */, + 15EF89B221894665003B2C5C /* SCTest-Swift-EmbeddedSimulator */, ); }; /* End PBXProject section */ @@ -4518,28 +5551,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 15213FF60E93E9F500DACD2C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1528BFE41357309700691881 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1528BFF913573FF500691881 /* Resources */ = { + 155F498F1C864F3700E47D08 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 156CA4810EF853BB00C59A18 /* Resources */ = { + 155F499E1C864F5400E47D08 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -4552,6 +5571,7 @@ files = ( 1572C4DA0CFB55B400E2776E /* Localizable.strings in Resources */, 1572C4DB0CFB55B400E2776E /* NetworkInterface.strings in Resources */, + 72499BA51AC9B7AB0090C49F /* get-network-info in Resources */, 1572C4DC0CFB55B400E2776E /* NetworkConfiguration.plist in Resources */, 1572C4DD0CFB55B400E2776E /* get-mobility-info in Resources */, ); @@ -4609,13 +5629,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 15AB751B16EBFF8A00FAA8CE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 15D3082916F3E4E100014F82 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -4628,9 +5641,10 @@ buildActionMask = 2147483647; files = ( 15A6F7C40A4B266D00B907EA /* Localizable.strings in Resources */, - 15DAD66B07591A1A0084A6ED /* NetworkInterface.strings in Resources */, 15DAD66907591A1A0084A6ED /* NetworkConfiguration.plist in Resources */, + 15DAD66B07591A1A0084A6ED /* NetworkInterface.strings in Resources */, 15DAD66A07591A1A0084A6ED /* get-mobility-info in Resources */, + 72499BA41AC9B7AB0090C49F /* get-network-info in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4672,254 +5686,704 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 151F63DB09328A3C0096DCC9 /* ShellScript */ = { + 1502C5611BDD4936005CF7EA /* Move libsystem_configuration_(asan|tsan).dylib */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Move libsystem_configuration_(asan|tsan).dylib"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "#\n# move libsystem_configuration_[at]san.dylib out of /usr/lib/system\n#\n# Note: to use the asan/tsan .dylib, set DYLD_INSERT_LIBRARIES=...\n#\nfor VARIANT in ${BUILD_VARIANTS}\ndo\n if [ \"${VARIANT}\" = \"asan\" -o \"${VARIANT}\" = \"tsan\" ]; then\n DIR_O=\"/usr/lib/system\"\n DIR_N=\"/usr/local/lib\"\n DYLIB=\"libsystem_configuration_${VARIANT}.dylib\"\n\n\t\tmkdir -p \"${DSTROOT}/${DIR_N}\"\n\t\tmv \"${DSTROOT}/${DIR_O}/${DYLIB}\" \"${DSTROOT}/${DIR_N}/${DYLIB}\"\n\t\tif [ -d \"${DSTROOT}/${DIR_O}/${DYLIB}.dSYM\" ]; then\n\t\t\tmv \"${DSTROOT}/${DIR_O}/${DYLIB}.dSYM\" \"${DSTROOT}/${DIR_N}/${DYLIB}.dSYM\"\n\t\tfi\n fi\ndone"; + showEnvVarsInLog = 0; + }; + 150EC0FE21016BAA0047F4BF /* Flush Module Cache */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - SystemConfiguration.fproj/genSCPreferences.c, + ); + name = "Flush Module Cache"; + outputFileListPaths = ( ); outputPaths = ( - "${BUILT_PRODUCTS_DIR}/SCSchemaDefinitions.h", - "${BUILT_PRODUCTS_DIR}/SCSchemaDefinitionsPrivate.h", - "${BUILT_PRODUCTS_DIR}/SCSchemaDefinitions.c", ); runOnlyForDeploymentPostprocessing = 0; 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"; + shellScript = "rm -rf \"${CLANG_MODULE_CACHE_PATH}\"\n"; + showEnvVarsInLog = 0; }; - 153393E40D34999D00FE74E7 /* Update Headers */ = { + 1510A7301B17E1AF00125A85 /* Add framework symlink (TEMPORARY) */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(SRCROOT)/SystemConfiguration.fproj/update-headers", ); - name = "Update Headers"; + name = "Add framework symlink (TEMPORARY)"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} split\nfi"; + shellScript = "if [ \"${USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK}\" = \"YES\" ]; then\n mkdir -p ${DSTROOT}/System/Library/Frameworks\n cd ${DSTROOT}/System/Library/Frameworks\n rm -rf SystemConfiguration.framework\n ln -s ../PrivateFrameworks/SystemConfiguration.framework .\nfi"; showEnvVarsInLog = 0; }; - 1572C5270CFB55B400E2776E /* get-mobility-info */ = { + 1513C3561F1857E00022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 8; + buildActionMask = 12; files = ( ); inputPaths = ( ); - name = "get-mobility-info"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 1; + runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "mkdir -p \"${DSTROOT}/usr/local/bin\"\nln -fs \"${INSTALL_PATH}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/get-mobility-info\" \"${DSTROOT}/usr/local/bin/\"\n"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15A5A2170D5B94190087BDA0 /* Update Headers */ = { + 1513C3571F1869530022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 12; files = ( ); inputPaths = ( - "$(SRCROOT)/SystemConfiguration.fproj/update-headers", ); - name = "Update Headers"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} split\nfi"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15AC82480D376E2400A579D0 /* Update Headers */ = { + 1513C3581F1869630022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 12; files = ( ); inputPaths = ( - "$(SRCROOT)/SystemConfiguration.fproj/update-headers", ); - name = "Update Headers"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} clean\nfi\n"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15DAD6AC07591A1A0084A6ED /* SystemConfiguration.order */ = { + 1513C3591F18697C0022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 12; files = ( ); inputPaths = ( - /usr/local/lib/OrderFiles/SystemConfiguration.order, ); - name = SystemConfiguration.order; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( - "${OBJROOT}/SystemConfiguration.order", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -r /usr/local/lib/OrderFiles/SystemConfiguration.order ]; then\n\tcp /usr/local/lib/OrderFiles/SystemConfiguration.order ${OBJROOT}/SystemConfiguration.order\nelse\n\ttouch ${OBJROOT}/SystemConfiguration.order\nfi"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15DAD6B007591A1A0084A6ED /* get-mobility-info */ = { + 1513C35A1F186A700022398F /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 1513C35B1F186AE20022398F /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 1513C35C1F186BF90022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; files = ( ); inputPaths = ( ); - name = "get-mobility-info"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "mkdir -p \"${DSTROOT}/usr/local/bin\"\nln -fs \"${INSTALL_PATH}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/get-mobility-info\" \"${DSTROOT}/usr/local/bin/\"\n"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15FBB54D17D75DE70035D752 /* Update MachServices */ = { + 1513C35D1F186C0B0022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 8; files = ( ); inputPaths = ( - "$(SRCROOT)/configd.tproj/update-mach-services", ); - name = "Update MachServices"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 0; + runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n ${SCRIPT_INPUT_FILE_0} com.apple.configd.plist\nfi"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15FBB55117D78B670035D752 /* Update MachServices */ = { + 1513C35E1F186C310022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 8; files = ( ); inputPaths = ( - "$(SRCROOT)/configd.tproj/update-mach-services", ); - name = "Update MachServices"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 0; + runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} com.apple.configd.plist\nfi"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15FBB55217D78B9F0035D752 /* Update MachServices */ = { + 1513C35F1F186C3A0022398F /* Update "install_path" for address|thread sanitizers */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 8; files = ( ); inputPaths = ( - "$(SRCROOT)/configd.tproj/update-mach-services", ); - name = "Update MachServices"; + name = "Update \"install_path\" for address|thread sanitizers"; outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 0; + runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} com.apple.configd_sim.plist\nfi"; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 151F5D970CCE98E50093AC3B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + 1513C3601F186C460022398F /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; files = ( - 15FC130B0CCEA59E0013872C /* monitor.c in Sources */, ); - runOnlyForDeploymentPostprocessing = 0; + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; }; - 15213FF70E93E9F500DACD2C /* Sources */ = { - isa = PBXSourcesBuildPhase; + 1513C3611F186C4D0022398F /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 1513C3621F186C560022398F /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 151F63DB09328A3C0096DCC9 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 152140020E93EC6500DACD2C /* logger.c in Sources */, + ); + inputPaths = ( + SystemConfiguration.fproj/genSCPreferences.c, + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/SCSchemaDefinitions.h", + "${BUILT_PRODUCTS_DIR}/SCSchemaDefinitionsPrivate.h", + "${BUILT_PRODUCTS_DIR}/SCSchemaDefinitions.c", ); runOnlyForDeploymentPostprocessing = 0; + 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"; }; - 1528BFDD1357305400691881 /* Sources */ = { - isa = PBXSourcesBuildPhase; + 153393E40D34999D00FE74E7 /* Restore temporary headers */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 1528BFEF135733F500691881 /* SCNetworkReachabilityServer_server.c in Sources */, + ); + inputPaths = ( + "$(SRCROOT)/SystemConfiguration.fproj/restore-temporary-headers", + ); + name = "Restore temporary headers"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n ${SCRIPT_INPUT_FILE_0} \"${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}\"\nfi\n"; + showEnvVarsInLog = 0; }; - 1528BFF213573FEE00691881 /* Sources */ = { - isa = PBXSourcesBuildPhase; + 1535FEDC1B0FDDCD00B2A3AD /* Add framework symlink (TEMPORARY) */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 1528BFF313573FEE00691881 /* SCNetworkReachabilityServer_server.c in Sources */, + ); + inputPaths = ( + ); + name = "Add framework symlink (TEMPORARY)"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ \"${USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK}\" = \"YES\" ]; then\n mkdir -p ${DSTROOT}/System/Library/Frameworks\n cd ${DSTROOT}/System/Library/Frameworks\n rm -rf SystemConfiguration.framework\n ln -s ../PrivateFrameworks/SystemConfiguration.framework .\nfi"; + showEnvVarsInLog = 0; }; - 1547001A08455B98006787CE /* Sources */ = { - isa = PBXSourcesBuildPhase; + 15401C2021991549006326B7 /* Create non-empty Root */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 15DAF2E108466D4900D1B2BD /* SCHelper_server.c in Sources */, - 152E0E7F10FE820E00E402F2 /* helper.defs in Sources */, + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Create non-empty Root"; + outputFileListPaths = ( + ); + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "mkdir -p \"${DSTROOT}/AppleInternal\"\n"; + showEnvVarsInLog = 0; }; - 155847540754FDCD0046C2E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; + 15401C22219915BC006326B7 /* Create non-empty Root */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 155847550754FDCD0046C2E9 /* scutil.c in Sources */, - 155847560754FDCD0046C2E9 /* commands.c in Sources */, - 155847570754FDCD0046C2E9 /* dictionary.c in Sources */, - 155847580754FDCD0046C2E9 /* session.c in Sources */, - 155847590754FDCD0046C2E9 /* cache.c in Sources */, - 1558475A0754FDCD0046C2E9 /* notifications.c in Sources */, - 1558475B0754FDCD0046C2E9 /* tests.c in Sources */, - 1558475C0754FDCD0046C2E9 /* prefs.c in Sources */, - 1558475D0754FDCD0046C2E9 /* net.c in Sources */, - 1558475E0754FDCD0046C2E9 /* net_interface.c in Sources */, - 1558475F0754FDCD0046C2E9 /* net_protocol.c in Sources */, - 155847600754FDCD0046C2E9 /* net_service.c in Sources */, - 155847610754FDCD0046C2E9 /* net_set.c in Sources */, - 72B43729113C7BFC00EBF1B6 /* nc.c in Sources */, - F9B50FF316A4CBB200CA274E /* IPMonitorControlPrefs.c in Sources */, + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Create non-empty Root"; + outputFileListPaths = ( + ); + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "mkdir -p \"${DSTROOT}/AppleInternal\"\n"; + showEnvVarsInLog = 0; }; - 1558481507550EC10046C2E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; + 15401C27219915C6006326B7 /* Create non-empty Root */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 1558481607550EC10046C2E9 /* scselect.c in Sources */, + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Create non-empty Root"; + outputFileListPaths = ( + ); + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "mkdir -p \"${DSTROOT}/AppleInternal\"\n"; + showEnvVarsInLog = 0; }; - 156CA47A0EF853BB00C59A18 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + 154070A01B968548003195EF /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; files = ( - 156CA47B0EF853BB00C59A18 /* logger.c in Sources */, + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; }; - 1572C4DE0CFB55B400E2776E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + 154070A11B98E8D3003195EF /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; files = ( - F9347FF7187C796E003D4178 /* IPMonitorControl.c in Sources */, - 1572C5140CFB55B400E2776E /* config.defs in Sources */, + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 1572C5270CFB55B400E2776E /* get-mobility-info */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "get-mobility-info"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + 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 /* Rename/update SCHelper launchd .plist */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Rename/update SCHelper launchd .plist"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + 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 /* Restore temporary headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/SystemConfiguration.fproj/restore-temporary-headers", + ); + name = "Restore temporary headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n${SCRIPT_INPUT_FILE_0} \"${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 15A66BB11F18177100F7253B /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 15A66BB21F1817AC00F7253B /* Update "install_path" for address|thread sanitizers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + ); + name = "Update \"install_path\" for address|thread sanitizers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; + showEnvVarsInLog = 0; + }; + 15AC9A4C1BE3ED87003071BD /* Move libsystem_configuration_(asan|tsan).dylib */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Move libsystem_configuration_(asan|tsan).dylib"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "#\n# move libsystem_configuration_[at]san.dylib out of /usr/lib/system\n#\n# Note: to use the asan/tsan .dylib, set DYLD_INSERT_LIBRARIES=...\n#\nfor VARIANT in ${BUILD_VARIANTS}\ndo\n if [ \"${VARIANT}\" = \"asan\" -o \"${VARIANT}\" = \"tsan\" ]; then\n DIR_O=\"/usr/lib/system\"\n DIR_N=\"/usr/local/lib\"\n DYLIB=\"libsystem_configuration_${VARIANT}.dylib\"\n\n\t\tmkdir -p \"${DSTROOT}/${DIR_N}\"\n\t\tmv \"${DSTROOT}/${DIR_O}/${DYLIB}\" \"${DSTROOT}/${DIR_N}/${DYLIB}\"\n\t\tif [ -d \"${DSTROOT}/${DIR_O}/${DYLIB}.dSYM\" ]; then\n\t\t\tmv \"${DSTROOT}/${DIR_O}/${DYLIB}.dSYM\" \"${DSTROOT}/${DIR_N}/${DYLIB}.dSYM\"\n\t\tfi\n fi\ndone"; + showEnvVarsInLog = 0; + }; + 15DAD6AC07591A1A0084A6ED /* SystemConfiguration.order */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + /usr/local/lib/OrderFiles/SystemConfiguration.order, + ); + name = SystemConfiguration.order; + outputPaths = ( + "${OBJROOT}/SystemConfiguration.order", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -r /usr/local/lib/OrderFiles/SystemConfiguration.order ]; then\n\tcp /usr/local/lib/OrderFiles/SystemConfiguration.order ${OBJROOT}/SystemConfiguration.order\nelse\n\ttouch ${OBJROOT}/SystemConfiguration.order\nfi"; + showEnvVarsInLog = 0; + }; + 15DAD6B007591A1A0084A6ED /* get-mobility-info */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "get-mobility-info"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + 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; + }; + 15E91DB521893E83001155DC /* Flush Module Cache */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Flush Module Cache"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "rm -rf \"${CLANG_MODULE_CACHE_PATH}\"\n"; + showEnvVarsInLog = 0; + }; + 15EF89A821894636003B2C5C /* Flush Module Cache */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Flush Module Cache"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "rm -rf \"${CLANG_MODULE_CACHE_PATH}\"\n"; + showEnvVarsInLog = 0; + }; + 15FBB54D17D75DE70035D752 /* Update MachServices */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/configd.tproj/update-mach-services", + ); + name = "Update MachServices"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n ${SCRIPT_INPUT_FILE_0} com.apple.configd.plist\nfi"; + showEnvVarsInLog = 0; + }; + 15FBB55117D78B670035D752 /* Update MachServices */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/configd.tproj/update-mach-services", + ); + name = "Update MachServices"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} com.apple.configd.plist\nfi"; + showEnvVarsInLog = 0; + }; + 15FBB55217D78B9F0035D752 /* Update MachServices */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/configd.tproj/update-mach-services", + ); + name = "Update MachServices"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} com.apple.configd_sim.plist\nfi"; + showEnvVarsInLog = 0; + }; + 7271EA2E1D76600B0055B1AA /* Fix plist ownership */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Fix plist ownership"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "if [ ${UID} -eq 0 ]; then\n\tchown 0:0 \"${DSTROOT}/AppleInternal/CoreOS/BATS/npt_tests/npt_configd.plist\"\nfi\n\nexit 0"; + }; + 72C12CB21D6FEFBE000EE61C /* Fix plist ownership */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Fix plist ownership"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "if [ ${UID} -eq 0 ]; then\n\tchown 0:0 \"${DSTROOT}/AppleInternal/CoreOS/BATS/npt_tests/npt_configd.plist\"\nfi\n\nexit 0"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 151D06011EC1491600E02E48 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 151D060E1EC14C8600E02E48 /* liblog_SystemConfiguration.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 151F5D970CCE98E50093AC3B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15FC130B0CCEA59E0013872C /* monitor.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1547001A08455B98006787CE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15DAF2E108466D4900D1B2BD /* SCHelper_server.c in Sources */, + 152E0E7F10FE820E00E402F2 /* helper.defs in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 155847540754FDCD0046C2E9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 155847550754FDCD0046C2E9 /* scutil.c in Sources */, + 155847560754FDCD0046C2E9 /* commands.c in Sources */, + 155847570754FDCD0046C2E9 /* dictionary.c in Sources */, + 155847580754FDCD0046C2E9 /* session.c in Sources */, + 155847590754FDCD0046C2E9 /* cache.c in Sources */, + 1558475A0754FDCD0046C2E9 /* notifications.c in Sources */, + 1558475B0754FDCD0046C2E9 /* tests.c in Sources */, + 1558475C0754FDCD0046C2E9 /* prefs.c in Sources */, + 1558475D0754FDCD0046C2E9 /* net.c in Sources */, + 1558475E0754FDCD0046C2E9 /* net_interface.c in Sources */, + 1558475F0754FDCD0046C2E9 /* net_protocol.c in Sources */, + 155847600754FDCD0046C2E9 /* net_service.c in Sources */, + 155847610754FDCD0046C2E9 /* net_set.c in Sources */, + 72B43729113C7BFC00EBF1B6 /* nc.c in Sources */, + 15FB1F8B1E27EA8900B4F809 /* InterfaceNamerControlPrefs.c in Sources */, + F9B50FF316A4CBB200CA274E /* IPMonitorControlPrefs.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1558481507550EC10046C2E9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1558481607550EC10046C2E9 /* scselect.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 155F49881C864F1400E47D08 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 155F49A61C864FFC00E47D08 /* qos-marking.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 155F49971C864F4E00E47D08 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 155F49A71C86500100E47D08 /* qos-marking.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1572C4DE0CFB55B400E2776E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1572C5140CFB55B400E2776E /* config.defs in Sources */, + 158E595F1107CAE80062081E /* helper.defs in Sources */, + 1572C5090CFB55B400E2776E /* pppcontroller.defs in Sources */, 1572C4DF0CFB55B400E2776E /* SCSchemaDefinitions.c in Sources */, 1572C4E00CFB55B400E2776E /* SCD.c in Sources */, 1572C4E10CFB55B400E2776E /* SCDKeys.c in Sources */, @@ -4939,7 +6403,6 @@ 1572C4F20CFB55B400E2776E /* SCDNotifierWait.c in Sources */, 1572C4F30CFB55B400E2776E /* SCDNotifierInformViaCallback.c in Sources */, 1572C4F50CFB55B400E2776E /* SCDNotifierInformViaFD.c in Sources */, - 1572C4F60CFB55B400E2776E /* SCDNotifierInformViaSignal.c in Sources */, 1572C4F70CFB55B400E2776E /* SCDNotifierCancel.c in Sources */, 1572C4F80CFB55B400E2776E /* SCDSnapshot.c in Sources */, 1572C4F90CFB55B400E2776E /* SCP.c in Sources */, @@ -4953,24 +6416,22 @@ 1572C5000CFB55B400E2776E /* SCPSet.c in Sources */, 1572C5010CFB55B400E2776E /* SCPRemove.c in Sources */, 1572C5020CFB55B400E2776E /* SCPCommit.c in Sources */, + F90E43592012AD6B00EF27C4 /* 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 */, - 1572C5090CFB55B400E2776E /* pppcontroller.defs in Sources */, 1572C50A0CFB55B400E2776E /* SCNetworkConnection.c in Sources */, 1572C50B0CFB55B400E2776E /* SCNetworkConnectionPrivate.c in Sources */, 1572C50C0CFB55B400E2776E /* SCNetworkReachability.c in Sources */, 1572C50D0CFB55B400E2776E /* SCProxies.c in Sources */, 1572C50E0CFB55B400E2776E /* DHCP.c in Sources */, - 1572C50F0CFB55B400E2776E /* moh.c in Sources */, - 1572C5100CFB55B400E2776E /* DeviceOnHold.c in Sources */, 1572C5110CFB55B400E2776E /* LinkConfiguration.c in Sources */, 1572C5120CFB55B400E2776E /* dy_framework.c in Sources */, 1572C5150CFB55B400E2776E /* SCPreferencesPathKey.c in Sources */, 1572C5190CFB55B400E2776E /* SCNetworkConfigurationInternal.c in Sources */, 1572C51A0CFB55B400E2776E /* SCNetworkInterface.c in Sources */, + 1542400621626F5C00C7CE8B /* SCDCache.c in Sources */, 1572C51B0CFB55B400E2776E /* SCNetworkProtocol.c in Sources */, 1572C51C0CFB55B400E2776E /* SCNetworkService.c in Sources */, 1572C51D0CFB55B400E2776E /* SCNetworkSet.c in Sources */, @@ -4982,14 +6443,13 @@ 159A751E107FEAA400A57EAB /* VPNPrivate.c in Sources */, 159A7520107FEAA400A57EAB /* VPNConfiguration.c in Sources */, 15AAA7F6108E310700C2A607 /* VPNTunnel.c in Sources */, - 158E595F1107CAE80062081E /* helper.defs in Sources */, 152691DB1129EEA6006BD2D5 /* BridgeConfiguration.c in Sources */, 152691DE1129EEC2006BD2D5 /* VLANConfiguration.c in Sources */, - 15C330BD134B92780028E36B /* SCNetworkReachabilityServer_client.c in Sources */, D61AAEB01522C99C0066B003 /* scprefs_observer.c in Sources */, C4F1848116237AFC00D97043 /* VPNService.c in Sources */, C4CDB8161631935700819B44 /* VPNFlow.c in Sources */, B03FEFB716376D2800A1B88F /* VPNAppLayer.c in Sources */, + F9347FF7187C796E003D4178 /* IPMonitorControl.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4997,10 +6457,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 15732A9816EA503200F3AC4C /* config.defs in Sources */, 15732A8016EA503200F3AC4C /* configd.m in Sources */, 15732A8116EA503200F3AC4C /* _SCD.c in Sources */, 15732A8216EA503200F3AC4C /* configd_server.c in Sources */, - 15732A8316EA503200F3AC4C /* notify_server.c in Sources */, 15732A8416EA503200F3AC4C /* plugin_support.c in Sources */, 15732A8516EA503200F3AC4C /* session.c in Sources */, 15732A8616EA503200F3AC4C /* pattern.c in Sources */, @@ -5018,12 +6478,8 @@ 15732A9216EA503200F3AC4C /* _notifychanges.c in Sources */, 15732A9316EA503200F3AC4C /* _notifyviaport.c in Sources */, 15732A9416EA503200F3AC4C /* _notifyviafd.c in Sources */, - 15732A9516EA503200F3AC4C /* _notifyviasignal.c in Sources */, 15732A9616EA503200F3AC4C /* _notifycancel.c in Sources */, 15732A9716EA503200F3AC4C /* _snapshot.c in Sources */, - 15732A9816EA503200F3AC4C /* config.defs in Sources */, - 15732A9916EA503200F3AC4C /* dnsinfo_server.c in Sources */, - 15732A9A16EA503200F3AC4C /* SCNetworkReachabilityServer_server.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5096,6 +6552,7 @@ 157A84DF0D56C63900B6F1A0 /* dnsinfo_copy.c in Sources */, D661C2F11368BB600030B977 /* network_information.c in Sources */, 153338BD14BE7978004FCE22 /* libSystemConfiguration_client.c in Sources */, + 726DB2F41BEA80E5001B2C6C /* config_agent_info.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5105,16 +6562,26 @@ files = ( 157A84FB0D56C7E800B6F1A0 /* dns-configuration.c in Sources */, 15D48EC10F67061F00B4711E /* dnsinfo_create.c in Sources */, - F9B7AE69186211CE00C78D18 /* IPMonitorControlServer.c in Sources */, + 159FFD5F2110EA44009311DD /* dnsinfo_flatfile.c in Sources */, 150BEC1A14CA252200237116 /* dnsinfo_server.c in Sources */, + 7280158E1BE16863009F4F60 /* dnsAgent.m in Sources */, + F9B7AE69186211CE00C78D18 /* IPMonitorControlServer.c in Sources */, + 728015881BE16851009F4F60 /* configAgent.m in Sources */, + 728015911BE1686C009F4F60 /* proxyAgent.m in Sources */, 155281020E3E4A0F00C54315 /* ip_plugin.c in Sources */, - E4F211D3137B0AB900BBB915 /* network_information_priv.c in Sources */, + E4F211D3137B0AB900BBB915 /* network_state_information_priv.c in Sources */, 153ACCA914E322D5005029A5 /* network_information_server.c in Sources */, + F97289D322652D0600080596 /* serviceIDNumber.c in Sources */, 1575FD2712CD15C60003D86E /* proxy-configuration.c in Sources */, 157A84FC0D56C7E800B6F1A0 /* set-hostname.c in Sources */, + 1501F76A1EA8019D006A71B0 /* nat64-configuration.c in Sources */, + 7280158B1BE1685B009F4F60 /* controller.m in Sources */, + 728015821BE16840009F4F60 /* agent-monitor.m in Sources */, 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; }; @@ -5131,7 +6598,6 @@ buildActionMask = 2147483647; files = ( 157A851E0D56C8E000B6F1A0 /* eventmon.c in Sources */, - 157A85190D56C8E000B6F1A0 /* cache.c in Sources */, 157A851B0D56C8E000B6F1A0 /* ev_dlil.c in Sources */, 157A851C0D56C8E000B6F1A0 /* ev_ipv4.c in Sources */, 157A851D0D56C8E000B6F1A0 /* ev_ipv6.c in Sources */, @@ -5159,10 +6625,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 158317470CFB80A1006F62B9 /* config.defs in Sources */, 1583172D0CFB80A1006F62B9 /* configd.m in Sources */, 1583172E0CFB80A1006F62B9 /* _SCD.c in Sources */, 1583172F0CFB80A1006F62B9 /* configd_server.c in Sources */, - 158317300CFB80A1006F62B9 /* notify_server.c in Sources */, 158317310CFB80A1006F62B9 /* plugin_support.c in Sources */, 158317320CFB80A1006F62B9 /* session.c in Sources */, 158317330CFB80A1006F62B9 /* pattern.c in Sources */, @@ -5180,12 +6646,8 @@ 158317410CFB80A1006F62B9 /* _notifychanges.c in Sources */, 158317420CFB80A1006F62B9 /* _notifyviaport.c in Sources */, 158317430CFB80A1006F62B9 /* _notifyviafd.c in Sources */, - 158317440CFB80A1006F62B9 /* _notifyviasignal.c in Sources */, 158317450CFB80A1006F62B9 /* _notifycancel.c in Sources */, 158317460CFB80A1006F62B9 /* _snapshot.c in Sources */, - 158317470CFB80A1006F62B9 /* config.defs in Sources */, - 158317490CFB80A1006F62B9 /* dnsinfo_server.c in Sources */, - 15C330E5134BD2AC0028E36B /* SCNetworkReachabilityServer_server.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5193,8 +6655,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1583379E0CFB6B9E0033AB93 /* SCHelper_server.c in Sources */, 152E0E8010FE820E00E402F2 /* helper.defs in Sources */, + 1583379E0CFB6B9E0033AB93 /* SCHelper_server.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5203,7 +6665,6 @@ buildActionMask = 2147483647; files = ( 159D541307528DB5004F8947 /* eventmon.c in Sources */, - 159D540907528D3A004F8947 /* cache.c in Sources */, 159D540D07528DAE004F8947 /* ev_dlil.c in Sources */, 159D540F07528DB0004F8947 /* ev_ipv4.c in Sources */, 159D541107528DB2004F8947 /* ev_ipv6.c in Sources */, @@ -5216,6 +6677,7 @@ buildActionMask = 2147483647; files = ( 159D541607528DF1004F8947 /* ifnamer.c in Sources */, + 15FB1F8A1E27EA8700B4F809 /* InterfaceNamerControlPrefs.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5224,19 +6686,28 @@ buildActionMask = 2147483647; files = ( 159D541807528E09004F8947 /* dns-configuration.c in Sources */, + 728015871BE1684E009F4F60 /* configAgent.m in Sources */, 15D48EBF0F67061600B4711E /* dnsinfo_create.c in Sources */, 1522FCFB0FA7FE4B00B24128 /* dnsinfo_flatfile.c in Sources */, 150BEC1814CA24F900237116 /* dnsinfo_server.c in Sources */, - F9B7AE6A186211D300C78D18 /* IPMonitorControlServer.c in Sources */, 159D541707528E05004F8947 /* ip_plugin.c in Sources */, - E49173E1137C4E4F0000089F /* network_information_priv.c in Sources */, + 7280158D1BE16861009F4F60 /* dnsAgent.m in Sources */, + E49173E1137C4E4F0000089F /* network_state_information_priv.c in Sources */, + 1501F7691EA80189006A71B0 /* nat64-configuration.c in Sources */, 153ACCA814E322D5005029A5 /* network_information_server.c in Sources */, 1575FD2912CD15C60003D86E /* proxy-configuration.c in Sources */, 154361E00752C81800A8EC6C /* set-hostname.c in Sources */, + 728015921BE1686F009F4F60 /* proxyAgent.m in Sources */, 1572EB7B0A506D3B00D02459 /* smb-configuration.c in Sources */, 1596A7B114EDB73D00798C39 /* libSystemConfiguration_server.c in Sources */, + 728015811BE1683B009F4F60 /* agent-monitor.m in Sources */, + 7280158C1BE1685D009F4F60 /* controller.m in Sources */, 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 */, + F97289D422652D0A00080596 /* serviceIDNumber.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5260,10 +6731,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 159D54C607529FFF004F8947 /* config.defs in Sources */, 159D54AC07529FFF004F8947 /* configd.m in Sources */, 159D54AD07529FFF004F8947 /* _SCD.c in Sources */, 159D54AE07529FFF004F8947 /* configd_server.c in Sources */, - 159D54AF07529FFF004F8947 /* notify_server.c in Sources */, 159D54B007529FFF004F8947 /* plugin_support.c in Sources */, 159D54B107529FFF004F8947 /* session.c in Sources */, 159D54B207529FFF004F8947 /* pattern.c in Sources */, @@ -5281,11 +6752,8 @@ 159D54C007529FFF004F8947 /* _notifychanges.c in Sources */, 159D54C107529FFF004F8947 /* _notifyviaport.c in Sources */, 159D54C207529FFF004F8947 /* _notifyviafd.c in Sources */, - 159D54C307529FFF004F8947 /* _notifyviasignal.c in Sources */, 159D54C407529FFF004F8947 /* _notifycancel.c in Sources */, 159D54C507529FFF004F8947 /* _snapshot.c in Sources */, - 159D54C607529FFF004F8947 /* config.defs in Sources */, - 159D54C807529FFF004F8947 /* dnsinfo_server.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5293,6 +6761,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 15A5A2530D5B94190087BDA0 /* config.defs in Sources */, + 158E59611107CAF40062081E /* helper.defs in Sources */, + 15A5A2480D5B94190087BDA0 /* pppcontroller.defs in Sources */, 15A5A21E0D5B94190087BDA0 /* SCSchemaDefinitions.c in Sources */, 15A5A21F0D5B94190087BDA0 /* SCD.c in Sources */, 15A5A2200D5B94190087BDA0 /* SCDKeys.c in Sources */, @@ -5312,9 +6783,10 @@ 15A5A2310D5B94190087BDA0 /* SCDNotifierWait.c in Sources */, 15A5A2320D5B94190087BDA0 /* SCDNotifierInformViaCallback.c in Sources */, 15A5A2340D5B94190087BDA0 /* SCDNotifierInformViaFD.c in Sources */, - 15A5A2350D5B94190087BDA0 /* SCDNotifierInformViaSignal.c in Sources */, + 1542400721626F6000C7CE8B /* SCDCache.c in Sources */, 15A5A2360D5B94190087BDA0 /* SCDNotifierCancel.c in Sources */, 15A5A2370D5B94190087BDA0 /* SCDSnapshot.c in Sources */, + 15EF89CA21894AB4003B2C5C /* SNHelper.c in Sources */, 15A5A2380D5B94190087BDA0 /* SCP.c in Sources */, 15A5A2390D5B94190087BDA0 /* SCPOpen.c in Sources */, 15A5A23A0D5B94190087BDA0 /* SCPLock.c in Sources */, @@ -5325,22 +6797,18 @@ 15A5A23F0D5B94190087BDA0 /* SCPSet.c in Sources */, 15A5A2400D5B94190087BDA0 /* SCPRemove.c in Sources */, 15A5A2410D5B94190087BDA0 /* SCPCommit.c in Sources */, + 15EF89C921894AA5003B2C5C /* SCNetworkInterfaceProvider.c in Sources */, 15A5A2420D5B94190087BDA0 /* SCPApply.c in Sources */, 15A5A2430D5B94190087BDA0 /* SCPPath.c in Sources */, 15A5A2450D5B94190087BDA0 /* SCDHostName.c in Sources */, 15A5A2460D5B94190087BDA0 /* SCLocation.c in Sources */, - 15A5A2470D5B94190087BDA0 /* SCNetwork.c in Sources */, - 15A5A2480D5B94190087BDA0 /* pppcontroller.defs in Sources */, 15A5A2490D5B94190087BDA0 /* SCNetworkConnection.c in Sources */, 15A5A24A0D5B94190087BDA0 /* SCNetworkConnectionPrivate.c in Sources */, 15A5A24B0D5B94190087BDA0 /* SCNetworkReachability.c in Sources */, 15A5A24C0D5B94190087BDA0 /* SCProxies.c in Sources */, 15A5A24D0D5B94190087BDA0 /* DHCP.c in Sources */, - 15A5A24E0D5B94190087BDA0 /* moh.c in Sources */, - 15A5A24F0D5B94190087BDA0 /* DeviceOnHold.c in Sources */, 15A5A2500D5B94190087BDA0 /* LinkConfiguration.c in Sources */, 15A5A2510D5B94190087BDA0 /* dy_framework.c in Sources */, - 15A5A2530D5B94190087BDA0 /* config.defs in Sources */, 15A5A2540D5B94190087BDA0 /* SCPreferencesPathKey.c in Sources */, 15A5A2580D5B94190087BDA0 /* SCNetworkConfigurationInternal.c in Sources */, 15A5A2590D5B94190087BDA0 /* SCNetworkInterface.c in Sources */, @@ -5354,31 +6822,22 @@ 15A1FF3510597F17004C9CC9 /* CaptiveNetwork.c in Sources */, 159A752C107FEAA400A57EAB /* VPNPrivate.c in Sources */, 159A752E107FEAA400A57EAB /* VPNConfiguration.c in Sources */, - 158E59611107CAF40062081E /* helper.defs in Sources */, 152691DC1129EEAD006BD2D5 /* BridgeConfiguration.c in Sources */, + C42633891A9E4991009F7AE4 /* VPNFlow.c in Sources */, 152691DF1129EEC8006BD2D5 /* VLANConfiguration.c in Sources */, - 15C330BE134B92780028E36B /* SCNetworkReachabilityServer_client.c in Sources */, D61AAEB21522C99C0066B003 /* scprefs_observer.c in Sources */, C4F1848316237B1400D97043 /* VPNService.c in Sources */, B0FEF41B1644089200174B99 /* VPNAppLayer.c in Sources */, + 15EF89CD21894B32003B2C5C /* IPMonitorControl.c in Sources */, 727AF25919138E24009AB153 /* VPNTunnel.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 15AB751416EBFF3400FAA8CE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 15AB751516EBFF3400FAA8CE /* SCNetworkReachabilityServer_server.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 15D3081816F3E4DA00014F82 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 15D3083916F3EB8600014F82 /* simulator_support.c in Sources */, - 15C8C6BF170AAB4E005375CE /* cache.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5389,6 +6848,7 @@ 15DAD5E6075913CE0084A6ED /* dnsinfo_copy.c in Sources */, D6986A79136891650091C931 /* network_information.c in Sources */, 153338BC14BE7978004FCE22 /* libSystemConfiguration_client.c in Sources */, + 728CEAFF1BEA951A00F13F92 /* config_agent_info.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5396,12 +6856,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 15DAD6A007591A1A0084A6ED /* config.defs in Sources */, + 158E595E1107CAE40062081E /* helper.defs in Sources */, + 15DAD69607591A1A0084A6ED /* pppcontroller.defs in Sources */, 15060818075A00A300B147BA /* SCSchemaDefinitions.c in Sources */, 15DAD66D07591A1A0084A6ED /* SCD.c in Sources */, 15DAD66E07591A1A0084A6ED /* SCDKeys.c in Sources */, 15DAD66F07591A1A0084A6ED /* SCDPrivate.c in Sources */, 15DAD67007591A1A0084A6ED /* SCDPlugin.c in Sources */, 7264C144147319E7004FD76D /* CaptiveNetwork.c in Sources */, + 1542400521626F5A00C7CE8B /* SCDCache.c in Sources */, 15DAD67107591A1A0084A6ED /* SCDOpen.c in Sources */, 15DAD67407591A1A0084A6ED /* SCDList.c in Sources */, 15DAD67507591A1A0084A6ED /* SCDAdd.c in Sources */, @@ -5417,7 +6881,6 @@ 15DAD67F07591A1A0084A6ED /* SCDNotifierWait.c in Sources */, 15DAD68007591A1A0084A6ED /* SCDNotifierInformViaCallback.c in Sources */, 15DAD68207591A1A0084A6ED /* SCDNotifierInformViaFD.c in Sources */, - 15DAD68307591A1A0084A6ED /* SCDNotifierInformViaSignal.c in Sources */, 15DAD68407591A1A0084A6ED /* SCDNotifierCancel.c in Sources */, 15DAD68507591A1A0084A6ED /* SCDSnapshot.c in Sources */, 15DAD68607591A1A0084A6ED /* SCP.c in Sources */, @@ -5437,23 +6900,20 @@ 15DAD69307591A1A0084A6ED /* SCDHostName.c in Sources */, 15DAD69407591A1A0084A6ED /* SCLocation.c in Sources */, 15DAD69507591A1A0084A6ED /* SCNetwork.c in Sources */, - 15DAD69607591A1A0084A6ED /* pppcontroller.defs in Sources */, 15DAD69707591A1A0084A6ED /* SCNetworkConnection.c in Sources */, 15A2972F0A13C08C009879B3 /* SCNetworkConnectionPrivate.c in Sources */, 15DAD69807591A1A0084A6ED /* SCNetworkReachability.c in Sources */, 15DAD69907591A1A0084A6ED /* SCProxies.c in Sources */, 15DAD69A07591A1A0084A6ED /* DHCP.c in Sources */, - 15DAD69B07591A1A0084A6ED /* moh.c in Sources */, - 15DAD69C07591A1A0084A6ED /* DeviceOnHold.c in Sources */, 15DAD69D07591A1A0084A6ED /* LinkConfiguration.c in Sources */, 15DAD69E07591A1A0084A6ED /* dy_framework.c in Sources */, 15DAD69F07591A1A0084A6ED /* VLANConfiguration.c in Sources */, - 15DAD6A007591A1A0084A6ED /* config.defs in Sources */, 15DAD6A207591A1A0084A6ED /* SCPreferencesPathKey.c in Sources */, 15DAD6A607591A1A0084A6ED /* SCNetworkConfigurationInternal.c in Sources */, 15DAD6A707591A1A0084A6ED /* SCNetworkInterface.c in Sources */, 15DAD6A807591A1A0084A6ED /* SCNetworkProtocol.c in Sources */, 15DAD6A907591A1A0084A6ED /* SCNetworkService.c in Sources */, + F90E43582012AD6900EF27C4 /* SCNetworkInterfaceProvider.c in Sources */, 15DAD6AA07591A1A0084A6ED /* SCNetworkSet.c in Sources */, 55A3DB9E183C2AD900ED3DB7 /* SCNetworkMigration.c in Sources */, 15DAD6AB07591A1A0084A6ED /* BondConfiguration.c in Sources */, @@ -5464,8 +6924,6 @@ 159A7525107FEAA400A57EAB /* VPNPrivate.c in Sources */, 159A7527107FEAA400A57EAB /* VPNConfiguration.c in Sources */, 15AAA7F9108E310700C2A607 /* VPNTunnel.c in Sources */, - 158E595E1107CAE40062081E /* helper.defs in Sources */, - 15C330BC134B92780028E36B /* SCNetworkReachabilityServer_client.c in Sources */, D61AAEAE1522C99C0066B003 /* scprefs_observer.c in Sources */, C4F1848016237AFC00D97043 /* VPNService.c in Sources */, C4CDB8151631935700819B44 /* VPNFlow.c in Sources */, @@ -5479,9 +6937,11 @@ files = ( 15E1B04B16EBAE3C00E5F06F /* dns-configuration.c in Sources */, 15E1B04C16EBAE3C00E5F06F /* dnsinfo_create.c in Sources */, + 159FFD612110EA71009311DD /* dnsinfo_flatfile.c in Sources */, 15E1B04D16EBAE3C00E5F06F /* dnsinfo_server.c in Sources */, 15E1B04E16EBAE3C00E5F06F /* ip_plugin.c in Sources */, - 15E1B04F16EBAE3C00E5F06F /* network_information_priv.c in Sources */, + F97289D522652D0D00080596 /* serviceIDNumber.c in Sources */, + 15E1B04F16EBAE3C00E5F06F /* network_state_information_priv.c in Sources */, 15E1B05016EBAE3C00E5F06F /* network_information_server.c in Sources */, 15E1B05116EBAE3C00E5F06F /* proxy-configuration.c in Sources */, 15E1B05316EBAE3C00E5F06F /* libSystemConfiguration_server.c in Sources */, @@ -5490,9 +6950,130 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 15E91DB621893E83001155DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E91DB721893E83001155DC /* test-objC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15E91DCF21893EE1001155DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E91DD021893EE1001155DC /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15EF89A921894636003B2C5C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15EF89AA21894636003B2C5C /* test-objC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15EF89B521894665003B2C5C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15EF89B621894665003B2C5C /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15F742DC1EC6370000DA2E7A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15F742DD1EC6370000DA2E7A /* liblog_SystemConfiguration.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 15F742E91EC638D100DA2E7A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15F742EA1EC638D100DA2E7A /* liblog_SystemConfiguration.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72573D221D667372004975AD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 72573D3C1D6695B4004975AD /* SCTestDynamicStore.m in Sources */, + 72573D3A1D6692BA004975AD /* SCTestOptions.m in Sources */, + 72573D321D667686004975AD /* SCTestUtils.m in Sources */, + 72573D401D67B2BE004975AD /* SCTestUnitTest.m in Sources */, + 728E0E961D70229A00E0613A /* SCTestReachability.m in Sources */, + 72573D291D667372004975AD /* main.m in Sources */, + 72573D421D6B798A004975AD /* SCTestConfigAgents.m in Sources */, + 72573D3E1D669AA6004975AD /* SCTestPreferences.m in Sources */, + 72573D2E1D6673B6004975AD /* SCTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7271EA1D1D76600B0055B1AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7271EA1E1D76600B0055B1AA /* SCTestDynamicStore.m in Sources */, + 7271EA1F1D76600B0055B1AA /* SCTestOptions.m in Sources */, + 7271EA201D76600B0055B1AA /* SCTestUtils.m in Sources */, + 7271EA211D76600B0055B1AA /* SCTestUnitTest.m in Sources */, + 7271EA221D76600B0055B1AA /* SCTestReachability.m in Sources */, + 7271EA231D76600B0055B1AA /* main.m in Sources */, + 7271EA241D76600B0055B1AA /* SCTestConfigAgents.m in Sources */, + 7271EA251D76600B0055B1AA /* SCTestPreferences.m in Sources */, + 7271EA261D76600B0055B1AA /* SCTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72D3E65A1AE6EA3900DB4C69 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 72D3E6611AE6EA3A00DB4C69 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 72D3E6651AE6EAF600DB4C69 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 72D3E66C1AE6EAF600DB4C69 /* test-objC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C4666C6D206ED01800247AB6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C496A09620F909FF0098B3E5 /* IPConfigurationParser.m in Sources */, + C4666C7A206ED27800247AB6 /* EventFactory.m in Sources */, + C4C5FB0C20EABD9E00F35614 /* IPMonitorParser.m in Sources */, + C4C5FB0520EA9B6F00F35614 /* SCLogParser.m in Sources */, + C4C5FB0920EAB0DD00F35614 /* InterfaceNamerParser.m in Sources */, + C469CB2920EED6C100A7AD35 /* StateDumpParser.m in Sources */, + C4C5FB0F20EAC05200F35614 /* PreferencesMonitorParser.m in Sources */, + C4C5FB0620EA9C3200F35614 /* KernelEventMonitorParser.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 150EC101210171AE0047F4BF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 72D3E6681AE6EAF600DB4C69 /* SCTest-ObjC */; + targetProxy = 150EC100210171AE0047F4BF /* PBXContainerItemProxy */; + }; + 150EC103210171B60047F4BF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 72D3E65D1AE6EA3900DB4C69 /* SCTest-Swift */; + targetProxy = 150EC102210171B60047F4BF /* PBXContainerItemProxy */; + }; 150ECB300D0042DA0065E94D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 151F5D990CCE98E50093AC3B /* SCMonitor */; @@ -5503,30 +7084,25 @@ target = 151FE2DD0D5B7046000D6DB1 /* configd_base-EmbeddedSimulator */; targetProxy = 151FE3790D5B713C000D6DB1 /* PBXContainerItemProxy */; }; - 1521405B0E9400BF00DACD2C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 15213FF90E93E9F500DACD2C /* Logger.bundle */; - targetProxy = 1521405A0E9400BF00DACD2C /* PBXContainerItemProxy */; - }; - 1528BFEC135731B800691881 /* PBXTargetDependency */ = { + 1523BBE21E075859006281F1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1528BFDB1357305400691881 /* SCNetworkReachability */; - targetProxy = 1528BFEB135731B800691881 /* PBXContainerItemProxy */; + target = 158337990CFB6B9E0033AB93 /* SCHelper-Embedded */; + targetProxy = 1523BBE11E075859006281F1 /* PBXContainerItemProxy */; }; - 1528BFEE135731B800691881 /* PBXTargetDependency */ = { + 15401C2C21991B05006326B7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1528BFE31357309700691881 /* SCNetworkReachability.bundle */; - targetProxy = 1528BFED135731B800691881 /* PBXContainerItemProxy */; + target = 15401C1C21991506006326B7 /* configd_extras */; + targetProxy = 15401C2B21991B05006326B7 /* PBXContainerItemProxy */; }; - 1528C00F135741C300691881 /* PBXTargetDependency */ = { + 15401C2E21991B1B006326B7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1528BFF013573FEE00691881 /* SCNetworkReachability-Embedded */; - targetProxy = 1528C00E135741C300691881 /* PBXContainerItemProxy */; + target = 15401C21219915BC006326B7 /* configd_extras-Embedded */; + targetProxy = 15401C2D21991B1B006326B7 /* PBXContainerItemProxy */; }; - 1528C011135741C300691881 /* PBXTargetDependency */ = { + 15401C3021991B31006326B7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1528BFF813573FF500691881 /* SCNetworkReachability.bundle-Embedded */; - targetProxy = 1528C010135741C300691881 /* PBXContainerItemProxy */; + target = 15401C26219915C6006326B7 /* configd_extras-EmbeddedSimulator */; + targetProxy = 15401C2F21991B31006326B7 /* PBXContainerItemProxy */; }; 1558480607550D470046C2E9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -5538,20 +7114,70 @@ target = 1558481207550EC10046C2E9 /* scselect */; targetProxy = 1558480707550D470046C2E9 /* PBXContainerItemProxy */; }; - 1558480A07550D470046C2E9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 155847430754FDCD0046C2E9 /* scutil */; - targetProxy = 1558480907550D470046C2E9 /* PBXContainerItemProxy */; - }; 1558480F07550DD00046C2E9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 155847FA07550D210046C2E9 /* configd_executables */; targetProxy = 1558480E07550DD00046C2E9 /* PBXContainerItemProxy */; }; - 156CA4A80EF8550800C59A18 /* PBXTargetDependency */ = { + 155C626121C2B6FD008DCB1A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 157433DD0D4A8122002ACA73 /* scselect-Embedded */; + targetProxy = 155C626021C2B6FD008DCB1A /* PBXContainerItemProxy */; + }; + 155C626521C2B6FD008DCB1A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7271EA1B1D76600B0055B1AA /* sctest-Embedded */; + targetProxy = 155C626421C2B6FD008DCB1A /* PBXContainerItemProxy */; + }; + 155F49A91C8650E900E47D08 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 155F49861C864F1400E47D08 /* QoSMarking */; + targetProxy = 155F49A81C8650E900E47D08 /* PBXContainerItemProxy */; + }; + 155F49AB1C8650E900E47D08 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 155F498E1C864F3700E47D08 /* QoSMarking.bundle */; + targetProxy = 155F49AA1C8650E900E47D08 /* PBXContainerItemProxy */; + }; + 155F49AD1C86511300E47D08 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 155F49951C864F4E00E47D08 /* QoSMarking-Embedded */; + targetProxy = 155F49AC1C86511300E47D08 /* PBXContainerItemProxy */; + }; + 155F49AF1C86511300E47D08 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 155F499D1C864F5400E47D08 /* QoSMarking.bundle-Embedded */; + targetProxy = 155F49AE1C86511300E47D08 /* PBXContainerItemProxy */; + }; + 15631D111ECF92E70088EEDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 151D05FA1EC1491600E02E48 /* liblog_SystemConfiguration */; + targetProxy = 15631D101ECF92E70088EEDD /* PBXContainerItemProxy */; + }; + 15631D131ECF93040088EEDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15F742DA1EC6370000DA2E7A /* liblog_SystemConfiguration-Embedded */; + targetProxy = 15631D121ECF93040088EEDD /* PBXContainerItemProxy */; + }; + 15631D271ECF99800088EEDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15F742E71EC638D100DA2E7A /* liblog_SystemConfiguration-EmbeddedSimulator */; + targetProxy = 15631D261ECF99800088EEDD /* PBXContainerItemProxy */; + }; + 15631D291ECF99800088EEDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15732A7616EA503200F3AC4C /* configd-EmbeddedSimulator */; + targetProxy = 15631D281ECF99800088EEDD /* PBXContainerItemProxy */; + }; + 15631D2B1ECF99800088EEDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15732AAD16EA511900F3AC4C /* scutil-EmbeddedSimulator */; + targetProxy = 15631D2A1ECF99800088EEDD /* PBXContainerItemProxy */; + }; + 15631D2D1ECF99A00088EEDD /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 156CA4790EF853BB00C59A18 /* Logger.bundle-Embedded */; - targetProxy = 156CA4A70EF8550800C59A18 /* PBXContainerItemProxy */; + target = 15631D161ECF98FB0088EEDD /* configd_executables-EmbeddedSimulator */; + targetProxy = 15631D2C1ECF99A00088EEDD /* PBXContainerItemProxy */; }; 15732AE616EA6BCE00F3AC4C /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -5563,11 +7189,6 @@ target = 157433F00D4A8137002ACA73 /* scutil-Embedded */; targetProxy = 1574341E0D4A815E002ACA73 /* PBXContainerItemProxy */; }; - 157434210D4A8166002ACA73 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 157433DD0D4A8122002ACA73 /* scselect-Embedded */; - targetProxy = 157434200D4A8166002ACA73 /* PBXContainerItemProxy */; - }; 157A85480D56CA0B00B6F1A0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 157A84F40D56C7E800B6F1A0 /* IPMonitor-Embedded */; @@ -5628,11 +7249,6 @@ target = 1572C4A60CFB55B400E2776E /* SystemConfiguration.framework-Embedded */; targetProxy = 158317110CFB77E1006F62B9 /* PBXContainerItemProxy */; }; - 158317140CFB77E8006F62B9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 158337990CFB6B9E0033AB93 /* SCHelper-Embedded */; - targetProxy = 158317130CFB77E8006F62B9 /* PBXContainerItemProxy */; - }; 158317160CFB783B006F62B9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 158316E30CFB7761006F62B9 /* configd_plugins-Embedded */; @@ -5723,26 +7339,11 @@ target = 15A5A1E40D5B94190087BDA0 /* SystemConfiguration.framework-EmbeddedSimulator */; targetProxy = 15A5A2700D5B942D0087BDA0 /* PBXContainerItemProxy */; }; - 15AB752216EC005A00FAA8CE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 15AB751216EBFF3400FAA8CE /* SCNetworkReachability-EmbeddedSimulator */; - targetProxy = 15AB752116EC005A00FAA8CE /* PBXContainerItemProxy */; - }; - 15AB752416EC005A00FAA8CE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 15AB751A16EBFF8A00FAA8CE /* SCNetworkReachability.bundle-EmbeddedSimulator */; - targetProxy = 15AB752316EC005A00FAA8CE /* PBXContainerItemProxy */; - }; 15AB752A16EC254D00FAA8CE /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 15E1B04116EBAE3C00E5F06F /* IPMonitor-EmbeddedSimulator */; targetProxy = 15AB752916EC254D00FAA8CE /* PBXContainerItemProxy */; }; - 15AB752C16EC254D00FAA8CE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 15AB751216EBFF3400FAA8CE /* SCNetworkReachability-EmbeddedSimulator */; - targetProxy = 15AB752B16EC254D00FAA8CE /* PBXContainerItemProxy */; - }; 15C64A220F684C4900D78394 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 15DAD5DF075913CE0084A6ED /* libsystem_configuration */; @@ -5795,23 +7396,88 @@ }; 15E1B06616EBAF2A00E5F06F /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 15E1B05A16EBAE7800E5F06F /* IPMonitor.bundle-EmbeddedSimulator */; - targetProxy = 15E1B06516EBAF2A00E5F06F /* PBXContainerItemProxy */; + target = 15E1B05A16EBAE7800E5F06F /* IPMonitor.bundle-EmbeddedSimulator */; + targetProxy = 15E1B06516EBAF2A00E5F06F /* PBXContainerItemProxy */; + }; + 15E83109167F9B0600FD51EC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15CB690005C0722A0099E85F /* All */; + targetProxy = 15E83108167F9B0600FD51EC /* PBXContainerItemProxy */; + }; + 15E8310B167F9B0C00FD51EC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 151C1CC60CFB487000C5AFD6 /* All-Embedded */; + targetProxy = 15E8310A167F9B0C00FD51EC /* PBXContainerItemProxy */; + }; + 15E8310D167F9B1200FD51EC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15FD13BF0D59485000F9409C /* All-EmbeddedSimulator */; + targetProxy = 15E8310C167F9B1200FD51EC /* PBXContainerItemProxy */; + }; + 15EF89A221894601003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1572C4A60CFB55B400E2776E /* SystemConfiguration.framework-Embedded */; + targetProxy = 15EF89A121894601003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89A42189461B003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1572C4A60CFB55B400E2776E /* SystemConfiguration.framework-Embedded */; + targetProxy = 15EF89A32189461B003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89BE2189467B003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15A5A1E40D5B94190087BDA0 /* SystemConfiguration.framework-EmbeddedSimulator */; + targetProxy = 15EF89BD2189467B003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89C021894688003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15A5A1E40D5B94190087BDA0 /* SystemConfiguration.framework-EmbeddedSimulator */; + targetProxy = 15EF89BF21894688003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89C221894837003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15E91DB221893E83001155DC /* SCTest-ObjC-Embedded */; + targetProxy = 15EF89C121894837003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89C421894837003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15E91DCC21893EE1001155DC /* SCTest-Swift-Embedded */; + targetProxy = 15EF89C321894837003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89C62189484C003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15EF89A521894636003B2C5C /* SCTest-ObjC-EmbeddedSimulator */; + targetProxy = 15EF89C52189484C003B2C5C /* PBXContainerItemProxy */; + }; + 15EF89C82189484C003B2C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15EF89B221894665003B2C5C /* SCTest-Swift-EmbeddedSimulator */; + targetProxy = 15EF89C72189484C003B2C5C /* PBXContainerItemProxy */; + }; + 723050321AE6F292004AC149 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15DAD63F07591A1A0084A6ED /* SystemConfiguration.framework */; + targetProxy = 723050311AE6F292004AC149 /* PBXContainerItemProxy */; + }; + 723050341AE6F29D004AC149 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15DAD63F07591A1A0084A6ED /* SystemConfiguration.framework */; + targetProxy = 723050331AE6F29D004AC149 /* PBXContainerItemProxy */; }; - 15E83109167F9B0600FD51EC /* PBXTargetDependency */ = { + 72C12CB11D6EA2CA000EE61C /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 15CB690005C0722A0099E85F /* All */; - targetProxy = 15E83108167F9B0600FD51EC /* PBXContainerItemProxy */; + target = 72573D251D667372004975AD /* sctest */; + targetProxy = 72C12CB01D6EA2CA000EE61C /* PBXContainerItemProxy */; }; - 15E8310B167F9B0C00FD51EC /* PBXTargetDependency */ = { + 72C4A4801BE44D19009D570E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 151C1CC60CFB487000C5AFD6 /* All-Embedded */; - targetProxy = 15E8310A167F9B0C00FD51EC /* PBXContainerItemProxy */; + target = 155847430754FDCD0046C2E9 /* scutil */; + targetProxy = 72C4A47F1BE44D19009D570E /* PBXContainerItemProxy */; }; - 15E8310D167F9B1200FD51EC /* PBXTargetDependency */ = { + C453EED22086992B00BF504E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 15FD13BF0D59485000F9409C /* All-EmbeddedSimulator */; - targetProxy = 15E8310C167F9B1200FD51EC /* PBXContainerItemProxy */; + target = C4666C70206ED01800247AB6 /* SystemConfigurationEventFactory */; + targetProxy = C453EED12086992B00BF504E /* PBXContainerItemProxy */; }; D6DDAC3D147A24BC00A2E902 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -5824,7 +7490,7 @@ 1577253606EFBF3100D7B52B /* NetworkInterface.strings */ = { isa = PBXVariantGroup; children = ( - 1577252F06EFB96700D7B52B /* English */, + 15436255218AA27400283462 /* en */, ); name = NetworkInterface.strings; sourceTree = ""; @@ -5832,7 +7498,7 @@ 15A6F7C20A4B266D00B907EA /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 15A6F7C30A4B266D00B907EA /* English */, + 15436253218AA26100283462 /* en */, ); name = Localizable.strings; sourceTree = ""; @@ -5840,7 +7506,7 @@ 15FEE8180CD03CBB001312F9 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 15FEE8160CD03CA3001312F9 /* English */, + 15436251218AA22800283462 /* en */, ); name = Localizable.strings; sourceTree = ""; @@ -5851,14 +7517,58 @@ 151C1CC70CFB487000C5AFD6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - PRODUCT_NAME = "configd (Aggregate/Embedded)"; + PRODUCT_NAME = configdAggregateEmbedded; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; 151C1CC80CFB487000C5AFD6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - PRODUCT_NAME = "configd (Aggregate/Embedded)"; + PRODUCT_NAME = configdAggregateEmbedded; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; + }; + name = Release; + }; + 151D06091EC1491600E02E48 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_ENABLE_OBJC_ARC = YES; + EXECUTABLE_PREFIX = liblog_; + 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; + }; + name = Debug; + }; + 151D060A1EC1491600E02E48 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_ENABLE_OBJC_ARC = YES; + EXECUTABLE_PREFIX = liblog_; + 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; }; name = Release; }; @@ -5870,8 +7580,8 @@ DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)"; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; INFOPLIST_FILE = SCMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /System/Library/UserEventPlugins; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple.SystemConfiguration.${EXECUTABLE_NAME}"; PRODUCT_NAME = SCMonitor; PROVISIONING_PROFILE = ""; WRAPPER_EXTENSION = plugin; @@ -5886,8 +7596,8 @@ DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)"; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; INFOPLIST_FILE = SCMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /System/Library/UserEventPlugins; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple.SystemConfiguration.${EXECUTABLE_NAME}"; PRODUCT_NAME = SCMonitor; PROVISIONING_PROFILE = ""; WRAPPER_EXTENSION = plugin; @@ -5902,6 +7612,7 @@ PRODUCT_NAME = genSCPreferences; WARNING_CFLAGS = ( "-Wall", + "-Wextra", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); @@ -5916,6 +7627,7 @@ PRODUCT_NAME = genSCPreferences; WARNING_CFLAGS = ( "-Wall", + "-Wextra", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); @@ -5924,157 +7636,184 @@ }; 151FE2E50D5B7046000D6DB1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { PRODUCT_NAME = "configd_base (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; 151FE2E60D5B7046000D6DB1 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { PRODUCT_NAME = "configd_base (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; - 15213FFC0E93E9F600DACD2C /* Debug */ = { + 15401C1E21991506006326B7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/Logger/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = Logger; + PRODUCT_NAME = configd_extras; }; name = Debug; }; - 15213FFD0E93E9F600DACD2C /* Release */ = { + 15401C1F21991506006326B7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/Logger/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = Logger; + PRODUCT_NAME = configd_extras; + }; + name = Release; + }; + 15401C24219915BC006326B7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "configd_extras (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos watchos tvos bridgeos"; + }; + name = Debug; + }; + 15401C25219915BC006326B7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "configd_extras (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos watchos tvos bridgeos"; + }; + name = Release; + }; + 15401C29219915C6006326B7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "configd_extras (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Debug; + }; + 15401C2A219915C6006326B7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "configd_extras (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; - 1528BFE01357305400691881 /* Debug */ = { + 155F498B1C864F1400E47D08 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; }; name = Debug; }; - 1528BFE11357305400691881 /* Release */ = { + 155F498C1C864F1400E47D08 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; }; name = Release; }; - 1528BFE61357309700691881 /* Debug */ = { + 155F49911C864F3700E47D08 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/SCNetworkReachability/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; + INFOPLIST_FILE = Plugins/QoSMarking/Info.plist; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.QoSMarking; + PRODUCT_NAME = QoSMarking; }; name = Debug; }; - 1528BFE71357309700691881 /* Release */ = { + 155F49921C864F3700E47D08 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/SCNetworkReachability/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; + INFOPLIST_FILE = Plugins/QoSMarking/Info.plist; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.QoSMarking; + PRODUCT_NAME = QoSMarking; }; name = Release; }; - 1528BFF513573FEE00691881 /* Debug */ = { + 155F499A1C864F4E00E47D08 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_NAME = QoSMarking; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; - 1528BFF613573FEE00691881 /* Release */ = { + 155F499B1C864F4E00E47D08 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_NAME = QoSMarking; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; - 1528BFFC13573FF500691881 /* Debug */ = { + 155F49A01C864F5400E47D08 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/SCNetworkReachability/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; + INFOPLIST_FILE = "Plugins/QoSMarking/Info-Embedded.plist"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.QoSMarking; + PRODUCT_NAME = QoSMarking; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; - 1528BFFD13573FF500691881 /* Release */ = { + 155F49A11C864F5400E47D08 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/SCNetworkReachability/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; + INFOPLIST_FILE = "Plugins/QoSMarking/Info-Embedded.plist"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = SCNetworkReachability; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.QoSMarking; + PRODUCT_NAME = QoSMarking; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; - 156CA4830EF853BB00C59A18 /* Debug */ = { + 15631D241ECF98FB0088EEDD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = "Plugins/Logger/Info-Embedded.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = Logger; - SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + PRODUCT_NAME = "configd_executables (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; - 156CA4840EF853BB00C59A18 /* Release */ = { + 15631D251ECF98FB0088EEDD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = "Plugins/Logger/Info-Embedded.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; - PRODUCT_NAME = Logger; - SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + PRODUCT_NAME = "configd_executables (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; @@ -6085,12 +7824,13 @@ normal, debug, profile, + "${EXTRA_BUILD_VARIANT}", ); GENERATE_PROFILING_CODE_profile = YES; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALLHDRS_COPY_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/lib/system; - LD_DYLIB_INSTALL_NAME = /usr/lib/system/libsystem_configuration.dylib; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_CFLAGS_debug = "-O0"; OTHER_LDFLAGS = ( @@ -6102,17 +7842,37 @@ "-lsystem_asl", "-lsystem_blocks", "-lsystem_c", - "-lsystem_kernel", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_kernel", "-lsystem_malloc", "-lsystem_notify", - "-lsystem_platform", - "-lsystem_pthread", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_platform", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_pthread", + "-lsystem_trace", "-lxpc", ); + "OTHER_LDFLAGS_asan[arch=i386]" = ""; + "OTHER_LDFLAGS_asan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_ios_dynamic"; + "OTHER_LDFLAGS_asan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_iossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_osx_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvosossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchossim_dynamic"; + "OTHER_LDFLAGS_tsan[arch=i386]" = ""; + "OTHER_LDFLAGS_tsan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_ios_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_iossim_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_osx_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvos_dynamic"; + "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; STRIP_INSTALLED_PRODUCT_normal = YES; STRIP_INSTALLED_PRODUCT_profile = NO; + STRIP_INSTALLED_PRODUCT_tsan = NO; }; name = Debug; }; @@ -6123,16 +7883,15 @@ normal, debug, profile, + "${EXTRA_BUILD_VARIANT}", ); GENERATE_PROFILING_CODE_profile = YES; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALLHDRS_COPY_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/lib/system; - LD_DYLIB_INSTALL_NAME = /usr/lib/system/libsystem_configuration.dylib; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_CFLAGS_debug = "-O0"; - OTHER_CFLAGS_normal = ""; - OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", "-L/usr/lib/system", @@ -6142,23 +7901,44 @@ "-lsystem_asl", "-lsystem_blocks", "-lsystem_c", - "-lsystem_kernel", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_kernel", "-lsystem_malloc", "-lsystem_notify", - "-lsystem_platform", - "-lsystem_pthread", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_platform", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_pthread", + "-lsystem_trace", "-lxpc", ); + "OTHER_LDFLAGS_asan[arch=i386]" = ""; + "OTHER_LDFLAGS_asan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_ios_dynamic"; + "OTHER_LDFLAGS_asan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_iossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_osx_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvosossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchossim_dynamic"; + "OTHER_LDFLAGS_tsan[arch=i386]" = ""; + "OTHER_LDFLAGS_tsan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_ios_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_iossim_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_osx_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvos_dynamic"; + "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; STRIP_INSTALLED_PRODUCT_normal = YES; STRIP_INSTALLED_PRODUCT_profile = NO; + STRIP_INSTALLED_PRODUCT_tsan = NO; }; name = Release; }; 156EB5DF0905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEFINES_MODULE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks", @@ -6169,9 +7949,21 @@ ); INFOPLIST_FILE = SystemConfiguration.fproj/Info.plist; INSTALLHDRS_SCRIPT_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; 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/SystemConfiguration.modulemap; + MODULEMAP_PRIVATE_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.private.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 --verify-api-skip-external-headers"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; WRAPPER_EXTENSION = framework; }; @@ -6180,6 +7972,7 @@ 156EB5E00905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DEFINES_MODULE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks", @@ -6190,9 +7983,21 @@ ); INFOPLIST_FILE = SystemConfiguration.fproj/Info.plist; INSTALLHDRS_SCRIPT_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; 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/SystemConfiguration.modulemap; + MODULEMAP_PRIVATE_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.private.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 --verify-api-skip-external-headers"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; SECTORDER_FLAGS = ( "-sectorder", @@ -6209,7 +8014,6 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework/Versions/A/Helpers"; PRODUCT_NAME = SCHelper; }; @@ -6220,7 +8024,6 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework/Versions/A/Helpers"; PRODUCT_NAME = SCHelper; }; @@ -6243,11 +8046,17 @@ 156EB5EF0905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_IPMonitor\"", + ); PRODUCT_NAME = IPMonitor; STRIP_INSTALLED_PRODUCT = NO; }; @@ -6256,11 +8065,16 @@ 156EB5F00905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_IPMonitor\"", + ); PRODUCT_NAME = IPMonitor; STRIP_INSTALLED_PRODUCT = NO; }; @@ -6270,8 +8084,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/IPMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; PRODUCT_NAME = IPMonitor; }; name = Debug; @@ -6280,8 +8094,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/IPMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; PRODUCT_NAME = IPMonitor; }; name = Release; @@ -6290,9 +8104,12 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_InterfaceNamer\"", + ); PRODUCT_NAME = InterfaceNamer; STRIP_INSTALLED_PRODUCT = NO; }; @@ -6302,9 +8119,12 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_InterfaceNamer\"", + ); PRODUCT_NAME = InterfaceNamer; STRIP_INSTALLED_PRODUCT = NO; }; @@ -6314,8 +8134,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/InterfaceNamer/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.InterfaceNamer; PRODUCT_NAME = InterfaceNamer; }; name = Debug; @@ -6324,8 +8144,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/InterfaceNamer/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.InterfaceNamer; PRODUCT_NAME = InterfaceNamer; }; name = Release; @@ -6334,8 +8154,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/KernelEventMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.KernelEventMonitor; PRODUCT_NAME = KernelEventMonitor; }; name = Debug; @@ -6344,8 +8164,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/KernelEventMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.KernelEventMonitor; PRODUCT_NAME = KernelEventMonitor; }; name = Release; @@ -6356,9 +8176,12 @@ DEBUG_INFORMATION_FORMAT = dwarf; FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_KernelEventMonitor\"", + ); PRODUCT_NAME = KernelEventMonitor; STRIP_INSTALLED_PRODUCT = NO; }; @@ -6370,9 +8193,12 @@ DEBUG_INFORMATION_FORMAT = dwarf; FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_KernelEventMonitor\"", + ); PRODUCT_NAME = KernelEventMonitor; STRIP_INSTALLED_PRODUCT = NO; }; @@ -6382,7 +8208,6 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = LinkConfiguration; @@ -6394,7 +8219,6 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = LinkConfiguration; @@ -6406,8 +8230,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/LinkConfiguration/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.LinkConfiguration; PRODUCT_NAME = LinkConfiguration; }; name = Debug; @@ -6416,8 +8240,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/LinkConfiguration/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.LinkConfiguration; PRODUCT_NAME = LinkConfiguration; }; name = Release; @@ -6426,7 +8250,6 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = PreferencesMonitor; @@ -6438,7 +8261,6 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = PreferencesMonitor; @@ -6450,8 +8272,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/PreferencesMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.PreferencesMonitor; PRODUCT_NAME = PreferencesMonitor; }; name = Debug; @@ -6460,8 +8282,8 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/PreferencesMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.PreferencesMonitor; PRODUCT_NAME = PreferencesMonitor; }; name = Release; @@ -6483,13 +8305,25 @@ 156EB6230905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; + "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", - /usr/local/lib/SystemConfiguration, + "$(SDKROOT)/usr/local/lib/SystemConfiguration", + ); + OTHER_LDFLAGS = ( + "-lKernelEventMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lInterfaceNamer$(EXECUTABLE_VARIANT_SUFFIX)", + "-lIPMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lLinkConfiguration$(EXECUTABLE_VARIANT_SUFFIX)", + "-lPreferencesMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lQoSMarking$(EXECUTABLE_VARIANT_SUFFIX)", ); PRODUCT_NAME = configd; }; @@ -6498,13 +8332,24 @@ 156EB6240905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", - /usr/local/lib/SystemConfiguration, + "$(SDKROOT)/usr/local/lib/SystemConfiguration", + ); + OTHER_LDFLAGS = ( + "-lKernelEventMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lInterfaceNamer$(EXECUTABLE_VARIANT_SUFFIX)", + "-lIPMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lLinkConfiguration$(EXECUTABLE_VARIANT_SUFFIX)", + "-lPreferencesMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lQoSMarking$(EXECUTABLE_VARIANT_SUFFIX)", ); PRODUCT_NAME = configd; }; @@ -6515,7 +8360,6 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/sbin; PRODUCT_NAME = scselect; }; @@ -6526,7 +8370,6 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/sbin; PRODUCT_NAME = scselect; }; @@ -6535,14 +8378,11 @@ 156EB62B0905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_ENTITLEMENTS = scutil.tproj/entitlements.plist; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/sbin; - LIBRARY_SEARCH_PATHS = ( - "$(SYMROOT)", - /usr/local/lib/SystemConfiguration, - ); + LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; PRODUCT_NAME = scutil; }; name = Debug; @@ -6550,14 +8390,11 @@ 156EB62C0905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_ENTITLEMENTS = scutil.tproj/entitlements.plist; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/sbin; - LIBRARY_SEARCH_PATHS = ( - "$(SYMROOT)", - /usr/local/lib/SystemConfiguration, - ); + LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; PRODUCT_NAME = scutil; }; name = Release; @@ -6579,22 +8416,51 @@ 156EB6330905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - PRODUCT_NAME = "configd (Aggregate)"; + PRODUCT_NAME = configdAggregate; }; name = Debug; }; 156EB6340905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - PRODUCT_NAME = "configd (Aggregate)"; + PRODUCT_NAME = configdAggregate; }; name = Release; }; 156EB63F0905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - "ARCHS[sdk=iphoneos*]" = "$(NATIVE_ARCH)"; - "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_32_64_BIT)"; + ALWAYS_SEARCH_USER_PATHS = NO; + APPLY_RULES_IN_COPY_FILES = YES; + BUILD_VARIANTS = ( + normal, + "${EXTRA_BUILD_VARIANT}", + ); + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_MODULE_CACHE_PATH = "$(CONFIGURATION_TEMP_DIR)/ModuleCache"; + CLANG_STATIC_ANALYZER_MODE = deep; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = "$(RC_ProjectSourceVersion)"; @@ -6602,19 +8468,52 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_GROUP = wheel; - INSTALL_OWNER = root; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(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; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = /usr/sbin; + INTERPOSITION_SIM_SUFFIX = ""; + "INTERPOSITION_SIM_SUFFIX[sdk=bridgesimulator*]" = _sim; + "INTERPOSITION_SIM_SUFFIX[sdk=iphonesimulator*]" = _sim; + "INTERPOSITION_SIM_SUFFIX[sdk=tvossimulator*]" = _sim; + "INTERPOSITION_SIM_SUFFIX[sdk=watchsimulator*]" = _sim; OTHER_CFLAGS = ( + "$(inherited)", "-fconstant-cfstrings", "-fstack-protector-all", - "-D_FORTIFY_SOURCE=2", ); + OTHER_CFLAGS_asan = "-fsanitize=address"; + "OTHER_CFLAGS_asan[arch=i386]" = ""; + OTHER_CFLAGS_tsan = "-fsanitize=thread"; + "OTHER_CFLAGS_tsan[arch=i386]" = ""; + OTHER_LDFLAGS_asan = "-fsanitize=address -headerpad_max_install_names"; + "OTHER_LDFLAGS_asan[arch=i386]" = ""; + OTHER_LDFLAGS_tsan = "-fsanitize=thread -headerpad_max_install_names"; + "OTHER_LDFLAGS_tsan[arch=i386]" = ""; + PLIST_FILE_OUTPUT_FORMAT = binary; RUN_CLANG_STATIC_ANALYZER = YES; + SDKROOT = macosx.internal; + SUPPORTED_PLATFORMS = macosx; + SUPPORTS_TEXT_BASED_API = YES; + SWIFT_VERSION = 4.2; + TAPI_VERIFY_MODE = Pedantic; VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = "__attribute__((visibility(\"hidden\")))"; WARNING_CFLAGS = ( "-Wall", + "-Wextra", "-Wno-four-char-constants", "-Wno-unknown-pragmas", "-Wformat-security", @@ -6627,23 +8526,82 @@ 156EB6400905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + APPLY_RULES_IN_COPY_FILES = YES; + BUILD_VARIANTS = ( + normal, + "${EXTRA_BUILD_VARIANT}", + ); + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_MODULE_CACHE_PATH = "$(CONFIGURATION_TEMP_DIR)/ModuleCache"; + CLANG_STATIC_ANALYZER_MODE = deep; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = "$(RC_ProjectSourceVersion)"; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)"; - INSTALL_GROUP = wheel; - INSTALL_OWNER = root; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = /usr/sbin; + INTERPOSITION_SIM_SUFFIX = ""; + "INTERPOSITION_SIM_SUFFIX[sdk=bridgesimulator*]" = _sim; + "INTERPOSITION_SIM_SUFFIX[sdk=iphonesimulator*]" = _sim; + "INTERPOSITION_SIM_SUFFIX[sdk=tvossimulator*]" = _sim; + "INTERPOSITION_SIM_SUFFIX[sdk=watchsimulator*]" = _sim; OTHER_CFLAGS = ( + "$(inherited)", "-fconstant-cfstrings", "-fstack-protector-all", - "-D_FORTIFY_SOURCE=2", ); + OTHER_CFLAGS_asan = "-fsanitize=address"; + "OTHER_CFLAGS_asan[arch=i386]" = ""; + OTHER_CFLAGS_tsan = "-fsanitize=thread"; + "OTHER_CFLAGS_tsan[arch=i386]" = ""; + OTHER_LDFLAGS_asan = "-fsanitize=address -headerpad_max_install_names"; + "OTHER_LDFLAGS_asan[arch=i386]" = ""; + OTHER_LDFLAGS_tsan = "-fsanitize=thread -headerpad_max_install_names"; + "OTHER_LDFLAGS_tsan[arch=i386]" = ""; + PLIST_FILE_OUTPUT_FORMAT = binary; + SDKROOT = macosx.internal; + SUPPORTED_PLATFORMS = macosx; + SUPPORTS_TEXT_BASED_API = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; + TAPI_VERIFY_MODE = Pedantic; VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = "__attribute__((visibility(\"hidden\")))"; WARNING_CFLAGS = ( "-Wall", + "-Wextra", "-Wno-four-char-constants", "-Wno-unknown-pragmas", "-Wformat-security", @@ -6656,18 +8614,35 @@ 1572C52A0CFB55B400E2776E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEFINES_MODULE = YES; HEADER_SEARCH_PATHS = ( "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", "$(SDKROOT)/usr/local/include/ppp", ); INFOPLIST_FILE = "SystemConfiguration.fproj/Info-Embedded.plist"; INSTALLHDRS_SCRIPT_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + "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)", + "$(SDKROOT)/usr/local/lib", + ); + MODULEMAP_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap; + MODULEMAP_PRIVATE_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.private.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; + 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; }; name = Debug; @@ -6675,167 +8650,190 @@ 1572C52B0CFB55B400E2776E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DEFINES_MODULE = YES; HEADER_SEARCH_PATHS = ( "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", "$(SDKROOT)/usr/local/include/ppp", ); INFOPLIST_FILE = "SystemConfiguration.fproj/Info-Embedded.plist"; INSTALLHDRS_SCRIPT_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + "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)", + "$(SDKROOT)/usr/local/lib", + ); + MODULEMAP_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap; + MODULEMAP_PRIVATE_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.private.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; + 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; }; name = Release; }; 15732AAA16EA503200F3AC4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - APPLY_RULES_IN_COPY_FILES = YES; + BUILD_VARIANTS = normal; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/libexec; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)/usr/local/lib/SystemConfiguration", ); + OTHER_LDFLAGS = ( + "-lIPMonitor_sim$(EXECUTABLE_VARIANT_SUFFIX)", + "-lSimulatorSupport_sim$(EXECUTABLE_VARIANT_SUFFIX)", + ); PRODUCT_NAME = configd_sim; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; 15732AAB16EA503200F3AC4C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - APPLY_RULES_IN_COPY_FILES = YES; + BUILD_VARIANTS = normal; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/libexec; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)/usr/local/lib/SystemConfiguration", ); + OTHER_LDFLAGS = ( + "-lIPMonitor_sim$(EXECUTABLE_VARIANT_SUFFIX)", + "-lSimulatorSupport_sim$(EXECUTABLE_VARIANT_SUFFIX)", + ); PRODUCT_NAME = configd_sim; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; 15732AD316EA511900F3AC4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { + BUILD_VARIANTS = normal; + CODE_SIGN_ENTITLEMENTS = scutil.tproj/entitlements.plist; FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", ); - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/bin; + INSTALL_PATH = /usr/local/bin; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)/usr/local/lib/SystemConfiguration", ); PRODUCT_NAME = scutil_sim; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; 15732AD416EA511900F3AC4C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { + BUILD_VARIANTS = normal; + CODE_SIGN_ENTITLEMENTS = scutil.tproj/entitlements.plist; FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", ); - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/bin; + INSTALL_PATH = /usr/local/bin; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)/usr/local/lib/SystemConfiguration", ); PRODUCT_NAME = scutil_sim; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; 15732AE216EA6B6700F3AC4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - BUILD_VARIANTS = ( - normal, - debug, - profile, - ); + BUILD_VARIANTS = normal; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/lib/system; - LD_DYLIB_INSTALL_NAME = /usr/lib/system/libsystem_sim_configuration.dylib; - LIBRARY_SEARCH_PATHS = "$(SDKDIR)/usr/lib"; + INSTALL_PATH = /usr/lib/system; LINK_WITH_STANDARD_LIBRARIES = NO; - OTHER_CFLAGS_debug = "-O0"; - OTHER_CFLAGS_normal = ""; - OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", "-L/usr/lib/system", - "-lcompiler_rt_sim", + "-lcompiler_rt", "-ldispatch", - "-ldyld_sim", - "-lsystem_sim_blocks", - "-lsystem_sim_c", + "-ldyld", + "-lsystem_asl", + "-lsystem_blocks", + "-lsystem_c", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_kernel", + "-lsystem_malloc", + "-lsystem_notify", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_platform", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_pthread", + "-lsystem_trace", "-lxpc", - "-Wl,-upward-lSystem", ); - PRIVATE_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; - PRODUCT_NAME = libsystem_sim_configuration; - PUBLIC_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; - STRIP_INSTALLED_PRODUCT_debug = NO; + 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; + SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_normal = YES; - STRIP_INSTALLED_PRODUCT_profile = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; 15732AE316EA6B6700F3AC4C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - BUILD_VARIANTS = ( - normal, - debug, - profile, - ); + BUILD_VARIANTS = normal; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/lib/system; - LD_DYLIB_INSTALL_NAME = /usr/lib/system/libsystem_sim_configuration.dylib; - LIBRARY_SEARCH_PATHS = "$(SDKDIR)/usr/lib"; + INSTALL_PATH = /usr/lib/system; LINK_WITH_STANDARD_LIBRARIES = NO; - OTHER_CFLAGS_debug = "-O0"; - OTHER_CFLAGS_normal = ""; - OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", "-L/usr/lib/system", - "-lcompiler_rt_sim", + "-lcompiler_rt", "-ldispatch", - "-ldyld_sim", - "-lsystem_sim_blocks", - "-lsystem_sim_c", + "-ldyld", + "-lsystem_asl", + "-lsystem_blocks", + "-lsystem_c", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_kernel", + "-lsystem_malloc", + "-lsystem_notify", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_platform", + "-lsystem$(INTERPOSITION_SIM_SUFFIX)_pthread", + "-lsystem_trace", "-lxpc", - "-Wl,-upward-lSystem", ); - PRIVATE_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; - PRODUCT_NAME = libsystem_sim_configuration; - PUBLIC_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; - STRIP_INSTALLED_PRODUCT_debug = NO; + 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; + SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_normal = YES; - STRIP_INSTALLED_PRODUCT_profile = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; @@ -6843,10 +8841,10 @@ isa = XCBuildConfiguration; buildSettings = { FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; - INSTALL_PATH = /usr/sbin; + INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = scselect; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -6854,21 +8852,21 @@ isa = XCBuildConfiguration; buildSettings = { FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; - INSTALL_PATH = /usr/sbin; + INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = scselect; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; 157434170D4A8137002ACA73 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_ENTITLEMENTS = scutil.tproj/entitlements.plist; FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", ); - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/sbin; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", @@ -6876,18 +8874,18 @@ ); PRODUCT_NAME = scutil; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; 157434180D4A8137002ACA73 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_ENTITLEMENTS = scutil.tproj/entitlements.plist; FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", ); - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/sbin; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", @@ -6895,27 +8893,20 @@ ); PRODUCT_NAME = scutil; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; 157A84E50D56C63900B6F1A0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BUILD_VARIANTS = ( - normal, - debug, - profile, - ); GENERATE_PROFILING_CODE_profile = YES; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALLHDRS_COPY_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/lib/system; - LD_DYLIB_INSTALL_NAME = /usr/lib/system/libsystem_configuration.dylib; + INSTALL_PATH_asan = /usr/local/lib; + INSTALL_PATH_tsan = /usr/local/lib; LINK_WITH_STANDARD_LIBRARIES = NO; - OTHER_CFLAGS_debug = "-O0"; - OTHER_CFLAGS_normal = ""; - OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", "-L/usr/lib/system", @@ -6930,35 +8921,46 @@ "-lsystem_notify", "-lsystem_platform", "-lsystem_pthread", + "-lsystem_trace", "-lxpc", "-Wl,-upward-lSystem", ); + "OTHER_LDFLAGS_asan[arch=i386]" = ""; + "OTHER_LDFLAGS_asan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_ios_dynamic"; + "OTHER_LDFLAGS_asan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_iossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_osx_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvosossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchossim_dynamic"; + "OTHER_LDFLAGS_tsan[arch=i386]" = ""; + "OTHER_LDFLAGS_tsan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_ios_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_iossim_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_osx_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvos_dynamic"; + "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_debug = NO; + STRIP_INSTALLED_PRODUCT_asan = NO; STRIP_INSTALLED_PRODUCT_normal = YES; - STRIP_INSTALLED_PRODUCT_profile = NO; - SUPPORTED_PLATFORMS = iphoneos; + STRIP_INSTALLED_PRODUCT_tsan = NO; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; 157A84E60D56C63900B6F1A0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BUILD_VARIANTS = ( - normal, - debug, - profile, - ); GENERATE_PROFILING_CODE_profile = YES; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALLHDRS_COPY_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/lib/system; - LD_DYLIB_INSTALL_NAME = /usr/lib/system/libsystem_configuration.dylib; + INSTALL_PATH_asan = /usr/local/lib; + INSTALL_PATH_tsan = /usr/local/lib; LINK_WITH_STANDARD_LIBRARIES = NO; - OTHER_CFLAGS_debug = "-O0"; - OTHER_CFLAGS_normal = ""; - OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", "-L/usr/lib/system", @@ -6973,45 +8975,73 @@ "-lsystem_notify", "-lsystem_platform", "-lsystem_pthread", + "-lsystem_trace", "-lxpc", "-Wl,-upward-lSystem", ); + "OTHER_LDFLAGS_asan[arch=i386]" = ""; + "OTHER_LDFLAGS_asan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_ios_dynamic"; + "OTHER_LDFLAGS_asan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_iossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_osx_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_tvosossim_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchos_dynamic"; + "OTHER_LDFLAGS_asan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.asan_watchossim_dynamic"; + "OTHER_LDFLAGS_tsan[arch=i386]" = ""; + "OTHER_LDFLAGS_tsan[sdk=iphoneos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_ios_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=iphonesimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_iossim_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=macosx*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_osx_dynamic"; + "OTHER_LDFLAGS_tsan[sdk=tvos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvos_dynamic"; + "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_debug = NO; + STRIP_INSTALLED_PRODUCT_asan = NO; STRIP_INSTALLED_PRODUCT_normal = YES; - STRIP_INSTALLED_PRODUCT_profile = NO; - SUPPORTED_PLATFORMS = iphoneos; + STRIP_INSTALLED_PRODUCT_tsan = NO; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; 157A84FF0D56C7E800B6F1A0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_IPMonitor\"", + ); PRODUCT_NAME = IPMonitor; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; 157A85000D56C7E800B6F1A0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_IPMonitor\"", + ); PRODUCT_NAME = IPMonitor; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7019,13 +9049,16 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_InterfaceNamer\"", + ); PRODUCT_NAME = InterfaceNamer; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7033,13 +9066,16 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_InterfaceNamer\"", + ); PRODUCT_NAME = InterfaceNamer; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7048,13 +9084,16 @@ buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_KernelEventMonitor\"", + ); PRODUCT_NAME = KernelEventMonitor; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7063,13 +9102,16 @@ buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_KernelEventMonitor\"", + ); PRODUCT_NAME = KernelEventMonitor; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7077,13 +9119,12 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = LinkConfiguration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7091,13 +9132,12 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = LinkConfiguration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7105,13 +9145,12 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = PreferencesMonitor; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7119,31 +9158,28 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; PRODUCT_NAME = PreferencesMonitor; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT = NO; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; 157FDE3F164A075F0040D6A8 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INSTALLHDRS_COPY_PHASE = YES; PRODUCT_NAME = "configd_libSystem (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; 157FDE40164A075F0040D6A8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INSTALLHDRS_COPY_PHASE = YES; PRODUCT_NAME = "configd_libSystem (EmbeddedSimulator)"; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; @@ -7151,6 +9187,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "configd_base (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7158,6 +9195,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "configd_base (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7165,6 +9203,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "configd_plugins (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7172,6 +9211,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "configd_plugins (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7179,6 +9219,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "configd_executables (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7186,50 +9227,65 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "configd_executables (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; 1583175E0CFB80A1006F62B9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - APPLY_RULES_IN_COPY_FILES = YES; CODE_SIGN_ENTITLEMENTS = "configd.tproj/entitlements-ios.plist"; CODE_SIGN_IDENTITY = "-"; FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", ); - INSTALL_MODE_FLAG = "a-w,a+rX"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)/usr/local/lib/SystemConfiguration", ); + OTHER_LDFLAGS = ( + "-lKernelEventMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lInterfaceNamer$(EXECUTABLE_VARIANT_SUFFIX)", + "-lIPMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lLinkConfiguration$(EXECUTABLE_VARIANT_SUFFIX)", + "-lPreferencesMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lQoSMarking$(EXECUTABLE_VARIANT_SUFFIX)", + ); PRODUCT_NAME = configd; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; 1583175F0CFB80A1006F62B9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - APPLY_RULES_IN_COPY_FILES = YES; CODE_SIGN_ENTITLEMENTS = "configd.tproj/entitlements-ios.plist"; CODE_SIGN_IDENTITY = "-"; FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", ); - INSTALL_MODE_FLAG = "a-w,a+rX"; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( "$(SYMROOT)", "$(SDKROOT)/usr/local/lib/SystemConfiguration", ); + OTHER_LDFLAGS = ( + "-lKernelEventMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lInterfaceNamer$(EXECUTABLE_VARIANT_SUFFIX)", + "-lIPMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lLinkConfiguration$(EXECUTABLE_VARIANT_SUFFIX)", + "-lPreferencesMonitor$(EXECUTABLE_VARIANT_SUFFIX)", + "-lQoSMarking$(EXECUTABLE_VARIANT_SUFFIX)", + ); PRODUCT_NAME = configd; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7237,11 +9293,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/IPMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; PRODUCT_NAME = IPMonitor; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7249,11 +9305,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/IPMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; PRODUCT_NAME = IPMonitor; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7261,11 +9317,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/InterfaceNamer/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.InterfaceNamer; PRODUCT_NAME = InterfaceNamer; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7273,11 +9329,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/InterfaceNamer/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.InterfaceNamer; PRODUCT_NAME = InterfaceNamer; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7285,11 +9341,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/KernelEventMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.KernelEventMonitor; PRODUCT_NAME = KernelEventMonitor; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7297,11 +9353,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/KernelEventMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.KernelEventMonitor; PRODUCT_NAME = KernelEventMonitor; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7309,11 +9365,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/LinkConfiguration/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.LinkConfiguration; PRODUCT_NAME = LinkConfiguration; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7321,11 +9377,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/LinkConfiguration/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.LinkConfiguration; PRODUCT_NAME = LinkConfiguration; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; @@ -7333,11 +9389,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/PreferencesMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.PreferencesMonitor; PRODUCT_NAME = PreferencesMonitor; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; @@ -7345,295 +9401,665 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = Plugins/PreferencesMonitor/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.PreferencesMonitor; PRODUCT_NAME = PreferencesMonitor; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; 158337A70CFB6B9E0033AB93 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - APPLY_RULES_IN_COPY_FILES = YES; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework"; + "INSTALL_PATH[sdk=appletv*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework"; + "INSTALL_PATH[sdk=iphone*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework"; + "INSTALL_PATH[sdk=watch*]" = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/SystemConfiguration.framework"; PRODUCT_NAME = SCHelper; SDKROOT = iphoneos.internal; - SUPPORTED_PLATFORMS = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; 158337A80CFB6B9E0033AB93 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - APPLY_RULES_IN_COPY_FILES = YES; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework"; + "INSTALL_PATH[sdk=appletv*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework"; + "INSTALL_PATH[sdk=iphone*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks/SystemConfiguration.framework"; + "INSTALL_PATH[sdk=watch*]" = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/SystemConfiguration.framework"; PRODUCT_NAME = SCHelper; SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; + }; + name = Release; + }; + 15A5A2670D5B94190087BDA0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_VARIANTS = normal; + DEFINES_MODULE = YES; + HEADER_SEARCH_PATHS = ( + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", + "$(SDKROOT)/usr/local/include/ppp", + ); + INFOPLIST_FILE = "SystemConfiguration.fproj/Info-Embedded.plist"; + INSTALLHDRS_SCRIPT_PHASE = YES; + "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)", + "$(SDKROOT)/usr/local/lib", + ); + MODULEMAP_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap; + MODULEMAP_PRIVATE_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.private.modulemap; + OTHER_CFLAGS = ( + "$(inherited)", + "-idirafter", + "$(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; + }; + name = Debug; + }; + 15A5A2680D5B94190087BDA0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_VARIANTS = normal; + DEFINES_MODULE = YES; + HEADER_SEARCH_PATHS = ( + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", + "$(SDKROOT)/usr/local/include/ppp", + ); + INFOPLIST_FILE = "SystemConfiguration.fproj/Info-Embedded.plist"; + INSTALLHDRS_SCRIPT_PHASE = YES; + "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)", + "$(SDKROOT)/usr/local/lib", + ); + MODULEMAP_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.modulemap; + MODULEMAP_PRIVATE_FILE = SystemConfiguration.fproj/Modules/SystemConfiguration.private.modulemap; + OTHER_CFLAGS = ( + "$(inherited)", + "-idirafter", + "$(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; + }; + name = Release; + }; + 15C64A1F0F684C3300D78394 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = configd_libSystem; + }; + name = Debug; + }; + 15C64A200F684C3300D78394 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = configd_libSystem; + }; + name = Release; + }; + 15C64A2C0F684C6B00D78394 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "configd_libSystem (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; + }; + name = Debug; + }; + 15C64A2D0F684C6B00D78394 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "configd_libSystem (Embedded)"; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; + }; + name = Release; + }; + 15D3082516F3E4DA00014F82 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_VARIANTS = normal; + DEBUG_INFORMATION_FORMAT = dwarf; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INSTALL_PATH = /usr/local/lib/SystemConfiguration; + LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_SimulatorSupport\"", + ); + PRODUCT_NAME = SimulatorSupport_sim; + SDKROOT = iphoneos.internal; + STRIP_INSTALLED_PRODUCT = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Debug; + }; + 15D3082616F3E4DA00014F82 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_VARIANTS = normal; + DEBUG_INFORMATION_FORMAT = dwarf; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INSTALL_PATH = /usr/local/lib/SystemConfiguration; + LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_SimulatorSupport\"", + ); + PRODUCT_NAME = SimulatorSupport_sim; + SDKROOT = iphoneos.internal; + STRIP_INSTALLED_PRODUCT = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Release; + }; + 15D3082B16F3E4E100014F82 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = Plugins/SimulatorSupport/Info.plist; + INSTALL_PATH = /System/Library/SystemConfiguration; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.SimulatorSupport; + PRODUCT_NAME = SimulatorSupport; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Debug; + }; + 15D3082C16F3E4E100014F82 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = Plugins/SimulatorSupport/Info.plist; + INSTALL_PATH = /System/Library/SystemConfiguration; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.SimulatorSupport; + PRODUCT_NAME = SimulatorSupport; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Release; + }; + 15E1B05716EBAE3C00E5F06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_VARIANTS = normal; + DEBUG_INFORMATION_FORMAT = dwarf; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; + INSTALL_PATH = /usr/local/lib/SystemConfiguration; + LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_IPMonitor\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; + PRODUCT_NAME = IPMonitor_sim; + SDKROOT = iphoneos.internal; + STRIP_INSTALLED_PRODUCT = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Debug; + }; + 15E1B05816EBAE3C00E5F06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_VARIANTS = normal; + DEBUG_INFORMATION_FORMAT = dwarf; + HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; + INSTALL_PATH = /usr/local/lib/SystemConfiguration; + LIBRARY_STYLE = STATIC; + OTHER_CFLAGS = ( + "$(inherited)", + "-DSC_LOG_HANDLE=\"__log_IPMonitor\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; + PRODUCT_NAME = IPMonitor_sim; + SDKROOT = iphoneos.internal; + STRIP_INSTALLED_PRODUCT = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Release; + }; + 15E1B05F16EBAE7800E5F06F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; + INSTALL_PATH = /System/Library/SystemConfiguration; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; + PRODUCT_NAME = IPMonitor; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Debug; + }; + 15E1B06016EBAE7800E5F06F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; + INSTALL_PATH = /System/Library/SystemConfiguration; + PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.IPMonitor; + PRODUCT_NAME = IPMonitor; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + }; + name = Release; + }; + 15E83105167F9AF600FD51EC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 15E83106167F9AF600FD51EC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 15E91DBC21893E83001155DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_MODULES_DISABLE_PRIVATE_WARNING = YES; + OTHER_CFLAGS = ( + "$(inherited)", + "-Wnon-modular-include-in-module", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphoneos; + }; + name = Debug; + }; + 15E91DBD21893E83001155DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_MODULES_DISABLE_PRIVATE_WARNING = YES; + OTHER_CFLAGS = ( + "$(inherited)", + "-Wnon-modular-include-in-module", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphoneos; + }; + name = Release; + }; + 15E91DD421893EE1001155DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphoneos; + }; + name = Debug; + }; + 15E91DD521893EE1001155DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; SUPPORTED_PLATFORMS = iphoneos; }; name = Release; }; - 15A5A2670D5B94190087BDA0 /* Debug */ = { + 15EF89AF21894636003B2C5C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - HEADER_SEARCH_PATHS = ( - "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", - "$(SDKROOT)/usr/local/include/ppp", - ); - INFOPLIST_FILE = "SystemConfiguration.fproj/Info-Embedded.plist"; - INSTALLHDRS_SCRIPT_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_MODULES_DISABLE_PRIVATE_WARNING = YES; OTHER_CFLAGS = ( - "-idirafter", - "$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", + "$(inherited)", + "-Wnon-modular-include-in-module", ); - PRODUCT_NAME = SystemConfiguration; - WRAPPER_EXTENSION = framework; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphonesimulator; }; name = Debug; }; - 15A5A2680D5B94190087BDA0 /* Release */ = { + 15EF89B021894636003B2C5C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - HEADER_SEARCH_PATHS = ( - "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", - "$(SDKROOT)/usr/local/include/ppp", - ); - INFOPLIST_FILE = "SystemConfiguration.fproj/Info-Embedded.plist"; - INSTALLHDRS_SCRIPT_PHASE = YES; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_MODULES_DISABLE_PRIVATE_WARNING = YES; OTHER_CFLAGS = ( - "-idirafter", - "$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", + "$(inherited)", + "-Wnon-modular-include-in-module", ); - PRODUCT_NAME = SystemConfiguration; - WRAPPER_EXTENSION = framework; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphonesimulator; }; name = Release; }; - 15AB751716EBFF3400FAA8CE /* Debug */ = { + 15EF89BA21894665003B2C5C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; - LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SCNetworkReachability_sim; - STRIP_INSTALLED_PRODUCT = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphonesimulator; }; name = Debug; }; - 15AB751816EBFF3400FAA8CE /* Release */ = { + 15EF89BB21894665003B2C5C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; - LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SCNetworkReachability_sim; - STRIP_INSTALLED_PRODUCT = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = iphonesimulator; }; name = Release; }; - 15AB751D16EBFF8A00FAA8CE /* Debug */ = { + 15F742E21EC6370000DA2E7A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; - PRODUCT_NAME = SCNetworkReachability; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_ENABLE_OBJC_ARC = YES; + EXECUTABLE_PREFIX = liblog_; + GENERATE_PROFILING_CODE_profile = YES; + INSTALLHDRS_COPY_PHASE = YES; + INSTALL_PATH = /usr/lib/log; + 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; + STRIP_INSTALLED_PRODUCT_debug = NO; + STRIP_INSTALLED_PRODUCT_normal = YES; + STRIP_INSTALLED_PRODUCT_profile = NO; + STRIP_INSTALLED_PRODUCT_tsan = NO; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; - 15AB751E16EBFF8A00FAA8CE /* Release */ = { + 15F742E31EC6370000DA2E7A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; - PRODUCT_NAME = SCNetworkReachability; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_ENABLE_OBJC_ARC = YES; + EXECUTABLE_PREFIX = liblog_; + GENERATE_PROFILING_CODE_profile = YES; + INSTALLHDRS_COPY_PHASE = YES; + INSTALL_PATH = /usr/lib/log; + 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; + STRIP_INSTALLED_PRODUCT_debug = NO; + STRIP_INSTALLED_PRODUCT_normal = YES; + STRIP_INSTALLED_PRODUCT_profile = NO; + STRIP_INSTALLED_PRODUCT_tsan = NO; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; - 15C64A1F0F684C3300D78394 /* Debug */ = { + 15F742EF1EC638D100DA2E7A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INSTALL_PATH = /usr/local/lib/system; - PRODUCT_NAME = configd_libSystem; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_ENABLE_OBJC_ARC = YES; + EXECUTABLE_PREFIX = liblog_; + GENERATE_PROFILING_CODE_profile = YES; + INSTALLHDRS_COPY_PHASE = YES; + INSTALL_PATH = /usr/lib/log; + 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; + STRIP_INSTALLED_PRODUCT_debug = NO; + STRIP_INSTALLED_PRODUCT_normal = YES; + STRIP_INSTALLED_PRODUCT_profile = NO; + STRIP_INSTALLED_PRODUCT_tsan = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; - 15C64A200F684C3300D78394 /* Release */ = { + 15F742F01EC638D100DA2E7A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INSTALL_PATH = /usr/local/lib/system; - PRODUCT_NAME = configd_libSystem; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO; + CLANG_ENABLE_OBJC_ARC = YES; + EXECUTABLE_PREFIX = liblog_; + GENERATE_PROFILING_CODE_profile = YES; + INSTALLHDRS_COPY_PHASE = YES; + INSTALL_PATH = /usr/lib/log; + 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; + STRIP_INSTALLED_PRODUCT_debug = NO; + STRIP_INSTALLED_PRODUCT_normal = YES; + STRIP_INSTALLED_PRODUCT_profile = NO; + STRIP_INSTALLED_PRODUCT_tsan = NO; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; - 15C64A2C0F684C6B00D78394 /* Debug */ = { + 15FD13C70D59485000F9409C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INSTALL_PATH = /usr/local/lib/system; - PRODUCT_NAME = "configd_libSystem (Embedded)"; + PRODUCT_NAME = configdAggregateEmbeddedSimulator; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Debug; }; - 15C64A2D0F684C6B00D78394 /* Release */ = { + 15FD13C80D59485000F9409C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INSTALL_PATH = /usr/local/lib/system; - PRODUCT_NAME = "configd_libSystem (Embedded)"; + PRODUCT_NAME = configdAggregateEmbeddedSimulator; + SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; }; name = Release; }; - 15D3082516F3E4DA00014F82 /* Debug */ = { + 72573D2B1D667372004975AD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = "sctest/sctest-entitlements.plist"; + CODE_SIGN_IDENTITY = "-"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; - LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SimulatorSupport_sim; - STRIP_INSTALLED_PRODUCT = NO; + INSTALL_PATH = /usr/local/bin; + PLIST_FILE_OUTPUT_FORMAT = "same-as-input"; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; - 15D3082616F3E4DA00014F82 /* Release */ = { + 72573D2C1D667372004975AD /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = "sctest/sctest-entitlements.plist"; + CODE_SIGN_IDENTITY = "-"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; - LIBRARY_STYLE = STATIC; - PRODUCT_NAME = SimulatorSupport_sim; - STRIP_INSTALLED_PRODUCT = NO; - }; - name = Release; - }; - 15D3082B16F3E4E100014F82 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Plugins/SimulatorSupport/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; - PRODUCT_NAME = SimulatorSupport; - }; - name = Debug; - }; - 15D3082C16F3E4E100014F82 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Plugins/SimulatorSupport/Info.plist; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; - PRODUCT_NAME = SimulatorSupport; + INSTALL_PATH = /usr/local/bin; + PLIST_FILE_OUTPUT_FORMAT = "same-as-input"; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; - 15E1B05716EBAE3C00E5F06F /* Debug */ = { + 7271EA301D76600B0055B1AA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = "sctest/sctest-entitlements.plist"; + CODE_SIGN_IDENTITY = "-"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; - LIBRARY_STYLE = STATIC; - PRODUCT_NAME = IPMonitor_sim; - STRIP_INSTALLED_PRODUCT = NO; + INSTALL_PATH = /usr/local/bin; + PLIST_FILE_OUTPUT_FORMAT = "same-as-input"; + PRODUCT_NAME = sctest; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Debug; }; - 15E1B05816EBAE3C00E5F06F /* Release */ = { + 7271EA311D76600B0055B1AA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = "sctest/sctest-entitlements.plist"; + CODE_SIGN_IDENTITY = "-"; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; - INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; - LIBRARY_STYLE = STATIC; - PRODUCT_NAME = IPMonitor_sim; - STRIP_INSTALLED_PRODUCT = NO; + INSTALL_PATH = /usr/local/bin; + PLIST_FILE_OUTPUT_FORMAT = "same-as-input"; + PRODUCT_NAME = sctest; + SDKROOT = iphoneos.internal; + SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; }; name = Release; }; - 15E1B05F16EBAE7800E5F06F /* Debug */ = { + 72D3E6631AE6EA3A00DB4C69 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; - PRODUCT_NAME = IPMonitor; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; - 15E1B06016EBAE7800E5F06F /* Release */ = { + 72D3E6641AE6EA3A00DB4C69 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; - INSTALL_MODE_FLAG = "a-w,a+rX"; - INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; - PRODUCT_NAME = IPMonitor; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; - 15E83105167F9AF600FD51EC /* Debug */ = { + 72D3E66E1AE6EAF600DB4C69 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_MODULES_DISABLE_PRIVATE_WARNING = YES; + OTHER_CFLAGS = ( + "$(inherited)", + "-Wnon-modular-include-in-module", + ); PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; - 15E83106167F9AF600FD51EC /* Release */ = { + 72D3E66F1AE6EAF600DB4C69 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CLANG_MODULES_DISABLE_PRIVATE_WARNING = YES; + OTHER_CFLAGS = ( + "$(inherited)", + "-Wnon-modular-include-in-module", + ); PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; - 15FD13C70D59485000F9409C /* Debug */ = { + C4666C75206ED01800247AB6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - PRODUCT_NAME = "configd (Aggregate/EmbeddedSimulator)"; + 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-with-dsym"; + DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = YES; + 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"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../../../"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx.internal; }; name = Debug; }; - 15FD13C80D59485000F9409C /* Release */ = { + C4666C76206ED01800247AB6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - PRODUCT_NAME = "configd (Aggregate/EmbeddedSimulator)"; + 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; + DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = ""; + 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"; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../../../"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx.internal; }; name = Release; }; @@ -7649,6 +10075,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 151D06081EC1491600E02E48 /* Build configuration list for PBXNativeTarget "liblog_SystemConfiguration" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 151D06091EC1491600E02E48 /* Debug */, + 151D060A1EC1491600E02E48 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 151F5D9F0CCE98E60093AC3B /* Build configuration list for PBXNativeTarget "SCMonitor" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -7676,56 +10111,74 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 15213FFF0E93E9F600DACD2C /* Build configuration list for PBXNativeTarget "Logger.bundle" */ = { + 15401C1D21991506006326B7 /* Build configuration list for PBXAggregateTarget "configd_extras" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15401C1E21991506006326B7 /* Debug */, + 15401C1F21991506006326B7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15401C23219915BC006326B7 /* Build configuration list for PBXAggregateTarget "configd_extras-Embedded" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15401C24219915BC006326B7 /* Debug */, + 15401C25219915BC006326B7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15401C28219915C6006326B7 /* Build configuration list for PBXAggregateTarget "configd_extras-EmbeddedSimulator" */ = { isa = XCConfigurationList; buildConfigurations = ( - 15213FFC0E93E9F600DACD2C /* Debug */, - 15213FFD0E93E9F600DACD2C /* Release */, + 15401C29219915C6006326B7 /* Debug */, + 15401C2A219915C6006326B7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1528BFDF1357305400691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability" */ = { + 155F498A1C864F1400E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1528BFE01357305400691881 /* Debug */, - 1528BFE11357305400691881 /* Release */, + 155F498B1C864F1400E47D08 /* Debug */, + 155F498C1C864F1400E47D08 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1528BFE51357309700691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability.bundle" */ = { + 155F49901C864F3700E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking.bundle" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1528BFE61357309700691881 /* Debug */, - 1528BFE71357309700691881 /* Release */, + 155F49911C864F3700E47D08 /* Debug */, + 155F49921C864F3700E47D08 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1528BFF413573FEE00691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability-Embedded" */ = { + 155F49991C864F4E00E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking-Embedded" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1528BFF513573FEE00691881 /* Debug */, - 1528BFF613573FEE00691881 /* Release */, + 155F499A1C864F4E00E47D08 /* Debug */, + 155F499B1C864F4E00E47D08 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1528BFFB13573FF500691881 /* Build configuration list for PBXNativeTarget "SCNetworkReachability.bundle-Embedded" */ = { + 155F499F1C864F5400E47D08 /* Build configuration list for PBXNativeTarget "QoSMarking.bundle-Embedded" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1528BFFC13573FF500691881 /* Debug */, - 1528BFFD13573FF500691881 /* Release */, + 155F49A01C864F5400E47D08 /* Debug */, + 155F49A11C864F5400E47D08 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 156CA4820EF853BB00C59A18 /* Build configuration list for PBXNativeTarget "Logger.bundle-Embedded" */ = { + 15631D231ECF98FB0088EEDD /* Build configuration list for PBXAggregateTarget "configd_executables-EmbeddedSimulator" */ = { isa = XCConfigurationList; buildConfigurations = ( - 156CA4830EF853BB00C59A18 /* Debug */, - 156CA4840EF853BB00C59A18 /* Release */, + 15631D241ECF98FB0088EEDD /* Debug */, + 15631D251ECF98FB0088EEDD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -8135,24 +10588,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 15AB751616EBFF3400FAA8CE /* Build configuration list for PBXNativeTarget "SCNetworkReachability-EmbeddedSimulator" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 15AB751716EBFF3400FAA8CE /* Debug */, - 15AB751816EBFF3400FAA8CE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 15AB751C16EBFF8A00FAA8CE /* Build configuration list for PBXNativeTarget "SCNetworkReachability.bundle-EmbeddedSimulator" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 15AB751D16EBFF8A00FAA8CE /* Debug */, - 15AB751E16EBFF8A00FAA8CE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 15C64A270F684C6B00D78394 /* Build configuration list for PBXAggregateTarget "configd_libSystem" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -8216,6 +10651,60 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 15E91DBB21893E83001155DC /* Build configuration list for PBXNativeTarget "SCTest-ObjC-Embedded" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15E91DBC21893E83001155DC /* Debug */, + 15E91DBD21893E83001155DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15E91DD321893EE1001155DC /* Build configuration list for PBXNativeTarget "SCTest-Swift-Embedded" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15E91DD421893EE1001155DC /* Debug */, + 15E91DD521893EE1001155DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15EF89AE21894636003B2C5C /* Build configuration list for PBXNativeTarget "SCTest-ObjC-EmbeddedSimulator" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15EF89AF21894636003B2C5C /* Debug */, + 15EF89B021894636003B2C5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15EF89B921894665003B2C5C /* Build configuration list for PBXNativeTarget "SCTest-Swift-EmbeddedSimulator" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15EF89BA21894665003B2C5C /* Debug */, + 15EF89BB21894665003B2C5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15F742E11EC6370000DA2E7A /* Build configuration list for PBXNativeTarget "liblog_SystemConfiguration-Embedded" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15F742E21EC6370000DA2E7A /* Debug */, + 15F742E31EC6370000DA2E7A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15F742EE1EC638D100DA2E7A /* Build configuration list for PBXNativeTarget "liblog_SystemConfiguration-EmbeddedSimulator" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15F742EF1EC638D100DA2E7A /* Debug */, + 15F742F01EC638D100DA2E7A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 15FD13C60D59485000F9409C /* Build configuration list for PBXAggregateTarget "All-EmbeddedSimulator" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -8225,6 +10714,51 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 72573D2A1D667372004975AD /* Build configuration list for PBXNativeTarget "sctest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 72573D2B1D667372004975AD /* Debug */, + 72573D2C1D667372004975AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7271EA2F1D76600B0055B1AA /* Build configuration list for PBXNativeTarget "sctest-Embedded" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7271EA301D76600B0055B1AA /* Debug */, + 7271EA311D76600B0055B1AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 72D3E6621AE6EA3A00DB4C69 /* Build configuration list for PBXNativeTarget "SCTest-Swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 72D3E6631AE6EA3A00DB4C69 /* Debug */, + 72D3E6641AE6EA3A00DB4C69 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 72D3E66D1AE6EAF600DB4C69 /* Build configuration list for PBXNativeTarget "SCTest-ObjC" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 72D3E66E1AE6EAF600DB4C69 /* Debug */, + 72D3E66F1AE6EAF600DB4C69 /* Release */, + ); + 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/src/configd/dnsinfo/dnsinfo.h b/src/configd/dnsinfo/dnsinfo.h index 60be01a75..d5a0e70e2 100644 --- a/src/configd/dnsinfo/dnsinfo.h +++ b/src/configd/dnsinfo/dnsinfo.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2006, 2008, 2009, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2008, 2009, 2011-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@ */ @@ -28,14 +28,14 @@ * These routines provide access to the systems DNS configuration */ -#include +#include #include #include #include #include #include -#define DNSINFO_VERSION 20130402 +#define DNSINFO_VERSION 20170629 #define DEFAULT_SEARCH_ORDER 200000 /* search order for the "default" resolver domain name */ @@ -74,19 +74,23 @@ typedef struct { DNS_VAR(uint32_t, flags); DNS_VAR(uint32_t, reach_flags); /* SCNetworkReachabilityFlags */ DNS_VAR(uint32_t, service_identifier); - DNS_VAR(uint32_t, reserved[4]); + DNS_PTR(char *, cid); /* configuration identifer */ + DNS_PTR(char *, if_name); /* if_index interface name */ } dns_resolver_t; #pragma pack() -#define DNS_RESOLVER_FLAGS_SCOPED 1 /* configuration is for scoped questions */ -#define DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS 2 /* always requesting for A dns records in queries */ -#define DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS 4 /* always requesting for AAAA dns records in queries */ -#define DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC 8 /* configuration is service-specific */ +#define DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS 0x0002 /* always requesting for A dns records in queries */ +#define DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS 0x0004 /* always requesting for AAAA dns records in queries */ #define DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS \ (DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS | DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) +#define DNS_RESOLVER_FLAGS_SCOPED 0x1000 /* configuration is for scoped questions */ +#define DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC 0x2000 /* configuration is service-specific */ +#define DNS_RESOLVER_FLAGS_SUPPLEMENTAL 0x4000 /* supplemental match configuration */ + + #pragma pack(4) typedef struct { DNS_VAR(int32_t, n_resolver); /* resolver configurations */ @@ -96,6 +100,7 @@ typedef struct { DNS_VAR(uint64_t, generation); DNS_VAR(int32_t, n_service_specific_resolver); DNS_PTR(dns_resolver_t **, service_specific_resolver); + DNS_VAR(uint32_t, version); } dns_config_t; #pragma pack() @@ -106,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/src/configd/dnsinfo/dnsinfo_copy.c b/src/configd/dnsinfo/dnsinfo_copy.c index 81ef60187..b5fda0739 100644 --- a/src/configd/dnsinfo/dnsinfo_copy.c +++ b/src/configd/dnsinfo/dnsinfo_copy.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004, 2006, 2008-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2006, 2008-2013, 2015-2017, 2019 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@ */ @@ -31,285 +31,19 @@ #include #include #include -#include -#include #include +#include #include +#ifndef SC_LOG_HANDLE +#include +#define my_log(__level, __format, ...) os_log(OS_LOG_DEFAULT, __format, ## __VA_ARGS__) +#endif // SC_LOG_HANDLE + #include "libSystemConfiguration_client.h" #include "dnsinfo.h" #include "dnsinfo_private.h" - -typedef uint32_t getflags; - -static boolean_t -add_list(void **padding, uint32_t *n_padding, int32_t count, int32_t size, void **list) -{ - int32_t need; - - need = count * size; - if (need > *n_padding) { - return FALSE; - } - - *list = (need == 0) ? NULL : *padding; - *padding += need; - *n_padding -= need; - return TRUE; -} - - -#define DNS_CONFIG_BUF_MAX 1024*1024 - - -static dns_resolver_t * -expand_resolver(_dns_resolver_buf_t *buf, uint32_t n_buf, void **padding, uint32_t *n_padding) -{ - dns_attribute_t *attribute; - uint32_t n_attribute; - int32_t n_nameserver = 0; - int32_t n_search = 0; - int32_t n_sortaddr = 0; - dns_resolver_t *resolver = (dns_resolver_t *)&buf->resolver; - - if (n_buf < sizeof(_dns_resolver_buf_t)) { - goto error; - } - - // initialize domain - - resolver->domain = NULL; - - // initialize nameserver list - - resolver->n_nameserver = ntohl(resolver->n_nameserver); - if (!add_list(padding, - n_padding, - resolver->n_nameserver, - sizeof(DNS_PTR(struct sockaddr *, x)), - (void **)&resolver->nameserver)) { - goto error; - } - - // initialize port - - resolver->port = ntohs(resolver->port); - - // initialize search list - - resolver->n_search = ntohl(resolver->n_search); - if (!add_list(padding, - n_padding, - resolver->n_search, - sizeof(DNS_PTR(char *, x)), - (void **)&resolver->search)) { - goto error; - } - - // initialize sortaddr list - - resolver->n_sortaddr = ntohl(resolver->n_sortaddr); - if (!add_list(padding, - n_padding, - resolver->n_sortaddr, - sizeof(DNS_PTR(dns_sortaddr_t *, x)), - (void **)&resolver->sortaddr)) { - goto error; - } - - // initialize options - - resolver->options = NULL; - - // initialize timeout - - resolver->timeout = ntohl(resolver->timeout); - - // initialize search_order - - resolver->search_order = ntohl(resolver->search_order); - - // initialize if_index - - resolver->if_index = ntohl(resolver->if_index); - - // initialize service_identifier - - resolver->service_identifier = ntohl(resolver->service_identifier); - - // initialize flags - - resolver->flags = ntohl(resolver->flags); - - // initialize SCNetworkReachability flags - - resolver->reach_flags = ntohl(resolver->reach_flags); - - // process resolver buffer "attribute" data - - n_attribute = n_buf - sizeof(_dns_resolver_buf_t); - /* ALIGN: alignment not assumed, using accessors */ - attribute = (dns_attribute_t *)(void *)&buf->attribute[0]; - if (n_attribute != ntohl(buf->n_attribute)) { - goto error; - } - - while (n_attribute >= sizeof(dns_attribute_t)) { - uint32_t attribute_length = ntohl(attribute->length); - - switch (ntohl(attribute->type)) { - case RESOLVER_ATTRIBUTE_DOMAIN : - resolver->domain = (char *)&attribute->attribute[0]; - break; - - case RESOLVER_ATTRIBUTE_ADDRESS : - resolver->nameserver[n_nameserver++] = (struct sockaddr *)&attribute->attribute[0]; - break; - - case RESOLVER_ATTRIBUTE_SEARCH : - resolver->search[n_search++] = (char *)&attribute->attribute[0]; - break; - - case RESOLVER_ATTRIBUTE_SORTADDR : - resolver->sortaddr[n_sortaddr++] = (dns_sortaddr_t *)(void *)&attribute->attribute[0]; - break; - - case RESOLVER_ATTRIBUTE_OPTIONS : - resolver->options = (char *)&attribute->attribute[0]; - break; - - default : - break; - } - - attribute = (dns_attribute_t *)((void *)attribute + attribute_length); - n_attribute -= attribute_length; - } - - if ((n_nameserver != resolver->n_nameserver) || - (n_search != resolver->n_search ) || - (n_sortaddr != resolver->n_sortaddr )) { - goto error; - } - - return resolver; - - error : - - return NULL; -} - - -static dns_config_t * -expand_config(_dns_config_buf_t *buf) -{ - dns_attribute_t *attribute; - dns_config_t *config = (dns_config_t *)buf; - uint32_t n_attribute; - uint32_t n_padding; - int32_t n_resolver = 0; - int32_t n_scoped_resolver = 0; - int32_t n_service_specific_resolver = 0; - void *padding; - - // establish padding - - padding = &buf->attribute[ntohl(buf->n_attribute)]; - n_padding = ntohl(buf->n_padding); - - // initialize resolver lists - - config->n_resolver = ntohl(config->n_resolver); - if (!add_list(&padding, - &n_padding, - config->n_resolver, - sizeof(DNS_PTR(dns_resolver_t *, x)), - (void **)&config->resolver)) { - goto error; - } - - config->n_scoped_resolver = ntohl(config->n_scoped_resolver); - if (!add_list(&padding, - &n_padding, - config->n_scoped_resolver, - sizeof(DNS_PTR(dns_resolver_t *, x)), - (void **)&config->scoped_resolver)) { - goto error; - } - - config->n_service_specific_resolver = ntohl(config->n_service_specific_resolver); - if (!add_list(&padding, - &n_padding, - config->n_service_specific_resolver, - sizeof(DNS_PTR(dns_resolver_t *, x)), - (void **)&config->service_specific_resolver)) { - goto error; - } - - // process configuration buffer "attribute" data - - n_attribute = ntohl(buf->n_attribute); - attribute = (dns_attribute_t *)(void *)&buf->attribute[0]; - - while (n_attribute >= sizeof(dns_attribute_t)) { - uint32_t attribute_length = ntohl(attribute->length); - uint32_t attribute_type = ntohl(attribute->type); - - switch (attribute_type) { - case CONFIG_ATTRIBUTE_RESOLVER : - case CONFIG_ATTRIBUTE_SCOPED_RESOLVER : - case CONFIG_ATTRIBUTE_SERVICE_SPECIFIC_RESOLVER : { - dns_resolver_t *resolver; - - // expand resolver buffer - - resolver = expand_resolver((_dns_resolver_buf_t *)(void *)&attribute->attribute[0], - attribute_length - sizeof(dns_attribute_t), - &padding, - &n_padding); - if (resolver == NULL) { - goto error; - } - - // add resolver to config list - - if (attribute_type == CONFIG_ATTRIBUTE_RESOLVER) { - config->resolver[n_resolver++] = resolver; - } else if (attribute_type == CONFIG_ATTRIBUTE_SCOPED_RESOLVER) { - config->scoped_resolver[n_scoped_resolver++] = resolver; - } else if (attribute_type == CONFIG_ATTRIBUTE_SERVICE_SPECIFIC_RESOLVER) { - config->service_specific_resolver[n_service_specific_resolver++] = resolver; - } - - break; - } - - default : - break; - } - - attribute = (dns_attribute_t *)((void *)attribute + attribute_length); - n_attribute -= attribute_length; - } - - if (n_resolver != config->n_resolver) { - goto error; - } - - if (n_scoped_resolver != config->n_scoped_resolver) { - goto error; - } - - if (n_service_specific_resolver != config->n_service_specific_resolver) { - goto error; - } - - return config; - - error : - - return NULL; -} +#include "dnsinfo_internal.h" const char * @@ -317,11 +51,7 @@ dns_configuration_notify_key() { const char *key; -#if !TARGET_IPHONE_SIMULATOR key = "com.apple.system.SystemConfiguration.dns_configuration"; -#else // !TARGET_IPHONE_SIMULATOR - key = "com.apple.iOS_Simulator.SystemConfiguration.dns_configuration"; -#endif // !TARGET_IPHONE_SIMULATOR return key; } @@ -331,8 +61,8 @@ dns_configuration_notify_key() // Note: protected by __dns_configuration_queue() -static int dnsinfo_active = 0; -static libSC_info_client_t *dnsinfo_client = NULL; +static int dnsinfo_active = 0; +static libSC_info_client_t *dnsinfo_client = NULL; static dispatch_queue_t @@ -352,25 +82,32 @@ __dns_configuration_queue() dns_config_t * dns_configuration_copy() { - uint8_t *buf = NULL; - dns_config_t *config = NULL; + dns_config_t *dns_config = NULL; + _dns_config_buf_t *dns_config_buf = NULL; static const char *proc_name = NULL; xpc_object_t reqdict; xpc_object_t reply; + if (!libSC_info_available()) { + os_log(OS_LOG_DEFAULT, "*** DNS configuration requested between fork() and exec()"); + return NULL; + } + dispatch_sync(__dns_configuration_queue(), ^{ if ((dnsinfo_active++ == 0) || (dnsinfo_client == NULL)) { static dispatch_once_t once; static const char *service_name = DNSINFO_SERVICE_NAME; dispatch_once(&once, ^{ +#if DEBUG const char *name; // get [XPC] service name name = getenv(service_name); - if ((name != NULL) && (issetugid() == 0)) { + if (name != NULL) { service_name = strdup(name); } +#endif // DEBUG // get process name proc_name = getprogname(); @@ -413,31 +150,21 @@ dns_configuration_copy() dataRef = xpc_dictionary_get_data(reply, DNSINFO_CONFIGURATION, &dataLen); if ((dataRef != NULL) && ((dataLen >= sizeof(_dns_config_buf_t)) && (dataLen <= DNS_CONFIG_BUF_MAX))) { - _dns_config_buf_t *config = (_dns_config_buf_t *)(void *)dataRef; - uint32_t n_padding = ntohl(config->n_padding); - - if (n_padding <= (DNS_CONFIG_BUF_MAX - dataLen)) { - size_t len; - - len = dataLen + n_padding; - buf = malloc(len); - bcopy((void *)dataRef, buf, dataLen); - bzero(&buf[dataLen], n_padding); - } + dns_config_buf = _dns_configuration_buffer_create(dataRef, dataLen); } xpc_release(reply); } - if (buf != NULL) { - /* ALIGN: cast okay since _dns_config_buf_t is int aligned */ - config = expand_config((_dns_config_buf_t *)(void *)buf); - if (config == NULL) { - free(buf); + if (dns_config_buf != NULL) { + dns_config = _dns_configuration_buffer_expand(dns_config_buf); + if (dns_config == NULL) { + // if we were unable to expand the configuration + _dns_configuration_buffer_free(&dns_config_buf); } } - return config; + return dns_config; } @@ -464,6 +191,7 @@ dns_configuration_free(dns_config_t *config) void _dns_configuration_ack(dns_config_t *config, const char *bundle_id) { +#pragma unused(bundle_id) xpc_object_t reqdict; if (config == NULL) { diff --git a/src/configd/dnsinfo/dnsinfo_create.c b/src/configd/dnsinfo/dnsinfo_create.c index 5fe83ca01..06dc18221 100644 --- a/src/configd/dnsinfo/dnsinfo_create.c +++ b/src/configd/dnsinfo/dnsinfo_create.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2006, 2009, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2009, 2011-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,23 +17,23 @@ * 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@ */ #include #include #include -#include #include #include #include #include #include +#include "SCNetworkReachabilityInternal.h" #include "dnsinfo_create.h" #include "dnsinfo_private.h" -#include "network_information_priv.h" +#include "network_state_information_priv.h" #include "ip_plugin.h" @@ -63,6 +63,7 @@ _dns_configuration_create() _dns_config_buf_t *config; config = calloc(1, INITIAL_CONFIGURATION_BUF_SIZE); + config->config.version = DNSINFO_VERSION; config->config.generation = mach_absolute_time(); // config->n_attribute = 0; // config->n_padding = 0; @@ -79,7 +80,6 @@ config_add_attribute(dns_create_config_t *_config, { _dns_config_buf_t *config = (_dns_config_buf_t *)*_config; dns_attribute_t *header; - int i; uint32_t newLen; uint32_t newSize; uint32_t oldLen; @@ -90,7 +90,7 @@ config_add_attribute(dns_create_config_t *_config, oldLen = ntohl(config->n_attribute); rounded_length = ROUNDUP(attribute_length, sizeof(uint32_t)); newLen = sizeof(dns_attribute_t) + rounded_length; - newSize = sizeof(_dns_config_buf_t) + oldLen + newLen; + newSize = sizeof(_dns_config_buf_t) + oldLen + newLen; if (newSize > INITIAL_CONFIGURATION_BUF_SIZE) { config = realloc(config, newSize); } @@ -108,8 +108,8 @@ config_add_attribute(dns_create_config_t *_config, // add attribute [data] - bcopy(attribute, &header->attribute[0], attribute_length); - for (i = attribute_length; i < rounded_length; i++) { + memcpy(&header->attribute[0], attribute, attribute_length); + for (uint32_t i = attribute_length; i < rounded_length; i++) { header->attribute[i] = 0; } @@ -185,28 +185,28 @@ _dns_configuration_signature(dns_create_config_t *_config, unsigned char *signature, size_t signature_len) { - bzero(signature, signature_len); + memset(signature, 0, signature_len); if (_config != NULL) { _dns_config_buf_t *config = (_dns_config_buf_t *)*_config; if (config != NULL) { - CC_SHA1_CTX ctx; + CC_SHA256_CTX ctx; uint64_t generation_save; - unsigned char *sha1; - unsigned char sha1_buf[CC_SHA1_DIGEST_LENGTH]; + unsigned char *sha256; + unsigned char sha256_buf[CC_SHA256_DIGEST_LENGTH]; generation_save = config->config.generation; config->config.generation = 0; - sha1 = (signature_len >= CC_SHA1_DIGEST_LENGTH) ? signature : sha1_buf; - CC_SHA1_Init(&ctx); - CC_SHA1_Update(&ctx, + sha256 = (signature_len >= CC_SHA256_DIGEST_LENGTH) ? signature : sha256_buf; + CC_SHA256_Init(&ctx); + CC_SHA256_Update(&ctx, config, sizeof(_dns_config_buf_t) + ntohl(config->n_attribute)); - CC_SHA1_Final(sha1, &ctx); - if (sha1 != signature) { - bcopy(sha1, signature, signature_len); + CC_SHA256_Final(sha256, &ctx); + if (sha256 != signature) { + memcpy(signature, sha256, signature_len); } config->config.generation = generation_save; @@ -252,7 +252,6 @@ _dns_resolver_add_attribute(dns_create_resolver_t *_resolver, void *attribute) { dns_attribute_t *header; - int i; uint32_t newLen; uint32_t newSize; uint32_t oldLen; @@ -279,8 +278,8 @@ _dns_resolver_add_attribute(dns_create_resolver_t *_resolver, // add attribute [data] - bcopy(attribute, &header->attribute[0], attribute_length); - for (i = attribute_length; i < rounded_length; i++) { + memcpy(&header->attribute[0], attribute, attribute_length); + for (uint32_t i = attribute_length; i < rounded_length; i++) { header->attribute[i] = 0; } @@ -350,6 +349,15 @@ _dns_resolver_add_sortaddr(dns_create_resolver_t *_resolver, dns_sortaddr_t *sor } +__private_extern__ +void +_dns_resolver_set_configuration_identifier(dns_create_resolver_t *_resolver, const char *cid) +{ + _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_CONFIGURATION_ID, (uint32_t)strlen(cid) + 1, (void *)cid); + return; +} + + __private_extern__ void _dns_resolver_set_domain(dns_create_resolver_t *_resolver, const char *domain) @@ -372,11 +380,16 @@ _dns_resolver_set_flags(dns_create_resolver_t *_resolver, uint32_t flags) __private_extern__ void -_dns_resolver_set_if_index(dns_create_resolver_t *_resolver, uint32_t if_index) +_dns_resolver_set_if_index(dns_create_resolver_t *_resolver, + uint32_t if_index, + const char *if_name) { _dns_resolver_buf_t *resolver = (_dns_resolver_buf_t *)*_resolver; resolver->resolver.if_index = htonl(if_index); + if (if_name != NULL) { + _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_INTERFACE_NAME, (uint32_t)strlen(if_name), (void *)if_name); + } return; } @@ -412,23 +425,6 @@ _dns_resolver_set_port(dns_create_resolver_t *_resolver, uint16_t port) } -/* - * rankReachability() - * Not reachable == 0 - * Connection Required == 1 - * Reachable == 2 - */ -static int -rankReachability(SCNetworkReachabilityFlags flags) -{ - int rank = 0; - - if (flags & kSCNetworkReachabilityFlagsReachable) rank = 2; - if (flags & kSCNetworkReachabilityFlagsConnectionRequired) rank = 1; - return rank; -} - - static void _dns_resolver_set_reach_flags(dns_create_resolver_t _resolver) { @@ -510,9 +506,13 @@ _dns_resolver_set_reach_flags(dns_create_resolver_t _resolver) } if ((n_nameserver++ == 0) || - (rankReachability(ns_flags) < rankReachability(flags))) { - /* return the first (and later, worst case) result */ + (__SCNetworkReachabilityRank(ns_flags) > __SCNetworkReachabilityRank(flags))) { + /* return the first (and later, best case) result */ flags = ns_flags; + if (__SCNetworkReachabilityRank(flags) == ReachabilityRankReachable) { + // Can't get any better than REACHABLE + break; + } } } diff --git a/src/configd/dnsinfo/dnsinfo_create.h b/src/configd/dnsinfo/dnsinfo_create.h index decc575d1..8dd83a640 100644 --- a/src/configd/dnsinfo/dnsinfo_create.h +++ b/src/configd/dnsinfo/dnsinfo_create.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2006, 2008, 2009, 2011-2013 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@ - * + * * 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 @@ */ #include -#include +#include #include #include #include @@ -41,11 +41,13 @@ typedef const struct __dns_create_config * dns_create_config_t; typedef const struct __dns_create_resolver * dns_create_resolver_t; -#if !TARGET_OS_IPHONE #ifndef _PATH_RESOLVER_DIR +#if TARGET_OS_OSX #define _PATH_RESOLVER_DIR "/etc/resolver" +#else +#define _PATH_RESOLVER_DIR "/Library/Preferences/SystemConfiguration/resolver" +#endif #endif -#endif /* !TARGET_OS_IPHONE */ __BEGIN_DECLS @@ -53,83 +55,88 @@ __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_SHA256_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) 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) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); + uint32_t if_index, + 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); +_dns_resolver_set_service_identifier + (dns_create_resolver_t *_resolver, + 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)) SPI_AVAILABLE(ios(10.15), tvos(13.0), watchos(6.0), bridgeos(6.0)); void -_dnsinfo_flatfile_set_flags (uint32_t flags) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_NA); -#endif // !TARGET_OS_IPHONE +_dnsinfo_flatfile_set_flags (uint32_t flags) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(10.15), tvos(13.0), watchos(6.0), bridgeos(6.0)); __END_DECLS diff --git a/src/configd/dnsinfo/dnsinfo_flatfile.c b/src/configd/dnsinfo/dnsinfo_flatfile.c index a52be6b95..2820371dd 100644 --- a/src/configd/dnsinfo/dnsinfo_flatfile.c +++ b/src/configd/dnsinfo/dnsinfo_flatfile.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2009, 2011, 2012, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2009, 2011, 2012, 2014, 2015, 2017-2019 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,6 +35,10 @@ #include #include +#ifdef MAIN +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) +#endif // MAIN + #include "dnsinfo.h" #include "dnsinfo_private.h" #include "dnsinfo_create.h" @@ -293,7 +297,6 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) if (f == NULL) return NULL; while ((buf = fgetln(f, &len)) != NULL) { - int i; char *lineptr; int max_count; int token; @@ -305,8 +308,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) line = reallocf(line, len+1); if (line == NULL) continue; - strncpy(line, buf, len); - line[len] = '\0'; + strlcpy(line, buf, len+1); // parse the first word of the line (the config token) lineptr = line; @@ -322,7 +324,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) // translate config token to enumerated value token = -1; - for (i = 0; i < sizeof(tokens) / sizeof(tokens[0]); i++) { + for (size_t i = 0; i < sizeof(tokens) / sizeof(tokens[0]); i++) { if (strcasecmp(word, tokens[i].name) == 0) { token = tokens[i].token; max_count = tokens[i].max_count; @@ -390,7 +392,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) if_index = if_nametoindex(word); if (if_index > 0) { - _dns_resolver_set_if_index(&res, if_index); + _dns_resolver_set_if_index(&res, if_index, word); } break; } @@ -464,7 +466,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) long number = -1; number = strtol(word, NULL, 0); - if (number < 0 || number > UINT32_MAX) break; + if (number < 0 || number > (long)UINT32_MAX) break; _dns_resolver_set_order(&res, (uint32_t)number); break; } @@ -488,13 +490,12 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) long number = -1; number = strtol(word, NULL, 0); - if (number < 0 || number > UINT32_MAX) break; + if (number < 0 || number > (long)UINT32_MAX) break; _dns_resolver_set_timeout(&res, (uint32_t)number); break; } } } - if (line != NULL) free(line); // set the domain to the basename of the path if not specified if ((res != NULL) && (token_count[TOKEN_DOMAIN] == 0)) { @@ -520,6 +521,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) done : + if (line != NULL) free(line); fclose(f); return res; } @@ -563,31 +565,44 @@ _dnsinfo_flatfile_add_resolvers(dns_create_config_t *config) #ifdef MAIN #undef MAIN +#include "dnsinfo_logging.h" #include "dnsinfo_copy.c" int main(int argc, char **argv) { - uint8_t *buf; - dns_config_t *config; - dns_create_config_t create_config; - _dns_config_buf_t *config_buf; - uint32_t n_config; - uint32_t n_padding; - dns_create_resolver_t resolver; - - resolver = _dnsinfo_flatfile_create_resolver(NULL, _PATH_RESCONF); - - create_config = _dns_configuration_create(); - _dnsinfo_flatfile_add_resolvers(&create_config); - - config_buf = (_dns_config_buf_t *)create_config; - n_config = sizeof(_dns_config_buf_t) + ntohl(config_buf->n_attribute); - n_padding = ntohl(config_buf->n_padding); - buf = malloc(n_config + n_padding); - bcopy((void *)config_buf, buf, n_config); - bzero(&buf[n_config], n_padding); - config = expand_config((_dns_config_buf_t *)buf); + dns_config_t *dns_config = NULL; + _dns_config_buf_t *dns_config_buf = NULL; + dns_create_config_t dns_create_config; + dns_create_resolver_t dns_create_resolver; + + dns_create_resolver = _dnsinfo_flatfile_create_resolver(NULL, _PATH_RESCONF); + _dns_resolver_free(&dns_create_resolver); + + dns_create_config = _dns_configuration_create(); + if (dns_create_config != NULL) { + size_t n; + + _dnsinfo_flatfile_add_resolvers(&dns_create_config); + + n = sizeof(_dns_config_buf_t); + n += ntohl(((_dns_config_buf_t *)dns_create_config)->n_attribute); + dns_config_buf = _dns_configuration_buffer_create((void *)dns_create_config, n); + _dns_configuration_free(&dns_create_config); + } + + if (dns_config_buf != NULL) { + dns_config = _dns_configuration_buffer_expand(dns_config_buf); + if (dns_config == NULL) { + // if we were unable to expand the configuration + _dns_configuration_buffer_free(&dns_config_buf); + } + } + + if (dns_config != NULL) { + _dns_configuration_log(dns_config, TRUE, NULL); + free(dns_config); + } return 0; } diff --git a/src/configd/dnsinfo/dnsinfo_internal.h b/src/configd/dnsinfo/dnsinfo_internal.h index a7dc643ca..52f2d5701 100644 --- a/src/configd/dnsinfo/dnsinfo_internal.h +++ b/src/configd/dnsinfo/dnsinfo_internal.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013 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,169 +17,436 @@ * 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 _S_DNSINFO_INTERNAL_H #define _S_DNSINFO_INTERNAL_H -#include +#include #include #include -#include -#include -#include "SCNetworkReachabilityInternal.h" +#include // for SC_log #include #include +#include "dnsinfo_private.h" + +#define DNS_CONFIG_BUF_MAX 1024*1024 __BEGIN_DECLS -static __inline__ void -_dns_resolver_print(dns_resolver_t *resolver, int index) -{ - int i; +#ifndef my_log +#define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) +#define MY_LOG_DEFINED_LOCALLY +#endif // !my_log - SCPrint(TRUE, stdout, CFSTR("\nresolver #%d\n"), index); +/* + * claim space for a list [of pointers] from the expanded DNS configuration padding + */ +static __inline__ boolean_t +__dns_configuration_expand_add_list(void **padding, uint32_t *n_padding, uint32_t count, uint32_t size, void **list) +{ + uint32_t need; - if (resolver->domain != NULL) { - SCPrint(TRUE, stdout, CFSTR(" domain : %s\n"), resolver->domain); + need = count * size; + if (need > *n_padding) { + return FALSE; } - for (i = 0; i < resolver->n_search; i++) { - SCPrint(TRUE, stdout, CFSTR(" search domain[%d] : %s\n"), i, resolver->search[i]); - } + *list = (need == 0) ? NULL : *padding; + *padding += need; + *n_padding -= need; + return TRUE; +} - for (i = 0; i < resolver->n_nameserver; i++) { - char buf[128]; - _SC_sockaddr_to_string(resolver->nameserver[i], buf, sizeof(buf)); - SCPrint(TRUE, stdout, CFSTR(" nameserver[%d] : %s\n"), i, buf); +/* + * expand a DNS "resolver" from the provided buffer + */ +static __inline__ dns_resolver_t * +_dns_configuration_expand_resolver(_dns_resolver_buf_t *buf, uint32_t n_buf, void **padding, uint32_t *n_padding) +{ + dns_attribute_t *attribute; + uint32_t n_attribute; + int32_t n_nameserver = 0; + int32_t n_search = 0; + int32_t n_sortaddr = 0; + void *ptr; + dns_resolver_t *resolver = (dns_resolver_t *)&buf->resolver; + + if (n_buf < sizeof(_dns_resolver_buf_t)) { + goto error; } - for (i = 0; i < resolver->n_sortaddr; i++) { - char abuf[32]; - char mbuf[32]; + // initialize domain - (void)inet_ntop(AF_INET, &resolver->sortaddr[i]->address, abuf, sizeof(abuf)); - (void)inet_ntop(AF_INET, &resolver->sortaddr[i]->mask, mbuf, sizeof(mbuf)); - SCPrint(TRUE, stdout, CFSTR(" sortaddr[%d] : %s/%s\n"), i, abuf, mbuf); + resolver->domain = NULL; + + // initialize nameserver list + + resolver->n_nameserver = ntohl(resolver->n_nameserver); + if (!__dns_configuration_expand_add_list(padding, + n_padding, + resolver->n_nameserver, + sizeof(DNS_PTR(struct sockaddr *, x)), + &ptr)) { + goto error; } + resolver->nameserver = ptr; + + // initialize port + + resolver->port = ntohs(resolver->port); - if (resolver->options != NULL) { - SCPrint(TRUE, stdout, CFSTR(" options : %s\n"), resolver->options); + // initialize search list + + resolver->n_search = ntohl(resolver->n_search); + if (!__dns_configuration_expand_add_list(padding, + n_padding, + resolver->n_search, + sizeof(DNS_PTR(char *, x)), + &ptr)) { + goto error; } + resolver->search = ptr; + + // initialize sortaddr list - if (resolver->port != 0) { - SCPrint(TRUE, stdout, CFSTR(" port : %hd\n"), resolver->port); + resolver->n_sortaddr = ntohl(resolver->n_sortaddr); + if (!__dns_configuration_expand_add_list(padding, + n_padding, + resolver->n_sortaddr, + sizeof(DNS_PTR(dns_sortaddr_t *, x)), + &ptr)) { + goto error; } + resolver->sortaddr = ptr; + + // initialize options + + resolver->options = NULL; + + // initialize timeout + + resolver->timeout = ntohl(resolver->timeout); + + // initialize search_order + + resolver->search_order = ntohl(resolver->search_order); + + // initialize if_index + + resolver->if_index = ntohl(resolver->if_index); + + // initialize service_identifier + + resolver->service_identifier = ntohl(resolver->service_identifier); + + // initialize flags + + resolver->flags = ntohl(resolver->flags); + + // initialize SCNetworkReachability flags + + resolver->reach_flags = ntohl(resolver->reach_flags); + + // process resolver buffer "attribute" data - if (resolver->timeout != 0) { - SCPrint(TRUE, stdout, CFSTR(" timeout : %d\n"), resolver->timeout); + n_attribute = n_buf - sizeof(_dns_resolver_buf_t); + /* ALIGN: alignment not assumed, using accessors */ + attribute = (dns_attribute_t *)(void *)&buf->attribute[0]; + if (n_attribute != ntohl(buf->n_attribute)) { + goto error; } - if (resolver->if_index != 0) { - char buf[IFNAMSIZ]; - char *if_name; + while (n_attribute >= sizeof(dns_attribute_t)) { + uint32_t attribute_length = ntohl(attribute->length); + + switch (ntohl(attribute->type)) { + case RESOLVER_ATTRIBUTE_DOMAIN : + resolver->domain = (char *)&attribute->attribute[0]; + break; + + case RESOLVER_ATTRIBUTE_ADDRESS : + if (resolver->nameserver == NULL) { + goto error; + } + resolver->nameserver[n_nameserver++] = (struct sockaddr *)&attribute->attribute[0]; + break; + + case RESOLVER_ATTRIBUTE_SEARCH : + if (resolver->search == NULL) { + goto error; + } + resolver->search[n_search++] = (char *)&attribute->attribute[0]; + break; + + case RESOLVER_ATTRIBUTE_SORTADDR : + if (resolver->sortaddr == NULL) { + goto error; + } + resolver->sortaddr[n_sortaddr++] = (dns_sortaddr_t *)(void *)&attribute->attribute[0]; + break; + + case RESOLVER_ATTRIBUTE_OPTIONS : + resolver->options = (char *)&attribute->attribute[0]; + break; + + case RESOLVER_ATTRIBUTE_CONFIGURATION_ID : + resolver->cid = (char *)&attribute->attribute[0]; + break; + + case RESOLVER_ATTRIBUTE_INTERFACE_NAME : + resolver->if_name = (char *)&attribute->attribute[0]; + break; + + default : + break; + } - if_name = if_indextoname(resolver->if_index, buf); - SCPrint(TRUE, stdout, CFSTR(" if_index : %d (%s)\n"), - resolver->if_index, - (if_name != NULL) ? if_name : "?"); + attribute = (dns_attribute_t *)((void *)attribute + attribute_length); + n_attribute -= attribute_length; } - if (resolver->service_identifier != 0) { - SCPrint(TRUE, stdout, CFSTR(" service_identifier : %d\n"), - resolver->service_identifier); + if ((n_nameserver != resolver->n_nameserver) || + (n_search != resolver->n_search ) || + (n_sortaddr != resolver->n_sortaddr )) { + goto error; } - if (resolver->flags != 0) { - uint32_t flags = resolver->flags; + return resolver; - SCPrint(TRUE, stdout, CFSTR(" flags : ")); - SCPrint(_sc_debug, stdout, CFSTR("0x%08x ("), flags); - if (flags & DNS_RESOLVER_FLAGS_SCOPED) { - SCPrint(TRUE, stdout, CFSTR("Scoped")); - flags &= ~DNS_RESOLVER_FLAGS_SCOPED; - SCPrint(flags != 0, stdout, CFSTR(", ")); - } - if (flags & DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC) { - SCPrint(TRUE, stdout, CFSTR("Service-specific")); - flags &= ~DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC; - SCPrint(flags != 0, stdout, CFSTR(", ")); - } - if (flags & DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS) { - SCPrint(TRUE, stdout, CFSTR("Request A records")); - flags &= ~DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS; - SCPrint(flags != 0, stdout, CFSTR(", ")); - } - if (flags & DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) { - SCPrint(TRUE, stdout, CFSTR("Request AAAA records")); - flags &= ~DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS; - SCPrint(flags != 0, stdout, CFSTR(", ")); - } - if (flags != 0) { - SCPrint(TRUE, stdout, CFSTR("0x%08x"), flags); - } - SCPrint(_sc_debug, stdout, CFSTR(")")); - SCPrint(TRUE, stdout, CFSTR("\n")); - } + error : - if (resolver->reach_flags != 0) { - uint32_t flags = resolver->reach_flags; + return NULL; +} - SCPrint(TRUE, stdout, CFSTR(" reach : ")); - SCPrint(_sc_debug, stdout, CFSTR("0x%08x ("), flags); - __SCNetworkReachabilityPrintFlags(flags); - SCPrint(_sc_debug, stdout, CFSTR(")")); - SCPrint(TRUE, stdout, CFSTR("\n")); - } - if (resolver->search_order != 0) { - SCPrint(TRUE, stdout, CFSTR(" order : %d\n"), resolver->search_order); +/* + * initialize a DNS "configuration" buffer + */ +static __inline__ _dns_config_buf_t * +_dns_configuration_buffer_create(const void *dataRef, size_t dataLen) +{ + uint8_t *buf = NULL; + size_t bufLen; + _dns_config_buf_t *config = (_dns_config_buf_t *)dataRef; + size_t configLen; + uint32_t n_attribute = ntohl(config->n_attribute); + uint32_t n_padding = ntohl(config->n_padding); + + /* + * Check that the size of the configuration header plus the size of the + * attribute data matches the size of the configuration buffer. + * + * If the sizes are different, something that should NEVER happen, CRASH! + */ + configLen = sizeof(_dns_config_buf_t) + n_attribute; +#ifdef DEBUG + assert(configLen == dataLen); +#else // DEBUG + if (configLen != dataLen) { + my_log(LOG_ERR, "DNS configuration: size error (%zu != %zu)", configLen, dataLen); + return NULL; + } +#endif // DEBUG + + /* + * Check that the size of the requested padding would not result in our + * allocating a configuration + padding buffer larger than our maximum size. + * + * If the requested padding size is too large, something that should NEVER + * happen, CRASH! + */ +#ifdef DEBUG + assert(n_padding <= (DNS_CONFIG_BUF_MAX - dataLen)); +#else // DEBUG + if (n_padding > (DNS_CONFIG_BUF_MAX - dataLen)) { + my_log(LOG_ERR, "DNS configuration: padding error (%u > %zu)", + n_padding, + (DNS_CONFIG_BUF_MAX - dataLen)); + return NULL; } +#endif // DEBUG + + /* + * Check that the actual size of the configuration data and any requested + * padding will be less than the maximum possible size of the in-memory + * configuration buffer. + * + * If the length needed is too large, something that should NEVER happen, CRASH! + */ + bufLen = dataLen + n_padding; +#ifdef DEBUG + assert(bufLen <= DNS_CONFIG_BUF_MAX); +#else // DEBUG + if (bufLen > DNS_CONFIG_BUF_MAX) { + my_log(LOG_ERR, "DNS configuration: length error (%zu > %u)", + bufLen, + DNS_CONFIG_BUF_MAX); + return NULL; + } +#endif // DEBUG - return; + // allocate a buffer large enough to hold both the configuration + // data and the padding. + buf = malloc(bufLen); + memcpy(buf, (void *)dataRef, dataLen); + memset(&buf[dataLen], 0, n_padding); + + return (_dns_config_buf_t *)(void *)buf; } +/* + * expand a DNS "configuration" from the provided buffer + */ static __inline__ void -_dns_configuration_print(dns_config_t *dns_config) +_dns_configuration_buffer_free(_dns_config_buf_t **buf) { - int i; + _dns_config_buf_t *config = (_dns_config_buf_t *)*buf; - SCPrint(TRUE, stdout, CFSTR("DNS configuration\n")); + free(config); + *buf = NULL; + return; +} - for (i = 0; i < dns_config->n_resolver; i++) { - dns_resolver_t *resolver = dns_config->resolver[i]; - _dns_resolver_print(resolver, i + 1); +/* + * expand a DNS "configuration" from the provided buffer + */ +static __inline__ dns_config_t * +_dns_configuration_buffer_expand(_dns_config_buf_t *buf) +{ + dns_attribute_t *attribute; + dns_config_t *config = (dns_config_t *)buf; + uint32_t n_attribute; + uint32_t n_padding; + int32_t n_resolver = 0; + int32_t n_scoped_resolver = 0; + int32_t n_service_specific_resolver = 0; + void *padding; + void *ptr; + + n_attribute = ntohl(buf->n_attribute); // pre-validated (or known OK) at entry + n_padding = ntohl(buf->n_padding); // pre-validated (or known OK) at entry + + // establish the start of padding to be after the last attribute + + padding = &buf->attribute[n_attribute]; + + // initialize resolver lists + + config->n_resolver = ntohl(config->n_resolver); + if (!__dns_configuration_expand_add_list(&padding, + &n_padding, + config->n_resolver, + sizeof(DNS_PTR(dns_resolver_t *, x)), + &ptr)) { + goto error; + } + config->resolver = ptr; + + config->n_scoped_resolver = ntohl(config->n_scoped_resolver); + if (!__dns_configuration_expand_add_list(&padding, + &n_padding, + config->n_scoped_resolver, + sizeof(DNS_PTR(dns_resolver_t *, x)), + &ptr)) { + goto error; } + config->scoped_resolver = ptr; + + config->n_service_specific_resolver = ntohl(config->n_service_specific_resolver); + if (!__dns_configuration_expand_add_list(&padding, + &n_padding, + config->n_service_specific_resolver, + sizeof(DNS_PTR(dns_resolver_t *, x)), + &ptr)) { + goto error; + } + config->service_specific_resolver = ptr; + + // process configuration buffer "attribute" data + + attribute = (dns_attribute_t *)(void *)&buf->attribute[0]; + + while (n_attribute >= sizeof(dns_attribute_t)) { + uint32_t attribute_length = ntohl(attribute->length); + uint32_t attribute_type = ntohl(attribute->type); + + switch (attribute_type) { + case CONFIG_ATTRIBUTE_RESOLVER : + case CONFIG_ATTRIBUTE_SCOPED_RESOLVER : + case CONFIG_ATTRIBUTE_SERVICE_SPECIFIC_RESOLVER : { + dns_resolver_t *resolver; + + // expand resolver buffer + + resolver = _dns_configuration_expand_resolver((_dns_resolver_buf_t *)(void *)&attribute->attribute[0], + attribute_length - sizeof(dns_attribute_t), + &padding, + &n_padding); + if (resolver == NULL) { + goto error; + } + + // add resolver to config list + + if (attribute_type == CONFIG_ATTRIBUTE_RESOLVER) { + if (config->resolver == NULL) { + goto error; + } + config->resolver[n_resolver++] = resolver; + } else if (attribute_type == CONFIG_ATTRIBUTE_SCOPED_RESOLVER) { + if (config->scoped_resolver == NULL) { + goto error; + } + config->scoped_resolver[n_scoped_resolver++] = resolver; + } else if (attribute_type == CONFIG_ATTRIBUTE_SERVICE_SPECIFIC_RESOLVER) { + if (config->service_specific_resolver == NULL) { + goto error; + } + config->service_specific_resolver[n_service_specific_resolver++] = resolver; + } + + break; + } + + default : + break; + } - if ((dns_config->n_scoped_resolver > 0) && (dns_config->scoped_resolver != NULL)) { - SCPrint(TRUE, stdout, CFSTR("\nDNS configuration (for scoped queries)\n")); + attribute = (dns_attribute_t *)((void *)attribute + attribute_length); + n_attribute -= attribute_length; + } - for (i = 0; i < dns_config->n_scoped_resolver; i++) { - dns_resolver_t *resolver = dns_config->scoped_resolver[i]; + if (n_resolver != config->n_resolver) { + goto error; + } - _dns_resolver_print(resolver, i + 1); - } + if (n_scoped_resolver != config->n_scoped_resolver) { + goto error; } - if ((dns_config->n_service_specific_resolver > 0) && (dns_config->service_specific_resolver != NULL)) { - SCPrint(TRUE, stdout, CFSTR("\nDNS configuration (for service-specific queries)\n")); + if (n_service_specific_resolver != config->n_service_specific_resolver) { + goto error; + } - for (i = 0; i < dns_config->n_service_specific_resolver; i++) { - dns_resolver_t *resolver = dns_config->service_specific_resolver[i]; + return config; - _dns_resolver_print(resolver, i + 1); - } - } + error : - return; + return NULL; } +#ifdef MY_LOG_DEFINED_LOCALLY +#undef my_log +#undef MY_LOG_DEFINED_LOCALLY +#endif // MY_LOG_DEFINED_LOCALLY + __END_DECLS #endif /* !_S_DNSINFO_INTERNAL_H */ diff --git a/src/configd/dnsinfo/dnsinfo_logging.h b/src/configd/dnsinfo/dnsinfo_logging.h new file mode 100644 index 000000000..e103cde81 --- /dev/null +++ b/src/configd/dnsinfo/dnsinfo_logging.h @@ -0,0 +1,245 @@ +/* + * Copyright (c) 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, + * 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 _S_DNSINFO_LOGGING_H +#define _S_DNSINFO_LOGGING_H + +#include +#include +#include +#include +#include +#include +#include "SCNetworkReachabilityLogging.h" +#include +#include +#include +#include +#include + +#include +#include "dnsinfo_private.h" + +__BEGIN_DECLS + +#ifndef my_log +#define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) +#define MY_LOG_DEFINED_LOCALLY +#endif // !my_log + +#ifndef my_log_context_type +#define MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY +#define my_log_context_type void * +#endif // !my_log_context_type + +#ifndef my_log_context_name +#define MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY +#define my_log_context_name context +#endif // !my_log_context_name + +static __inline__ void +_dns_resolver_log(uint32_t version, dns_resolver_t *resolver, int index, Boolean debug, my_log_context_type my_log_context_name) +{ +#if defined(MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY) && defined(MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY) +#pragma unused(my_log_context_name) +#endif + int i; + uint32_t flags; + char reach_str[100]; + CFMutableStringRef str; + + my_log(LOG_INFO, "%s", ""); + my_log(LOG_INFO, "resolver #%d", index); + + if (resolver->domain != NULL) { + my_log(LOG_INFO, " domain : %s", resolver->domain); + } + + for (i = 0; i < resolver->n_search; i++) { + my_log(LOG_INFO, " search domain[%d] : %s", i, resolver->search[i]); + } + + for (i = 0; i < resolver->n_nameserver; i++) { + char buf[128]; + + _SC_sockaddr_to_string(resolver->nameserver[i], buf, sizeof(buf)); + my_log(LOG_INFO, " nameserver[%d] : %s", i, buf); + } + + for (i = 0; i < resolver->n_sortaddr; i++) { + char abuf[32]; + char mbuf[32]; + + (void)inet_ntop(AF_INET, &resolver->sortaddr[i]->address, abuf, sizeof(abuf)); + (void)inet_ntop(AF_INET, &resolver->sortaddr[i]->mask, mbuf, sizeof(mbuf)); + my_log(LOG_INFO, " sortaddr[%d] : %s/%s", i, abuf, mbuf); + } + + if (resolver->options != NULL) { + my_log(LOG_INFO, " options : %s", resolver->options); + } + + if (resolver->port != 0) { + my_log(LOG_INFO, " port : %hd", resolver->port); + } + + if (resolver->timeout != 0) { + my_log(LOG_INFO, " timeout : %d", resolver->timeout); + } + + if (resolver->if_index != 0) { +#ifndef _LIBLOG_SYSTEMCONFIGURATION_ + char buf[IFNAMSIZ]; +#endif // !_LIBLOG_SYSTEMCONFIGURATION_ + char *if_name = NULL; + + if ((version >= 20170629) && (resolver->if_name != NULL)) { + if_name = resolver->if_name; +#ifndef _LIBLOG_SYSTEMCONFIGURATION_ + } else { + if_name = if_indextoname(resolver->if_index, buf); +#endif // !_LIBLOG_SYSTEMCONFIGURATION_ + } + my_log(LOG_INFO, " if_index : %d (%s)", + resolver->if_index, + (if_name != NULL) ? if_name : "?"); + } + + if (resolver->service_identifier != 0) { + my_log(LOG_INFO, " service_identifier : %d", + resolver->service_identifier); + } + + flags = resolver->flags; + str = CFStringCreateMutable(NULL, 0); + CFStringAppend(str, CFSTR(" flags : ")); + if (debug) { + CFStringAppendFormat(str, NULL, CFSTR("0x%08x"), flags); + } + if (flags != 0) { + if (debug) { + CFStringAppendFormat(str, NULL, CFSTR(" (")); + } + if (flags & DNS_RESOLVER_FLAGS_SCOPED) { + flags &= ~DNS_RESOLVER_FLAGS_SCOPED; + CFStringAppendFormat(str, NULL, CFSTR("Scoped%s"), flags != 0 ? ", " : ""); + } + if (flags & DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC) { + flags &= ~DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC; + CFStringAppendFormat(str, NULL, CFSTR("Service-specific%s"), flags != 0 ? ", " : ""); + } + if (flags & DNS_RESOLVER_FLAGS_SUPPLEMENTAL) { + flags &= ~DNS_RESOLVER_FLAGS_SUPPLEMENTAL; + CFStringAppendFormat(str, NULL, CFSTR("Supplemental%s"), flags != 0 ? ", " : ""); + } + if (flags & DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS) { + flags &= ~DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS; + CFStringAppendFormat(str, NULL, CFSTR("Request A records%s"), flags != 0 ? ", " : ""); + } + if (flags & DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) { + flags &= ~DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS; + CFStringAppendFormat(str, NULL, CFSTR("Request AAAA records%s"), flags != 0 ? ", " : ""); + } + if (flags != 0) { + CFStringAppendFormat(str, NULL, CFSTR("0x%08x"), flags); + } + if (debug) { + CFStringAppend(str, CFSTR(")")); + } + } + my_log(LOG_INFO, "%@", str); + CFRelease(str); + + __SCNetworkReachability_flags_string(resolver->reach_flags, TRUE, reach_str, sizeof(reach_str)); + my_log(LOG_INFO, " reach : %s", reach_str); + + if (resolver->search_order != 0) { + my_log(LOG_INFO, " order : %d", resolver->search_order); + } + + if (debug && (resolver->cid != NULL)) { + my_log(LOG_INFO, " config id: %s", resolver->cid); + } + + return; +} + +static __inline__ void +_dns_configuration_log(dns_config_t *dns_config, Boolean debug, my_log_context_type my_log_context_name) +{ +#if defined(MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY) && defined(MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY) +#pragma unused(my_log_context_name) +#endif + int i; + + my_log(LOG_INFO, "%s", "DNS configuration"); + + for (i = 0; i < dns_config->n_resolver; i++) { + dns_resolver_t *resolver = dns_config->resolver[i]; + + _dns_resolver_log(dns_config->version, resolver, i + 1, debug, my_log_context_name); + } + + if ((dns_config->n_scoped_resolver > 0) && (dns_config->scoped_resolver != NULL)) { + my_log(LOG_INFO, "%s", ""); + my_log(LOG_INFO, "%s", "DNS configuration (for scoped queries)"); + + for (i = 0; i < dns_config->n_scoped_resolver; i++) { + dns_resolver_t *resolver = dns_config->scoped_resolver[i]; + + _dns_resolver_log(dns_config->version, resolver, i + 1, debug, my_log_context_name); + } + } + + if ((dns_config->n_service_specific_resolver > 0) && (dns_config->service_specific_resolver != NULL)) { + my_log(LOG_INFO, "%s", ""); + my_log(LOG_INFO, "%s", "DNS configuration (for service-specific queries)"); + + for (i = 0; i < dns_config->n_service_specific_resolver; i++) { + dns_resolver_t *resolver = dns_config->service_specific_resolver[i]; + + _dns_resolver_log(dns_config->version, resolver, i + 1, debug, my_log_context_name); + } + } + + return; +} + +#ifdef MY_LOG_DEFINED_LOCALLY +#undef my_log +#undef MY_LOG_DEFINED_LOCALLY +#endif // MY_LOG_DEFINED_LOCALLY + +#ifdef MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY +#undef my_log_context_type +#undef MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY +#endif // MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY + +#ifdef MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY +#undef my_log_context_name +#undef MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY +#endif // MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY + +__END_DECLS + +#endif /* !_S_DNSINFO_LOGGING_H */ diff --git a/src/configd/dnsinfo/dnsinfo_private.h b/src/configd/dnsinfo/dnsinfo_private.h index d6e65b5fc..b1dfdab22 100644 --- a/src/configd/dnsinfo/dnsinfo_private.h +++ b/src/configd/dnsinfo/dnsinfo_private.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2006, 2008, 2009, 2012, 2013 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@ - * + * * 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 __DNSINFO_PRIVATE_H__ -#include +#include #include #include #include @@ -57,32 +57,32 @@ * | struct _dns_config_buf_t | * +-+-------------+---------------------------------------------------+ * | | config | struct dns_config_t | - * | | +-+-------------------+-----------------------------+ - * | | | | n_resolver | int32_t | <- # of name resolvers - * | | | +-------------------+-----------------------------+ - * | | | | resolver | dns_resolver_t ** | <- not used during creation, filled - * | | | | | | in with pointer to a list of - * | | | | | | resolver configurations that will - * | | | | | | be established in the "padding" - * | | | +-------------------+-----------------------------+ - * | | | | n_scoped_resolver | int32_t | <- # of name scoped resolvers - * | | | +-------------------+-----------------------------+ - * | | | | scoped_resolver | dns_resolver_t ** | <- not used during creation, filled - * | | | | | | in with pointer to a list of scoped - * | | | | | | resolver configurations that will - * | | | | | | be established in the "padding" - * | | | +-------------------+-----------------------------+ - * | | | | generation | uint64_t | <- generation # of configuration - * | | | +-------------------+---------+-------------------+ + * | | +-+-----------------------------+-------------------+ + * | | | | n_resolver | int32_t | <- # of name resolvers + * | | | +-----------------------------+-------------------+ + * | | | | resolver | dns_resolver_t ** | <- not used during creation, filled + * | | | | | | in with pointer to a list of + * | | | | | | resolver configurations that will + * | | | | | | be established in the "padding" + * | | | +-----------------------------+--------------------+ + * | | | | n_scoped_resolver | int32_t | <- # of name scoped resolvers + * | | | +-----------------------------+--------------------+ + * | | | | scoped_resolver | dns_resolver_t ** | <- not used during creation, filled + * | | | | | | in with pointer to a list of scoped + * | | | | | | resolver configurations that will + * | | | | | | be established in the "padding" + * | | | +-----------------------------+--------------------+ + * | | | | generation | uint64_t | <- generation # of configuration + * | | | +-----------------------------+-------------------+ * | | | | n_service_specific_resolver | int32_t | <- # of name service-specific resolvers * | | | +-------------------+---------+-------------------+ * | | | | service_specific_resolver | dns_resolver_t ** | <- not used during creation, filled * | | | | | | in with pointer to a list of service-specific * | | | | | | resolver configurations that will be * | | | | | | established in the "padding" - * | | | +-------------------+---------+-------------------+ - * | | | | ... | ... | - * | +-------------+-+-------------------+-----------------------------+ + * | | | +-----------------------------+-------------------+ + * | | | | version | uint32_t | <- configuration structure(s) version + * | +-------------+-+-----------------------------+-------------------+ * | | n_attribute | uint32_t | <- how many bytes of "attribute" * | | | | data is associated with the * | | | | configuration @@ -172,6 +172,8 @@ enum { RESOLVER_ATTRIBUTE_SEARCH, RESOLVER_ATTRIBUTE_SORTADDR, RESOLVER_ATTRIBUTE_OPTIONS, + RESOLVER_ATTRIBUTE_CONFIGURATION_ID, + RESOLVER_ATTRIBUTE_INTERFACE_NAME, }; diff --git a/src/configd/dnsinfo/dnsinfo_server.c b/src/configd/dnsinfo/dnsinfo_server.c index d006e7aac..419279c1c 100644 --- a/src/configd/dnsinfo/dnsinfo_server.c +++ b/src/configd/dnsinfo/dnsinfo_server.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2008, 2011-2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2008, 2011-2017 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,11 +35,10 @@ #include #include #include -#include #include #include #include - +#include #include #include @@ -50,6 +49,12 @@ #include "dnsinfo_server.h" #include "dnsinfo_private.h" +#ifdef SC_LOG_HANDLE +#include +os_log_t SC_LOG_HANDLE(void); +#endif //SC_LOG_HANDLE + + #pragma mark - #pragma mark Globals @@ -62,15 +67,6 @@ static libSC_info_server_t S_dns_info; -/* - * S_debug - * A boolean that enables additional logging. - */ -static Boolean S_debug_s; -static Boolean * S_debug = &S_debug_s; -static SCLoggerRef S_logger = NULL; - - /* * S_sync_handler * ACK (in-sync or not-in-sync) updates should be posted using @@ -85,21 +81,6 @@ static _dns_sync_handler_t S_sync_handler = NULL; #pragma mark Support functions -#ifdef NOT_YET_NEEDED -static void -log_xpc_object(const char *msg, xpc_object_t obj) -{ - char *desc; - - desc = xpc_copy_description(obj); - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("%s = %s"), msg, desc); - } - free(desc); -} -#endif - - #pragma mark - #pragma mark DNS configuration server @@ -131,15 +112,15 @@ _dnsinfo_copy(xpc_connection_t connection, xpc_object_t request) { CFDataRef data; uint64_t generation; + const char *proc_name; xpc_connection_t remote; xpc_object_t reply; remote = xpc_dictionary_get_remote_connection(request); reply = xpc_dictionary_create_reply(request); if (reply == NULL) { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p> _dnsinfo_copy: xpc_dictionary_create_reply: failed"), - connection); + SC_log(LOG_ERR, "<%p> _dnsinfo_copy: xpc_dictionary_create_reply: failed", + connection); return; } @@ -148,22 +129,18 @@ _dnsinfo_copy(xpc_connection_t connection, xpc_object_t request) connection, &generation); - if (*S_debug) { - const char *proc_name; - - // extract process name - proc_name = xpc_dictionary_get_string(request, DNSINFO_PROC_NAME); - if (proc_name == NULL) { - proc_name = "???"; - } - - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%s[%d]> DNS configuration copy: %llu"), - connection, - proc_name, - xpc_connection_get_pid(connection), - generation); + // extract process name + proc_name = xpc_dictionary_get_string(request, DNSINFO_PROC_NAME); + if (proc_name == NULL) { + proc_name = "???"; } + SC_log(LOG_DEBUG, "<%p:%s[%d]> DNS configuration copy: %llu", + connection, + proc_name, + xpc_connection_get_pid(connection), + generation); + // return the DNS configuration (if available) if (data != NULL) { xpc_dictionary_set_data(reply, @@ -196,20 +173,18 @@ _dnsinfo_acknowledge(xpc_connection_t connection, xpc_object_t request) generation = xpc_dictionary_get_uint64(request, DNSINFO_GENERATION); - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> DNS configuration ack: %llu"), - connection, - xpc_connection_get_pid(connection), - generation); - } + SC_log(LOG_DEBUG, "<%p:%d> DNS configuration ack: %llu", + connection, + xpc_connection_get_pid(connection), + generation); (void) _libSC_info_server_acknowledged(&S_dns_info, connection, generation); - // Note: all of the mDNSResponder ack's should result + // Note: all of the DNS service ack's should result // in a [new] network change being posted inSync = _libSC_info_server_in_sync(&S_dns_info); - if (S_sync_handler) { + if (S_sync_handler != NULL) { S_sync_handler(inSync); } return; @@ -238,10 +213,9 @@ process_request(xpc_connection_t connection, xpc_object_t request) break; default : - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p> unknown request : %lld"), - connection, - op); + SC_log(LOG_ERR, "<%p> unknown request : %lld", + connection, + op); break; } @@ -253,11 +227,9 @@ process_request(xpc_connection_t connection, xpc_object_t request) static void process_new_connection(xpc_connection_t c) { - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> DNS configuration session: open"), - c, - xpc_connection_get_pid(c)); - } + SC_log(LOG_DEBUG, "<%p:%d> DNS configuration session: open", + c, + xpc_connection_get_pid(c)); _libSC_info_server_open(&S_dns_info, c); @@ -278,11 +250,9 @@ process_new_connection(xpc_connection_t c) if (xobj == XPC_ERROR_CONNECTION_INVALID) { Boolean changed; - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> DNS configuration session: close"), - c, - xpc_connection_get_pid(c)); - } + SC_log(LOG_DEBUG, "<%p:%d> DNS configuration session: close", + c, + xpc_connection_get_pid(c)); changed = _libSC_info_server_close(&S_dns_info, c); if (changed) { @@ -290,31 +260,30 @@ process_new_connection(xpc_connection_t c) // report change inSync = _libSC_info_server_in_sync(&S_dns_info); - S_sync_handler(inSync); + if (S_sync_handler != NULL) { + S_sync_handler(inSync); + } } } else if (xobj == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> %s"), - c, - xpc_connection_get_pid(c), - desc); + SC_log(LOG_ERR, "<%p:%d> %s", + c, + xpc_connection_get_pid(c), + desc); } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> Connection error: %p : %s"), - c, - xpc_connection_get_pid(c), - xobj, - desc); + SC_log(LOG_ERR, "<%p:%d> Connection error: %p : %s", + c, + xpc_connection_get_pid(c), + xobj, + desc); } } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> unknown event type : %p"), - c, - xpc_connection_get_pid(c), - type); + SC_log(LOG_ERR, "<%p:%d> unknown event type : %p", + c, + xpc_connection_get_pid(c), + type); } }); @@ -324,6 +293,65 @@ process_new_connection(xpc_connection_t c) } +#pragma mark - +#pragma mark DNS configuration state + + +static void +add_state_handler() +{ +#if !TARGET_OS_SIMULATOR + os_state_block_t state_block; + os_state_handle_t state_handle; + + state_block = ^os_state_data_t(os_state_hints_t hints) { +#pragma unused(hints) + CFIndex dnsinfo_len; + os_state_data_t state_data; + size_t state_data_size; + + dnsinfo_len = (S_dns_info.data != NULL) ? CFDataGetLength(S_dns_info.data) : 0; + state_data_size = OS_STATE_DATA_SIZE_NEEDED(dnsinfo_len); + if (state_data_size > MAX_STATEDUMP_SIZE) { + SC_log(LOG_ERR, "DNS configuration: state data too large (%zd > %zd)", + state_data_size, + (size_t)MAX_STATEDUMP_SIZE); + return NULL; + } + + state_data = calloc(1, state_data_size); + if (state_data == NULL) { + SC_log(LOG_ERR, "DNS configuration: could not allocate state data"); + return NULL; + } + + state_data->osd_type = OS_STATE_DATA_CUSTOM; + state_data->osd_data_size = (uint32_t)dnsinfo_len; + strlcpy(state_data->osd_decoder.osdd_library, + "SystemConfiguration", + sizeof(state_data->osd_decoder.osdd_library)); + strlcpy(state_data->osd_decoder.osdd_type, + "dnsinfo", + sizeof(state_data->osd_decoder.osdd_type)); + strlcpy(state_data->osd_title, "DNS Configuration", sizeof(state_data->osd_title)); + if (dnsinfo_len > 0) { + memcpy(state_data->osd_data, CFDataGetBytePtr(S_dns_info.data), dnsinfo_len); + } + + return state_data; + }; + + state_handle = os_state_add_handler(_dnsinfo_server_queue(), state_block); + if (state_handle == 0) { + SC_log(LOG_ERR, "DNS configuration: os_state_add_handler() failed"); + } +#endif // !TARGET_OS_SIMULATOR + + + return; +} + + #pragma mark - #pragma mark DNS configuration server SPIs @@ -331,21 +359,22 @@ process_new_connection(xpc_connection_t c) __private_extern__ void load_DNSConfiguration(CFBundleRef bundle, - SCLoggerRef logger, - Boolean *bundleVerbose, _dns_sync_handler_t syncHandler) { +#pragma unused(bundle) xpc_connection_t c; const char *name; - S_debug = bundleVerbose; - S_logger = logger; - /* * keep track of DNS configuration acknowledgements */ _libSC_info_server_init(&S_dns_info); + /* + * add a state dump handler + */ + add_state_handler(); + /* * save the in-sync/not-in-sync handler */ @@ -373,28 +402,24 @@ load_DNSConfiguration(CFBundleRef bundle, desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); if (event == XPC_ERROR_CONNECTION_INVALID) { - SCLoggerLog(S_logger, LOG_ERR, CFSTR("DNS configuration server: %s"), desc); + SC_log(LOG_ERR, "DNS configuration server: %s", desc); xpc_release(c); } else if (event == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLoggerLog(S_logger, LOG_ERR, CFSTR("DNS configuration server: %s"), desc); + SC_log(LOG_ERR, "DNS configuration server: %s", desc); } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("DNS configuration server: Connection error: %p : %s"), - event, - desc); + SC_log(LOG_ERR, "DNS configuration server: Connection error: %p : %s", + event, + desc); } } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("DNS configuration server: unknown event type : %p"), - type); - + SC_log(LOG_ERR, "DNS configuration server: unknown event type : %p", type); } }); xpc_connection_resume(c); -SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("XPC server \"%s\" started"), name); +SC_log(LOG_DEBUG, "XPC server \"%s\" started", name); return; } @@ -416,10 +441,8 @@ _dns_configuration_store(dns_create_config_t *_config) new_generation = config->config.generation; - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("DNS configuration updated: %llu"), - new_generation); - } + SC_log(LOG_INFO, "DNS configuration updated: %llu", + new_generation); bytes = (const UInt8 *)config; len = sizeof(_dns_config_buf_t) + ntohl(config->n_attribute); @@ -437,7 +460,7 @@ _dns_configuration_store(dns_create_config_t *_config) // if anyone is keeping us in sync, they now need to catch up in_sync = _libSC_info_server_in_sync(&S_dns_info); - if (S_sync_handler) { + if (S_sync_handler != NULL) { S_sync_handler(in_sync); } @@ -448,7 +471,7 @@ _dns_configuration_store(dns_create_config_t *_config) status = notify_post(notify_key); if (status != NOTIFY_STATUS_OK) { - SCLoggerLog(S_logger, LOG_ERR, CFSTR("notify_post() failed: %d"), status); + SC_log(LOG_ERR, "notify_post() failed: %d", status); // notification posting failures are non-fatal } } @@ -472,12 +495,10 @@ main(int argc, char **argv) _sc_debug = TRUE; load_DNSConfiguration(CFBundleGetMainBundle(), // bundle - NULL, //SCLogger - &verbose, // bundleVerbose ^(Boolean inSync) { // sync handler - SCLoggerLog(NULL, LOG_INFO, - CFSTR("in sync: %s"), - inSync ? "Yes" : "No") + SC_log(LOG_INFO, + "in sync: %s", + inSync ? "Yes" : "No") }); CFRunLoopRun(); /* not reached */ diff --git a/src/configd/dnsinfo/dnsinfo_server.h b/src/configd/dnsinfo/dnsinfo_server.h index 53b7779d4..82a61464a 100644 --- a/src/configd/dnsinfo/dnsinfo_server.h +++ b/src/configd/dnsinfo/dnsinfo_server.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004, 2005, 2009, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2005, 2009, 2011, 2012, 2015, 2016 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@ */ @@ -38,8 +38,6 @@ __BEGIN_DECLS void load_DNSConfiguration (CFBundleRef bundle, - SCLoggerRef logger, - Boolean *bundleVerbose, _dns_sync_handler_t syncHandler); _Bool diff --git a/src/configd/get-mobility-info b/src/configd/get-mobility-info old mode 100755 new mode 100644 index 97d38551a..f6e5e87d3 --- a/src/configd/get-mobility-info +++ b/src/configd/get-mobility-info @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2004-2015 Apple Inc. +# Copyright (c) 2004-2017 Apple Inc. # # get-mobility-info # @@ -8,6 +8,30 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin +OUTDIR="" +NO_PCAP=0 +NO_TAR=0 + +while getopts f:PT OPTION ; do + case ${OPTION} in + f) + OUTDIR="${OPTARG}" + if [ ! -d "${OUTDIR}" ]; then + echo "# ${PROGNAME}: \"${OUTDIR}\" is not a directory" + exit 1 + fi + ;; + P) + NO_PCAP=1 + ;; + T) + NO_TAR=1 + ;; + \?) + ;; + esac +done + # # Disclaimer # @@ -44,13 +68,19 @@ else TAIL_25000="/bin/cat" fi -OUT="mobility-info-`date +'%m.%d.%Y.%H%M%S'`" -OUTDIR="/var/tmp" -if [ -d ~/Desktop ]; then - OUTDIR=~/Desktop -elif [ "`readlink /tmp`" = "private/var/tmp" ]; then - OUTDIR=/Library/Logs/CrashReporter - mkdir -p ${OUTDIR} +OUT="mobility-info-`date +'%Y.%m.%d.%H%M%S'`" + +if [ -z $OUTDIR ]; then + OUTDIR="/var/tmp" + if [ -d ~/Desktop ]; then + OUTDIR=~/Desktop + elif [ "`readlink /tmp`" = "private/var/tmp" ]; then + OUTDIR=/Library/Logs/DiagnosticReports + if [ ! -d /Library/Logs/DiagnosticReports -a -d /Library/Logs/CrashReporter ]; then + OUTDIR=/Library/Logs/CrashReporter + fi + mkdir -p ${OUTDIR} + fi fi umask 077 @@ -61,18 +91,20 @@ if [ $? -ne 0 ]; then exit 1 fi -GZ_EXT="" -GZ_OPT="" -if [ -x /usr/bin/gzip ]; then - GZ_EXT=".gz" - GZ_OPT="-z" -fi +if [ $NO_TAR -eq 0 ]; then + GZ_EXT="" + GZ_OPT="" + if [ -x /usr/bin/gzip ]; then + GZ_EXT=".gz" + GZ_OPT="-z" + fi -ARCHIVE=`mktemp -q "${OUTDIR}/${OUT}.tar${GZ_EXT}"` -if [ $? -ne 0 ]; then - echo "Could not create snapshot archive" - rm -rf "${WORKDIR}" - exit 1 + ARCHIVE=`mktemp -q "${OUTDIR}/${OUT}.tar${GZ_EXT}"` + if [ $? -ne 0 ]; then + echo "Could not create snapshot archive" + rm -rf "${WORKDIR}" + exit 1 + fi fi cd "${WORKDIR}" @@ -82,39 +114,35 @@ echo "Please wait, collecting information and statistics" echo "" # -# Execute network reachability/DNS commands early +# collect packet capture with kernel ring buffer if available # -echo "#" > reachability-info -echo '# scutil -d -v -r www.apple.com "" no-server' >> reachability-info -echo "#" >> reachability-info -scutil -d -v -r www.apple.com "" no-server >> reachability-info 2>&1 - -echo "#" >> reachability-info -echo '# scutil -d -v -r 0.0.0.0 no-server' >> reachability-info -echo "#" >> reachability-info -scutil -d -v -r 0.0.0.0 no-server >> reachability-info 2>&1 +stop_pcap () { + # + # Stop the packet capture + # + if [ ${PCAP_STARTED} -ne 0 ]; then + trap '' SIGINT + /usr/local/bin/netdiagnose stop packetcapture 2>&1 + PCAP_STARTED=0 + fi +} -if [ -x /usr/bin/dig -a -f /etc/resolv.conf ]; then - /usr/bin/dig -t any -c any www.apple.com > dig-results 2>/dev/null +PCAP_STARTED=0 +if [ -x /usr/local/bin/netdiagnose -a ${NO_PCAP} -ne 1 ]; then + trap stop_pcap SIGINT + /usr/local/bin/netdiagnose -p "${WORKDIR}" start packetcapture 2>&1 + PCAP_STARTED=1 fi # -# Signal "networkd" and "mDNSResponder" early to log their "state" info. This -# logging will continue while we execute a few other commands and should be -# complete by the time we collect the log content. +# get-network-info # -if [ -x /usr/bin/killall ]; then - # - # request networkd state - # - ${PRIV} /usr/bin/killall -INFO networkd 2>/dev/null - - # - # request mDNSResponder state - # - ${PRIV} /usr/bin/killall -INFO mDNSResponder 2>/dev/null - - sleep 1 +if [ -x /System/Library/Frameworks/SystemConfiguration.framework/Resources/get-network-info ]; then + /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 + /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 + /bin/sh /System/Library/PrivateFrameworks/SystemConfiguration.framework/get-network-info -s -c -P "${WORKDIR}" fi # @@ -124,37 +152,6 @@ if [ -x /bin/ps ]; then /bin/ps axlww > ps 2>&1 fi -# -# network interface configuration -# -if [ -x /sbin/ifconfig ]; then - /sbin/ifconfig -a -L -b -m -r -v -v > ifconfig 2>&1 - if [ $? -ne 0 ]; then - /sbin/ifconfig -a > ifconfig 2>&1 - fi -fi - -# -# network route configuration -# -if [ -x /usr/sbin/netstat ]; then - /usr/sbin/netstat -n -r -a -l > netstat 2>&1 -fi - -# -# DHCP configuration -# -if [ -x /sbin/ifconfig ]; then - for if in `/sbin/ifconfig -l` - do - case ${if} in - lo* ) ;; - en* ) ipconfig getpacket ${if} > ipconfig-${if} 2>&1 - ;; - esac - done -fi - # # AirPort info # @@ -205,13 +202,6 @@ if [ -x /usr/bin/pmset ]; then /usr/bin/pmset -g everything 2>/dev/null | ${TAIL_25000} >> pmset fi -# -# Host name -# -if [ -x /bin/hostname ]; then - /bin/hostname > hostname 2>&1 -fi - # # Host configuration # @@ -222,59 +212,15 @@ if [ -e /etc/hostconfig ]; then cat /etc/hostconfig > etc.hostconfig 2>&1 fi -# -# DNS configuration -# -scutil --dns > dns-configuration 2>&1 -if [ -e /etc/resolv.conf ]; then - cat /etc/resolv.conf > etc.resolv.conf 2>&1 -fi -if [ -e /var/run/resolv.conf ]; then - cat /var/run/resolv.conf > var.run.resolv.conf 2>&1 -fi -if [ -e /etc/resolver ]; then - tar -c -H /etc/resolver > etc.resolver.tar 2>/dev/null -fi - -# -# Proxy configuration -# -scutil -d -v --proxy > proxy-configuration 2>&1 - -# -# Network information -# -if [ -x /sbin/ifconfig ]; then - echo "#" > network-information - echo "# scutil --nwi" >> network-information - echo "#" >> network-information - scutil --nwi >> network-information 2>&1 - for if in `/sbin/ifconfig -l` - do - echo "" >> network-information - echo "#" >> network-information - echo "# scutil --nwi ${if}" >> network-information - echo "#" >> network-information - scutil --nwi ${if} >> network-information 2>&1 - done -fi - # # System / network preferences # for f in \ - /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist \ /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist \ /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist \ - /Library/Preferences/SystemConfiguration/com.apple.nat.plist \ - /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist \ /Library/Preferences/SystemConfiguration/com.apple.wifi.plist \ - /Library/Preferences/SystemConfiguration/preferences.plist \ /Library/Preferences/com.apple.alf.plist \ /Library/Preferences/com.apple.sharing.firewall.plist \ - /Library/Preferences/com.apple.networkextension.plist \ - /Library/Preferences/com.apple.networkextension.control.plist \ - /Library/Preferences/com.apple.networkextension.necp.plist \ /Library/Preferences/com.apple.wwand.plist \ do @@ -284,10 +230,17 @@ do fi done +# +# Install log +# +if [ -e /var/log/install.log ]; then + cat /var/log/install.log > install.log 2>&1 +fi + # # System / network preferences (from other volumes) # -/bin/ls /Volumes 2>/dev/null \ +mount -t hfs | grep "/Volumes/" | sed -e 's:^.* on /Volumes/::' -e 's: ([^(]*$::' \ | while read volume do V_PATH="/Volumes/${volume}" @@ -295,6 +248,7 @@ do # if the path is a symlink continue fi + for f in \ /Library/Preferences/SystemConfiguration/Networkinterfaces.plist \ /Library/Preferences/SystemConfiguration/preferences.plist \ @@ -319,26 +273,6 @@ elif [ -e /Library/Preferences/SystemConfiguration/bootpd.plist ]; then cat /Library/Preferences/SystemConfiguration/com.apple.named.proxy.conf > com.apple.named.proxy.conf 2>/dev/null fi -# -# configd's cache -# -${PRIV} scutil -p --snapshot -if [ -f /var/tmp/configd-store.plist ]; then - cat /var/tmp/configd-store.plist > configd-store.plist 2>&1 -fi -if [ -f /var/tmp/configd-pattern.plist ]; then - cat /var/tmp/configd-pattern.plist > configd-pattern.plist 2>&1 -fi -if [ -f /var/tmp/configd-session.plist ]; then - cat /var/tmp/configd-session.plist > configd-session.plist 2>&1 -fi -if [ -f /var/tmp/configd-state ]; then - cat /var/tmp/configd-state > configd-state 2>&1 -fi -if [ -f /var/tmp/configd-reachability ]; then - cat /var/tmp/configd-reachability > configd-reachability 2>&1 -fi - # # mounted filesystems # @@ -353,107 +287,6 @@ if [ -x /usr/sbin/kextstat ]; then /usr/sbin/kextstat > kextstat 2>&1 fi -# -# network statistics -# -/bin/echo -n "" > network-statistics - -if [ -x /usr/sbin/arp ]; then - echo "#" >> network-statistics - echo "# arp -n -a" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/arp -n -a >> network-statistics 2>&1 -fi - -if [ -x /usr/sbin/netstat ]; then - echo "#" >> network-statistics - echo "# netstat -A -a -l -n" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -A -a -l -n >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# netstat -s" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -s >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# netstat -mmm" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -mmm >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# netstat -i -n -d" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -i -n -d >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# netstat -g -n -s" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -g -n -s >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# netstat -i -x R" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -i -x R >> network-statistics 2>&1 - echo "#" >> network-statistics - - echo "# netstat -a -n -p mptcp" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -a -n -p mptcp >> network-statistics 2>/dev/null - - echo "#" >> network-statistics - echo "# netstat -s -p mptcp" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -s -p mptcp >> network-statistics 2>/dev/null - - if [ -x /sbin/ifconfig ]; then - for if in `/sbin/ifconfig -l` - do - `/sbin/ifconfig -v ${if} | grep -q TXSTART` - if [ $? -eq 0 ]; then - echo "#" >> network-statistics - echo "# netstat -qq -I ${if}" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -qq -I ${if} >> network-statistics 2>&1 - fi - `/sbin/ifconfig -v ${if} | grep -q RXPOLL` - if [ $? -eq 0 ]; then - echo "#" >> network-statistics - echo "# netstat -Q -I ${if}" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/netstat -Q -I ${if} >> network-statistics 2>&1 - fi - done - fi -fi - -if [ -x /usr/sbin/ndp ]; then - echo "#" >> network-statistics - echo "# ndp -n -a" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/ndp -n -a >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# ndp -n -p" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/ndp -n -p >> network-statistics 2>&1 - - echo "#" >> network-statistics - echo "# ndp -n -r" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/ndp -n -r >> network-statistics 2>&1 - - if [ -x /sbin/ifconfig ]; then - for if in `/sbin/ifconfig -l` - do - echo "#" >> network-statistics - echo "# ndp -i ${if}" >> network-statistics - echo "#" >> network-statistics - /usr/sbin/ndp -i ${if} >> network-statistics 2>&1 - done - fi -fi - if [ -x /sbin/pfctl ]; then echo "#" > pf echo "# pfctl -s all" >> pf @@ -485,7 +318,30 @@ fi # open files # if [ -x /usr/sbin/lsof ]; then - ${PRIV} /usr/sbin/lsof -n -P -T q > lsof 2>&1 + ${PRIV} /usr/sbin/lsof +c 0 -n -O -P -T q > lsof 2>&1 & + LSOF_PID=$! + # Init a watchdog for lsof + ( + WAIT_TIME=5 + while [ $WAIT_TIME -gt 0 ] + do + ${PRIV} kill -0 ${LSOF_PID} 2>/dev/null + if [ $? -eq 0 ]; then + sleep 1 + # lsof is gathering data.. + WAIT_TIME=$((WAIT_TIME-1)) + continue + fi + + # lsof completed gathering data + break + done + + if [ $WAIT_TIME -eq 0 ]; then + # lsof timed out + ${PRIV} kill ${LSOF_PID} 2>/dev/null + fi + ) & fi # @@ -495,7 +351,7 @@ if [ -x /usr/local/bin/ddt ]; then /bin/echo -n "" > dispatch-info for BIN in \ configd \ - mDNSResponder \ + discoveryd \ do echo "#" >> dispatch-info @@ -515,49 +371,6 @@ if [ -x /usr/bin/odutil ]; then ${PRIV} /usr/bin/odutil show all >> od-info 2>&1 fi -# -# IPsec configuration -# -if [ -x /usr/sbin/setkey -a -x /usr/bin/perl ]; then - echo "#" > ipsec - echo "# setkey -D" >> ipsec - echo "#" >> ipsec - ${PRIV} /usr/sbin/setkey -D \ - | /usr/bin/perl -M'Digest::MD5 qw(md5_hex)' -l -n -e ' - if (/^(\s+[AE]:\s+\S+\s+)"?(.*)"?\s*$/) { - printf "%s[MD5:%s]%s\n", $1, md5_hex($2 . "\n"), $3; - } else { - printf "%s\n", $_; - } - ' >> ipsec - - echo "" >> ipsec - echo "#" >> ipsec - echo "# setkey -Pp -D" >> ipsec - echo "#" >> ipsec - ${PRIV} /usr/sbin/setkey -Pp -D >> ipsec - - for CF in /var/run/racoon/*.conf - do - if [ ! -r "${CF}" ]; then - continue - fi - - echo "" >> ipsec - echo "#" >> ipsec - echo "# ${CF}" >> ipsec - echo "#" >> ipsec - ${PRIV} cat ${CF} \ - | /usr/bin/perl -M'Digest::MD5 qw(md5_hex)' -l -n -e ' - if (/^(\s+shared_secret\s+use\s+)"?([^\s;"]+)"?(.*)/) { - printf "%s[MD5:%s]%s\n", $1, md5_hex($2 . "\n"), $3; - } else { - printf "%s\n", $_; - } - ' >> ipsec - done -fi - # # Kerberos configuration # @@ -632,7 +445,7 @@ if [ -x /usr/sbin/lsof -a -x /bin/ls ]; then N=`expr ${N} + 1` echo "#" >> system-statistics - ${PRIV} /usr/sbin/lsof -- ${lock} >> system-statistics 2>&1 + ${PRIV} /usr/sbin/lsof +c 0 -- ${lock} >> system-statistics 2>&1 done fi @@ -660,14 +473,15 @@ report_binary_info() get_binary_info() { for BIN in \ - /usr/libexec/InternetSharing \ /usr/libexec/bootpd \ /usr/libexec/configd \ - /usr/libexec/misd \ + /usr/libexec/discoveryd \ /usr/sbin/awacsd \ /usr/sbin/mDNSResponder \ /usr/sbin/pppd \ /usr/sbin/racoon \ + /usr/libexec/misd \ + /usr/libexec/InternetSharing \ /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration \ do @@ -775,53 +589,22 @@ if [ -x /usr/bin/what -a -x /usr/bin/sum -a -x /bin/ls ]; then fi # -# to give a chance for "networkd" and "mDNSResponder" to finish dumping their -# state, the last thing we do is collect the logs -# - -# -# system log, kernel.log, early boot log messages +# collect the logarchive # -if [ -x /usr/bin/syslog ]; then - # - # save the recent activity - # - ${PRIV} /usr/bin/syslog -T local.3 \ - | ${TAIL_25000} > syslog - - # - # save just the "kernel" activity (in case some of the - # interesting/relevant message are before the messages - # captured above. - # - ${PRIV} /usr/bin/syslog -T local.3 -k Facility kern \ - | ${TAIL_25000} > kernel - - if [ -d /var/log/DiagnosticMessages ]; then - # save any MessageTracer activity - ${PRIV} /usr/bin/syslog -d /var/log/DiagnosticMessages \ - -F raw \ - -T local.3 \ - | ${TAIL_25000} > DiagnosticMessages - fi -else - if [ -f /var/log/system.log ]; then - ${PRIV} ${TAIL_25000} /var/log/system.log > system.log - fi - if [ -f /var/log/kernel.log ]; then - ${PRIV} ${TAIL_25000} /var/log/kernel.log > kernel.log +if [ -x /usr/bin/log ]; then + LOGARCHIVE_START_TIME=`date -v -1d +"%Y-%m-%d %H:%M:%S"` + LOGARCHIVE_OUTPUT="system_logs.logarchive" + ${PRIV} /usr/bin/log collect --livedata --output "${LOGARCHIVE_OUTPUT}" --start "${LOGARCHIVE_START_TIME}" 2>/dev/null + if [ -d ${LOGARCHIVE_OUTPUT} ]; then + ${PRIV} chown -R ${UID} "${LOGARCHIVE_OUTPUT}" fi fi -if [ -x /sbin/dmesg ]; then - ${PRIV} /sbin/dmesg > dmesg -fi # -# IPConfiguration log +# dmesg # -if [ -f /var/log/com.apple.IPConfiguration.bootp ]; then - ${PRIV} ${TAIL_2000} /var/log/com.apple.IPConfiguration.bootp \ - > com.apple.IPConfiguration.bootp +if [ -x /sbin/dmesg ]; then + ${PRIV} /sbin/dmesg > dmesg fi # @@ -851,13 +634,6 @@ do fi done -# -# application firewall log -# -if [ -f /var/log/appfirewall.log ]; then - ${PRIV} ${TAIL_2000} /var/log/appfirewall.log > appfirewall.log -fi - if [ -x /bin/ls ]; then # # collect crash reports @@ -869,6 +645,8 @@ if [ -x /bin/ls ]; then awacsd \ bootpd \ configd \ + discoveryd \ + discoveryd_helper \ eapolclient \ mDNSResponder \ mDNSResponderHelper \ @@ -891,19 +669,6 @@ if [ -x /bin/ls ]; then fi done done - - # - # collect any verbose logging output - # - /bin/ls -1 /Library/Logs/CrashReporter/com.apple.networking.*.log* \ - 2>/dev/null \ - | while read log - do - if [ -f "${log}" ]; then - b="`basename ${log}`" - ${PRIV} cat "${log}" > "${b}" 2>&1 - fi - done fi # @@ -914,19 +679,41 @@ if [ -x /usr/local/bin/crstackshot ]; then fi # -# collect everything into a single archive +# wait for background activity (eg: lsof) +# +wait + # -cd "${WORKDIR}/.." -tar -c ${GZ_OPT} -f "${ARCHIVE}" "${OUT}" -rm -rf "${WORKDIR}" +# Stop the packet capture +# +stop_pcap + +if [ $NO_TAR -eq 0 ]; then + # + # collect everything into a single archive + # + cd "${WORKDIR}/.." + tar -c ${GZ_OPT} -f "${ARCHIVE}" "${OUT}" + rm -rf "${WORKDIR}" -if [ ${UID} -eq 0 ]; then - if [ -n "${SUDO_UID}" -a -n "${SUDO_GID}" ]; then - if [ ${UID} -ne ${SUDO_UID} ]; then - chown ${SUDO_UID}:${SUDO_GID} "${ARCHIVE}" + if [ ${UID} -eq 0 ]; then + if [ -n "${SUDO_UID}" -a -n "${SUDO_GID}" ]; then + if [ ${UID} -ne ${SUDO_UID} ]; then + chown ${SUDO_UID}:${SUDO_GID} "${ARCHIVE}" + fi fi fi -fi -echo "Network data collected to \"${ARCHIVE}\"" + echo "Network data collected to \"${ARCHIVE}\"" +else + mv "${WORKDIR}" "${OUTDIR}" + if [ ${UID} -eq 0 ]; then + if [ -n "${SUDO_UID}" -a -n "${SUDO_GID}" ]; then + if [ ${UID} -ne ${SUDO_UID} ]; then + chown -R ${SUDO_UID}:${SUDO_GID} "${OUTDIR}/${OUT}" + fi + fi + fi + echo "Network data collected to \"${OUTDIR}/${OUT}\"" +fi diff --git a/src/configd/get-network-info b/src/configd/get-network-info new file mode 100644 index 000000000..e2749fdf4 --- /dev/null +++ b/src/configd/get-network-info @@ -0,0 +1,833 @@ +#!/bin/sh + +# +# Copyright © 2015-2019 Apple Inc. +# +# get-network-info +# +# Collect network information. +# + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +# __SETUP_ROUTINES_BEGIN__ + +process_opts () { + + for i in $ARGS + do + case "$i" in + -c) + COLLECT_CONFIGURATION_FILES="Y" + shift + ;; + -n) + COLLECT_NDF_INFO="Y" + shift + ;; + -P) + COLLECT_PCAP="N" + shift + ;; + -s) + COLLECT_SENSITIVE_INFO="Y" + shift + ;; + --) + shift + ;; + *) + REQUESTED_OUTDIR="${i}" + shift + ;; + esac + done + +} + +set_root () { + + PRIV="" + if [ ${EUID} -ne 0 ]; then + PRIV="sudo" + fi + +} + +# +# Setup +# +setup () { + + set_root + umask 077 + cd "${REQUESTED_OUTDIR}" + +} + +# __SETUP_ROUTINES_END__ + + +# __COMMAND_ROUTINES_BEGIN__ + +# +# mDNSResponder state dump +# /usr/bin/dns-sd -O -stdout will print the state of mDNSResponder to STDOUT +# +collect_state_dump_sensitive () { + + echo "`date +"%Y-%m-%d %H:%M:%S"`: collect_state_dump_sensitive" >> get-network-info.txt + ${PRIV} /usr/bin/dns-sd -O -stdout > mDNSResponder_state_dump.txt 2>&1 + +} + +# +# network interface configuration +# +run_ifconfig () { + + if [ ! -x /sbin/ifconfig ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_ifconfig" >> get-network-info.txt + /sbin/ifconfig -a -L -b -m -r -v -v > ifconfig.txt 2>&1 + if [ $? -ne 0 ]; then + /sbin/ifconfig -a > ifconfig.txt 2>&1 + fi + +} + +# +# network route configuration and statistics +# +run_netstat () { + + if [ ! -x /usr/sbin/netstat ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_netstat" >> get-network-info.txt + echo "#" > netstat.txt + echo "# netstat -n -r -a -l" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -n -r -a -l >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -A -a -l -n -v -W" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -A -a -l -n -v -W >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -s" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -s >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -rs" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -rs >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -mmm" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -mmm >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -i -n -d" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -i -n -d >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -i -x R" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -i -x R >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -a -n -p mptcp" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -anp mptcp >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -s -p mptcp" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -s -p mptcp >> netstat.txt 2>&1 + + echo "#" >> netstat.txt + echo "# netstat -g -n -s" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -g -n -s >> netstat.txt 2>&1 + + if [ -x /sbin/ifconfig ]; then + for if in ${IF_LIST} + do + echo "#" >> netstat.txt + echo "# netstat -s -I ${if}" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -s -I ${if} >> netstat.txt 2>&1 + + IF_INFO=`/sbin/ifconfig -v ${if}` + `echo $IF_INFO | grep -q TXSTART` + if [ $? -eq 0 ]; then + echo "#" >> netstat.txt + echo "# netstat -qq -I ${if}" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -qq -I ${if} >> netstat.txt 2>&1 + fi + + `echo $IF_INFO | grep -q RXPOLL` + if [ $? -eq 0 ]; then + echo "#" >> netstat.txt + echo "# netstat -Q -I ${if}" >> netstat.txt + echo "#" >> netstat.txt + /usr/sbin/netstat -Q -I ${if} >> netstat.txt 2>&1 + fi + done + fi + +} + +# +# ndp +# +run_ndp () { + + if [ ! -x /usr/sbin/ndp ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_ndp" >> get-network-info.txt + echo "#" > ndp-info.txt + echo "# ndp -n -a" >> ndp-info.txt + echo "#" >> ndp-info.txt + /usr/sbin/ndp -n -a >> ndp-info.txt 2>&1 + + echo "#" >> ndp-info.txt + echo "# ndp -n -p" >> ndp-info.txt + echo "#" >> ndp-info.txt + /usr/sbin/ndp -n -p >> ndp-info.txt 2>&1 + + echo "#" >> ndp-info.txt + echo "# ndp -n -r" >> ndp-info.txt + echo "#" >> ndp-info.txt + /usr/sbin/ndp -n -r >> ndp-info.txt 2>&1 + + if [ -x /sbin/ifconfig ]; then + for if in ${IF_LIST} + do + echo "#" >> ndp-info.txt + echo "# ndp -i ${if}" >> ndp-info.txt + echo "#" >> ndp-info.txt + /usr/sbin/ndp -i ${if} >> ndp-info.txt 2>&1 + done + fi + +} + +# +# arp +# +run_arp () { + + if [ ! -x /usr/sbin/arp ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_arp" >> get-network-info.txt + echo "#" > arp-info.txt + echo "# arp -n -a" >> arp-info.txt + echo "#" >> arp-info.txt + /usr/sbin/arp -n -a >> arp-info.txt 2>&1 + +} + +# +# DHCP configuration +# +run_ipconfig () { + + if [ ! -x /usr/sbin/ipconfig ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_ipconfig" >> get-network-info.txt + for if in ${IF_LIST} + do + case ${if} in + lo* ) + ;; + *) + echo "#" >> ipconfig-info.txt + echo "# INTERFACE ${if}" >> ipconfig-info.txt + echo "#" >> ipconfig-info.txt + + echo "DHCPv4 information:" >> ipconfig-info.txt + + IPCONFIG_INFO=`/usr/sbin/ipconfig getpacket ${if}` + if [ "${IPCONFIG_INFO}" != "" ]; then + echo "${IPCONFIG_INFO}" >> ipconfig-info.txt + else + echo "not available" >> ipconfig-info.txt + fi + + echo"" >> ipconfig-info.txt + + echo "DHCPv6 information:" >> ipconfig-info.txt + + IPCONFIG_INFO=`/usr/sbin/ipconfig getv6packet ${if}` + if [ "${IPCONFIG_INFO}" != "" ]; then + echo "${IPCONFIG_INFO}" >> ipconfig-info.txt + else + echo "not available" >> ipconfig-info.txt + fi + + echo"" >> ipconfig-info.txt + ;; + esac + done + +} + +# +# IPsec configuration +# +run_setkey () { + + if [ ! -x /usr/sbin/setkey -o ! -x /usr/bin/perl ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_setkey" >> get-network-info.txt + echo "#" > ipsec.txt + echo "# setkey -D" >> ipsec.txt + echo "#" >> ipsec.txt + ${PRIV} /usr/sbin/setkey -D \ + | /usr/bin/perl -l -n -e ' + if (/^(\s+[AE]:\s+\S+\s+)"?(.*)"?\s*$/) { + printf "%s[redacted]%s\n", $1, $3; + } else { + printf "%s\n", $_; + } + ' >> ipsec.txt + + echo "" >> ipsec.txt + echo "#" >> ipsec.txt + echo "# setkey -Pp -D" >> ipsec.txt + echo "#" >> ipsec.txt + ${PRIV} /usr/sbin/setkey -Pp -D >> ipsec.txt + + for CF in /var/run/racoon/*.conf + do + if [ ! -r "${CF}" ]; then + continue + fi + + echo "" >> ipsec.txt + echo "#" >> ipsec.txt + echo "# ${CF}" >> ipsec.txt + echo "#" >> ipsec.txt + ${PRIV} cat ${CF} \ + | /usr/bin/perl -l -n -e ' + if (/^(\s+shared_secret\s+use\s+)"?([^\s;"]+)"?(.*)/) { + printf "%s[redacted]%s\n", $1, $3; + } else { + printf "%s\n", $_; + } + ' >> ipsec.txt + done + +} + +# +# skywalk configuration and statistics +# +run_skywalk () { + + if [ ! -x /usr/sbin/skywalkctl ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_skywalk" >> get-network-info.txt + echo "#" > skywalk.txt + echo "# skywalkctl show" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl show >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl flow -n" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl flow -n >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl flow-route -n" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl flow-route -n >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl flow-switch" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl flow-switch >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl flow-owner" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl flow-owner >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl flow-adv" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl flow-adv >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl netstat -s" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl netstat -s >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl netstat -s --global" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl netstat -s --global >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl interface" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl interface >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl channel" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl channel >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl provider -D" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl provider -D >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl netns -a" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl netns -a >> skywalk.txt 2>&1 + + echo "#" >> skywalk.txt + echo "# skywalkctl memory" >> skywalk.txt + echo "#" >> skywalk.txt + /usr/sbin/skywalkctl memory >> skywalk.txt 2>&1 + +} + +# +# skywalk configuration and statistics +# +run_nettop () { + + if [ ! -x /usr/bin/nettop ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_nettop" >> get-network-info.txt + echo "#" > nettop.txt + echo "# nettop -n -l 1" >> nettop.txt + echo "#" >> nettop.txt + /usr/bin/nettop -n -l 1 >> nettop.txt 2>&1 + +} + +# +# Network preferences +# +collect_configuration_files () { + + echo "`date +"%Y-%m-%d %H:%M:%S"`: collect_configuration_files" >> get-network-info.txt + for f in \ + /Library/Preferences/com.apple.networkextension.plist \ + /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 \ + /Library/Preferences/com.apple.mDNSResponder.plist \ + /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist \ + /Library/Preferences/SystemConfiguration/preferences.plist \ + + do + if [ -e "${f}" ]; then + b="`basename ${f}`" + cat "${f}" > "${b}" 2>&1 + fi + done + + if [ -e /etc/resolv.conf ]; then + cat /etc/resolv.conf > etc-resolv-conf.txt 2>&1 + fi + if [ -e /var/run/resolv.conf ]; then + cat /var/run/resolv.conf > var-run-resolv-conf.txt 2>&1 + fi + if [ -e /etc/resolver ]; then + tar -c -H /etc/resolver > etc-resolver.tar 2>/dev/null + fi +} + +# +# VPN +# +collect_vpn_logs () { + + echo "`date +"%Y-%m-%d %H:%M:%S"`: collect_vpn_logs" >> get-network-info.txt + for f in \ + /var/log/vpnd.log \ + /var/log/racoon.log \ + + do + if [ -e "${f}" ]; then + b="`basename ${f}`" + ${PRIV} cat "${f}" > "${b}".txt 2>&1 + fi + done +} + +# +# Policy +# +run_neutil () { + + if [ ! -x /usr/local/bin/neutil ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_neutil" >> get-network-info.txt + ( + echo "#" > necp.txt + echo "# neutil policy dump" >> necp.txt + echo "#" >> necp.txt + /usr/local/bin/neutil policy dump >> necp.txt 2>&1 + + echo "#" > network-agents.txt + echo "# neutil agent dump" >> network-agents.txt + echo "#" >> network-agents.txt + /usr/local/bin/neutil agent dump >> network-agents.txt 2>&1 + + # Generates a default-level log message containing the current file handles that UserEventAgent has + /usr/local/bin/neutil session log-file-handles + sleep 1 & + ) & +} + +# +# Path +# +run_network_test () { + + if [ ! -x /usr/local/bin/network_test ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_network_test" >> get-network-info.txt + /usr/local/bin/network_test path_watcher -dump > nw_path.txt 2>&1 + +} + +# +# Network, DNS, Proxy, Reachability, Cache information +# +run_scutil () { + + if [ ! -x /usr/sbin/scutil ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_scutil" >> get-network-info.txt + echo "#" > network-information.txt + echo "# scutil -d -v --nwi" >> network-information.txt + echo "#" >> network-information.txt + /usr/sbin/scutil -d -v --nwi >> network-information.txt 2>&1 + for if in ${IF_LIST} + do + echo "" >> network-information.txt + echo "#" >> network-information.txt + echo "# scutil --nwi ${if}" >> network-information.txt + echo "#" >> network-information.txt + scutil --nwi ${if} >> network-information.txt 2>&1 + done + + echo "#" > dns-configuration.txt + echo "# scutil -d -v --dns" >> dns-configuration.txt + echo "#" >> dns-configuration.txt + /usr/sbin/scutil -d -v --dns >> dns-configuration.txt 2>&1 + + echo "#" > proxy-configuration.txt + echo "# scutil -d -v --proxy" >> proxy-configuration.txt + echo "#" >> proxy-configuration.txt + /usr/sbin/scutil -d -v --proxy >> proxy-configuration.txt 2>&1 + + echo "#" > reachability-info.txt + echo '# scutil -d -v -r www.apple.com' >> reachability-info.txt + echo "#" >> reachability-info.txt + /usr/sbin/scutil -d -v -r www.apple.com >> reachability-info.txt 2>&1 + + echo "#" >> reachability-info.txt + echo '# scutil -d -v -r 0.0.0.0' >> reachability-info.txt + echo "#" >> reachability-info.txt + /usr/sbin/scutil -d -v -r 0.0.0.0 >> reachability-info.txt 2>&1 + + echo "#" >> reachability-info.txt + echo '# scutil -d -v -r 169.254.0.0' >> reachability-info.txt + echo "#" >> reachability-info.txt + /usr/sbin/scutil -d -v -r 169.254.0.0 >> reachability-info.txt 2>&1 + + echo "#" > nc-info.txt + echo '# scutil --nc list' >> nc-info.txt + echo "#" >> nc-info.txt + /usr/sbin/scutil --nc list >> nc-info.txt 2>&1 + + /usr/sbin/scutil -p --snapshot SCDynamicStore.plist 2>&1 + +} + +# +# route +# +run_route () { + + if [ ! -x /sbin/route ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_route" >> get-network-info.txt + echo "#" > route-info.txt + echo '# route -n -v get www.apple.com' >> route-info.txt + echo "#" >> route-info.txt + /sbin/route -n -v get www.apple.com >> route-info.txt 2>&1 + + echo "#" >> route-info.txt + echo '# route -n -v get 0.0.0.0' >> route-info.txt + echo "#" >> route-info.txt + /sbin/route -n -v get 0.0.0.0 >> route-info.txt 2>&1 + +} + +# +# dig +# +run_dig () { + + if [ ! -x /usr/bin/dig -o ! -f /etc/resolv.conf ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_dig" >> get-network-info.txt + echo "#" > dig-info.txt + echo '# dig -t any -c any www.apple.com' >> dig-info.txt + echo "#" >> dig-info.txt + /usr/bin/dig +time=2 -t any -c any www.apple.com >> dig-info.txt 2>/dev/null + +} + +# +# hostname +# +run_hostname () { + + if [ ! -x /bin/hostname ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_hostname" >> get-network-info.txt + /bin/hostname > hostname.txt 2>&1 + +} + +# +# lsof +# +run_lsof () { + + if [ ! -x /usr/sbin/lsof ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_lsof" >> get-network-info.txt + ${PRIV} /usr/sbin/lsof +c 0 -X -n -O -P -T q > lsof.txt 2>&1 & + LSOF_PID=$! + # start a watchdog for lsof + ( + WAIT_TIME=5 + while [ $WAIT_TIME -gt 0 ] + do + ${PRIV} kill -0 ${LSOF_PID} 2>/dev/null + if [ $? -eq 0 ]; then + # lsof is [still] gathering data... + sleep 1 + WAIT_TIME=$((WAIT_TIME - 1)) + continue + fi + + # lsof completed gathering data + break + done + + if [ $WAIT_TIME -eq 0 ]; then + # lsof timed out + ${PRIV} kill ${LSOF_PID} 2>/dev/null + fi + ) & + +} + +# +# sysctl +# +run_sysctl () { + + if [ ! -x /usr/sbin/sysctl ]; then + return + fi + + echo "`date +"%Y-%m-%d %H:%M:%S"`: run_sysctl" >> get-network-info.txt + ${PRIV} /usr/sbin/sysctl -a > sysctl.txt 2>&1 & + +} + +start_pcap() { + # + # collect a packet capture if netdiagnose is available + # + if [ -x /usr/local/bin/netdiagnose ]; then + echo "`date +"%Y-%m-%d %H:%M:%S"`: start_pcap" >> get-network-info.txt + trap stop_pcap SIGINT + /usr/local/bin/netdiagnose -p "${REQUESTED_OUTDIR}" start sysdiagpcap 2>&1 1>/dev/null + PCAP_STARTED=1 + fi +} + +stop_pcap () { + if [ ${PCAP_STARTED} -ne 0 ]; then + trap '' SIGINT + /usr/local/bin/netdiagnose stop sysdiagpcap 2>&1 1>/dev/null + echo "`date +"%Y-%m-%d %H:%M:%S"`: stop_pcap done" >> get-network-info.txt + fi +} + +collect_ndf_info () { + run_lsof + run_sysctl +} + +collect_sensitive_info () { + + if [ "${COLLECT_PCAP}" == "Y" ]; then + start_pcap + fi + + collect_state_dump_sensitive + run_ndp + run_arp + run_neutil + run_nettop + run_network_test +} + +collect_info () { + + if [ "${COLLECT_NDF_INFO}" == "Y" ]; then + collect_ndf_info + fi + + if [ "${COLLECT_SENSITIVE_INFO}" == "Y" ]; then + collect_sensitive_info + fi + + run_scutil + run_dig + run_ifconfig + run_netstat + run_ipconfig + run_setkey + run_skywalk + collect_vpn_logs + run_route + run_hostname + + if [ "${COLLECT_CONFIGURATION_FILES}" == "Y" ]; then + collect_configuration_files + fi + + stop_pcap +} + +# __COMMAND_ROUTINES_END__ + +# __HELPER_ROUTINES_BEGIN__ + +usage () { + + echo "Usage: get-network-info [-c] [-n] [-s] " + echo " -c collects system configuration files" + echo " -n collects NDF information (lsof)" + echo " -P do not collect a packet capture" + echo " -s collects sensitive information (ARP/NDP/mDNS cache)" + echo " path to directory where all the information will be collected" + +} + +is_outdir_valid () { + + if [ "${REQUESTED_OUTDIR}" = "" ]; then + usage + exit 1 + fi + + if [ ! -d ${REQUESTED_OUTDIR} ]; then + echo "${REQUESTED_OUTDIR} does not exist" + exit 1 + fi + + if [ ! -w ${REQUESTED_OUTDIR} ]; then + echo "${REQUESTED_OUTDIR} is write-protected" + exit 1 + fi +} + +# +# Collect most used command output to be used later +# +optimize () { + + if [ ! -x /sbin/ifconfig ]; then + return + fi + + IF_LIST=`/sbin/ifconfig -l` + +} + +init_globals () { + REQUESTED_OUTDIR="" + COLLECT_SENSITIVE_INFO="" + COLLECT_CONFIGURATION_FILES="" + COLLECT_PCAP="Y" + PCAP_STARTED=0 + +} + +# __HELPER_ROUTINES_END__ + +# +# __MAIN__ +# +ARGS=`getopt cnPs $*` +if [ $? != 0 ]; then + usage + exit 1 +fi + +init_globals +process_opts +is_outdir_valid +setup +optimize +collect_info +wait + +exit 0 diff --git a/src/configd/libSystemConfiguration/libSystemConfiguration_client.c b/src/configd/libSystemConfiguration/libSystemConfiguration_client.c index 50233299c..8f2507783 100644 --- a/src/configd/libSystemConfiguration/libSystemConfiguration_client.c +++ b/src/configd/libSystemConfiguration/libSystemConfiguration_client.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2013, 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,28 +17,27 @@ * 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@ */ -#include #include -#include #include +#include +#include #include #include #include #include "libSystemConfiguration_client.h" +#include "libSystemConfiguration_internal.h" #pragma mark - #pragma mark libSC fork handlers -__attribute__((weak_import)) bool _dispatch_is_multithreaded(void); - -static boolean_t _has_forked = FALSE; +static boolean_t _available = TRUE; // These functions are registered with libSystem to // handle pthread_atfork callbacks. @@ -58,9 +57,8 @@ _libSC_info_fork_parent() void _libSC_info_fork_child() { - if (_dispatch_is_multithreaded()) { - // if dispatch was active before fork - _has_forked = TRUE; + if (_dispatch_is_fork_of_multithreaded_parent()) { + _available = FALSE; } return; @@ -77,11 +75,29 @@ log_xpc_object(const char *msg, xpc_object_t obj) char *desc; desc = xpc_copy_description(obj); - asl_log(NULL, NULL, ASL_LEVEL_ERR, "%s = %s", msg, desc); + os_log(OS_LOG_DEFAULT, "%s = %s", msg, desc); free(desc); } +__private_extern__ +_Bool +libSC_info_available() +{ + return _available; +} + + +static void +libSC_info_client_dealloc(libSC_info_client_t *client) +{ + free(client->service_description); + free(client->service_name); + free(client); + return; +} + + __private_extern__ libSC_info_client_t * libSC_info_client_create(dispatch_queue_t q, @@ -90,13 +106,13 @@ libSC_info_client_create(dispatch_queue_t q, { xpc_connection_t c; libSC_info_client_t *client; -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC const uint64_t flags = XPC_CONNECTION_MACH_SERVICE_PRIVILEGED; -#else // !TARGET_IPHONE_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC const uint64_t flags = 0; -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC - if (_has_forked) { + if (!_available) { return NULL; } @@ -112,35 +128,37 @@ libSC_info_client_create(dispatch_queue_t q, type = xpc_get_type(xobj); if (type == XPC_TYPE_DICTIONARY) { - asl_log(NULL, NULL, ASL_LEVEL_ERR, "%s: unexpected message", client->service_name); + os_log(OS_LOG_DEFAULT, "%s: unexpected message", client->service_name); log_xpc_object(" dict = ", xobj); } else if (type == XPC_TYPE_ERROR) { if (xobj == XPC_ERROR_CONNECTION_INVALID) { - asl_log(NULL, NULL, ASL_LEVEL_ERR, "%s: server not available", client->service_name); + os_log(OS_LOG_DEFAULT, "%s: server not available", client->service_name); client->active = FALSE; } else if (xobj == XPC_ERROR_CONNECTION_INTERRUPTED) { - asl_log(NULL, NULL, ASL_LEVEL_DEBUG, "%s: server failed", client->service_name); + os_log_debug(OS_LOG_DEFAULT, "%s: server failed", client->service_name); } else { const char *desc; desc = xpc_dictionary_get_string(xobj, XPC_ERROR_KEY_DESCRIPTION); - asl_log(NULL, NULL, ASL_LEVEL_DEBUG, - "%s: connection error: %d : %s", - client->service_name, - xpc_connection_get_pid(c), - desc); + os_log_debug(OS_LOG_DEFAULT, + "%s: connection error: %d : %s", + client->service_name, + xpc_connection_get_pid(c), + desc); } - } else { - asl_log(NULL, NULL, ASL_LEVEL_ERR, - "%s: unknown event type : %p", - client->service_name, - type); + os_log(OS_LOG_DEFAULT, + "%s: unknown event type : %p", + client->service_name, + type); } }); client->connection = c; + xpc_connection_set_context(c, client); + xpc_connection_set_finalizer_f(c, (xpc_finalizer_t)libSC_info_client_dealloc); + xpc_connection_resume(c); return client; @@ -152,9 +170,7 @@ void libSC_info_client_release(libSC_info_client_t *client) { xpc_release(client->connection); - free(client->service_description); - free(client->service_name); - free(client); + return; } @@ -178,23 +194,23 @@ libSC_send_message_with_reply_sync(libSC_info_client_t *client, } if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INTERRUPTED)) { - asl_log(NULL, NULL, ASL_LEVEL_DEBUG, - "%s server failure, retrying", - client->service_description); + os_log_debug(OS_LOG_DEFAULT, + "%s server failure, retrying", + client->service_description); // retry request xpc_release(reply); continue; } if ((type == XPC_TYPE_ERROR) && (reply == XPC_ERROR_CONNECTION_INVALID)) { - asl_log(NULL, NULL, ASL_LEVEL_ERR, - "%s server not available", - client->service_description); + os_log(OS_LOG_DEFAULT, + "%s server not available", + client->service_description); client->active = FALSE; } else { - asl_log(NULL, NULL, ASL_LEVEL_ERR, - "%s xpc_connection_send_message_with_reply_sync() with unexpected reply", - client->service_description); + os_log(OS_LOG_DEFAULT, + "%s xpc_connection_send_message_with_reply_sync() with unexpected reply", + client->service_description); log_xpc_object(" reply", reply); } diff --git a/src/configd/libSystemConfiguration/libSystemConfiguration_client.h b/src/configd/libSystemConfiguration/libSystemConfiguration_client.h index c93d477af..082cef810 100644 --- a/src/configd/libSystemConfiguration/libSystemConfiguration_client.h +++ b/src/configd/libSystemConfiguration/libSystemConfiguration_client.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012, 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,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_CLIENT_H #define _LIBSYSTEMCONFIGURATION_CLIENT_H -#include +#include #include #include #include @@ -37,11 +37,11 @@ #define DNSINFO_SERVER_VERSION 20130408 -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define DNSINFO_SERVICE_NAME "com.apple.SystemConfiguration.DNSConfiguration" -#else // !TARGET_IPHONE_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define DNSINFO_SERVICE_NAME "com.apple.SystemConfiguration.DNSConfiguration_sim" -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define DNSINFO_PROC_NAME "proc_name" // string @@ -62,19 +62,25 @@ enum { #define NWI_SERVER_VERSION 20130408 -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define NWI_SERVICE_NAME "com.apple.SystemConfiguration.NetworkInformation" -#else // !TARGET_IPHONE_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define NWI_SERVICE_NAME "com.apple.SystemConfiguration.NetworkInformation_sim" -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define NWI_PROC_NAME "proc_name" // string #define NWI_REQUEST "request_op" // int64 enum { - NWI_REQUEST_COPY = 0x20001, - NWI_REQUEST_ACKNOWLEDGE, + /* NWI state requests */ + NWI_STATE_REQUEST_COPY = 0x20001, + NWI_STATE_REQUEST_ACKNOWLEDGE, + +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC + /* NWI config agent requests */ + NWI_CONFIG_AGENT_REQUEST_COPY +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC }; #define NWI_CONFIGURATION "configuration" // data @@ -93,6 +99,9 @@ typedef struct { __BEGIN_DECLS +_Bool +libSC_info_available (void); + libSC_info_client_t * libSC_info_client_create ( dispatch_queue_t q, @@ -113,4 +122,4 @@ libSC_send_message_with_reply_sync ( __END_DECLS -#endif // _LIBSYSTEMCONFIGURATION_CLIENT_H +#endif // _LIBSYSTEMCONFIGURATION_CLIENT_H diff --git a/src/configd/libSystemConfiguration/libSystemConfiguration_internal.h b/src/configd/libSystemConfiguration/libSystemConfiguration_internal.h new file mode 100644 index 000000000..52e24bea3 --- /dev/null +++ b/src/configd/libSystemConfiguration/libSystemConfiguration_internal.h @@ -0,0 +1,44 @@ +/* + * 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 + +__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/src/configd/libSystemConfiguration/libSystemConfiguration_server.c b/src/configd/libSystemConfiguration/libSystemConfiguration_server.c index 0a5aca165..c193147a9 100644 --- a/src/configd/libSystemConfiguration/libSystemConfiguration_server.c +++ b/src/configd/libSystemConfiguration/libSystemConfiguration_server.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012-2014 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,13 +17,11 @@ * 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@ */ -#include #include -#include #include #include #include @@ -32,24 +30,14 @@ #include #include - #include "libSystemConfiguration_server.h" #define kTrailingEdgeAgentEntitlement "com.apple.SystemConfiguration.trailing-edge-agent" -#pragma mark - -#pragma mark Support functions - - -//__private_extern__ void -//log_xpc_object(const char *msg, xpc_object_t obj) -//{ -// char *desc; -// -// desc = xpc_copy_description(obj); -// asl_log(NULL, NULL, ASL_LEVEL_ERR, "%s = %s", msg, desc); -// free(desc); -//} +#ifdef SC_LOG_HANDLE +#include +os_log_t SC_LOG_HANDLE(void); +#endif //SC_LOG_HANDLE #pragma mark - @@ -98,7 +86,7 @@ _handle_entitlement_check_failure(pid_t pid) if (!CFArrayContainsValue(pids, CFRangeMake(0, CFArrayGetCount(pids)), pidNumber)) { CFArrayAppendValue(pids, pidNumber); - SCLog(TRUE, LOG_ERR, CFSTR("DNS/nwi dropping ack w/no entitlement, pid = %d"), pid); + SC_log(LOG_INFO, "DNS/nwi dropping ack w/no entitlement, pid = %d", pid); if (!cleanupScheduled) { cleanupScheduled = TRUE; @@ -124,7 +112,7 @@ _handle_entitlement_check_failure(pid_t pid) __private_extern__ void _libSC_info_server_init(libSC_info_server_t *server_info) { - bzero(server_info, sizeof(*server_info)); + memset(server_info, 0, sizeof(*server_info)); server_info->info = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, diff --git a/src/configd/libSystemConfiguration/libSystemConfiguration_server.h b/src/configd/libSystemConfiguration/libSystemConfiguration_server.h index 4093bb702..acd65188a 100644 --- a/src/configd/libSystemConfiguration/libSystemConfiguration_server.h +++ b/src/configd/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/src/configd/logging/liblog_SystemConfiguration.m b/src/configd/logging/liblog_SystemConfiguration.m new file mode 100644 index 000000000..e4404274f --- /dev/null +++ b/src/configd/logging/liblog_SystemConfiguration.m @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2017 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 + * + * May 18, 2017 Allan Nathanson + * - initial revision + */ + +#define _LIBLOG_SYSTEMCONFIGURATION_ + +#import +#import +#import +#import + +#import +#import "dnsinfo_internal.h" +#import + +#define my_log(__level, __format, ...) [string appendFormat:@(__format "\n"), ## __VA_ARGS__] +#define my_log_context_type NSMutableString * +#define my_log_context_name string +#import "dnsinfo_logging.h" +#import "network_state_information_logging.h" +#undef my_log_context_name +#undef my_log_context_type +#undef my_log + +#define SCAS(str) \ + [[NSAttributedString alloc] initWithString:str] + +#define SCASWithFormat(format, ...) \ + SCAS(([[NSString alloc] initWithFormat:format, ##__VA_ARGS__])) + +#pragma mark - +#pragma mark os_log formatting entry point + +struct SC_OSLog_Formatters { + const char *type; + NS_RETURNS_RETAINED NSAttributedString * (*function)(id value); +}; + +NS_RETURNS_RETAINED +NSAttributedString * +OSLogCopyFormattedString(const char *type, id value, os_log_type_info_t info) +{ +#pragma unused(info) + // add functions for each type into this list + static const struct SC_OSLog_Formatters formatters[] = { +// { .type = "???", .function = _SC_OSLogCopyFormattedString_??? }, + }; + + for (int i = 0; i < (int)(sizeof(formatters) / sizeof(formatters[0])); i++) { + if (strcmp(type, formatters[i].type) == 0) { + return formatters[i].function(value); + } + } + + return SCASWithFormat(@"liblog_SystemConfiguration: Not yet supported os_log formatting type: %s", type); +} + +#pragma mark - +#pragma mark os_state formatting entry point + +#define SCNS(str) \ + [[NSString alloc] initWithString:(str)] + +#define SCNSWithFormat(format, ...) \ + [[NSString alloc] initWithFormat:format, ##__VA_ARGS__] + +static NS_RETURNS_RETAINED NSString * +_SC_OSStateCopyFormattedString_dnsinfo(uint32_t data_size, void *data) +{ + dns_config_t *dns_config = NULL; + _dns_config_buf_t *dns_config_buf; + NSMutableString *string; + + // os_state_add_handler w/ + // osd_type = OS_STATE_DATA_CUSTOM + // osd_decoder.osdd_library = "SystemConfiguration + // osd_decoder.osdd_type = "dnsinfo" + + if ((data_size == 0) || (data == NULL)) { + return @"No DNS configuration"; + } else if (data_size < sizeof(_dns_config_buf_t)) { + return SCNSWithFormat(@"DNS configuration: size error (%d < %zd)", + data_size, + sizeof(_dns_config_buf_t)); + } + + dns_config_buf = _dns_configuration_buffer_create(data, data_size); + if (dns_config_buf == NULL) { + return @"DNS configuration: data error"; + } + + dns_config = _dns_configuration_buffer_expand(dns_config_buf); + if (dns_config == NULL) { + // if we were unable to expand the configuration + _dns_configuration_buffer_free(&dns_config_buf); + return @"DNS configuration: expansion error"; + } + + string = [NSMutableString string]; + _dns_configuration_log(dns_config, TRUE, string); + if (string.length == 0) { + [string appendString:@"DNS configuration: not available"]; + } + free(dns_config); + + return string; +} + +static NS_RETURNS_RETAINED NSString * +_SC_OSStateCopyFormattedString_nwi(uint32_t data_size, void *data) +{ + nwi_state_t state = (nwi_state_t)data; + NSMutableString *string; + + // os_state_add_handler w/ + // osd_type = OS_STATE_DATA_CUSTOM + // osd_decoder.osdd_library = "SystemConfiguration + // osd_decoder.osdd_type = "nwi" + + if ((data_size == 0) || (data == NULL)) { + return @"No network information"; + } else if (data_size < sizeof(nwi_state)) { + return SCNSWithFormat(@"Network information: size error (%d < %zd)", + data_size, + sizeof(_dns_config_buf_t)); + } else if (state->version != NWI_STATE_VERSION) { + return SCNSWithFormat(@"Network information: version error (%d != %d)", + state->version, + NWI_STATE_VERSION); + } + + string = [NSMutableString string]; + _nwi_state_log(state, TRUE, string); + if (string.length == 0) { + [string appendString:@"Network information: not available"]; + } + + return string; +} + +struct SC_OSState_Formatters { + const char *type; + NS_RETURNS_RETAINED NSString * (*function)(uint32_t data_size, void *data); +}; + +NS_RETURNS_RETAINED +NSString * +OSStateCreateStringWithData(const char *type, uint32_t data_size, void *data) +{ + // add functions for each type into this list + static const struct SC_OSState_Formatters formatters[] = { + { .type = "dnsinfo", .function = _SC_OSStateCopyFormattedString_dnsinfo }, + { .type = "nwi", .function = _SC_OSStateCopyFormattedString_nwi }, + }; + + for (int i = 0; i < (int)(sizeof(formatters) / sizeof(formatters[0])); i++) { + if (strcmp(type, formatters[i].type) == 0) { + return formatters[i].function(data_size, data); + } + } + + return SCNSWithFormat(@"liblog_SystemConfiguration: Not yet supported os_state formatting type: %s", type); +} + diff --git a/src/configd/logging/liblog_SystemConfiguration_internal.h b/src/configd/logging/liblog_SystemConfiguration_internal.h new file mode 100644 index 000000000..e62933bf6 --- /dev/null +++ b/src/configd/logging/liblog_SystemConfiguration_internal.h @@ -0,0 +1,59 @@ +/* + * 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 + +// +#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/src/configd/nwi/network_config_agent_info_priv.h b/src/configd/nwi/network_config_agent_info_priv.h new file mode 100644 index 000000000..453d4dbf4 --- /dev/null +++ b/src/configd/nwi/network_config_agent_info_priv.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2016 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 _CONFIG_AGENT_INFORMATION_PRIV_H_ +#define _CONFIG_AGENT_INFORMATION_PRIV_H_ + +#include +#include + +__BEGIN_DECLS + +const void * +_nwi_config_agent_copy_data(const struct netagent * agent, uint64_t * length); + +__END_DECLS + +#endif // _CONFIG_AGENT_INFORMATION_PRIV_H_ diff --git a/src/configd/nwi/network_information.c b/src/configd/nwi/network_information.c index 0db736667..96c5f86a5 100644 --- a/src/configd/nwi/network_information.c +++ b/src/configd/nwi/network_information.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2014 Apple Inc. All rights reserved. + * Copyright (c) 2011-2019 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@ */ @@ -28,11 +28,17 @@ #include #include #include +#include #include #include "libSystemConfiguration_client.h" #include "network_information.h" -#include "network_information_priv.h" +#include "network_state_information_priv.h" + +#if !TARGET_OS_SIMULATOR +#include "network_config_agent_info_priv.h" +#include "configAgentDefines.h" +#endif // !TARGET_OS_SIMULATOR static nwi_state_t G_nwi_state = NULL; static pthread_mutex_t nwi_store_lock = PTHREAD_MUTEX_INITIALIZER; @@ -42,18 +48,19 @@ static pthread_once_t initialized = PTHREAD_ONCE_INIT; static int nwi_store_token; static boolean_t nwi_store_force_refresh = FALSE; +static const char * client_proc_name = NULL; #pragma mark - #pragma mark Network information [nwi] client support -// Note: protected by __nwi_configuration_queue() +// Note: protected by __nwi_client_queue() static int nwi_active = 0; static libSC_info_client_t *nwi_client = NULL; static dispatch_queue_t -__nwi_configuration_queue() +__nwi_client_queue() { static dispatch_once_t once; static dispatch_queue_t q; @@ -81,43 +88,6 @@ _nwi_state_initialize(void) } } -static -void -_nwi_set_alias(nwi_state* state, nwi_ifstate* ifstate) -{ - nwi_ifstate* ifstate_alias; - int af = ifstate->af; - int af_alias; - - af_alias = (af == AF_INET)?AF_INET6:AF_INET; - - ifstate_alias = - nwi_state_get_ifstate_with_name(state, af_alias, - ifstate->ifname); - - if (ifstate_alias != NULL) { - ifstate_alias->af_alias = ifstate; - } - ifstate->af_alias = ifstate_alias; - return; -} - -static -void -_nwi_state_reset_alias(nwi_state_t state) { - int i; - - for (i = 0; i < state->ipv4_count; i++) { - state->nwi_ifstates[i].af_alias = NULL; - } - - for (i = state->ipv6_start; - i < state->ipv6_start + state->ipv6_count; i++) { - _nwi_set_alias(state, &state->nwi_ifstates[i]); - } -} - - #pragma mark - #pragma mark Network information [nwi] APIs @@ -135,11 +105,7 @@ _nwi_state_reset_alias(nwi_state_t state) { const char * nwi_state_get_notify_key() { -#if !TARGET_IPHONE_SIMULATOR return "com.apple.system.SystemConfiguration.nwi"; -#else // !TARGET_IPHONE_SIMULATOR - return "com.apple.iOS_Simulator.SystemConfiguration.nwi"; -#endif // !TARGET_IPHONE_SIMULATOR } #define ATOMIC_CMPXCHG(p, o, n) __sync_bool_compare_and_swap((p), (o), (n)) @@ -159,6 +125,53 @@ nwi_state_retain(nwi_state_t state) return; } +static void +_nwi_client_release() +{ + // release connection reference on 1-->0 transition + dispatch_sync(__nwi_client_queue(), ^{ + if (--nwi_active == 0) { + // if last reference, drop connection + libSC_info_client_release(nwi_client); + nwi_client = NULL; + } + }); +} + +static void +_nwi_client_init() +{ + dispatch_sync(__nwi_client_queue(), ^{ + if ((nwi_active++ == 0) || (nwi_client == NULL)) { + static dispatch_once_t once; + static const char *service_name = NWI_SERVICE_NAME; + + dispatch_once(&once, ^{ +#if DEBUG + const char *name; + + // get [XPC] service name + name = getenv(service_name); + if (name != NULL) { + service_name = strdup(name); + } +#endif // DEBUG + + // get process name + client_proc_name = getprogname(); + }); + + nwi_client = + libSC_info_client_create(__nwi_client_queue(), // dispatch queue + service_name, // XPC service name + "Network information"); // service description + if (nwi_client == NULL) { + --nwi_active; + } + } + }); +} + /* * Function: nwi_state_release * Purpose: @@ -172,19 +185,10 @@ nwi_state_release(nwi_state_t state) return; } - // release connection reference on 1-->0 transition - if (state->svr) { - dispatch_sync(__nwi_configuration_queue(), ^{ - if (--nwi_active == 0) { - // if last reference, drop connection - libSC_info_client_release(nwi_client); - nwi_client = NULL; - } - }); - } + _nwi_client_release(); // release nwi_state - free(state); + nwi_state_free(state); return; } @@ -193,37 +197,15 @@ static nwi_state * _nwi_state_copy_data() { nwi_state_t nwi_state = NULL; - static const char *proc_name = NULL; xpc_object_t reqdict; xpc_object_t reply; - dispatch_sync(__nwi_configuration_queue(), ^{ - if ((nwi_active++ == 0) || (nwi_client == NULL)) { - static dispatch_once_t once; - static const char *service_name = NWI_SERVICE_NAME; - - dispatch_once(&once, ^{ - const char *name; - - // get [XPC] service name - name = getenv(service_name); - if ((name != NULL) && (issetugid() == 0)) { - service_name = strdup(name); - } + if (!libSC_info_available()) { + os_log(OS_LOG_DEFAULT, "*** network information requested between fork() and exec()"); + return NULL; + } - // get process name - proc_name = getprogname(); - }); - - nwi_client = - libSC_info_client_create(__nwi_configuration_queue(), // dispatch queue - service_name, // XPC service name - "Network information"); // service description - if (nwi_client == NULL) { - --nwi_active; - } - } - }); + _nwi_client_init(); if ((nwi_client == NULL) || !nwi_client->active) { // if network information server not available @@ -234,12 +216,12 @@ _nwi_state_copy_data() reqdict = xpc_dictionary_create(NULL, NULL, 0); // set process name - if (proc_name != NULL) { - xpc_dictionary_set_string(reqdict, NWI_PROC_NAME, proc_name); + if (client_proc_name != NULL) { + xpc_dictionary_set_string(reqdict, NWI_PROC_NAME, client_proc_name); } // set request - xpc_dictionary_set_int64(reqdict, NWI_REQUEST, NWI_REQUEST_COPY); + xpc_dictionary_set_int64(reqdict, NWI_REQUEST, NWI_STATE_REQUEST_COPY); // send request to the DNS configuration server reply = libSC_send_message_with_reply_sync(nwi_client, reqdict); @@ -252,9 +234,15 @@ _nwi_state_copy_data() dataRef = xpc_dictionary_get_data(reply, NWI_CONFIGURATION, &dataLen); if (dataRef != NULL) { nwi_state = malloc(dataLen); - bcopy((void *)dataRef, nwi_state, dataLen); - nwi_state->ref = 0; - nwi_state->svr = TRUE; + memcpy(nwi_state, (void *)dataRef, dataLen); + if (nwi_state->version != NWI_STATE_VERSION) { + /* make sure the version matches */ + nwi_state_free(nwi_state); + nwi_state = NULL; + } + else { + nwi_state->ref = 0; + } } xpc_release(reply); @@ -263,6 +251,59 @@ _nwi_state_copy_data() return nwi_state; } +#if !TARGET_OS_SIMULATOR +/* + * Function: _nwi_config_agent_copy_data + * Purpose: + * Copy the config agent data and the data length. + * Caller must free the buffer. + */ +const void * +_nwi_config_agent_copy_data(const struct netagent *agent, uint64_t *length) +{ + const void *buffer = NULL; + xpc_object_t reqdict; + xpc_object_t reply; + + if ((agent == NULL) || (length == NULL)) { + return NULL; + } + + _nwi_client_init(); + + reqdict = xpc_dictionary_create(NULL, NULL, 0); + + xpc_dictionary_set_int64(reqdict, NWI_REQUEST, NWI_CONFIG_AGENT_REQUEST_COPY); + if (client_proc_name != NULL) { + xpc_dictionary_set_string(reqdict, NWI_PROC_NAME, client_proc_name); + } + + xpc_dictionary_set_uuid(reqdict, kConfigAgentAgentUUID, agent->netagent_uuid); + xpc_dictionary_set_string(reqdict, kConfigAgentType, agent->netagent_type); + + // send request to the NWI configuration server + reply = libSC_send_message_with_reply_sync(nwi_client, reqdict); + xpc_release(reqdict); + + if (reply != NULL) { + const void *xpc_buffer = NULL; + unsigned long len = 0; + + xpc_buffer = xpc_dictionary_get_data(reply, kConfigAgentAgentData, &len); + if ((xpc_buffer != NULL) && (len > 0)) { + buffer = malloc(len); + *length = len; + memcpy((void *)buffer, (void *)xpc_buffer, len); + } + xpc_release(reply); + } + + _nwi_client_release(); + + return buffer; +} +#endif // !TARGET_OS_SIMULATOR + /* * Function: nwi_state_copy * Purpose: @@ -285,7 +326,7 @@ nwi_state_copy(void) int check = 0; uint32_t status; - if (nwi_store_token_valid == FALSE) { + if (!nwi_store_token_valid) { /* have to throw cached copy away every time */ check = 1; } @@ -310,7 +351,6 @@ nwi_state_copy(void) if (G_nwi_state != NULL) { /* one reference for G_nwi_state */ nwi_state_retain(G_nwi_state); - _nwi_state_reset_alias(G_nwi_state); } } if (G_nwi_state != NULL) { @@ -336,6 +376,7 @@ nwi_state_copy(void) void _nwi_state_ack(nwi_state_t state, const char *bundle_id) { +#pragma unused(bundle_id) xpc_object_t reqdict; if (state == NULL) { @@ -347,7 +388,7 @@ _nwi_state_ack(nwi_state_t state, const char *bundle_id) return; } - dispatch_sync(__nwi_configuration_queue(), ^{ + dispatch_sync(__nwi_client_queue(), ^{ nwi_active++; // keep connection active (for the life of the process) }); @@ -355,7 +396,7 @@ _nwi_state_ack(nwi_state_t state, const char *bundle_id) reqdict = xpc_dictionary_create(NULL, NULL, 0); // set request - xpc_dictionary_set_int64(reqdict, NWI_REQUEST, NWI_REQUEST_ACKNOWLEDGE); + xpc_dictionary_set_int64(reqdict, NWI_REQUEST, NWI_STATE_REQUEST_ACKNOWLEDGE); // set generation xpc_dictionary_set_uint64(reqdict, NWI_GENERATION, state->generation_count); @@ -399,8 +440,7 @@ nwi_ifstate_get_generation(nwi_ifstate_t ifstate) const char * nwi_ifstate_get_ifname(nwi_ifstate_t ifstate) { - return (ifstate != NULL?ifstate->ifname:NULL); - + return ((ifstate != NULL) ? ifstate->ifname : NULL); } static uint64_t @@ -418,19 +458,27 @@ flags_from_af(int af) nwi_ifstate_flags nwi_ifstate_get_flags(nwi_ifstate_t ifstate) { - nwi_ifstate_t alias = ifstate->af_alias; + nwi_ifstate_t alias = NULL; nwi_ifstate_flags flags = 0ULL; + if (ifstate->af_alias_offset != 0) { + alias = ifstate + ifstate->af_alias_offset; + } 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; } @@ -460,9 +508,12 @@ nwi_state_get_first_ifstate(nwi_state_t state, int af) } ifstate = nwi_state_get_ifstate_with_index(state, af, 0); + if (ifstate == NULL) { + return NULL; + } if ((ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0) { - ifstate = NULL; + ifstate = NULL; } return ifstate; @@ -497,31 +548,25 @@ nwi_state_get_ifstate(nwi_state_t state, const char * ifname) * Returns the next, lower priority nwi_ifstate_t after the specified * 'ifstate' for the protocol family 'af'. * - * Returns NULL when the end of the list is reached. + * Returns NULL when the end of the list is reached, or we reach an + * item that is not in the list. */ nwi_ifstate_t nwi_ifstate_get_next(nwi_ifstate_t ifstate, int af) { - nwi_ifstate_t alias, next; - - alias = - (af == ifstate->af)?ifstate:ifstate->af_alias; - - if (alias == NULL) { - return NULL; + ifstate = nwi_ifstate_get_alias(ifstate, af); + if (ifstate == NULL + || ((ifstate->flags + & (NWI_IFSTATE_FLAGS_NOT_IN_LIST + | NWI_IFSTATE_FLAGS_LAST_ITEM)) + != 0)) { + return (NULL); } - - /* We don't return interfaces marked rank never */ - if ((alias->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0) { - return NULL; + ifstate++; + if ((ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0) { + return (NULL); } - - next = ++alias; - - if ((next->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) == 0) { - return next; - } - return NULL; + return (ifstate); } /* @@ -671,7 +716,7 @@ nwi_ifstate_get_signature(nwi_ifstate_t ifstate, int af, int * length) break; case AF_INET: case AF_INET6: - i_state = (ifstate->af == af) ? ifstate : ifstate->af_alias; + i_state = nwi_ifstate_get_alias(ifstate, af); break; default: break; @@ -695,12 +740,13 @@ _nwi_ifstate_is_in_list(nwi_ifstate_t ifstate, int af) { nwi_ifstate_t i_state; - i_state = (ifstate->af == af) ? ifstate : ifstate->af_alias; + i_state = nwi_ifstate_get_alias(ifstate, af); if (i_state == NULL) { return FALSE; } - if ((nwi_ifstate_get_flags(i_state) & NWI_IFSTATE_FLAGS_NOT_IN_LIST) == 0) { + if ((nwi_ifstate_get_flags(i_state) & NWI_IFSTATE_FLAGS_NOT_IN_LIST) + == 0) { return TRUE; } @@ -737,7 +783,7 @@ nwi_ifstate_get_dns_signature(nwi_ifstate_t ifstate, int * length) return NULL; } - if (_nwi_ifstate_is_in_list(ifstate, AF_INET) == TRUE) { + if (_nwi_ifstate_is_in_list(ifstate, AF_INET)) { signature = v4_signature; *length = v4_signature_len; } else { @@ -755,24 +801,322 @@ nwi_ifstate_get_dns_signature(nwi_ifstate_t ifstate, int * length) return signature; } +unsigned int +nwi_state_get_interface_names(nwi_state_t state, + const char * names[], + unsigned int names_count) +{ + int i; + nwi_ifindex_t * scan; + + if (names == NULL || names_count == 0) { + return (state->if_list_count); + } + for (i = 0, scan = nwi_state_if_list(state); + i < state->if_list_count; i++, scan++) { + names[i] = state->ifstate_list[*scan].ifname; + } + return (state->if_list_count); +} #pragma mark - #pragma mark Network information [nwi] test code -#ifdef MAIN +#ifdef TEST_NWI -int -main(int argc, char **argv) +#include + +typedef union { + const struct sockaddr * sa; + const struct sockaddr_in * sin; + const struct sockaddr_in6 * sin6; +} my_sockaddr_t; + +static const char * +my_sockaddr_ntop(const struct sockaddr * sa, char * buf, int buf_len) +{ + my_sockaddr_t addr; + const void * addr_ptr = NULL; + + addr.sa = sa; + switch (sa->sa_family) { + case AF_INET: + addr_ptr = &addr.sin->sin_addr; + break; + case AF_INET6: + addr_ptr = &addr.sin6->sin6_addr; + break; + default: + addr_ptr = NULL; + break; + } + if (addr_ptr == NULL) { + return (NULL); + } + return (inet_ntop(addr.sa->sa_family, addr_ptr, buf, buf_len)); +} + +static void +nwi_ifstate_print(nwi_ifstate_t ifstate) +{ + const char * addr_str; + void * address; + char addr_ntopbuf[INET6_ADDRSTRLEN]; + const char * diff_str; + char vpn_ntopbuf[INET6_ADDRSTRLEN]; + const struct sockaddr * vpn_addr; + const char * vpn_addr_str = NULL; + + address = nwi_ifstate_get_address(ifstate); + addr_str = inet_ntop(ifstate->af, address, + addr_ntopbuf, sizeof(addr_ntopbuf)); + vpn_addr = nwi_ifstate_get_vpn_server(ifstate); + if (vpn_addr != NULL) { + vpn_addr_str = my_sockaddr_ntop(vpn_addr, vpn_ntopbuf, + sizeof(vpn_ntopbuf)); + } + diff_str = nwi_ifstate_get_diff_str(ifstate); + 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" : "", + (ifstate->flags & NWI_IFSTATE_FLAGS_HAS_CLAT46) != 0 + ? " clat46" : "", + (ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0 + ? " never" : "", + ifstate->rank, + addr_str, + (vpn_addr_str != NULL) ? " vpn_server_addr: " : "", + (vpn_addr_str != NULL) ? vpn_addr_str : "", + ifstate->reach_flags); + return; +} + +static void +traverse_ifstates(nwi_state_t state) +{ + nwi_ifstate_t alias; + int i; + nwi_ifstate_t scan; + + scan = nwi_state_get_first_ifstate(state, AF_INET); + printf("IPv4 traverse list:\n"); + for (i = 0; scan != NULL; i++) { + printf("[%d] flags=0x%llx ", i, scan->flags); + nwi_ifstate_print(scan); + alias = nwi_ifstate_get_alias(scan, nwi_other_af(scan->af)); + scan = nwi_ifstate_get_next(scan, AF_INET); + if (alias != NULL) { + printf("\t alias is "); + nwi_ifstate_print(alias); + } + } + printf("IPv6 traverse list:\n"); + scan = nwi_state_get_first_ifstate(state, AF_INET6); + for (i = 0; scan != NULL; i++) { + printf("[%d] flags=0x%llx ", i, scan->flags); + alias = nwi_ifstate_get_alias(scan, nwi_other_af(scan->af)); + nwi_ifstate_print(scan); + scan = nwi_ifstate_get_next(scan, AF_INET6); + if (alias != NULL) { + printf("\t alias is "); + nwi_ifstate_print(alias); + } + } +} + +static void +nwi_state_print_common(nwi_state_t state, bool diff) { - dns_config_t *config; + unsigned int count = 0; + int i; + nwi_ifstate_t scan; - config = dns_configuration_copy(); - if (config != NULL) { - dns_configuration_free(&config); + if (state == NULL) { + return; + } + printf("nwi_state = { " + "gen=%llu max_if=%u #v4=%u #v6=%u " + "reach_flags=(v4=0x%x, v6=0x%x) }\n", + state->generation_count, + state->max_if_count, + state->ipv4_count, + state->ipv6_count, + nwi_state_get_reachability_flags(state, AF_INET), + nwi_state_get_reachability_flags(state, AF_INET6)); + if (state->ipv4_count) { + printf("IPv4:\n"); + for (i = 0, scan = nwi_state_ifstate_list(state, AF_INET); + i < state->ipv4_count; i++, scan++) { + printf("[%d] ", i); + nwi_ifstate_print(scan); + } } + if (state->ipv6_count) { + printf("IPv6:\n"); + for (i = 0, scan = nwi_state_ifstate_list(state, AF_INET6); + i < state->ipv6_count; i++, scan++) { + printf("[%d] ", i); + nwi_ifstate_print(scan); + } + } + if (!diff) { + count = nwi_state_get_interface_names(state, NULL, 0); + if (count > 0) { + const char * names[count]; + + count = nwi_state_get_interface_names(state, names, + count); + printf("%d interfaces%s", count, + (count != 0) ? ": " : ""); + for (i = 0; i < count; i++) { + printf("%s%s", (i == 0) ? "" : ", ", names[i]); + } + printf("\n"); + } + else { + printf("0 interfaces\n"); + } + traverse_ifstates(state); + } + printf("-----------------------------------\n"); + return; +} + +static void +nwi_state_print(nwi_state_t state) +{ + nwi_state_print_common(state, FALSE); +} + +static void +nwi_state_print_diff(nwi_state_t state) +{ + printf("DIFF\n"); + nwi_state_print_common(state, TRUE); +} + +static void +doit(void) +{ + struct in_addr addr = { 0 }; + struct in6_addr addr6; + nwi_ifstate_t ifstate; + nwi_state_t state; + nwi_state_t diff_state; + nwi_state_t new_state; + nwi_state_t old_state; + nwi_state_t old_state_copy; + + state = nwi_state_new(NULL, 0); + nwi_state_print(state); + state = nwi_state_new(NULL, 1); + nwi_state_print(state); + state = nwi_state_new(state, 2); + nwi_state_print(state); + state = nwi_state_new(state, 10); + nwi_state_print(state); + + memset(&addr6, 0, sizeof(addr6)); + /* populate old_state */ + old_state = nwi_state_new(NULL, 5); + for (int i = 0; i < 5; i++) { + char ifname[IFNAMSIZ]; + + snprintf(ifname, sizeof(ifname), "en%d", i); + addr.s_addr = htonl((i % 2) ? i : (i + 1)); + ifstate = nwi_state_add_ifstate(old_state, ifname, AF_INET, 0, + (i % 2) ? (i - 1) : (i + 1), + &addr, + NULL, + 0); + addr6.__u6_addr.__u6_addr32[0] = htonl(i); + ifstate = nwi_state_add_ifstate(old_state, ifname, AF_INET6, 0, + (i % 2) ? (10 - i) : i, + &addr6, + NULL, + 0); + } + nwi_state_finalize(old_state); + nwi_state_print(old_state); + + diff_state = nwi_state_diff(NULL, old_state); + nwi_state_print_diff(diff_state); + nwi_state_free(diff_state); + + /* remember the old state */ + old_state_copy = nwi_state_make_copy(old_state); + + /* create new state */ + new_state = nwi_state_new(old_state, 10); + nwi_state_print(new_state); + + for (int i = 0; i < 10; i++) { + char ifname[IFNAMSIZ]; + uint64_t flags; + + snprintf(ifname, sizeof(ifname), "en%d", i); + addr6.__u6_addr.__u6_addr32[0] = htonl(i); + flags = (i > 6) ? NWI_IFSTATE_FLAGS_NOT_IN_LIST : 0; + ifstate = nwi_state_add_ifstate(new_state, ifname, AF_INET6, + flags, + i, + &addr6, + NULL, + 0); + } + for (int i = 9; i >= 0; i--) { + char ifname[IFNAMSIZ]; + + snprintf(ifname, sizeof(ifname), "en%d", i); + addr.s_addr = htonl(i); + if (i != 3) { + ifstate = nwi_state_add_ifstate(new_state, + ifname, AF_INET, + 0, + i, + &addr, + NULL, + 0); + } + } + nwi_state_finalize(new_state); + nwi_state_print(new_state); + + diff_state = nwi_state_diff(old_state_copy, new_state); + nwi_state_print_diff(diff_state); + nwi_state_free(diff_state); + + diff_state = nwi_state_diff(new_state, old_state_copy); + nwi_state_print_diff(diff_state); + nwi_state_free(diff_state); + + nwi_state_free(old_state_copy); + nwi_state_free(new_state); + return; +} + +int +main() +{ + doit(); + exit(0); + return (0); +} + +#endif /* TEST_NWI */ + +#ifdef TEST_NWI_STATE + +int +main(int argc, char * argv[]) +{ + nwi_state_t state = nwi_state_copy(); exit(0); + return (0); } #endif diff --git a/src/configd/nwi/network_information.h b/src/configd/nwi/network_information.h index 7c364fcd2..3ca3d04fb 100644 --- a/src/configd/nwi/network_information.h +++ b/src/configd/nwi/network_information.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2019 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,6 +25,7 @@ #ifndef _NETWORK_INFORMATION_H_ #define _NETWORK_INFORMATION_H_ +#include #include #include @@ -36,7 +37,8 @@ __BEGIN_DECLS /* * Function: nwi_state_copy * Purpose: - * Returns the current network state information. + * Returns the current network state information; NULL if no state + * information is currently available. * Release after use by calling nwi_state_release(). */ nwi_state_t @@ -130,6 +132,7 @@ nwi_ifstate_get_ifname(nwi_ifstate_t ifstate); #define NWI_IFSTATE_FLAGS_HAS_IPV4 0x1 /* has IPv4 connectivity */ #define NWI_IFSTATE_FLAGS_HAS_IPV6 0x2 /* has IPv6 connectivity */ #define NWI_IFSTATE_FLAGS_HAS_DNS 0x4 /* has DNS configured */ +#define NWI_IFSTATE_FLAGS_HAS_CLAT46 0x0040 /* has CLAT46 configured */ typedef uint64_t nwi_ifstate_flags; /* @@ -174,12 +177,12 @@ 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)); /* - * nwi_state_get_reachability_flags - * - * returns the global reachability flags for a given address family. + * Function: nwi_state_get_reachability_flags + * Purpose: + * Returns the global reachability flags for a given address family. * If no address family is passed in, it returns the global reachability * flags for either families. * @@ -208,6 +211,32 @@ _nwi_state_ack(nwi_state_t state, const char *bundle_id) uint32_t nwi_state_get_reachability_flags(nwi_state_t nwi_state, int af); +/* + * Function: nwi_state_get_interface_names + * Purpose: + * Returns the list of network interface names that have connectivity. + * The list is sorted from highest priority to least, highest priority + * appearing at index 0. + * + * If 'names' is NULL or 'names_count' is zero, this function returns + * the number of elements that 'names' must contain to get the complete + * list of interface names. + * + * If 'names' is not NULL and 'names_count' is not zero, fills 'names' with + * the list of interface names not exceeding 'names_count'. Returns the + * number of elements that were actually populated. + * + * Notes: + * 1. The connectivity that an interface in this list provides may not be for + * general purpose use. + * 2. The string pointers remain valid only as long as 'state' remains + * valid. + */ +unsigned int +nwi_state_get_interface_names(nwi_state_t state, + const char * names[], + unsigned int names_count); + /* * nwi_ifstate_get_vpn_server * diff --git a/src/configd/nwi/network_information_internal.h b/src/configd/nwi/network_information_internal.h new file mode 100644 index 000000000..f6cf2063f --- /dev/null +++ b/src/configd/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/src/configd/nwi/network_information_priv.c b/src/configd/nwi/network_information_priv.c deleted file mode 100644 index 0edee36a1..000000000 --- a/src/configd/nwi/network_information_priv.c +++ /dev/null @@ -1,552 +0,0 @@ -/* - * Copyright (c) 2011-2013 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@ - */ - -#include -#include -#include -#include -#include -#include -#include -#include "network_information_priv.h" -#include -#include - -__private_extern__ -const sa_family_t nwi_af_list[] = {AF_INET, AF_INET6}; - -static __inline__ size_t -nwi_state_compute_size(unsigned int n) -{ - return (offsetof(nwi_state, nwi_ifstates[n])); - -} -__private_extern__ -nwi_state_t -nwi_state_copy_priv(nwi_state_t src) -{ - nwi_state_t dest = NULL; - - if (src == NULL) { - return dest; - } - - dest = malloc(src->size); - - if (dest != NULL) { - bcopy(src, dest, src->size); - - dest->ref = 1; - dest->svr = FALSE; - } - return dest; -} - -__private_extern__ -nwi_state_t -nwi_state_new(nwi_state_t old_state, int elems) -{ - nwi_state_t state = NULL; - uint32_t new_size; - - if (old_state == NULL && elems == 0) { - return NULL; - } - - /* Need to insert a last node for each of the v4/v6 list */ - new_size = (elems != 0) - ? (uint32_t)(sizeof(nwi_state) + nwi_state_compute_size((elems+1) * 2)) - : 0; - - /* Should we reallocate? */ - if (old_state != NULL) { - if (old_state->size >= new_size) { - return (old_state); - } - } - - state = malloc(new_size); - bzero(state, new_size); - state->size = new_size; - - /* - * v4 list is stored 0 to elems, - * v6 list is stored elems + 1 to 2 * elems + 2 - */ - state->ipv6_start = elems + 1; - - if (old_state != NULL) { - state->ipv6_count = old_state->ipv6_count; - if (state->ipv6_count > 0) { - bcopy((void*) &old_state->nwi_ifstates[old_state->ipv6_start], - (void*) &state->nwi_ifstates[state->ipv6_start], - old_state->ipv6_count * sizeof(nwi_ifstate)); - } - - state->ipv4_count = old_state->ipv4_count; - if (state->ipv4_count > 0) { - bcopy((void*) old_state->nwi_ifstates, - (void*) state->nwi_ifstates, - old_state->ipv4_count * sizeof(nwi_ifstate)); - } - - free(old_state); - } else { - state->ipv4_count = 0; - state->ipv6_count = 0; - } - nwi_state_set_last(state, AF_INET); - nwi_state_set_last(state, AF_INET6); - - state->ref = 1; - state->svr = FALSE; - return state; -} - -static __inline__ -nwi_ifstate_t -nwi_ifstate_get_last(nwi_state_t state, int af, uint32_t** last) -{ - uint32_t* count; - int idx; - - assert(state != NULL); - - count = (af == AF_INET) ? &state->ipv4_count - : &state->ipv6_count; - - idx = (af == AF_INET) ? state->ipv4_count - : (state->ipv6_start + state->ipv6_count); - - *last = count; - - return &state->nwi_ifstates[idx]; -} - -__private_extern__ -void -nwi_ifstate_set_signature(nwi_ifstate_t ifstate, uint8_t * signature) -{ - bcopy(signature, ifstate->signature, sizeof(ifstate->signature)); - ifstate->flags |= NWI_IFSTATE_FLAGS_HAS_SIGNATURE; - return; -} - -__private_extern__ -nwi_ifstate_t -nwi_insert_ifstate(nwi_state_t state, - const char * ifname, int af, - uint64_t flags, Rank rank, - void * ifa, - struct sockaddr * vpn_server_addr, - uint32_t reach_flags) -{ - nwi_ifstate_t ifstate; - - /* Will only insert unique elements in the list */ - ifstate = nwi_state_get_ifstate_with_name(state, af, ifname); - - /* Already present, just ignore it */ - if (ifstate != NULL) { - if (ifstate->rank < rank) { - return NULL; - } - } - - if (ifstate == NULL) { - uint32_t *last; - - /* We need to append it as the last element */ - ifstate = nwi_ifstate_get_last(state, af, &last); - bzero(ifstate, sizeof(*ifstate)); - strlcpy(ifstate->ifname, ifname, sizeof(ifstate->ifname)); - ifstate->af = af; - (*last)++; - } - - /* We need to update the address/rank/flag fields for the existing/new - * element */ - if (ifa != NULL) { - switch (af) { - case AF_INET: - ifstate->iaddr = *((struct in_addr *) ifa); - break; - case AF_INET6: - ifstate->iaddr6 = *((struct in6_addr *) ifa); - break; - default: - break; - } - - } - - if (vpn_server_addr != NULL && vpn_server_addr->sa_family != 0) { - _nwi_ifstate_set_vpn_server(ifstate, vpn_server_addr); - } else { - _nwi_ifstate_set_vpn_server(ifstate, NULL); - } - - ifstate->reach_flags = reach_flags; - ifstate->rank = rank; - ifstate->flags = flags; - - return ifstate; -} - -__private_extern__ -void -nwi_state_clear(nwi_state_t state, int af) -{ - uint32_t* count; - - count = (af == AF_INET) - ?&state->ipv4_count:&state->ipv6_count; - - *count = 0; - nwi_state_set_last(state, af); - return; - -} - -__private_extern__ -void -nwi_state_set_last(nwi_state_t state, int af) -{ - int last_elem_idx; - - if (state == NULL) { - return; - } - - /* The last element is an element with the flags set as - * NWI_IFSTATE_FLAGS_NOT_IN_LIST */ - last_elem_idx = (af == AF_INET) ? state->ipv4_count - : (state->ipv6_start + state->ipv6_count); - - state->nwi_ifstates[last_elem_idx].ifname[0] = '\0'; - state->nwi_ifstates[last_elem_idx].flags = NWI_IFSTATE_FLAGS_NOT_IN_LIST; -} - -#define unchanged "" -#define added "+" -#define deleted "-" -#define changed "!" -#define rank_change "R" - -__private_extern__ -void * -nwi_ifstate_get_address(nwi_ifstate_t ifstate) -{ - return (void *)&ifstate->iaddr; -} - -__private_extern__ -const char * -nwi_ifstate_get_diff_str(nwi_ifstate_t ifstate) -{ - if (strcmp(ifstate->diff_str, rank_change) == 0) { - return changed; - } - return ifstate->diff_str; -} - -static -inline -boolean_t -nwi_ifstate_has_changed(nwi_ifstate_t ifstate1, nwi_ifstate_t ifstate2) -{ - if (ifstate1->flags != ifstate2->flags) { - return TRUE; - } - - if (ifstate1->af == AF_INET) { - if (memcmp(&ifstate1->iaddr, &ifstate2->iaddr, sizeof(struct in_addr)) != 0) { - return TRUE; - } - } else { - if (memcmp(&ifstate1->iaddr6, &ifstate2->iaddr6, sizeof(struct in6_addr)) != 0) { - return TRUE; - } - } - return FALSE; -} - -static -inline -nwi_ifstate_t -nwi_ifstate_append(nwi_state_t state, nwi_ifstate_t scan) -{ - nwi_ifstate_t new_ifstate = NULL; - uint32_t *last; - - new_ifstate = nwi_ifstate_get_last(state, scan->af, &last); - memcpy(new_ifstate, scan, sizeof(*scan)); - (*last)++; - return new_ifstate; -} - -static -inline -void -nwi_ifstate_set_diff_str(nwi_ifstate_t ifstate, const char *diff_str) -{ - ifstate->diff_str = diff_str; -} - -static -void -nwi_ifstate_set_added_or_changed_str(nwi_state_t state, nwi_state_t old_state, nwi_ifstate_t ifstate) -{ - nwi_ifstate_t existing_ifstate, new_ifstate; - - existing_ifstate = nwi_state_get_ifstate_with_name(old_state, - ifstate->af, - nwi_ifstate_get_ifname(ifstate)); - - /* Add the element that is not in the store */ - new_ifstate = nwi_ifstate_append(state, ifstate); - - /* These are potentially "added" elements unless they are - * in the old list */ - nwi_ifstate_set_diff_str(new_ifstate, added); - - if (existing_ifstate != NULL) { - if (nwi_ifstate_has_changed(existing_ifstate, new_ifstate) == TRUE) { - nwi_ifstate_set_diff_str(new_ifstate, changed); - } else if (existing_ifstate->rank != new_ifstate->rank) { - nwi_ifstate_set_diff_str(new_ifstate, rank_change); - } else { - nwi_ifstate_set_diff_str(new_ifstate, unchanged); - } - } - return; -} - -static -void -nwi_ifstate_set_removed_str(nwi_state_t state, nwi_ifstate_t ifstate) -{ - nwi_ifstate_t existing_ifstate; - - existing_ifstate = nwi_state_get_ifstate_with_name(state, - ifstate->af, - nwi_ifstate_get_ifname(ifstate)); - - /* Any elements that has not been added means that they are removed */ - if (existing_ifstate == NULL) { - nwi_ifstate_t new_ifstate = nwi_ifstate_append(state, ifstate); - nwi_ifstate_set_diff_str(new_ifstate, deleted); - } - return; -} - -static -void -nwi_state_merge_added(nwi_state_t state, nwi_state_t old_state, - nwi_state_t new_state) -{ - int i; - nwi_ifstate_t scan; - - if (new_state == NULL) { - return; - } - - if (new_state->ipv4_count) { - for (i = 0, scan = new_state->nwi_ifstates; - i < new_state->ipv4_count; i++, scan++) { - nwi_ifstate_set_added_or_changed_str(state, old_state, scan); - } - nwi_state_set_last(state, AF_INET); - } - - if (new_state->ipv6_count) { - for (i = 0, scan = new_state->nwi_ifstates + new_state->ipv6_start; - i < new_state->ipv6_count; i++, scan++) { - nwi_ifstate_set_added_or_changed_str(state, old_state, scan); - } - nwi_state_set_last(state, AF_INET6); - } - return; -} - -void -nwi_state_merge_removed(nwi_state_t state, nwi_state_t old_state) -{ - int i; - nwi_ifstate_t scan; - - if (old_state == NULL) { - return; - } - - if (old_state->ipv4_count) { - for (i = 0, scan = old_state->nwi_ifstates; - i < old_state->ipv4_count; i++, scan++) { - nwi_ifstate_set_removed_str(state, scan); - } - nwi_state_set_last(state, AF_INET); - } - - if (old_state->ipv6_count) { - for (i = 0, scan = old_state->nwi_ifstates + old_state->ipv6_start; - i < old_state->ipv6_count; i++, scan++) { - nwi_ifstate_set_removed_str(state, scan); - } - nwi_state_set_last(state, AF_INET6); - } - return; -} - -__private_extern__ -nwi_state_t -nwi_state_diff(nwi_state_t old_state, nwi_state_t new_state) -{ - nwi_state_t diff; - int total_count = 0; - - if (old_state != NULL) { - total_count = old_state->ipv4_count + old_state->ipv6_count; - } - - if (new_state != NULL) { - total_count += new_state->ipv4_count + new_state->ipv6_count; - } - - if (total_count == 0) { - return NULL; - } - - diff = nwi_state_new(NULL, total_count); - - nwi_state_merge_added(diff, old_state, new_state); - nwi_state_merge_removed(diff, old_state); - - /* Diff consists of a nwi_state_t with annotated diff_str's */ - return diff; -} - -static __inline__ -void -_nwi_ifstate_set_generation(nwi_ifstate_t ifstate, uint64_t generation_count) -{ - ifstate->if_generation_count = generation_count; - - return; -} - -static -boolean_t -_nwi_ifstate_has_changed(nwi_state_t state, const char * ifname) -{ - nwi_ifstate_t ifstate; - - /* If either the v4 ifstate or the v6 ifstate - * has changed, then report that the interface has changed */ - ifstate = nwi_state_get_ifstate_with_name(state, - AF_INET, - ifname); - - if (ifstate != NULL - && ifstate->diff_str != NULL - && strcmp(ifstate->diff_str, unchanged) != 0 - && strcmp(ifstate->diff_str, rank_change) != 0) { - return (TRUE); - } - - ifstate = nwi_state_get_ifstate_with_name(state, - AF_INET6, - ifname); - - if (ifstate != NULL - && ifstate->diff_str != NULL - && strcmp(ifstate->diff_str, unchanged) != 0 - && strcmp(ifstate->diff_str, rank_change) != 0) { - return (TRUE); - } - return (FALSE); -} - -__private_extern__ -void -_nwi_state_update_interface_generations(nwi_state_t old_state, nwi_state_t state, nwi_state_t changes) -{ - int i; - uint64_t generation_count; - nwi_ifstate_t scan; - - if (state == NULL || changes == NULL) { - return; - } - - /* cache the generation count */ - generation_count = state->generation_count; - - if (state->ipv4_count) { - for (i = 0, scan = state->nwi_ifstates; - i < state->ipv4_count; i++, scan++) { - if (_nwi_ifstate_has_changed(changes, scan->ifname) == TRUE) { - /* Update the interface generation count */ - _nwi_ifstate_set_generation(scan, generation_count); - } else { - nwi_ifstate_t old_ifstate; - - old_ifstate = nwi_state_get_ifstate_with_name(old_state, - AF_INET, - scan->ifname); - - /* Set the current generation count */ - _nwi_ifstate_set_generation(scan, - old_ifstate->if_generation_count); - } - } - } - - if (state->ipv6_count) { - for (i = 0, scan = state->nwi_ifstates + state->ipv6_start; - i < state->ipv6_count; i++, scan++) { - /* The generation count has been already updated in - * the ipv4 case, just skip it. */ - if (nwi_ifstate_get_generation(scan) == - generation_count) { - continue; - } - if (_nwi_ifstate_has_changed(changes, scan->ifname) == TRUE) { - /* update the interface generation count */ - _nwi_ifstate_set_generation(scan, generation_count); - } else { - nwi_ifstate_t old_ifstate; - - old_ifstate = nwi_state_get_ifstate_with_name(old_state, - AF_INET6, - scan->ifname); - assert(old_ifstate != NULL); - - /* Set the current generation count */ - _nwi_ifstate_set_generation(scan, - old_ifstate->if_generation_count); - } - } - } - return; -} diff --git a/src/configd/nwi/network_information_server.c b/src/configd/nwi/network_information_server.c index 41bec2cba..805798c54 100644 --- a/src/configd/nwi/network_information_server.c +++ b/src/configd/nwi/network_information_server.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012-2014 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,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@ */ @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -39,8 +40,20 @@ #include "libSystemConfiguration_server.h" #include -#include "network_information_priv.h" +#include "network_information_internal.h" #include "network_information_server.h" +#include "network_state_information_priv.h" + +#if !TARGET_OS_SIMULATOR +#include "agent-monitor.h" +#include "configAgentDefines.h" +#include "network_config_agent_info_priv.h" +#endif // !TARGET_OS_SIMULATOR + +#ifdef SC_LOG_HANDLE +#include +os_log_t SC_LOG_HANDLE(void); +#endif //SC_LOG_HANDLE #pragma mark - @@ -55,14 +68,6 @@ static libSC_info_server_t S_nwi_info; -/* - * S_debug - * A boolean that enables additional logging. - */ -static Boolean *S_debug = NULL; -static SCLoggerRef S_logger = NULL; - - /* * S_sync_handler * ACK (in-sync or not-in-sync) updates should be posted using @@ -77,21 +82,6 @@ static _nwi_sync_handler_t S_sync_handler = NULL; #pragma mark Support functions -#ifdef NOT_YET_NEEDED -static void -log_xpc_object(const char *msg, xpc_object_t obj) -{ - char *desc; - - desc = xpc_copy_description(obj); - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, "%s = %s", msg, desc); - } - free(desc); -} -#endif - - #pragma mark - #pragma mark Network information server "main" @@ -123,37 +113,33 @@ _nwi_state_copy(xpc_connection_t connection, xpc_object_t request) { CFDataRef data; uint64_t generation; + const char *proc_name; xpc_connection_t remote; xpc_object_t reply; remote = xpc_dictionary_get_remote_connection(request); reply = xpc_dictionary_create_reply(request); if (reply == NULL) { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p> _nwi_state_copy: xpc_dictionary_create_reply: failed"), - connection); + SC_log(LOG_ERR, "<%p> _nwi_state_copy: xpc_dictionary_create_reply: failed", + connection); return; } // extract data and generation # data = _libSC_info_server_get_data(&S_nwi_info, connection, &generation); - if (*S_debug) { - const char *proc_name; - - // extract process name - proc_name = xpc_dictionary_get_string(request, NWI_PROC_NAME); - if (proc_name == NULL) { - proc_name = "???"; - } - - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%s[%d]> Network information copy: %llu"), - connection, - proc_name, - xpc_connection_get_pid(connection), - generation); + // extract process name + proc_name = xpc_dictionary_get_string(request, NWI_PROC_NAME); + if (proc_name == NULL) { + proc_name = "???"; } + SC_log(LOG_DEBUG, "<%p:%s[%d]> Network information copy: %llu", + connection, + proc_name, + xpc_connection_get_pid(connection), + generation); + // return the Network information (if available) if (data != NULL) { xpc_dictionary_set_data(reply, @@ -186,26 +172,96 @@ _nwi_state_acknowledge(xpc_connection_t connection, xpc_object_t request) generation = xpc_dictionary_get_uint64(request, NWI_GENERATION); - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> Network information ack: %llu"), - connection, - xpc_connection_get_pid(connection), - generation); - } + SC_log(LOG_DEBUG, "<%p:%d> Network information ack: %llu", + connection, + xpc_connection_get_pid(connection), + generation); - _libSC_info_server_acknowledged(&S_nwi_info, connection, generation); changed = _libSC_info_server_acknowledged(&S_nwi_info, connection, generation); if (changed) { Boolean inSync; // report change inSync = _libSC_info_server_in_sync(&S_nwi_info); - S_sync_handler(inSync); + if (S_sync_handler != NULL) { + S_sync_handler(inSync); + } } return; } +#if !TARGET_OS_SIMULATOR +/* + * _nwi_config_agent_copy + * + * Called when a client wants a copy of the agent data + * + * - caller must be running on the _nwi_server_queue() + */ +static void +_nwi_config_agent_copy(xpc_connection_t connection, xpc_object_t request) +{ + const void *buffer = NULL; + const char *proc_name = NULL; + uint64_t length = 0; + xpc_connection_t remote; + xpc_object_t reply = NULL; + + remote = xpc_dictionary_get_remote_connection(request); + reply = xpc_dictionary_create_reply(request); + + uuid_t agent_uuid; + const uint8_t *agent_uuid_value = xpc_dictionary_get_uuid(request, kConfigAgentAgentUUID); + if (agent_uuid_value != NULL) { + uuid_copy(agent_uuid, agent_uuid_value); + } else { + goto done; + } + + const char *agent_type = xpc_dictionary_get_string(request, kConfigAgentType); + if (agent_type == NULL) { + goto done; + } + + proc_name = xpc_dictionary_get_string(request, NWI_PROC_NAME); + if (proc_name == NULL) { + proc_name = "???"; + } + + SC_log(LOG_DEBUG, "<%p:%s[%d]> Config agent information copy", + connection, + proc_name, + xpc_connection_get_pid(connection)); + + if (strcmp(agent_type, kConfigAgentTypeDNS) == 0) { + buffer = copy_dns_information_for_agent_uuid(agent_uuid, &length); + } else if (strcmp(agent_type, kConfigAgentTypeProxy) == 0) { + buffer = copy_proxy_information_for_agent_uuid(agent_uuid, &length); + } + + if (buffer != NULL && length > 0) { + xpc_dictionary_set_data(reply, + kConfigAgentAgentData, + buffer, + (size_t)length); + } + + xpc_connection_send_message(remote, reply); + +done: + if (reply != NULL) { + xpc_release(reply); + } + + if (buffer != NULL) { + free((void *)buffer); + } + + return; +} +#endif // !TARGET_OS_SIMULATOR + static void process_request(xpc_connection_t connection, xpc_object_t request) @@ -214,25 +270,33 @@ process_request(xpc_connection_t connection, xpc_object_t request) op = xpc_dictionary_get_int64(request, NWI_REQUEST); switch (op) { - case NWI_REQUEST_COPY : + case NWI_STATE_REQUEST_COPY : /* * Return the Network information */ _nwi_state_copy(connection, request); break; - case NWI_REQUEST_ACKNOWLEDGE : + case NWI_STATE_REQUEST_ACKNOWLEDGE : /* * Acknowlege a [processed] Network information */ _nwi_state_acknowledge(connection, request); break; +#if !TARGET_OS_SIMULATOR + case NWI_CONFIG_AGENT_REQUEST_COPY : + /* + * Return the agent information + */ + _nwi_config_agent_copy(connection, request); + + break; +#endif // !TARGET_OS_SIMULATOR default : - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p> unknown request : %lld"), - connection, - op); + SC_log(LOG_ERR, "<%p> unknown request : %lld", + connection, + op); break; } @@ -244,11 +308,9 @@ process_request(xpc_connection_t connection, xpc_object_t request) static void process_new_connection(xpc_connection_t c) { - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> Network information session: open"), - c, - xpc_connection_get_pid(c)); - } + SC_log(LOG_DEBUG, "<%p:%d> Network information session: open", + c, + xpc_connection_get_pid(c)); _libSC_info_server_open(&S_nwi_info, c); @@ -269,11 +331,9 @@ process_new_connection(xpc_connection_t c) if (xobj == XPC_ERROR_CONNECTION_INVALID) { Boolean changed; - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> Network information session: close"), - c, - xpc_connection_get_pid(c)); - } + SC_log(LOG_DEBUG, "<%p:%d> Network information session: close", + c, + xpc_connection_get_pid(c)); changed = _libSC_info_server_close(&S_nwi_info, c); if (changed) { @@ -281,31 +341,30 @@ process_new_connection(xpc_connection_t c) // report change inSync = _libSC_info_server_in_sync(&S_nwi_info); - S_sync_handler(inSync); + if (S_sync_handler != NULL) { + S_sync_handler(inSync); + } } } else if (xobj == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> %s"), - c, - xpc_connection_get_pid(c), - desc); + SC_log(LOG_ERR, "<%p:%d> %s", + c, + xpc_connection_get_pid(c), + desc); } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> Connection error: %p : %s"), - c, - xpc_connection_get_pid(c), - xobj, - desc); + SC_log(LOG_ERR, "<%p:%d> Connection error: %p : %s", + c, + xpc_connection_get_pid(c), + xobj, + desc); } } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> unknown event type : %p"), - c, - xpc_connection_get_pid(c), - type); + SC_log(LOG_ERR, "<%p:%d> unknown event type : %p", + c, + xpc_connection_get_pid(c), + type); } }); @@ -316,27 +375,87 @@ process_new_connection(xpc_connection_t c) #pragma mark - -#pragma mark Network Information server SPIs +#pragma mark Network information state + + +static void +add_state_handler() +{ +#if !TARGET_OS_SIMULATOR + os_state_block_t state_block; + os_state_handle_t state_handle; + + state_block = ^os_state_data_t(os_state_hints_t hints) { +#pragma unused(hints) + os_state_data_t state_data; + size_t state_data_size; + CFIndex state_len; + + state_len = (S_nwi_info.data != NULL) ? CFDataGetLength(S_nwi_info.data) : 0; + state_data_size = OS_STATE_DATA_SIZE_NEEDED(state_len); + if (state_data_size > MAX_STATEDUMP_SIZE) { + SC_log(LOG_ERR, "Network information : state data too large (%zd > %zd)", + state_data_size, + (size_t)MAX_STATEDUMP_SIZE); + return NULL; + } + + state_data = calloc(1, state_data_size); + if (state_data == NULL) { + SC_log(LOG_ERR, "Network information: could not allocate state data"); + return NULL; + } + + state_data->osd_type = OS_STATE_DATA_CUSTOM; + state_data->osd_data_size = (uint32_t)state_len; + strlcpy(state_data->osd_decoder.osdd_library, + "SystemConfiguration", + sizeof(state_data->osd_decoder.osdd_library)); + strlcpy(state_data->osd_decoder.osdd_type, + "nwi", + sizeof(state_data->osd_decoder.osdd_type)); + strlcpy(state_data->osd_title, "Network information", sizeof(state_data->osd_title)); + if (state_len > 0) { + memcpy(state_data->osd_data, CFDataGetBytePtr(S_nwi_info.data), state_len); + } + + return state_data; + }; + + state_handle = os_state_add_handler(_nwi_state_server_queue(), state_block); + if (state_handle == 0) { + SC_log(LOG_ERR, "Network information: os_state_add_handler() failed"); + } +#endif // !TARGET_OS_SIMULATOR + + + return; +} + + +#pragma mark - +#pragma mark Network information server SPIs __private_extern__ void load_NetworkInformation(CFBundleRef bundle, - SCLoggerRef logger, - Boolean *bundleVerbose, _nwi_sync_handler_t syncHandler) { +#pragma unused(bundle) xpc_connection_t c; const char *name; - S_debug = bundleVerbose; - S_logger = logger; - /* * keep track of Network information acknowledgements */ _libSC_info_server_init(&S_nwi_info); + /* + * add a state dump handler + */ + add_state_handler(); + /* * save the in-sync/not-in-sync handler */ @@ -364,62 +483,25 @@ load_NetworkInformation(CFBundleRef bundle, desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); if (event == XPC_ERROR_CONNECTION_INVALID) { - SCLoggerLog(S_logger, LOG_ERR, CFSTR("Network information server: %s"), desc); + SC_log(LOG_ERR, "Network information server: %s", desc); xpc_release(c); } else if (event == XPC_ERROR_CONNECTION_INTERRUPTED) { - SCLoggerLog(S_logger, LOG_ERR, CFSTR("Network information server: %s"), desc); + SC_log(LOG_ERR, "Network information server: %s", desc); } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("Network information server: Connection error: %p : %s"), - event, - desc); + SC_log(LOG_ERR, "Network information server: Connection error: %p : %s", + event, + desc); } } else { - SCLoggerLog(S_logger, LOG_ERR, - CFSTR("Network information server: unknown event type : %p"), - type); + SC_log(LOG_ERR, "Network information server: unknown event type : %p", type); } }); xpc_connection_resume(c); -SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("XPC server \"%s\" started"), name); - - return; -} - - -__private_extern__ -void -_nwi_state_signature(nwi_state *state, - unsigned char *signature, - size_t signature_len) -{ - bzero(signature, signature_len); - - if (state != NULL) { - CC_SHA1_CTX ctx; - uint64_t generation_save; - unsigned char *sha1; - unsigned char sha1_buf[CC_SHA1_DIGEST_LENGTH]; - - generation_save = state->generation_count; - state->generation_count = 0; - - sha1 = (signature_len >= CC_SHA1_DIGEST_LENGTH) ? signature : sha1_buf; - CC_SHA1_Init(&ctx); - CC_SHA1_Update(&ctx, - state, - state->size); - CC_SHA1_Final(sha1, &ctx); - if (sha1 != signature) { - bcopy(sha1, signature, signature_len); - } - - state->generation_count = generation_save; - } +SC_log(LOG_DEBUG, "XPC server \"%s\" started", name); return; } @@ -440,13 +522,11 @@ _nwi_state_store(nwi_state *state) new_generation = state->generation_count; - if (*S_debug) { - SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("Network information updated: %llu"), - new_generation); - } + SC_log(LOG_DEBUG, "Network information updated: %llu", + new_generation); bytes = (const UInt8 *)state; - len = state->size; + len = nwi_state_size(state); new_nwi_info = CFDataCreate(NULL, bytes, len); } @@ -461,7 +541,9 @@ _nwi_state_store(nwi_state *state) // if anyone is keeping us in sync, they now need to catchup in_sync = _libSC_info_server_in_sync(&S_nwi_info); - S_sync_handler(in_sync); + if (S_sync_handler != NULL) { + S_sync_handler(in_sync); + } // and let everyone else know that the configuration has been updated notify_key = nwi_state_get_notify_key(); @@ -471,7 +553,7 @@ _nwi_state_store(nwi_state *state) _nwi_state_force_refresh(); status = notify_post(notify_key); if (status != NOTIFY_STATUS_OK) { - SCLoggerLog(S_logger, LOG_ERR, CFSTR("notify_post() failed: %d"), status); + SC_log(LOG_ERR, "notify_post() failed: %d", status); // notification posting failures are non-fatal } } @@ -490,17 +572,15 @@ int main(int argc, char **argv) { static Boolean verbose = (argc > 1) ? TRUE : FALSE; - // _sc_log = FALSE; +// _sc_log = FALSE; _sc_verbose = (argc > 1) ? TRUE : FALSE; _sc_debug = TRUE; load_NetworkInformation(CFBundleGetMainBundle(), // bundle - NULL, // SCLogger - &verbose, // bundleVerbose ^(Boolean inSync) { // sync handler - SCLoggerLog(NULL, LOG_INFO, - CFSTR("in sync: %s"), - inSync ? "Yes" : "No"); + SC_log(LOG_INFO, + "in sync: %s", + inSync ? "Yes" : "No") }); CFRunLoopRun(); /* not reached */ @@ -508,4 +588,4 @@ main(int argc, char **argv) return 0; } -#endif /* MAIN */ +#endif /* MAIN */ diff --git a/src/configd/nwi/network_information_server.h b/src/configd/nwi/network_information_server.h index bdd8b3400..2e1f55a94 100644 --- a/src/configd/nwi/network_information_server.h +++ b/src/configd/nwi/network_information_server.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2013, 2015, 2016 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@ */ @@ -36,8 +36,6 @@ __BEGIN_DECLS void load_NetworkInformation (CFBundleRef bundle, - SCLoggerRef logger, - Boolean *bundleVerbose, _nwi_sync_handler_t syncHandler); void diff --git a/src/configd/nwi/network_state_information_logging.h b/src/configd/nwi/network_state_information_logging.h new file mode 100644 index 000000000..560965a17 --- /dev/null +++ b/src/configd/nwi/network_state_information_logging.h @@ -0,0 +1,402 @@ +/* + * Copyright (c) 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, + * 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_STATE_INFORMATION_LOGGING_H +#define _NETWORK_STATE_INFORMATION_LOGGING_H + +#include +#include +#include +#include +#include +#include + +#include +#include "network_state_information_priv.c" + +__BEGIN_DECLS + +#ifndef my_log +#define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) +#define MY_LOG_DEFINED_LOCALLY +#endif // !my_log + +#ifndef my_log_context_type +#define my_log_context_type void * +#define MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY +#endif // !my_log_context_type + +#ifndef my_log_context_name +#define my_log_context_name context +#define MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY +#endif // !my_log_context_name + +#include "SCNetworkReachabilityLogging.h" + +/* + * _nwi_ifstate_flags_str() + * + * Returns a string representation of the nwi_state flags. + * "(IPv4,IPv6,DNS,...)" + */ +static __inline__ void +_nwi_ifstate_flags_str(nwi_ifstate_flags flags, char *str, size_t len) +{ + size_t n; + nwi_ifstate_flags remaining; + + assert(len >= sizeof("(0x01234567)")); // check min buffer size + + flags &= NWI_IFSTATE_FLAGS_MASK; + if (flags == 0) { + str[0] = '\0'; + return; + } + + len--; // leave room for the closing paren + n = strlcpy(str, "(", len); + remaining = flags; + + if ((remaining & NWI_IFSTATE_FLAGS_HAS_IPV4) && + (n < len) && ((len - n) > sizeof("IPv4,"))) { + n = strlcat(str, "IPv4,", len); + remaining &= ~NWI_IFSTATE_FLAGS_HAS_IPV4; + } + + if ((remaining & NWI_IFSTATE_FLAGS_HAS_IPV6) && + (n < len) && ((len - n) > sizeof("IPv6,"))) { + n = strlcat(str, "IPv6,", len); + remaining &= ~NWI_IFSTATE_FLAGS_HAS_IPV6; + } + + if ((remaining & NWI_IFSTATE_FLAGS_HAS_DNS) && + (n < len) && ((len - n) > sizeof("DNS,"))) { + n = strlcat(str, "DNS,", 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); + remaining &= ~NWI_IFSTATE_FLAGS_NOT_IN_LIST; + } + + if ((remaining & NWI_IFSTATE_FLAGS_HAS_SIGNATURE) && + (n < len) && ((len - n) > sizeof("SIGNATURE,"))) { + n = strlcat(str, "SIGNATURE,", len); + remaining &= ~NWI_IFSTATE_FLAGS_HAS_SIGNATURE; + } + + if ((remaining & NWI_IFSTATE_FLAGS_NOT_IN_IFLIST) && + (n < len) && ((len - n) > sizeof("NOT-IN-IFLIST,"))) { + n = strlcat(str, "NOT-IN-IFLIST,", len); + remaining &= ~NWI_IFSTATE_FLAGS_NOT_IN_IFLIST; + } + + if (remaining != 0) { + if ((n >= len) || + ((len - n) <= sizeof("0x01234567,"))) { + // if we don't have enough space, truncate and start over + n = strlcpy(str, "(", len); + remaining = flags; + } + + n += snprintf(str + n, len - n, ",%p", (void *)remaining); + } + + if (n-- > 0) { + str[n] = ')'; // trailing "," --> ")" + } + + return; +} + +static __inline__ const char * +_nwi_ifstate_rank_str(Rank rank) +{ + const char *str = "???"; + + switch (RANK_ASSERTION_MASK(rank)) { + case kRankAssertionFirst: + str = "First"; + break; + case kRankAssertionDefault: + str = "Default"; + break; + case kRankAssertionLast: + str = "Last"; + break; + case kRankAssertionNever: + str = "Never"; + break; + case kRankAssertionScoped: + str = "Scoped"; + break; + default: + str = "???"; + break; + } + + return str; +} + +static __inline__ void +_nwi_ifstate_log(nwi_ifstate_t ifstate, boolean_t debug, my_log_context_type my_log_context_name) +{ +#if defined(MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY) && defined(MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY) +#pragma unused(my_log_context_name) +#endif + union { + const void *bytes; + const struct in_addr *ia; + const struct in6_addr *ia6; + } addr; + char addr_str[INET6_ADDRSTRLEN]; + nwi_ifstate_flags flags_ifstate; + char flags_str[100]; + const char *if_name; + SCNetworkReachabilityFlags reach_flags; + char reach_str[100]; + const struct sockaddr *vpn_addr; + + // nwi_ifstate flags + flags_ifstate = nwi_ifstate_get_flags(ifstate); + if (debug) { + flags_ifstate |= NWI_IFSTATE_FLAGS(ifstate->flags); + } + flags_ifstate &= ~NWI_IFSTATE_FLAGS_HAS_SIGNATURE; // exclude flag ('cause we'll report the signature only if present) + _nwi_ifstate_flags_str(flags_ifstate, flags_str, sizeof(flags_str)); + + // if_name + if_name = nwi_ifstate_get_ifname(ifstate); + + // reachability flags + reach_flags = nwi_ifstate_get_reachability_flags(ifstate); + + // IP address + addr.bytes = nwi_ifstate_get_address(ifstate); + if (inet_ntop(ifstate->af, addr.bytes, addr_str, sizeof(addr_str)) == NULL) { + strlcpy(addr_str, "???", sizeof(addr_str)); + } + + // verbose format (e.g. scutil) + my_log(LOG_INFO, " %7s : flags : %p %s", + if_name, + (void *)flags_ifstate, + flags_str); + + my_log(LOG_INFO, " address : %s", addr_str); + + // VPN server address + vpn_addr = nwi_ifstate_get_vpn_server(ifstate); + if (vpn_addr != NULL) { + char vpn_str[INET6_ADDRSTRLEN]; + + _SC_sockaddr_to_string(vpn_addr, vpn_str, sizeof(vpn_str)); + my_log(LOG_INFO, " VPN server : %s", vpn_str); + } + + // reachability + __SCNetworkReachability_flags_string(reach_flags, TRUE, reach_str, sizeof(reach_str)); + my_log(LOG_INFO, " reach : %s", reach_str); + + if (debug) { + uint64_t generation; + Rank rank; + uint32_t rank_index; + const char *rank_str; + const uint8_t *signature; + int signature_length = 0; + + // Rank + rank = ifstate->rank; + rank_str = _nwi_ifstate_rank_str(rank); + rank_index = RANK_INDEX_MASK(rank); + if (rank_index != kRankIndexMask) { + my_log(LOG_INFO, " rank : 0x%08x (%s, %u)", rank, rank_str, rank_index); + } else { + my_log(LOG_INFO, " rank : 0x%08x (%s, Last)", rank, rank_str); + } + + // signature + signature = nwi_ifstate_get_signature(ifstate, AF_UNSPEC, &signature_length); + if (signature != NULL) { + CFDataRef digest; + + digest = CFDataCreate(NULL, signature, signature_length); + my_log(LOG_INFO, " signature : %@", digest); + CFRelease(digest); + } + + // generation + generation = nwi_ifstate_get_generation(ifstate); + my_log(LOG_INFO, " generation : %llu", generation); + } + + return; +} + +static __inline__ void +_nwi_state_reachability_log(nwi_state_t state, boolean_t debug, int af, my_log_context_type my_log_context_name) +{ +#if defined(MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY) && defined(MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY) +#pragma unused(my_log_context_name) +#endif + uint32_t flags; + char flags_str[100]; + + flags = nwi_state_get_reachability_flags(state, af); + __SCNetworkReachability_flags_string(flags, TRUE, flags_str, sizeof(flags_str)); + if (!debug) { + my_log(LOG_INFO, "%s", ""); + } + my_log(LOG_INFO, " REACH : flags %s", flags_str); + + return; +} + +static __inline__ void +_nwi_state_log(nwi_state_t state, boolean_t debug, my_log_context_type my_log_context_name) +{ +#if defined(MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY) && defined(MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY) +#pragma unused(my_log_context_name) +#endif + unsigned int count; + nwi_ifindex_t i; + nwi_ifstate_t ifstate; + + if (!debug) { + my_log(LOG_INFO, "%s", "Network information"); + } else { + my_log(LOG_INFO, + "Network information (generation %llu size=%lu)", + nwi_state_get_generation(state), + nwi_state_size(state)); + } + + // report IPv4 state + if (!debug) { + // show regular interfaces + my_log(LOG_INFO, "%s", ""); + my_log(LOG_INFO, "%s", "IPv4 network interface information"); + ifstate = nwi_state_get_first_ifstate(state, AF_INET); + if (ifstate == NULL) { + my_log(LOG_INFO, "%s", " No IPv4 states found"); + } else { + while (ifstate != NULL) { + _nwi_ifstate_log(ifstate, debug, my_log_context_name); + ifstate = nwi_ifstate_get_next(ifstate, AF_INET); + } + } + } else { + my_log(LOG_INFO, "%s", "IPv4 network interface information"); + if (state->ipv4_count > 0) { + // show ALL interfaces + for (i = 0, ifstate = nwi_state_ifstate_list(state, AF_INET); + i < state->ipv4_count; i++, ifstate++) { + _nwi_ifstate_log(ifstate, debug, my_log_context_name); + } + } else { + my_log(LOG_INFO, "%s", " No IPv4 states found"); + } + } + _nwi_state_reachability_log(state, debug, AF_INET, my_log_context_name); + + // report IPv6 state + if (!debug) { + // show regular interfaces + my_log(LOG_INFO, "%s", ""); + my_log(LOG_INFO, "%s", "IPv6 network interface information"); + ifstate = nwi_state_get_first_ifstate(state, AF_INET6); + if (ifstate == NULL) { + my_log(LOG_INFO, "%s", " No IPv6 states found\n"); + } else { + while (ifstate != NULL) { + _nwi_ifstate_log(ifstate, debug, my_log_context_name); + ifstate = nwi_ifstate_get_next(ifstate, AF_INET6); + } + } + } else { + my_log(LOG_INFO, "%s", "IPv6 network interface information"); + if (state->ipv6_count > 0) { + // show ALL interfaces + for (i = 0, ifstate = nwi_state_ifstate_list(state, AF_INET6); + i < state->ipv6_count; i++, ifstate++) { + _nwi_ifstate_log(ifstate, debug, my_log_context_name); + } + } else { + my_log(LOG_INFO, "%s", " No IPv6 states found\n"); + } + } + _nwi_state_reachability_log(state, debug, AF_INET6, my_log_context_name); + + count = nwi_state_get_interface_names(state, NULL, 0); + if (count > 0) { + const char *names[count]; + + count = nwi_state_get_interface_names(state, names, count); + if (count > 0) { + char str[count * (IFNAMSIZ + 1)]; + + memset(str, 0, sizeof(str)); + for (unsigned int i = 0; i < count; i++) { + if (i != 0) { + strlcat(str, " ", sizeof(str)); + } + strlcat(str, names[i], sizeof(str)); + } + + if (!debug) { + my_log(LOG_INFO, "%s", ""); + } + my_log(LOG_INFO, "Network interfaces: %s", str); + } + } + + return; +} + +#ifdef MY_LOG_DEFINED_LOCALLY +#undef my_log +#undef MY_LOG_DEFINED_LOCALLY +#endif // MY_LOG_DEFINED_LOCALLY + +#ifdef MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY +#undef my_log_context_type +#undef MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY +#endif // MY_LOG_CONTEXT_TYPE_DEFINED_LOCALLY + +#ifdef MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY +#undef my_log_context_name +#undef MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY +#endif // MY_LOG_CONTEXT_NAME_DEFINED_LOCALLY + +__END_DECLS + +#endif // _NETWORK_STATE_INFORMATION_LOGGING_H diff --git a/src/configd/nwi/network_state_information_priv.c b/src/configd/nwi/network_state_information_priv.c new file mode 100644 index 000000000..85024d204 --- /dev/null +++ b/src/configd/nwi/network_state_information_priv.c @@ -0,0 +1,731 @@ +/* + * Copyright (c) 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, + * 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@ + */ + +#include +#include +#include +#include +#include +#include +#include +#include "network_state_information_priv.h" +#include +#include +#include + +#define NWI_IFSTATE_FLAGS(flags) \ + ((flags) & NWI_IFSTATE_FLAGS_MASK) + +#define NWI_IFSTATE_FLAGS_GET_DIFF(flags) \ + (((flags) & NWI_IFSTATE_FLAGS_DIFF_MASK) >> 8) + +#define NWI_IFSTATE_FLAGS_FROM_DIFF(diff) \ + (((diff) << 8) & NWI_IFSTATE_FLAGS_DIFF_MASK) + +#define NWI_IFSTATE_DIFF_UNCHANGED 0 +#define NWI_IFSTATE_DIFF_ADDED 1 +#define NWI_IFSTATE_DIFF_REMOVED 2 +#define NWI_IFSTATE_DIFF_CHANGED 3 +#define NWI_IFSTATE_DIFF_RANK_UP 4 +#define NWI_IFSTATE_DIFF_RANK_DOWN 5 + + +static void +nwi_state_fix_af_aliases(nwi_state_t state, uint32_t old_max_if_count) +{ + int64_t offset; + int i; + nwi_ifstate_t ifstate; + + offset = state->max_if_count - old_max_if_count; + if (offset < 0) { + syslog(LOG_ERR, "new count %d < old count %d", + state->max_if_count, old_max_if_count); + return; + } + + /* iterate IPv4 list and add the offset to any entries with an alias */ + for (i = 0, ifstate = nwi_state_ifstate_list(state, AF_INET); + i < state->ipv4_count; + i++, ifstate++) { + if (ifstate->af_alias_offset != 0) { + /* IPv6 is higher in memory, alias is forward */ + ifstate->af_alias_offset += offset; + } + } + + /* iterate IPv6 list and add the offset to any entries with an alias */ + for (i = 0, ifstate = nwi_state_ifstate_list(state, AF_INET6); + i < state->ipv6_count; + i++, ifstate++) { + if (ifstate->af_alias_offset != 0) { + /* IPv6 is higher in memory, alias is backward */ + ifstate->af_alias_offset -= offset; + } + } + return; +} + +static void +nwi_state_add_to_if_list(nwi_state_t state, nwi_ifstate_t ifstate) +{ + int i; + nwi_ifindex_t * scan; + + if ((ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_IFLIST) != 0) { + /* doesn't get added to interface list */ + return; + } + if (state->if_list_count >= state->max_if_count) { + /* sanity check */ + return; + } + for (i = 0, scan = nwi_state_if_list(state); + i < state->if_list_count; + i++, scan++) { + nwi_ifstate_t this_ifstate; + + this_ifstate = state->ifstate_list + *scan; + if (strcmp(this_ifstate->ifname, ifstate->ifname) == 0) { + /* it's already in the list */ + return; + } + } + /* add it to the end */ + *scan = (nwi_ifindex_t)(ifstate - state->ifstate_list); + state->if_list_count++; + return; +} + +static void +nwi_state_set_if_list(nwi_state_t state) +{ + nwi_ifstate_t scan_v4; + nwi_ifstate_t scan_v6; + int v4; + int v6; + + v4 = 0; + v6 = 0; + state->if_list_count = 0; + scan_v4 = nwi_state_get_ifstate_with_index(state, AF_INET, v4); + scan_v6 = nwi_state_get_ifstate_with_index(state, AF_INET6, v6); + while (scan_v4 != NULL || scan_v6 != NULL) { + boolean_t add_v4 = FALSE; + + if (scan_v4 != NULL && scan_v6 != NULL) { + /* add the higher rank of v4 or v6 */ + if (scan_v4->rank <= scan_v6->rank) { + add_v4 = TRUE; + } + } + else if (scan_v4 != NULL) { + add_v4 = TRUE; + } + if (add_v4) { + /* add v4 interface */ + nwi_state_add_to_if_list(state, scan_v4); + v4++; + scan_v4 = nwi_state_get_ifstate_with_index(state, + AF_INET, + v4); + } + else { + /* add v6 interface, move to next item */ + nwi_state_add_to_if_list(state, scan_v6); + v6++; + scan_v6 = nwi_state_get_ifstate_with_index(state, + AF_INET6, + v6); + } + } + return; +} + +__private_extern__ +nwi_state_t +nwi_state_make_copy(nwi_state_t src) +{ + nwi_state_t dest = NULL; + size_t size; + + if (src == NULL) { + return dest; + } + size = nwi_state_size(src); + dest = (nwi_state_t)malloc(size); + + if (dest != NULL) { + memcpy(dest, src, size); + } + return dest; +} + +__private_extern__ +nwi_state_t +nwi_state_new(nwi_state_t old_state, int max_if_count) +{ + size_t size; + nwi_state_t state = NULL; + + if (old_state == NULL && max_if_count == 0) { + return NULL; + } + + /* Should we reallocate? */ + if (old_state != NULL) { + if (old_state->max_if_count >= max_if_count) { + /* if we're staying the same or shrinking, don't grow */ + return (old_state); + } + } + size = nwi_state_compute_size(max_if_count); + state = (nwi_state_t)malloc(size); + memset(state, 0, size); + state->max_if_count = max_if_count; + state->version = NWI_STATE_VERSION; + + if (old_state != NULL) { + state->ipv6_count = old_state->ipv6_count; + if (state->ipv6_count > 0) { + memcpy((void *)&state->ifstate_list[state->max_if_count], + (void *)&old_state->ifstate_list[old_state->max_if_count], + old_state->ipv6_count * sizeof(nwi_ifstate)); + } + + state->ipv4_count = old_state->ipv4_count; + if (state->ipv4_count > 0) { + memcpy((void *)state->ifstate_list, + (void *)old_state->ifstate_list, + old_state->ipv4_count * sizeof(nwi_ifstate)); + } + /* we grew the arrays so re-compute the offsets */ + nwi_state_fix_af_aliases(state, old_state->max_if_count); + nwi_state_set_if_list(state); + nwi_state_free(old_state); + } else { + state->ipv4_count = 0; + state->ipv6_count = 0; + } + return state; +} + +__private_extern__ void +nwi_state_finalize(nwi_state_t state) +{ + if (state == NULL) { + return; + } + nwi_state_set_if_list(state); + return; +} + +static __inline__ +nwi_ifstate_t +nwi_state_get_last_ifstate(nwi_state_t state, int af, nwi_ifindex_t** last) +{ + nwi_ifindex_t * count; + int idx; + + assert(state != NULL); + + count = (af == AF_INET) ? &state->ipv4_count + : &state->ipv6_count; + + idx = (af == AF_INET) ? state->ipv4_count + : (state->max_if_count + state->ipv6_count); + + *last = count; + + return &state->ifstate_list[idx]; +} + +__private_extern__ +void +nwi_ifstate_set_signature(nwi_ifstate_t ifstate, uint8_t * signature) +{ + memcpy(ifstate->signature, signature, sizeof(ifstate->signature)); + ifstate->flags |= NWI_IFSTATE_FLAGS_HAS_SIGNATURE; + return; +} + +static void +nwi_state_add_ifstate_alias(nwi_state_t state, nwi_ifstate_t ifstate) +{ + nwi_ifstate_t alias; + + alias = nwi_state_get_ifstate_with_name(state, + nwi_other_af(ifstate->af), + ifstate->ifname); + if (alias == NULL) { + return; + } + ifstate->af_alias_offset = (nwi_ifindex_t)(alias - ifstate); + alias->af_alias_offset = (nwi_ifindex_t)(ifstate - alias); + return; +} + +__private_extern__ nwi_ifstate_t +nwi_state_add_ifstate(nwi_state_t state, + const char * ifname, int af, + uint64_t flags, Rank rank, + void * ifa, + struct sockaddr * vpn_server_addr, + uint32_t reach_flags) +{ + nwi_ifstate_t ifstate; + + /* Will only add unique elements to the list */ + ifstate = nwi_state_get_ifstate_with_name(state, af, ifname); + + /* Already present, just ignore it */ + if (ifstate != NULL) { + if (ifstate->rank < rank) { + /* always true because they are added in order */ + return NULL; + } + } + else { + /* add to the end */ + nwi_ifindex_t count; + nwi_ifindex_t * count_p; + + /* make sure we aren't already full */ + ifstate = nwi_state_get_last_ifstate(state, af, &count_p); + count = *count_p; + if (count == state->max_if_count) { + /* should not happen */ + syslog(LOG_ERR, + "nwi_state_add_ifstate: full at count %d\n", + count); + return (NULL); + } + if (count > 0) { + /* previous ifstate is no longer last */ + nwi_ifstate_t prev = ifstate - 1; + + prev->flags &= ~NWI_IFSTATE_FLAGS_LAST_ITEM; + } + memset(ifstate, 0, sizeof(*ifstate)); + strlcpy(ifstate->ifname, ifname, sizeof(ifstate->ifname)); + ifstate->af = af; + /* this is the new last ifstate */ + ifstate->flags |= NWI_IFSTATE_FLAGS_LAST_ITEM; + (*count_p)++; + + /* add the alias */ + nwi_state_add_ifstate_alias(state, ifstate); + } + + /* We need to update the address/rank/flag fields for the existing/new + * element */ + if (ifa != NULL) { + switch (af) { + case AF_INET: + ifstate->iaddr = *((struct in_addr *) ifa); + break; + case AF_INET6: + ifstate->iaddr6 = *((struct in6_addr *) ifa); + break; + default: + break; + } + + } + + if (vpn_server_addr != NULL && vpn_server_addr->sa_family != 0) { + _nwi_ifstate_set_vpn_server(ifstate, vpn_server_addr); + } else { + _nwi_ifstate_set_vpn_server(ifstate, NULL); + } + + ifstate->reach_flags = reach_flags; + ifstate->rank = rank; + ifstate->flags &= ~NWI_IFSTATE_FLAGS_MASK; + ifstate->flags |= NWI_IFSTATE_FLAGS(flags); + return ifstate; +} + +__private_extern__ +void +nwi_state_clear(nwi_state_t state, int af) +{ + if (af == AF_INET) { + state->ipv4_count = 0; + } + else { + state->ipv6_count = 0; + } + return; + +} + +__private_extern__ +void * +nwi_ifstate_get_address(nwi_ifstate_t ifstate) +{ + return (void *)&ifstate->iaddr; +} + + +static __inline__ uint8_t +nwi_ifstate_get_diff(nwi_ifstate_t ifstate) +{ + return (NWI_IFSTATE_FLAGS_GET_DIFF(ifstate->flags)); +} + +__private_extern__ const char * +nwi_ifstate_get_diff_str(nwi_ifstate_t ifstate) +{ + const char * strings[] = { + "", + "+", + "-", + "!", + "/", + "\\" + }; + uint8_t diff; + + diff = nwi_ifstate_get_diff(ifstate); + if (diff < sizeof(strings) / sizeof(strings[0])) { + return (strings[diff]); + } + return ("?"); +} + +__private_extern__ nwi_ifstate_difference_t +nwi_ifstate_get_difference(nwi_ifstate_t diff_ifstate) +{ + nwi_ifstate_difference_t diff; + + switch (nwi_ifstate_get_diff(diff_ifstate)) { + case NWI_IFSTATE_DIFF_ADDED: + case NWI_IFSTATE_DIFF_CHANGED: + diff = knwi_ifstate_difference_changed; + break; + case NWI_IFSTATE_DIFF_REMOVED: + diff = knwi_ifstate_difference_removed; + break; + default: + diff = knwi_ifstate_difference_none; + break; + } + return (diff); +} + +static inline boolean_t +nwi_ifstate_has_changed(nwi_ifstate_t ifstate1, nwi_ifstate_t ifstate2) +{ + if (NWI_IFSTATE_FLAGS(ifstate1->flags) + != NWI_IFSTATE_FLAGS(ifstate2->flags)) { + return TRUE; + } + + if (ifstate1->af == AF_INET) { + if (memcmp(&ifstate1->iaddr, &ifstate2->iaddr, sizeof(struct in_addr)) != 0) { + return TRUE; + } + } else { + if (memcmp(&ifstate1->iaddr6, &ifstate2->iaddr6, sizeof(struct in6_addr)) != 0) { + return TRUE; + } + } + return FALSE; +} + +static inline nwi_ifstate_t +nwi_state_diff_append(nwi_state_t state, nwi_ifstate_t scan) +{ + nwi_ifindex_t * last; + nwi_ifstate_t new_ifstate = NULL; + + new_ifstate = nwi_state_get_last_ifstate(state, scan->af, &last); + memcpy(new_ifstate, scan, sizeof(*scan)); + (*last)++; + return new_ifstate; +} + +static inline void +nwi_ifstate_set_diff(nwi_ifstate_t ifstate, uint8_t diff) +{ + ifstate->flags &= ~NWI_IFSTATE_FLAGS_DIFF_MASK; + if (diff != NWI_IFSTATE_DIFF_UNCHANGED) { + ifstate->flags |= NWI_IFSTATE_FLAGS_FROM_DIFF(diff); + } +} + +static void +nwi_state_diff_add_change(nwi_state_t diff, nwi_state_t old_ifstate, + nwi_ifstate_t ifstate) +{ + nwi_ifstate_t existing; + nwi_ifstate_t new_ifstate; + + existing = nwi_state_get_ifstate_with_name(old_ifstate, + ifstate->af, + nwi_ifstate_get_ifname(ifstate)); + new_ifstate = nwi_state_diff_append(diff, ifstate); + if (existing != NULL) { + if (nwi_ifstate_has_changed(existing, new_ifstate)) { + nwi_ifstate_set_diff(new_ifstate, + NWI_IFSTATE_DIFF_CHANGED); + } else if (existing->rank < new_ifstate->rank) { + nwi_ifstate_set_diff(new_ifstate, + NWI_IFSTATE_DIFF_RANK_DOWN); + } else if (existing->rank > new_ifstate->rank) { + nwi_ifstate_set_diff(new_ifstate, + NWI_IFSTATE_DIFF_RANK_UP); + } else { + nwi_ifstate_set_diff(new_ifstate, + NWI_IFSTATE_DIFF_UNCHANGED); + } + } else { + nwi_ifstate_set_diff(new_ifstate, NWI_IFSTATE_DIFF_ADDED); + } + return; +} + +static void +nwi_state_diff_remove(nwi_state_t state, nwi_ifstate_t ifstate) +{ + nwi_ifstate_t removed_ifstate; + + if (nwi_state_get_ifstate_with_name(state, + ifstate->af, + nwi_ifstate_get_ifname(ifstate)) + != NULL) { + /* there's still an ifstate */ + return; + } + removed_ifstate = nwi_state_diff_append(state, ifstate); + nwi_ifstate_set_diff(removed_ifstate, NWI_IFSTATE_DIFF_REMOVED); + return; +} + +static void +nwi_state_diff_populate(nwi_state_t diff, nwi_state_t old_ifstate, nwi_state_t new_ifstate) +{ + int i; + nwi_ifstate_t scan; + + if (new_ifstate != NULL) { + /* check for adds/changes */ + if (new_ifstate->ipv4_count) { + for (i = 0, scan = new_ifstate->ifstate_list; + i < new_ifstate->ipv4_count; i++, scan++) { + nwi_state_diff_add_change(diff, old_ifstate, scan); + } + } + if (new_ifstate->ipv6_count) { + scan = new_ifstate->ifstate_list + new_ifstate->max_if_count; + for (i = 0; + i < new_ifstate->ipv6_count; i++, scan++) { + nwi_state_diff_add_change(diff, old_ifstate, scan); + } + } + } + if (old_ifstate != NULL) { + /* check for removes */ + if (old_ifstate->ipv4_count) { + for (i = 0, scan = old_ifstate->ifstate_list; + i < old_ifstate->ipv4_count; i++, scan++) { + nwi_state_diff_remove(diff, scan); + } + } + if (old_ifstate->ipv6_count) { + scan = old_ifstate->ifstate_list + old_ifstate->max_if_count; + for (i = 0; + i < old_ifstate->ipv6_count; i++, scan++) { + nwi_state_diff_remove(diff, scan); + } + } + } + return; +} + +static int +nwi_state_max_af_count(nwi_state_t state) +{ + if (state->ipv4_count >= state->ipv6_count) { + return (state->ipv4_count); + } + return (state->ipv6_count); +} + +__private_extern__ nwi_state_t +nwi_state_diff(nwi_state_t old_ifstate, nwi_state_t new_ifstate) +{ + nwi_state_t diff; + int total_count = 0; + + /* + * Compute the worst case total number of elements we need: + * the max count of (IPv4, IPv6) in the old + * + the max count of (IPv4, IPv6) in the new + * Worst case assumes that the old and new share none of the + * same interfaces. + */ + if (old_ifstate != NULL) { + total_count += nwi_state_max_af_count(old_ifstate); + } + if (new_ifstate != NULL) { + total_count += nwi_state_max_af_count(new_ifstate); + } + if (total_count == 0) { + return NULL; + } + + diff = nwi_state_new(NULL, total_count); + nwi_state_diff_populate(diff, old_ifstate, new_ifstate); + + /* diff consists of a nwi_state_t with diff flags on each ifstate */ + return diff; +} + +static __inline__ +void +_nwi_ifstate_set_generation(nwi_ifstate_t ifstate, uint64_t generation_count) +{ + ifstate->if_generation_count = generation_count; + + return; +} + +static +boolean_t +_nwi_ifstate_has_changed(nwi_state_t state, const char * ifname) +{ + nwi_ifstate_t ifstate; + + /* If either the v4 ifstate or the v6 ifstate + * has changed, then report that the interface has changed */ + ifstate = nwi_state_get_ifstate_with_name(state, + AF_INET, + ifname); + + if (ifstate != NULL + && nwi_ifstate_get_diff(ifstate) != NWI_IFSTATE_DIFF_UNCHANGED) { + return (TRUE); + } + + ifstate = nwi_state_get_ifstate_with_name(state, + AF_INET6, + ifname); + + if (ifstate != NULL + && nwi_ifstate_get_diff(ifstate) != NWI_IFSTATE_DIFF_UNCHANGED) { + return (TRUE); + } + return (FALSE); +} + +__private_extern__ +void +_nwi_state_update_interface_generations(nwi_state_t old_state, nwi_state_t state, nwi_state_t changes) +{ + int i; + uint64_t generation_count; + nwi_ifstate_t scan; + + if (state == NULL || changes == NULL) { + return; + } + + /* cache the generation count */ + generation_count = state->generation_count; + + for (i = 0, scan = nwi_state_ifstate_list(state, AF_INET); + i < state->ipv4_count; i++, scan++) { + if (_nwi_ifstate_has_changed(changes, scan->ifname)) { + /* Update the interface generation count */ + _nwi_ifstate_set_generation(scan, generation_count); + } else { + nwi_ifstate_t old_ifstate; + + old_ifstate = nwi_state_get_ifstate_with_name(old_state, + AF_INET, + scan->ifname); + assert(old_ifstate != NULL); + + /* Set the current generation count */ + _nwi_ifstate_set_generation(scan, + old_ifstate->if_generation_count); + } + } + for (i = 0, scan = nwi_state_ifstate_list(state, AF_INET6); + i < state->ipv6_count; i++, scan++) { + /* The generation count has been already updated in + * the ipv4 case, just skip it. */ + if (nwi_ifstate_get_generation(scan) == + generation_count) { + continue; + } + if (_nwi_ifstate_has_changed(changes, scan->ifname)) { + /* update the interface generation count */ + _nwi_ifstate_set_generation(scan, generation_count); + } else { + nwi_ifstate_t old_ifstate; + + old_ifstate = nwi_state_get_ifstate_with_name(old_state, + AF_INET6, + scan->ifname); + assert(old_ifstate != NULL); + + /* Set the current generation count */ + _nwi_ifstate_set_generation(scan, + old_ifstate->if_generation_count); + } + } + return; +} + +__private_extern__ +void +_nwi_state_compute_sha256_hash(nwi_state_t state, + unsigned char hash[CC_SHA256_DIGEST_LENGTH]) +{ + CC_SHA256_CTX ctx; + uint64_t generation_save; + + if (state == NULL) { + memset(hash, 0, CC_SHA256_DIGEST_LENGTH); + return; + } + + /* preserve generation */ + generation_save = state->generation_count; + + /* zero out the generation count before computing hash */ + state->generation_count = 0; + + /* compute hash */ + CC_SHA256_Init(&ctx); + CC_SHA256_Update(&ctx, state, (CC_LONG)nwi_state_size(state)); + CC_SHA256_Final(hash, &ctx); + + /* restore generation */ + state->generation_count = generation_save; + + return; +} diff --git a/src/configd/nwi/network_information_priv.h b/src/configd/nwi/network_state_information_priv.h similarity index 52% rename from src/configd/nwi/network_information_priv.h rename to src/configd/nwi/network_state_information_priv.h index 5ea1ded7e..06d31c4e0 100644 --- a/src/configd/nwi/network_information_priv.h +++ b/src/configd/nwi/network_state_information_priv.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2013, 2016-2019 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,12 +17,12 @@ * 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_PRIV_H_ -#define _NETWORK_INFORMATION_PRIV_H_ +#ifndef _NETWORK_STATE_INFORMATION_PRIV_H_ +#define _NETWORK_STATE_INFORMATION_PRIV_H_ #include #include @@ -34,105 +34,133 @@ #include "network_information.h" -extern const sa_family_t nwi_af_list[2]; +#define NWI_STATE_VERSION ((uint32_t)0x20170601) -#define NWI_IFSTATE_FLAGS_NOT_IN_LIST 0x8 -#define NWI_IFSTATE_FLAGS_HAS_SIGNATURE 0x10 -#define NWI_PTR(type, name) \ - union { \ - type name; \ - uint64_t _ ## name ## _p; \ - } +#define NWI_IFSTATE_FLAGS_NOT_IN_LIST 0x0008 +#define NWI_IFSTATE_FLAGS_HAS_SIGNATURE 0x0010 +#define NWI_IFSTATE_FLAGS_NOT_IN_IFLIST 0x0020 + +/* + * NWI_IFSTATE_FLAGS_MASK + * - these are the bits that get preserved, all others are + * control (last item, diff) + */ +#define NWI_IFSTATE_FLAGS_MASK 0x00ff + +#define NWI_IFSTATE_FLAGS_DIFF_MASK 0x0f00 +#define NWI_IFSTATE_FLAGS_LAST_ITEM 0x1000 + +typedef enum { + knwi_ifstate_difference_none = 0, + knwi_ifstate_difference_changed = 1, + knwi_ifstate_difference_removed = 2 +} nwi_ifstate_difference_t; + + +/* + * Type: Rank + * Purpose: + * A 32-bit value to encode the relative rank of a service. + * + * The top 8 bits are used to hold the rank assertion (first, default, last, + * never, scoped); + * + * The bottom 24 bits are used to store the service index (i.e. the + * position within the service order array). + */ typedef uint32_t Rank; +#define RANK_ASSERTION_MAKE(r) ((Rank)(r) << 24) // rank assertion (top 8 bits) +#define kRankAssertionFirst RANK_ASSERTION_MAKE(0) +#define kRankAssertionDefault RANK_ASSERTION_MAKE(1) +#define kRankAssertionLast RANK_ASSERTION_MAKE(2) +#define kRankAssertionNever RANK_ASSERTION_MAKE(3) +#define kRankAssertionScoped RANK_ASSERTION_MAKE(4) +#define kRankAssertionMask RANK_ASSERTION_MAKE(0xff) +#define RANK_ASSERTION_MASK(r) ((Rank)(r) & kRankAssertionMask) +#define RANK_INDEX_MAKE(r) ((Rank)(r)) // rank index (bottom 24 bits) +#define kRankIndexMask RANK_INDEX_MAKE(0xffffff) +#define RANK_INDEX_MASK(r) ((Rank)(r) & kRankIndexMask) + +typedef int32_t nwi_ifindex_t; + +#define NWI_SIGNATURE_LENGTH 20 #pragma pack(4) typedef struct _nwi_ifstate { char ifname[IFNAMSIZ]; uint64_t flags; - NWI_PTR(nwi_ifstate_t, af_alias); + nwi_ifindex_t af_alias_offset; /* relative index to alias */ Rank rank; sa_family_t af; union { struct in_addr iaddr; struct in6_addr iaddr6; }; - NWI_PTR(const char *, diff_str); uint64_t if_generation_count; uint32_t reach_flags; union { struct sockaddr_in vpn_server_address4; struct sockaddr_in6 vpn_server_address6; } vpn_server_address; - unsigned char signature[CC_SHA1_DIGEST_LENGTH]; + unsigned char signature[NWI_SIGNATURE_LENGTH]; } nwi_ifstate; #pragma pack() -/* - * nwi_state - * - *+---------------------------------------------+ - *| generation_count | - *| | - *----------------------------------------------+ - *| size | - *| | - *|---------------------------------------------+ - *| ipv4_count | - *| | - *|---------------------------------------------+ - *| ipv6_count | - *| | - *|---------------------------------------------+ - *| ipv6_start |-------+ - *| | | - *|---------------------------------------------+ |ipv6_start stores the index of the start of the v6 list. - *| ref (reference count) | | - *| | | - *|---------------------------------------------+ | - *| svr (TRUE if copied from server) | | - *| | | - *|---------------------------------------------+ | - *| reach_flags_v4 | | - *| | | - *|---------------------------------------------+ | - *| reach_flags_v6 | | - *| | | - *|---------------------------------------------+ | - *| IPv4 nwi_ifstates | | - *| |<------|-------+ - *| ... | | | - *|---------------------------------------------+ | | - *| Sentinel nwi_ifstates | | | - *| flags =NWI_IFSTATE_FLAGS_RANK_NEVER) | | | af_alias points to the same ifstate in the - *| | | | opposite (v4 -> v6 and vice versa) af list. - *|---------------------------------------------+ | | - *| IPv6 nwi_ifstates |<------+ | - *| |<--------------+ - *| ... | - *|---------------------------------------------+ - *| Sentinel nwi_ifstates | - *| flags =NWI_IFSTATE_FLAGS_RANK_NEVER) | - *| | - *|---------------------------------------------+ - * - */ #pragma pack(4) typedef struct _nwi_state { - uint64_t generation_count; - uint32_t size; - uint32_t ipv4_count; - uint32_t ipv6_count; - uint32_t ipv6_start; - uint32_t ref; - _Bool svr; + uint32_t version; /* NWI_STATE_VERSION */ + nwi_ifindex_t max_if_count; /* available slots per protocol */ + nwi_ifindex_t ipv4_count; /* # of v4 ifstates in use */ + nwi_ifindex_t ipv6_count; /* # of v6 ifstates in use */ + nwi_ifindex_t if_list_count; /* # of if_list[] slots in use */ + uint32_t ref; /* reference count */ uint32_t reach_flags_v4; uint32_t reach_flags_v6; - nwi_ifstate nwi_ifstates[0]; + uint64_t generation_count; + nwi_ifstate ifstate_list[1];/* (max_if_count * 2) ifstates */ +/* nwi_ifindex_t if_list[0]; max_if_count indices */ } nwi_state; #pragma pack() +static __inline__ int +nwi_other_af(int af) +{ + return ((af == AF_INET) ? (AF_INET6) : (AF_INET)); +} + +static __inline__ size_t +nwi_state_compute_size(unsigned int max_if_count) +{ + size_t size; + + size = offsetof(nwi_state, ifstate_list[max_if_count * 2]) + + sizeof(nwi_ifindex_t) * max_if_count; + return (size); +} + +static __inline__ size_t +nwi_state_size(nwi_state_t state) +{ + return (nwi_state_compute_size(state->max_if_count)); +} + +static __inline__ nwi_ifstate_t +nwi_state_ifstate_list(nwi_state_t state, int af) +{ + if (af == AF_INET) { + return (state->ifstate_list); + } + return (state->ifstate_list + state->max_if_count); +} + +static __inline__ nwi_ifindex_t * +nwi_state_if_list(nwi_state_t state) +{ + return ((nwi_ifindex_t *)&state->ifstate_list[state->max_if_count * 2]); +} + static __inline__ int uint32_cmp(uint32_t a, uint32_t b) { @@ -171,6 +199,18 @@ nwi_state_get_ifstate_count(nwi_state_t state, int af) return (af == AF_INET)?state->ipv4_count:state->ipv6_count; } +static __inline__ nwi_ifstate_t +nwi_ifstate_get_alias(nwi_ifstate_t ifstate, int af) +{ + if (ifstate->af == af) { + return (ifstate); + } + if (ifstate->af_alias_offset == 0) { + return (NULL); + } + return (ifstate + ifstate->af_alias_offset); +} + /* * The ifstate list is sorted in order of decreasing priority, with the * highest priority element appearing at index zero. @@ -181,18 +221,17 @@ static __inline__ nwi_ifstate_t nwi_state_get_ifstate_with_index(nwi_state_t state, int af, int idx) { - nwi_ifstate_t nwi_ifstate = NULL; int i_idx = idx; - if (idx > nwi_state_get_ifstate_count(state, af)) { - return (nwi_ifstate); + if (idx >= nwi_state_get_ifstate_count(state, af)) { + return (NULL); } if (af == AF_INET6) { - i_idx = idx + state->ipv6_start; + i_idx = idx + state->max_if_count; } - return &state->nwi_ifstates[i_idx]; + return &state->ifstate_list[i_idx]; } /* @@ -213,7 +252,7 @@ nwi_state_get_ifstate_with_name(nwi_state_t state, nwi_ifstate_t ifstate = NULL; if (state == NULL) { - return ifstate; + return NULL; } count = (af == AF_INET) @@ -241,8 +280,7 @@ _nwi_ifstate_set_vpn_server(nwi_ifstate_t ifstate, struct sockaddr *serv_addr) size_t len; if (serv_addr == NULL) { - bzero(&ifstate->vpn_server_address, - sizeof(ifstate->vpn_server_address)); + memset(&ifstate->vpn_server_address, 0, sizeof(ifstate->vpn_server_address)); return; } @@ -272,12 +310,22 @@ nwi_state_t nwi_state_new(nwi_state_t old_state, int elems); nwi_state_t -nwi_state_copy_priv(nwi_state_t old_state); +nwi_state_make_copy(nwi_state_t state); + +static __inline__ void +nwi_state_free(nwi_state_t state) +{ + free(state); + return; +} + +void +nwi_state_finalize(nwi_state_t state); nwi_ifstate_t -nwi_insert_ifstate(nwi_state_t state, const char* ifname, int af, - uint64_t flags, Rank rank, - void * ifa, struct sockaddr * vpn_server_addr, uint32_t reach_flags); +nwi_state_add_ifstate(nwi_state_t state, const char* ifname, int af, + uint64_t flags, Rank rank, + void * ifa, struct sockaddr * vpn_server_addr, uint32_t reach_flags); void nwi_ifstate_set_signature(nwi_ifstate_t ifstate, uint8_t * signature); @@ -285,9 +333,6 @@ nwi_ifstate_set_signature(nwi_ifstate_t ifstate, uint8_t * signature); void nwi_state_clear(nwi_state_t state, int af); -void -nwi_state_set_last(nwi_state_t state, int af); - nwi_state_t nwi_state_diff(nwi_state_t old_state, nwi_state_t new_state); @@ -297,10 +342,14 @@ nwi_ifstate_get_address(nwi_ifstate_t ifstate); const char * nwi_ifstate_get_diff_str(nwi_ifstate_t ifstate); +nwi_ifstate_difference_t +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(); +_nwi_state_compute_sha256_hash(nwi_state_t state, + unsigned char hash[CC_SHA256_DIGEST_LENGTH]); -#endif +#endif // _NETWORK_STATE_INFORMATION_PRIV_H_ diff --git a/src/configd/nwi/test_nwi_reference.txt b/src/configd/nwi/test_nwi_reference.txt new file mode 100644 index 000000000..0d8414104 --- /dev/null +++ b/src/configd/nwi/test_nwi_reference.txt @@ -0,0 +1,215 @@ +nwi_state = { gen=0 max_if=1 #v4=0 #v6=0 reach_flags=(v4=0x0, v6=0x0) } +0 interfaces +IPv4 traverse list: +IPv6 traverse list: +----------------------------------- +nwi_state = { gen=0 max_if=2 #v4=0 #v6=0 reach_flags=(v4=0x0, v6=0x0) } +0 interfaces +IPv4 traverse list: +IPv6 traverse list: +----------------------------------- +nwi_state = { gen=0 max_if=10 #v4=0 #v6=0 reach_flags=(v4=0x0, v6=0x0) } +0 interfaces +IPv4 traverse list: +IPv6 traverse list: +----------------------------------- +nwi_state = { gen=0 max_if=5 #v4=5 #v6=5 reach_flags=(v4=0x0, v6=0x0) } +IPv4: +[0] en0 rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 +[1] en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] en2 rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 +[3] en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] en4 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +IPv6: +[0] en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] en1 rank 0x9 iaddr 0:1:: reach_flags 0x0 +[2] en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] en3 rank 0x7 iaddr 0:3:: reach_flags 0x0 +[4] en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +5 interfaces: en0, en1, en2, en3, en4 +IPv4 traverse list: +[0] flags=0x0 en0 rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 + alias is en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] flags=0x0 en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 + alias is en1 rank 0x9 iaddr 0:1:: reach_flags 0x0 +[2] flags=0x0 en2 rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 + alias is en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] flags=0x0 en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 + alias is en3 rank 0x7 iaddr 0:3:: reach_flags 0x0 +[4] flags=0x1000 en4 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 + alias is en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +IPv6 traverse list: +[0] flags=0x0 en0 rank 0x0 iaddr :: reach_flags 0x0 + alias is en0 rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 +[1] flags=0x0 en1 rank 0x9 iaddr 0:1:: reach_flags 0x0 + alias is en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] flags=0x0 en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 + alias is en2 rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 +[3] flags=0x0 en3 rank 0x7 iaddr 0:3:: reach_flags 0x0 + alias is en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] flags=0x1000 en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 + alias is en4 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +----------------------------------- +DIFF +nwi_state = { gen=0 max_if=5 #v4=5 #v6=5 reach_flags=(v4=0x0, v6=0x0) } +IPv4: +[0] en0+ rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 +[1] en1+ rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] en2+ rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 +[3] en3+ rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] en4+ rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +IPv6: +[0] en0+ rank 0x0 iaddr :: reach_flags 0x0 +[1] en1+ rank 0x9 iaddr 0:1:: reach_flags 0x0 +[2] en2+ rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] en3+ rank 0x7 iaddr 0:3:: reach_flags 0x0 +[4] en4+ rank 0x4 iaddr 0:4:: reach_flags 0x0 +----------------------------------- +nwi_state = { gen=0 max_if=10 #v4=5 #v6=5 reach_flags=(v4=0x0, v6=0x0) } +IPv4: +[0] en0 rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 +[1] en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] en2 rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 +[3] en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] en4 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +IPv6: +[0] en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] en1 rank 0x9 iaddr 0:1:: reach_flags 0x0 +[2] en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] en3 rank 0x7 iaddr 0:3:: reach_flags 0x0 +[4] en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +5 interfaces: en0, en1, en2, en3, en4 +IPv4 traverse list: +[0] flags=0x0 en0 rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 + alias is en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] flags=0x0 en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 + alias is en1 rank 0x9 iaddr 0:1:: reach_flags 0x0 +[2] flags=0x0 en2 rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 + alias is en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] flags=0x0 en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 + alias is en3 rank 0x7 iaddr 0:3:: reach_flags 0x0 +[4] flags=0x1000 en4 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 + alias is en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +IPv6 traverse list: +[0] flags=0x0 en0 rank 0x0 iaddr :: reach_flags 0x0 + alias is en0 rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 +[1] flags=0x0 en1 rank 0x9 iaddr 0:1:: reach_flags 0x0 + alias is en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] flags=0x0 en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 + alias is en2 rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 +[3] flags=0x0 en3 rank 0x7 iaddr 0:3:: reach_flags 0x0 + alias is en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] flags=0x1000 en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 + alias is en4 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +----------------------------------- +nwi_state = { gen=0 max_if=10 #v4=10 #v6=10 reach_flags=(v4=0x0, v6=0x0) } +IPv4: +[0] en0 rank 0x0 iaddr 0.0.0.0 reach_flags 0x0 +[1] en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] en2 rank 0x2 iaddr 0.0.0.2 reach_flags 0x0 +[3] en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] en4 rank 0x4 iaddr 0.0.0.4 reach_flags 0x0 +[5] en9 rank 0x9 iaddr 0.0.0.9 reach_flags 0x0 +[6] en8 rank 0x8 iaddr 0.0.0.8 reach_flags 0x0 +[7] en7 rank 0x7 iaddr 0.0.0.7 reach_flags 0x0 +[8] en6 rank 0x6 iaddr 0.0.0.6 reach_flags 0x0 +[9] en5 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +IPv6: +[0] en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] en1 rank 0x1 iaddr 0:1:: reach_flags 0x0 +[2] en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] en3 rank 0x3 iaddr 0:3:: reach_flags 0x0 +[4] en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +[5] en5 rank 0x5 iaddr 0:5:: reach_flags 0x0 +[6] en6 rank 0x6 iaddr 0:6:: reach_flags 0x0 +[7] en7 never rank 0x7 iaddr 0:7:: reach_flags 0x0 +[8] en8 never rank 0x8 iaddr 0:8:: reach_flags 0x0 +[9] en9 never rank 0x9 iaddr 0:9:: reach_flags 0x0 +10 interfaces: en0, en1, en2, en3, en4, en5, en6, en7, en8, en9 +IPv4 traverse list: +[0] flags=0x0 en0 rank 0x0 iaddr 0.0.0.0 reach_flags 0x0 + alias is en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] flags=0x0 en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 + alias is en1 rank 0x1 iaddr 0:1:: reach_flags 0x0 +[2] flags=0x0 en2 rank 0x2 iaddr 0.0.0.2 reach_flags 0x0 + alias is en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] flags=0x0 en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 + alias is en3 rank 0x3 iaddr 0:3:: reach_flags 0x0 +[4] flags=0x0 en4 rank 0x4 iaddr 0.0.0.4 reach_flags 0x0 + alias is en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +[5] flags=0x0 en9 rank 0x9 iaddr 0.0.0.9 reach_flags 0x0 + alias is en9 never rank 0x9 iaddr 0:9:: reach_flags 0x0 +[6] flags=0x0 en8 rank 0x8 iaddr 0.0.0.8 reach_flags 0x0 + alias is en8 never rank 0x8 iaddr 0:8:: reach_flags 0x0 +[7] flags=0x0 en7 rank 0x7 iaddr 0.0.0.7 reach_flags 0x0 + alias is en7 never rank 0x7 iaddr 0:7:: reach_flags 0x0 +[8] flags=0x0 en6 rank 0x6 iaddr 0.0.0.6 reach_flags 0x0 + alias is en6 rank 0x6 iaddr 0:6:: reach_flags 0x0 +[9] flags=0x1000 en5 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 + alias is en5 rank 0x5 iaddr 0:5:: reach_flags 0x0 +IPv6 traverse list: +[0] flags=0x0 en0 rank 0x0 iaddr :: reach_flags 0x0 + alias is en0 rank 0x0 iaddr 0.0.0.0 reach_flags 0x0 +[1] flags=0x0 en1 rank 0x1 iaddr 0:1:: reach_flags 0x0 + alias is en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] flags=0x0 en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 + alias is en2 rank 0x2 iaddr 0.0.0.2 reach_flags 0x0 +[3] flags=0x0 en3 rank 0x3 iaddr 0:3:: reach_flags 0x0 + alias is en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] flags=0x0 en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 + alias is en4 rank 0x4 iaddr 0.0.0.4 reach_flags 0x0 +[5] flags=0x0 en5 rank 0x5 iaddr 0:5:: reach_flags 0x0 + alias is en5 rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +[6] flags=0x0 en6 rank 0x6 iaddr 0:6:: reach_flags 0x0 + alias is en6 rank 0x6 iaddr 0.0.0.6 reach_flags 0x0 +----------------------------------- +DIFF +nwi_state = { gen=0 max_if=15 #v4=10 #v6=10 reach_flags=(v4=0x0, v6=0x0) } +IPv4: +[0] en0! rank 0x0 iaddr 0.0.0.0 reach_flags 0x0 +[1] en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] en2! rank 0x2 iaddr 0.0.0.2 reach_flags 0x0 +[3] en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] en4! rank 0x4 iaddr 0.0.0.4 reach_flags 0x0 +[5] en9+ rank 0x9 iaddr 0.0.0.9 reach_flags 0x0 +[6] en8+ rank 0x8 iaddr 0.0.0.8 reach_flags 0x0 +[7] en7+ rank 0x7 iaddr 0.0.0.7 reach_flags 0x0 +[8] en6+ rank 0x6 iaddr 0.0.0.6 reach_flags 0x0 +[9] en5+ rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +IPv6: +[0] en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] en1/ rank 0x1 iaddr 0:1:: reach_flags 0x0 +[2] en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] en3/ rank 0x3 iaddr 0:3:: reach_flags 0x0 +[4] en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +[5] en5+ rank 0x5 iaddr 0:5:: reach_flags 0x0 +[6] en6+ rank 0x6 iaddr 0:6:: reach_flags 0x0 +[7] en7+ never rank 0x7 iaddr 0:7:: reach_flags 0x0 +[8] en8+ never rank 0x8 iaddr 0:8:: reach_flags 0x0 +[9] en9+ never rank 0x9 iaddr 0:9:: reach_flags 0x0 +----------------------------------- +DIFF +nwi_state = { gen=0 max_if=15 #v4=10 #v6=10 reach_flags=(v4=0x0, v6=0x0) } +IPv4: +[0] en0! rank 0x1 iaddr 0.0.0.1 reach_flags 0x0 +[1] en1 rank 0x0 iaddr 0.0.0.1 reach_flags 0x0 +[2] en2! rank 0x3 iaddr 0.0.0.3 reach_flags 0x0 +[3] en3 rank 0x2 iaddr 0.0.0.3 reach_flags 0x0 +[4] en4! rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +[5] en9- rank 0x9 iaddr 0.0.0.9 reach_flags 0x0 +[6] en8- rank 0x8 iaddr 0.0.0.8 reach_flags 0x0 +[7] en7- rank 0x7 iaddr 0.0.0.7 reach_flags 0x0 +[8] en6- rank 0x6 iaddr 0.0.0.6 reach_flags 0x0 +[9] en5- rank 0x5 iaddr 0.0.0.5 reach_flags 0x0 +IPv6: +[0] en0 rank 0x0 iaddr :: reach_flags 0x0 +[1] en1\ rank 0x9 iaddr 0:1:: reach_flags 0x0 +[2] en2 rank 0x2 iaddr 0:2:: reach_flags 0x0 +[3] en3\ rank 0x7 iaddr 0:3:: reach_flags 0x0 +[4] en4 rank 0x4 iaddr 0:4:: reach_flags 0x0 +[5] en5- rank 0x5 iaddr 0:5:: reach_flags 0x0 +[6] en6- rank 0x6 iaddr 0:6:: reach_flags 0x0 +[7] en7- never rank 0x7 iaddr 0:7:: reach_flags 0x0 +[8] en8- never rank 0x8 iaddr 0:8:: reach_flags 0x0 +[9] en9- never rank 0x9 iaddr 0:9:: reach_flags 0x0 +----------------------------------- diff --git a/src/configd/scselect.tproj/scselect.c b/src/configd/scselect.tproj/scselect.c index c04de5a14..8140cbdef 100644 --- a/src/configd/scselect.tproj/scselect.c +++ b/src/configd/scselect.tproj/scselect.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2009, 2011, 2012, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2009, 2011, 2012, 2014, 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@ */ @@ -134,12 +134,12 @@ main(int argc, char **argv) CFRelease(newSet); CFStringDelete(str, CFRangeMake(0, CFStringGetLength(prefix))); - newSet = CFStringCreateCopy(NULL, newSet); + newSet = CFStringCreateCopy(NULL, str); CFRelease(str); range = CFStringFind(newSet, CFSTR("/"), 0); if (range.location != kCFNotFound) { - SCPrint(TRUE, stderr, CFSTR("Set \"%@\" not available\n."), newSet); + SCPrint(TRUE, stderr, CFSTR("Set \"%@\" not available\n"), newSet); exit (1); } } @@ -282,14 +282,7 @@ main(int argc, char **argv) CFRelease(current); current = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@%@"), prefix, newSet); - if (!SCPreferencesSetValue(prefs, kSCPrefCurrentSet, current)) { - SCPrint(TRUE, stderr, - CFSTR("SCPreferencesSetValue(...,%@,%@) failed: %s\n"), - kSCPrefCurrentSet, - current, - SCErrorString(SCError())); - exit (1); - } + SCPreferencesSetValue(prefs, kSCPrefCurrentSet, current); if (!SCPreferencesCommitChanges(prefs)) { int sc_status = SCError(); diff --git a/src/configd/sctest/SCTest.h b/src/configd/sctest/SCTest.h new file mode 100644 index 000000000..b798d55e7 --- /dev/null +++ b/src/configd/sctest/SCTest.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2016 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 SCTest_h +#define SCTest_h + +#import +#import "SCTestOptions.h" +#import "SCTestUtils.h" + +@interface SCTest : NSObject + +@property (atomic, retain) NSDictionary *options; +@property (atomic) CPUUsageInfo *globalCPU; +@property (atomic) timerInfo *globalTimer; + +- (instancetype)initWithOptions:(NSDictionary *)options; +- (void)start; +- (void)cleanupAndExitWithErrorCode:(int)error; +- (BOOL)unitTest; +- (void)waitFor:(double)seconds; + ++ (NSString *)command; ++ (NSString *)commandDescription; + +@end + +#endif /* SCTest_h */ diff --git a/src/configd/sctest/SCTest.m b/src/configd/sctest/SCTest.m new file mode 100644 index 000000000..bc4ce1c70 --- /dev/null +++ b/src/configd/sctest/SCTest.m @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2016 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@ + */ + +#import "SCTest.h" + +@implementation SCTest + +- (instancetype)initWithOptions:(NSDictionary *)options +{ + self = [super init]; + if (self) { + self.options = options; + self.globalCPU = malloc(sizeof(CPUUsageInfo)); + self.globalTimer = malloc(sizeof(timerInfo)); + } + return self; +} + +- (void)dealloc +{ + if (self.globalTimer != NULL) { + free(self.globalTimer); + } + if (self.globalCPU != NULL) { + free(self.globalCPU); + } +} + ++ (NSString *)command +{ + return @"sctest"; +} + ++ (NSString *)commandDescription +{ + return @"This is a generic class"; +} + ++ (NSString *)commandHelp +{ + return @"This is a generic help"; +} + +- (void)start +{ + return; +} + +- (void)waitFor:(double)seconds +{ + dispatch_semaphore_t sem = dispatch_semaphore_create(0); + dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)); + dispatch_source_set_timer(timer, dispatch_time(DISPATCH_TIME_NOW, seconds * NSEC_PER_SEC), DISPATCH_TIME_FOREVER, 0); + dispatch_source_set_event_handler(timer, ^{ + dispatch_semaphore_signal(sem); + }); + dispatch_resume(timer); + dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER); +} + +- (void)cleanupAndExitWithErrorCode:(int)error +{ + if (self.options[kSCTestGlobalOptionTime] != nil) { + timerEnd(self.globalTimer); + SCTestLog("Time: %@ s", createUsageStringForTimer(self.globalTimer)); + } + + if (self.options[kSCTestGlobalOptionCPU] != nil) { + cpuEnd(self.globalCPU); + SCTestLog("CPU: %@", createUsageStringForCPU(self.globalCPU)); + } + + if (self.options[kSCTestGlobalOptionWait] != nil) { + return; + } + exit(error); +} + +- (BOOL)unitTest +{ + return YES; +} + +@end diff --git a/src/configd/sctest/SCTestConfigAgents.m b/src/configd/sctest/SCTestConfigAgents.m new file mode 100644 index 000000000..dd27b33bc --- /dev/null +++ b/src/configd/sctest/SCTestConfigAgents.m @@ -0,0 +1,664 @@ +/* + * Copyright (c) 2016, 2017 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@ + */ + +#import "SCTest.h" +#import "SCTestUtils.h" +#import +#import +#import + +#define TEST_DOMAIN "filemaker.com" +#define PATH_QUIESCE_TIME 1.5 // seconds + +@interface SCTestConfigAgent : SCTest +@property NSString *serviceID; +@property NSString *proxyKey; +@property NSString *dnsKey; +@property NSArray *> *testProxy; +@property NSArray *testDNS; +@property SCDynamicStoreRef store; +@property (copy) NSArray *> *pathProxy; +@property (copy) NSArray *pathDNS; +@end + +@implementation SCTestConfigAgent + +- (instancetype)initWithOptions:(NSDictionary *)options +{ + self = [super initWithOptions:options]; + if (self) { + _serviceID = @"8F66B505-EAEF-4611-BD4D-C523FD9451F0"; + _store = SCDynamicStoreCreate(kCFAllocatorDefault, + CFSTR("SCTest"), + NULL, + NULL); + _proxyKey = (__bridge_transfer NSString *)[self copyStateKeyWithServiceID:(__bridge CFStringRef)(self.serviceID) forEntity:kSCEntNetProxies]; + _dnsKey = (__bridge_transfer NSString *)[self copyStateKeyWithServiceID:(__bridge CFStringRef)(self.serviceID) forEntity:kSCEntNetDNS]; + } + return self; +} + +- (void)dealloc +{ + if (self.store != NULL) { + CFRelease(self.store); + self.store = NULL; + } +} + ++ (NSString *)command +{ + return @"config_agent"; +} + ++ (NSString *)commandDescription +{ + return @"Tests the Config Agent code path"; +} + +- (void)start +{ + if (self.options[kSCTestConfigAgentRemoveProxy]) { + [self removeFromSCDynamicStore:self.proxyKey]; + } + + if (self.options[kSCTestConfigAgentRemoveDNS]) { + [self removeFromSCDynamicStore:self.dnsKey]; + } + + NSDictionary *proxyConfig = [self parseProxyAgentOptions]; + if (proxyConfig != nil) { + [self publishToSCDynamicStore:self.proxyKey value:proxyConfig]; + self.testProxy = @[@[proxyConfig]]; + } + + NSDictionary *dnsConfig = [self parseDNSAgentOptions]; + if (dnsConfig != nil) { + [self publishToSCDynamicStore:self.dnsKey value:dnsConfig]; + self.testDNS = [self createDNSArray:dnsConfig]; + } + + [self cleanupAndExitWithErrorCode:0]; +} + +- (CFStringRef)copyStateKeyWithServiceID:(CFStringRef)serviceID + forEntity:(CFStringRef)entity +{ + return SCDynamicStoreKeyCreateNetworkServiceEntity(kCFAllocatorDefault, + kSCDynamicStoreDomainState, + serviceID, + entity); +} + +- (NSArray *)createDNSArray:(NSDictionary *)dnsConfig +{ + NSArray *dnsServers; + NSMutableArray *dnsArray; + + dnsServers = [dnsConfig objectForKey:(__bridge NSString *)kSCPropNetDNSServerAddresses]; + if (dnsServers == nil || [dnsServers count] == 0) { + return nil; + } + + dnsArray = [[NSMutableArray alloc] init]; + for (NSString *server in dnsServers) { + NWEndpoint *endpoint = (NWEndpoint *)[NWAddressEndpoint endpointWithHostname:server port:@"0"]; + [dnsArray addObject:endpoint]; + } + + return dnsArray; +} + +- (void)publishToSCDynamicStore:(NSString *)key + value:(NSDictionary *)value +{ + + BOOL ok = SCDynamicStoreSetValue(self.store, (__bridge CFStringRef)key, (__bridge CFPropertyListRef _Nonnull)(value)); + if (!ok) { + int error = SCError(); + if (error == kSCStatusNoKey) { + return; + } + SCTestLog("Could not set in SCDynamicStore: Error: %s", SCErrorString(error)); + return; + } +} + +- (void)removeFromSCDynamicStore:(NSString *)key +{ + BOOL ok = SCDynamicStoreRemoveValue(self.store, (__bridge CFStringRef)key); + if (!ok) { + int error = SCError(); + if (error == kSCStatusNoKey) { + return; + } + SCTestLog("Could not remove key: %@, Error: %s", key, SCErrorString(error)); + return; + } +} + +- (NSDictionary *)parseProxyAgentOptions +{ + NSMutableDictionary *proxyConfig = [[NSMutableDictionary alloc] init]; + +#define NS_NUMBER(x) [NSNumber numberWithInt:x] + +#define SET_PROXY_CONFIG(proxyType) \ + do { \ + if (self.options[kSCTestConfigAgent ## proxyType ## Proxy] != nil) { \ + NSString *serverAndPortString = self.options[kSCTestConfigAgent ## proxyType ## Proxy]; \ + NSArray *serverAndPortArray = [serverAndPortString componentsSeparatedByString:@":"]; \ + if ([serverAndPortArray count] != 2) { \ + SCTestLog("server address or port missing"); \ + ERR_EXIT; \ + } \ + NSString *server = [serverAndPortArray objectAtIndex:0]; \ + NSString *port = [serverAndPortArray objectAtIndex:1]; \ + [proxyConfig setObject:server forKey:(__bridge NSString *)kSCPropNetProxies ## proxyType ## Proxy]; \ + [proxyConfig setObject:NS_NUMBER(port.intValue) forKey:(__bridge NSString *)kSCPropNetProxies ## proxyType ## Port]; \ + [proxyConfig setObject:NS_NUMBER(1) forKey:(__bridge NSString *)kSCPropNetProxies ## proxyType ## Enable]; \ + } \ + } while(0); + + SET_PROXY_CONFIG(HTTP); + SET_PROXY_CONFIG(HTTPS); + SET_PROXY_CONFIG(FTP); + SET_PROXY_CONFIG(Gopher); + SET_PROXY_CONFIG(SOCKS); + + if ([proxyConfig count] > 0) { + + NSArray *domains = nil; + NSString *matchDomains = self.options[kSCTestConfigAgentProxyMatchDomain]; + if (matchDomains == nil) { + domains = @[@TEST_DOMAIN]; + } else { + domains = [matchDomains componentsSeparatedByString:@","]; + } + + [proxyConfig setObject:domains forKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains]; + } else { + proxyConfig = nil; + } + + return proxyConfig; +#undef SET_PROXY_CONFIG +} + +- (NSDictionary *)parseDNSAgentOptions +{ + NSMutableDictionary *dnsConfig; + NSString *dnsServerString; + NSString *dnsDomainString; + NSArray *dnsServers; + NSArray *dnsDomains; + + dnsConfig = [[NSMutableDictionary alloc] init]; + dnsServerString = self.options[kSCTestConfigAgentDNSServers]; + if (dnsServerString == nil) { + return nil; + } + + dnsDomainString = self.options[kSCTestConfigAgentDNSDomains]; + if (dnsDomainString == nil) { + dnsDomainString = @TEST_DOMAIN; + } + + dnsServers = [dnsServerString componentsSeparatedByString:@","]; + [dnsConfig setObject:dnsServers forKey:(__bridge NSString *)kSCPropNetDNSServerAddresses]; + + dnsDomains = [dnsDomainString componentsSeparatedByString:@","]; + [dnsConfig setObject:dnsDomains forKey:(__bridge NSString *)kSCPropNetDNSSupplementalMatchDomains]; + + return dnsConfig; +} + +- (void)cleanupAndExitWithErrorCode:(int)error +{ + CFRelease(self.store); + [super cleanupAndExitWithErrorCode:error]; +} + +- (BOOL)setup +{ + return YES; +} + +- (BOOL)unitTest +{ + if(![self setup]) { + return NO; + } + + BOOL allUnitTestsPassed = YES; + allUnitTestsPassed &= [self unitTestInstallProxy]; + allUnitTestsPassed &= [self unitTestInstallProxyWithLargeConfig]; + allUnitTestsPassed &= [self unitTestInstallProxyWithConflictingDomain]; + allUnitTestsPassed &= [self unitTestInstallDNS]; + allUnitTestsPassed &= [self unitTestInstallDNSWithConflictingDomain]; + + if(![self tearDown]) { + return NO; + } + + return allUnitTestsPassed; +} + +- (BOOL)unitTestInstallProxy +{ + BOOL success = NO; + SCTestConfigAgent *test; + NSDictionary *proxyConfig; + NSString *hostname; + NSNumber *port; + NWHostEndpoint *hostEndpoint; + NWPathEvaluator *pathEvaluator; + NSMutableDictionary *dict; + + test = [[SCTestConfigAgent alloc] initWithOptions:self.options]; + proxyConfig = [test parseProxyAgentOptions]; + if (proxyConfig == nil) { + // Use default options + proxyConfig = @{(__bridge NSString *)kSCPropNetProxiesHTTPEnable:@(1), + (__bridge NSString *)kSCPropNetProxiesHTTPPort:@(80), + (__bridge NSString *)kSCPropNetProxiesHTTPProxy:@"10.10.10.100", + (__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + } + + hostname = [[proxyConfig objectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains] objectAtIndex:0]; + port = [proxyConfig objectForKey:(__bridge NSString *)kSCPropNetProxiesHTTPPort]; + hostEndpoint = [NWHostEndpoint endpointWithHostname:hostname port:port.stringValue]; + pathEvaluator = [[NWPathEvaluator alloc] initWithEndpoint:hostEndpoint parameters:NULL]; + [pathEvaluator addObserver:test + forKeyPath:@"path" + options:NSKeyValueObservingOptionNew + context:nil]; + + do { + [test publishToSCDynamicStore:test.proxyKey value:proxyConfig]; + dict = [NSMutableDictionary dictionaryWithDictionary:proxyConfig]; + [dict removeObjectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains]; + test.testProxy = @[@[dict]]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if (![test.testProxy isEqualToArray:test.pathProxy]) { + SCTestLog("test proxy and applied proxy do not match. Test: %@, Applied: %@", test.testProxy, test.pathProxy); + break; + } + + SCTestLog("Verified the configured proxy is the same as applied proxy"); + [test removeFromSCDynamicStore:test.proxyKey]; + test.testProxy = nil; + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if (test.pathProxy != nil) { + SCTestLog("proxy applied when there is no test proxy"); + break; + } + + success = YES; + } while(0); + + [pathEvaluator removeObserver:test + forKeyPath:@"path"]; + + return success; +} + +- (BOOL)unitTestInstallDNS +{ + BOOL success = NO; + SCTestConfigAgent *test; + NSDictionary *dnsConfig; + NSString *hostname; + NWHostEndpoint *hostEndpoint; + NWPathEvaluator *pathEvaluator; + + test = [[SCTestConfigAgent alloc] initWithOptions:self.options]; + dnsConfig = [test parseDNSAgentOptions]; + if (dnsConfig == nil) { + dnsConfig = @{ (__bridge NSString *)kSCPropNetDNSServerAddresses:@[@"10.10.10.101", @"10.10.10.102", @"10.10.10.103"], + (__bridge NSString *)kSCPropNetDNSSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + } + + hostname = [[dnsConfig objectForKey:(__bridge NSString *)kSCPropNetDNSSupplementalMatchDomains] objectAtIndex:0]; + hostEndpoint = [NWHostEndpoint endpointWithHostname:hostname port:@"80"]; + pathEvaluator = [[NWPathEvaluator alloc] initWithEndpoint:hostEndpoint parameters:NULL]; + [pathEvaluator addObserver:test + forKeyPath:@"path" + options:NSKeyValueObservingOptionNew + context:nil]; + + do { + [test publishToSCDynamicStore:test.dnsKey value:dnsConfig]; + test.testDNS = [test createDNSArray:dnsConfig]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if (![test.testDNS isEqualToArray:test.pathDNS]) { + SCTestLog("test DNS and applied DNS do not match. Test: %@, Applied: %@", test.testDNS, test.pathDNS); + break; + } + + [test removeFromSCDynamicStore:test.dnsKey]; + test.testDNS = nil; + [test waitFor:PATH_QUIESCE_TIME]; + + SCTestLog("Verified that the configured DNS is same as applied DNS for a domain"); + success = YES; + } while (0); + + [pathEvaluator removeObserver:test + forKeyPath:@"path"]; + + return success; +} + +- (BOOL)unitTestInstallProxyWithLargeConfig +{ + BOOL success = NO; + SCTestConfigAgent *test; + NSString *str = @"0123456789"; + NSMutableString *largeStr; + NSDictionary *proxyConfig; + NSString *hostname; + NSNumber *port; + NWHostEndpoint *hostEndpoint; + NWPathEvaluator *pathEvaluator; + NSMutableDictionary *dict; + + test = [[SCTestConfigAgent alloc] initWithOptions:self.options]; + largeStr = [[NSMutableString alloc] init]; + for (int i = 0; i < 200; i++) { + [largeStr appendString:str]; + } + + // We imitate a proxy config worth 2K bytes. + proxyConfig = @{(__bridge NSString *)kSCPropNetProxiesHTTPEnable:@(1), + (__bridge NSString *)kSCPropNetProxiesHTTPPort:@(80), + (__bridge NSString *)kSCPropNetProxiesHTTPProxy:@"10.10.10.100", + (__bridge NSString *)kSCPropNetProxiesProxyAutoConfigJavaScript:largeStr, + (__bridge NSString *)kSCPropNetProxiesProxyAutoConfigEnable:@(1), + (__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + + hostname = [[proxyConfig objectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains] objectAtIndex:0]; + port = [proxyConfig objectForKey:(__bridge NSString *)kSCPropNetProxiesHTTPPort]; + hostEndpoint = [NWHostEndpoint endpointWithHostname:hostname port:port.stringValue]; + pathEvaluator = [[NWPathEvaluator alloc] initWithEndpoint:hostEndpoint parameters:NULL]; + [pathEvaluator addObserver:test + forKeyPath:@"path" + options:NSKeyValueObservingOptionNew + context:nil]; + + do { + [test publishToSCDynamicStore:test.proxyKey value:proxyConfig]; + dict = [NSMutableDictionary dictionaryWithDictionary:proxyConfig]; + [dict removeObjectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains]; + test.testProxy = @[@[dict]]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if ([test.testProxy isEqualToArray:test.pathProxy]) { + SCTestLog("applied proxy does not contain Out of Band Agent UUID"); + break; + } + + // Now we verify that we are able to fetch the proxy configuration from configd + for (NSArray *config in test.pathProxy) { + xpc_object_t xpcConfig = _CFXPCCreateXPCObjectFromCFObject((__bridge CFArrayRef)config); + xpc_object_t fetchedConfig = config_agent_update_proxy_information(xpcConfig); + if (fetchedConfig != nil) { + NSArray *nsConfig = (__bridge_transfer NSArray *)(_CFXPCCreateCFObjectFromXPCObject(fetchedConfig)); + test.pathProxy = @[nsConfig]; + break; + } + } + + if (![test.testProxy isEqualToArray:test.pathProxy]) { + SCTestLog("Could not fetch proxy configuration from configd. Test: %@, Applied: %@", test.testProxy, test.pathProxy); + break; + } + + SCTestLog("Verified that the proxy configuration is successfully fetched from configd"); + test.testProxy = nil; + [test removeFromSCDynamicStore:test.proxyKey]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if (test.pathProxy != nil) { + SCTestLog("proxy applied when there is no test proxy"); + break; + } + + success = YES; + } while (0); + + [pathEvaluator removeObserver:test + forKeyPath:@"path"]; + + return success; +} + +- (BOOL)unitTestInstallDNSWithConflictingDomain +{ + BOOL success = NO; + SCTestConfigAgent *test; + NSDictionary *dnsConfig; + NSString *hostname; + NWHostEndpoint *hostEndpoint; + NWPathEvaluator *pathEvaluator; + + test = [[SCTestConfigAgent alloc] initWithOptions:self.options]; + dnsConfig = @{ (__bridge NSString *)kSCPropNetDNSServerAddresses:@[@"10.10.10.101", @"10.10.10.102", @"10.10.10.103"], + (__bridge NSString *)kSCPropNetDNSSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + + hostname = [[dnsConfig objectForKey:(__bridge NSString *)kSCPropNetDNSSupplementalMatchDomains] objectAtIndex:0]; + hostEndpoint = [NWHostEndpoint endpointWithHostname:hostname port:@"80"]; + pathEvaluator = [[NWPathEvaluator alloc] initWithEndpoint:hostEndpoint parameters:NULL]; + [pathEvaluator addObserver:test + forKeyPath:@"path" + options:NSKeyValueObservingOptionNew + context:nil]; + + do { + NSDictionary *duplicateDnsConfig; + NSString *anotherFakeServiceID; + NSString *anotherDNSKey; + NSArray *array; + NSSet *testDNSSet; + NSSet *pathDNSSet; + + [test publishToSCDynamicStore:test.dnsKey value:dnsConfig]; + test.testDNS = [test createDNSArray:dnsConfig]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if (![test.testDNS isEqualToArray:test.pathDNS]) { + SCTestLog("test DNS and applied DNS do not match. Test: %@, Applied: %@", test.testDNS, test.pathDNS); + break; + } + + // Now install the conflicting DNS configuration + duplicateDnsConfig = @{ (__bridge NSString *)kSCPropNetDNSServerAddresses:@[@"10.10.10.104", @"10.10.10.105", @"10.10.10.106"], + (__bridge NSString *)kSCPropNetDNSSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + + anotherFakeServiceID = [NSUUID UUID].UUIDString; + anotherDNSKey = (__bridge_transfer NSString *)[self copyStateKeyWithServiceID:(__bridge CFStringRef)(anotherFakeServiceID) forEntity:kSCEntNetDNS]; + + [test publishToSCDynamicStore:anotherDNSKey value:duplicateDnsConfig]; + array = [test.testDNS arrayByAddingObjectsFromArray:[test createDNSArray:duplicateDnsConfig]]; + test.testDNS = array; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + + // Use NSSet for unordered comparison + testDNSSet = [NSSet setWithArray:test.testDNS]; + pathDNSSet = [NSSet setWithArray:test.pathDNS]; + success = [testDNSSet isEqualToSet:pathDNSSet]; + [test removeFromSCDynamicStore:anotherDNSKey]; + if (!success) { + SCTestLog("test DNS and applied DNS for duplicate domains do not match. Test: %@, Applied: %@", test.testDNS, test.pathDNS); + break; + } + + [test removeFromSCDynamicStore:test.dnsKey]; + test.testDNS = nil; + [test waitFor:PATH_QUIESCE_TIME]; + + SCTestLog("Verified that the configured DNS with duplicate domains is same as applied DNS for a domain"); + success = YES; + + } while (0); + + [pathEvaluator removeObserver:test + forKeyPath:@"path"]; + + return success; +} + +- (BOOL)unitTestInstallProxyWithConflictingDomain +{ + BOOL success = NO; + SCTestConfigAgent *test; + NSDictionary *proxyConfig; + NSString *hostname; + NSNumber *port; + NWHostEndpoint *hostEndpoint; + NWPathEvaluator *pathEvaluator; + + test = [[SCTestConfigAgent alloc] initWithOptions:self.options]; + proxyConfig = @{(__bridge NSString *)kSCPropNetProxiesHTTPEnable:@(1), + (__bridge NSString *)kSCPropNetProxiesHTTPPort:@(80), + (__bridge NSString *)kSCPropNetProxiesHTTPProxy:@"10.10.10.100", + (__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + + hostname = [[proxyConfig objectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains] objectAtIndex:0]; + port = [proxyConfig objectForKey:(__bridge NSString *)kSCPropNetProxiesHTTPPort]; + hostEndpoint = [NWHostEndpoint endpointWithHostname:hostname port:port.stringValue]; + pathEvaluator = [[NWPathEvaluator alloc] initWithEndpoint:hostEndpoint parameters:NULL]; + [pathEvaluator addObserver:test + forKeyPath:@"path" + options:NSKeyValueObservingOptionNew + context:nil]; + + do { + NSMutableDictionary *dict; + NSMutableDictionary *dict2; + NSDictionary *duplicateProxyConfig; + NSString *anotherFakeServiceID; + NSString *anotherProxyKey; + NSSet *testProxySet; + NSSet *pathProxySet; + + [test publishToSCDynamicStore:test.proxyKey value:proxyConfig]; + dict = [NSMutableDictionary dictionaryWithDictionary:proxyConfig]; + [dict removeObjectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains]; + test.testProxy = @[@[dict]]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + if (![test.testProxy isEqualToArray:test.pathProxy]) { + SCTestLog("test proxy and applied proxy do not match. Test: %@, Applied: %@", test.testProxy, test.pathProxy); + break; + } + + // Now install the conflicting Proxy configuration + duplicateProxyConfig = @{(__bridge NSString *)kSCPropNetProxiesHTTPSEnable:@(1), + (__bridge NSString *)kSCPropNetProxiesHTTPSPort:@(8080), + (__bridge NSString *)kSCPropNetProxiesHTTPSProxy:@"10.10.10.101", + (__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains:@[@TEST_DOMAIN], + }; + anotherFakeServiceID = [NSUUID UUID].UUIDString; + anotherProxyKey = (__bridge_transfer NSString *)[self copyStateKeyWithServiceID:(__bridge CFStringRef)(anotherFakeServiceID) forEntity:kSCEntNetProxies]; + + [test publishToSCDynamicStore:anotherProxyKey value:duplicateProxyConfig];; + dict2 = [NSMutableDictionary dictionaryWithDictionary:duplicateProxyConfig]; + [dict2 removeObjectForKey:(__bridge NSString *)kSCPropNetProxiesSupplementalMatchDomains]; + test.testProxy = @[@[dict],@[dict2]]; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + + // Use NSSet for unordered comparison + testProxySet = [NSSet setWithArray:test.testProxy]; + pathProxySet = [NSSet setWithArray:test.pathProxy]; + success = [testProxySet isEqualToSet:pathProxySet]; + [test removeFromSCDynamicStore:anotherProxyKey]; + if (!success) { + SCTestLog("test proxy and applied proxy for duplicate domains do not match. Test: %@, Applied: %@", test.testDNS, test.pathDNS); + break; + } + + SCTestLog("Verified the configured proxy with Duplicate domains is the same as applied proxy"); + + [test removeFromSCDynamicStore:test.proxyKey]; + test.testProxy = nil; + + // Wait for the path changes to quiesce + [test waitFor:PATH_QUIESCE_TIME]; + + if (test.pathProxy != nil) { + SCTestLog("proxy applied when there is no test proxy"); + break; + } + + success = YES; + + } while(0); + + [pathEvaluator removeObserver:test + forKeyPath:@"path"]; + + return success; +} + +- (BOOL)tearDown +{ + [self removeFromSCDynamicStore:self.proxyKey]; + [self removeFromSCDynamicStore:self.dnsKey]; + return YES; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context +{ +#pragma unused(change) +#pragma unused(context) + NWPathEvaluator *pathEvaluator = (NWPathEvaluator *)object; + if ([keyPath isEqualToString:@"path"]) { + self.pathProxy = pathEvaluator.path.proxySettings; + self.pathDNS = pathEvaluator.path.dnsServers; + } +} + +@end diff --git a/src/configd/sctest/SCTestDynamicStore.m b/src/configd/sctest/SCTestDynamicStore.m new file mode 100644 index 000000000..31004730b --- /dev/null +++ b/src/configd/sctest/SCTestDynamicStore.m @@ -0,0 +1,396 @@ +/* + * Copyright (c) 2016, 2017 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@ + */ + +#import "SCTest.h" +#import "SCTestUtils.h" + +@interface SCTestDynamicStore : SCTest +@property SCDynamicStoreRef store; +@property dispatch_semaphore_t sem; +@property int counter; +@end + +@implementation SCTestDynamicStore + ++ (NSString *)command +{ + return @"dynamic_store"; +} + ++ (NSString *)commandDescription +{ + return @"Tests the SCDynamicStore code path"; +} + +- (instancetype)initWithOptions:(NSDictionary *)options +{ + self = [super initWithOptions:options]; + if (self) { + _store = SCDynamicStoreCreate(kCFAllocatorDefault, + CFSTR("SCTest"), + NULL, + NULL); + if (_store == NULL) { + SCTestLog("Could not create session"); + ERR_EXIT; + } + } + return self; +} + +- (void)dealloc +{ + if (self.store != NULL) { + CFRelease(self.store); + self.store = NULL; + } +} + +- (void)start +{ + CFStringRef key; + if (self.options[kSCTestDynamicStoreOptionDNS]) { + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(kCFAllocatorDefault, kSCDynamicStoreDomainState, kSCEntNetDNS); + CFPropertyListRef value = SCDynamicStoreCopyValue(self.store, key); + SCTestLog("%@ : %@", key, value); + CFRelease(key); + } + + if (self.options[kSCTestDynamicStoreOptionIPv4]) { + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(kCFAllocatorDefault, kSCDynamicStoreDomainState, kSCEntNetIPv4); + CFPropertyListRef value = SCDynamicStoreCopyValue(self.store, key); + SCTestLog("%@ : %@", key, value); + CFRelease(key); + } + + if (self.options[kSCTestDynamicStoreOptionIPv6]) { + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(kCFAllocatorDefault, kSCDynamicStoreDomainState, kSCEntNetIPv6); + CFPropertyListRef value = SCDynamicStoreCopyValue(self.store, key); + SCTestLog("%@ : %@", key, value); + CFRelease(key); + } + + if (self.options[kSCTestDynamicStoreOptionProxies]) { + key = SCDynamicStoreKeyCreateNetworkGlobalEntity(kCFAllocatorDefault, kSCDynamicStoreDomainState, kSCEntNetProxies); + CFPropertyListRef value = SCDynamicStoreCopyValue(self.store, key); + SCTestLog("%@ : %@", key, value); + CFRelease(key); + } + + [self cleanupAndExitWithErrorCode:0]; +} + +- (void)cleanupAndExitWithErrorCode:(int)error +{ + [super cleanupAndExitWithErrorCode:error]; +} + +- (BOOL)setup +{ + return YES; +} + +- (BOOL)unitTest +{ + if(![self setup]) { + return NO; + } + + BOOL allUnitTestsPassed = YES; + allUnitTestsPassed &= [self unitTestSetAndRemoveValue]; + allUnitTestsPassed &= [self unitTestCopyMultiple]; + allUnitTestsPassed &= [self unitTestSCDynamicStoreCallbackStress]; + allUnitTestsPassed &= [self unitTestSCDynamicStoreSetMultipleStress]; + + if(![self tearDown]) { + return NO; + } + + return allUnitTestsPassed; +} + +- (BOOL)tearDown +{ + return YES; +} + +- (BOOL)unitTestSetAndRemoveValue +{ + int iterations = 1000; + NSDictionary *bogusValue; + SCTestDynamicStore *test; + + test = [[SCTestDynamicStore alloc] initWithOptions:self.options]; + bogusValue = @{@"Pretty":@"Useless"}; + + for (int i = 0; i < iterations; i++) { + NSUUID *uuid = [NSUUID UUID]; + CFStringRef key; + BOOL ok; + + key = SCDynamicStoreKeyCreateNetworkServiceEntity(kCFAllocatorDefault, + CFSTR("SCTest"), + (__bridge CFStringRef)uuid.UUIDString, + kSCEntNetDNS); + ok = SCDynamicStoreSetValue(test.store, key, (__bridge CFDictionaryRef)bogusValue); + if (!ok) { + SCTestLog("Failed to set value in SCDynamicStore. Error: %s", SCErrorString(SCError())); + CFRelease(key); + return NO; + } + + ok = SCDynamicStoreRemoveValue(test.store, key); + if (!ok) { + SCTestLog("Failed to remove value from SCDynamicStore. Error: %s", SCErrorString(SCError())); + CFRelease(key); + return NO; + } + + CFRelease(key); + } + + SCTestLog("Successfully completed setAndRemove unit test"); + return YES; +} + +- (BOOL)unitTestCopyMultiple +{ + NSString *pattern; + SCTestDynamicStore *test; + CFArrayRef keyList; + int iterations = 1000; + + test = [[SCTestDynamicStore alloc] initWithOptions:self.options]; + pattern = (__bridge_transfer NSString *)SCDynamicStoreKeyCreate(kCFAllocatorDefault, + CFSTR("%@/%@/%@/%@/%@"), + kSCDynamicStoreDomainState, + kSCCompNetwork, + kSCCompInterface, + kSCCompAnyRegex, + kSCCompAnyRegex); + + keyList = SCDynamicStoreCopyKeyList(test.store, (__bridge CFStringRef)pattern); + for (int i = 0; i < iterations; i++) { + CFDictionaryRef value = SCDynamicStoreCopyMultiple(test.store, keyList, NULL); + if (value == NULL) { + SCTestLog("Failed to copy multiple values from SCDynamicStore. Error: %s", SCErrorString(SCError())); + CFRelease(keyList); + return NO; + } + CFRelease(value); + } + CFRelease(keyList); + + pattern = (__bridge_transfer NSString *)SCDynamicStoreKeyCreate(kCFAllocatorDefault, + CFSTR("%@/%@/%@/%@/%@"), + kSCDynamicStoreDomainSetup, + kSCCompNetwork, + kSCCompService, + kSCCompAnyRegex, + kSCCompAnyRegex); + + keyList = SCDynamicStoreCopyKeyList(test.store, (__bridge CFStringRef)pattern); + for (int i = 0; i < iterations; i++) { + CFDictionaryRef value = SCDynamicStoreCopyMultiple(test.store, keyList, NULL); + if (value == NULL) { + SCTestLog("Failed to copy multiple values from SCDynamicStore. Error: %s", SCErrorString(SCError())); + CFRelease(keyList); + return NO; + } + CFRelease(value); + } + CFRelease(keyList); + + SCTestLog("Successfully completed copyMultiple unit test"); + return YES; +} + +void +myTestCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *ctx) +{ +#pragma unused(store) +#pragma unused(changedKeys) + SCTestDynamicStore *test = (__bridge SCTestDynamicStore *)ctx; + test.counter++; + if (test.sem != NULL) { + dispatch_semaphore_signal(test.sem); + } +} + +- (BOOL)unitTestSCDynamicStoreCallbackStress +{ + SCTestDynamicStore *test; + int iterations = 100; + NSString *testKey = @"State:/myTestKey"; + BOOL ok; + dispatch_queue_t callbackQ; + + test = [[SCTestDynamicStore alloc] initWithOptions:self.options]; + if (test.store != NULL) { + CFRelease(test.store); + test.store = NULL; + } + + SCDynamicStoreContext ctx = {0, (__bridge void * _Nullable)(test), CFRetain, CFRelease, NULL}; + test.store = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("SCTest"), myTestCallback, &ctx); + + ok = SCDynamicStoreSetNotificationKeys(test.store, (__bridge CFArrayRef)@[testKey], NULL); + if (!ok) { + SCTestLog("Failed to set notification keys. Error: %s", SCErrorString(SCError())); + return NO; + } + + callbackQ = dispatch_queue_create("SCTestDynamicStore callback queue", NULL); + ok = SCDynamicStoreSetDispatchQueue(test.store, callbackQ); + if (!ok) { + SCTestLog("Failed to set dispatch queue. Error: %s", SCErrorString(SCError())); + return NO; + } + + for (int i = 0; i < iterations; i++) { + NSUUID *uuid = [NSUUID UUID]; + ok = SCDynamicStoreSetValue(test.store, (__bridge CFStringRef)testKey, (__bridge CFStringRef)uuid.UUIDString); + if (!ok) { + SCTestLog("Failed to set value. Error: %s", SCErrorString(SCError())); + return NO; + } + // Perform a write to Dynamic Store every 10ms. + [test waitFor:0.01]; + } + + ok = SCDynamicStoreRemoveValue(test.store, (__bridge CFStringRef)testKey); + if (!ok) { + SCTestLog("Failed to remove value. Error: %s", SCErrorString(SCError())); + return NO; + } + + if (test.counter < iterations) { + // Not all callbacks were received + SCTestLog("Not all SCDynamicStore callbacks were received (%d/%d). Something went wrong", test.counter, iterations); + return NO; + } + + SCTestLog("Successfully completed SCDynamicStore callbacks unit test"); + return YES; +} + +- (BOOL)unitTestSCDynamicStoreSetMultipleStress +{ + SCTestDynamicStore *test; + int iterations = 100; + NSMutableArray *testKeyArray; + NSMutableDictionary *testSetDictionary; + int expectedCallbackCount = 0; + BOOL ok; + dispatch_queue_t callbackQ; + uint8_t waitTime = 1; // second + + test = [[SCTestDynamicStore alloc] initWithOptions:self.options]; + if (test.store != NULL) { + CFRelease(test.store); + test.store = NULL; + } + + SCDynamicStoreContext ctx = {0, (__bridge void * _Nullable)(test), CFRetain, CFRelease, NULL}; + test.store = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("SCTest"), myTestCallback, &ctx); + test.sem = dispatch_semaphore_create(0); + + testKeyArray = [[NSMutableArray alloc] init]; + + for (int i = 0; i < iterations; i++) { + NSUUID *uuid = [NSUUID UUID]; + NSString *str = [NSString stringWithFormat:@"State:/%@", uuid]; + [testKeyArray addObject:str]; + } + + testSetDictionary = [[NSMutableDictionary alloc] init]; + for (NSString *key in testKeyArray) { + NSUUID *uuid = [NSUUID UUID]; + [testSetDictionary setObject:@[uuid.UUIDString] forKey:key]; + } + + callbackQ = dispatch_queue_create("SCTestDynamicStore callback queue", NULL); + ok = SCDynamicStoreSetNotificationKeys(test.store, (__bridge CFArrayRef)testKeyArray, NULL); + if (!ok) { + SCTestLog("Failed to set notification keys. Error: %s", SCErrorString(SCError())); + return NO; + } + + ok = SCDynamicStoreSetDispatchQueue(test.store, callbackQ); + if (!ok) { + SCTestLog("Failed to set dispatch queue. Error: %s", SCErrorString(SCError())); + return NO; + } + + ok = SCDynamicStoreSetMultiple(test.store, (__bridge CFDictionaryRef)testSetDictionary, NULL, NULL); + if (!ok) { + SCTestLog("Failed to set multiple keys. Error: %s", SCErrorString(SCError())); + return NO; + } else { + expectedCallbackCount++; // One callback for set multiple + } + + if(dispatch_semaphore_wait(test.sem, dispatch_time(DISPATCH_TIME_NOW, waitTime * NSEC_PER_SEC))) { + SCTestLog("Failed to get a callback when multiple keys are set"); + return NO; + } + + ok = SCDynamicStoreSetMultiple(test.store, NULL, NULL, (__bridge CFArrayRef)testKeyArray); + if (!ok) { + SCTestLog("Failed to set multiple keys. Error: %s", SCErrorString(SCError())); + return NO; + } else { + expectedCallbackCount++; // One callback for fake notification + } + + if(dispatch_semaphore_wait(test.sem, dispatch_time(DISPATCH_TIME_NOW, waitTime * NSEC_PER_SEC))) { + SCTestLog("Failed to get a callback when multiple keys are notified"); + return NO; + } + + ok = SCDynamicStoreSetMultiple(test.store, NULL, (__bridge CFArrayRef)testKeyArray, NULL); + if (!ok) { + SCTestLog("Failed to set multiple keys. Error: %s", SCErrorString(SCError())); + return NO; + } else { + expectedCallbackCount++; // One callback for key removal + } + + if(dispatch_semaphore_wait(test.sem, dispatch_time(DISPATCH_TIME_NOW, waitTime * NSEC_PER_SEC))) { + SCTestLog("Failed to get a callback when multiple keys are removed"); + return NO; + } + + if (test.counter < expectedCallbackCount) { + // Not all callbacks were received + SCTestLog("Not all SCDynamicStore callbacks were received (%d/%d). Something went wrong", test.counter, expectedCallbackCount); + return NO; + } + + SCTestLog("Successfully completed SCDynamicStore set multiple unit test"); + return YES; + +} + + +@end diff --git a/src/configd/sctest/SCTestOptions.h b/src/configd/sctest/SCTestOptions.h new file mode 100644 index 000000000..46be006e5 --- /dev/null +++ b/src/configd/sctest/SCTestOptions.h @@ -0,0 +1,106 @@ +// +// This file is automatically generated. DO NOT EDIT! +// To add options, see genSCTestOptions.c +// +#import +#import + +extern const NSString * const kSCTestGlobalOptionCPU; +extern const NSString * const kSCTestGlobalOptionHelp; +extern const NSString * const kSCTestGlobalOptionTime; +extern const NSString * const kSCTestGlobalOptionVerbose; +extern const NSString * const kSCTestGlobalOptionWait; +extern const NSString * const kSCTestDynamicStoreOptionDNS; +extern const NSString * const kSCTestDynamicStoreOptionIPv4; +extern const NSString * const kSCTestDynamicStoreOptionIPv6; +extern const NSString * const kSCTestDynamicStoreOptionProxies; +extern const NSString * const kSCTestPreferencesServiceList; +extern const NSString * const kSCTestPreferencesServiceOrder; +extern const NSString * const kSCTestConfigAgentDNSDomains; +extern const NSString * const kSCTestConfigAgentDNSServers; +extern const NSString * const kSCTestConfigAgentRemoveDNS; +extern const NSString * const kSCTestConfigAgentFTPProxy; +extern const NSString * const kSCTestConfigAgentGopherProxy; +extern const NSString * const kSCTestConfigAgentHTTPProxy; +extern const NSString * const kSCTestConfigAgentHTTPSProxy; +extern const NSString * const kSCTestConfigAgentProxyMatchDomain; +extern const NSString * const kSCTestConfigAgentRemoveProxy; +extern const NSString * const kSCTestConfigAgentSOCKSProxy; +extern const NSString * const kSCTestReachabilityAddress; +extern const NSString * const kSCTestReachabilityHost; +extern const NSString * const kSCTestReachabilityInterface; +extern const NSString * const kSCTestReachabilityWatch; +extern const NSString * const kSCTestUnitTestCommand; +extern const NSString * const kSCTestUnitTestListTests; +extern const NSString * const kSCTestUnitTestTestMethod; +extern const NSString * const kSCTestUnitTestTestMethodList; + + + +#define kSCTestOptionEntries \ + {"cpu", 0, NULL, 0}, \ + {"help", 0, NULL, 0}, \ + {"time", 0, NULL, 0}, \ + {"verbose", 0, NULL, 0}, \ + {"wait", 0, NULL, 0}, \ + {"dns", 0, NULL, 0}, \ + {"ipv4", 0, NULL, 0}, \ + {"ipv6", 0, NULL, 0}, \ + {"proxies", 0, NULL, 0}, \ + {"service_list", 0, NULL, 0}, \ + {"service_order", 0, NULL, 0}, \ + {"dns_domain", 1, NULL, 0}, \ + {"dns_servers", 1, NULL, 0}, \ + {"remove_dns", 0, NULL, 0}, \ + {"ftp_proxy", 1, NULL, 0}, \ + {"gopher_proxy", 1, NULL, 0}, \ + {"http_proxy", 1, NULL, 0}, \ + {"https_proxy", 1, NULL, 0}, \ + {"proxy_match_domain", 1, NULL, 0}, \ + {"remove_proxy", 0, NULL, 0}, \ + {"socks_proxy", 1, NULL, 0}, \ + {"address", 1, NULL, 0}, \ + {"host", 1, NULL, 0}, \ + {"interface", 1, NULL, 0}, \ + {"watch", 0, NULL, 0}, \ + {"command", 1, NULL, 0}, \ + {"list_tests", 0, NULL, 0}, \ + {"test_method", 1, NULL, 0}, \ + {"test_method_list", 0, NULL, 0}, \ + +#define kSCTestOptionHelp \ + "\n============== global options =============\n"\ + "-cpu : Prints the CPU usage after the test completes\n"\ + "-help : Prints this very useful help!\n"\ + "-time : Prints the time elapsed since the test was launched\n"\ + "-verbose : Enables verbose mode\n"\ + "-wait : Results in a wait for 'sctest'\n"\ + "\n============== dynamic_store options =============\n"\ + "-dns : Prints the global DNS information from the SCDynamicStore\n"\ + "-ipv4 : Prints the global IPv4 information from the SCDynamicStore\n"\ + "-ipv6 : Prints the global IPv6 information from the SCDynamicStore\n"\ + "-proxies : Prints the global Proxy information from the SCDynamicStore\n"\ + "\n============== preferences options =============\n"\ + "-service_list : Prints the Network Services list from the preferences\n"\ + "-service_order : Prints the Network Service order from the preferences\n"\ + "\n============== config_agent options =============\n"\ + "-dns_domain : Configures the DNS Servers for certain domains. A comma-separated list of domains can be specified. Default is 'apple.com'\n"\ + "-dns_servers : Configures the specified DNS Servers. A comma-separated list of IP Addresses can be specified\n"\ + "-remove_dns : Remove a dns configuration, previously configured via 'sctest'\n"\ + "-ftp_proxy : Add a proxy agent with FTP proxy. Format of the argument is 'server:port'\n"\ + "-gopher_proxy : Add a proxy agent with Gopher proxy. Format of the argument is 'server:port'\n"\ + "-http_proxy : Add a proxy agent with HTTP proxy. Format of the argument is 'server:port'\n"\ + "-https_proxy : Add a proxy agent with HTTPS proxy. Format of the argument is 'server:port'\n"\ + "-proxy_match_domain : Configures the Proxy server for certain domains. A comma-separated list of domains can be specified. Default is 'apple.com'\n"\ + "-remove_proxy : Remove a proxy configuration, previously configured via 'sctest'\n"\ + "-socks_proxy : Add a proxy agent with SOCKS proxy. Format of the argument is 'server:port'\n"\ + "\n============== reachability options =============\n"\ + "-address : Determine reachability to this address\n"\ + "-host : Determine reachability to this host\n"\ + "-interface : Determine reachability when scoped to this interface\n"\ + "-watch : Watch for reachability changes\n"\ + "\n============== unit_test options =============\n"\ + "-command : Run a unit test for a specific command. If this option is not specified, unit-tests for all commands will be run\n"\ + "-list_tests : List the test commands in a JSON format. This is for NPT compliance\n"\ + "-test_method : Runs a specific unit test. List can be obtained by using the 'test_method_list' option\n"\ + "-test_method_list : Lists all the unit tests. A specific one can be run using the 'test_method' option\n"\ diff --git a/src/configd/sctest/SCTestOptions.m b/src/configd/sctest/SCTestOptions.m new file mode 100644 index 000000000..6b1d491a9 --- /dev/null +++ b/src/configd/sctest/SCTestOptions.m @@ -0,0 +1,35 @@ +// +// This file is automatically generated. DO NOT EDIT! +// To add options, see genSCTestOptions.c +// +#import "SCTestOptions.h" + +const NSString * const kSCTestGlobalOptionCPU = @"cpu_Str"; +const NSString * const kSCTestGlobalOptionHelp = @"help_Str"; +const NSString * const kSCTestGlobalOptionTime = @"time_Str"; +const NSString * const kSCTestGlobalOptionVerbose = @"verbose_Str"; +const NSString * const kSCTestGlobalOptionWait = @"wait_Str"; +const NSString * const kSCTestDynamicStoreOptionDNS = @"dns_Str"; +const NSString * const kSCTestDynamicStoreOptionIPv4 = @"ipv4_Str"; +const NSString * const kSCTestDynamicStoreOptionIPv6 = @"ipv6_Str"; +const NSString * const kSCTestDynamicStoreOptionProxies = @"proxies_Str"; +const NSString * const kSCTestPreferencesServiceList = @"service_list_Str"; +const NSString * const kSCTestPreferencesServiceOrder = @"service_order_Str"; +const NSString * const kSCTestConfigAgentDNSDomains = @"dns_domain_Str"; +const NSString * const kSCTestConfigAgentDNSServers = @"dns_servers_Str"; +const NSString * const kSCTestConfigAgentRemoveDNS = @"remove_dns_Str"; +const NSString * const kSCTestConfigAgentFTPProxy = @"ftp_proxy_Str"; +const NSString * const kSCTestConfigAgentGopherProxy = @"gopher_proxy_Str"; +const NSString * const kSCTestConfigAgentHTTPProxy = @"http_proxy_Str"; +const NSString * const kSCTestConfigAgentHTTPSProxy = @"https_proxy_Str"; +const NSString * const kSCTestConfigAgentProxyMatchDomain = @"proxy_match_domain_Str"; +const NSString * const kSCTestConfigAgentRemoveProxy = @"remove_proxy_Str"; +const NSString * const kSCTestConfigAgentSOCKSProxy = @"socks_proxy_Str"; +const NSString * const kSCTestReachabilityAddress = @"address_Str"; +const NSString * const kSCTestReachabilityHost = @"host_Str"; +const NSString * const kSCTestReachabilityInterface = @"interface_Str"; +const NSString * const kSCTestReachabilityWatch = @"watch_Str"; +const NSString * const kSCTestUnitTestCommand = @"command_Str"; +const NSString * const kSCTestUnitTestListTests = @"list_tests_Str"; +const NSString * const kSCTestUnitTestTestMethod = @"test_method_Str"; +const NSString * const kSCTestUnitTestTestMethodList = @"test_method_list_Str"; diff --git a/src/configd/sctest/SCTestPreferences.m b/src/configd/sctest/SCTestPreferences.m new file mode 100644 index 000000000..eaae58acc --- /dev/null +++ b/src/configd/sctest/SCTestPreferences.m @@ -0,0 +1,398 @@ +/* + * Copyright (c) 2016, 2017 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@ + */ + +#import "SCTest.h" +#import "SCTestUtils.h" + +@interface SCTestPreferences : SCTest +@property SCPreferencesRef prefs; +@end + +@implementation SCTestPreferences + ++ (NSString *)command +{ + return @"preferences"; +} + ++ (NSString *)commandDescription +{ + return @"Tests the SCPreferences code path"; +} + +- (instancetype)initWithOptions:(NSDictionary *)options +{ + self = [super initWithOptions:options]; + if (self) { + _prefs = SCPreferencesCreate(kCFAllocatorDefault, CFSTR("SCTest"), NULL); + } + return self; +} + +- (void)dealloc +{ + if (self.prefs != NULL) { + CFRelease(self.prefs); + self.prefs = NULL; + } +} + +- (void)start +{ + if (self.options[kSCTestPreferencesServiceList]) { + NSDictionary *services = (__bridge NSDictionary *)SCPreferencesGetValue(self.prefs, kSCPrefNetworkServices); + if (services != nil) { + [self printNetworkServicesFromDict:services]; + } else { + SCTestLog("No services present!"); + } + } + + if (self.options[kSCTestPreferencesServiceOrder]) { + SCNetworkSetRef set = SCNetworkSetCopyCurrent(self.prefs); + NSArray *serviceID = (__bridge NSArray *)SCNetworkSetGetServiceOrder(set); + NSDictionary *services = (__bridge NSDictionary *)SCPreferencesGetValue(self.prefs, kSCPrefNetworkServices); + int counter = 1; + SCTestLog("Network service order"); + for (NSString *key in serviceID) { + NSDictionary *dict = [services objectForKey:key]; + SCTestLog("\n%d: %@\n\tUserDefinedName: %@", counter++, key, [dict objectForKey:(__bridge NSString *)kSCPropNetServiceUserDefinedName]); + } + CFRelease(set); + } + + [self cleanupAndExitWithErrorCode:0]; +} + +- (void)printNetworkServicesFromDict:(NSDictionary *)serviceDict +{ + int counter = 1; + SCTestLog("Network Services"); + for (NSString *key in serviceDict) { + NSDictionary *dict = [serviceDict objectForKey:key]; + SCTestLog("\n%d: %@\n\tUserDefinedName: %@", counter++, key, [dict objectForKey:(__bridge NSString *)kSCPropNetServiceUserDefinedName]); + } +} + +- (BOOL)unitTest +{ + BOOL allUnitTestsPassed = YES; + allUnitTestsPassed &= [self unitTestNetworkServicesSanity]; + allUnitTestsPassed &= [self unitTestPreferencesAPI]; + allUnitTestsPassed &= [self unitTestPreferencesSession]; + return allUnitTestsPassed; + +} + +- (BOOL)unitTestNetworkServicesSanity +{ + // We verify that every service has a unique name, an interface, an IPv4 config method and and IPv6 config method. + NSArray *sets; + NSDictionary *services; + SCTestPreferences *test; + + test = [[SCTestPreferences alloc] initWithOptions:self.options]; + + sets = (__bridge_transfer NSArray *)SCNetworkSetCopyAll(test.prefs); + if (sets == nil || [sets count] == 0) { + SCTestLog("No sets present!"); + return NO; + } + + services = (__bridge NSDictionary *)SCPreferencesGetValue(test.prefs, kSCPrefNetworkServices); + if (services == nil || [services count] == 0) { + SCTestLog("No services present!"); + return NO; + } + + for (id setPtr in sets) { + SCNetworkSetRef set = (__bridge SCNetworkSetRef)setPtr; + NSArray *serviceArray = nil; + NSMutableArray *serviceNameArray = nil; + NSString *setID; + + setID = (__bridge NSString *)SCNetworkSetGetSetID(set); + + serviceArray = (__bridge_transfer NSArray *)SCNetworkSetCopyServices(set); + if (serviceArray == nil) { + SCTestLog("No services in set %@!", setID); + continue; + } + + serviceNameArray = [[NSMutableArray alloc] init]; + for (id servicePTR in serviceArray) { + NSDictionary *serviceDict; + NSDictionary *ipv4Dict; + NSDictionary *ipv6Dict; + NSDictionary *ipv4ProtocolConfig; + NSDictionary *ipv6ProtocolConfig; + NSString *serviceName; + NSString *serviceID; + NSString *interfaceType; + SCNetworkServiceRef service; + SCNetworkInterfaceRef interface; + SCNetworkProtocolRef ipv4Protocol; + SCNetworkProtocolRef ipv6Protocol; + + + service = (__bridge SCNetworkServiceRef)servicePTR; + serviceID = (__bridge NSString *)SCNetworkServiceGetServiceID(service); + + serviceDict = [services objectForKey:serviceID]; + if (![serviceDict isKindOfClass:[NSDictionary class]]) { + SCTestLog("Service is not a dictionary"); + return NO; + } + + serviceName = (__bridge NSString *)SCNetworkServiceGetName(service); + if (serviceName != nil) { + // Check if the name is unique + BOOL namePresent = [serviceNameArray containsObject:serviceName]; + if (!namePresent) { + [serviceNameArray addObject:serviceName]; + } else { + SCTestLog("Duplicate services with name %@ exist", serviceName); + return NO; + } + } else { + SCTestLog("Service ID %@ does not have a name", serviceID); + return NO; + } + + interface = SCNetworkServiceGetInterface(service); + if (interface == nil) { + SCTestLog("Service %@ does not have an interface", serviceName); + return NO; + } + + interfaceType = (__bridge NSString *)SCNetworkInterfaceGetInterfaceType(interface); + if (interfaceType == nil || [interfaceType length] == 0) { + SCTestLog("Service %@ does not have an interface type", serviceName); + return NO; + } +#if TARGET_OS_IPHONE + if ([interfaceType containsString:@"CommCenter"]) { + // CommCenter services typically do not have an ipv4/v6 data OR config method. Skip such services. + continue; + } +#endif // TARGET_OS_IPHONE + ipv4Protocol = SCNetworkServiceCopyProtocol(service, kSCNetworkProtocolTypeIPv4); + ipv6Protocol = SCNetworkServiceCopyProtocol(service, kSCNetworkProtocolTypeIPv6); + + if (ipv4Protocol != NULL) { + ipv4ProtocolConfig = (__bridge NSDictionary *)SCNetworkProtocolGetConfiguration(ipv4Protocol); + if (ipv4ProtocolConfig != nil) { + ipv4Dict = [ipv4ProtocolConfig copy]; + } + CFRelease(ipv4Protocol); + } + + if (ipv6Protocol != NULL) { + ipv6ProtocolConfig = (__bridge NSDictionary *)SCNetworkProtocolGetConfiguration(ipv6Protocol); + if (ipv6ProtocolConfig != nil) { + ipv6Dict = [ipv6ProtocolConfig copy]; + } + CFRelease(ipv6Protocol); + } + + // Check that we have at least one IP config method + if (ipv4Dict == nil && ipv6Dict == nil) { + SCTestLog("Service %@ does not have an IP dictionary", serviceName); + return NO; + } + + if ([ipv4Dict objectForKey:(__bridge NSString *)kSCPropNetIPv4ConfigMethod] == nil && + [ipv6Dict objectForKey:(__bridge NSString *)kSCPropNetIPv6ConfigMethod] == nil) { + SCTestLog("Service %@ does not have an IP Config Method", serviceName); + return NO; + } + } + } + + SCTestLog("Verified that the Network Services have valid configurations"); + + return YES; +} + +- (BOOL)unitTestPreferencesSession +{ + SCPreferencesRef prefs; + prefs = SCPreferencesCreate(kCFAllocatorDefault, CFSTR("SCTest"), NULL); + if (prefs == NULL) { + SCTestLog("Failed to create SCPreferences. Error: %s", SCErrorString(SCError())); + return NO; + } else { + CFRelease(prefs); + } + + prefs = SCPreferencesCreateWithOptions(kCFAllocatorDefault, CFSTR("SCTest"), NULL, kSCPreferencesUseEntitlementAuthorization, NULL); + if (prefs == NULL) { + SCTestLog("Failed to create SCPreferences w/options. Error: %s", SCErrorString(SCError())); + return NO; + } else { + CFRelease(prefs); + } + + prefs = SCPreferencesCreateWithAuthorization(kCFAllocatorDefault, CFSTR("SCTest"), NULL, kSCPreferencesUseEntitlementAuthorization); + if (prefs == NULL) { + SCTestLog("Failed to create SCPreferences w/options. Error: %s", SCErrorString(SCError())); + return NO; + } else { + CFRelease(prefs); + } + + SCTestLog("Verified that the preferences session can be created"); + return YES; +} + +- (BOOL)unitTestPreferencesAPI +{ + BOOL ok = NO; + int iterations = 100; + NSDictionary *prefsOptions; + NSMutableArray *keys; + NSMutableArray *values; + SCTestPreferences *test; + NSArray *keyList; + + test = [[SCTestPreferences alloc] initWithOptions:self.options]; + if (test.prefs != NULL) { + CFRelease(test.prefs); + test.prefs = NULL; + } + + prefsOptions = @{(__bridge NSString *)kSCPreferencesOptionRemoveWhenEmpty:(__bridge NSNumber *)kCFBooleanTrue}; + test.prefs = SCPreferencesCreateWithOptions(kCFAllocatorDefault, + CFSTR("SCTest"), + CFSTR("SCTestPreferences.plist"), + kSCPreferencesUseEntitlementAuthorization, + (__bridge CFDictionaryRef)prefsOptions); + if (test.prefs == NULL) { + SCTestLog("Failed to create a preferences session. Error: %s", SCErrorString(SCError())); + return NO; + } + + keys = [[NSMutableArray alloc] init]; + values = [[NSMutableArray alloc] init]; + for (int i = 0; i < iterations; i++) { + NSUUID *uuidKey = [NSUUID UUID]; + NSUUID *uuidValue = [NSUUID UUID]; + + ok = SCPreferencesLock(test.prefs, true); + if (!ok) { + SCTestLog("Failed to get preferences lock. Error: %s", SCErrorString(SCError())); + return NO; + } + + ok = SCPreferencesSetValue(test.prefs, (__bridge CFStringRef)uuidKey.UUIDString, (__bridge CFStringRef)uuidValue.UUIDString); + if (!ok) { + SCTestLog("Failed to set preferences value. Error: %s", SCErrorString(SCError())); + return NO; + } + + ok = SCPreferencesUnlock(test.prefs); + if (!ok) { + SCTestLog("Failed to release preferences lock. Error: %s", SCErrorString(SCError())); + return NO; + } + + [keys addObject:uuidKey.UUIDString]; + [values addObject:uuidValue.UUIDString]; + } + + ok = SCPreferencesCommitChanges(test.prefs); + if (!ok) { + SCTestLog("Failed to commit preferences. Error: %s", SCErrorString(SCError())); + return NO; + } + + CFRelease(test.prefs); + test.prefs = SCPreferencesCreateWithOptions(kCFAllocatorDefault, + CFSTR("SCTest"), + CFSTR("SCTestPreferences.plist"), + kSCPreferencesUseEntitlementAuthorization, + (__bridge CFDictionaryRef)prefsOptions); + if (test.prefs == NULL) { + SCTestLog("Failed to create a preferences session. Error: %s", SCErrorString(SCError())); + return NO; + } + + keyList = (__bridge_transfer NSArray *)SCPreferencesCopyKeyList(test.prefs); + if ([keyList count] < [keys count]) { + SCTestLog("Failed to copy all keys from preferences. Error: %s", SCErrorString(SCError())); + return NO; + } + + for (NSString *key in keys) { + NSString *valueString = (__bridge NSString *)SCPreferencesGetValue(test.prefs, (__bridge CFStringRef)key); + if (!valueString) { + SCTestLog("Failed to get value from preferences. Error: %s", SCErrorString(SCError())); + return NO; + } + + BOOL ok = [values containsObject:valueString]; + if (!ok) { + SCTestLog("Incorrect value fetched from preferences"); + return NO; + } + } + + ok = SCPreferencesRemoveAllValues(test.prefs); + if (!ok) { + SCTestLog("Failed to remove values preferences. Error: %s", SCErrorString(SCError())); + return NO; + } + + ok = SCPreferencesCommitChanges(test.prefs); + if (!ok) { + SCTestLog("Failed to commit preferences. Error: %s", SCErrorString(SCError())); + return NO; + } + + CFRelease(test.prefs); + test.prefs = SCPreferencesCreateWithOptions(kCFAllocatorDefault, + CFSTR("SCTest"), + CFSTR("SCTestPreferences.plist"), + kSCPreferencesUseEntitlementAuthorization, + (__bridge CFDictionaryRef)prefsOptions); + if (test.prefs == NULL) { + SCTestLog("Failed to create a preferences session. Error: %s", SCErrorString(SCError())); + return NO; + } + + keyList = (__bridge_transfer NSArray *)SCPreferencesCopyKeyList(test.prefs); + if ([keyList count] > 0) { + SCTestLog("Failed to remove all keys from preferences. Error: %s", SCErrorString(SCError())); + return NO; + } + + SCTestLog("Verified that SCPreferences APIs behave as expected"); + return ok; +} + +- (void)cleanupAndExitWithErrorCode:(int)error +{ + [super cleanupAndExitWithErrorCode:error]; +} + +@end diff --git a/src/configd/sctest/SCTestReachability.m b/src/configd/sctest/SCTestReachability.m new file mode 100644 index 000000000..0045d0377 --- /dev/null +++ b/src/configd/sctest/SCTestReachability.m @@ -0,0 +1,378 @@ +/* + * Copyright (c) 2016, 2017 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@ + */ + +#import "SCTest.h" +#import "SCTestUtils.h" +#import +#import +#import + +#define REACHABILITY_TEST_HOSTNAME "apple.com" + +@interface SCTestReachability : SCTest +@property SCNetworkReachabilityRef target; +@property dispatch_queue_t callbackQ; +@end + +@implementation SCTestReachability + ++ (NSString *)command +{ + return @"reachability"; +} + ++ (NSString *)commandDescription +{ + return @"Tests the SCNetworkReachability code path"; +} + +- (instancetype)initWithOptions:(NSDictionary *)options +{ + self = [super initWithOptions:options]; + if (self) { + NSMutableDictionary *reachOptions; + if (self.options[kSCTestReachabilityInterface] != nil) { + reachOptions = [[NSMutableDictionary alloc] init]; + [reachOptions setObject:self.options[kSCTestReachabilityInterface] forKey:(__bridge NSString *)kSCNetworkReachabilityOptionInterface]; + if (self.options[kSCTestReachabilityHost] != nil) { + [reachOptions setObject:self.options[kSCTestReachabilityHost] forKey:(__bridge NSString *)kSCNetworkReachabilityOptionNodeName]; + } else if (self.options[kSCTestReachabilityAddress] != nil) { + NSData *data; + NSString *addressString = self.options[kSCTestReachabilityAddress]; + struct sockaddr *sa = _SC_string_to_sockaddr(addressString.UTF8String, AF_INET, NULL, 0); + if (sa == NULL) { + sa = _SC_string_to_sockaddr(addressString.UTF8String, AF_INET6, NULL, 0); + if (sa == NULL) { + SCTestLog("Invalid address"); + ERR_EXIT; + } + } + data = [NSData dataWithBytes:sa length:(sa->sa_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)]; + [reachOptions setObject:data forKey:(__bridge NSString *)kSCNetworkReachabilityOptionRemoteAddress]; + } + + + _target = SCNetworkReachabilityCreateWithOptions(kCFAllocatorDefault, (__bridge CFDictionaryRef)reachOptions); + } else if (self.options[kSCTestReachabilityHost]) { + NSString *host = self.options[kSCTestReachabilityHost]; + _target = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, host.UTF8String); + } else if (self.options[kSCTestReachabilityAddress]) { + NSString *addressString = self.options[kSCTestReachabilityAddress]; + struct sockaddr *sa = _SC_string_to_sockaddr(addressString.UTF8String, AF_INET, NULL, 0); + if (sa == NULL) { + sa = _SC_string_to_sockaddr(addressString.UTF8String, AF_INET6, NULL, 0); + if (sa == NULL) { + SCTestLog("Invalid address"); + ERR_EXIT; + } + } + _target = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, sa); + } + } + return self; +} + +- (void)dealloc +{ + if (self.target != NULL) { + CFRelease(self.target); + self.target = NULL; + } +} + +void +myReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) +{ +#pragma unused(target) +#pragma unused(info) + struct tm tm_now; + struct timeval tv_now; + (void)gettimeofday(&tv_now, NULL); + (void)localtime_r(&tv_now.tv_sec, &tm_now); + SCTestLog("%2d:%02d:%02d.%03d Reachability changed: %#x", tm_now.tm_hour, tm_now.tm_min, tm_now.tm_sec, tv_now.tv_usec / 1000, flags); +} + +- (void)start +{ + if (self.options[kSCTestReachabilityHost] != nil && self.options[kSCTestReachabilityAddress] != nil) { + SCTestLog("Please specify either a host or address"); + ERR_EXIT; + } + + if (self.options[kSCTestReachabilityWatch]) { + self.callbackQ = dispatch_queue_create("SCTestReachability callback queue", NULL); + SCNetworkReachabilitySetCallback(self.target, myReachabilityCallback, NULL); + SCNetworkReachabilitySetDispatchQueue(self.target, self.callbackQ); + } else { + SCNetworkReachabilityFlags flags; + SCNetworkReachabilityGetFlags(self.target, &flags); + SCTestLog("Reachability: %#x", flags); + [self cleanupAndExitWithErrorCode:0]; + } +} + +- (void)cleanupAndExitWithErrorCode:(int)error +{ + [super cleanupAndExitWithErrorCode:error]; +} + +- (NSString *)primaryInterfaceName +{ + const char *name; + NSString *nsName; + nwi_ifstate_t ifstate; + nwi_state_t nwi; + + nwi = nwi_state_copy(); + ifstate = nwi_state_get_first_ifstate(nwi, AF_INET); + if (ifstate == NULL) { + ifstate = nwi_state_get_first_ifstate(nwi, AF_INET6); + if (ifstate == NULL) { + // May be we are in airplane mode + SCTestLog("No primary interface found"); + return nil; + } + } + + name = nwi_ifstate_get_ifname(ifstate); + nsName = [NSString stringWithCString:name encoding:NSUTF8StringEncoding]; + nwi_state_release(nwi); + + return nsName; +} + +- (BOOL)setup +{ + return YES; +} + +- (BOOL)unitTest +{ + if(![self setup]) { + return NO; + } + + BOOL allUnitTestsPassed = YES; + + allUnitTestsPassed &= [self unitTestBasicReachabilityCheck]; + allUnitTestsPassed &= [self unitTestReachabilityWithPolicy]; + allUnitTestsPassed &= [self unitTestScopedReachabilityWithPolicy]; + + if(![self tearDown]) { + return NO; + } + + return allUnitTestsPassed; +} + +- (BOOL)unitTestBasicReachabilityCheck +{ + SCNetworkReachabilityFlags flags; + SCTestReachability *test; + + test = [[SCTestReachability alloc] initWithOptions:self.options]; + if ([test primaryInterfaceName] == nil) { + return YES; + } + + if (test.target == NULL) { + NSDictionary *options = @{kSCTestReachabilityHost:@REACHABILITY_TEST_HOSTNAME}; + test = [[SCTestReachability alloc] initWithOptions:options]; + } + + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags == 0) { + SCTestLog("Reachability reported not reachable"); + return NO; + } + + SCTestLog("Verified that basic reachability check succeeds"); + return YES; +} + +- (BOOL)unitTestReachabilityWithPolicy +{ + NEPolicyCondition *condition1; + NEPolicyCondition *condition2; + SCNetworkReachabilityFlags flags; + BOOL ok; + NEPolicy *policy; + NSUInteger policyID; + NEPolicyResult *result; + NEPolicySession *session; + SCTestReachability *test; + + test = [[SCTestReachability alloc] initWithOptions:self.options]; + if ([test primaryInterfaceName] == nil) { + return YES; + } + + if (test.target == NULL) { + NSDictionary *options = @{kSCTestReachabilityHost:@REACHABILITY_TEST_HOSTNAME}; + test = [[SCTestReachability alloc] initWithOptions:options]; + } + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags == 0) { + SCTestLog("Reachability reported not reachable"); + return NO; + } + + session = [[NEPolicySession alloc] init]; + if (session == nil) { + SCTestLog("Failed to create NEPolicySession"); + return NO; + } + + result = [NEPolicyResult drop]; + condition1 = [NEPolicyCondition allInterfaces]; + condition2 = [NEPolicyCondition effectivePID:getpid()]; + policy = [[NEPolicy alloc ] initWithOrder:10 result:result conditions:@[condition1, condition2]]; + policyID = [session addPolicy:policy]; + if (policyID == 0) { + SCTestLog("Failed to add policy"); + return NO; + } + + ok = [session apply]; + if (!ok) { + SCTestLog("Failed to apply policy"); + return NO; + } + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags != 0) { + SCTestLog("Reachability reported as reachable, in presence of a drop policy"); + return NO; + } + + ok = [session removeAllPolicies]; + if (!ok) { + SCTestLog("Failed to remove policies from session"); + return NO; + } + + ok = [session apply]; + if (!ok) { + SCTestLog("Failed to apply policy"); + return NO; + } + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags == 0) { + SCTestLog("Reachability reported as not reachable, in absence of a drop policy"); + return NO; + } + + SCTestLog("Verified that SCNetworkReachability reports reachability corresponding to the NECP Policies"); + return YES; +} + +- (BOOL)unitTestScopedReachabilityWithPolicy +{ + NEPolicyCondition *condition1; + NEPolicyCondition *condition2; + SCNetworkReachabilityFlags flags; + BOOL ok; + NEPolicy *policy; + NSUInteger policyID; + NSString *primaryInterface; + NEPolicyResult *result; + NEPolicySession *session; + SCTestReachability *test; + + test = [[SCTestReachability alloc] initWithOptions:self.options]; + primaryInterface = [test primaryInterfaceName]; + if (primaryInterface == nil) { + return YES; + } + + if (test.target == NULL) { + NSDictionary *options = @{kSCTestReachabilityHost:@REACHABILITY_TEST_HOSTNAME, + kSCTestReachabilityInterface:primaryInterface}; + test = [[SCTestReachability alloc] initWithOptions:options]; + } + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags == 0) { + SCTestLog("Reachability reported not reachable"); + return NO; + } + + session = [[NEPolicySession alloc] init]; + if (session == nil) { + SCTestLog("Failed to create NEPolicySession"); + return NO; + } + + result = [NEPolicyResult drop]; + condition1 = [NEPolicyCondition scopedInterface:primaryInterface]; + condition2 = [NEPolicyCondition effectivePID:getpid()]; + policy = [[NEPolicy alloc ] initWithOrder:10 result:result conditions:@[condition1, condition2]]; + policyID = [session addPolicy:policy]; + if (policyID == 0) { + SCTestLog("Failed to add policy"); + return NO; + } + + ok = [session apply]; + if (!ok) { + SCTestLog("Failed to apply policy"); + return NO; + } + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags != 0) { + SCTestLog("Reachability reported as reachable, in presence of a drop policy"); + return NO; + } + + ok = [session removeAllPolicies]; + if (!ok) { + SCTestLog("Failed to remove policies from session"); + return NO; + } + + ok = [session apply]; + if (!ok) { + SCTestLog("Failed to apply policy"); + return NO; + } + + SCNetworkReachabilityGetFlags(test.target, &flags); + if (flags == 0) { + SCTestLog("Reachability reported as not reachable, in absence of a drop policy"); + return NO; + } + + SCTestLog("Verified that SCNetworkReachability for scoped queries report reachability corresponding to the NECP Policies"); + return YES; +} + +- (BOOL)tearDown +{ + return YES; +} + +@end diff --git a/src/configd/sctest/SCTestUnitTest.m b/src/configd/sctest/SCTestUnitTest.m new file mode 100644 index 000000000..3f771c2a0 --- /dev/null +++ b/src/configd/sctest/SCTestUnitTest.m @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2016 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@ + */ + +#import "SCTest.h" +#import "SCTestUtils.h" + +@interface SCTestUnitTest : SCTest +@end + +@implementation SCTestUnitTest + ++ (NSString *)command +{ + return @"unit_test"; +} + ++ (NSString *)commandDescription +{ + return @"Runs the unit test for all commands"; +} + +- (void)listTests +{ + NSMutableDictionary *testDictionary; + NSMutableArray *testsArray; + NSString *thisClass; + NSArray *testClasses; + NSData *data; + NSString *jsonString; + + testDictionary = [[NSMutableDictionary alloc] init]; + [testDictionary setObject:@"SystemConfiguration Unit Tests" forKey:@"Name"]; + [testDictionary setObject:@"These tests exercise 'configd' and the 'SystemConfiguration' framework" forKey:@"Description"]; + + testsArray = [[NSMutableArray alloc] init]; + thisClass = NSStringFromClass([self class]); + testClasses = getTestClasses(); + for (NSString *className in testClasses) { + Class testClass; + NSMutableDictionary *subTest; + NSArray *list; + NSMutableArray *subTestArray; + + if ([className isEqualToString:thisClass] ) { + continue; + } + + testClass = NSClassFromString(className); + list = getUnitTestListForClass(testClass); + + subTest = [[NSMutableDictionary alloc] init]; + [subTest setObject:@NO forKey:@"RequiresTCPDUMP"]; + [subTest setObject:@YES forKey:@"RequiresNetwork"]; + [subTest setObject:@NO forKey:@"RequiresRoot"]; + [subTest setObject:@NO forKey:@"RequiresPowermetrics"]; + [subTest setObject:[testClass command] forKey:@"Name"]; + [subTest setObject:[testClass commandDescription] forKey:@"Description"]; + subTestArray = [[NSMutableArray alloc] init]; + for (NSString *unitTest in list) { + NSDictionary *testDict = @{@"Command":@[@"/usr/local/bin/sctest", + @"unit_test", + @"-test_method", + unitTest], + @"Name":[unitTest stringByReplacingOccurrencesOfString:@"unitTest" withString:@""], + @"Description":@"Unit test" + }; + [subTestArray addObject:testDict]; + } + [subTest setObject:subTestArray forKey:@"SubTests"]; + [testsArray addObject:subTest]; + } + [testDictionary setObject:testsArray forKey:@"Tests"]; + data = [NSJSONSerialization dataWithJSONObject:testDictionary + options:NSJSONWritingPrettyPrinted + error:nil]; + jsonString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + //SCTestLog("%@", jsonString); + SCPrint(TRUE, stderr, CFSTR("%@"), jsonString); +} + +- (void)start +{ + NSArray *testClasses; + NSString *thisClass = NSStringFromClass([self class]);; + testClasses = getTestClasses(); + BOOL errorOccured = NO; + + if (self.options[kSCTestUnitTestListTests]) { + [self listTests]; + } else if (self.options[kSCTestUnitTestTestMethodList]) { + SCTestLog("List of unit tests:"); + for (NSString *className in testClasses) { + Class testClass; + NSArray *list; + + if ([className isEqualToString:thisClass] ) { + continue; + } + + testClass = NSClassFromString(className); + if (self.options[kSCTestUnitTestCommand] != nil) { + if (![self.options[kSCTestUnitTestCommand] isEqualToString:[testClass command]]) { + // Run unit test only for a specific command + continue; + } + } + + SCTestLog("\n======= '%@' unit tests =======", [testClass command]); + list = getUnitTestListForClass(testClass); + for (NSString *unitTest in list) { + SCTestLog("%@", unitTest); + } + } + + SCTestLog("\nEach of the unit tests can be run with the 'test_method' option\n"); + } else if (self.options[kSCTestUnitTestTestMethod]) { + for (NSString *className in testClasses) { + Class testClass; + NSArray *list; + + if ([className isEqualToString:thisClass] ) { + continue; + } + + testClass = NSClassFromString(className); + if (self.options[kSCTestUnitTestCommand] != nil) { + if (![self.options[kSCTestUnitTestCommand] isEqualToString:[testClass command]]) { + // Run unit test only for a specific command + continue; + } + } + + list = getUnitTestListForClass(testClass); + for (NSString *unitTest in list) { + if ([unitTest isEqualToString:self.options[kSCTestUnitTestTestMethod]]) { + id obj = [(SCTest *)[testClass alloc] initWithOptions:self.options]; + + SCTestLog("Running unit test %@ ...", unitTest); + + SEL methodSelector = NSSelectorFromString(unitTest); + Boolean retVal = false; + if ([obj respondsToSelector:methodSelector]) { + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[obj methodSignatureForSelector:methodSelector]]; + invocation.target = obj; + invocation.selector = methodSelector; + [invocation invoke]; + [invocation getReturnValue:&retVal]; + } + + if (!retVal) { + SCTestLog("FAILED"); + errorOccured = YES; + } else { + SCTestLog("PASSED"); + } + break; + } + } + } + } else { + // This command runs unit tests for all commands. + for (NSString *className in testClasses) { + Class testClass; + id obj; + + if ([className isEqualToString:thisClass] ) { + continue; + } + + testClass = NSClassFromString(className); + if (self.options[kSCTestUnitTestCommand] != nil) { + if (![self.options[kSCTestUnitTestCommand] isEqualToString:[testClass command]]) { + // Run unit test only for a specific command + continue; + } + } + + obj = [(SCTest *)[testClass alloc] initWithOptions:self.options]; + if ([obj respondsToSelector:@selector(unitTest)]) { + SCTestLog("\n*** Running unit test for \"%@\" command ***\n", [testClass command]); + BOOL passed = [obj unitTest]; + if (!passed) { + SCTestLog("FAILED"); + errorOccured = YES; + } + } + } + } + + [self cleanupAndExitWithErrorCode:errorOccured]; +} + +- (void)cleanupAndExitWithErrorCode:(int)error +{ + [super cleanupAndExitWithErrorCode:error]; +} + +@end diff --git a/src/configd/sctest/SCTestUtils.h b/src/configd/sctest/SCTestUtils.h new file mode 100644 index 000000000..5b0714551 --- /dev/null +++ b/src/configd/sctest/SCTestUtils.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2016, 2017 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 SCTestUtils_h +#define SCTestUtils_h + +#import +#import +#import + +#define SCTestLog(fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ##__VA_ARGS__) +#define ERR_EXIT exit(1) + +typedef struct { + uint64_t user; + uint64_t sys; + uint64_t idle; +} CPUUsageInfoInner; + +typedef struct { + CPUUsageInfoInner startCPU; + CPUUsageInfoInner endCPU; +} CPUUsageInfo; + +typedef struct { + struct timespec startTime; + struct timespec endTime; +} timerInfo; + +void timerStart(timerInfo *); +void timerEnd(timerInfo *); +NSString * createUsageStringForTimer(timerInfo *); + +void cpuStart(CPUUsageInfo *); +void cpuEnd(CPUUsageInfo *); +NSString * createUsageStringForCPU(CPUUsageInfo *cpu); + +NSArray *getTestClasses(void); +NSArray *getUnitTestListForClass(Class base); +NSDictionary *getOptionsDictionary(int argc, const char **argv); + +#endif /* SCTestUtils_h */ diff --git a/src/configd/sctest/SCTestUtils.m b/src/configd/sctest/SCTestUtils.m new file mode 100644 index 000000000..d244eb24d --- /dev/null +++ b/src/configd/sctest/SCTestUtils.m @@ -0,0 +1,260 @@ +/* + * Copyright (c) 2016 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@ + */ + +#import +#import "SCTest.h" +#import "SCTestUtils.h" +#import + +NSArray * +getTestClasses() +{ + static NSMutableArray *subclassNames = nil; + Class base; + unsigned int classListCount; + Class *classList; + + if (subclassNames != nil) { + return subclassNames; + } + + base = [SCTest class]; + classListCount = 0; + classList = objc_copyClassList(&classListCount); + subclassNames = [[NSMutableArray alloc] init]; + + if (classList) { + for (unsigned int i = 0; i < classListCount; i++) { + Class superClass = class_getSuperclass(classList[i]); + while (superClass && superClass != base) { + superClass = class_getSuperclass(superClass); + } + + if (superClass == base) { + [subclassNames addObject:@(class_getName(classList[i]))]; + } + } + free(classList); + } + + [subclassNames sortUsingComparator: ^(id obj1, id obj2) { + NSString *className1 = obj1; + NSString *className2 = obj2; + return [className1 compare:className2 options:NSCaseInsensitiveSearch]; + }]; + + return subclassNames; +} + +NSArray * +getUnitTestListForClass(Class base) +{ + NSMutableArray *unitTestNames = nil; + unsigned int methodListCount = 0; + Method *methodList = NULL; + + methodList = class_copyMethodList(base, &methodListCount); + if (methodList) { + unitTestNames = [[NSMutableArray alloc] initWithCapacity:methodListCount]; + for (unsigned int i = 0; i < methodListCount; i++) { + NSString *name = @(sel_getName(method_getName(methodList[i]))); + if ([name isEqualToString:@"unitTest"]) { + continue; + } else if (![name hasPrefix:@"unitTest"]) { + continue; + } + + [unitTestNames addObject:name]; + } + free(methodList); + } + + return unitTestNames; +} + +NSDictionary * +getOptionsDictionary(int argc, const char **argv) +{ + NSMutableDictionary *options; + NSNumberFormatter *numberFormatter; + int ch; + int i; + struct option entries[] = { + kSCTestOptionEntries + }; + + options = [NSMutableDictionary dictionary]; + optind = 0; + optreset = 1; + numberFormatter = [[NSNumberFormatter alloc] init]; + + while ((ch = getopt_long_only(argc, (char * const *)argv, "", entries, &i)) == 0) { + struct option opt = entries[i]; + NSString *optKey = [NSString stringWithFormat:@"%s_Str", opt.name]; // ... "_Str" suffix is standardized across all keys. + id optVal = nil; + + if (opt.has_arg) { + // Parse the optarg + + // Attempt string + optVal = @(optarg); + + if (optVal == nil) { + // Fall back to NSData + // WARNING: Doesn't work if it contains '\0' + optVal = [NSData dataWithBytes:optarg length:strlen(optarg)]; + } else { + // Use NSNumber if the argument is a number + NSNumber *number = [numberFormatter numberFromString:optVal]; + if (number) { + optVal = number; + } + } + } else { + optVal = @YES; + } + + // Handle multiple option instances + id existingValue = options[optKey]; + if (existingValue) { + if ([existingValue isKindOfClass:[NSMutableArray class]]) { + [(NSMutableArray *)existingValue addObject:optVal]; + optVal = existingValue; + } else if ([existingValue isKindOfClass:[NSArray class]]) { + NSMutableArray *tempArray = [NSMutableArray arrayWithArray:existingValue]; + [tempArray addObject:optVal]; + optVal = tempArray; + } else { + optVal = @[existingValue, optVal]; + } + } + + options[optKey] = optVal; + } + + if (ch > 0) { + return nil; + } + + return options; +} + +static void +cpu_routine(CPUUsageInfoInner *usage) +{ + host_name_port_t host; + host_cpu_load_info_data_t host_load; + mach_msg_type_number_t count; + kern_return_t kret; + + if (usage == NULL) { + return; + } + + host = mach_host_self(); + count = HOST_CPU_LOAD_INFO_COUNT; + kret = host_statistics(host, HOST_CPU_LOAD_INFO, (host_info_t)&host_load, &count); + if (kret) { + return; + } + + // ms per tick. 1 tick is 10 ms. + usage->user = ((uint64_t)host_load.cpu_ticks[CPU_STATE_USER]) * 10; + usage->sys = ((uint64_t)host_load.cpu_ticks[CPU_STATE_SYSTEM]) * 10; + usage->idle = ((uint64_t)host_load.cpu_ticks[CPU_STATE_IDLE]) * 10; +} + +void +cpuStart(CPUUsageInfo *cpu) +{ + cpu_routine(&cpu->startCPU); +} + +void +cpuEnd(CPUUsageInfo *cpu) +{ + cpu_routine(&cpu->endCPU); +} + +NSString * +createUsageStringForCPU(CPUUsageInfo *cpu) +{ + uint64_t userelapsed = cpu->endCPU.user - cpu->startCPU.user; + uint64_t systemelapsed = cpu->endCPU.sys - cpu->startCPU.sys; + uint64_t idleelapsed = cpu->endCPU.idle - cpu->startCPU.idle; + uint64_t totalelapsed = userelapsed + systemelapsed + idleelapsed; + double u = ((double)userelapsed * 100)/totalelapsed; + double s = ((double)systemelapsed * 100)/totalelapsed; + double i = ((double)idleelapsed * 100)/totalelapsed; + + return [NSString stringWithFormat:@"%1.02f%% user %1.02f%% sys %1.02f%% idle", u, s, i]; +} + +static void +timer_routine(struct timespec *ts) +{ + uint64_t diff; + static uint32_t orwl_timebase_numer = 0; + static uint32_t orwl_timebase_denom = 0; + static uint64_t orwl_timestart = 0; + if (orwl_timestart == 0) { + mach_timebase_info_data_t tb = { 0, 0 }; + mach_timebase_info(&tb); + orwl_timebase_numer = tb.numer; + orwl_timebase_denom = tb.denom; + orwl_timestart = mach_absolute_time(); + } + if (0 == orwl_timebase_denom) { + orwl_timebase_denom = 1; + } + diff = ((mach_absolute_time() - orwl_timestart) * orwl_timebase_numer) / orwl_timebase_denom; + ts->tv_sec = (size_t)(diff / NSEC_PER_SEC); + ts->tv_nsec = (size_t)(diff - (ts->tv_sec * NSEC_PER_SEC)); +} + +void +timerStart(timerInfo *timer) +{ + timer_routine(&timer->startTime); +} + +void +timerEnd(timerInfo *timer) +{ + timer_routine(&timer->endTime); +} + +NSString * +createUsageStringForTimer(timerInfo *timer) +{ + double elapsed; + int64_t nsecs = timer->endTime.tv_nsec - timer->startTime.tv_nsec; + uint64_t secs = timer->endTime.tv_sec - timer->startTime.tv_sec; + if (nsecs < 0) { + nsecs += NSEC_PER_SEC; + secs -= 1; + } + + elapsed = (double)secs + (double)nsecs / NSEC_PER_SEC; + return [NSString stringWithFormat:@"%f", elapsed]; +} diff --git a/src/configd/sctest/genSCTestOptions.c b/src/configd/sctest/genSCTestOptions.c new file mode 100644 index 000000000..437462220 --- /dev/null +++ b/src/configd/sctest/genSCTestOptions.c @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2016, 2017 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@ + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef struct { + const char *scope; // Either "global" or for a particular command + const char *optionString; // The option + const char *optionKey; // String representation of the key to be used to access this option's value from the "options" dictionary. + int hasArg; // no_argument, required_argument, optional_argument + const char *usageString; // help string +} SCTestOption; + +// Add the options here and then once finished, go to ${SRCROOT}/sctest/ in Terminal and type "make". +// The options should then be ready to use, through the "options" dictionary. +SCTestOption testOptions[] = { + {"global", "cpu", "kSCTestGlobalOptionCPU", no_argument, "Prints the CPU usage after the test completes"}, + {"global", "help", "kSCTestGlobalOptionHelp", no_argument, "Prints this very useful help!"}, + {"global", "time", "kSCTestGlobalOptionTime", no_argument, "Prints the time elapsed since the test was launched"}, + {"global", "verbose", "kSCTestGlobalOptionVerbose", no_argument, "Enables verbose mode"}, + {"global", "wait", "kSCTestGlobalOptionWait", no_argument, "Results in a wait for 'sctest'"}, + + {"dynamic_store", "dns", "kSCTestDynamicStoreOptionDNS", no_argument, "Prints the global DNS information from the SCDynamicStore"}, + {"dynamic_store", "ipv4", "kSCTestDynamicStoreOptionIPv4", no_argument, "Prints the global IPv4 information from the SCDynamicStore"}, + {"dynamic_store", "ipv6", "kSCTestDynamicStoreOptionIPv6", no_argument, "Prints the global IPv6 information from the SCDynamicStore"}, + {"dynamic_store", "proxies", "kSCTestDynamicStoreOptionProxies", no_argument, "Prints the global Proxy information from the SCDynamicStore"}, + + {"preferences", "service_list", "kSCTestPreferencesServiceList", no_argument, "Prints the Network Services list from the preferences"}, + {"preferences", "service_order", "kSCTestPreferencesServiceOrder", no_argument, "Prints the Network Service order from the preferences"}, + + {"config_agent", "dns_domain", "kSCTestConfigAgentDNSDomains", required_argument, "Configures the DNS Servers for certain domains. A comma-separated list of domains can be specified. Default is 'apple.com'"}, + {"config_agent", "dns_servers", "kSCTestConfigAgentDNSServers", required_argument, "Configures the specified DNS Servers. A comma-separated list of IP Addresses can be specified"}, + {"config_agent", "remove_dns", "kSCTestConfigAgentRemoveDNS", no_argument, "Remove a dns configuration, previously configured via 'sctest'"}, + + {"config_agent", "ftp_proxy", "kSCTestConfigAgentFTPProxy", required_argument, "Add a proxy agent with FTP proxy. Format of the argument is 'server:port'"}, + {"config_agent", "gopher_proxy", "kSCTestConfigAgentGopherProxy", required_argument, "Add a proxy agent with Gopher proxy. Format of the argument is 'server:port'"}, + {"config_agent", "http_proxy", "kSCTestConfigAgentHTTPProxy", required_argument, "Add a proxy agent with HTTP proxy. Format of the argument is 'server:port'"}, + {"config_agent", "https_proxy", "kSCTestConfigAgentHTTPSProxy", required_argument, "Add a proxy agent with HTTPS proxy. Format of the argument is 'server:port'"}, + {"config_agent", "proxy_match_domain", "kSCTestConfigAgentProxyMatchDomain", required_argument, "Configures the Proxy server for certain domains. A comma-separated list of domains can be specified. Default is 'apple.com'"}, + {"config_agent", "remove_proxy", "kSCTestConfigAgentRemoveProxy", no_argument, "Remove a proxy configuration, previously configured via 'sctest'"}, + {"config_agent", "socks_proxy", "kSCTestConfigAgentSOCKSProxy", required_argument, "Add a proxy agent with SOCKS proxy. Format of the argument is 'server:port'"}, + + {"reachability", "address", "kSCTestReachabilityAddress", required_argument, "Determine reachability to this address"}, + {"reachability", "host", "kSCTestReachabilityHost", required_argument, "Determine reachability to this host"}, + {"reachability", "interface", "kSCTestReachabilityInterface", required_argument, "Determine reachability when scoped to this interface"}, + {"reachability", "watch", "kSCTestReachabilityWatch", no_argument, "Watch for reachability changes"}, + + {"unit_test", "command", "kSCTestUnitTestCommand", required_argument, "Run a unit test for a specific command. If this option is not specified, unit-tests for all commands will be run"}, + {"unit_test", "list_tests", "kSCTestUnitTestListTests", no_argument, "List the test commands in a JSON format. This is for NPT compliance"}, + {"unit_test", "test_method", "kSCTestUnitTestTestMethod", required_argument, "Runs a specific unit test. List can be obtained by using the 'test_method_list' option"}, + {"unit_test", "test_method_list", "kSCTestUnitTestTestMethodList", no_argument, "Lists all the unit tests. A specific one can be run using the 'test_method' option"}, +}; + +static int testOptionsCount = (sizeof(testOptions) / sizeof(testOptions[0])); + +void +printDeclarations() +{ + // Prints to SCTestOptions.h + + const char *keyTemplate = "extern const NSString * const"; + for (int i = 0; i < testOptionsCount; i++) { + char buffer[256] = {0}; + snprintf(buffer, sizeof(buffer), "%s %s;", keyTemplate, testOptions[i].optionKey); + printf("%s\n", buffer); + } +} + +void +printOptionEntries() +{ + // Prints to SCTestOptions.h + + const char *entryTemplate = "#define kSCTestOptionEntries"; + printf("\n%s \\\n", entryTemplate); + for (int i = 0; i < testOptionsCount; i++) { + printf("\t\t{\"%s\", %d, NULL, 0}, \\", testOptions[i].optionString, testOptions[i].hasArg); + printf("\n"); + } +} + +void +printUsage() +{ + // Prints to SCTestOptions.h + + const char *usageTemplate = "#define kSCTestOptionHelp"; + printf("\n%s \\\n", usageTemplate); + const char *last = ""; + for (int i = 0; i < testOptionsCount; i++) { + if (strcmp(last, testOptions[i].scope)) { + last = testOptions[i].scope; + printf("\t\t\"\\n============== %s options =============\\n\"\\\n", testOptions[i].scope); + } + + printf("\t\t\"-%-20s: %s\\n\"\\\n", testOptions[i].optionString, testOptions[i].usageString); + } +} + +void +printDefinitions() +{ + // Prints to SCTestOptions.m + + const char *definitionTemplate = "const NSString * const"; + for (int i = 0; i < testOptionsCount; i++) { + char buffer[256] = {0}; + snprintf(buffer, sizeof(buffer), "%s %-50s= @\"%s_Str\";", definitionTemplate, testOptions[i].optionKey, testOptions[i].optionString); + printf("%s\n", buffer); + } +} + +int +main(int argc, char * argv[]) +{ + char * type = ""; + + if (argc >= 2) { + type = argv[1]; + } + + if (strcmp(type, "header") == 0) { + // Preamble + printf("//\n"); + printf("// This file is automatically generated. DO NOT EDIT!\n"); + printf("// To add options, see genSCTestOptions.c\n"); + printf("//\n"); + + // Import header files + printf("#import \n"); + printf("#import "); + + printf("\n\n"); + + // Print the declarations + printDeclarations(); + + printf("\n\n"); + + // Print the option Entries + printOptionEntries(); + + // Print the usage + printUsage(); + } else if (strcmp(type, "mfile") == 0) { + printf("//\n"); + printf("// This file is automatically generated. DO NOT EDIT!\n"); + printf("// To add options, see genSCTestOptions.c\n"); + printf("//\n"); + + // Import header files + printf("#import \"SCTestOptions.h\""); + + printf("\n\n"); + printDefinitions(); + } + return 0; +} diff --git a/src/configd/sctest/main.m b/src/configd/sctest/main.m new file mode 100644 index 000000000..e86811005 --- /dev/null +++ b/src/configd/sctest/main.m @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2016 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@ + */ + +#import "SCTest.h" +#import "SCTestUtils.h" + +static void +usage() +{ + NSArray *testClasses = getTestClasses(); + SCTestLog("\nUsage: sctest "); + SCTestLog("\nCommands:"); + for (NSString *testClassName in testClasses) { + Class testClass = NSClassFromString(testClassName); + SCTestLog(" %15s: %s", [testClass command].UTF8String, [testClass commandDescription].UTF8String); + } + + SCTestLog("\n\nOptions:"); + SCTestLog(kSCTestOptionHelp "\n"); + + ERR_EXIT; +} + +int main(int argc, const char * argv[]) { + @autoreleasepool { + NSString *testCommand; + NSArray *testClasses; + BOOL commandValid = NO; + NSDictionary *options; + Class testClass; + SCTest *testClassObject; + + if (argc == 1) { + usage(); + } + + testCommand = @(argv[1]); + // Check if the command is valid + testClasses = getTestClasses(); + for (NSString *testClassName in testClasses) { + Class testClass = NSClassFromString(testClassName); + if ([[testClass command] isEqualToString:testCommand]) { + commandValid = YES; + break; + } + + } + + if (!commandValid) { + SCTestLog("Invalid command: %@", testCommand); + usage(); + } + + // Create the options dictionary + options = getOptionsDictionary(argc, argv); + if (options == nil) { + usage(); + } + + // Initialize the command + for (NSString *className in testClasses) { + Class commandClass = NSClassFromString(className); + if ([testCommand isEqualToString:[commandClass command]]) { + testClass = commandClass; + break; + } + } + + testClassObject = [(SCTest *)[testClass alloc] initWithOptions:options]; + if (testClassObject.options[kSCTestGlobalOptionCPU] != nil) { + cpuStart(testClassObject.globalCPU); + } + + if (testClassObject.options[kSCTestGlobalOptionTime] != nil) { + timerStart(testClassObject.globalTimer); + } + + [testClassObject start]; + + dispatch_main(); + } + + return 0; +} diff --git a/src/configd/sctest/npt_configd.plist b/src/configd/sctest/npt_configd.plist new file mode 100644 index 000000000..5ece97d6d --- /dev/null +++ b/src/configd/sctest/npt_configd.plist @@ -0,0 +1,14 @@ + + + + + ID + com.apple.npt.configd + CommandList + + /usr/local/bin/sctest + unit_test + -list_tests + + + diff --git a/src/configd/sctest/sctest-entitlements.plist b/src/configd/sctest/sctest-entitlements.plist new file mode 100644 index 000000000..003ed659e --- /dev/null +++ b/src/configd/sctest/sctest-entitlements.plist @@ -0,0 +1,18 @@ + + + + + com.apple.private.nehelper.privileged + + com.apple.private.necp.policies + + com.apple.security.network.client + + com.apple.SystemConfiguration.SCPreferences-write-access + + SCTestPreferences.plist + + com.apple.SystemConfiguration.SCDynamicStore-write-access + + + diff --git a/src/configd/scutil.tproj/cache.c b/src/configd/scutil.tproj/cache.c index b8016e783..7ac2efe9e 100644 --- a/src/configd/scutil.tproj/cache.c +++ b/src/configd/scutil.tproj/cache.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2011, 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@ */ @@ -35,164 +35,13 @@ #include "scutil.h" #include "cache.h" +#include "SCDynamicStoreInternal.h" #pragma mark - #pragma mark SCDynamicStore "cache" -static Boolean use_cache = FALSE; - -static CFMutableDictionaryRef cached_keys = NULL; -static CFMutableDictionaryRef cached_set = NULL; -static CFMutableArrayRef cached_removals = NULL; -static CFMutableArrayRef cached_notifys = NULL; - - -static void -cache_open(void) -{ - if (use_cache) { - // if we are already using the cache - cache_close(); - } - - cached_keys = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - cached_set = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - cached_removals = CFArrayCreateMutable(NULL, - 0, - &kCFTypeArrayCallBacks); - cached_notifys = CFArrayCreateMutable(NULL, - 0, - &kCFTypeArrayCallBacks); - - use_cache = TRUE; - return; -} - - -static CFPropertyListRef -cache_SCDynamicStoreCopyValue(SCDynamicStoreRef store, CFStringRef key) -{ - CFPropertyListRef value; - - value = CFDictionaryGetValue(cached_set, key); - if (value) { - // if we have "set" a new value - return (CFRetain(value)); - } - - if (CFArrayContainsValue(cached_removals, - CFRangeMake(0, CFArrayGetCount(cached_removals)), - key)) { - // if we have "removed" the key - _SCErrorSet(kSCStatusNoKey); - return NULL; - } - - value = CFDictionaryGetValue(cached_keys, key); - if (value) { - // if we have a cached value - return (CFRetain(value)); - } - - value = SCDynamicStoreCopyValue(store, key); - if (value) { - CFDictionarySetValue(cached_keys, key, value); - } - - return value; -} - - -static void -cache_SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFPropertyListRef value) -{ - CFIndex i; - - i = CFArrayGetFirstIndexOfValue(cached_removals, - CFRangeMake(0, CFArrayGetCount(cached_removals)), - key); - if (i != kCFNotFound) { - // if previously "removed" - CFArrayRemoveValueAtIndex(cached_removals, i); - } - - CFDictionarySetValue(cached_set, key, value); - - return; -} - -static void -cache_SCDynamicStoreRemoveValue(SCDynamicStoreRef store, CFStringRef key) -{ - CFDictionaryRemoveValue(cached_set, key); - - if (!CFArrayContainsValue(cached_removals, - CFRangeMake(0, CFArrayGetCount(cached_removals)), - key)) { - CFArrayAppendValue(cached_removals, key); - } - - return; -} - - -static void -cache_SCDynamicStoreNotifyValue(SCDynamicStoreRef store, CFStringRef key) -{ - if (!CFArrayContainsValue(cached_notifys, - CFRangeMake(0, CFArrayGetCount(cached_notifys)), - key)) { - CFArrayAppendValue(cached_notifys, key); - } - - return; -} - - -static void -cache_write(SCDynamicStoreRef store) -{ - if ((CFDictionaryGetCount(cached_set) > 0) || - (CFArrayGetCount(cached_removals) > 0) || - (CFArrayGetCount(cached_notifys) > 0)) { - if (!SCDynamicStoreSetMultiple(store, - cached_set, - cached_removals, - cached_notifys)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - } - } - - return; -} - - -__private_extern__ -void -cache_close(void) -{ - if (!use_cache) { - return; - } - - CFRelease(cached_keys); - CFRelease(cached_set); - CFRelease(cached_removals); - CFRelease(cached_notifys); - - use_cache = FALSE; - return; -} - - #pragma mark - #pragma mark SCDynamicStore operations @@ -219,38 +68,43 @@ do_block(int argc, char **argv) return; } } else { - enable = !use_cache; // toggle + enable = !_SCDynamicStoreCacheIsActive(store); // toggle } if (enable) { // begin block of SCDynamicStore operations - if (use_cache) { + if (_SCDynamicStoreCacheIsActive(store)) { SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(kSCStatusLocked)); return; } SCPrint(TRUE, stdout, CFSTR("Begin block of SCDynamicStore operations\n")); - cache_open(); + _SCDynamicStoreCacheOpen(store); } else { - CFIndex n; + CFIndex n = 0; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; // end block of SCDynamicStore operations - if (!use_cache) { + if (!_SCDynamicStoreCacheIsActive(store)) { SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(kSCStatusNeedLock)); return; } - n = CFDictionaryGetCount(cached_keys) + - CFArrayGetCount(cached_removals) + - CFArrayGetCount(cached_notifys); + n += (storePrivate->cached_set != NULL) + ? CFDictionaryGetCount(storePrivate->cached_set) : 0; + n += (storePrivate->cached_removals != NULL) + ? CFArrayGetCount(storePrivate->cached_removals) : 0; + n += (storePrivate->cached_notifys != NULL) + ? CFArrayGetCount(storePrivate->cached_notifys) : 0; + SCPrint(TRUE, stdout, CFSTR("End block of SCDynamicStore operations%s\n"), (n > 0) ? ", posting changes" : ""); if (n > 0) { - cache_write(store); + _SCDynamicStoreCacheCommitChanges(store); } - cache_close(); + _SCDynamicStoreCacheClose(store); } return; @@ -258,7 +112,9 @@ do_block(int argc, char **argv) static CFComparisonResult -sort_keys(const void *p1, const void *p2, void *context) { +sort_keys(const void *p1, const void *p2, void *context) +{ +#pragma unused(context) CFStringRef key1 = (CFStringRef)p1; CFStringRef key2 = (CFStringRef)p2; return CFStringCompare(key1, key2, 0); @@ -272,11 +128,12 @@ __private_extern__ void do_list(int argc, char **argv) { - int i; - CFStringRef pattern; - CFArrayRef list; - CFIndex listCnt; - CFMutableArrayRef sortedList; + int i; + CFStringRef pattern; + CFArrayRef list; + CFIndex listCnt; + CFMutableArrayRef sortedList; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; pattern = CFStringCreateWithCString(NULL, (argc >= 1) ? argv[0] : ".*", @@ -289,13 +146,14 @@ do_list(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); return; } else { - if (!use_cache) { + if (!_SCDynamicStoreCacheIsActive(store)) { SCPrint(TRUE, stdout, CFSTR(" no keys.\n")); return; } else { CFIndex n; - n = CFDictionaryGetCount(cached_set); + n = (storePrivate->cached_set != NULL) + ? CFDictionaryGetCount(storePrivate->cached_set) : 0; if (n > 0) { const void * cachedKeys_q[N_QUICK]; const void ** cachedKeys = cachedKeys_q; @@ -303,7 +161,7 @@ do_list(int argc, char **argv) if (n > (CFIndex)(sizeof(cachedKeys_q) / sizeof(CFStringRef))) { cachedKeys = CFAllocatorAllocate(NULL, n * sizeof(CFStringRef), 0); } - CFDictionaryGetKeysAndValues(cached_set, cachedKeys, NULL); + CFDictionaryGetKeysAndValues(storePrivate->cached_set, cachedKeys, NULL); list = CFArrayCreate(NULL, cachedKeys, n, &kCFTypeArrayCallBacks); if (cachedKeys != cachedKeys_q) { CFAllocatorDeallocate(NULL, cachedKeys); @@ -314,8 +172,11 @@ do_list(int argc, char **argv) } } } - } else if (use_cache && - ((CFDictionaryGetCount(cached_set) > 0) || (CFArrayGetCount(cached_removals) > 0))) { + } else if (_SCDynamicStoreCacheIsActive(store) && + (((storePrivate->cached_set != NULL) && + (CFDictionaryGetCount(storePrivate->cached_set) > 0)) || + ((storePrivate->cached_removals != NULL) && + (CFArrayGetCount(storePrivate->cached_removals) > 0)))) { SCPrint(TRUE, stdout, CFSTR(" Note: SCDynamicStore transactions in progress, key list (below) may be out of date.\n\n")); } @@ -354,41 +215,20 @@ do_add(int argc, char **argv) key = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); if (argc < 2) { - if (!use_cache) { + if (!_SCDynamicStoreCacheIsActive(store)) { if (!SCDynamicStoreAddValue(store, key, value)) { SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); } } else { - CFTypeRef val; - - val = cache_SCDynamicStoreCopyValue(store, key); - if (val != NULL) { - CFRelease(val); - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(kSCStatusKeyExists)); - } else { - cache_SCDynamicStoreSetValue(store, key, value); - } + SCPrint(TRUE, stdout, CFSTR(" Cannot \"add\" with block\n")); } } else { - if (!use_cache) { + if (!_SCDynamicStoreCacheIsActive(store)) { if (!SCDynamicStoreAddTemporaryValue(store, key, value)) { SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); } } else { - CFTypeRef val; - - val = cache_SCDynamicStoreCopyValue(store, key); - if (val != NULL) { - CFRelease(val); - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(kSCStatusKeyExists)); - } else { - if (!SCDynamicStoreAddTemporaryValue(store, key, value)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - } else { - // and save the temp value in the cache too! - cache_SCDynamicStoreSetValue(store, key, value); - } - } + SCPrint(TRUE, stdout, CFSTR(" Cannot \"add temporary\" with block\n")); } } @@ -401,15 +241,12 @@ __private_extern__ void do_get(int argc, char **argv) { +#pragma unused(argc) CFStringRef key; CFPropertyListRef newValue; key = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); - if (!use_cache) { - newValue = SCDynamicStoreCopyValue(store, key); - } else { - newValue = cache_SCDynamicStoreCopyValue(store, key); - } + newValue = SCDynamicStoreCopyValue(store, key); CFRelease(key); if (newValue == NULL) { SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); @@ -429,15 +266,12 @@ __private_extern__ void do_set(int argc, char **argv) { +#pragma unused(argc) CFStringRef key; key = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); - if (!use_cache) { - if (!SCDynamicStoreSetValue(store, key, value)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - } - } else { - cache_SCDynamicStoreSetValue(store, key, value); + if (!SCDynamicStoreSetValue(store, key, value)) { + SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); } CFRelease(key); return; @@ -454,20 +288,17 @@ do_show(int argc, char **argv) key = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); if (argc == 1) { - if (!use_cache) { - newValue = SCDynamicStoreCopyValue(store, key); - } else { - newValue = cache_SCDynamicStoreCopyValue(store, key); - } + newValue = SCDynamicStoreCopyValue(store, key); } else { CFArrayRef patterns; patterns = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); - if (!use_cache) { + if (!_SCDynamicStoreCacheIsActive(store)) { newValue = SCDynamicStoreCopyMultiple(store, NULL, patterns); } else { - CFArrayRef keys; - CFMutableDictionaryRef newDict; + CFArrayRef keys; + CFMutableDictionaryRef newDict; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; newDict = CFDictionaryCreateMutable(NULL, 0, @@ -484,7 +315,7 @@ do_show(int argc, char **argv) CFTypeRef storeVal; storeKey = CFArrayGetValueAtIndex(keys, i); - storeVal = cache_SCDynamicStoreCopyValue(store, storeKey); + storeVal = SCDynamicStoreCopyValue(store, storeKey); if (storeVal != NULL) { CFDictionarySetValue(newDict, storeKey, storeVal); CFRelease(storeVal); @@ -493,7 +324,10 @@ do_show(int argc, char **argv) CFRelease(keys); } - if ((CFDictionaryGetCount(cached_set) > 0) || (CFArrayGetCount(cached_removals) > 0)) { + if (((storePrivate->cached_set != NULL) && + (CFDictionaryGetCount(storePrivate->cached_set) > 0)) || + ((storePrivate->cached_removals != NULL) && + (CFArrayGetCount(storePrivate->cached_removals) > 0))) { SCPrint(TRUE, stdout, CFSTR(" Note: SCDynamicStore locked, keys included (below) may be out of date.\n\n")); } @@ -518,15 +352,12 @@ __private_extern__ void do_remove(int argc, char **argv) { +#pragma unused(argc) CFStringRef key; key = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); - if (!use_cache) { - if (!SCDynamicStoreRemoveValue(store, key)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - } - } else { - cache_SCDynamicStoreRemoveValue(store, key); + if (!SCDynamicStoreRemoveValue(store, key)) { + SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); } CFRelease(key); return; @@ -537,15 +368,12 @@ __private_extern__ void do_notify(int argc, char **argv) { +#pragma unused(argc) CFStringRef key; key = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); - if (!use_cache) { - if (!SCDynamicStoreNotifyValue(store, key)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - } - } else { - cache_SCDynamicStoreNotifyValue(store, key); + if (!SCDynamicStoreNotifyValue(store, key)) { + SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); } CFRelease(key); return; diff --git a/src/configd/scutil.tproj/cache.h b/src/configd/scutil.tproj/cache.h index ef14ef27d..3d7155639 100644 --- a/src/configd/scutil.tproj/cache.h +++ b/src/configd/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,14 +34,12 @@ #ifndef _CACHE_H #define _CACHE_H -#include +#include #include #include __BEGIN_DECLS -void cache_close (void); - void do_block (int argc, char **argv); void do_list (int argc, char **argv); @@ -54,4 +52,4 @@ void do_notify (int argc, char **argv); __END_DECLS -#endif /* !_CACHE_H */ +#endif /* !_CACHE_H */ diff --git a/src/configd/scutil.tproj/commands.c b/src/configd/scutil.tproj/commands.c index d29719e77..aeab336d4 100644 --- a/src/configd/scutil.tproj/commands.c +++ b/src/configd/scutil.tproj/commands.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2011, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2011, 2013, 2014, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -75,7 +75,7 @@ const cmdInfo commands_store[] = { " d.show : show dictionary contents" }, { "d.add", 2, 101, do_dictSetKey, 1, 0, - " d.add key [*#?] val [v2 ...] : add information to dictionary\n" + " d.add key [*#?%] val [v2 ...] : add information to dictionary\n" " (*=array, #=number, ?=boolean, %=hex data)" }, { "d.remove", 1, 1, do_dictRemoveKey, 1, 0, @@ -131,17 +131,14 @@ const cmdInfo commands_store[] = { { "n.wait", 0, 0, do_notify_wait, 5, 2, " n.wait : wait for changes" }, - { "n.signal", 1, 2, do_notify_signal, 5, 2, - " n.signal sig [pid] : signal changes" }, - { "n.file", 0, 1, do_notify_file, 5, 2, " n.file [identifier] : watch for changes via file" }, { "n.cancel", 0, 1, do_notify_cancel, 5, 0, " n.cancel : cancel notification requests" }, - { "snapshot", 0, 0, do_snapshot, 99, 2, - " snapshot : save snapshot of store and session data" } + { "snapshot", 0, 1, do_snapshot, 99, 2, + " snapshot [file] : save snapshot of store and session data" } }; __private_extern__ const int nCommands_store = (sizeof(commands_store)/sizeof(cmdInfo)); @@ -266,7 +263,7 @@ const cmdInfo commands_prefs[] = { " d.show : show dictionary contents" }, { "d.add", 2, 101, do_dictSetKey, 1, 0, - " d.add key [*#?] val [v2 ...] : add information to dictionary\n" + " d.add key [*#?%] val [v2 ...] : add information to dictionary\n" " (*=array, #=number, ?=boolean, %=hex data)" }, { "d.remove", 1, 1, do_dictRemoveKey, 1, 0, @@ -354,6 +351,8 @@ __private_extern__ void do_help(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) int g = -1; /* current group */ int i; @@ -386,6 +385,7 @@ __private_extern__ void do_readFile(int argc, char **argv) { +#pragma unused(argc) InputRef src; /* allocate command input stream */ @@ -424,6 +424,8 @@ __private_extern__ void do_quit(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) termRequested = TRUE; return; } diff --git a/src/configd/scutil.tproj/dictionary.c b/src/configd/scutil.tproj/dictionary.c index 8361c2623..d587fa20f 100644 --- a/src/configd/scutil.tproj/dictionary.c +++ b/src/configd/scutil.tproj/dictionary.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013, 2016, 2017 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,14 +35,12 @@ #include "dictionary.h" -//#include -//#include - - __private_extern__ void do_dictInit(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (value != NULL) { CFRelease(value); } @@ -61,6 +59,8 @@ __private_extern__ void do_dictShow(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (value == NULL) { SCPrint(TRUE, stdout, CFSTR("d.show: dictionary must be initialized.\n")); return; @@ -243,6 +243,7 @@ __private_extern__ void do_dictRemoveKey(int argc, char **argv) { +#pragma unused(argc) CFStringRef key; CFMutableDictionaryRef val; diff --git a/src/configd/scutil.tproj/entitlements.plist b/src/configd/scutil.tproj/entitlements.plist new file mode 100644 index 000000000..ef8e0abbd --- /dev/null +++ b/src/configd/scutil.tproj/entitlements.plist @@ -0,0 +1,10 @@ + + + + + com.apple.private.networkextension.configuration + + com.apple.security.network.client + + + diff --git a/src/configd/scutil.tproj/nc.c b/src/configd/scutil.tproj/nc.c index 668895a4f..b4b67663b 100644 --- a/src/configd/scutil.tproj/nc.c +++ b/src/configd/scutil.tproj/nc.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2010-2014 Apple Inc. All rights reserved. + * Copyright (c) 2010-2015, 2017-2019 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@ */ @@ -44,6 +44,9 @@ #include #include +#if !TARGET_OS_SIMULATOR +#include +#endif // !TARGET_OS_SIMULATOR CFStringRef username = NULL; CFStringRef password = NULL; @@ -558,6 +561,7 @@ checkOnDemandHost(SCDynamicStoreRef store, CFStringRef nodeName, Boolean retry) static void nc_ondemand_callback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) { +#pragma unused(info) CFStringRef key = NULL; CFDictionaryRef ondemand_dict = NULL; struct tm tm_now; @@ -608,7 +612,7 @@ nc_ondemand(int argc, char **argv) } if (argc == 1) { -#if !TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_SIMULATOR if (strcmp("--refresh", argv[0]) == 0) { SCNetworkConnectionRef connection = NULL; @@ -624,7 +628,7 @@ nc_ondemand(int argc, char **argv) my_CFRelease(&connection); goto done; } -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR ondemand_nodename = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); } else if (argc != 0) { @@ -765,6 +769,8 @@ nc_print_VPN_service(SCNetworkServiceRef service) static void nc_list(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFIndex count; CFIndex i; CFArrayRef services = NULL; @@ -919,12 +925,7 @@ nc_set_application_url(CFStringRef subtype, CFStringRef directory) do_prefs_init(); /* initialization */ do_prefs_open(1, &path); /* open prefs */ - if (!SCPreferencesSetValue(prefs, CFSTR("ApplicationURL"), directory_url_data)) { - SCPrint(TRUE, stderr, - CFSTR("SCPreferencesSetValue ApplicationURL failed, %s\n"), - SCErrorString(SCError())); - goto done; - } + SCPreferencesSetValue(prefs, CFSTR("ApplicationURL"), directory_url_data); _prefs_save(); @@ -939,7 +940,7 @@ done: exit(0); } -#endif +#endif // !TARGET_OS_IPHONE /* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ @@ -966,7 +967,7 @@ nc_enablevpn(int argc, char **argv) nc_set_application_url(vendorType, argument); my_CFRelease(&argument); } -#endif +#endif // !TARGET_OS_IPHONE } exit_code = 0; @@ -998,7 +999,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) { @@ -1006,17 +1007,15 @@ nc_show(int argc, char **argv) exit(exit_code); } - serviceID = SCNetworkServiceGetServiceID(service); - - nc_get_service_type_and_subtype(service, &iftype, &ifsubtype); - - if (!CFEqual(iftype, kSCEntNetPPP) && - !CFEqual(iftype, kSCEntNetIPSec) && - !CFEqual(iftype, kSCEntNetVPN)) { + if (!_SCNetworkServiceIsVPN(service)) { SCPrint(TRUE, stderr, CFSTR("Not a connection oriented service: %@\n"), serviceID); goto done; } + serviceID = SCNetworkServiceGetServiceID(service); + + nc_get_service_type_and_subtype(service, &iftype, &ifsubtype); + type_entity_key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainSetup, serviceID, iftype); nc_print_VPN_service(service); @@ -1053,7 +1052,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) { @@ -1101,7 +1100,12 @@ nc_select(int argc, char **argv) SCNetworkSetRef current_set; int exit_code = 1; SCNetworkServiceRef service = NULL; +#if NE_HAS_ENABLE_VPN + uuid_string_t config_id_string; + uuid_t config_id; +#else // NE_HAS_ENABLE_VPN Boolean status; +#endif // NE_HAS_ENABLE_VPN do_prefs_init(); /* initialization */ do_prefs_open(0, NULL); /* open default prefs */ @@ -1118,21 +1122,34 @@ nc_select(int argc, char **argv) goto done; } +#if NE_HAS_ENABLE_VPN + memset(config_id_string, 0, sizeof(config_id_string)); + if (_SC_cfstring_to_cstring(SCNetworkServiceGetServiceID(service), config_id_string, sizeof(config_id_string), kCFStringEncodingUTF8) != NULL && + uuid_parse(config_id_string, config_id) == 0) + { + if (!NEHelperVPNSetEnabled(config_id, true)) { + SCPrint(TRUE, stderr, CFSTR("Unable to enable service\n")); + } + } else { + SCPrint(TRUE, stderr, CFSTR("Invalid service ID: %@\n"), SCNetworkServiceGetServiceID(service)); + } +#else // NE_HAS_ENABLE_VPN #if !TARGET_OS_IPHONE status = SCNetworkServiceSetEnabled(service, TRUE); if (!status) { 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(); +#endif // NE_HAS_ENABLE_VPN exit_code = 0; done: my_CFRelease(&service); @@ -1146,6 +1163,8 @@ done: static void nc_help(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) SCPrint(TRUE, stderr, CFSTR("Valid commands for scutil --nc (VPN connections)\n")); SCPrint(TRUE, stderr, CFSTR("Usage: scutil --nc [command]\n")); SCPrint(TRUE, stderr, CFSTR("\n")); @@ -1187,11 +1206,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/src/configd/scutil.tproj/net.c b/src/configd/scutil.tproj/net.c index db88330e4..d793a7c59 100644 --- a/src/configd/scutil.tproj/net.c +++ b/src/configd/scutil.tproj/net.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2007, 2009-2011, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2007, 2009-2011, 2014, 2016, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -163,9 +163,14 @@ _process_options(optionsRef options, int nOptions, int argc, char **argv, CFMuta return FALSE; } - CFDictionarySetValue(newConfiguration, - *(options[optionIndex].key), - *(choices[i].key)); + if (choices[i].key != NULL) { + CFDictionarySetValue(newConfiguration, + *(options[optionIndex].key), + *(choices[i].key)); + } else { + CFDictionaryRemoveValue(newConfiguration, + *(options[optionIndex].key)); + } } else { SCPrint(TRUE, stdout, CFSTR("invalid %s\n"), @@ -238,6 +243,34 @@ _process_options(optionsRef options, int nOptions, int argc, char **argv, CFMuta CFDictionaryRemoveValue(newConfiguration, *(options[optionIndex].key)); } + argv++; + argc--; + break; + case isBool : + if (argc < 1) { + SCPrint(TRUE, stdout, + CFSTR("%s not specified\n"), + options[optionIndex].description != NULL ? options[optionIndex].description : "enable/disable"); + return FALSE; + } + + if ((strcasecmp(argv[0], "disable") == 0) || + (strcasecmp(argv[0], "no" ) == 0) || + (strcasecmp(argv[0], "off" ) == 0) || + (strcasecmp(argv[0], "0" ) == 0)) { + CFDictionarySetValue(newConfiguration, *(options[optionIndex].key), kCFBooleanFalse); + } else if ((strcasecmp(argv[0], "enable") == 0) || + (strcasecmp(argv[0], "yes" ) == 0) || + (strcasecmp(argv[0], "on" ) == 0) || + (strcasecmp(argv[0], "1" ) == 0)) { + CFDictionarySetValue(newConfiguration, *(options[optionIndex].key), kCFBooleanTrue); + } else if (strcmp(argv[0], "") == 0) { + CFDictionaryRemoveValue(newConfiguration, *(options[optionIndex].key)); + } else { + SCPrint(TRUE, stdout, CFSTR("invalid value\n")); + return FALSE; + } + argv++; argc--; break; @@ -259,6 +292,8 @@ _process_options(optionsRef options, int nOptions, int argc, char **argv, CFMuta (strcasecmp(argv[0], "on" ) == 0) || (strcasecmp(argv[0], "1" ) == 0)) { CFDictionarySetValue(newConfiguration, *(options[optionIndex].key), CFNumberRef_1); + } else if (strcmp(argv[0], "") == 0) { + CFDictionaryRemoveValue(newConfiguration, *(options[optionIndex].key)); } else { SCPrint(TRUE, stdout, CFSTR("invalid value\n")); return FALSE; @@ -553,6 +588,8 @@ __private_extern__ void do_net_commit(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (!SCPreferencesCommitChanges(prefs)) { SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); return; @@ -567,6 +604,8 @@ __private_extern__ void do_net_apply(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (!SCPreferencesApplyChanges(prefs)) { SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); } @@ -819,23 +858,24 @@ do_net_migrate_perform(int argc, char **argv) static void do_net_migrate_validate(int argc, char **argv) { +#pragma unused(argc) char *configuration = NULL; CFURLRef configurationURL = NULL; char *expectedConfiguration = NULL; CFURLRef expectedConfigurationURL = NULL; Boolean isValid = FALSE; CFStringRef str = NULL; - + configuration = argv[0]; str = CFStringCreateWithCString(NULL, configuration, kCFStringEncodingUTF8); configurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); CFRelease(str); - + expectedConfiguration = argv[1]; str = CFStringCreateWithCString(NULL, expectedConfiguration, kCFStringEncodingUTF8); expectedConfigurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); CFRelease(str); - + isValid = _SCNetworkMigrationAreConfigurationsIdentical(configurationURL, expectedConfigurationURL); SCPrint(TRUE, stdout, CFSTR("Configuration at location %s %s\n"), configuration, isValid ? "is valid" : "is NOT valid"); @@ -860,13 +900,11 @@ do_net_migrate(int argc, char **argv) argv++; argc--; - if (strncmp(key, "perform", strlen(key)) == 0) { + if (strcmp(key, "perform") == 0) { do_net_migrate_perform(argc, argv); - } - else if (strncmp(key, "validate", strlen(key)) == 0) { + } else if (strcmp(key, "validate") == 0) { do_net_migrate_validate(argc, argv); - } - else { + } else { SCPrint(TRUE, stderr, CFSTR("migrate what?\n")); return; } @@ -976,6 +1014,8 @@ __private_extern__ void do_net_update(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) SCNetworkSetRef set; Boolean setCreated = FALSE; Boolean setUpdated = FALSE; @@ -990,67 +1030,25 @@ do_net_update(int argc, char **argv) } else { set = SCNetworkSetCopyCurrent(prefs); if (set == NULL) { - CFBundleRef bundle; - Boolean ok; - CFArrayRef sets; - CFStringRef setName = NULL; - - sets = SCNetworkSetCopyAll(prefs); - if (sets != NULL) { - CFIndex n; - - n = CFArrayGetCount(sets); - CFRelease(sets); - sets = NULL; - if (n > 0) { - SCPrint(TRUE, stdout, CFSTR("no current set\n")); - return; - } - } - - bundle = _SC_CFBundleGet(); - if (bundle != NULL) { - setName = CFBundleCopyLocalizedString(bundle, - CFSTR("DEFAULT_SET_NAME"), - CFSTR("Automatic"), - NULL); - } - if (setName == NULL) { - setName = CFSTR("Automatic"); - CFRetain(setName); - } - - set = SCNetworkSetCreate(prefs); + // if no "current" set, create a new/default ("Automatic") set + set = _SCNetworkSetCreateDefault(prefs); if (set == NULL) { SCPrint(TRUE, stdout, - CFSTR("could not initialize \"%@\": %s\n"), - setName, - SCErrorString(SCError())); - CFRelease(setName); - return; - } - - (void) SCNetworkSetSetName(set, setName); - - ok = SCNetworkSetSetCurrent(set); - if (!ok) { - SCPrint(TRUE, stdout, - CFSTR("could not initialize \"%@\": %s\n"), - setName, + CFSTR("could not initialize \"Automatic\" set: %s\n"), SCErrorString(SCError())); - (void) SCNetworkSetRemove(set); - CFRelease(setName); - CFRelease(set); return; } if (net_set != NULL) CFRelease(net_set); net_set = set; + CFRetain(set); setCreated = TRUE; - CFRelease(setName); - CFRetain(set); + if (sets != NULL) { + CFRelease(sets); + sets = NULL; + } } } @@ -1087,6 +1085,8 @@ __private_extern__ void do_net_snapshot(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (prefs == NULL) { SCPrint(TRUE, stdout, CFSTR("network configuration not open\n")); return; diff --git a/src/configd/scutil.tproj/net.h b/src/configd/scutil.tproj/net.h index d838285ae..3386d7869 100644 --- a/src/configd/scutil.tproj/net.h +++ b/src/configd/scutil.tproj/net.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2006, 2011, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2006, 2011, 2014, 2016 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -49,10 +49,11 @@ typedef enum { isHelp, isChooseOne, isChooseMultiple, - isBoolean, - isNumber, - isString, - isStringArray + isBool, // CFBoolean + isBoolean, // CFNumber (0 or 1) + isNumber, // CFNumber + isString, // CFString + isStringArray // CFArray[CFString] } optionType; typedef const struct { diff --git a/src/configd/scutil.tproj/net_interface.c b/src/configd/scutil.tproj/net_interface.c index 69d44611d..37f6fc53e 100644 --- a/src/configd/scutil.tproj/net_interface.c +++ b/src/configd/scutil.tproj/net_interface.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2011, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2011, 2013-2017, 2019 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@ */ @@ -273,6 +273,19 @@ _find_interface(int argc, char **argv, int *nArgs) goto done; } + // try to select an [Apple] pre-configured / hidden interface by its BSD name + + selected = _SCNetworkInterfaceCreateWithBSDName(NULL, select_name, kIncludeNoVirtualInterfaces); + if (selected != NULL) { + if (_SCNetworkInterfaceGetIOPath(selected) != NULL) { + // if [real] interface exists + goto done; + } + + CFRelease(selected); + selected = NULL; + } + // try to select the interface by its interface type for (i = 0; i < n; i++) { @@ -497,6 +510,7 @@ _show_interface(SCNetworkInterfaceRef interface, CFStringRef prefix, Boolean sho int mtu_cur; int mtu_min; int mtu_max; + CFDictionaryRef qosPolicy; cap_current = SCNetworkInterfaceCopyCapability(interface, NULL); if (cap_current != NULL) { @@ -551,8 +565,8 @@ _show_interface(SCNetworkInterfaceRef interface, CFStringRef prefix, Boolean sho CFNumberRef num; num = CFDictionaryGetValue(configuration, kSCPropNetEthernetMTU); - if (isA_CFNumber(num)) { - CFNumberGetValue(num, kCFNumberIntType, &mtu_req); + if (isA_CFNumber(num) && + CFNumberGetValue(num, kCFNumberIntType, &mtu_req)) { if (mtu_cur != mtu_req) { mtu_cur = mtu_req; isCurrent = ' '; @@ -682,6 +696,52 @@ _show_interface(SCNetworkInterfaceRef interface, CFStringRef prefix, Boolean sho } else { SCPrint(TRUE, stdout, CFSTR("\n")); } + + qosPolicy = SCNetworkInterfaceGetQoSMarkingPolicy(interface); + if (qosPolicy != NULL) { + CFBooleanRef bVal; + CFArrayRef bundleIDs; + Boolean needComma = FALSE; + + SCPrint(TRUE, stdout, CFSTR("%@ qos marking ="), prefix); + + bVal = CFDictionaryGetValue(qosPolicy, kSCPropNetQoSMarkingEnabled); + if ((bVal != NULL) && isA_CFBoolean(bVal)) { + SCPrint(TRUE, stdout, CFSTR(" %senabled"), + CFBooleanGetValue(bVal) ? "" : "!"); + needComma = TRUE; + } + + bVal = CFDictionaryGetValue(qosPolicy, kSCPropNetQoSMarkingAppleAudioVideoCalls); + if ((bVal != NULL) && isA_CFBoolean(bVal)) { + SCPrint(TRUE, stdout, CFSTR("%s %sapple-av"), + needComma ? "," : "", + CFBooleanGetValue(bVal) ? "" : "!"); + needComma = TRUE; + } + + bundleIDs = CFDictionaryGetValue(qosPolicy, kSCPropNetQoSMarkingWhitelistedAppIdentifiers); + if ((bundleIDs != NULL) && CFArrayGetCount(bundleIDs)) { + CFIndex n = CFArrayGetCount(bundleIDs); + + SCPrint(TRUE, stdout, CFSTR("%s applications = ("), + needComma ? "," : ""); + for (CFIndex i = 0; i < n; i++) { + CFStringRef bundleID; + + bundleID = CFArrayGetValueAtIndex(bundleIDs, i); + if (!isA_CFString(bundleID)) { + bundleID = CFSTR("--invalid-bundle-id--"); + } + SCPrint(TRUE, stdout, CFSTR("%s%@"), + (i > 0) ? ", " : "", + bundleID); + } + SCPrint(TRUE, stdout, CFSTR(")")); + } + + SCPrint(TRUE, stdout, CFSTR("\n")); + } } supported = SCNetworkInterfaceGetSupportedInterfaceTypes(interface); @@ -713,8 +773,13 @@ _show_interface(SCNetworkInterfaceRef interface, CFStringRef prefix, Boolean sho SCPrint(TRUE, stdout, CFSTR("\n")); isPhysicalEthernet = _SCNetworkInterfaceIsPhysicalEthernet(interface); - SCPrint(TRUE, stdout, CFSTR("%@ is physical ethernet = %s \n"), - prefix, (isPhysicalEthernet == TRUE) ? "YES" : "NO"); + SCPrint(TRUE, stdout, CFSTR("%@ is%s physical ethernet\n"), + prefix, + isPhysicalEthernet ? "" : " not"); + + if (_SCNetworkInterfaceIsApplePreconfigured(interface)) { + SCPrint(TRUE, stdout, CFSTR("%@ is pre-configured\n"), prefix); + } if (configuration != NULL) { CFMutableDictionaryRef effective; @@ -878,6 +943,8 @@ __private_extern__ void show_interfaces(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFIndex i; CFIndex n; @@ -988,6 +1055,9 @@ show_interfaces(int argc, char **argv) static int __doRank(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(info) +#pragma unused(newConfiguration) SCNetworkInterfaceRef interface; CFStringRef interfaceName; Boolean ok = FALSE; @@ -1070,6 +1140,85 @@ updateInterfaceConfiguration(CFMutableDictionaryRef newConfiguration) } +#pragma mark - +#pragma mark QoS Marking Policy options + + +static options qosOptions[] = { + { "enabled" , NULL, isBool , &kSCPropNetQoSMarkingEnabled , NULL, NULL }, + { "apple-av" , NULL, isBool , &kSCPropNetQoSMarkingAppleAudioVideoCalls , NULL, NULL }, + { "bundle-ids", NULL, isStringArray, &kSCPropNetQoSMarkingWhitelistedAppIdentifiers, NULL, NULL }, + + { "?" , NULL, isHelp , NULL , NULL, + "\nQoS marking policy commands\n\n" + " set interface qos [enabled {yes|no}]\n" + " set interface qos [apple-av {yes|no}]\n" + " set interface qos [bundle-ids bundle-id[,bundle-id]]\n" + } +}; +#define N_QOS_OPTIONS (sizeof(qosOptions) / sizeof(qosOptions[0])) + + +static int +__doQoSMarking(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) +{ +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) +#pragma unused(newConfiguration) + CFStringRef interfaceName; + CFMutableDictionaryRef newPolicy; + Boolean ok; + CFDictionaryRef policy; + + if (argc < 1) { + SCPrint(TRUE, stdout, CFSTR("set what?\n")); + return -1; + } + + interfaceName = SCNetworkInterfaceGetBSDName(net_interface); + if (interfaceName == NULL) { + SCPrint(TRUE, stdout, CFSTR("no BSD interface\n")); + return -1; + } + + policy = SCNetworkInterfaceGetQoSMarkingPolicy(net_interface); + if (policy != NULL) { + newPolicy = CFDictionaryCreateMutableCopy(NULL, 0, policy); + CFDictionaryRemoveValue(newPolicy, kSCResvInactive); + } else { + newPolicy = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + + ok = _process_options(qosOptions, N_QOS_OPTIONS, argc, argv, newPolicy); + if (!ok) { + goto done; + } + + if (((policy == NULL) && (CFDictionaryGetCount(newPolicy) > 0)) || + ((policy != NULL) && !CFEqual(policy, newPolicy))) { + if (!SCNetworkInterfaceSetQoSMarkingPolicy(net_interface, newPolicy)) { + if (SCError() == kSCStatusNoKey) { + SCPrint(TRUE, stdout, CFSTR("could not update per-interface QoS marking policy\n")); + } else { + SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); + } + goto done; + } + + _prefs_changed = TRUE; + } + + done : + + if (newPolicy != NULL) CFRelease(newPolicy); + return argc; +} + + #pragma mark - #pragma mark Bond options @@ -1080,8 +1229,8 @@ static options bondOptions[] = { // xxx { "-device" , ... }, { "?" , NULL , isHelp , NULL , NULL, - "\nBond configuration commands\n\n" - " set interface [mtu n] [media type] [mediaopts opts]\n" + "\nBond configuration commands\n\n" + " set interface [mtu n] [media type] [mediaopts opts]\n" } }; #define N_BOND_OPTIONS (sizeof(bondOptions) / sizeof(bondOptions[0])) @@ -1163,9 +1312,13 @@ static options airportOptions[] = { { "rank" , NULL, isOther , NULL , __doRank, NULL }, + { "qos" , NULL, isOther , NULL , __doQoSMarking, NULL }, + { "?" , NULL, isHelp , NULL , NULL, "\nAirPort configuration commands\n\n" " set interface [mtu n] [media type] [mediaopts opts]\n" + " set interface [rank [{First|Last|Never|Scoped}]]\n" + " set interface [qos ]]\n" } }; #define N_AIRPORT_OPTIONS (sizeof(airportOptions) / sizeof(airportOptions[0])) @@ -1202,6 +1355,7 @@ set_interface_airport(int argc, char **argv, CFMutableDictionaryRef newConfigura static int __doCapability(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(info) Boolean ok = FALSE; if (argc < 1) { @@ -1243,9 +1397,9 @@ __doCapability(CFStringRef key, const char *description, void *info, int argc, c static options ethernetOptions[] = { - { "mtu" , NULL, isNumber , &kSCPropNetEthernetMTU , NULL, NULL }, - { "media" , NULL, isString , &kSCPropNetEthernetMediaSubType, NULL, NULL }, - { "mediaopt" , NULL, isStringArray, &kSCPropNetEthernetMediaOptions, NULL, NULL }, + { "mtu" , NULL, isNumber , &kSCPropNetEthernetMTU , NULL, NULL }, + { "media" , NULL, isString , &kSCPropNetEthernetMediaSubType , NULL, NULL }, + { "mediaopt" , NULL, isStringArray, &kSCPropNetEthernetMediaOptions , NULL, NULL }, { "av" , NULL, isOther , &kSCPropNetEthernetCapabilityAV , __doCapability, NULL }, { "lro" , NULL, isOther , &kSCPropNetEthernetCapabilityLRO , __doCapability, NULL }, @@ -1253,11 +1407,15 @@ static options ethernetOptions[] = { { "tso" , NULL, isOther , &kSCPropNetEthernetCapabilityTSO , __doCapability, NULL }, { "txcsum" , NULL, isOther , &kSCPropNetEthernetCapabilityTXCSUM, __doCapability, NULL }, - { "rank" , NULL, isOther , NULL , __doRank, NULL }, + { "rank" , NULL, isOther , NULL , __doRank, NULL }, - { "?" , NULL, isHelp , NULL , NULL, + { "qos" , NULL, isOther , NULL , __doQoSMarking, NULL }, + + { "?" , NULL, isHelp , NULL , NULL, "\nEthernet configuration commands\n\n" " set interface [mtu n] [media type] [mediaopts opts]\n" + " set interface [rank [{First|Last|Never|Scoped}]]\n" + " set interface [qos []]\n" } }; #define N_ETHERNET_OPTIONS (sizeof(ethernetOptions) / sizeof(ethernetOptions[0])) @@ -1294,6 +1452,8 @@ set_interface_ethernet(int argc, char **argv, CFMutableDictionaryRef newConfigur static int __doIPSecSharedSecret(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFStringRef encryptionType; if (argc < 1) { @@ -1372,6 +1532,8 @@ __doIPSecSharedSecret(CFStringRef key, const char *description, void *info, int static int __doIPSecSharedSecretType(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("IPSec shared secret type mode not specified\n")); return -1; @@ -1398,6 +1560,8 @@ __doIPSecSharedSecretType(CFStringRef key, const char *description, void *info, static int __doIPSecXAuthPassword(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFStringRef encryptionType; if (argc < 1) { @@ -1477,6 +1641,8 @@ __doIPSecXAuthPassword(CFStringRef key, const char *description, void *info, int static int __doIPSecXAuthPasswordType(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("IPSec XAuth password type mode not specified\n")); return -1; @@ -1520,6 +1686,8 @@ __cleanupDomainName(CFStringRef domain) static int __doOnDemandDomains(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFMutableArrayRef domains; if (argc < 1) { @@ -1580,9 +1748,9 @@ static options ipsecOnDemandOptions[] = { { "?" , NULL , isHelp , NULL , NULL , "\nOnDemandMatch configuration commands\n\n" - " set interface OnDemandMatch always domain-name[,domain-name]\n" - " set interface OnDemandMatch retry domain-name[,domain-name]\n" - " set interface OnDemandMatch never domain-name[,domain-name]\n" + " set interface OnDemandMatch [always domain-name[,domain-name]]\n" + " set interface OnDemandMatch [retry domain-name[,domain-name]]\n" + " set interface OnDemandMatch [never domain-name[,domain-name]]\n" } }; #define N_IPSEC_ONDEMAND_OPTIONS (sizeof(ipsecOnDemandOptions) / sizeof(ipsecOnDemandOptions[0])) @@ -1591,6 +1759,9 @@ static options ipsecOnDemandOptions[] = { static int __doIPSecOnDemandMatch(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) Boolean ok; if (argc < 1) { @@ -1643,18 +1814,18 @@ static options ipsecOptions[] = { { "OnDemandMatch" , NULL, isOther , NULL , __doIPSecOnDemandMatch , NULL }, { "?" , NULL , isHelp , NULL , NULL, - "\nIPSec configuration commands\n\n" - " set interface [AuthenticationMethod {SharedSecret|Certificate|Hybrid}]\n" - " set interface [LocalIdentifier group]\n" - " set interface [LocalIdentifierType {KeyID}]\n" - " set interface [RemoteAddress name-or-address]\n" - " set interface [SharedSecret secret]\n" - " set interface [SharedSecretEncryption {Keychain}]\n" - " set interface [XAuthEnabled {enable|disable}]\n" - " set interface [XAuthPassword password]\n" - " set interface [XAuthPasswordEncryption {Keychain}]\n" - " set interface [OnDemandEnabled {enable|disable}]\n" - " set interface [OnDemandMatch ]\n" + "\nIPSec configuration commands\n\n" + " set interface [AuthenticationMethod {SharedSecret|Certificate|Hybrid}]\n" + " set interface [LocalIdentifier group]\n" + " set interface [LocalIdentifierType {KeyID}]\n" + " set interface [RemoteAddress name-or-address]\n" + " set interface [SharedSecret secret]\n" + " set interface [SharedSecretEncryption {Keychain}]\n" + " set interface [XAuthEnabled {enable|disable}]\n" + " set interface [XAuthPassword password]\n" + " set interface [XAuthPasswordEncryption {Keychain}]\n" + " set interface [OnDemandEnabled {enable|disable}]\n" + " set interface [OnDemandMatch ]\n" } }; #define N_IPSEC_OPTIONS (sizeof(ipsecOptions) / sizeof(ipsecOptions[0])) @@ -1778,6 +1949,8 @@ set_interface_modem(int argc, char **argv, CFMutableDictionaryRef newConfigurati static int __doPPPAuthPW(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFStringRef encryptionType; if (argc < 1) { @@ -1857,6 +2030,8 @@ __doPPPAuthPW(CFStringRef key, const char *description, void *info, int argc, ch static int __doPPPAuthPWType(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("PPP password type mode not specified\n")); return -1; @@ -1881,13 +2056,13 @@ __doPPPAuthPWType(CFStringRef key, const char *description, void *info, int argc static options l2tp_ipsecOptions[] = { - { "SharedSecret" , NULL, isOther , &kSCPropNetIPSecSharedSecret , __doIPSecSharedSecret , NULL }, - { "SharedSecretEncryption", NULL, isOther , &kSCPropNetIPSecSharedSecretEncryption, __doIPSecSharedSecretType, NULL }, + { "SharedSecret" , NULL, isOther , &kSCPropNetIPSecSharedSecret , __doIPSecSharedSecret , NULL }, + { "SharedSecretEncryption", NULL, isOther , &kSCPropNetIPSecSharedSecretEncryption, __doIPSecSharedSecretType, NULL }, { "?" , NULL , isHelp , NULL , NULL, - "\nIPSec configuration commands\n\n" - " set interface ipsec [SharedSecret secret]\n" - " set interface ipsec [SharedSecretEncryption {Keychain}]\n" + "\nIPSec configuration commands\n\n" + " set interface ipsec [SharedSecret secret]\n" + " set interface ipsec [SharedSecretEncryption {Keychain}]\n" } }; #define N_L2TP_IPSEC_OPTIONS (sizeof(l2tp_ipsecOptions) / sizeof(l2tp_ipsecOptions[0])) @@ -1896,6 +2071,10 @@ static options l2tp_ipsecOptions[] = { static int __doPPPIPSec(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newPPPConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) +#pragma unused(newPPPConfiguration) SCNetworkInterfaceRef childInterface; CFStringRef childInterfaceType; CFDictionaryRef configuration; @@ -2027,14 +2206,20 @@ static options pppOptions[] = { { "IdleReminder" , NULL , isBoolean , &kSCPropNetPPPIdleReminder , NULL , NULL }, { "IdleReminderTimer" , "time" , isNumber , &kSCPropNetPPPIdleReminderTimer , NULL , NULL }, { "Logfile" , "path" , isString , &kSCPropNetPPPLogfile , NULL , NULL }, +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" { "Plugins" , "plugin" , isStringArray , &kSCPropNetPPPPlugins , NULL , NULL }, +#pragma GCC diagnostic pop { "RetryConnectTime" , "time" , isNumber , &kSCPropNetPPPRetryConnectTime , NULL , NULL }, { "SessionTimer" , "time" , isNumber , &kSCPropNetPPPSessionTimer , NULL , NULL }, { "UseSessionTimer" , NULL , isBoolean , &kSCPropNetPPPUseSessionTimer , NULL , NULL }, { "VerboseLogging" , NULL , isBoolean , &kSCPropNetPPPVerboseLogging , NULL , NULL }, // --- Auth: --- +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" { "AuthEAPPlugins" , "plugin" , isStringArray , &kSCPropNetPPPAuthEAPPlugins , NULL , NULL }, +#pragma GCC diagnostic pop { "AuthName" , "account" , isString , &kSCPropNetPPPAuthName , NULL , NULL }, { "Account" , "account" , isString , &kSCPropNetPPPAuthName , NULL , NULL }, { "AuthPassword" , "password" , isOther , &kSCPropNetPPPAuthPassword , __doPPPAuthPW , NULL }, @@ -2123,6 +2308,9 @@ set_interface_ppp(int argc, char **argv, CFMutableDictionaryRef newConfiguration static Boolean set_interface_vlan(int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(argc) +#pragma unused(argv) +#pragma unused(newConfiguration) // xxxxx ("device", "tag") SCPrint(TRUE, stdout, CFSTR("vlan interface management not yet supported\n")); return FALSE; @@ -2136,6 +2324,8 @@ SCPrint(TRUE, stdout, CFSTR("vlan interface management not yet supported\n")); static int __doVPNAuthPW(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFStringRef encryptionType; if (argc < 1) { @@ -2214,6 +2404,8 @@ __doVPNAuthPW(CFStringRef key, const char *description, void *info, int argc, ch static int __doVPNAuthPWType(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("VPN password type mode not specified\n")); return -1; diff --git a/src/configd/scutil.tproj/net_protocol.c b/src/configd/scutil.tproj/net_protocol.c index 7e8f00430..f76b6e01d 100644 --- a/src/configd/scutil.tproj/net_protocol.c +++ b/src/configd/scutil.tproj/net_protocol.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2009, 2011, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2009, 2011, 2014, 2017, 2019 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@ */ @@ -44,22 +44,6 @@ /* -------------------- */ -__private_extern__ -CFComparisonResult -_compare_protocols(const void *val1, const void *val2, void *context) -{ - SCNetworkProtocolRef p1 = (SCNetworkProtocolRef)val1; - SCNetworkProtocolRef p2 = (SCNetworkProtocolRef)val2; - CFStringRef type1; - CFStringRef type2; - - type1 = SCNetworkProtocolGetProtocolType(p1); - type2 = SCNetworkProtocolGetProtocolType(p2); - - return CFStringCompare(type1, type2, 0); -} - - static CFStringRef __copyIPv4Address(const char *arg) { @@ -121,7 +105,7 @@ _find_protocol(char *match) sorted = CFArrayCreateMutableCopy(NULL, 0, protocols); CFArraySortValues(sorted, CFRangeMake(0, n), - _compare_protocols, + _SCNetworkProtocolCompare, NULL); CFRelease(protocols); protocols = sorted; @@ -386,6 +370,7 @@ __private_extern__ void select_protocol(int argc, char **argv) { +#pragma unused(argc) SCNetworkProtocolRef protocol; protocol = _find_protocol(argv[0]); @@ -429,6 +414,8 @@ __cleanupDomainName(CFStringRef domain) static int __doDNSDomain(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("DNS domain name not specified\n")); return -1; @@ -460,6 +447,8 @@ __doDNSDomain(CFStringRef key, const char *description, void *info, int argc, ch static int __doDNSDomainArray(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFMutableArrayRef domains; if (argc < 1) { @@ -513,6 +502,8 @@ __doDNSDomainArray(CFStringRef key, const char *description, void *info, int arg static int __doDNSServerAddresses(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFMutableArrayRef servers; if (argc < 1) { @@ -629,6 +620,10 @@ static selections ipv4ConfigMethods[] = { static int __doIPv4ConfigMethod(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) +#pragma unused(argc) +#pragma unused(argv) unsigned int flags; CFStringRef method; CFIndex methodIndex; @@ -660,6 +655,8 @@ __doIPv4ConfigMethod(CFStringRef key, const char *description, void *info, int a static int __doIPv4Addresses(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(argc) Boolean useArray = (info == (void *)FALSE) ? FALSE : TRUE; if (strlen(argv[0]) > 0) { @@ -790,6 +787,10 @@ static selections ipv6ConfigMethods[] = { static int __doIPv6ConfigMethod(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) +#pragma unused(argc) +#pragma unused(argv) unsigned int flags; CFStringRef method; CFIndex methodIndex; @@ -818,6 +819,8 @@ __doIPv6ConfigMethod(CFStringRef key, const char *description, void *info, int a static int __doIPv6Addresses(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(argc) Boolean useArray = (info == (void *)FALSE) ? FALSE : TRUE; if (strlen(argv[0]) > 0) { @@ -853,6 +856,7 @@ static options ipv6Options[] = { , isChooseOne, &kSCPropNetIPv6ConfigMethod, __doIPv6ConfigMethod, (void *)ipv6ConfigMethods }, { "Addresses" , "address" , isOther , &kSCPropNetIPv6Addresses , __doIPv6Addresses , (void *)TRUE }, { "address" , "address" , isOther , &kSCPropNetIPv6Addresses , __doIPv6Addresses , (void *)TRUE }, + { "EnableCGA" , NULL , isBoolean , &kSCPropNetIPv6EnableCGA , NULL , NULL }, { "PrefixLength", "prefix length", isNumber , &kSCPropNetIPv6PrefixLength, NULL , NULL }, { "Router" , "address" , isOther , &kSCPropNetIPv6Router , __doIPv6Addresses , (void *)FALSE }, @@ -1011,6 +1015,9 @@ static options proxyOptions[] = { static int __doProxySelect(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(newConfiguration) CFIndex nextOption; if (argc < 1) { @@ -1034,6 +1041,10 @@ __doProxySelect(CFStringRef key, const char *description, void *info, int argc, static int __doProxyEnable(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(argc) +#pragma unused(argv) Boolean enabled = (info == (void *)FALSE) ? FALSE : TRUE; if (currentProxy == NULL) { @@ -1095,6 +1106,9 @@ __proxy_enabled(CFDictionaryRef configuration, const CFStringRef *enableKey) static int __doProxyHost(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) if (currentProxy == NULL) { SCPrint(TRUE, stdout, CFSTR("proxy not specified\n")); return -1; @@ -1132,6 +1146,9 @@ __doProxyHost(CFStringRef key, const char *description, void *info, int argc, ch static int __doProxyPort(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) if (currentProxy == NULL) { SCPrint(TRUE, stdout, CFSTR("proxy not specified\n")); return -1; @@ -1178,6 +1195,9 @@ __doProxyPort(CFStringRef key, const char *description, void *info, int argc, ch static int __doProxyURL(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) if (currentProxy == NULL) { SCPrint(TRUE, stdout, CFSTR("proxy not specified\n")); return -1; @@ -1215,6 +1235,12 @@ __doProxyURL(CFStringRef key, const char *description, void *info, int argc, cha static int __doProxyFTPPassive(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(key) +#pragma unused(description) +#pragma unused(info) +#pragma unused(argc) +#pragma unused(argv) +#pragma unused(newConfiguration) if (currentProxy == NULL) { SCPrint(TRUE, stdout, CFSTR("proxy not specified\n")); return -1; @@ -1265,6 +1291,8 @@ __cleanupName(CFStringRef name) static int __doSMBName(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("NetBIOS name not specified\n")); return -1; @@ -1296,6 +1324,8 @@ __doSMBName(CFStringRef key, const char *description, void *info, int argc, char static int __doSMBWorkgroup(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("Workgroup not specified\n")); return -1; @@ -1327,6 +1357,8 @@ __doSMBWorkgroup(CFStringRef key, const char *description, void *info, int argc, static int __doSMBWINSAddresses(CFStringRef key, const char *description, void *info, int argc, char **argv, CFMutableDictionaryRef newConfiguration) { +#pragma unused(description) +#pragma unused(info) CFMutableArrayRef servers; if (argc < 1) { @@ -1550,6 +1582,8 @@ __private_extern__ void show_protocols(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFIndex i; CFIndex n; @@ -1577,7 +1611,7 @@ show_protocols(int argc, char **argv) sorted = CFArrayCreateMutableCopy(NULL, 0, protocols); CFArraySortValues(sorted, CFRangeMake(0, n), - _compare_protocols, + _SCNetworkProtocolCompare, NULL); CFRelease(protocols); protocols = sorted; @@ -1594,7 +1628,7 @@ show_protocols(int argc, char **argv) ((net_protocol != NULL) && CFEqual(protocol, net_protocol)) ? '>' : ' ', i + 1, protocolType, - (int)(sizeof("AppleTalk") - CFStringGetLength(protocolType) - 1), + (int)(sizeof("Proxies") - CFStringGetLength(protocolType) - 1), ""); if (SCNetworkProtocolGetEnabled(protocol)) { @@ -1691,11 +1725,34 @@ _protocol_description(SCNetworkProtocolRef protocol, Boolean skipEmpty) CFArrayGetValueAtIndex(addresses, 0)); } else if (CFEqual(method, kSCValNetIPv4ConfigMethodManual) && isA_CFArray(addresses)) { + CFArrayRef masks; + CFStringRef router; + CFStringAppendFormat(description, NULL, CFSTR("%@, address=%@"), method, CFArrayGetValueAtIndex(addresses, 0)); + + if (CFDictionaryGetValueIfPresent(configuration, + kSCPropNetIPv4SubnetMasks, + (const void **)&masks) && + isA_CFArray(masks)) { + CFStringAppendFormat(description, + NULL, + CFSTR(", mask=%@"), + CFArrayGetValueAtIndex(masks, 0)); + } + + if (CFDictionaryGetValueIfPresent(configuration, + kSCPropNetIPv4Router, + (const void **)&router) && + isA_CFString(router)) { + CFStringAppendFormat(description, + NULL, + CFSTR(", router=%@"), + router); + } } else { CFStringAppendFormat(description, NULL, @@ -1714,11 +1771,10 @@ _protocol_description(SCNetworkProtocolRef protocol, Boolean skipEmpty) method); } } else if (CFEqual(protocolType, kSCNetworkProtocolTypeProxies)) { - CFIndex i; static proxyKeys *keys[] = { &proxyKeys_FTP, &proxyKeys_Gopher, &proxyKeys_HTTP, &proxyKeys_HTTPS, &proxyKeys_RTSP, &proxyKeys_SOCKS, &proxyKeys_PAC, &proxyKeys_WPAD }; - for (i = 0; i < sizeof(keys)/sizeof(keys[0]); i++) { + for (size_t i = 0; i < sizeof(keys)/sizeof(keys[0]); i++) { proxyKeys *currentProxy = keys[i]; if (!__proxy_enabled(configuration, currentProxy->keyEnable)) { diff --git a/src/configd/scutil.tproj/net_protocol.h b/src/configd/scutil.tproj/net_protocol.h index 976cf1114..feeebaea0 100644 --- a/src/configd/scutil.tproj/net_protocol.h +++ b/src/configd/scutil.tproj/net_protocol.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2011 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2004, 2011, 2017 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -35,8 +35,6 @@ __BEGIN_DECLS -CFComparisonResult _compare_protocols (const void *val1, const void *val2, void *context); - CF_RETURNS_RETAINED CFStringRef _protocol_description (SCNetworkProtocolRef protocol, Boolean skipEmpty); diff --git a/src/configd/scutil.tproj/net_service.c b/src/configd/scutil.tproj/net_service.c index 3d7d9dc35..bc20cdda4 100644 --- a/src/configd/scutil.tproj/net_service.c +++ b/src/configd/scutil.tproj/net_service.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2010, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2004-2010, 2013, 2014, 2016, 2017 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@ */ @@ -490,6 +490,7 @@ __private_extern__ void select_service(int argc, char **argv) { +#pragma unused(argc) SCNetworkInterfaceRef interface; SCNetworkServiceRef service; CFStringRef serviceName; @@ -670,8 +671,9 @@ set_service(int argc, char **argv) return; } } else if (strcmp(command, "rank") == 0) { - SCNetworkServicePrimaryRank rank = kSCNetworkServicePrimaryRankDefault; - SCNetworkServiceRef service = (argc < 2) ? net_service : NULL; + SCNetworkServicePrimaryRank rank = kSCNetworkServicePrimaryRankDefault; + SCNetworkServiceRef service = (argc < 2) ? net_service : NULL; + Boolean useActive = FALSE; if (argc < 1) { SCPrint(TRUE, stdout, CFSTR("rank not specified\n")); @@ -706,16 +708,19 @@ set_service(int argc, char **argv) serviceID = SCNetworkServiceGetServiceID(net_service); service = _SCNetworkServiceCopyActive(store, serviceID); CFRelease(store); + useActive = TRUE; argv++; argc--; } ok = SCNetworkServiceSetPrimaryRank(service, rank); - if (service != net_service) CFRelease(service); - if (ok) { - if (service == net_service) _prefs_changed = TRUE; - } else { + if (useActive) { + CFRelease(service); + } else if (ok) { + _prefs_changed = TRUE; + } + if (!ok) { SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); return; } @@ -785,7 +790,7 @@ __show_service_protocols(SCNetworkServiceRef service, const char *prefix, Boolea sorted = CFArrayCreateMutableCopy(NULL, 0, protocols); CFArraySortValues(sorted, CFRangeMake(0, n), - _compare_protocols, + _SCNetworkProtocolCompare, NULL); CFRelease(protocols); protocols = sorted; @@ -854,16 +859,16 @@ show_service(int argc, char **argv) // nothing to report break; case kSCNetworkServicePrimaryRankFirst : - SCPrint(TRUE, stdout, CFSTR("primary rank = FIRST\n")); + SCPrint(TRUE, stdout, CFSTR("primary rank = %@\n"), kSCValNetServicePrimaryRankFirst); break; case kSCNetworkServicePrimaryRankLast : - SCPrint(TRUE, stdout, CFSTR("primary rank = LAST\n")); + SCPrint(TRUE, stdout, CFSTR("primary rank = %@\n"), kSCValNetServicePrimaryRankLast); break; case kSCNetworkServicePrimaryRankNever : - SCPrint(TRUE, stdout, CFSTR("primary rank = NEVER\n")); + SCPrint(TRUE, stdout, CFSTR("primary rank = %@\n"), kSCValNetServicePrimaryRankNever); break; case kSCNetworkServicePrimaryRankScoped : - SCPrint(TRUE, stdout, CFSTR("primary rank = SCOPED\n")); + SCPrint(TRUE, stdout, CFSTR("primary rank = %@\n"), kSCValNetServicePrimaryRankScoped); break; default : SCPrint(TRUE, stdout, CFSTR("primary rank = %d\n"), serviceRank); @@ -899,7 +904,7 @@ show_service(int argc, char **argv) sorted = CFArrayCreateMutableCopy(NULL, 0, protocols); CFArraySortValues(sorted, CFRangeMake(0, n), - _compare_protocols, + _SCNetworkProtocolCompare, NULL); CFRelease(protocols); protocols = sorted; @@ -939,6 +944,7 @@ __private_extern__ void show_services(int argc, char **argv) { +#pragma unused(argv) CFIndex i; CFIndex n; diff --git a/src/configd/scutil.tproj/net_set.c b/src/configd/scutil.tproj/net_set.c index fb4f0e8c2..c51516c4d 100644 --- a/src/configd/scutil.tproj/net_set.c +++ b/src/configd/scutil.tproj/net_set.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2005, 2009-2011, 2013, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2005, 2009-2011, 2013-2015, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -39,37 +39,6 @@ /* -------------------- */ -static CFComparisonResult -_compare_sets(const void *val1, const void *val2, void *context) -{ - CFStringRef id1; - CFStringRef id2; - CFStringRef name1; - CFStringRef name2; - SCNetworkSetRef s1 = (SCNetworkSetRef)val1; - SCNetworkSetRef s2 = (SCNetworkSetRef)val2; - - name1 = SCNetworkSetGetName(s1); - name2 = SCNetworkSetGetName(s2); - - if (name1 != NULL) { - if (name2 != NULL) { - return CFStringCompare(name1, name2, 0); - } else { - return kCFCompareLessThan; - } - } - - if (name2 != NULL) { - return kCFCompareGreaterThan; - } - - id1 = SCNetworkSetGetSetID(s1); - id2 = SCNetworkSetGetSetID(s2); - return CFStringCompare(id1, id2, 0); -} - - static CFArrayRef _copy_sets() { @@ -85,7 +54,7 @@ _copy_sets() sorted = CFArrayCreateMutableCopy(NULL, 0, sets); CFArraySortValues(sorted, CFRangeMake(0, CFArrayGetCount(sorted)), - _compare_sets, + _SCNetworkSetCompare, NULL); CFRelease(sets); @@ -372,6 +341,7 @@ __private_extern__ void select_set(int argc, char **argv) { +#pragma unused(argc) SCNetworkSetRef set; CFStringRef setName; @@ -534,6 +504,10 @@ set_set(int argc, char **argv) } else { SCPrint(TRUE, stdout, CFSTR("set what?\n")); } + + if (net_set == NULL) { + break; + } } return; @@ -645,7 +619,7 @@ show_set(int argc, char **argv) n = CFArrayGetCount(interfaces); for (i = 0; i < n; i++) { interface = CFArrayGetValueAtIndex(interfaces, i); - SCPrint(TRUE, stdout, CFSTR(" %2ld: %@ \n"), + SCPrint(TRUE, stdout, CFSTR(" %2ld: %@\n"), i + 1, SCNetworkInterfaceGetLocalizedDisplayName(interface)); } @@ -665,6 +639,8 @@ __private_extern__ void show_sets(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) SCNetworkSetRef current; CFIndex i; CFIndex n; diff --git a/src/configd/scutil.tproj/notifications.c b/src/configd/scutil.tproj/notifications.c index 0ccd02ccb..85283401a 100644 --- a/src/configd/scutil.tproj/notifications.c +++ b/src/configd/scutil.tproj/notifications.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2008-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-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,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@ */ @@ -42,14 +42,10 @@ #include "notifications.h" -static int osig; -static struct sigaction *oact = NULL; - - static char * elapsed() { - int n; + size_t n; static char str[128]; struct tm tm_diff; struct tm tm_now; @@ -80,7 +76,9 @@ elapsed() static CFComparisonResult -sort_keys(const void *p1, const void *p2, void *context) { +sort_keys(const void *p1, const void *p2, void *context) +{ +#pragma unused(context) CFStringRef key1 = (CFStringRef)p1; CFStringRef key2 = (CFStringRef)p2; return CFStringCompare(key1, key2, 0); @@ -91,6 +89,7 @@ __private_extern__ void storeCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) { +#pragma unused(info) int i; CFIndex n; @@ -118,6 +117,7 @@ __private_extern__ void do_notify_list(int argc, char **argv) { +#pragma unused(argv) int i; CFArrayRef list; CFIndex listCnt; @@ -247,6 +247,8 @@ __private_extern__ void do_notify_changes(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFArrayRef list; CFIndex listCnt; int i; @@ -279,6 +281,7 @@ do_notify_changes(int argc, char **argv) static void * _watcher(void *arg) { +#pragma unused(arg) notifyRl = CFRunLoopGetCurrent(); if (notifyRl == NULL) { SCPrint(TRUE, stdout, CFSTR(" CFRunLoopGetCurrent() failed\n")); @@ -312,6 +315,8 @@ __private_extern__ void do_notify_watch(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) pthread_attr_t tattr; pthread_t tid; @@ -335,6 +340,8 @@ __private_extern__ void do_notify_wait(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (!SCDynamicStoreNotifyWait(store)) { SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); return; @@ -369,7 +376,7 @@ do_notify_file(int argc, char **argv) return; } - bzero(buf.data, sizeof(buf.data)); + memset(buf.data, 0, sizeof(buf.data)); bufPtr = &buf.data[0]; needed = sizeof(buf.gotID); while (needed > 0) { @@ -409,86 +416,12 @@ do_notify_file(int argc, char **argv) } -static void -signalCatcher(int signum) -{ - static int n = 0; - - SCPrint(TRUE, stdout, CFSTR("Received sig%s (#%d).\n"), sys_signame[signum], n++); - return; -} - - -__private_extern__ -void -do_notify_signal(int argc, char **argv) -{ - int sig; - pid_t pid; - struct sigaction nact; - - if (isdigit(*argv[0])) { - if ((sscanf(argv[0], "%d", &sig) != 1) || (sig <= 0) || (sig >= NSIG)) { - SCPrint(TRUE, stdout, CFSTR("signal must be in the range of 1 .. %d.\n"), NSIG-1); - return; - } - } else { - for (sig = 1; sig < NSIG; sig++) { - if (strcasecmp(argv[0], sys_signame[sig]) == 0) - break; - } - if (sig >= NSIG) { - CFMutableStringRef str; - - SCPrint(TRUE, stdout, CFSTR("Signal must be one of the following:\n")); - - str = CFStringCreateMutable(NULL, 0); - for (sig = 1; sig < NSIG; sig++) { - CFStringAppendFormat(str, NULL, CFSTR(" %-6s"), sys_signame[sig]); - if ((sig % 10) == 0) { - CFStringAppendFormat(str, NULL, CFSTR("\n")); - } - } - if ((sig % 10) != 0) { - CFStringAppendFormat(str, NULL, CFSTR("\n")); - } - SCPrint(TRUE, stdout, CFSTR("%@"), str); - CFRelease(str); - return; - } - - } - - if ((argc != 2) || (sscanf(argv[1], "%d", &pid) != 1)) { - pid = getpid(); - } - - if (oact != NULL) { - (void) sigaction(osig, oact, NULL); /* restore original signal handler */ - } else { - oact = malloc(sizeof(struct sigaction)); - } - - nact.sa_handler = signalCatcher; - sigemptyset(&nact.sa_mask); - nact.sa_flags = SA_RESTART; - (void) sigaction(sig, &nact, oact); - osig = sig; - SCPrint(TRUE, stdout, CFSTR("signal handler started.\n")); - - if (!SCDynamicStoreNotifySignal(store, pid, sig)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - return; - } - - return; -} - - __private_extern__ void do_notify_cancel(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (notifyRls != NULL) { if (doDispatch) { if (!SCDynamicStoreSetDispatchQueue(store, NULL)) { @@ -511,11 +444,5 @@ do_notify_cancel(int argc, char **argv) CFRunLoopStop(notifyRl); } - if (oact != NULL) { - (void) sigaction(osig, oact, NULL); /* restore original signal handler */ - free(oact); - oact = NULL; - } - return; } diff --git a/src/configd/scutil.tproj/notifications.h b/src/configd/scutil.tproj/notifications.h index 27a9f39de..33003ef34 100644 --- a/src/configd/scutil.tproj/notifications.h +++ b/src/configd/scutil.tproj/notifications.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 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@ */ @@ -48,10 +48,9 @@ void do_notify_remove (int argc, char **argv); void do_notify_changes (int argc, char **argv); void do_notify_watch (int argc, char **argv); void do_notify_wait (int argc, char **argv); -void do_notify_signal (int argc, char **argv); void do_notify_file (int argc, char **argv); void do_notify_cancel (int argc, char **argv); __END_DECLS -#endif /* !_NOTIFICATIONS_H */ +#endif /* !_NOTIFICATIONS_H */ diff --git a/src/configd/scutil.tproj/prefs.c b/src/configd/scutil.tproj/prefs.c index ec8677f0c..a4df6a43c 100644 --- a/src/configd/scutil.tproj/prefs.c +++ b/src/configd/scutil.tproj/prefs.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2003-2008, 2011-2014 Apple Inc. All rights reserved. + * Copyright (c) 2003-2008, 2011-2017 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@ */ @@ -28,21 +28,23 @@ * - initial revision */ +#include +#include #include #include #include #include -#include - -#include -#if !TARGET_OS_IPHONE -#include -#endif /* !TARGET_OS_IPHONE */ #include "scutil.h" #include "commands.h" #include "prefs.h" +#include "SCNetworkConfigurationInternal.h" + +#if !TARGET_OS_IPHONE +#include +#endif /* !TARGET_OS_IPHONE */ + /* -------------------- */ @@ -50,22 +52,14 @@ #if !TARGET_OS_IPHONE static void * __loadSecurity(void) { - static void *image = NULL; - if (NULL == image) { - const char *framework = "/System/Library/Frameworks/Security.framework/Security"; - struct stat statbuf; - const char *suffix = getenv("DYLD_IMAGE_SUFFIX"); - char path[MAXPATHLEN]; - - strlcpy(path, framework, sizeof(path)); - if (suffix) strlcat(path, suffix, sizeof(path)); - if (0 <= stat(path, &statbuf)) { - image = dlopen(path, RTLD_LAZY | RTLD_LOCAL); - } else { - image = dlopen(framework, RTLD_LAZY | RTLD_LOCAL); - } - } - return (void *)image; + static void *image = NULL; + static dispatch_once_t once; + + dispatch_once(&once, ^{ + image = _SC_dlopen("/System/Library/Frameworks/Security.framework/Security"); + }); + + return image; } @@ -152,6 +146,7 @@ __private_extern__ Boolean _prefs_open(CFStringRef name, CFStringRef prefsID) { + char *env = NULL; CFMutableDictionaryRef options = NULL; Boolean useHelper = FALSE; Boolean useOptions = FALSE; @@ -170,18 +165,32 @@ _prefs_open(CFStringRef name, CFStringRef prefsID) } if (getenv("SCPREFERENCES_REMOVE_WHEN_EMPTY") != NULL) { - // if we have options - useOptions = TRUE; - if (options == NULL) { options = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + useOptions = TRUE; } CFDictionarySetValue(options, kSCPreferencesOptionRemoveWhenEmpty, kCFBooleanTrue); } + env = getenv("SCPREFERENCES_PROTECTION_CLASS"); + if (env != NULL) { + CFStringRef str; + + if (options == NULL) { + options = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + useOptions = TRUE; + } + str = CFStringCreateWithCString(NULL, env, kCFStringEncodingASCII); + CFDictionarySetValue(options, kSCPreferencesOptionProtectionClass, str); + CFRelease(str); + } + if (!useHelper && !useOptions) { // if no helper/options needed prefs = SCPreferencesCreate(NULL, name, prefsID); @@ -292,6 +301,8 @@ _prefs_commitRequired(int argc, char **argv, const char *command) static void get_ComputerName(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFStringEncoding encoding; CFStringRef hostname; @@ -368,6 +379,8 @@ set_ComputerName(int argc, char **argv) static void get_HostName(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFStringRef hostname; Boolean ok; @@ -448,6 +461,8 @@ set_HostName(int argc, char **argv) static void get_LocalHostName(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) CFStringRef hostname; hostname = SCDynamicStoreCopyLocalHostName(NULL); @@ -566,12 +581,18 @@ do_getPref(char *pref, int argc, char **argv) return; } - // Add support to parse out extended get + // process extended get // ie. scutil --get do_prefs_init(); + do_prefs_open(argc, argv); - do_prefs_get(--argc, ++argv); + if (SCError() != kSCStatusOK) { + SCPrint(TRUE, stderr, CFSTR("%s\n"), SCErrorString(SCError())); + _prefs_close(); + exit(1); + } + do_prefs_get(--argc, ++argv); if (value != NULL) { CFStringRef key; CFStringRef prefs_val; @@ -655,6 +676,7 @@ __private_extern__ void do_prefs_lock(int argc, char **argv) { +#pragma unused(argv) Boolean wait = (argc > 0) ? TRUE : FALSE; if (!SCPreferencesLock(prefs, wait)) { @@ -670,6 +692,8 @@ __private_extern__ void do_prefs_unlock(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (!SCPreferencesUnlock(prefs)) { SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); return; @@ -683,6 +707,8 @@ __private_extern__ void do_prefs_commit(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (!SCPreferencesCommitChanges(prefs)) { SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); return; @@ -697,6 +723,8 @@ __private_extern__ void do_prefs_apply(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (!SCPreferencesApplyChanges(prefs)) { SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); } @@ -737,13 +765,17 @@ __private_extern__ void do_prefs_synchronize(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) SCPreferencesSynchronize(prefs); return; } static CFComparisonResult -sort_paths(const void *p1, const void *p2, void *context) { +sort_paths(const void *p1, const void *p2, void *context) +{ +#pragma unused(context) CFStringRef path1 = (CFStringRef)p1; CFStringRef path2 = (CFStringRef)p2; return CFStringCompare(path1, path2, 0); @@ -822,6 +854,7 @@ __private_extern__ void do_prefs_get(int argc, char **argv) { +#pragma unused(argc) CFDictionaryRef dict; CFStringRef link; CFIndex n; @@ -955,6 +988,7 @@ __private_extern__ void do_prefs_remove(int argc, char **argv) { +#pragma unused(argc) CFStringRef path; path = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); @@ -972,6 +1006,74 @@ do_prefs_remove(int argc, char **argv) return; } +static const char * +on_off_str(Boolean on) +{ + return (on ? "on" : "off"); +} + +/* -------------------- */ + +#if !TARGET_OS_IPHONE + +#include "InterfaceNamerControlPrefs.h" + +static void +allow_new_interfaces_usage(void) +{ + fprintf(stderr, "usage: scutil --allow-new-interfaces [on|off|default]\n"); + return; +} + +__private_extern__ +void +do_ifnamer(char * pref, int argc, char **argv) +{ + Boolean allow = FALSE; + + if (argc > 1) { + allow_new_interfaces_usage(); + exit(1); + } + + if (strcmp(pref, "allow-new-interfaces")) { + exit(0); + } + + if (argc == 0) { + SCPrint(TRUE, stdout, CFSTR("AllowNewInterfaces is %s\n"), + on_off_str(InterfaceNamerControlPrefsAllowNewInterfaces())); + exit(0); + } + + if ((strcasecmp(argv[0], "disable") == 0) || + (strcasecmp(argv[0], "no" ) == 0) || + (strcasecmp(argv[0], "off" ) == 0) || + (strcasecmp(argv[0], "0" ) == 0)) { + allow = FALSE; + } else if ((strcasecmp(argv[0], "enable") == 0) || + (strcasecmp(argv[0], "yes" ) == 0) || + (strcasecmp(argv[0], "on" ) == 0) || + (strcasecmp(argv[0], "1" ) == 0)) { + allow = TRUE; + } else if (strcasecmp(argv[0], "default") == 0) { + allow = FALSE; + } else { + allow_new_interfaces_usage(); + exit(1); + } + + if (!InterfaceNamerControlPrefsSetAllowNewInterfaces(allow)) { + SCPrint(TRUE, stderr, CFSTR("failed to set preferences\n")); + exit(2); + } + + exit(0); + return; +} + +#endif // !TARGET_OS_IPHONE + /* -------------------- */ #include "IPMonitorControlPrefs.h" @@ -980,34 +1082,178 @@ __private_extern__ void do_log(char * log, int argc, char **argv) { + Boolean verbose = FALSE; + if (strcmp(log, "IPMonitor")) { - exit(0); + exit(0); } + if (argc == 0) { - printf("IPMonitor log is %s\n", - IPMonitorControlPrefsIsVerbose() ? "on" : "off"); + SCPrint(TRUE, stdout, CFSTR("IPMonitor log is %s\n"), + on_off_str(IPMonitorControlPrefsIsVerbose())); + exit(0); } - else { - Boolean verbose = FALSE; - if (strcasecmp(argv[0], "on") == 0) { - verbose = TRUE; - } - else if (strcasecmp(argv[0], "off") == 0) { + if ((strcasecmp(argv[0], "disable") == 0) || + (strcasecmp(argv[0], "no" ) == 0) || + (strcasecmp(argv[0], "off" ) == 0) || + (strcasecmp(argv[0], "0" ) == 0)) { verbose = FALSE; - } - else { - fprintf(stderr, "%s invalid, must be 'on' or 'off'\n", - argv[0]); + } else if ((strcasecmp(argv[0], "enable") == 0) || + (strcasecmp(argv[0], "yes" ) == 0) || + (strcasecmp(argv[0], "on" ) == 0) || + (strcasecmp(argv[0], "1" ) == 0)) { + verbose = TRUE; + } else { + SCPrint(TRUE, stdout, CFSTR("invalid value, must be 'on' or 'off'\n")); exit(1); - } - if (IPMonitorControlPrefsSetVerbose(verbose) == FALSE) { - fprintf(stderr, "failed to set preferences\n"); + } + + if (!IPMonitorControlPrefsSetVerbose(verbose)) { + SCPrint(TRUE, stderr, CFSTR("failed to set preferences\n")); exit(2); - } } + exit(0); return; } +/* -------------------- */ + +static SCNetworkInterfaceRef +copy_configured_interface(SCPreferencesRef prefs, CFStringRef if_name) +{ + SCNetworkSetRef current_set = NULL; + CFIndex count; + CFIndex i; + SCNetworkInterfaceRef ret_if = NULL; + CFArrayRef services = NULL; + + if (prefs == NULL) { + goto done; + } + current_set = SCNetworkSetCopyCurrent(prefs); + if (current_set == NULL) { + goto done; + } + services = SCNetworkSetCopyServices(current_set); + if (services == NULL) { + goto done; + } + + count = CFArrayGetCount(services); + for (i = 0; i < count; i++) { + CFStringRef this_if_name; + SCNetworkInterfaceRef this_if; + SCNetworkServiceRef s; + + s = (SCNetworkServiceRef)CFArrayGetValueAtIndex(services, i); + if (!SCNetworkServiceGetEnabled(s)) { + /* skip disabled services */ + continue; + } + this_if = SCNetworkServiceGetInterface(s); + if (this_if == NULL) { + continue; + } + this_if_name = SCNetworkInterfaceGetBSDName(this_if); + if (this_if_name == NULL) { + continue; + } + if (CFEqual(this_if_name, if_name)) { + CFRetain(this_if); + ret_if = this_if; + break; + } + } + + done: + if (current_set != NULL) { + CFRelease(current_set); + } + if (services != NULL) { + CFRelease(services); + } + return (ret_if); +} + +static void +disable_until_needed_usage(void) +{ + fprintf(stderr, "usage: scutil --disable-until-needed [on|off|default]\n"); + return; +} + +#include + +__private_extern__ +void +do_disable_until_needed(int argc, char **argv) +{ + const char * if_name; + CFStringRef if_name_cf; + SCNetworkInterfaceRef net_if; + Boolean on = FALSE; + const char * on_off = "?"; + Boolean ok; + Boolean set_default = FALSE; + Boolean set_value = FALSE; + + if (argc < 1 || argc > 2) { + disable_until_needed_usage(); + exit(1); + } + if_name = argv[0]; + if (argc > 1) { + on_off = argv[1]; + if (strcasecmp(on_off, "on") == 0) { + on = TRUE; + } else if (strcasecmp(on_off, "off") == 0) { + on = FALSE; + } else if ((strcmp(on_off, "") == 0) || (strcasecmp(on_off, "default") == 0)) { + set_default = TRUE; + on_off = "default"; + } else { + disable_until_needed_usage(); + exit(1); + } + set_value = TRUE; + } + ok = _prefs_open(CFSTR("scutil --disable-until-needed"), NULL); + if (!ok) { + SCPrint(TRUE, + stdout, + CFSTR("Could not open prefs: %s\n"), + SCErrorString(SCError())); + exit(1); + } + if_name_cf = CFStringCreateWithCStringNoCopy(NULL, + if_name, + kCFStringEncodingASCII, + kCFAllocatorNull); + net_if = copy_configured_interface(prefs, if_name_cf); + if (net_if == NULL) { + fprintf(stderr, "%s is not configured\n", if_name); + exit(1); + } + if (set_value) { + if (!set_default) { + ok = SCNetworkInterfaceSetDisableUntilNeeded(net_if, on); + } else { + ok = __SCNetworkInterfaceSetDisableUntilNeededValue(net_if, NULL); + } + if (!ok) { + fprintf(stderr, "failed to turn disable-until-needed %s\n", + on_off); + exit(1); + } + _prefs_save(); + } else { + on = SCNetworkInterfaceGetDisableUntilNeeded(net_if); + printf("%s disable-until-needed is %s\n", if_name, on_off_str(on)); + } + _prefs_close(); + exit(0); + return; +} diff --git a/src/configd/scutil.tproj/prefs.h b/src/configd/scutil.tproj/prefs.h index f1a3437cb..b4f397a8d 100644 --- a/src/configd/scutil.tproj/prefs.h +++ b/src/configd/scutil.tproj/prefs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005-2007, 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2003, 2005-2007, 2012, 2013, 2015-2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -31,11 +31,12 @@ #ifndef _PREFS_H #define _PREFS_H +#include #include #include -Boolean _prefs_changed; +extern Boolean _prefs_changed; __BEGIN_DECLS @@ -69,6 +70,12 @@ void do_prefs_set (int argc, char **argv); void do_prefs_remove (int argc, char **argv); void do_log (char *pref, int argc, char **argv); +void do_disable_until_needed (int argc, char **argv); + +#if !TARGET_OS_IPHONE +void do_ifnamer (char *pref, int argc, char **argv); +#endif // !TARGET_OS_IPHONE + __END_DECLS #endif /* !_PREFS_H */ diff --git a/src/configd/scutil.tproj/scutil.c b/src/configd/scutil.tproj/scutil.c index a476ff9cc..a897d8186 100644 --- a/src/configd/scutil.tproj/scutil.c +++ b/src/configd/scutil.tproj/scutil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -69,10 +69,8 @@ #include "session.h" #include "tests.h" - #define LINE_LENGTH 2048 - __private_extern__ AuthorizationRef authorization = NULL; __private_extern__ InputRef currentInput = NULL; __private_extern__ Boolean doDispatch = FALSE; @@ -110,6 +108,11 @@ 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 + { "disable-until-needed", no_argument, NULL, 0 }, { NULL, 0, NULL, 0 } }; @@ -190,7 +193,7 @@ getLine(char *buf, int len, InputRef src) if (line == NULL) return NULL; - strncpy(buf, line, len); + strlcpy(buf, line, len); } else { if (fgets(buf, len, src->fp) == NULL) return NULL; @@ -213,7 +216,6 @@ getLine(char *buf, int len, InputRef src) history(src->h, &ev, H_ENTER, buf); } - return buf; } @@ -361,8 +363,18 @@ usage(const char *command) SCPrint(TRUE, stderr, CFSTR("\n")); SCPrint(TRUE, stderr, CFSTR(" or: %s --log IPMonitor [off|on]\n"), command); SCPrint(TRUE, stderr, CFSTR("\tmanage logging.\n")); + + SCPrint(TRUE, stderr, CFSTR("\n")); + SCPrint(TRUE, stderr, CFSTR(" or: %s --disable-until-needed [on|off ]\n"), command); + SCPrint(TRUE, stderr, CFSTR("\tmanage secondary interface demand.\n")); } +#if !TARGET_OS_IPHONE + SCPrint(TRUE, stderr, CFSTR("\n")); + SCPrint(TRUE, stderr, CFSTR(" or: %s --allow-new-interfaces [off|on]\n"), command); + SCPrint(TRUE, stderr, CFSTR("\tmanage new interface creation with screen locked.\n")); +#endif // !TARGET_OS_IPHONE + if (getenv("ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS")) { SCPrint(TRUE, stderr, CFSTR("\n")); SCPrint(TRUE, stderr, CFSTR(" or: %s --net\n"), command); @@ -380,43 +392,50 @@ usage(const char *command) static char * prompt(EditLine *el) { -#if !TARGET_IPHONE_SIMULATOR +#pragma unused(el) +#if !TARGET_OS_SIMULATOR return "> "; -#else // !TARGET_IPHONE_SIMULATOR +#else // !TARGET_OS_SIMULATOR return "sim> "; -#endif // !TARGET_IPHONE_SIMULATOR +#endif // !TARGET_OS_SIMULATOR } int main(int argc, char * const argv[]) { - Boolean doDNS = FALSE; - Boolean doNet = FALSE; - Boolean doNWI = FALSE; - Boolean doPrefs = FALSE; - Boolean doProxy = FALSE; - Boolean doReach = FALSE; - Boolean doSnap = FALSE; - char *error = NULL; - char *get = NULL; - char *log = NULL; +#if !TARGET_OS_IPHONE + 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; + Boolean doPrefs = FALSE; + Boolean doProxy = FALSE; + Boolean doReach = FALSE; + Boolean doSnap = FALSE; + char *error = NULL; + char *get = NULL; + char *log = NULL; extern int optind; int opt; int opti; - const char *prog = argv[0]; - char *renew = NULL; - char *set = NULL; - char *nc_cmd = NULL; + const char *prog = argv[0]; + char *renew = NULL; + char *set = NULL; + char *nc_cmd = NULL; InputRef src; - int timeout = 15; /* default timeout (in seconds) */ - char *wait = NULL; - Boolean watch = FALSE; - int xStore = 0; /* non dynamic store command line options */ + int timeout = 15; /* default timeout (in seconds) */ + char *wait = NULL; + Boolean watch = FALSE; + int xStore = 0; /* non dynamic store command line options */ /* process any arguments */ - while ((opt = getopt_long(argc, argv, "dDvprt:w:W", longopts, &opti)) != -1) + while ((opt = getopt_long(argc, argv, "dDvprt:w:W", longopts, &opti)) != -1) { switch(opt) { case 'd': _sc_debug = TRUE; @@ -483,18 +502,32 @@ main(int argc, char * const argv[]) } else if (strcmp(longopts[opti].name, "log") == 0) { log = optarg; xStore++; +#if !TARGET_OS_IPHONE + } else if (strcmp(longopts[opti].name, "allow-new-interfaces") == 0) { + allowNewInterfaces = TRUE; + xStore++; +#endif // !TARGET_OS_IPHONE + } else if (strcmp(longopts[opti].name, "disable-until-needed") == 0) { + disableUntilNeeded = TRUE; + xStore++; } else if (strcmp(longopts[opti].name, "user") == 0) { username = CFStringCreateWithCString(NULL, optarg, kCFStringEncodingUTF8); } else if (strcmp(longopts[opti].name, "password") == 0) { 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 '?': default : usage(prog); } + } + argc -= optind; argv += optind; @@ -542,11 +575,7 @@ main(int argc, char * const argv[]) } if (doSnap) { - if (!enablePrivateAPI -#if !TARGET_IPHONE_SIMULATOR - || (geteuid() != 0) -#endif // !TARGET_IPHONE_SIMULATOR - ) { + if (!enablePrivateAPI) { usage(prog); } @@ -555,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); @@ -568,15 +602,22 @@ main(int argc, char * const argv[]) /* are we looking up a preference value */ if (get) { - if (argc != 2) { + if (argc == 0) { if (findPref(get) < 0) { usage(prog); } - } else { - /* need to go back one argument - * for the filename */ + } else if (argc == 2) { + /* + * extended --get + * i.e. scutil --get + * + * need to go back one argument to re-use the 1st "--get" + * argument as the prefs path name + */ argc++; argv--; + } else { + usage(prog); } do_getPref(get, argc, (char **)argv); @@ -607,6 +648,20 @@ main(int argc, char * const argv[]) /* NOT REACHED */ } +#if !TARGET_OS_IPHONE + /* allowNewInterfaces */ + if (allowNewInterfaces) { + do_ifnamer("allow-new-interfaces", argc, (char * *)argv); + /* NOT REACHED */ + } +#endif // !TARGET_OS_IPHONE + + /* disableUntilNeeded */ + if (disableUntilNeeded) { + do_disable_until_needed(argc, (char * *)argv); + /* NOT REACHED */ + } + /* network connection commands */ if (nc_cmd) { if (find_nc_cmd(nc_cmd) < 0) { diff --git a/src/configd/scutil.tproj/scutil.h b/src/configd/scutil.tproj/scutil.h index 4c0d0b958..b72f28022 100644 --- a/src/configd/scutil.tproj/scutil.h +++ b/src/configd/scutil.tproj/scutil.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2009, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009, 2012, 2016, 2017 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@ */ @@ -31,15 +31,16 @@ * - initial revision */ -#ifndef _SC_H -#define _SC_H +#ifndef _SCUTIL_H +#define _SCUTIL_H #include #include +#define SC_LOG_HANDLE _SC_LOG_DEFAULT #include -#include #include +#include typedef struct { @@ -65,9 +66,10 @@ extern CFMutableArrayRef watchedPatterns; __BEGIN_DECLS Boolean process_line (InputRef src); + CFStringRef _copyStringFromSTDIN (CFStringRef prompt, CFStringRef defaultValue); __END_DECLS -#endif /* !_SC_H */ +#endif /* !_SCUTIL_H */ diff --git a/src/configd/scutil.tproj/session.c b/src/configd/scutil.tproj/session.c index ed31af137..9e5b80363 100644 --- a/src/configd/scutil.tproj/session.c +++ b/src/configd/scutil.tproj/session.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2010, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2010, 2011, 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@ */ @@ -40,6 +40,8 @@ static void reconnected(SCDynamicStoreRef store, void *info) { +#pragma unused(store) +#pragma unused(info) SCPrint(TRUE, stdout, CFSTR("SCDynamicStore server restarted, session reconnected\n")); return; } @@ -49,6 +51,7 @@ __private_extern__ void do_open(int argc, char **argv) { +#pragma unused(argv) if (store) { CFRelease(store); CFRelease(watchedKeys); @@ -82,7 +85,7 @@ do_open(int argc, char **argv) watchedKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); watchedPatterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - cache_close(); + _SCDynamicStoreCacheClose(store); return; } @@ -92,6 +95,8 @@ __private_extern__ void do_close(int argc, char **argv) { +#pragma unused(argc) +#pragma unused(argv) if (notifyRls != NULL) { if (doDispatch) { (void) SCDynamicStoreSetDispatchQueue(store, NULL); @@ -116,7 +121,7 @@ do_close(int argc, char **argv) watchedPatterns = NULL; } - cache_close(); + _SCDynamicStoreCacheClose(store); return; } diff --git a/src/configd/scutil.tproj/tests.c b/src/configd/scutil.tproj/tests.c index 20c2b00ac..38b657968 100644 --- a/src/configd/scutil.tproj/tests.c +++ b/src/configd/scutil.tproj/tests.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -48,10 +48,18 @@ #include #include +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) + #include #include "dnsinfo_internal.h" +#include "dnsinfo_logging.h" + #include +#include "network_state_information_logging.h" +#include "network_state_information_priv.h" + #include "SCNetworkReachabilityInternal.h" + #include @@ -94,7 +102,6 @@ _setupReachabilityOptions(int argc, char **argv, const char *interface) continue; } - if (strcasecmp(argv[i], "no-connection-on-demand") == 0) { CFDictionarySetValue(options, kSCNetworkReachabilityOptionConnectionOnDemandBypass, @@ -162,11 +169,11 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) struct sockaddr_in6 sin6; SCNetworkReachabilityRef target = NULL; - bzero(&sin, sizeof(sin)); + memset(&sin, 0, sizeof(sin)); sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; - bzero(&sin6, sizeof(sin6)); + memset(&sin6, 0, sizeof(sin6)); sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; @@ -194,7 +201,7 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) struct sockaddr_in r_sin; if (argc > 1) { - bzero(&r_sin, sizeof(r_sin)); + memset(&r_sin, 0, sizeof(r_sin)); r_sin.sin_len = sizeof(r_sin); r_sin.sin_family = AF_INET; } @@ -283,7 +290,7 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) } if (argc > 1) { - bzero(&r_sin6, sizeof(r_sin6)); + memset(&r_sin6, 0, sizeof(r_sin6)); r_sin6.sin6_len = sizeof(r_sin6); r_sin6.sin6_family = AF_INET6; } @@ -423,6 +430,7 @@ static void _printReachability(SCNetworkReachabilityRef target) { SCNetworkReachabilityFlags flags; + char flags_str[100]; Boolean ok; ok = SCNetworkReachabilityGetFlags(target, &flags); @@ -431,16 +439,16 @@ _printReachability(SCNetworkReachabilityRef target) return; } - SCPrint(_sc_debug, stdout, CFSTR("flags = 0x%08x ("), flags); - __SCNetworkReachabilityPrintFlags(flags); - SCPrint(_sc_debug, stdout, CFSTR(")")); - SCPrint(TRUE, stdout, CFSTR("\n")); + __SCNetworkReachability_flags_string(flags, _sc_debug, flags_str, sizeof(flags_str)); + SCPrint(TRUE, stdout, + _sc_debug ? CFSTR("flags = %s\n") : CFSTR("%s\n"), + flags_str); - if (resolver_bypass) { + if (resolver_bypass && _sc_debug) { int if_index; if_index = SCNetworkReachabilityGetInterfaceIndex(target); - SCPrint(_sc_debug, stdout, CFSTR("interface index = %d\n"), if_index); + SCPrint(TRUE, stdout, CFSTR("interface index = %d\n"), if_index); } return; @@ -465,145 +473,37 @@ do_checkReachability(int argc, char **argv) } -static void -_printNWIFlags(nwi_ifstate_flags flags) -{ - if (flags == 0) { - return; - } - - SCPrint(TRUE, stdout, CFSTR(" (")); - if (flags & NWI_IFSTATE_FLAGS_HAS_IPV4) { - SCPrint(TRUE, stdout, CFSTR("IPv4")); - flags &= ~NWI_IFSTATE_FLAGS_HAS_IPV4; - SCPrint(flags != 0, stdout, CFSTR(",")); - } - if (flags & NWI_IFSTATE_FLAGS_HAS_IPV6) { - SCPrint(TRUE, stdout, CFSTR("IPv6")); - flags &= ~NWI_IFSTATE_FLAGS_HAS_IPV6; - SCPrint(flags != 0, stdout, CFSTR(",")); - } - if (flags & NWI_IFSTATE_FLAGS_HAS_DNS) { - SCPrint(TRUE, stdout, CFSTR("DNS")); - flags &= ~NWI_IFSTATE_FLAGS_HAS_DNS; - SCPrint(flags != 0, stdout, CFSTR(",")); - } - if (flags != 0) { - SCPrint(TRUE, stdout, CFSTR("%p"), (void *)flags); - } - SCPrint(TRUE, stdout, CFSTR(")")); - - return; -} - - -static void -_printNWIInfo(nwi_ifstate_t ifstate) -{ - nwi_ifstate_flags ifstate_flags = nwi_ifstate_get_flags(ifstate); - SCNetworkReachabilityFlags reach_flags = nwi_ifstate_get_reachability_flags(ifstate); - const uint8_t *signature; - int signature_length; - const struct sockaddr *vpn_addr = nwi_ifstate_get_vpn_server(ifstate); - - SCPrint(TRUE, stdout, - CFSTR(" %7s : flags %p"), - nwi_ifstate_get_ifname(ifstate), - (void *)ifstate_flags); - _printNWIFlags(ifstate_flags); - - SCPrint(TRUE, stdout, CFSTR("\n reach 0x%08x ("), reach_flags); - __SCNetworkReachabilityPrintFlags(reach_flags); - SCPrint(TRUE, stdout, CFSTR(")")); - - if (vpn_addr != NULL) { - char vpn_ntopbuf[INET6_ADDRSTRLEN]; - - _SC_sockaddr_to_string(vpn_addr, vpn_ntopbuf, sizeof(vpn_ntopbuf)); - SCPrint(TRUE, stdout, CFSTR("\n VPN server: %s"), vpn_ntopbuf); - } - - signature = nwi_ifstate_get_signature(ifstate, AF_UNSPEC, &signature_length); - if (signature != NULL) { - CFDataRef digest = NULL; - - digest = CFDataCreate(NULL, signature, CC_SHA1_DIGEST_LENGTH); - SCPrint(TRUE, stdout, CFSTR("\n Signature Hash: %@"), digest); - CFRelease(digest); - } else { - SCPrint(TRUE, stdout, CFSTR("\n Signature Hash: ")); - } - - SCPrint(TRUE, stdout, CFSTR("\n generation %llu\n"), - nwi_ifstate_get_generation(ifstate)); - - return; -} - - -static void -_printNWIReachInfo(nwi_state_t state, int af) -{ - uint32_t reach_flags; - - reach_flags = nwi_state_get_reachability_flags(state, af); - SCPrint(TRUE, stdout, CFSTR("\n REACH : flags 0x%08x ("), reach_flags); - __SCNetworkReachabilityPrintFlags(reach_flags); - SCPrint(TRUE, stdout, CFSTR(")\n")); - - return; -} - - static void do_printNWI(int argc, char **argv, nwi_state_t state) { - nwi_ifstate_t ifstate; - if (state == NULL) { SCPrint(TRUE, stdout, CFSTR("No network information\n")); return; } if (argc > 0) { + nwi_ifstate_t ifstate; + ifstate = nwi_state_get_ifstate(state, argv[0]); if (ifstate != NULL) { - _printNWIInfo(ifstate); + nwi_ifstate_t alias; + int alias_af; + + _nwi_ifstate_log(ifstate, _sc_debug, NULL); + + alias_af = (ifstate->af == AF_INET) ? AF_INET6 : AF_INET; + alias = nwi_ifstate_get_alias(ifstate, alias_af); + if (alias != NULL) { + SCPrint(TRUE, stdout, CFSTR("\n")); + _nwi_ifstate_log(alias, _sc_debug, NULL); + } } else { SCPrint(TRUE, stdout, CFSTR("No network information (for %s)\n"), argv[0]); } return; } - SCPrint(TRUE, stdout, CFSTR("Network information (generation %llu)"), - nwi_state_get_generation(state)); - - SCPrint(TRUE, stdout, CFSTR("\nIPv4 network interface information\n")); - - ifstate = nwi_state_get_first_ifstate(state, AF_INET); - if (ifstate == NULL) { - SCPrint(TRUE, stdout, CFSTR(" No IPv4 states found\n")); - } else { - while (ifstate != NULL) { - _printNWIInfo(ifstate); - ifstate = nwi_ifstate_get_next(ifstate, AF_INET); - } - } - _printNWIReachInfo(state, AF_INET); - - SCPrint(TRUE, stdout, CFSTR("\nIPv6 network interface information\n")); - - ifstate = nwi_state_get_first_ifstate(state, AF_INET6); - if (ifstate == NULL) { - SCPrint(TRUE, stdout, CFSTR(" No IPv6 states found\n")); - } else { - while (ifstate != NULL) { - _printNWIInfo(ifstate); - ifstate = nwi_ifstate_get_next(ifstate, AF_INET6); - } - } - _printNWIReachInfo(state, AF_INET6); - + _nwi_state_log(state, _sc_debug, NULL); return; } @@ -644,6 +544,7 @@ do_watchNWI(int argc, char **argv) &token, dispatch_get_main_queue(), ^(int token){ +#pragma unused(token) nwi_state_t state; struct tm tm_now; struct timeval tv_now; @@ -663,7 +564,7 @@ do_watchNWI(int argc, char **argv) } }); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for nwi changes, status=%u"), status); + SCPrint(TRUE, stderr, CFSTR("notify_register_dispatch() failed for nwi changes, status=%u\n"), status); exit(1); } @@ -771,55 +672,19 @@ do_watchReachability(int argc, char **argv) static void do_printDNSConfiguration(int argc, char **argv, dns_config_t *dns_config) { - SCNetworkReachabilityRef target; +#pragma unused(argc) +#pragma unused(argv) + int _sc_log_save; if (dns_config == NULL) { SCPrint(TRUE, stdout, CFSTR("No DNS configuration available\n")); return; } - if (argc > 1) { - int dns_config_index = -1; - SCNetworkReachabilityFlags flags = 0; - Boolean haveDNS = FALSE; - Boolean ok = FALSE; - dns_resolver_t *resolver; - uint32_t resolver_if_index; - SCNetworkReachabilityPrivateRef targetPrivate; - - target = _setupReachability(argc, argv, NULL); - - targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - if (targetPrivate->type != reachabilityTypeName) { - SCPrint(TRUE, stdout, CFSTR("\"%s\" is not a hostname.\n"), argv[0]); - exit(1); - } - - ok = __SC_checkResolverReachabilityInternal(&store, &flags, - &haveDNS, targetPrivate->name, - &resolver_if_index, &dns_config_index); - - if (!ok) { - SCPrint(TRUE, stdout, CFSTR("No DNS configuration available.\n" )); - return; - } - - SCPrint(TRUE, stdout, CFSTR("DNS configuration for %s\n"), - targetPrivate->name); - - if (targetPrivate->if_index == 0) { - resolver = dns_config->resolver[dns_config_index]; - } else { - resolver = dns_config->scoped_resolver[dns_config_index]; - } - - _dns_resolver_print(resolver, dns_config_index + 1); - - if (target != NULL) CFRelease(target); - } else { - _dns_configuration_print(dns_config); - } + _sc_log_save = _sc_log; + _sc_log = FALSE; + _dns_configuration_log(dns_config, _sc_debug, NULL); + _sc_log = _sc_log_save; if (_sc_debug) { SCPrint(TRUE, stdout, CFSTR("\ngeneration = %llu\n"), dns_config->generation); @@ -865,6 +730,7 @@ do_watchDNSConfiguration(int argc, char **argv) &token, dispatch_get_main_queue(), ^(int token){ +#pragma unused(token) dns_config_t *dns_config; struct tm tm_now; struct timeval tv_now; @@ -884,7 +750,7 @@ do_watchDNSConfiguration(int argc, char **argv) } }); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for DNS configuration changes, status=%u"), status); + SCPrint(TRUE, stderr, CFSTR("notify_register_dispatch() failed for nwi changes, status=%u\n"), status); exit(1); } @@ -916,20 +782,19 @@ __private_extern__ void do_showProxyConfiguration(int argc, char **argv) { - CFMutableDictionaryRef options = NULL; CFDictionaryRef proxies; if (getenv("BYPASS_GLOBAL_PROXY") != NULL) { + CFMutableDictionaryRef options ; + options = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionaryAddValue(options, kSCProxiesNoGlobal, kCFBooleanTrue); - } - - proxies = SCDynamicStoreCopyProxiesWithOptions(NULL, options); - - if (options != NULL) { + proxies = SCDynamicStoreCopyProxiesWithOptions(NULL, options); CFRelease(options); + } else { + proxies = SCDynamicStoreCopyProxies(NULL); } if (proxies != NULL) { @@ -1022,11 +887,52 @@ __private_extern__ void do_snapshot(int argc, char **argv) { - if (!SCDynamicStoreSnapshot(store)) { - SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); - } +#pragma unused(argc) +#pragma unused(argv) + if (argc == 1) { + CFDictionaryRef dict; + int fd; + CFMutableArrayRef patterns; + + fd = open(argv[0], O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644); + if (fd == -1) { + SCPrint(TRUE, stdout, CFSTR("open() failed: %s\n"), strerror(errno)); + return; + } - (void) _SCNetworkReachabilityServer_snapshot(); + patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFArrayAppendValue(patterns, CFSTR(".*")); + dict = SCDynamicStoreCopyMultiple(store, NULL, patterns); + CFRelease(patterns); + if (dict != NULL) { + CFDataRef xmlData; + + xmlData = CFPropertyListCreateData(NULL, dict, kCFPropertyListXMLFormat_v1_0, 0, NULL); + CFRelease(dict); + if (xmlData != NULL) { + (void) write(fd, CFDataGetBytePtr(xmlData), CFDataGetLength(xmlData)); + CFRelease(xmlData); + } else { + SC_log(LOG_NOTICE, "CFPropertyListCreateData() failed"); + } + } else { + if (SCError() == kSCStatusOK) { + SCPrint(TRUE, stdout, CFSTR("No SCDynamicStore content\n")); + } else { + SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); + } + } + (void) close(fd); + } else { +#if !TARGET_OS_SIMULATOR + if (geteuid() != 0) { + SCPrint(TRUE, stdout, CFSTR("Need to be \"root\" to capture snapshot\n")); + } else +#endif // !TARGET_OS_SIMULATOR + if (!SCDynamicStoreSnapshot(store)) { + SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); + } + } return; } @@ -1153,6 +1059,7 @@ waitKeyFound() static void waitTimeout(int sigraised) { +#pragma unused(sigraised) exit(1); } @@ -1203,7 +1110,7 @@ do_wait(char *waitKey, int timeout) if (timeout > 0) { signal(SIGALRM, waitTimeout); - bzero(&itv, sizeof(itv)); + memset(&itv, 0, sizeof(itv)); itv.it_value.tv_sec = timeout; if (setitimer(ITIMER_REAL, &itv, NULL) == -1) { SCPrint(TRUE, stderr, @@ -1215,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; @@ -1243,7 +1279,7 @@ sleep(120); dns_configuration_free(dns_config); } - do_showDNSConfiguration(argc, argv); + do_showDNSConfiguration(argc, argv); exit(0); } diff --git a/src/configd/scutil.tproj/tests.h b/src/configd/scutil.tproj/tests.h index eb3852a1d..87d6a6392 100644 --- a/src/configd/scutil.tproj/tests.h +++ b/src/configd/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/src/configd/update-sanitizer-dylib-references b/src/configd/update-sanitizer-dylib-references new file mode 100644 index 000000000..fbc331d48 --- /dev/null +++ b/src/configd/update-sanitizer-dylib-references @@ -0,0 +1,111 @@ +#!/bin/sh + +# +# fix address-sanitizer library @rpath references +# + +xsan_setup() { + XSAN_DIR="/usr/local/lib/sanitizers" + case "${PLATFORM_NAME}" in + macosx ) + ASAN_DYLIB="clang_rt.asan_osx_dynamic.dylib" + TSAN_DYLIB="clang_rt.tsan_osx_dynamic.dylib" + ;; + iphoneos ) + ASAN_DYLIB="clang_rt.asan_ios_dynamic.dylib" + TSAN_DYLIB="clang_rt.tsan_ios_dynamic.dylib" + ;; + iphonesimulator ) + ASAN_DYLIB="clang_rt.asan_iossim_dynamic.dylib" + TSAN_DYLIB="clang_rt.tsan_iossim_dynamic.dylib" + ;; + tvos ) + ASAN_DYLIB="clang_rt.asan_tvos_dynamic.dylib" + TSAN_DYLIB="clang_rt.tsan_tvos_dynamic.dylib" + ;; + tvsosimulator ) + ASAN_DYLIB="clang_rt.asan_tvossim_dynamic.dylib" + TSAN_DYLIB="clang_rt.tsan_tvossim_dynamic.dylib" + ;; + watchos ) + ASAN_DYLIB="clang_rt.asan_watchos_dynamic.dylib" + TSAN_DYLIB="clang_rt.tsan_watchos_dynamic.dylib" + ;; + watchsimulator ) + ASAN_DYLIB="clang_rt.asan_watchossim_dynamic.dylib" + 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" + ;; + esac +} + +xsan_setup=0 +for VARIANT in ${BUILD_VARIANTS} +do + case "${VARIANT}" in + "asan" ) + # + # change address sanitizer @rpath reference + # + ASAN_FILE="${DSTROOT}${INSTALL_PATH}/" + if [ -n "${EXECUTABLE_FOLDER_PATH}" ]; then + ASAN_FILE+="${EXECUTABLE_FOLDER_PATH}/" + fi + ASAN_FILE+="${EXECUTABLE_PREFIX}${PRODUCT_NAME}_asan${EXECUTABLE_SUFFIX}" + + if [ -x "${ASAN_FILE}" ]; then + if [ ${xsan_setup} -eq 0 ]; then + xsan_setup + xsan_setup=1 + fi + + install_name_tool \ + -change \ + "@rpath/lib${ASAN_DYLIB}" \ + "${XSAN_DIR}/lib${ASAN_DYLIB}" \ + "${ASAN_FILE}" + if [ $? -ne 0 ]; then + echo "install_name_tool failed" + printenv | sort + exit 1 + fi + fi + ;; + "tsan" ) + # + # change thread sanitizer @rpath reference + # + TSAN_FILE="${DSTROOT}${INSTALL_PATH}/" + if [ -n "${EXECUTABLE_FOLDER_PATH}" ]; then + TSAN_FILE+="${EXECUTABLE_FOLDER_PATH}/" + fi + TSAN_FILE+="${EXECUTABLE_PREFIX}${PRODUCT_NAME}_tsan${EXECUTABLE_SUFFIX}" + + if [ -x "${TSAN_FILE}" ]; then + if [ ${xsan_setup} -eq 0 ]; then + xsan_setup + xsan_setup=1 + fi + + install_name_tool \ + -change \ + "@rpath/lib${TSAN_DYLIB}" \ + "${XSAN_DIR}/lib${TSAN_DYLIB}" \ + "${TSAN_FILE}" + if [ $? -ne 0 ]; then + echo "install_name_tool failed" + printenv | sort + exit 1 + fi + fi + ;; + * ) + ;; + esac +done