]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesPathKey.c
   2  * Copyright (c) 2001, 2004, 2005, 2010, 2015 Apple Inc. All rights reserved. 
   4  * @APPLE_LICENSE_HEADER_START@ 
   6  * This file contains Original Code and/or Modifications of Original Code 
   7  * as defined in and that are subject to the Apple Public Source License 
   8  * Version 2.0 (the 'License'). You may not use this file except in 
   9  * compliance with the License. Please obtain a copy of the License at 
  10  * http://www.opensource.apple.com/apsl/ and read it before using this 
  13  * The Original Code and all software distributed under the License are 
  14  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  15  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  16  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 
  17  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  18  * Please see the License for the specific language governing rights and 
  19  * limitations under the License. 
  21  * @APPLE_LICENSE_HEADER_END@ 
  25  * Modification History 
  27  * October 29, 2001             Allan Nathanson <ajn@apple.com> 
  31 #include <SystemConfiguration/SystemConfiguration.h> 
  36 SCPreferencesPathKeyCreate(CFAllocatorRef       allocator
, 
  44         result 
= CFStringCreateWithFormatAndArguments(allocator
, 
  55 SCPreferencesPathKeyCreateNetworkServices(CFAllocatorRef        allocator
) 
  58          * create "/NetworkServices" 
  60         return CFStringCreateWithFormat(allocator
, 
  63                                         kSCPrefNetworkServices
); 
  68 SCPreferencesPathKeyCreateNetworkServiceEntity(CFAllocatorRef   allocator
, 
  76                  * create "/NetworkServices/service-id" 
  78                 path 
= CFStringCreateWithFormat(allocator
, 
  81                                                 kSCPrefNetworkServices
, 
  85                  * create "/NetworkServices/service-id/entity" 
  87                 path 
= CFStringCreateWithFormat(allocator
, 
  90                                                 kSCPrefNetworkServices
, 
 100 SCPreferencesPathKeyCreateSets(CFAllocatorRef   allocator
) 
 105         return (CFStringCreateWithFormat(allocator
, 
 113 SCPreferencesPathKeyCreateSet(CFAllocatorRef    allocator
, 
 117          * create "/Sets/set-id" 
 119         return (CFStringCreateWithFormat(allocator
, 
 128 SCPreferencesPathKeyCreateSetNetworkGlobalEntity(CFAllocatorRef allocator
, 
 133          * create "/Sets/set-id/Network/Global/entity" 
 135         return CFStringCreateWithFormat(allocator
, 
 137                                         CFSTR("/%@/%@/%@/%@/%@"), 
 147 SCPreferencesPathKeyCreateSetNetworkInterfaceEntity(CFAllocatorRef      allocator
, 
 153          * create "/Sets/set-id/Network/Interface/interface-name/entity" 
 155         if (entity 
== NULL
) { 
 156                 return CFStringCreateWithFormat(allocator
, 
 158                                                 CFSTR("/%@/%@/%@/%@/%@"), 
 165         return CFStringCreateWithFormat(allocator
, 
 167                                         CFSTR("/%@/%@/%@/%@/%@/%@"), 
 178 SCPreferencesPathKeyCreateSetNetworkService(CFAllocatorRef      allocator
, 
 184         if (service 
== NULL
) { 
 186                  * create "/Sets/set-id/Network/Service" 
 188                 path 
= CFStringCreateWithFormat(allocator
, 
 190                                                 CFSTR("/%@/%@/%@/%@"), 
 197                  * create "/Sets/set-id/Network/Service/service-id" 
 199                 path 
= CFStringCreateWithFormat(allocator
, 
 201                                                 CFSTR("/%@/%@/%@/%@/%@"), 
 214 SCPreferencesPathKeyCreateSetNetworkServiceEntity(CFAllocatorRef        allocator
, 
 221         if (entity 
== NULL
) { 
 223                  * create "/Sets/set-id/Network/Service/service-id" 
 225                 path 
= CFStringCreateWithFormat(allocator
, 
 227                                                 CFSTR("/%@/%@/%@/%@/%@"), 
 235                  * create "/Sets/set-id/Network/Service/service-id/entity" 
 237                 path 
= CFStringCreateWithFormat(allocator
, 
 239                                                 CFSTR("/%@/%@/%@/%@/%@/%@"),