2 * Copyright (c) 2006, 2008, 2009, 2011-2014 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 #if !TARGET_IPHONE_SIMULATOR
30 #include <ne_session.h>
32 #include <CoreFoundation/CoreFoundation.h>
33 #include <SystemConfiguration/SystemConfiguration.h>
34 #include <SystemConfiguration/SCNetworkConfigurationPrivate.h>
37 typedef const struct __SCUserPreferencesRef
* SCUserPreferencesRef
;
44 #pragma mark SCNetworkConnection SPIs
46 CFArrayRef
/* of SCNetworkServiceRef's */
47 SCNetworkConnectionCopyAvailableServices (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
49 SCNetworkConnectionRef
50 SCNetworkConnectionCreateWithService (CFAllocatorRef allocator
,
51 SCNetworkServiceRef service
,
52 SCNetworkConnectionCallBack callout
,
53 SCNetworkConnectionContext
*context
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
56 SCNetworkConnectionGetService (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
58 CFArrayRef
/* of SCUserPreferencesRef's */
59 SCNetworkConnectionCopyAllUserPreferences (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
62 SCNetworkConnectionCopyCurrentUserPreferences (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
65 SCNetworkConnectionCreateUserPreferences (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
68 SCNetworkConnectionSuspend (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_3
,__IPHONE_2_0
);
71 SCNetworkConnectionResume (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_3
,__IPHONE_2_0
);
74 SCNetworkConnectionRefreshOnDemandState (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
77 SCNetworkConnectionSetClientInfo (SCNetworkConnectionRef connection
,
78 mach_port_t client_audit_session
,
81 pid_t client_pid
) __OSX_AVAILABLE_STARTING(__MAC_10_8
,__IPHONE_5_0
);
84 @function SCNetworkConnectionCreate
85 @discussion Create a network connection that is not associated with any
87 @param allocator The CFAllocator that should be used to allocate
88 memory for the connection structure. This parameter may be
89 NULL in which case the current default CFAllocator is used.
90 If this reference is not a valid CFAllocator, the behavior
92 @param callout The function to be called when the status
93 of the connection changes. If this parameter is NULL, the
94 application will not receive notifications of status change
95 and will need to poll for updates.
96 @param context The SCNetworkConnectionContext associated with the
98 @return The new SCNetworkConnection object.
100 SCNetworkConnectionRef
101 SCNetworkConnectionCreate (CFAllocatorRef allocator
,
102 SCNetworkConnectionCallBack callout
,
103 SCNetworkConnectionContext
*context
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
106 @function SCNetworkConnectionSetClientAuditInfo
107 @discussion Set audit information for the process that is initiating the network traffic
108 that will be transmitted over this network connection.
109 @param connection The SCNetworkConnection object.
110 @param client_audit_token The audit token of the initiator process.
111 @param audit_session The audit session mach port of the initiator process.
112 @param bootstrap_port The bootstrap port of the initiator process.
113 @param pid The PID of the initiator process.
114 @param uuid The Mach-O UUID of the initiator process.
115 @param bundle_id The CFBundleIdentifier of the initiator process.
116 @return TRUE if the audit token was set successfully, FALSE if an error occurred.
119 SCNetworkConnectionSetClientAuditInfo (SCNetworkConnectionRef connection
,
120 audit_token_t client_audit_token
,
121 mach_port_t audit_session
,
122 mach_port_t bootstrap_port
,
125 const char *bundle_id
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
128 @defined kSCNetworkConnectionSelectionOptionNoUserPrefs
129 @abstract Indicates whether or not SCNetworkConnectionSelectServiceWithOptions
130 should consult the user preferences to find a network service.
132 #define kSCNetworkConnectionSelectionOptionNoUserPrefs CFSTR("NoUserPrefs") /* CFBoolean */
135 @define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass
136 @abstract The traffic class that is attempting to trigger OnDemand.
138 #define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass CFSTR("OnDemandTrafficClass") // CFNumber
139 // __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)
141 @define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier
142 @abstract The account identifier that is attempting to trigger OnDemand.
144 #define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier CFSTR("OnDemandAccountIdentifier") /* CFString */
147 @define kSCNetworkConnectionSelectionOptionOnDemandMatchInfo
148 @abstract A dictionary containing information about the On Demand trigger that matched
150 #define kSCNetworkConnectionSelectionOptionOnDemandMatchInfo CFSTR("OnDemandMatchInfo") /* CFDictionary */
153 @define kSCNetworkConnectionOnDemandMatchInfoVPNType
154 @abstract The type of VPN connection associated with the matching trigger.
156 #define kSCNetworkConnectionOnDemandMatchInfoVPNType CFSTR("OnDemandMatchInfoVPNType") /* CFNumber containing a SCNetworkConnectionType */
159 @define kSCNetworkConnectionOnDemandMatchInfoDomain
160 @abstract The specific DNS domain in the trigger's match domains that matched the on demand hostname.
162 #define kSCNetworkConnectionOnDemandMatchInfoDomain CFSTR("OnDemandMatchInfoDomain") /* CFString */
165 @define kSCNetworkConnectionOnDemandMatchInfoAppRuleID
166 @abstract The identifier of the app rule in the matching trigger that matched the calling app.
168 #define kSCNetworkConnectionOnDemandMatchInfoAppRuleID CFSTR("OnDemandMatchInfoAppRuleID") /* CFString */
171 @define kSCNetworkConnectionOnDemandMatchInfoOnRetry
172 @abstract A flag indicating if the on demand hostname matched a domain in the "on retry" match domains.
174 #define kSCNetworkConnectionOnDemandMatchInfoOnRetry CFSTR("OnDemandMatchInfoOnRetry") /* CFString */
178 @function SCNetworkConnectionSelectServiceWithOptions
179 @discussion Associate a network connection with a network service based on some
180 selection options. This function can only be called on connections that are
181 not already associated with a network service.
182 @param connection The SCNetworkConnection object.
183 @param selectionOptions A dictionary containing some options to be used to
184 select the appropriate service.
185 @return TRUE if an appropriate network service was found and was associated with
186 the connection, FALSE otherwise.
189 SCNetworkConnectionSelectServiceWithOptions (SCNetworkConnectionRef connection
,
190 CFDictionaryRef selectionOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
193 @function SCNetworkConnectionOnDemandShouldRetryOnFailure
194 @discussion After SCNetworkConnectionSelectServiceWithOptions returns FALSE, use
195 this function to determine if an On Demand service was indeed matched for
196 On Retry behavior (try resolving/connecting, and start VPN on failure).
197 @param connection The SCNetworkConnection object.
198 @return TRUE if the selected On Demand connection should be retried on DNS or connection
199 failure, FALSE otherwise.
202 SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
205 @function SCNetworkConnectionCanTunnelAddress
206 @discussion This function should be called on a connection object selected with
207 SCNetworkConnectionSelectServiceWithOptions. If the address belongs to
208 the connection (the tunnel can be used for the address), the function
209 will return TRUE. If startImmediately is set, the address should not be trusted
210 and the VPN should be brought up before attempting to connect.
211 @param connection The SCNetworkConnection object.
212 @param address The address structure to check.
213 @param startImmediately On return, TRUE indicates that the address is not trusted
214 and the VPN should be started immediately.
215 @return TRUE if the selected VPN connection's tunnel routes match the address.
218 SCNetworkConnectionCanTunnelAddress (SCNetworkConnectionRef connection
,
219 const struct sockaddr
*address
,
220 Boolean
*startImmediately
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
223 @function SCNetworkConnectionIsOnDemandSuspended
224 @discussion Indicates whether the On Demand connection is suspended or not. Call
225 SCNetworkConnectionSelectServiceWithOptions before calling this function.
226 @param connection The SCNetworkConnection object.
227 @return TRUE if the On Demand connection is suspended, FALSE otherwise.
230 SCNetworkConnectionIsOnDemandSuspended (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
233 @function SCNetworkConnectionCopyOnDemandInfo
234 @discussion Indicates whether or not the caller should start the network connection,
235 assuming that the caller has network traffic that needs to use the network connection.
236 @param connection The SCNetworkConnection object.
237 @param onDemandRemoteAddress On return, contains the address of the server providing the
238 network connection. Ownership follows the "Create" rule.
239 @param onDemandConnectionStatus On return, contains the current status of the network
241 @return TRUE if the caller should start the connection upon traffic demand, FALSE otherwise.
244 SCNetworkConnectionCopyOnDemandInfo (SCNetworkConnectionRef connection
,
245 CFStringRef
*onDemandRemoteAddress
,
246 SCNetworkConnectionStatus
*onDemandConnectionStatus
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
249 @function SCNetworkConnectionTriggerOnDemandIfNeeded
250 @discussion Trigger a VPN On Demand connection based on a hostname. This function combines the
251 functionality of calling SCNetworkConnectionCreate, SCNetworkConnectionSelectServiceWithOptions,
252 and SCNetworkConnectionStart. The function blocks until the connection is established,
253 fails, or the timer runs out. Since it blocks, this function should not generally be called on
254 the main runloop. NOTE: This function should only be called from process running
255 in the user's context to ensure that the user's keychain is available.
256 @param hostName The hostname that needs to be resolved and accessed.
257 @param afterDNSFail Pass FALSE if this call is made before trying to resolve the hostname, and
258 TRUE if the hostname resolution already failed.
259 @param timeout Number of seconds to wait for a connection. Passing 0 sets a timeout of forever.
260 @param trafficClass Numeric value of a traffic class. Pass 0 for default traffic class, 'Best Effort'.
261 @return TRUE if the connection was established or was not needed, FALSE otherwise.
264 SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName
,
265 Boolean afterDNSFail
,
267 int trafficClass
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
270 @function SCNetworkConnectionGetReachabilityInfo
271 @discussion Get the reachability info of the connection server.
272 @param connection The SCNetworkConnection object.
273 @param reach_flags On return, contains the reachability flags of the connection server.
274 @param reach_if_index On return, contains the index of the interface through which
275 the connection server is reachable.
276 @return TRUE if the reachability information was available for the connection
277 server, FALSE otherwise.
280 SCNetworkConnectionGetReachabilityInfo (SCNetworkConnectionRef connection
,
281 SCNetworkReachabilityFlags
*reach_flags
,
282 unsigned int *reach_if_index
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
286 @enum SCNetworkConnectionType
287 @discussion Type of the network connection.
288 @constant kSCNetworkConnectionTypeUnknown
289 The type of the network connection has not yet been determined.
290 @constant kSCNetworkConnectionTypePPP
291 The network connection is a Point To Point Protocol connection.
292 @constant kSCNetworkConnectionTypeIPLayerVPN
293 The network connection is a IP-layer Virtual Private Network connection.
294 @constant kSCNetworkConnectionTypeAppLayerVPN
295 The network connection is an Application-layer Virtual Private Network connection.
298 kSCNetworkConnectionTypeUnknown
= 0,
299 kSCNetworkConnectionTypePPP
= 1,
300 kSCNetworkConnectionTypeIPLayerVPN
= 2,
301 kSCNetworkConnectionTypeAppLayerVPN
= 3,
304 typedef int SCNetworkConnectionType
;
307 @function SCNetworkConnectionGetType
308 @discussion Get the type of the network connection.
309 @param connection The SCNetworkConnection object.
310 @return The type of the network connection.
312 SCNetworkConnectionType
313 SCNetworkConnectionGetType (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
316 @defined kSCNetworkConnectionFlowPropertyHostName
317 @abstract The host name of the flow's destination server.
319 #define kSCNetworkConnectionFlowPropertyHostName CFSTR("HostName") /* CFString */
322 @defined kSCNetworkConnectionFlowPropertyHostAddress
323 @abstract The address of the flow's destination server.
325 #define kSCNetworkConnectionFlowPropertyHostAddress CFSTR("HostAddress") /* CFData containing a struct sockaddr */
328 @defined kSCNetworkConnectionFlowPropertyHostPort
329 @abstract The port of the flow's destination server.
331 #define kSCNetworkConnectionFlowPropertyHostPort CFSTR("HostPort") /* CFNumber */
334 @function SCNetworkConnectionCopyFlowDivertToken
335 @discussion Copy a token that should be used to activate flow divert on
336 a socket, causing data on the socket to be diverted through the
337 Application-layer VPN provided by the given network connection.
338 @param connection The SCNetworkConnection object.
339 @param flowProperties A dictionary containing properties of the socket
341 @return The flow divert token, or NULL if the flow properties are not valid
342 or the connection does not provide Application-Layer VPN services.
345 SCNetworkConnectionCopyFlowDivertToken (SCNetworkConnectionRef connection
,
346 CFDictionaryRef flowProperties
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
348 #define kSCNetworkConnectionAppPropertyRuleID CFSTR("RuleID")
349 #define kSCNetworkConnectionAppPropertyCodeDirHash CFSTR("CodeDirHash")
350 #define kSCNetworkConnectionAppPropertySigningID CFSTR("SigningID")
351 #define kSCNetworkConnectionAppPropertyAuditToken CFSTR("AuditToken")
352 #define kSCNetworkConnectionAppPropertyPID CFSTR("ProcessID")
353 #define kSCNetworkConnectionAppPropertyUUID CFSTR("UUID")
356 SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection
) __OSX_AVAILABLE_STARTING(__MAC_10_9
,__IPHONE_7_0
);
359 #pragma mark SCNetworkConnection "VPN on Demand" SPIs
364 * in the SCDynamicStore we will have :
366 * <key>State:/Network/Global/OnDemand</key>
368 * <key>Triggers</key>
371 * <key>ServiceID</key>
372 * <string>A740678C-1983-492B-BF64-B825AAE7101E</string>
374 * <integer>8</integer>
375 * <key>RemoteAddress</key>
376 * <string>vpn.mycompany.com</string>
377 * <key>OnDemandMatchDomainsAlways</key>
379 * <string>internal.mycompany.com</string>
381 * <key>OnDemandMatchDomainsOnRetry</key>
383 * <string>mycompany.com</string>
385 * <key>kSCNetworkConnectionOnDemandMatchDomainsNever</key>
387 * <string>external.mycompany.com</string>
389 * <key>OnDemandMatchAppEnabled</key>
390 * <integer>0</integer>
397 #define kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY "com.apple.system.SCNetworkConnectionOnDemand"
399 // SCNetworkConnection status
400 // (included in the dictionary returned by SCNetworkConnectionCopyExtendedStatus)
401 #define kSCNetworkConnectionStatus CFSTR("Status") /* CFNumber */
403 // a CFArray[CFDictionary] of VPN on Demand "trigger" configurations
404 #define kSCNetworkConnectionOnDemandTriggers CFSTR("Triggers") /* CFArray[CFDictionary] */
407 #define kSCNetworkConnectionOnDemandServiceID CFSTR("ServiceID") /* CFString */
409 // VPN service status (idle, connecting, connected, disconnecting)
410 #define kSCNetworkConnectionOnDemandStatus CFSTR("Status") /* CFNumber */
412 // VPN server address
413 #define kSCNetworkConnectionOnDemandRemoteAddress CFSTR("RemoteAddress") /* CFString */
415 // Reachability flags for the VPN server
416 #define kSCNetworkConnectionOnDemandReachFlags CFSTR("ReachFlags") /* CFNumber */
418 // Reachability interface index for the VPN server
419 #define kSCNetworkConnectionOnDemandReachInterfaceIndex CFSTR("ReachInterfaceIndex") /* CFNumber */
421 // Network detection has detected DNS Redirecting (like OpenDNS)
422 #define kSCNetworkConnectionOnDemandDNSRedirectDetected CFSTR("DNSRedirectDetected") /* CFBoolean */
424 // a dictionary of address information for known lying results
425 #define kSCNetworkConnectionOnDemandDNSRedirectedAddresses CFSTR("DNSRedirectedAddresses") /* CFDictionary[CFDictionary] */
427 // A dictionary of routes tunneled over this service in the past
428 #define kSCNetworkConnectionOnDemandTunneledNetworks CFSTR("TunneledNetworks") /* CFDictionary[CFDictionary] */
430 // An array of plugin PIDs
431 #define kSCNetworkConnectionOnDemandPluginPIDs CFSTR("PluginPIDs") /* CFArray[CFNumber] */
433 // A dictionary of results, keyed by probe string
434 #define kSCNetworkConnectionOnDemandProbeResults CFSTR("ProbeResults") /* CFDictionary[CFBoolean] */
436 /* The following generic NetworkInfo keys are currently used in the dynamic store as follows:
438 kSCNetworkConnectionOnDemandTunneledNetworks (CFDictionary)
439 - kSCNetworkConnectionNetworkInfoIPv4 (CFDictionary)
440 - kSCNetworkConnectionNetworkInfoIncludedRoutes (CFDictionary)
441 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
442 - kSCNetworkConnectionNetworkInfoMasks (CFData)
443 - kSCNetworkConnectionNetworkInfoExcludedRoutes (CFDictionary)
444 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
445 - kSCNetworkConnectionNetworkInfoMasks (CFData)
446 - kSCNetworkConnectionNetworkInfoIPv6 (CFDictionary)
449 kSCNetworkConnectionOnDemandDNSRedirectedAddresses (CFDictionary)
450 - kSCNetworkConnectionNetworkInfoIPv4 (CFDictionary)
451 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
452 - kSCNetworkConnectionNetworkInfoIPv6 (CFDictionary)
453 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
455 #define kSCNetworkConnectionNetworkInfoIPv4 CFSTR("IPv4") /* CFDictionary[CFType] */
456 #define kSCNetworkConnectionNetworkInfoIPv6 CFSTR("IPv6") /* CFDictionary[CFType] */
457 #define kSCNetworkConnectionNetworkInfoIncludedRoutes CFSTR("IncludedRoutes") /* CFDictionary[CFData] */
458 #define kSCNetworkConnectionNetworkInfoExcludedRoutes CFSTR("ExcludedRoutes") /* CFDictionary[CFData] */
459 #define kSCNetworkConnectionNetworkInfoAddresses CFSTR("Addresses") /* CFData */
460 #define kSCNetworkConnectionNetworkInfoMasks CFSTR("Masks") /* CFData */
462 // a CFArray[CFString] representing those domain (or host) names that, if
463 // matched to a target hostname, should result in our first establishing
464 // the VPN connection before any DNS queries are issued.
465 #define kSCNetworkConnectionOnDemandMatchDomainsAlways CFSTR("OnDemandMatchDomainsAlways") /* CFArray[CFString] */
467 // a CFArray[CFString] representing those domain (or host) names that, if
468 // matched to a target hostname, should result in a DNS query regardless of
469 // whether the VPN connection has been established. If the DNS query returns
470 // an [EAI_NONAME] error then we should establish the VPN connection and
471 // re-issue / retry the query.
472 #define kSCNetworkConnectionOnDemandMatchDomainsOnRetry CFSTR("OnDemandMatchDomainsOnRetry") /* CFArray[CFString] */
474 // a CFArray[CFString] representing those domain (or host) names that should
475 // be excluded from those that would be used to establish tje VPN connection.
476 #define kSCNetworkConnectionOnDemandMatchDomainsNever CFSTR("OnDemandMatchDomainsNever") /* CFArray[CFString] */
478 // A CFNumber (0 or 1) indicating whether or not the App Layer rules should be
479 // used to decide whether or not to establish the tunnel connection.
480 #define kSCNetworkConnectionOnDemandMatchAppEnabled CFSTR("OnDemandMatchAppEnabled") /* CFNumber */
483 __SCNetworkConnectionCopyOnDemandInfoWithName (SCDynamicStoreRef
*storeP
,
484 CFStringRef nodeName
,
485 Boolean onDemandRetry
,
486 CFStringRef
*connectionServiceID
,
487 SCNetworkConnectionStatus
*connectionStatus
,
488 CFStringRef
*vpnRemoteAddress
) __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_2_0
);
490 #if !TARGET_IPHONE_SIMULATOR
491 SCNetworkConnectionStatus
492 SCNetworkConnectionGetStatusFromNEStatus (ne_session_status_t status
) __OSX_AVAILABLE_STARTING(__MAC_10_10
,__IPHONE_8_0
);
493 #endif /* !TARGET_IPHONE_SIMULATOR */
496 #pragma mark SCUserPreferences SPIs
500 SCUserPreferencesRemove (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
503 SCUserPreferencesSetCurrent (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
506 SCUserPreferencesCopyName (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
509 SCUserPreferencesGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
512 SCUserPreferencesGetUniqueID (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
515 SCUserPreferencesIsForced (SCUserPreferencesRef userPreferences
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
518 SCUserPreferencesSetName (SCUserPreferencesRef userPreferences
,
519 CFStringRef newName
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
522 SCNetworkConnectionStartWithUserPreferences (SCNetworkConnectionRef connection
,
523 SCUserPreferencesRef userPreferences
,
524 Boolean linger
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
527 SCUserPreferencesCopyInterfaceConfiguration (SCUserPreferencesRef userPreferences
,
528 SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
531 SCUserPreferencesSetInterfaceConfiguration (SCUserPreferencesRef userPreferences
,
532 SCNetworkInterfaceRef interface
,
533 CFDictionaryRef newOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
536 SCUserPreferencesCopyExtendedInterfaceConfiguration
537 (SCUserPreferencesRef userPreferences
,
538 SCNetworkInterfaceRef interface
,
539 CFStringRef extendedType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
542 SCUserPreferencesSetExtendedInterfaceConfiguration
543 (SCUserPreferencesRef userPreferences
,
544 SCNetworkInterfaceRef interface
,
545 CFStringRef extendedType
,
546 CFDictionaryRef newOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
550 #pragma mark SCUserPreferences + SCNetworkInterface Password SPIs
554 SCUserPreferencesCheckInterfacePassword (SCUserPreferencesRef userPreferences
,
555 SCNetworkInterfaceRef interface
,
556 SCNetworkInterfacePasswordType passwordType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
559 SCUserPreferencesCopyInterfacePassword (SCUserPreferencesRef userPreferences
,
560 SCNetworkInterfaceRef interface
,
561 SCNetworkInterfacePasswordType passwordType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
564 SCUserPreferencesRemoveInterfacePassword (SCUserPreferencesRef userPreferences
,
565 SCNetworkInterfaceRef interface
,
566 SCNetworkInterfacePasswordType passwordType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
569 SCUserPreferencesSetInterfacePassword (SCUserPreferencesRef userPreferences
,
570 SCNetworkInterfaceRef interface
,
571 SCNetworkInterfacePasswordType passwordType
,
573 CFDictionaryRef options
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
);
577 #endif /* _SCNETWORKCONNECTIONPRIVATE_H */