2 * Copyright (c) 2006, 2008, 2009, 2011-2015, 2018 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 <os/availability.h>
28 #include <TargetConditionals.h>
29 #include <sys/cdefs.h>
30 #if !TARGET_OS_SIMULATOR
31 #include <ne_session.h>
32 #endif // !TARGET_OS_SIMULATOR
33 #include <CoreFoundation/CoreFoundation.h>
34 #include <SystemConfiguration/SystemConfiguration.h>
35 #include <SystemConfiguration/SCNetworkConfigurationPrivate.h>
38 typedef const struct CF_BRIDGED_TYPE(id
) __SCUserPreferencesRef
* SCUserPreferencesRef
;
45 #pragma mark SCNetworkConnection SPIs
47 CFArrayRef
/* of SCNetworkServiceRef's */
48 SCNetworkConnectionCopyAvailableServices (SCNetworkSetRef set
) API_AVAILABLE(macos(10.5), ios(2.0));
50 SCNetworkConnectionRef
51 SCNetworkConnectionCreateWithService (CFAllocatorRef allocator
,
52 SCNetworkServiceRef service
,
53 SCNetworkConnectionCallBack callout
,
54 SCNetworkConnectionContext
*context
) API_AVAILABLE(macos(10.5), ios(2.0));
57 SCNetworkConnectionGetService (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.5), ios(2.0));
59 CFArrayRef
/* of SCUserPreferencesRef's */
60 SCNetworkConnectionCopyAllUserPreferences (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.5), ios(2.0));
63 SCNetworkConnectionCopyCurrentUserPreferences (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.5), ios(2.0));
66 SCNetworkConnectionCreateUserPreferences (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.5), ios(2.0));
69 SCNetworkConnectionSuspend (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.3), ios(2.0));
72 SCNetworkConnectionResume (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.3), ios(2.0));
74 #if !TARGET_OS_SIMULATOR
76 SCNetworkConnectionRefreshOnDemandState (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.9), ios(7.0));
77 #endif // !TARGET_OS_SIMULATOR
80 SCNetworkConnectionSetClientInfo (SCNetworkConnectionRef connection
,
81 mach_port_t client_audit_session
,
84 pid_t client_pid
) API_AVAILABLE(macos(10.8), ios(5.0));
87 @function SCNetworkConnectionCreate
88 @discussion Create a network connection that is not associated with any
90 @param allocator The CFAllocator that should be used to allocate
91 memory for the connection structure. This parameter may be
92 NULL in which case the current default CFAllocator is used.
93 If this reference is not a valid CFAllocator, the behavior
95 @param callout The function to be called when the status
96 of the connection changes. If this parameter is NULL, the
97 application will not receive notifications of status change
98 and will need to poll for updates.
99 @param context The SCNetworkConnectionContext associated with the
101 @return The new SCNetworkConnection object.
103 SCNetworkConnectionRef
104 SCNetworkConnectionCreate (CFAllocatorRef allocator
,
105 SCNetworkConnectionCallBack callout
,
106 SCNetworkConnectionContext
*context
) API_AVAILABLE(macos(10.9), ios(7.0));
109 @function SCNetworkConnectionSetClientAuditInfo
110 @discussion Set audit information for the process that is initiating the network traffic
111 that will be transmitted over this network connection.
112 @param connection The SCNetworkConnection object.
113 @param client_audit_token The audit token of the initiator process.
114 @param audit_session The audit session mach port of the initiator process.
115 @param bootstrap_port The bootstrap port of the initiator process.
116 @param pid The PID of the initiator process.
117 @param uuid The Mach-O UUID of the initiator process.
118 @param bundle_id The CFBundleIdentifier of the initiator process.
119 @return TRUE if the audit token was set successfully, FALSE if an error occurred.
122 SCNetworkConnectionSetClientAuditInfo (SCNetworkConnectionRef connection
,
123 audit_token_t client_audit_token
,
124 mach_port_t audit_session
,
125 mach_port_t bootstrap_port
,
128 const char *bundle_id
) API_AVAILABLE(macos(10.9), ios(7.0));
131 @defined kSCNetworkConnectionSelectionOptionNoUserPrefs
132 @abstract Indicates whether or not SCNetworkConnectionSelectServiceWithOptions
133 should consult the user preferences to find a network service.
135 #define kSCNetworkConnectionSelectionOptionNoUserPrefs CFSTR("NoUserPrefs") /* CFBoolean */
138 @define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass
139 @abstract The traffic class that is attempting to trigger OnDemand.
141 #define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass CFSTR("OnDemandTrafficClass") // CFNumber
142 // API_AVAILABLE(macos(9.0))
143 // SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0))
146 @define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier
147 @abstract The account identifier that is attempting to trigger OnDemand.
149 #define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier CFSTR("OnDemandAccountIdentifier") /* CFString */
152 @define kSCNetworkConnectionSelectionOptionOnDemandMatchInfo
153 @abstract A dictionary containing information about the On Demand trigger that matched
155 #define kSCNetworkConnectionSelectionOptionOnDemandMatchInfo CFSTR("OnDemandMatchInfo") /* CFDictionary */
158 @define kSCNetworkConnectionOnDemandMatchInfoVPNType
159 @abstract The type of VPN connection associated with the matching trigger.
161 #define kSCNetworkConnectionOnDemandMatchInfoVPNType CFSTR("OnDemandMatchInfoVPNType") /* CFNumber containing a SCNetworkConnectionType */
164 @define kSCNetworkConnectionOnDemandMatchInfoDomain
165 @abstract The specific DNS domain in the trigger's match domains that matched the on demand hostname.
167 #define kSCNetworkConnectionOnDemandMatchInfoDomain CFSTR("OnDemandMatchInfoDomain") /* CFString */
170 @define kSCNetworkConnectionOnDemandMatchInfoAppRuleID
171 @abstract The identifier of the app rule in the matching trigger that matched the calling app.
173 #define kSCNetworkConnectionOnDemandMatchInfoAppRuleID CFSTR("OnDemandMatchInfoAppRuleID") /* CFString */
176 @define kSCNetworkConnectionOnDemandMatchInfoOnRetry
177 @abstract A flag indicating if the on demand hostname matched a domain in the "on retry" match domains.
179 #define kSCNetworkConnectionOnDemandMatchInfoOnRetry CFSTR("OnDemandMatchInfoOnRetry") /* CFString */
183 @function SCNetworkConnectionSelectServiceWithOptions
184 @discussion Associate a network connection with a network service based on some
185 selection options. This function can only be called on connections that are
186 not already associated with a network service.
187 @param connection The SCNetworkConnection object.
188 @param selectionOptions A dictionary containing some options to be used to
189 select the appropriate service.
190 @return TRUE if an appropriate network service was found and was associated with
191 the connection, FALSE otherwise.
194 SCNetworkConnectionSelectServiceWithOptions (SCNetworkConnectionRef connection
,
195 CFDictionaryRef selectionOptions
) API_AVAILABLE(macos(10.9), ios(7.0));
198 @function SCNetworkConnectionOnDemandShouldRetryOnFailure
199 @discussion After SCNetworkConnectionSelectServiceWithOptions returns FALSE, use
200 this function to determine if an On Demand service was indeed matched for
201 On Retry behavior (try resolving/connecting, and start VPN on failure).
202 @param connection The SCNetworkConnection object.
203 @return TRUE if the selected On Demand connection should be retried on DNS or connection
204 failure, FALSE otherwise.
207 SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.9), ios(7.0));
210 @function SCNetworkConnectionCanTunnelAddress
211 @discussion This function should be called on a connection object selected with
212 SCNetworkConnectionSelectServiceWithOptions. If the address belongs to
213 the connection (the tunnel can be used for the address), the function
214 will return TRUE. If startImmediately is set, the address should not be trusted
215 and the VPN should be brought up before attempting to connect.
216 @param connection The SCNetworkConnection object.
217 @param address The address structure to check.
218 @param startImmediately On return, TRUE indicates that the address is not trusted
219 and the VPN should be started immediately.
220 @return TRUE if the selected VPN connection's tunnel routes match the address.
223 SCNetworkConnectionCanTunnelAddress (SCNetworkConnectionRef connection
,
224 const struct sockaddr
*address
,
225 Boolean
*startImmediately
) API_AVAILABLE(macos(10.9), ios(7.0));
228 @function SCNetworkConnectionIsOnDemandSuspended
229 @discussion Indicates whether the On Demand connection is suspended or not. Call
230 SCNetworkConnectionSelectServiceWithOptions before calling this function.
231 @param connection The SCNetworkConnection object.
232 @return TRUE if the On Demand connection is suspended, FALSE otherwise.
235 SCNetworkConnectionIsOnDemandSuspended (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.9), ios(7.0));
238 @function SCNetworkConnectionCopyOnDemandInfo
239 @discussion Indicates whether or not the caller should start the network connection,
240 assuming that the caller has network traffic that needs to use the network connection.
241 @param connection The SCNetworkConnection object.
242 @param onDemandRemoteAddress On return, contains the address of the server providing the
243 network connection. Ownership follows the "Create" rule.
244 @param onDemandConnectionStatus On return, contains the current status of the network
246 @return TRUE if the caller should start the connection upon traffic demand, FALSE otherwise.
249 SCNetworkConnectionCopyOnDemandInfo (SCNetworkConnectionRef connection
,
250 CFStringRef
*onDemandRemoteAddress
,
251 SCNetworkConnectionStatus
*onDemandConnectionStatus
) API_AVAILABLE(macos(10.9), ios(7.0));
254 @function SCNetworkConnectionTriggerOnDemandIfNeeded
255 @discussion Trigger a VPN On Demand connection based on a hostname. This function combines the
256 functionality of calling SCNetworkConnectionCreate, SCNetworkConnectionSelectServiceWithOptions,
257 and SCNetworkConnectionStart. The function blocks until the connection is established,
258 fails, or the timer runs out. Since it blocks, this function should not generally be called on
259 the main runloop. NOTE: This function should only be called from process running
260 in the user's context to ensure that the user's keychain is available.
261 @param hostName The hostname that needs to be resolved and accessed.
262 @param afterDNSFail Pass FALSE if this call is made before trying to resolve the hostname, and
263 TRUE if the hostname resolution already failed.
264 @param timeout Number of seconds to wait for a connection. Passing 0 sets a timeout of forever.
265 @param trafficClass Numeric value of a traffic class. Pass 0 for default traffic class, 'Best Effort'.
266 @return TRUE if the connection was established or was not needed, FALSE otherwise.
269 SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName
,
270 Boolean afterDNSFail
,
272 int trafficClass
) API_AVAILABLE(macos(10.9), ios(7.0));
275 @function SCNetworkConnectionGetReachabilityInfo
276 @discussion Get the reachability info of the connection server.
277 @param connection The SCNetworkConnection object.
278 @param reach_flags On return, contains the reachability flags of the connection server.
279 @param reach_if_index On return, contains the index of the interface through which
280 the connection server is reachable.
281 @return TRUE if the reachability information was available for the connection
282 server, FALSE otherwise.
285 SCNetworkConnectionGetReachabilityInfo (SCNetworkConnectionRef connection
,
286 SCNetworkReachabilityFlags
*reach_flags
,
287 unsigned int *reach_if_index
) API_AVAILABLE(macos(10.9), ios(7.0));
291 @enum SCNetworkConnectionType
292 @discussion Type of the network connection.
293 @constant kSCNetworkConnectionTypeUnknown
294 The type of the network connection has not yet been determined.
295 @constant kSCNetworkConnectionTypePPP
296 The network connection is a Point To Point Protocol connection.
297 @constant kSCNetworkConnectionTypeIPLayerVPN
298 The network connection is a IP-layer Virtual Private Network connection.
299 @constant kSCNetworkConnectionTypeAppLayerVPN
300 The network connection is an Application-layer Virtual Private Network connection.
303 kSCNetworkConnectionTypeUnknown
= 0,
304 kSCNetworkConnectionTypePPP
= 1,
305 kSCNetworkConnectionTypeIPLayerVPN
= 2,
306 kSCNetworkConnectionTypeAppLayerVPN
= 3,
309 typedef int SCNetworkConnectionType
;
312 @function SCNetworkConnectionGetType
313 @discussion Get the type of the network connection.
314 @param connection The SCNetworkConnection object.
315 @return The type of the network connection.
317 SCNetworkConnectionType
318 SCNetworkConnectionGetType (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.9), ios(7.0));
321 @defined kSCNetworkConnectionFlowPropertyHostName
322 @abstract The host name of the flow's destination server.
324 #define kSCNetworkConnectionFlowPropertyHostName CFSTR("HostName") /* CFString */
327 @defined kSCNetworkConnectionFlowPropertyHostAddress
328 @abstract The address of the flow's destination server.
330 #define kSCNetworkConnectionFlowPropertyHostAddress CFSTR("HostAddress") /* CFData containing a struct sockaddr */
333 @defined kSCNetworkConnectionFlowPropertyHostPort
334 @abstract The port of the flow's destination server.
336 #define kSCNetworkConnectionFlowPropertyHostPort CFSTR("HostPort") /* CFNumber */
339 @function SCNetworkConnectionCopyFlowDivertToken
340 @discussion Copy a token that should be used to activate flow divert on
341 a socket, causing data on the socket to be diverted through the
342 Application-layer VPN provided by the given network connection.
343 @param connection The SCNetworkConnection object.
344 @param flowProperties A dictionary containing properties of the socket
346 @return The flow divert token, or NULL if the flow properties are not valid
347 or the connection does not provide Application-Layer VPN services.
350 SCNetworkConnectionCopyFlowDivertToken (SCNetworkConnectionRef connection
,
351 CFDictionaryRef flowProperties
) API_AVAILABLE(macos(10.9), ios(7.0));
353 #define kSCNetworkConnectionAppPropertyRuleID CFSTR("RuleID")
354 #define kSCNetworkConnectionAppPropertyCodeDirHash CFSTR("CodeDirHash")
355 #define kSCNetworkConnectionAppPropertySigningID CFSTR("SigningID")
356 #define kSCNetworkConnectionAppPropertyAuditToken CFSTR("AuditToken")
357 #define kSCNetworkConnectionAppPropertyPID CFSTR("ProcessID")
358 #define kSCNetworkConnectionAppPropertyUUID CFSTR("UUID")
361 SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection
) API_AVAILABLE(macos(10.9), ios(7.0));
364 #pragma mark SCNetworkConnection "VPN on Demand" SPIs
369 * in the SCDynamicStore we will have :
371 * <key>State:/Network/Global/OnDemand</key>
373 * <key>Triggers</key>
376 * <key>ServiceID</key>
377 * <string>A740678C-1983-492B-BF64-B825AAE7101E</string>
379 * <integer>8</integer>
380 * <key>RemoteAddress</key>
381 * <string>vpn.mycompany.com</string>
382 * <key>OnDemandMatchDomainsAlways</key>
384 * <string>internal.mycompany.com</string>
386 * <key>OnDemandMatchDomainsOnRetry</key>
388 * <string>mycompany.com</string>
390 * <key>kSCNetworkConnectionOnDemandMatchDomainsNever</key>
392 * <string>external.mycompany.com</string>
394 * <key>OnDemandMatchAppEnabled</key>
395 * <integer>0</integer>
402 #define kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY "com.apple.system.SCNetworkConnectionOnDemand"
404 // SCNetworkConnection status
405 // (included in the dictionary returned by SCNetworkConnectionCopyExtendedStatus)
406 #define kSCNetworkConnectionStatus CFSTR("Status") /* CFNumber */
408 // a CFArray[CFDictionary] of VPN on Demand "trigger" configurations
409 #define kSCNetworkConnectionOnDemandTriggers CFSTR("Triggers") /* CFArray[CFDictionary] */
412 #define kSCNetworkConnectionOnDemandServiceID CFSTR("ServiceID") /* CFString */
414 // VPN service status (idle, connecting, connected, disconnecting)
415 #define kSCNetworkConnectionOnDemandStatus CFSTR("Status") /* CFNumber */
417 // VPN server address
418 #define kSCNetworkConnectionOnDemandRemoteAddress CFSTR("RemoteAddress") /* CFString */
420 // Reachability flags for the VPN server
421 #define kSCNetworkConnectionOnDemandReachFlags CFSTR("ReachFlags") /* CFNumber */
423 // Reachability interface index for the VPN server
424 #define kSCNetworkConnectionOnDemandReachInterfaceIndex CFSTR("ReachInterfaceIndex") /* CFNumber */
426 // Network detection has detected DNS Redirecting (like OpenDNS)
427 #define kSCNetworkConnectionOnDemandDNSRedirectDetected CFSTR("DNSRedirectDetected") /* CFBoolean */
429 // a dictionary of address information for known lying results
430 #define kSCNetworkConnectionOnDemandDNSRedirectedAddresses CFSTR("DNSRedirectedAddresses") /* CFDictionary[CFDictionary] */
432 // A dictionary of routes tunneled over this service in the past
433 #define kSCNetworkConnectionOnDemandTunneledNetworks CFSTR("TunneledNetworks") /* CFDictionary[CFDictionary] */
435 // An array of plugin PIDs
436 #define kSCNetworkConnectionOnDemandPluginPIDs CFSTR("PluginPIDs") /* CFArray[CFNumber] */
438 // A dictionary of results, keyed by probe string
439 #define kSCNetworkConnectionOnDemandProbeResults CFSTR("ProbeResults") /* CFDictionary[CFBoolean] */
441 /* The following generic NetworkInfo keys are currently used in the dynamic store as follows:
443 kSCNetworkConnectionOnDemandTunneledNetworks (CFDictionary)
444 - kSCNetworkConnectionNetworkInfoIPv4 (CFDictionary)
445 - kSCNetworkConnectionNetworkInfoIncludedRoutes (CFDictionary)
446 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
447 - kSCNetworkConnectionNetworkInfoMasks (CFData)
448 - kSCNetworkConnectionNetworkInfoExcludedRoutes (CFDictionary)
449 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
450 - kSCNetworkConnectionNetworkInfoMasks (CFData)
451 - kSCNetworkConnectionNetworkInfoIPv6 (CFDictionary)
454 kSCNetworkConnectionOnDemandDNSRedirectedAddresses (CFDictionary)
455 - kSCNetworkConnectionNetworkInfoIPv4 (CFDictionary)
456 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
457 - kSCNetworkConnectionNetworkInfoIPv6 (CFDictionary)
458 - kSCNetworkConnectionNetworkInfoAddresses (CFData)
460 #define kSCNetworkConnectionNetworkInfoIPv4 CFSTR("IPv4") /* CFDictionary[CFType] */
461 #define kSCNetworkConnectionNetworkInfoIPv6 CFSTR("IPv6") /* CFDictionary[CFType] */
462 #define kSCNetworkConnectionNetworkInfoIncludedRoutes CFSTR("IncludedRoutes") /* CFDictionary[CFData] */
463 #define kSCNetworkConnectionNetworkInfoExcludedRoutes CFSTR("ExcludedRoutes") /* CFDictionary[CFData] */
464 #define kSCNetworkConnectionNetworkInfoAddresses CFSTR("Addresses") /* CFData */
465 #define kSCNetworkConnectionNetworkInfoMasks CFSTR("Masks") /* CFData */
467 // a CFArray[CFString] representing those domain (or host) names that, if
468 // matched to a target hostname, should result in our first establishing
469 // the VPN connection before any DNS queries are issued.
470 #define kSCNetworkConnectionOnDemandMatchDomainsAlways CFSTR("OnDemandMatchDomainsAlways") /* CFArray[CFString] */
472 // a CFArray[CFString] representing those domain (or host) names that, if
473 // matched to a target hostname, should result in a DNS query regardless of
474 // whether the VPN connection has been established. If the DNS query returns
475 // an [EAI_NONAME] error then we should establish the VPN connection and
476 // re-issue / retry the query.
477 #define kSCNetworkConnectionOnDemandMatchDomainsOnRetry CFSTR("OnDemandMatchDomainsOnRetry") /* CFArray[CFString] */
479 // a CFArray[CFString] representing those domain (or host) names that should
480 // be excluded from those that would be used to establish tje VPN connection.
481 #define kSCNetworkConnectionOnDemandMatchDomainsNever CFSTR("OnDemandMatchDomainsNever") /* CFArray[CFString] */
483 // A CFNumber (0 or 1) indicating whether or not the App Layer rules should be
484 // used to decide whether or not to establish the tunnel connection.
485 #define kSCNetworkConnectionOnDemandMatchAppEnabled CFSTR("OnDemandMatchAppEnabled") /* CFNumber */
488 __SCNetworkConnectionCopyOnDemandInfoWithName (SCDynamicStoreRef
*storeP
,
489 CFStringRef nodeName
,
490 Boolean onDemandRetry
,
491 CFStringRef
*connectionServiceID
,
492 SCNetworkConnectionStatus
*connectionStatus
,
493 CFStringRef
*vpnRemoteAddress
) API_AVAILABLE(macos(10.6), ios(2.0));
495 #if !TARGET_OS_SIMULATOR
496 SCNetworkConnectionStatus
497 SCNetworkConnectionGetStatusFromNEStatus (ne_session_status_t status
) API_AVAILABLE(macos(10.10), ios(8.0));
498 #endif /* !TARGET_OS_SIMULATOR */
501 #pragma mark SCUserPreferences SPIs
505 SCUserPreferencesRemove (SCUserPreferencesRef userPreferences
) API_AVAILABLE(macos(10.5), ios(2.0));
508 SCUserPreferencesSetCurrent (SCUserPreferencesRef userPreferences
) API_AVAILABLE(macos(10.5), ios(2.0));
511 SCUserPreferencesCopyName (SCUserPreferencesRef userPreferences
) API_AVAILABLE(macos(10.5), ios(2.0));
514 SCUserPreferencesGetTypeID (void) API_AVAILABLE(macos(10.5), ios(2.0));
517 SCUserPreferencesGetUniqueID (SCUserPreferencesRef userPreferences
) API_AVAILABLE(macos(10.5), ios(2.0));
520 SCUserPreferencesIsForced (SCUserPreferencesRef userPreferences
) API_AVAILABLE(macos(10.5), ios(2.0));
523 SCUserPreferencesSetName (SCUserPreferencesRef userPreferences
,
524 CFStringRef newName
) API_AVAILABLE(macos(10.5), ios(2.0));
527 SCNetworkConnectionStartWithUserPreferences (SCNetworkConnectionRef connection
,
528 SCUserPreferencesRef userPreferences
,
529 Boolean linger
) API_AVAILABLE(macos(10.5), ios(2.0));
532 SCUserPreferencesCopyInterfaceConfiguration (SCUserPreferencesRef userPreferences
,
533 SCNetworkInterfaceRef interface
) API_AVAILABLE(macos(10.5), ios(2.0));
536 SCUserPreferencesSetInterfaceConfiguration (SCUserPreferencesRef userPreferences
,
537 SCNetworkInterfaceRef interface
,
538 CFDictionaryRef newOptions
) API_AVAILABLE(macos(10.5), ios(2.0));
541 SCUserPreferencesCopyExtendedInterfaceConfiguration
542 (SCUserPreferencesRef userPreferences
,
543 SCNetworkInterfaceRef interface
,
544 CFStringRef extendedType
) API_AVAILABLE(macos(10.5), ios(2.0));
547 SCUserPreferencesSetExtendedInterfaceConfiguration
548 (SCUserPreferencesRef userPreferences
,
549 SCNetworkInterfaceRef interface
,
550 CFStringRef extendedType
,
551 CFDictionaryRef newOptions
) API_AVAILABLE(macos(10.5), ios(2.0));
555 #pragma mark SCUserPreferences + SCNetworkInterface Password SPIs
559 SCUserPreferencesCheckInterfacePassword (SCUserPreferencesRef userPreferences
,
560 SCNetworkInterfaceRef interface
,
561 SCNetworkInterfacePasswordType passwordType
) API_AVAILABLE(macos(10.5), ios(2.0));
564 SCUserPreferencesCopyInterfacePassword (SCUserPreferencesRef userPreferences
,
565 SCNetworkInterfaceRef interface
,
566 SCNetworkInterfacePasswordType passwordType
) API_AVAILABLE(macos(10.5), ios(2.0));
569 SCUserPreferencesRemoveInterfacePassword (SCUserPreferencesRef userPreferences
,
570 SCNetworkInterfaceRef interface
,
571 SCNetworkInterfacePasswordType passwordType
) API_AVAILABLE(macos(10.5), ios(2.0));
574 SCUserPreferencesSetInterfacePassword (SCUserPreferencesRef userPreferences
,
575 SCNetworkInterfaceRef interface
,
576 SCNetworkInterfacePasswordType passwordType
,
578 CFDictionaryRef options
) API_AVAILABLE(macos(10.5), ios(2.0));
582 #endif /* _SCNETWORKCONNECTIONPRIVATE_H */