2 * Copyright (c) 2006, 2008, 2009, 2011-2013 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@
24 #ifndef _SCNETWORKCONNECTIONPRIVATE_H
25 #define _SCNETWORKCONNECTIONPRIVATE_H
27 #include <Availability.h>
28 #include <sys/cdefs.h>
29 #include <CoreFoundation/CoreFoundation.h>
30 #include <SystemConfiguration/SystemConfiguration.h>
31 #include <SystemConfiguration/SCNetworkConfigurationPrivate.h>
34 typedef const struct __SCUserPreferencesRef
* SCUserPreferencesRef
;
41 #pragma mark SCNetworkConnection SPIs
43 CFArrayRef
/* of SCNetworkServiceRef's */
44 SCNetworkConnectionCopyAvailableServices (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
46 SCNetworkConnectionRef
47 SCNetworkConnectionCreateWithService (CFAllocatorRef allocator
,
48 SCNetworkServiceRef service
,
49 SCNetworkConnectionCallBack callout
,
50 SCNetworkConnectionContext
*context
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
53 SCNetworkConnectionGetService (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
55 CFArrayRef
/* of SCUserPreferencesRef's */
56 SCNetworkConnectionCopyAllUserPreferences (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
59 SCNetworkConnectionCopyCurrentUserPreferences (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
62 SCNetworkConnectionCreateUserPreferences (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
65 SCNetworkConnectionSuspend (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_3
,__IPHONE_2_0
);
68 SCNetworkConnectionResume (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_3
,__IPHONE_2_0
);
71 SCNetworkConnectionRefreshOnDemandState (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
74 SCNetworkConnectionSetClientInfo (SCNetworkConnectionRef connection
,
75 mach_port_t client_audit_session
,
78 pid_t client_pid
) __OSX_AVAILABLE_STARTING(__MAC_10_8
,__IPHONE_5_0
);
81 @function SCNetworkConnectionCreate
82 @discussion Create a network connection that is not associated with any
84 @param allocator The CFAllocator that should be used to allocate
85 memory for the connection structure. This parameter may be
86 NULL in which case the current default CFAllocator is used.
87 If this reference is not a valid CFAllocator, the behavior
89 @param callout The function to be called when the status
90 of the connection changes. If this parameter is NULL, the
91 application will not receive notifications of status change
92 and will need to poll for updates.
93 @param context The SCNetworkConnectionContext associated with the
95 @return The new SCNetworkConnection object.
97 SCNetworkConnectionRef
98 SCNetworkConnectionCreate (CFAllocatorRef allocator
,
99 SCNetworkConnectionCallBack callout
,
100 SCNetworkConnectionContext
*context
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
103 @function SCNetworkConnectionSetClientAuditInfo
104 @discussion Set audit information for the process that is initiating the network traffic
105 that will be transmitted over this network connection.
106 @param connection The SCNetworkConnection object.
107 @param client_audit_token The audit token of the initiator process.
108 @param audit_session The audit session mach port of the initiator process.
109 @param bootstrap_port The bootstrap port of the initiator process.
110 @param pid The PID of the initiator process.
111 @param uuid The Mach-O UUID of the initiator process.
112 @param bundle_id The CFBundleIdentifier of the initiator process.
113 @return TRUE if the audit token was set successfully, FALSE if an error occurred.
116 SCNetworkConnectionSetClientAuditInfo (SCNetworkConnectionRef connection
,
117 audit_token_t client_audit_token
,
118 mach_port_t audit_session
,
119 mach_port_t bootstrap_port
,
122 const char *bundle_id
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
125 @defined kSCNetworkConnectionSelectionOptionNoUserPrefs
126 @abstract Indicates whether or not SCNetworkConnectionSelectServiceWithOptions
127 should consult the user preferences to find a network service.
129 #define kSCNetworkConnectionSelectionOptionNoUserPrefs CFSTR("NoUserPrefs") /* CFBoolean */
132 @define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass
133 @abstract The traffic class that is attempting to trigger OnDemand.
135 #define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass CFSTR("OnDemandTrafficClass") // CFNumber
136 // __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)
138 @define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier
139 @abstract The account identifier that is attempting to trigger OnDemand.
141 #define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier CFSTR("OnDemandAccountIdentifier") /* CFString */
144 @define kSCNetworkConnectionSelectionOptionOnDemandMatchInfo
145 @abstract A dictionary containing information about the On Demand trigger that matched
147 #define kSCNetworkConnectionSelectionOptionOnDemandMatchInfo CFSTR("OnDemandMatchInfo") /* CFDictionary */
150 @define kSCNetworkConnectionOnDemandMatchInfoVPNType
151 @abstract The type of VPN connection associated with the matching trigger.
153 #define kSCNetworkConnectionOnDemandMatchInfoVPNType CFSTR("OnDemandMatchInfoVPNType") /* CFNumber containing a SCNetworkConnectionType */
156 @define kSCNetworkConnectionOnDemandMatchInfoDomain
157 @abstract The specific DNS domain in the trigger's match domains that matched the on demand hostname.
159 #define kSCNetworkConnectionOnDemandMatchInfoDomain CFSTR("OnDemandMatchInfoDomain") /* CFString */
162 @define kSCNetworkConnectionOnDemandMatchInfoAppRuleID
163 @abstract The identifier of the app rule in the matching trigger that matched the calling app.
165 #define kSCNetworkConnectionOnDemandMatchInfoAppRuleID CFSTR("OnDemandMatchInfoAppRuleID") /* CFString */
168 @define kSCNetworkConnectionOnDemandMatchInfoOnRetry
169 @abstract A flag indicating if the on demand hostname matched a domain in the "on retry" match domains.
171 #define kSCNetworkConnectionOnDemandMatchInfoOnRetry CFSTR("OnDemandMatchInfoOnRetry") /* CFString */
175 @function SCNetworkConnectionSelectServiceWithOptions
176 @discussion Associate a network connection with a network service based on some
177 selection options. This function can only be called on connections that are
178 not already associated with a network service.
179 @param connection The SCNetworkConnection object.
180 @param selectionOptions A dictionary containing some options to be used to
181 select the appropriate service.
182 @return TRUE if an appropriate network service was found and was associated with
183 the connection, FALSE otherwise.
186 SCNetworkConnectionSelectServiceWithOptions (SCNetworkConnectionRef connection
,
187 CFDictionaryRef selectionOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
190 @function SCNetworkConnectionOnDemandShouldRetryOnFailure
191 @discussion After SCNetworkConnectionSelectServiceWithOptions returns FALSE, use
192 this function to determine if an On Demand service was indeed matched for
193 On Retry behavior (try resolving/connecting, and start VPN on failure).
194 @param connection The SCNetworkConnection object.
195 @return TRUE if the selected On Demand connection should be retried on DNS or connection
196 failure, FALSE otherwise.
199 SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
202 @function SCNetworkConnectionCanTunnelAddress
203 @discussion This function should be called on a connection object selected with
204 SCNetworkConnectionSelectServiceWithOptions. If the address belongs to
205 the connection (the tunnel can be used for the address), the function
206 will return TRUE. If startImmediately is set, the address should not be trusted
207 and the VPN should be brought up before attempting to connect.
208 @param connection The SCNetworkConnection object.
209 @param address The address structure to check.
210 @param startImmediately On return, TRUE indicates that the address is not trusted
211 and the VPN should be started immediately.
212 @return TRUE if the selected VPN connection's tunnel routes match the address.
215 SCNetworkConnectionCanTunnelAddress (SCNetworkConnectionRef connection
,
216 const struct sockaddr
*address
,
217 Boolean
*startImmediately
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
220 @function SCNetworkConnectionIsOnDemandSuspended
221 @discussion Indicates whether the On Demand connection is suspended or not. Call
222 SCNetworkConnectionSelectServiceWithOptions before calling this function.
223 @param connection The SCNetworkConnection object.
224 @return TRUE if the On Demand connection is suspended, FALSE otherwise.
227 SCNetworkConnectionIsOnDemandSuspended (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
230 @function SCNetworkConnectionCopyOnDemandInfo
231 @discussion Indicates whether or not the caller should start the network connection,
232 assuming that the caller has network traffic that needs to use the network connection.
233 @param connection The SCNetworkConnection object.
234 @param onDemandRemoteAddress On return, contains the address of the server providing the
235 network connection. Ownership follows the "Create" rule.
236 @param onDemandConnectionStatus On return, contains the current status of the network
238 @return TRUE if the caller should start the connection upon traffic demand, FALSE otherwise.
241 SCNetworkConnectionCopyOnDemandInfo (SCNetworkConnectionRef connection
,
242 CFStringRef
*onDemandRemoteAddress
,
243 SCNetworkConnectionStatus
*onDemandConnectionStatus
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
246 @function SCNetworkConnectionTriggerOnDemandIfNeeded
247 @discussion Trigger a VPN On Demand connection based on a hostname. This function combines the
248 functionality of calling SCNetworkConnectionCreate, SCNetworkConnectionSelectServiceWithOptions,
249 and SCNetworkConnectionStart. The function blocks until the connection is established,
250 fails, or the timer runs out. Since it blocks, this function should not generally be called on
251 the main runloop. NOTE: This function should only be called from process running
252 in the user's context to ensure that the user's keychain is available.
253 @param hostName The hostname that needs to be resolved and accessed.
254 @param afterDNSFail Pass FALSE if this call is made before trying to resolve the hostname, and
255 TRUE if the hostname resolution already failed.
256 @param timeout Number of seconds to wait for a connection. Passing 0 sets a timeout of forever.
257 @param trafficClass Numeric value of a traffic class. Pass 0 for default traffic class, 'Best Effort'.
258 @return TRUE if the connection was established or was not needed, FALSE otherwise.
261 SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName
,
262 Boolean afterDNSFail
,
264 int trafficClass
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
267 @function SCNetworkConnectionGetReachabilityInfo
268 @discussion Get the reachability info of the connection server.
269 @param connection The SCNetworkConnection object.
270 @param reach_flags On return, contains the reachability flags of the connection server.
271 @param reach_if_index On return, contains the index of the interface through which
272 the connection server is reachable.
273 @return TRUE if the reachability information was available for the connection
274 server, FALSE otherwise.
277 SCNetworkConnectionGetReachabilityInfo (SCNetworkConnectionRef connection
,
278 SCNetworkReachabilityFlags
*reach_flags
,
279 unsigned int *reach_if_index
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
283 @enum SCNetworkConnectionType
284 @discussion Type of the network connection.
285 @constant kSCNetworkConnectionTypeUnknown
286 The type of the network connection has not yet been determined.
287 @constant kSCNetworkConnectionTypePPP
288 The network connection is a Point To Point Protocol connection.
289 @constant kSCNetworkConnectionTypeIPLayerVPN
290 The network connection is a IP-layer Virtual Private Network connection.
291 @constant kSCNetworkConnectionTypeAppLayerVPN
292 The network connection is an Application-layer Virtual Private Network connection.
295 kSCNetworkConnectionTypeUnknown
= 0,
296 kSCNetworkConnectionTypePPP
= 1,
297 kSCNetworkConnectionTypeIPLayerVPN
= 2,
298 kSCNetworkConnectionTypeAppLayerVPN
= 3,
301 typedef int SCNetworkConnectionType
;
304 @function SCNetworkConnectionGetType
305 @discussion Get the type of the network connection.
306 @param connection The SCNetworkConnection object.
307 @return The type of the network connection.
309 SCNetworkConnectionType
310 SCNetworkConnectionGetType (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
313 @defined kSCNetworkConnectionFlowPropertyHostName
314 @abstract The host name of the flow's destination server.
316 #define kSCNetworkConnectionFlowPropertyHostName CFSTR("HostName") /* CFString */
319 @defined kSCNetworkConnectionFlowPropertyHostAddress
320 @abstract The address of the flow's destination server.
322 #define kSCNetworkConnectionFlowPropertyHostAddress CFSTR("HostAddress") /* CFData containing a struct sockaddr */
325 @defined kSCNetworkConnectionFlowPropertyHostPort
326 @abstract The port of the flow's destination server.
328 #define kSCNetworkConnectionFlowPropertyHostPort CFSTR("HostPort") /* CFNumber */
331 @function SCNetworkConnectionCopyFlowDivertToken
332 @discussion Copy a token that should be used to activate flow divert on
333 a socket, causing data on the socket to be diverted through the
334 Application-layer VPN provided by the given network connection.
335 @param connection The SCNetworkConnection object.
336 @param flowProperties A dictionary containing properties of the socket
338 @return The flow divert token, or NULL if the flow properties are not valid
339 or the connection does not provide Application-Layer VPN services.
342 SCNetworkConnectionCopyFlowDivertToken (SCNetworkConnectionRef connection
,
343 CFDictionaryRef flowProperties
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
345 #define kSCNetworkConnectionAppPropertyRuleID CFSTR("RuleID")
346 #define kSCNetworkConnectionAppPropertyCodeDirHash CFSTR("CodeDirHash")
347 #define kSCNetworkConnectionAppPropertySigningID CFSTR("SigningID")
348 #define kSCNetworkConnectionAppPropertyAuditToken CFSTR("AuditToken")
349 #define kSCNetworkConnectionAppPropertyPID CFSTR("ProcessID")
350 #define kSCNetworkConnectionAppPropertyUUID CFSTR("UUID")
353 SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
356 #pragma mark SCNetworkConnection "VPN on Demand" SPIs
361 * in the SCDynamicStore we will have :
363 * <key>State:/Network/Global/OnDemand</key>
365 * <key>Triggers</key>
368 * <key>ServiceID</key>
369 * <string>A740678C-1983-492B-BF64-B825AAE7101E</string>
371 * <integer>8</integer>
372 * <key>RemoteAddress</key>
373 * <string>vpn.mycompany.com</string>
374 * <key>OnDemandMatchDomainsAlways</key>
376 * <string>internal.mycompany.com</string>
378 * <key>OnDemandMatchDomainsOnRetry</key>
380 * <string>mycompany.com</string>
382 * <key>kSCNetworkConnectionOnDemandMatchDomainsNever</key>
384 * <string>external.mycompany.com</string>
386 * <key>OnDemandMatchAppEnabled</key>
387 * <integer>0</integer>
394 #define kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY "com.apple.system.SCNetworkConnectionOnDemand"
396 // SCNetworkConnection status
397 // (included in the dictionary returned by SCNetworkConnectionCopyExtendedStatus)
398 #define kSCNetworkConnectionStatus CFSTR("Status") /* CFNumber */
400 // a CFArray[CFDictionary] of VPN on Demand "trigger" configurations
401 #define kSCNetworkConnectionOnDemandTriggers CFSTR("Triggers") /* CFArray[CFDictionary] */
404 #define kSCNetworkConnectionOnDemandServiceID CFSTR("ServiceID") /* CFString */
406 // VPN service status (idle, connecting, connected, disconnecting)
407 #define kSCNetworkConnectionOnDemandStatus CFSTR("Status") /* CFNumber */
409 // VPN server address
410 #define kSCNetworkConnectionOnDemandRemoteAddress CFSTR("RemoteAddress") /* CFString */
412 // Reachability flags for the VPN server
413 #define kSCNetworkConnectionOnDemandReachFlags CFSTR("ReachFlags") /* CFNumber */
415 // Reachability interface index for the VPN server
416 #define kSCNetworkConnectionOnDemandReachInterfaceIndex CFSTR("ReachInterfaceIndex") /* CFNumber */
418 // Network detection has detected DNS Redirecting (like OpenDNS)
419 #define kSCNetworkConnectionOnDemandDNSRedirectDetected CFSTR("DNSRedirectDetected") /* CFBoolean */
421 // a dictionary of address information for known lying results
422 #define kSCNetworkConnectionOnDemandDNSRedirectedAddresses CFSTR("DNSRedirectedAddresses") /* CFDictionary[CFDictionary] */
424 // A dictionary of routes tunneled over this service in the past
425 #define kSCNetworkConnectionOnDemandTunneledNetworks CFSTR("TunneledNetworks") /* CFDictionary[CFDictionary] */
427 // An array of plugin PIDs
428 #define kSCNetworkConnectionOnDemandPluginPIDs CFSTR("PluginPIDs") /* CFArray[CFNumber] */
430 // A dictionary of results, keyed by probe string
431 #define kSCNetworkConnectionOnDemandProbeResults CFSTR("ProbeResults") /* CFDictionary[CFBoolean] */
433 /* The following generic NetworkInfo keys are currently used in the dynamic store as follows:
435 kSCNetworkConnectionOnDemandTunneledNetworks (CFDictionary)
436 - kSCNetworkConnectionNetworkInfoIPv4 (CFDictionary)
437 - kSCNetworkConnectionNetworkInfoIncludedRoutes (CFDictionary)
438 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
439 - kSCNetworkConnectionNetworkInfoMasks (CFData)
440 - kSCNetworkConnectionNetworkInfoExcludedRoutes (CFDictionary)
441 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
442 - kSCNetworkConnectionNetworkInfoMasks (CFData)
443 - kSCNetworkConnectionNetworkInfoIPv6 (CFDictionary)
446 kSCNetworkConnectionOnDemandDNSRedirectedAddresses (CFDictionary)
447 - kSCNetworkConnectionNetworkInfoIPv4 (CFDictionary)
448 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
449 - kSCNetworkConnectionNetworkInfoIPv6 (CFDictionary)
450 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
452 #define kSCNetworkConnectionNetworkInfoIPv4 CFSTR("IPv4") /* CFDictionary[CFType] */
453 #define kSCNetworkConnectionNetworkInfoIPv6 CFSTR("IPv6") /* CFDictionary[CFType] */
454 #define kSCNetworkConnectionNetworkInfoIncludedRoutes CFSTR("IncludedRoutes") /* CFDictionary[CFData] */
455 #define kSCNetworkConnectionNetworkInfoExcludedRoutes CFSTR("ExcludedRoutes") /* CFDictionary[CFData] */
456 #define kSCNetworkConnectionNetworkInfoAddresses CFSTR("Addresses") /* CFData */
457 #define kSCNetworkConnectionNetworkInfoMasks CFSTR("Masks") /* CFData */
459 // a CFArray[CFString] representing those domain (or host) names that, if
460 // matched to a target hostname, should result in our first establishing
461 // the VPN connection before any DNS queries are issued.
462 #define kSCNetworkConnectionOnDemandMatchDomainsAlways CFSTR("OnDemandMatchDomainsAlways") /* CFArray[CFString] */
464 // a CFArray[CFString] representing those domain (or host) names that, if
465 // matched to a target hostname, should result in a DNS query regardless of
466 // whether the VPN connection has been established. If the DNS query returns
467 // an [EAI_NONAME] error then we should establish the VPN connection and
468 // re-issue / retry the query.
469 #define kSCNetworkConnectionOnDemandMatchDomainsOnRetry CFSTR("OnDemandMatchDomainsOnRetry") /* CFArray[CFString] */
471 // a CFArray[CFString] representing those domain (or host) names that should
472 // be excluded from those that would be used to establish tje VPN connection.
473 #define kSCNetworkConnectionOnDemandMatchDomainsNever CFSTR("OnDemandMatchDomainsNever") /* CFArray[CFString] */
475 // A CFNumber (0 or 1) indicating whether or not the App Layer rules should be
476 // used to decide whether or not to establish the tunnel connection.
477 #define kSCNetworkConnectionOnDemandMatchAppEnabled CFSTR("OnDemandMatchAppEnabled") /* CFNumber */
480 __SCNetworkConnectionCopyOnDemandInfoWithName (SCDynamicStoreRef
*storeP
,
481 CFStringRef nodeName
,
482 Boolean onDemandRetry
,
483 CFStringRef
*connectionServiceID
,
484 SCNetworkConnectionStatus
*connectionStatus
,
485 CFStringRef
*vpnRemoteAddress
) __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_2_0
);
489 #pragma mark SCUserPreferences SPIs
493 SCUserPreferencesRemove (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
496 SCUserPreferencesSetCurrent (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
499 SCUserPreferencesCopyName (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
502 SCUserPreferencesGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
505 SCUserPreferencesGetUniqueID (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
508 SCUserPreferencesIsForced (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
511 SCUserPreferencesSetName (SCUserPreferencesRef userPreferences
,
512 CFStringRef newName
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
515 SCNetworkConnectionStartWithUserPreferences (SCNetworkConnectionRef connection
,
516 SCUserPreferencesRef userPreferences
,
517 Boolean linger
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
520 SCUserPreferencesCopyInterfaceConfiguration (SCUserPreferencesRef userPreferences
,
521 SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
524 SCUserPreferencesSetInterfaceConfiguration (SCUserPreferencesRef userPreferences
,
525 SCNetworkInterfaceRef interface
,
526 CFDictionaryRef newOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
529 SCUserPreferencesCopyExtendedInterfaceConfiguration
530 (SCUserPreferencesRef userPreferences
,
531 SCNetworkInterfaceRef interface
,
532 CFStringRef extendedType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
535 SCUserPreferencesSetExtendedInterfaceConfiguration
536 (SCUserPreferencesRef userPreferences
,
537 SCNetworkInterfaceRef interface
,
538 CFStringRef extendedType
,
539 CFDictionaryRef newOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
543 #pragma mark SCUserPreferences + SCNetworkInterface Password SPIs
547 SCUserPreferencesCheckInterfacePassword (SCUserPreferencesRef userPreferences
,
548 SCNetworkInterfaceRef interface
,
549 SCNetworkInterfacePasswordType passwordType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
552 SCUserPreferencesCopyInterfacePassword (SCUserPreferencesRef userPreferences
,
553 SCNetworkInterfaceRef interface
,
554 SCNetworkInterfacePasswordType passwordType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
557 SCUserPreferencesRemoveInterfacePassword (SCUserPreferencesRef userPreferences
,
558 SCNetworkInterfaceRef interface
,
559 SCNetworkInterfacePasswordType passwordType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
562 SCUserPreferencesSetInterfacePassword (SCUserPreferencesRef userPreferences
,
563 SCNetworkInterfaceRef interface
,
564 SCNetworkInterfacePasswordType passwordType
,
566 CFDictionaryRef options
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
570 #endif /* _SCNETWORKCONNECTIONPRIVATE_H */