2 * Copyright (c) 2004 Apple Computer, 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 #define _SCNETWORKCONFIGURATION_H
28 #include <sys/cdefs.h>
29 #include <AvailabilityMacros.h>
30 #include <CoreFoundation/CoreFoundation.h>
31 #include <SystemConfiguration/SystemConfiguration.h>
35 @header SCNetworkConfiguration
36 @discussion The SCNetworkConfiguration API provides access to the
37 stored network configuration. The functions include
38 providing access to the network capable devices on the
39 system, the network sets, network services, and network
42 Note: When using the SCNetworkConfiguraiton APIs you must
43 keep in mind that in order for any of your changes to be
44 committed to permanent storage a call must be made to the
45 SCPreferencesCommitChanges function.
49 @group Interface configuration
53 @typedef SCNetworkInterfaceRef
54 @discussion This is the type of a reference to an object that represents
57 typedef const struct __SCNetworkInterface
* SCNetworkInterfaceRef
;
60 @const kSCNetworkInterfaceType6to4
62 extern const CFStringRef kSCNetworkInterfaceType6to4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
65 @const kSCNetworkInterfaceTypeBluetooth
67 extern const CFStringRef kSCNetworkInterfaceTypeBluetooth AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
70 @const kSCNetworkInterfaceTypeBond
72 extern const CFStringRef kSCNetworkInterfaceTypeBond AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
75 @const kSCNetworkInterfaceTypeEthernet
77 extern const CFStringRef kSCNetworkInterfaceTypeEthernet AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
80 @const kSCNetworkInterfaceTypeFireWire
82 extern const CFStringRef kSCNetworkInterfaceTypeFireWire AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
85 @const kSCNetworkInterfaceTypeIEEE80211
87 extern const CFStringRef kSCNetworkInterfaceTypeIEEE80211 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
; // IEEE 802.11, AirPort
90 @const kSCNetworkInterfaceTypeIrDA
92 extern const CFStringRef kSCNetworkInterfaceTypeIrDA AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
95 @const kSCNetworkInterfaceTypeL2TP
97 extern const CFStringRef kSCNetworkInterfaceTypeL2TP AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
100 @const kSCNetworkInterfaceTypeModem
102 extern const CFStringRef kSCNetworkInterfaceTypeModem AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
105 @const kSCNetworkInterfaceTypePPP
107 extern const CFStringRef kSCNetworkInterfaceTypePPP AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
110 @const kSCNetworkInterfaceTypePPTP
112 extern const CFStringRef kSCNetworkInterfaceTypePPTP AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
115 @const kSCNetworkInterfaceTypeSerial
117 extern const CFStringRef kSCNetworkInterfaceTypeSerial AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
120 @const kSCNetworkInterfaceTypeVLAN
122 extern const CFStringRef kSCNetworkInterfaceTypeVLAN AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
124 /* special network interfaces (and types) */
127 @const kSCNetworkInterfaceTypeIPv4
129 extern const CFStringRef kSCNetworkInterfaceTypeIPv4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
132 @const kSCNetworkInterfaceIPv4
133 @discussion A network interface that can used for layering other
134 interfaces (e.g. 6to4, PPP, PPTP, L2TP) over an existing
137 extern const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
141 @group Protocol configuration
145 @typedef SCNetworkProtocolRef
146 @discussion This is the type of a reference to an object that represents
149 typedef const struct __SCNetworkProtocol
* SCNetworkProtocolRef
;
151 /* network "protocol" types */
154 @const kSCNetworkProtocolTypeAppleTalk
156 extern const CFStringRef kSCNetworkProtocolTypeAppleTalk AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
159 @const kSCNetworkProtocolTypeDNS
161 extern const CFStringRef kSCNetworkProtocolTypeDNS AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
164 @const kSCNetworkProtocolTypeIPv4
166 extern const CFStringRef kSCNetworkProtocolTypeIPv4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
169 @const kSCNetworkProtocolTypeIPv6
171 extern const CFStringRef kSCNetworkProtocolTypeIPv6 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
174 @const kSCNetworkProtocolTypeProxies
176 extern const CFStringRef kSCNetworkProtocolTypeProxies AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
180 @group Service configuration
184 @typedef SCNetworkServiceRef
185 @discussion This is the type of a reference to an object that represents
188 typedef const struct __SCNetworkService
* SCNetworkServiceRef
;
192 @group Set configuration
196 @typedef SCNetworkSetRef
197 @discussion This is the type of a reference to an object that represents
200 typedef const struct __SCNetworkSet
* SCNetworkSetRef
;
206 /* --------------------------------------------------------------------------------
208 * -------------------------------------------------------------------------------- */
211 @group Interface configuration
215 @function SCNetworkInterfaceGetTypeID
216 @discussion Returns the type identifier of all SCNetworkInterface instances.
219 SCNetworkInterfaceGetTypeID (void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
222 @function SCNetworkInterfaceCopyAll
223 @discussion Returns all network capable devices on the system.
224 @result The list of SCNetworkInterface devices on the system.
225 You must release the returned value.
227 CFArrayRef
/* of SCNetworkInterfaceRef's */
228 SCNetworkInterfaceCopyAll (void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
231 @function SCNetworkInterfaceGetSupportedInterfaceTypes
232 @discussion Identify all of the network interface types (e.g. PPP) that
233 can be layered on top of this interface.
234 @param interface The network interface.
235 @result The list of SCNetworkInterface types supported by the interface;
236 NULL if no interface types are supported.
238 CFArrayRef
/* of kSCNetworkInterfaceTypeXXX CFStringRef's */
239 SCNetworkInterfaceGetSupportedInterfaceTypes (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
242 @function SCNetworkInterfaceGetSupportedProtocolTypes
243 @discussion Identify all of the network protocol types (e.g. IPv4, IPv6) that
244 can be layered on top of this interface.
245 @param interface The network interface.
246 @result The list of SCNetworkProtocol types supported by the interface;
247 NULL if no protocol types are supported.
249 CFArrayRef
/* of kSCNetworkProtocolTypeXXX CFStringRef's */
250 SCNetworkInterfaceGetSupportedProtocolTypes (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
253 @function SCNetworkInterfaceCreateWithInterface
254 @discussion Create a new network interface layered on top of another. For
255 example, this function would be used to create a "PPP" interface
257 @param interface The network interface.
258 @param interfaceType The type of SCNetworkInterface to be layered on
259 top of the provided interface.
260 @result A reference to the new SCNetworkInterface.
261 You must release the returned value.
263 SCNetworkInterfaceRef
264 SCNetworkInterfaceCreateWithInterface (SCNetworkInterfaceRef interface
,
265 CFStringRef interfaceType
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
268 @function SCNetworkInterfaceGetBSDName
269 @discussion Returns the BSD interface (en0) or device name (modem)
271 @param interface The network interface.
272 @result The BSD name associated with the interface (e.g. "en0");
273 NULL if no BSD name is available.
276 SCNetworkInterfaceGetBSDName (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
279 @function SCNetworkInterfaceGetConfiguration
280 @discussion Returns the configuration settings associated with a interface.
281 @param interface The network interface.
282 @result The configuration settings associated with the interface;
283 NULL if no changes to the default configuration have been saved.
286 SCNetworkInterfaceGetConfiguration (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
289 @function SCNetworkInterfaceGetHardwareAddressString
290 @discussion Returns a displayable link layer address for the interface.
291 @param interface The network interface.
292 @result A string representing the hardware (MAC) address for the interface.
295 SCNetworkInterfaceGetHardwareAddressString (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
298 @function SCNetworkInterfaceGetInterface
299 @discussion For layered network interfaces, return the underlying interface.
300 @param interface The network interface.
301 @result The underlying network interface;
302 NULL if this is a leaf interface.
304 SCNetworkInterfaceRef
305 SCNetworkInterfaceGetInterface (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
308 @function SCNetworkInterfaceGetInterfaceType
309 @discussion Returns the associated network interface type.
310 @param interface The network interface.
311 @result The interface type.
314 SCNetworkInterfaceGetInterfaceType (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
317 @function SCNetworkInterfaceGetLocalizedDisplayName
318 @discussion Returns the localized name (e.g. "Built-in Ethernet") for
320 @param interface The network interface.
321 @result A localized, display name for the interface;
322 NULL if no name is available.
325 SCNetworkInterfaceGetLocalizedDisplayName (SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
328 @function SCNetworkInterfaceSetConfiguration
329 @discussion Stores the configuration settings for the interface.
330 @param interface The network interface.
331 @param config The configuration settings to associate with this interface.
332 @result TRUE if the configuration was stored; FALSE if an error was encountered.
335 SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface
,
336 CFDictionaryRef config
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
338 /* --------------------------------------------------------------------------------
340 * -------------------------------------------------------------------------------- */
343 @group Protocol configuration
347 @function SCNetworkProtocolGetTypeID
348 @discussion Returns the type identifier of all SCNetworkProtocol instances.
351 SCNetworkProtocolGetTypeID (void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
354 @function SCNetworkProtocolGetConfiguration
355 @discussion Returns the configuration settings associated with the protocol.
356 @param protocol The network protocol.
357 @result The configuration settings associated with the protocol;
358 NULL if no changes to the default configuration have been saved.
361 SCNetworkProtocolGetConfiguration (SCNetworkProtocolRef protocol
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
364 @function SCNetworkProtocolGetEnabled
365 @discussion Returns whether this protocol has been enabled.
366 @param protocol The network protocol.
367 @result TRUE if the protocol is enabled.
370 SCNetworkProtocolGetEnabled (SCNetworkProtocolRef protocol
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
373 @function SCNetworkProtocolGetProtocolType
374 @discussion Returns the associated network protocol type.
375 @param protocol The network protocol.
376 @result The protocol type.
379 SCNetworkProtocolGetProtocolType (SCNetworkProtocolRef protocol
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
382 @function SCNetworkProtocolSetConfiguration
383 @discussion Stores the configuration settings for the protocol.
384 @param protocol The network protocol.
385 @param config The configuration settings to associate with this protocol.
386 @result TRUE if the configuration was stored; FALSE if an error was encountered.
389 SCNetworkProtocolSetConfiguration (SCNetworkProtocolRef protocol
,
390 CFDictionaryRef config
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
393 @function SCNetworkProtocolSetEnabled
394 @discussion Enables or disables the protocol.
395 @param protocol The network protocol.
396 @param enabled TRUE if the protocol should be enabled.
397 @result TRUE if the enabled status was saved; FALSE if an error was encountered.
400 SCNetworkProtocolSetEnabled (SCNetworkProtocolRef protocol
,
401 Boolean enabled
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
403 /* --------------------------------------------------------------------------------
405 * -------------------------------------------------------------------------------- */
408 @group Service configuration
412 @function SCNetworkServiceGetTypeID
413 @discussion Returns the type identifier of all SCNetworkService instances.
416 SCNetworkServiceGetTypeID (void);
419 @function SCNetworkServiceAddProtocolType
420 @discussion Adds a network protocol of the specified type to the
421 service. The protocal configuration is set to default values
422 that are appropriate for the interface associated with the
424 @param service The network service.
425 @param protocolType The type of SCNetworkProtocol to be added to the service.
426 @result TRUE if the protocol was added to the service; FALSE if the
427 protocol was already present or an error was encountered.
430 SCNetworkServiceAddProtocolType (SCNetworkServiceRef service
,
431 CFStringRef protocolType
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
434 @function SCNetworkServiceCopyAll
435 @discussion Returns all available network services for the specified preferences.
436 @param prefs The "preferences" session.
437 @result The list of SCNetworkService services associated with the preferences.
438 You must release the returned value.
440 CFArrayRef
/* of SCNetworkServiceRef's */
441 SCNetworkServiceCopyAll (SCPreferencesRef prefs
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
444 @function SCNetworkServiceCopyProtocols
445 @discussion Returns all network protocols associated with the service.
446 @param service The network service.
447 @result The list of SCNetworkProtocol protocols associated with the service.
448 You must release the returned value.
450 CFArrayRef
/* of SCNetworkProtocolRef's */
451 SCNetworkServiceCopyProtocols (SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
454 @function SCNetworkServiceCreate
455 @discussion Create a new network service for the specified interface in the
457 @param prefs The "preferences" session.
458 @result A reference to the new SCNetworkService.
459 You must release the returned value.
462 SCNetworkServiceCreate (SCPreferencesRef prefs
,
463 SCNetworkInterfaceRef interface
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
466 @function SCNetworkServiceCopy
467 @discussion Returns the network service with the specified identifier.
468 @param prefs The "preferences" session.
469 @param serviceID The unique identifier for the service.
470 @result A reference to the SCNetworkService from the associated preferences;
471 NULL if the serviceID does not exist in the preferences or if an
472 error was encountered.
473 You must release the returned value.
476 SCNetworkServiceCopy (SCPreferencesRef prefs
,
477 CFStringRef serviceID
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
480 @function SCNetworkServiceGetEnabled
481 @discussion Returns whether this service has been enabled.
482 @param service The network service.
483 @result TRUE if the service is enabled.
486 SCNetworkServiceGetEnabled (SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
489 @function SCNetworkServiceGetInterface
490 @discussion Returns the network interface associated with the service.
491 @param service The network service.
492 @result A reference to the SCNetworkInterface associated with the service;
493 NULL if an error was encountered.
495 SCNetworkInterfaceRef
496 SCNetworkServiceGetInterface (SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
499 @function SCNetworkServiceGetName
500 @discussion Returns the [user specified] name associated with the service.
501 @param service The network service.
502 @result The [user specified] name.
505 SCNetworkServiceGetName (SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
508 @function SCNetworkServiceCopyProtocol
509 @discussion Returns the network protocol of the specified type for
511 @param service The network service.
512 @result A reference to the SCNetworkProtocol associated with the service;
513 NULL if this protocol has not been added or if an error was encountered.
514 You must release the returned value.
517 SCNetworkServiceCopyProtocol (SCNetworkServiceRef service
,
518 CFStringRef protocolType
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
521 @function SCNetworkServiceGetServiceID
522 @discussion Returns the identifier for the service.
523 @param service The network service.
524 @result The service identifier.
527 SCNetworkServiceGetServiceID (SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
530 @function SCNetworkServiceRemove
531 @discussion Removes the network service from the configuration.
532 @param service The network service.
533 @result TRUE if the service was removed; FALSE if an error was encountered.
536 SCNetworkServiceRemove (SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
539 @function SCNetworkServiceRemoveProtocolType
540 @discussion Removes the network protocol of the specified type from the service.
541 @param service The network service.
542 @param protocolType The type of SCNetworkProtocol to be removed from the service.
543 @result TRUE if the protocol was removed to the service; FALSE if the
544 protocol was not configured or an error was encountered.
547 SCNetworkServiceRemoveProtocolType (SCNetworkServiceRef service
,
548 CFStringRef protocolType
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
551 @function SCNetworkServiceSetEnabled
552 @discussion Enables or disables the service.
553 @param service The network service.
554 @param enabled TRUE if the service should be enabled.
555 @result TRUE if the enabled status was saved; FALSE if an error was encountered.
558 SCNetworkServiceSetEnabled (SCNetworkServiceRef service
,
559 Boolean enabled
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
562 @function SCNetworkServiceSetName
563 @discussion Stores the [user specified] name for the service.
564 @param service The network service.
565 @param name The [user defined] name to associate with the service.
566 @result TRUE if the name was saved; FALSE if an error was encountered.
568 Note: although not technically required, the [user specified] names
569 for all services within any given set should be unique. As such, an
570 error will be returned if you attemp to name two services with the
574 SCNetworkServiceSetName (SCNetworkServiceRef service
,
575 CFStringRef name
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
577 /* --------------------------------------------------------------------------------
579 * -------------------------------------------------------------------------------- */
582 @group Set configuration
586 @function SCNetworkSetGetTypeID
587 @discussion Returns the type identifier of all SCNetworkSet instances.
590 SCNetworkSetGetTypeID (void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
593 @function SCNetworkSetAddService
594 @discussion Adds the network service to the set.
595 @param set The network set.
596 @param service The service to be added.
597 @result TRUE if the service was added to the set; FALSE if the
598 service was already present or an error was encountered.
600 Note: at the present time, the Network Prefs UI does not
601 support having a single service be a member of more than
602 one set. As such, an error will be returned if you attempt
603 to add a service to more than one set.
606 SCNetworkSetAddService (SCNetworkSetRef set
,
607 SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
610 @function SCNetworkSetCopyAll
611 @discussion Returns all available sets for the specified preferences.
612 @param prefs The "preferences" session.
613 @result The list of SCNetworkSet sets associated with the preferences.
614 You must release the returned value.
616 CFArrayRef
/* of SCNetworkSetRef's */
617 SCNetworkSetCopyAll (SCPreferencesRef prefs
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
620 @function SCNetworkSetCopyCurrent
621 @discussion Returns the "current" set.
622 @param prefs The "preferences" session.
623 @result The current set; NULL if no current set has been defined.
626 SCNetworkSetCopyCurrent (SCPreferencesRef prefs
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
629 @function SCNetworkSetCopyServices
630 @discussion Returns all network services associated with the set.
631 @param set The network set.
632 @result The list of SCNetworkService services associated with the set.
633 You must release the returned value.
635 CFArrayRef
/* of SCNetworkServiceRef's */
636 SCNetworkSetCopyServices (SCNetworkSetRef set
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
639 @function SCNetworkSetCreate
640 @discussion Create a new set in the configuration.
641 @param prefs The "preferences" session.
642 @result A reference to the new SCNetworkSet.
643 You must release the returned value.
646 SCNetworkSetCreate (SCPreferencesRef prefs
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
649 @function SCNetworkSetCopy
650 @discussion Returns the set with the specified identifier.
651 @param prefs The "preferences" session.
652 @param setID The unique identifier for the set.
653 @result A reference to the SCNetworkSet from the associated preferences;
654 NULL if the setID does not exist in the preferences or if an
655 error was encountered.
656 You must release the returned value.
659 SCNetworkSetCopy (SCPreferencesRef prefs
,
660 CFStringRef setID
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
663 @function SCNetworkSetGetName
664 @discussion Returns the [user specified] name associated with the set.
665 @param set The network set.
666 @result The [user specified] name.
669 SCNetworkSetGetName (SCNetworkSetRef set
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
672 @function SCNetworkSetGetSetID
673 @discussion Returns the identifier for the set.
674 @param set The network set.
675 @result The set identifier.
678 SCNetworkSetGetSetID (SCNetworkSetRef set
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
681 @function SCNetworkSetGetServiceOrder
682 @discussion Returns the [user specified] ordering of network services
684 @param set The network set.
685 @result The ordered list of CFStringRef service identifiers associated
687 NULL if no service order has been specified or if an error
690 CFArrayRef
/* of serviceID CFStringRef's */
691 SCNetworkSetGetServiceOrder (SCNetworkSetRef set
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
694 @function SCNetworkSetRemove
695 @discussion Removes the set from the configuration.
696 @param set The network set.
697 @result TRUE if the set was removed; FALSE if an error was encountered.
700 SCNetworkSetRemove (SCNetworkSetRef set
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
703 @function SCNetworkSetRemoveService
704 @discussion Removes the network service from the set.
705 @param set The network set.
706 @param service The service to be removed.
707 @result TRUE if the service was removed from the set; FALSE if the
708 service was not already present or an error was encountered.
711 SCNetworkSetRemoveService (SCNetworkSetRef set
,
712 SCNetworkServiceRef service
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
715 @function SCNetworkSetSetCurrent
716 @discussion Specifies the set that should be the "current" set.
717 @param set The network set.
718 @result TRUE if the current set was updated;
719 FALSE if an error was encountered.
722 SCNetworkSetSetCurrent (SCNetworkSetRef set
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
725 @function SCNetworkSetSetName
726 @discussion Stores the [user specified] name for the set.
727 @param set The network set.
728 @param name The [user defined] name to associate with the set.
729 @result TRUE if the name was saved; FALSE if an error was encountered.
731 Note: although not technically required, the [user specified] names
732 for all set should be unique. As such, an error will be returned if
733 you attemp to name two sets with the same string.
736 SCNetworkSetSetName (SCNetworkSetRef set
,
737 CFStringRef name
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
;
740 @function SCNetworkSetGetServiceOrder
741 @discussion Stores the [user specified] ordering of network services for the set.
742 @param set The network set.
743 @param newOrder The ordered list of CFStringRef service identifiers for the set.
744 @result TRUE if the new service order was saved; FALSE if an error was encountered.
747 SCNetworkSetSetServiceOrder (SCNetworkSetRef set
,
748 CFArrayRef newOrder
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
; /* serviceID CFStringRef's */
753 #endif /* _SCNETWORKCONFIGURATION_H */