2 * Copyright (c) 2004-2008 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 _SCNETWORKCONFIGURATION_H
25 #ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
26 #include <SystemConfiguration/_SCNetworkConfiguration.h>
27 #else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
28 #define _SCNETWORKCONFIGURATION_H
30 #include <Availability.h>
31 #include <TargetConditionals.h>
32 #include <sys/cdefs.h>
33 #include <CoreFoundation/CoreFoundation.h>
34 #include <SystemConfiguration/SystemConfiguration.h>
37 @header SCNetworkConfiguration
38 @discussion The SCNetworkConfiguration API provides access to the
39 stored network configuration. The functions include
40 providing access to the network capable devices on the
41 system, the network sets, network services, and network
44 Note: When using the SCNetworkConfiguraiton APIs you must
45 keep in mind that in order for any of your changes to be
46 committed to permanent storage a call must be made to the
47 SCPreferencesCommitChanges function.
52 @group Interface configuration
56 #pragma mark SCNetworkInterface configuration (typedefs, consts)
59 @typedef SCNetworkInterfaceRef
60 @discussion This is the type of a reference to an object that represents
63 typedef const struct __SCNetworkInterface
* SCNetworkInterfaceRef
;
66 @const kSCNetworkInterfaceType6to4
68 extern const CFStringRef kSCNetworkInterfaceType6to4
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
71 @const kSCNetworkInterfaceTypeBluetooth
73 extern const CFStringRef kSCNetworkInterfaceTypeBluetooth
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
76 @const kSCNetworkInterfaceTypeBond
78 extern const CFStringRef kSCNetworkInterfaceTypeBond
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_NA
);
81 @const kSCNetworkInterfaceTypeEthernet
83 extern const CFStringRef kSCNetworkInterfaceTypeEthernet
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
86 @const kSCNetworkInterfaceTypeFireWire
88 extern const CFStringRef kSCNetworkInterfaceTypeFireWire
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
91 @const kSCNetworkInterfaceTypeIEEE80211
93 extern const CFStringRef kSCNetworkInterfaceTypeIEEE80211
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/); // IEEE 802.11, AirPort
96 @const kSCNetworkInterfaceTypeIPSec
98 extern const CFStringRef kSCNetworkInterfaceTypeIPSec
__OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
101 @const kSCNetworkInterfaceTypeIrDA
103 extern const CFStringRef kSCNetworkInterfaceTypeIrDA
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
106 @const kSCNetworkInterfaceTypeL2TP
108 extern const CFStringRef kSCNetworkInterfaceTypeL2TP
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
111 @const kSCNetworkInterfaceTypeModem
113 extern const CFStringRef kSCNetworkInterfaceTypeModem
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
116 @const kSCNetworkInterfaceTypePPP
118 extern const CFStringRef kSCNetworkInterfaceTypePPP
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
121 @const kSCNetworkInterfaceTypePPTP
123 extern const CFStringRef kSCNetworkInterfaceTypePPTP
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
126 @const kSCNetworkInterfaceTypeSerial
128 extern const CFStringRef kSCNetworkInterfaceTypeSerial
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
131 @const kSCNetworkInterfaceTypeVLAN
133 extern const CFStringRef kSCNetworkInterfaceTypeVLAN
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_NA
);
136 @const kSCNetworkInterfaceTypeWWAN
138 extern const CFStringRef kSCNetworkInterfaceTypeWWAN
__OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
140 /* special network interfaces (and types) */
143 @const kSCNetworkInterfaceTypeIPv4
145 extern const CFStringRef kSCNetworkInterfaceTypeIPv4
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
148 @const kSCNetworkInterfaceIPv4
149 @discussion A network interface that can used for layering other
150 interfaces (e.g. 6to4, IPSec, PPTP, L2TP) over an existing
153 extern const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
156 @group Interface configuration (Bond)
162 @typedef SCBondInterfaceRef
163 @discussion This is the type of a reference to an object that represents
164 an Ethernet Bond interface.
166 typedef SCNetworkInterfaceRef SCBondInterfaceRef
;
169 @typedef SCBondStatusRef
170 @discussion This is the type of a reference to an object that represents
171 the status of an Ethernet Bond interface.
173 typedef const struct __SCBondStatus
* SCBondStatusRef
;
175 #if !TARGET_OS_IPHONE
177 @enum Ethernet Bond Aggregation Status (kSCBondStatusDeviceAggregationStatus) codes
178 @discussion Returned status codes.
179 @constant kSCBondStatusOK Enabled, active, running, ...
180 @constant kSCBondStatusLinkInvalid The link state was not valid (i.e. down, half-duplex, wrong speed)
181 @constant kSCBondStatusNoPartner The port on the switch that the device is connected doesn't seem to have 802.3ad Link Aggregation enabled
182 @constant kSCBondStatusNotInActiveGroup We're talking to a partner, but the link aggregation group is different from the one that's active
183 @constant kSCBondStatusUnknown Non-specific failure
186 kSCBondStatusOK
= 0, /* enabled, active, running, ... */
187 kSCBondStatusLinkInvalid
= 1, /* The link state was not valid (i.e. down, half-duplex, wrong speed) */
188 kSCBondStatusNoPartner
= 2, /* The port on the switch that the device is connected doesn't seem to have 802.3ad Link Aggregation enabled */
189 kSCBondStatusNotInActiveGroup
= 3, /* We're talking to a partner, but the link aggregation group is different from the one that's active */
190 kSCBondStatusUnknown
= 999 /* Non-specific failure */
192 #endif // !TARGET_OS_IPHONE
195 @const kSCBondStatusDeviceAggregationStatus
197 extern const CFStringRef kSCBondStatusDeviceAggregationStatus
/* CFNumber */ __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_NA
);
200 @const kSCBondStatusDeviceCollecting
202 extern const CFStringRef kSCBondStatusDeviceCollecting
/* CFNumber (0 or 1) */ __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_NA
);
205 @const kSCBondStatusDeviceDistributing
207 extern const CFStringRef kSCBondStatusDeviceDistributing
/* CFNumber (0 or 1) */ __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_NA
);
210 @group Interface configuration (VLAN)
216 @typedef SCVLANInterfaceRef
217 @discussion This is the type of a reference to an object that represents
218 a Virtual LAN (VLAN) interface.
220 typedef SCNetworkInterfaceRef SCVLANInterfaceRef
;
224 @group Protocol configuration
228 #pragma mark SCNetworkProtocol configuration (typedefs, consts)
231 @typedef SCNetworkProtocolRef
232 @discussion This is the type of a reference to an object that represents
235 typedef const struct __SCNetworkProtocol
* SCNetworkProtocolRef
;
237 /* network "protocol" types */
240 @const kSCNetworkProtocolTypeAppleTalk
242 extern const CFStringRef kSCNetworkProtocolTypeAppleTalk
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4
,__MAC_10_6
,__IPHONE_NA
,__IPHONE_NA
);
245 @const kSCNetworkProtocolTypeDNS
247 extern const CFStringRef kSCNetworkProtocolTypeDNS
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
250 @const kSCNetworkProtocolTypeIPv4
252 extern const CFStringRef kSCNetworkProtocolTypeIPv4
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
255 @const kSCNetworkProtocolTypeIPv6
257 extern const CFStringRef kSCNetworkProtocolTypeIPv6
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
260 @const kSCNetworkProtocolTypeProxies
262 extern const CFStringRef kSCNetworkProtocolTypeProxies
__OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
265 @const kSCNetworkProtocolTypeSMB
267 extern const CFStringRef kSCNetworkProtocolTypeSMB
__OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
270 @group Service configuration
274 #pragma mark SCNetworkService configuration (typedefs, consts)
277 @typedef SCNetworkServiceRef
278 @discussion This is the type of a reference to an object that represents
281 typedef const struct __SCNetworkService
* SCNetworkServiceRef
;
285 @group Set configuration
289 #pragma mark SCNetworkSet configuration (typedefs, consts)
292 @typedef SCNetworkSetRef
293 @discussion This is the type of a reference to an object that represents
296 typedef const struct __SCNetworkSet
* SCNetworkSetRef
;
302 /* --------------------------------------------------------------------------------
304 * -------------------------------------------------------------------------------- */
307 @group Interface configuration
311 #pragma mark SCNetworkInterface configuration (APIs)
314 @function SCNetworkInterfaceGetTypeID
315 @discussion Returns the type identifier of all SCNetworkInterface instances.
318 SCNetworkInterfaceGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
321 @function SCNetworkInterfaceCopyAll
322 @discussion Returns all network capable interfaces on the system.
323 @result The list of interfaces on the system.
324 You must release the returned value.
326 CFArrayRef
/* of SCNetworkInterfaceRef's */
327 SCNetworkInterfaceCopyAll (void) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
330 @function SCNetworkInterfaceGetSupportedInterfaceTypes
331 @discussion Identify all of the network interface types (e.g. PPP) that
332 can be layered on top of this interface.
333 @param interface The network interface.
334 @result The list of SCNetworkInterface types supported by the interface;
335 NULL if no interface types are supported.
337 CFArrayRef
/* of kSCNetworkInterfaceTypeXXX CFStringRef's */
338 SCNetworkInterfaceGetSupportedInterfaceTypes (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
341 @function SCNetworkInterfaceGetSupportedProtocolTypes
342 @discussion Identify all of the network protocol types (e.g. IPv4, IPv6) that
343 can be layered on top of this interface.
344 @param interface The network interface.
345 @result The list of SCNetworkProtocol types supported by the interface;
346 NULL if no protocol types are supported.
348 CFArrayRef
/* of kSCNetworkProtocolTypeXXX CFStringRef's */
349 SCNetworkInterfaceGetSupportedProtocolTypes (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
352 @function SCNetworkInterfaceCreateWithInterface
353 @discussion Create a new network interface layered on top of another. For
354 example, this function would be used to create a "PPP" interface
356 @param interface The network interface.
357 @param interfaceType The type of SCNetworkInterface to be layered on
358 top of the provided interface.
359 @result A reference to the new SCNetworkInterface.
360 You must release the returned value.
362 SCNetworkInterfaceRef
363 SCNetworkInterfaceCreateWithInterface (SCNetworkInterfaceRef interface
,
364 CFStringRef interfaceType
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
367 @function SCNetworkInterfaceGetBSDName
368 @discussion Returns the BSD interface (en0) or device name (modem)
370 @param interface The network interface.
371 @result The BSD name associated with the interface (e.g. "en0");
372 NULL if no BSD name is available.
375 SCNetworkInterfaceGetBSDName (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
378 @function SCNetworkInterfaceGetConfiguration
379 @discussion Returns the configuration settings associated with a interface.
380 @param interface The network interface.
381 @result The configuration settings associated with the interface;
382 NULL if no configuration settings are associated with the interface
383 or an error was encountered.
386 SCNetworkInterfaceGetConfiguration (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
389 @function SCNetworkInterfaceGetExtendedConfiguration
390 @discussion Returns the configuration settings associated with a interface.
391 @param interface The network interface.
392 @param extendedType A string representing the type of extended information (e.g. EAPOL).
393 @result The configuration settings associated with the interface;
394 NULL if no configuration settings are associated with the interface
395 or an error was encountered.
398 SCNetworkInterfaceGetExtendedConfiguration (SCNetworkInterfaceRef interface
,
399 CFStringRef extendedType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
402 @function SCNetworkInterfaceGetHardwareAddressString
403 @discussion Returns a displayable link layer address for the interface.
404 @param interface The network interface.
405 @result A string representing the hardware (MAC) address for the interface.
408 SCNetworkInterfaceGetHardwareAddressString (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
411 @function SCNetworkInterfaceGetInterface
412 @discussion For layered network interfaces, return the underlying interface.
413 @param interface The network interface.
414 @result The underlying network interface;
415 NULL if this is a leaf interface.
417 SCNetworkInterfaceRef
418 SCNetworkInterfaceGetInterface (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
421 @function SCNetworkInterfaceGetInterfaceType
422 @discussion Returns the associated network interface type.
423 @param interface The network interface.
424 @result The interface type.
427 SCNetworkInterfaceGetInterfaceType (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
430 @function SCNetworkInterfaceGetLocalizedDisplayName
431 @discussion Returns the localized name (e.g. "Ethernet", "FireWire") for
433 @param interface The network interface.
434 @result A localized, display name for the interface;
435 NULL if no name is available.
438 SCNetworkInterfaceGetLocalizedDisplayName (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
441 @function SCNetworkInterfaceSetConfiguration
442 @discussion Stores the configuration settings for the interface.
443 @param interface The network interface.
444 @param config The configuration settings to associate with this interface.
445 @result TRUE if the configuration was stored; FALSE if an error was encountered.
448 SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface
,
449 CFDictionaryRef config
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
452 @function SCNetworkInterfaceSetExtendedConfiguration
453 @discussion Stores the configuration settings for the interface.
454 @param interface The network interface.
455 @param config The configuration settings to associate with this interface.
456 @result TRUE if the configuration was stored; FALSE if an error was encountered.
459 SCNetworkInterfaceSetExtendedConfiguration (SCNetworkInterfaceRef interface
,
460 CFStringRef extendedType
,
461 CFDictionaryRef config
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
466 @function SCNetworkInterfaceCopyMediaOptions
467 @discussion For the specified network interface, returns information
468 about the currently requested media options, the active media
469 options, and the media options which are available.
470 @param interface The desired network interface.
471 @param current A pointer to memory that will be filled with a CFDictionaryRef
472 representing the currently requested media options (subtype, options).
473 If NULL, the current options will not be returned.
474 @param active A pointer to memory that will be filled with a CFDictionaryRef
475 representing the active media options (subtype, options).
476 If NULL, the active options will not be returned.
477 @param available A pointer to memory that will be filled with a CFArrayRef
478 representing the possible media options (subtype, options).
479 If NULL, the available options will not be returned.
480 @param filter A boolean indicating whether the available options should be
481 filtered to exclude those options which would not normally be
482 requested by a user/admin (e.g. hw-loopback).
483 @result TRUE if requested information has been returned.
486 SCNetworkInterfaceCopyMediaOptions (SCNetworkInterfaceRef interface
,
487 CFDictionaryRef
*current
,
488 CFDictionaryRef
*active
,
489 CFArrayRef
*available
,
490 Boolean filter
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
493 @function SCNetworkInterfaceCopyMediaSubTypes
494 @discussion For the provided interface configuration options, return a list
495 of available media subtypes.
496 @param available The available options as returned by the
497 SCNetworkInterfaceCopyMediaOptions function.
498 @result An array of available media subtypes CFString's (e.g. 10BaseT/UTP,
499 100baseTX, etc). NULL if no subtypes are available.
502 SCNetworkInterfaceCopyMediaSubTypes (CFArrayRef available
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
505 @function SCNetworkInterfaceCopyMediaSubTypeOptions
506 @discussion For the provided interface configuration options and specific
507 subtype, return a list of available media options.
508 @param available The available options as returned by the
509 NetworkInterfaceCopyMediaOptions function.
510 @param subType The subtype
511 @result An array of available media options. Each of the available options
512 is returned as an array of CFString's (e.g. <half-duplex>,
513 <full-duplex,flow-control>). NULL if no options are available.
516 SCNetworkInterfaceCopyMediaSubTypeOptions (CFArrayRef available
,
517 CFStringRef subType
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
520 @function SCNetworkInterfaceCopyMTU
521 @discussion For the specified network interface, returns information
522 about the currently MTU setting and the range of allowable
524 @param interface The desired network interface.
525 @param mtu_cur A pointer to memory that will be filled with the current
526 MTU setting for the interface.
527 @param mtu_min A pointer to memory that will be filled with the minimum
528 MTU setting for the interface. If negative, the minimum setting
529 could not be determined.
530 @param mtu_max A pointer to memory that will be filled with the maximum
531 MTU setting for the interface. If negative, the maximum setting
532 could not be determined.
533 @result TRUE if requested information has been returned.
536 SCNetworkInterfaceCopyMTU (SCNetworkInterfaceRef interface
,
539 int *mtu_max
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
542 @function SCNetworkInterfaceSetMediaOptions
543 @discussion For the specified network interface, sets the requested
544 media subtype and options.
545 @param interface The desired network interface.
546 @param subtype The desired media subtype (e.g. "autoselect", "100baseTX", ...).
547 @param options The desired media options (e.g. "half-duplex", "full-duplex", ...).
548 If NULL, the active options will not be returned.
549 @result TRUE if the configuration was updated; FALSE if an error was encountered.
552 SCNetworkInterfaceSetMediaOptions (SCNetworkInterfaceRef interface
,
554 CFArrayRef options
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
557 @function SCNetworkInterfaceSetMTU
558 @discussion For the specified network interface, sets the
559 requested MTU setting.
560 @param interface The desired network interface.
561 @param mtu The desired MTU setting for the interface.
562 @result TRUE if the configuration was updated; FALSE if an error was encountered.
565 SCNetworkInterfaceSetMTU (SCNetworkInterfaceRef interface
,
566 int mtu
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
569 @function SCNetworkInterfaceForceConfigurationRefresh
570 @discussion Sends a notification to interested network configuration
571 agents to immediately retry their configuration. For example,
572 calling this function will cause the DHCP client to contact
573 the DHCP server immediately rather than waiting until its
574 timeout has expired. The utility of this function is to
575 allow the caller to give a hint to the system that the
576 network infrastructure or configuration has changed.
578 Note: This function requires root (euid==0) privilege or,
579 alternatively, you may pass an SCNetworkInterface which
580 is derived from a sequence of calls to :
582 SCPreferencesCreateWithAuthorization
584 SCNetworkServiceGetInterface
585 @param interface The desired network interface.
586 @result Returns TRUE if the notification was sent; FALSE otherwise.
589 SCNetworkInterfaceForceConfigurationRefresh (SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
592 @group Interface configuration (Bond)
596 #pragma mark SCBondInterface configuration (APIs)
599 @function SCBondInterfaceCopyAll
600 @discussion Returns all Ethernet Bond interfaces on the system.
601 @param prefs The "preferences" session.
602 @result The list of Ethernet Bond interfaces on the system.
603 You must release the returned value.
605 CFArrayRef
/* of SCBondInterfaceRef's */
606 SCBondInterfaceCopyAll (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
609 @function SCBondInterfaceCopyAvailableMemberInterfaces
610 @discussion Returns all network capable devices on the system
611 that can be added to an Ethernet Bond interface.
612 @param prefs The "preferences" session.
613 @result The list of interfaces.
614 You must release the returned value.
616 CFArrayRef
/* of SCNetworkInterfaceRef's */
617 SCBondInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
620 @function SCBondInterfaceCreate
621 @discussion Create a new SCBondInterface interface.
622 @param prefs The "preferences" session.
623 @result A reference to the new SCBondInterface.
624 You must release the returned value.
627 SCBondInterfaceCreate (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
630 @function SCBondInterfaceRemove
631 @discussion Removes the SCBondInterface from the configuration.
632 @param bond The SCBondInterface interface.
633 @result TRUE if the interface was removed; FALSE if an error was encountered.
636 SCBondInterfaceRemove (SCBondInterfaceRef bond
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
639 @function SCBondInterfaceGetMemberInterfaces
640 @discussion Returns the member interfaces for the specified Ethernet Bond interface.
641 @param bond The SCBondInterface interface.
642 @result The list of interfaces.
644 CFArrayRef
/* of SCNetworkInterfaceRef's */
645 SCBondInterfaceGetMemberInterfaces (SCBondInterfaceRef bond
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
648 @function SCBondInterfaceGetOptions
649 @discussion Returns the configuration settings associated with a Ethernet Bond interface.
650 @param bond The SCBondInterface interface.
651 @result The configuration settings associated with the Ethernet Bond interface;
652 NULL if no changes to the default configuration have been saved.
655 SCBondInterfaceGetOptions (SCBondInterfaceRef bond
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
658 @function SCBondInterfaceSetMemberInterfaces
659 @discussion Sets the member interfaces for the specified Ethernet Bond interface.
660 @param bond The SCBondInterface interface.
661 @param members The desired member interfaces.
662 @result TRUE if the configuration was stored; FALSE if an error was encountered.
665 SCBondInterfaceSetMemberInterfaces (SCBondInterfaceRef bond
,
666 CFArrayRef members
) /* of SCNetworkInterfaceRef's */
667 __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
670 @function SCBondInterfaceSetLocalizedDisplayName
671 @discussion Sets the localized display name for the specified Ethernet Bond interface.
672 @param bond The SCBondInterface interface.
673 @param newName The new display name.
674 @result TRUE if the configuration was stored; FALSE if an error was encountered.
677 SCBondInterfaceSetLocalizedDisplayName (SCBondInterfaceRef bond
,
678 CFStringRef newName
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
681 @function SCBondInterfaceSetOptions
682 @discussion Sets the configuration settings for the specified Ethernet Bond interface.
683 @param bond The SCBondInterface interface.
684 @param newOptions The new configuration settings.
685 @result TRUE if the configuration was stored; FALSE if an error was encountered.
688 SCBondInterfaceSetOptions (SCBondInterfaceRef bond
,
689 CFDictionaryRef newOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
694 @function SCBondInterfaceCopyStatus
695 @discussion Returns the status of the specified Ethernet Bond interface.
696 @param bond The SCBondInterface interface.
697 @result The status associated with the interface.
698 You must release the returned value.
701 SCBondInterfaceCopyStatus (SCBondInterfaceRef bond
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
704 @function SCBondStatusGetTypeID
705 @discussion Returns the type identifier of all SCBondStatus instances.
708 SCBondStatusGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
711 @function SCBondStatusGetMemberInterfaces
712 @discussion Returns the member interfaces that are represented with the
713 Ethernet Bond interface.
714 @param bondStatus The Ethernet Bond status.
715 @result The list of interfaces.
717 CFArrayRef
/* of SCNetworkInterfaceRef's */
718 SCBondStatusGetMemberInterfaces (SCBondStatusRef bondStatus
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
721 @function SCBondStatusGetInterfaceStatus
722 @discussion Returns the status of a specific member interface of an
723 Ethernet Bond or the status of the bond as a whole.
724 @param bondStatus The Ethernet Bond status.
725 @param interface The specific member interface; NULL if you want the
726 status of the Ethernet Bond.
727 @result The interface status.
729 Note: at present, no information about the status of the Ethernet
730 Bond is returned. As long as one member interface is active
731 then the bond should be operational.
734 SCBondStatusGetInterfaceStatus (SCBondStatusRef bondStatus
,
735 SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
738 @group Interface configuration (VLAN)
742 #pragma mark SCVLANInterface configuration (APIs)
745 @function SCVLANInterfaceCopyAll
746 @discussion Returns all VLAN interfaces on the system.
747 @result The list of VLAN interfaces on the system.
748 You must release the returned value.
750 CFArrayRef
/* of SCVLANInterfaceRef's */
751 SCVLANInterfaceCopyAll (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
754 @function SCVLANInterfaceCopyAvailablePhysicalInterfaces
755 @discussion Returns the network capable devices on the system
756 that can be associated with a VLAN interface.
757 @result The list of interfaces.
758 You must release the returned value.
760 CFArrayRef
/* of SCNetworkInterfaceRef's */
761 SCVLANInterfaceCopyAvailablePhysicalInterfaces (void) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
764 @function SCVLANInterfaceCreate
765 @discussion Create a new SCVLANInterface interface.
766 @param prefs The "preferences" session.
767 @param physical The physical interface to associate with the VLAN.
768 @param tag The tag to associate with the VLAN.
769 @result A reference to the new SCVLANInterface.
770 You must release the returned value.
772 Note: the tag must be in the range (1 <= tag <= 4094)
775 SCVLANInterfaceCreate (SCPreferencesRef prefs
,
776 SCNetworkInterfaceRef physical
,
777 CFNumberRef tag
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
780 @function SCVLANInterfaceRemove
781 @discussion Removes the SCVLANInterface from the configuration.
782 @param vlan The SCVLANInterface interface.
783 @result TRUE if the interface was removed; FALSE if an error was encountered.
786 SCVLANInterfaceRemove (SCVLANInterfaceRef vlan
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
789 @function SCVLANInterfaceGetPhysicalInterface
790 @discussion Returns the physical interface for the specified VLAN interface.
791 @param vlan The SCVLANInterface interface.
792 @result The list of interfaces.
794 SCNetworkInterfaceRef
795 SCVLANInterfaceGetPhysicalInterface (SCVLANInterfaceRef vlan
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
798 @function SCVLANInterfaceGetTag
799 @discussion Returns the tag for the specified VLAN interface.
800 @param vlan The SCVLANInterface interface.
804 SCVLANInterfaceGetTag (SCVLANInterfaceRef vlan
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
807 @function SCVLANInterfaceGetOptions
808 @discussion Returns the configuration settings associated with the VLAN interface.
809 @param vlan The SCVLANInterface interface.
810 @result The configuration settings associated with the VLAN interface;
811 NULL if no changes to the default configuration have been saved.
814 SCVLANInterfaceGetOptions (SCVLANInterfaceRef vlan
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
817 @function SCVLANInterfaceSetPhysicalInterfaceAndTag
818 @discussion Updates the specified VLAN interface.
819 @param vlan The SCVLANInterface interface.
820 @param physical The physical interface to associate with the VLAN.
821 @param tag The tag to associate with the VLAN.
822 @result TRUE if the configuration was stored; FALSE if an error was encountered.
824 Note: the tag must be in the range (1 <= tag <= 4094)
827 SCVLANInterfaceSetPhysicalInterfaceAndTag (SCVLANInterfaceRef vlan
,
828 SCNetworkInterfaceRef physical
,
829 CFNumberRef tag
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
832 @function SCVLANInterfaceSetLocalizedDisplayName
833 @discussion Sets the localized display name for the specified VLAN interface.
834 @param vlan The SCVLANInterface interface.
835 @param newName The new display name.
836 @result TRUE if the configuration was stored; FALSE if an error was encountered.
839 SCVLANInterfaceSetLocalizedDisplayName (SCVLANInterfaceRef vlan
,
840 CFStringRef newName
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
843 @function SCVLANInterfaceSetOptions
844 @discussion Sets the configuration settings for the specified VLAN interface.
845 @param vlan The SCVLANInterface interface.
846 @param newOptions The new configuration settings.
847 @result TRUE if the configuration was stored; FALSE if an error was encountered.
850 SCVLANInterfaceSetOptions (SCVLANInterfaceRef vlan
,
851 CFDictionaryRef newOptions
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_NA
);
854 /* --------------------------------------------------------------------------------
856 * -------------------------------------------------------------------------------- */
859 @group Protocol configuration
863 #pragma mark SCNetworkProtocol configuration (APIs)
866 @function SCNetworkProtocolGetTypeID
867 @discussion Returns the type identifier of all SCNetworkProtocol instances.
870 SCNetworkProtocolGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
873 @function SCNetworkProtocolGetConfiguration
874 @discussion Returns the configuration settings associated with the protocol.
875 @param protocol The network protocol.
876 @result The configuration settings associated with the protocol;
877 NULL if no configuration settings are associated with the protocol
878 or an error was encountered.
881 SCNetworkProtocolGetConfiguration (SCNetworkProtocolRef protocol
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
884 @function SCNetworkProtocolGetEnabled
885 @discussion Returns whether this protocol has been enabled.
886 @param protocol The network protocol.
887 @result TRUE if the protocol is enabled.
890 SCNetworkProtocolGetEnabled (SCNetworkProtocolRef protocol
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
893 @function SCNetworkProtocolGetProtocolType
894 @discussion Returns the associated network protocol type.
895 @param protocol The network protocol.
896 @result The protocol type.
899 SCNetworkProtocolGetProtocolType (SCNetworkProtocolRef protocol
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
902 @function SCNetworkProtocolSetConfiguration
903 @discussion Stores the configuration settings for the protocol.
904 @param protocol The network protocol.
905 @param config The configuration settings to associate with this protocol.
906 @result TRUE if the configuration was stored; FALSE if an error was encountered.
909 SCNetworkProtocolSetConfiguration (SCNetworkProtocolRef protocol
,
910 CFDictionaryRef config
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
913 @function SCNetworkProtocolSetEnabled
914 @discussion Enables or disables the protocol.
915 @param protocol The network protocol.
916 @param enabled TRUE if the protocol should be enabled.
917 @result TRUE if the enabled status was saved; FALSE if an error was encountered.
920 SCNetworkProtocolSetEnabled (SCNetworkProtocolRef protocol
,
921 Boolean enabled
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
923 /* --------------------------------------------------------------------------------
925 * -------------------------------------------------------------------------------- */
928 @group Service configuration
932 #pragma mark SCNetworkService configuration (APIs)
935 @function SCNetworkServiceGetTypeID
936 @discussion Returns the type identifier of all SCNetworkService instances.
939 SCNetworkServiceGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
942 @function SCNetworkServiceAddProtocolType
943 @discussion Adds a network protocol of the specified type to the
944 service. The protocal configuration is set to default values
945 that are appropriate for the interface associated with the
947 @param service The network service.
948 @param protocolType The type of SCNetworkProtocol to be added to the service.
949 @result TRUE if the protocol was added to the service; FALSE if the
950 protocol was already present or an error was encountered.
953 SCNetworkServiceAddProtocolType (SCNetworkServiceRef service
,
954 CFStringRef protocolType
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
957 @function SCNetworkServiceCopyAll
958 @discussion Returns all available network services for the specified preferences.
959 @param prefs The "preferences" session.
960 @result The list of SCNetworkService services associated with the preferences.
961 You must release the returned value.
963 CFArrayRef
/* of SCNetworkServiceRef's */
964 SCNetworkServiceCopyAll (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
967 @function SCNetworkServiceCopyProtocols
968 @discussion Returns all network protocols associated with the service.
969 @param service The network service.
970 @result The list of SCNetworkProtocol protocols associated with the service.
971 You must release the returned value.
973 CFArrayRef
/* of SCNetworkProtocolRef's */
974 SCNetworkServiceCopyProtocols (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
977 @function SCNetworkServiceCreate
978 @discussion Create a new network service for the specified interface in the
980 @param prefs The "preferences" session.
981 @result A reference to the new SCNetworkService.
982 You must release the returned value.
985 SCNetworkServiceCreate (SCPreferencesRef prefs
,
986 SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
989 @function SCNetworkServiceCopy
990 @discussion Returns the network service with the specified identifier.
991 @param prefs The "preferences" session.
992 @param serviceID The unique identifier for the service.
993 @result A reference to the SCNetworkService from the associated preferences;
994 NULL if the serviceID does not exist in the preferences or if an
995 error was encountered.
996 You must release the returned value.
999 SCNetworkServiceCopy (SCPreferencesRef prefs
,
1000 CFStringRef serviceID
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1003 @function SCNetworkServiceEstablishDefaultConfiguration
1004 @discussion Establishes the "default" configuration for a network
1005 service. This configuration includes the addition of
1006 network protocols for the service (with "default"
1007 configuration options).
1008 @param service The network service.
1009 @result TRUE if the configuration was updated; FALSE if an error was encountered.
1012 SCNetworkServiceEstablishDefaultConfiguration (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
1015 @function SCNetworkServiceGetEnabled
1016 @discussion Returns whether this service has been enabled.
1017 @param service The network service.
1018 @result TRUE if the service is enabled.
1021 SCNetworkServiceGetEnabled (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1024 @function SCNetworkServiceGetInterface
1025 @discussion Returns the network interface associated with the service.
1026 @param service The network service.
1027 @result A reference to the SCNetworkInterface associated with the service;
1028 NULL if an error was encountered.
1030 SCNetworkInterfaceRef
1031 SCNetworkServiceGetInterface (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1034 @function SCNetworkServiceGetName
1035 @discussion Returns the [user specified] name associated with the service.
1036 @param service The network service.
1037 @result The [user specified] name.
1040 SCNetworkServiceGetName (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1043 @function SCNetworkServiceCopyProtocol
1044 @discussion Returns the network protocol of the specified type for
1046 @param service The network service.
1047 @result A reference to the SCNetworkProtocol associated with the service;
1048 NULL if this protocol has not been added or if an error was encountered.
1049 You must release the returned value.
1051 SCNetworkProtocolRef
1052 SCNetworkServiceCopyProtocol (SCNetworkServiceRef service
,
1053 CFStringRef protocolType
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1056 @function SCNetworkServiceGetServiceID
1057 @discussion Returns the identifier for the service.
1058 @param service The network service.
1059 @result The service identifier.
1062 SCNetworkServiceGetServiceID (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1065 @function SCNetworkServiceRemove
1066 @discussion Removes the network service from the configuration.
1067 @param service The network service.
1068 @result TRUE if the service was removed; FALSE if an error was encountered.
1071 SCNetworkServiceRemove (SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1074 @function SCNetworkServiceRemoveProtocolType
1075 @discussion Removes the network protocol of the specified type from the service.
1076 @param service The network service.
1077 @param protocolType The type of SCNetworkProtocol to be removed from the service.
1078 @result TRUE if the protocol was removed to the service; FALSE if the
1079 protocol was not configured or an error was encountered.
1082 SCNetworkServiceRemoveProtocolType (SCNetworkServiceRef service
,
1083 CFStringRef protocolType
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1086 @function SCNetworkServiceSetEnabled
1087 @discussion Enables or disables the service.
1088 @param service The network service.
1089 @param enabled TRUE if the service should be enabled.
1090 @result TRUE if the enabled status was saved; FALSE if an error was encountered.
1093 SCNetworkServiceSetEnabled (SCNetworkServiceRef service
,
1094 Boolean enabled
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1097 @function SCNetworkServiceSetName
1098 @discussion Stores the [user specified] name for the service.
1099 @param service The network service.
1100 @param name The [user defined] name to associate with the service.
1101 @result TRUE if the name was saved; FALSE if an error was encountered.
1103 Note: although not technically required, the [user specified] names
1104 for all services within any given set should be unique. As such, an
1105 error will be returned if you attemp to name two services with the
1109 SCNetworkServiceSetName (SCNetworkServiceRef service
,
1110 CFStringRef name
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1113 /* --------------------------------------------------------------------------------
1115 * -------------------------------------------------------------------------------- */
1118 @group Set configuration
1122 #pragma mark SCNetworkSet configuration (APIs)
1125 @function SCNetworkSetGetTypeID
1126 @discussion Returns the type identifier of all SCNetworkSet instances.
1129 SCNetworkSetGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1132 @function SCNetworkSetAddService
1133 @discussion Adds the network service to the set.
1134 @param set The network set.
1135 @param service The service to be added.
1136 @result TRUE if the service was added to the set; FALSE if the
1137 service was already present or an error was encountered.
1139 Note: prior to Mac OS X 10.5, the Network Preferences UI
1140 did not support having a single service being a member of
1141 more than one set. An error will be returned if you attempt
1142 to add a service to more than one set on a pre-10.5 system.
1145 SCNetworkSetAddService (SCNetworkSetRef set
,
1146 SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1149 @function SCNetworkSetContainsInterface
1150 @discussion Checks if an interface is represented by at least one
1151 network service in the specified set.
1152 @param set The network set.
1153 @param interface The network interface.
1154 @result TRUE if the interface is represented in the set; FALSE if not.
1157 SCNetworkSetContainsInterface (SCNetworkSetRef set
,
1158 SCNetworkInterfaceRef interface
) __OSX_AVAILABLE_STARTING(__MAC_10_5
,__IPHONE_2_0
/*SPI*/);
1161 @function SCNetworkSetCopyAll
1162 @discussion Returns all available sets for the specified preferences.
1163 @param prefs The "preferences" session.
1164 @result The list of SCNetworkSet sets associated with the preferences.
1165 You must release the returned value.
1167 CFArrayRef
/* of SCNetworkSetRef's */
1168 SCNetworkSetCopyAll (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1171 @function SCNetworkSetCopyCurrent
1172 @discussion Returns the "current" set.
1173 @param prefs The "preferences" session.
1174 @result The current set; NULL if no current set has been defined.
1177 SCNetworkSetCopyCurrent (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1180 @function SCNetworkSetCopyServices
1181 @discussion Returns all network services associated with the set.
1182 @param set The network set.
1183 @result The list of SCNetworkService services associated with the set.
1184 You must release the returned value.
1186 CFArrayRef
/* of SCNetworkServiceRef's */
1187 SCNetworkSetCopyServices (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1190 @function SCNetworkSetCreate
1191 @discussion Create a new set in the configuration.
1192 @param prefs The "preferences" session.
1193 @result A reference to the new SCNetworkSet.
1194 You must release the returned value.
1197 SCNetworkSetCreate (SCPreferencesRef prefs
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1200 @function SCNetworkSetCopy
1201 @discussion Returns the set with the specified identifier.
1202 @param prefs The "preferences" session.
1203 @param setID The unique identifier for the set.
1204 @result A reference to the SCNetworkSet from the associated preferences;
1205 NULL if the setID does not exist in the preferences or if an
1206 error was encountered.
1207 You must release the returned value.
1210 SCNetworkSetCopy (SCPreferencesRef prefs
,
1211 CFStringRef setID
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1214 @function SCNetworkSetGetName
1215 @discussion Returns the [user specified] name associated with the set.
1216 @param set The network set.
1217 @result The [user specified] name.
1220 SCNetworkSetGetName (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1223 @function SCNetworkSetGetSetID
1224 @discussion Returns the identifier for the set.
1225 @param set The network set.
1226 @result The set identifier.
1229 SCNetworkSetGetSetID (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1232 @function SCNetworkSetGetServiceOrder
1233 @discussion Returns the [user specified] ordering of network services
1235 @param set The network set.
1236 @result The ordered list of CFStringRef service identifiers associated
1238 NULL if no service order has been specified or if an error
1241 CFArrayRef
/* of serviceID CFStringRef's */
1242 SCNetworkSetGetServiceOrder (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1245 @function SCNetworkSetRemove
1246 @discussion Removes the set from the configuration.
1247 @param set The network set.
1248 @result TRUE if the set was removed; FALSE if an error was encountered.
1251 SCNetworkSetRemove (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1254 @function SCNetworkSetRemoveService
1255 @discussion Removes the network service from the set.
1256 @param set The network set.
1257 @param service The service to be removed.
1258 @result TRUE if the service was removed from the set; FALSE if the
1259 service was not already present or an error was encountered.
1262 SCNetworkSetRemoveService (SCNetworkSetRef set
,
1263 SCNetworkServiceRef service
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1266 @function SCNetworkSetSetCurrent
1267 @discussion Specifies the set that should be the "current" set.
1268 @param set The network set.
1269 @result TRUE if the current set was updated;
1270 FALSE if an error was encountered.
1273 SCNetworkSetSetCurrent (SCNetworkSetRef set
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1276 @function SCNetworkSetSetName
1277 @discussion Stores the [user specified] name for the set.
1278 @param set The network set.
1279 @param name The [user defined] name to associate with the set.
1280 @result TRUE if the name was saved; FALSE if an error was encountered.
1282 Note: although not technically required, the [user specified] names
1283 for all set should be unique. As such, an error will be returned if
1284 you attemp to name two sets with the same string.
1287 SCNetworkSetSetName (SCNetworkSetRef set
,
1288 CFStringRef name
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/);
1291 @function SCNetworkSetSetServiceOrder
1292 @discussion Stores the [user specified] ordering of network services for the set.
1293 @param set The network set.
1294 @param newOrder The ordered list of CFStringRef service identifiers for the set.
1295 @result TRUE if the new service order was saved; FALSE if an error was encountered.
1298 SCNetworkSetSetServiceOrder (SCNetworkSetRef set
,
1299 CFArrayRef newOrder
) __OSX_AVAILABLE_STARTING(__MAC_10_4
,__IPHONE_2_0
/*SPI*/); /* serviceID CFStringRef's */
1304 #endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
1305 #endif /* _SCNETWORKCONFIGURATION_H */