ADC Home > Reference Library > Reference > Networking > System Configuration Framework Reference

 


SCNetworkConfiguration.h

Include Path:
<SystemConfiguration/SCNetworkConfiguration.h>
Path:
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Headers/SCNetworkConfiguration.h
Includes:
<AvailabilityMacros.h>
<sys/cdefs.h>
<CoreFoundation/CoreFoundation.h>
<SystemConfiguration/SystemConfiguration.h>

Overview

The SCNetworkConfiguration API provides access to the stored network configuration. The functions include providing access to the network capable devices on the system, the network sets, network services, and network protocols. Note that these functions follow Core Foundation function-name conventions in that a function that has "Create" or "Copy" in its name returns a reference you must release with CFRelease.

Note: When using the SCNetworkConfiguration APIs you must keep in mind that in order for any of your changes to be committed to permanent storage a call must be made to the SCPreferencesCommitChanges function.

For more information on using System Configuration framework APIs, see System Configuration Programming Guidelines.



Groups

Set

configuration

Group members:

SCNetworkSetAddService
SCNetworkSetContainsInterface
SCNetworkSetCopy
SCNetworkSetCopyAll
SCNetworkSetCopyCurrent
SCNetworkSetCopyServices
SCNetworkSetCreate
SCNetworkSetGetName
SCNetworkSetGetServiceOrder
SCNetworkSetGetSetID
SCNetworkSetGetTypeID
SCNetworkSetRef
SCNetworkSetRemove
SCNetworkSetRemoveService
SCNetworkSetSetCurrent
SCNetworkSetSetName
SCNetworkSetSetServiceOrder

 

Service

configuration

Group members:

SCNetworkServiceAddProtocolType
SCNetworkServiceCopy
SCNetworkServiceCopyAll
SCNetworkServiceCopyProtocol
SCNetworkServiceCopyProtocols
SCNetworkServiceCreate
SCNetworkServiceEstablishDefaultConfiguration
SCNetworkServiceGetEnabled
SCNetworkServiceGetInterface
SCNetworkServiceGetName
SCNetworkServiceGetServiceID
SCNetworkServiceGetTypeID
SCNetworkServiceRef
SCNetworkServiceRemove
SCNetworkServiceRemoveProtocolType
SCNetworkServiceSetEnabled
SCNetworkServiceSetName

 

Interface

configuration (VLAN)

Group members:

Ethernet Bond Aggregation Status (kSCBondStatusDeviceAggregationStatus) codes
kSCBondStatusDeviceAggregationStatus
kSCBondStatusDeviceCollecting
kSCBondStatusDeviceDistributing
kSCNetworkInterfaceIPv4
kSCNetworkInterfaceType6to4
kSCNetworkInterfaceTypeBluetooth
kSCNetworkInterfaceTypeBond
kSCNetworkInterfaceTypeEthernet
kSCNetworkInterfaceTypeFireWire
kSCNetworkInterfaceTypeIEEE80211
kSCNetworkInterfaceTypeIPv4
kSCNetworkInterfaceTypeIrDA
kSCNetworkInterfaceTypeL2TP
kSCNetworkInterfaceTypeModem
kSCNetworkInterfaceTypePPP
kSCNetworkInterfaceTypePPTP
kSCNetworkInterfaceTypeSerial
kSCNetworkInterfaceTypeVLAN
kSCNetworkInterfaceTypeWWAN
SCBondInterfaceCopyAll
SCBondInterfaceCopyAvailableMemberInterfaces
SCBondInterfaceCopyStatus
SCBondInterfaceCreate
SCBondInterfaceGetMemberInterfaces
SCBondInterfaceGetOptions
SCBondInterfaceRef
SCBondInterfaceRemove
SCBondInterfaceSetLocalizedDisplayName
SCBondInterfaceSetMemberInterfaces
SCBondInterfaceSetOptions
SCBondStatusGetInterfaceStatus
SCBondStatusGetMemberInterfaces
SCBondStatusGetTypeID
SCBondStatusRef
SCNetworkInterfaceCopyAll
SCNetworkInterfaceCopyMediaOptions
SCNetworkInterfaceCopyMediaSubTypeOptions
SCNetworkInterfaceCopyMediaSubTypes
SCNetworkInterfaceCopyMTU
SCNetworkInterfaceCreateWithInterface
SCNetworkInterfaceForceConfigurationRefresh
SCNetworkInterfaceGetBSDName
SCNetworkInterfaceGetConfiguration
SCNetworkInterfaceGetExtendedConfiguration
SCNetworkInterfaceGetHardwareAddressString
SCNetworkInterfaceGetInterface
SCNetworkInterfaceGetInterfaceType
SCNetworkInterfaceGetLocalizedDisplayName
SCNetworkInterfaceGetSupportedInterfaceTypes
SCNetworkInterfaceGetSupportedProtocolTypes
SCNetworkInterfaceGetTypeID
SCNetworkInterfaceRef
SCNetworkInterfaceSetConfiguration
SCNetworkInterfaceSetExtendedConfiguration
SCNetworkInterfaceSetMediaOptions
SCNetworkInterfaceSetMTU
SCVLANInterfaceCopyAll
SCVLANInterfaceCopyAvailablePhysicalInterfaces
SCVLANInterfaceCreate
SCVLANInterfaceGetOptions
SCVLANInterfaceGetPhysicalInterface
SCVLANInterfaceGetTag
SCVLANInterfaceRef
SCVLANInterfaceRemove
SCVLANInterfaceSetLocalizedDisplayName
SCVLANInterfaceSetOptions
SCVLANInterfaceSetPhysicalInterfaceAndTag

 

Protocol

configuration

Group members:

kSCNetworkProtocolTypeAppleTalk
kSCNetworkProtocolTypeDNS
kSCNetworkProtocolTypeIPv4
kSCNetworkProtocolTypeIPv6
kSCNetworkProtocolTypeProxies
kSCNetworkProtocolTypeSMB
SCNetworkProtocolGetConfiguration
SCNetworkProtocolGetEnabled
SCNetworkProtocolGetProtocolType
SCNetworkProtocolGetTypeID
SCNetworkProtocolRef
SCNetworkProtocolSetConfiguration
SCNetworkProtocolSetEnabled

Functions

SCBondInterfaceCopyAll
SCBondInterfaceCopyAvailableMemberInterfaces
SCBondInterfaceCopyStatus
SCBondInterfaceCreate
SCBondInterfaceGetMemberInterfaces
SCBondInterfaceGetOptions
SCBondInterfaceRemove
SCBondInterfaceSetLocalizedDisplayName
SCBondInterfaceSetMemberInterfaces
SCBondInterfaceSetOptions
SCBondStatusGetInterfaceStatus
SCBondStatusGetMemberInterfaces
SCBondStatusGetTypeID
SCNetworkInterfaceCopyAll
SCNetworkInterfaceCopyMediaOptions
SCNetworkInterfaceCopyMediaSubTypeOptions
SCNetworkInterfaceCopyMediaSubTypes
SCNetworkInterfaceCopyMTU
SCNetworkInterfaceCreateWithInterface
SCNetworkInterfaceForceConfigurationRefresh
SCNetworkInterfaceGetBSDName
SCNetworkInterfaceGetConfiguration
SCNetworkInterfaceGetExtendedConfiguration
SCNetworkInterfaceGetHardwareAddressString
SCNetworkInterfaceGetInterface
SCNetworkInterfaceGetInterfaceType
SCNetworkInterfaceGetLocalizedDisplayName
SCNetworkInterfaceGetSupportedInterfaceTypes
SCNetworkInterfaceGetSupportedProtocolTypes
SCNetworkInterfaceGetTypeID
SCNetworkInterfaceSetConfiguration
SCNetworkInterfaceSetExtendedConfiguration
SCNetworkInterfaceSetMediaOptions
SCNetworkInterfaceSetMTU
SCNetworkProtocolGetConfiguration
SCNetworkProtocolGetEnabled
SCNetworkProtocolGetProtocolType
SCNetworkProtocolGetTypeID
SCNetworkProtocolSetConfiguration
SCNetworkProtocolSetEnabled
SCNetworkServiceAddProtocolType
SCNetworkServiceCopy
SCNetworkServiceCopyAll
SCNetworkServiceCopyProtocol
SCNetworkServiceCopyProtocols
SCNetworkServiceCreate
SCNetworkServiceEstablishDefaultConfiguration
SCNetworkServiceGetEnabled
SCNetworkServiceGetInterface
SCNetworkServiceGetName
SCNetworkServiceGetServiceID
SCNetworkServiceGetTypeID
SCNetworkServiceRemove
SCNetworkServiceRemoveProtocolType
SCNetworkServiceSetEnabled
SCNetworkServiceSetName
SCNetworkSetAddService
SCNetworkSetContainsInterface
SCNetworkSetCopy
SCNetworkSetCopyAll
SCNetworkSetCopyCurrent
SCNetworkSetCopyServices
SCNetworkSetCreate
SCNetworkSetGetName
SCNetworkSetGetServiceOrder
SCNetworkSetGetSetID
SCNetworkSetGetTypeID
SCNetworkSetRemove
SCNetworkSetRemoveService
SCNetworkSetSetCurrent
SCNetworkSetSetName
SCNetworkSetSetServiceOrder
SCVLANInterfaceCopyAll
SCVLANInterfaceCopyAvailablePhysicalInterfaces
SCVLANInterfaceCreate
SCVLANInterfaceGetOptions
SCVLANInterfaceGetPhysicalInterface
SCVLANInterfaceGetTag
SCVLANInterfaceRemove
SCVLANInterfaceSetLocalizedDisplayName
SCVLANInterfaceSetOptions
SCVLANInterfaceSetPhysicalInterfaceAndTag

SCBondInterfaceCopyAll


CFArrayRef /* of SCBondInterfaceRef's */
SCBondInterfaceCopyAll (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

The list of Ethernet Bond interfaces on the system. You must release the returned value.

Discussion

Returns all Ethernet Bond interfaces on the system.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceCopyAvailableMemberInterfaces


CFArrayRef /* of SCNetworkInterfaceRef's */
SCBondInterfaceCopyAvailableMemberInterfaces (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

The list of interfaces. You must release the returned value.

Discussion

Returns all network capable devices on the system that can be added to an Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceCopyStatus


SCBondStatusRef SCBondInterfaceCopyStatus (
    SCBondInterfaceRef bond);  
Parameters
bond
The SCBondInterface interface.
Return Value

The status associated with the interface. You must release the returned value.

Discussion

Returns the status of the specified Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceCreate


SCBondInterfaceRef SCBondInterfaceCreate (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

A reference to the new SCBondInterface. You must release the returned value.

Discussion

Create a new SCBondInterface interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceGetMemberInterfaces


CFArrayRef /* of SCNetworkInterfaceRef's */
SCBondInterfaceGetMemberInterfaces (
    SCBondInterfaceRef bond);  
Parameters
bond
The SCBondInterface interface.
Return Value

The list of interfaces.

Discussion

Returns the member interfaces for the specified Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceGetOptions


CFDictionaryRef SCBondInterfaceGetOptions (
    SCBondInterfaceRef bond);  
Parameters
bond
The SCBondInterface interface.
Return Value

The configuration settings associated with the Ethernet Bond interface; NULL if no changes to the default configuration have been saved.

Discussion

Returns the configuration settings associated with a Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceRemove


Boolean SCBondInterfaceRemove (
    SCBondInterfaceRef bond);  
Parameters
bond
The SCBondInterface interface.
Return Value

TRUE if the interface was removed; FALSE if an error was encountered.

Discussion

Removes the SCBondInterface from the configuration.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceSetLocalizedDisplayName


Boolean SCBondInterfaceSetLocalizedDisplayName (
    SCBondInterfaceRef bond, 
    CFStringRef newName);  
Parameters
bond
The SCBondInterface interface.
newName
The new display name.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Sets the localized display name for the specified Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceSetMemberInterfaces


Boolean SCBondInterfaceSetMemberInterfaces (
    SCBondInterfaceRef bond, 
    CFArrayRef members) /* of SCNetworkInterfaceRef's */;  
Parameters
bond
The SCBondInterface interface.
members
The desired member interfaces.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Sets the member interfaces for the specified Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondInterfaceSetOptions


Boolean SCBondInterfaceSetOptions (
    SCBondInterfaceRef bond, 
    CFDictionaryRef newOptions);  
Parameters
bond
The SCBondInterface interface.
newOptions
The new configuration settings.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Sets the configuration settings for the specified Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondStatusGetInterfaceStatus


CFDictionaryRef SCBondStatusGetInterfaceStatus (
    SCBondStatusRef bondStatus, 
    SCNetworkInterfaceRef interface);  
Parameters
bondStatus
The Ethernet Bond status.
interface
The specific member interface; NULL if you want the status of the Ethernet Bond.
Return Value

The interface status.

Discussion

Returns the status of a specific member interface of an Ethernet Bond or the status of the bond as a whole.

Availability
Introduced in Mac OS X v10.5.

SCBondStatusGetMemberInterfaces


CFArrayRef /* of SCNetworkInterfaceRef's */
SCBondStatusGetMemberInterfaces (
    SCBondStatusRef bondStatus);  
Parameters
bondStatus
The Ethernet Bond status.
Return Value

The list of interfaces.

Discussion

Returns the member interfaces that are represented with the Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondStatusGetTypeID


CFTypeID SCBondStatusGetTypeID (
    void);  
Discussion

Returns the type identifier of all SCBondStatus instances.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceCopyAll


CFArrayRef /* of SCNetworkInterfaceRef's */
SCNetworkInterfaceCopyAll (
    void);  
Return Value

The list of interfaces on the system. You must release the returned value.

Discussion

Returns all network capable interfaces on the system.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceCopyMediaOptions


Boolean SCNetworkInterfaceCopyMediaOptions (
    SCNetworkInterfaceRef interface, 
    CFDictionaryRef *current, 
    CFDictionaryRef *active, 
    CFArrayRef *available, 
    Boolean filter);  
Parameters
interface
The desired network interface.
current
A pointer to memory that will be filled with a CFDictionaryRef representing the currently requested media options (subtype, options). If NULL, the current options will not be returned.
active
A pointer to memory that will be filled with a CFDictionaryRef representing the active media options (subtype, options). If NULL, the active options will not be returned.
available
A pointer to memory that will be filled with a CFArrayRef representing the possible media options (subtype, options). If NULL, the available options will not be returned.
filter
A boolean indicating whether the available options should be filtered to exclude those options which would not normally be requested by a user/admin (e.g. hw-loopback).
Return Value

TRUE if requested information has been returned.

Discussion

For the specified network interface, returns information about the currently requested media options, the active media options, and the media options which are available.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceCopyMediaSubTypeOptions


CFArrayRef SCNetworkInterfaceCopyMediaSubTypeOptions (
    CFArrayRef available, 
    CFStringRef subType);  
Parameters
available
The available options as returned by the NetworkInterfaceCopyMediaOptions function.
subType
The subtype
Return Value

An array of available media options. Each of the available options is returned as an array of CFString's (e.g. , ). NULL if no options are available.

Discussion

For the provided interface configuration options and specific subtype, return a list of available media options.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceCopyMediaSubTypes


CFArrayRef SCNetworkInterfaceCopyMediaSubTypes (
    CFArrayRef available);  
Parameters
available
The available options as returned by the SCNetworkInterfaceCopyMediaOptions function.
Return Value

An array of available media subtypes CFString's (e.g. 10BaseT/UTP, 100baseTX, etc). NULL if no subtypes are available.

Discussion

For the provided interface configuration options, return a list of available media subtypes.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceCopyMTU


Boolean SCNetworkInterfaceCopyMTU (
    SCNetworkInterfaceRef interface, 
    int *mtu_cur, 
    int *mtu_min, 
    int *mtu_max);  
Parameters
interface
The desired network interface.
mtu_cur
A pointer to memory that will be filled with the current MTU setting for the interface.
mtu_min
A pointer to memory that will be filled with the minimum MTU setting for the interface. If negative, the minimum setting could not be determined.
mtu_max
A pointer to memory that will be filled with the maximum MTU setting for the interface. If negative, the maximum setting could not be determined.
Return Value

TRUE if requested information has been returned.

Discussion

For the specified network interface, returns information about the currently MTU setting and the range of allowable values.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceCreateWithInterface


SCNetworkInterfaceRef SCNetworkInterfaceCreateWithInterface (
    SCNetworkInterfaceRef interface, 
    CFStringRef interfaceType);  
Parameters
interface
The network interface.
interfaceType
The type of SCNetworkInterface to be layered on top of the provided interface.
Return Value

A reference to the new SCNetworkInterface. You must release the returned value.

Discussion

Create a new network interface layered on top of another. For example, this function would be used to create a "PPP" interface on top of a "modem".

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceForceConfigurationRefresh


Boolean SCNetworkInterfaceForceConfigurationRefresh (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The desired network interface.
Return Value

Returns TRUE if the notification was sent; FALSE otherwise.

Discussion

Sends a notification to interested network configuration agents to immediately retry their configuration. For example, calling this function will cause the DHCP client to contact the DHCP server immediately rather than waiting until its timeout has expired. The utility of this function is to allow the caller to give a hint to the system that the network infrastructure or configuration has changed.



Note: This function requires root (euid==0) privilege or, alternatively, you may pass an SCNetworkInterface which is derived from a sequence of calls to :

SCPreferencesCreateWithAuthorization SCNetworkSetCopy... SCNetworkServiceGetInterface

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceGetBSDName


CFStringRef SCNetworkInterfaceGetBSDName (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

The BSD name associated with the interface (e.g. "en0"); NULL if no BSD name is available.

Discussion

Returns the BSD interface (en0) or device name (modem) for the interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetConfiguration


CFDictionaryRef SCNetworkInterfaceGetConfiguration (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

The configuration settings associated with the interface; NULL if no configuration settings are associated with the interface or an error was encountered.

Discussion

Returns the configuration settings associated with a interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetExtendedConfiguration


CFDictionaryRef SCNetworkInterfaceGetExtendedConfiguration (
    SCNetworkInterfaceRef interface, 
    CFStringRef extendedType);  
Parameters
interface
The network interface.
extendedType
A string representing the type of extended information (e.g. EAPOL).
Return Value

The configuration settings associated with the interface; NULL if no configuration settings are associated with the interface or an error was encountered.

Discussion

Returns the configuration settings associated with a interface.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceGetHardwareAddressString


CFStringRef SCNetworkInterfaceGetHardwareAddressString (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

A string representing the hardware (MAC) address for the interface.

Discussion

Returns a displayable link layer address for the interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetInterface


SCNetworkInterfaceRef SCNetworkInterfaceGetInterface (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

The underlying network interface; NULL if this is a leaf interface.

Discussion

For layered network interfaces, return the underlying interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetInterfaceType


CFStringRef SCNetworkInterfaceGetInterfaceType (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

The interface type.

Discussion

Returns the associated network interface type.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetLocalizedDisplayName


CFStringRef SCNetworkInterfaceGetLocalizedDisplayName (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

A localized, display name for the interface; NULL if no name is available.

Discussion

Returns the localized name (e.g. "Ethernet", "FireWire") for the interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetSupportedInterfaceTypes


CFArrayRef /* of kSCNetworkInterfaceTypeXXX CFStringRef's */
SCNetworkInterfaceGetSupportedInterfaceTypes (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

The list of SCNetworkInterface types supported by the interface; NULL if no interface types are supported.

Discussion

Identify all of the network interface types (e.g. PPP) that can be layered on top of this interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetSupportedProtocolTypes


CFArrayRef /* of kSCNetworkProtocolTypeXXX CFStringRef's */
SCNetworkInterfaceGetSupportedProtocolTypes (
    SCNetworkInterfaceRef interface);  
Parameters
interface
The network interface.
Return Value

The list of SCNetworkProtocol types supported by the interface; NULL if no protocol types are supported.

Discussion

Identify all of the network protocol types (e.g. IPv4, IPv6) that can be layered on top of this interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceGetTypeID


CFTypeID SCNetworkInterfaceGetTypeID (
    void);  
Discussion

Returns the type identifier of all SCNetworkInterface instances.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceSetConfiguration


Boolean SCNetworkInterfaceSetConfiguration (
    SCNetworkInterfaceRef interface, 
    CFDictionaryRef config);  
Parameters
interface
The network interface.
config
The configuration settings to associate with this interface.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Stores the configuration settings for the interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkInterfaceSetExtendedConfiguration


Boolean SCNetworkInterfaceSetExtendedConfiguration (
    SCNetworkInterfaceRef interface, 
    CFStringRef extendedType, 
    CFDictionaryRef config);  
Parameters
interface
The network interface.
config
The configuration settings to associate with this interface.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Stores the configuration settings for the interface.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceSetMediaOptions


Boolean SCNetworkInterfaceSetMediaOptions (
    SCNetworkInterfaceRef interface, 
    CFStringRef subtype, 
    CFArrayRef options);  
Parameters
interface
The desired network interface.
subtype
The desired media subtype (e.g. "autoselect", "100baseTX", ...).
options
The desired media options (e.g. "half-duplex", "full-duplex", ...). If NULL, the active options will not be returned.
Return Value

TRUE if the configuration was updated; FALSE if an error was encountered.

Discussion

For the specified network interface, sets the requested media subtype and options.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceSetMTU


Boolean SCNetworkInterfaceSetMTU (
    SCNetworkInterfaceRef interface, 
    int mtu);  
Parameters
interface
The desired network interface.
mtu
The desired MTU setting for the interface.
Return Value

TRUE if the configuration was updated; FALSE if an error was encountered.

Discussion

For the specified network interface, sets the requested MTU setting.

Availability
Introduced in Mac OS X v10.5.

SCNetworkProtocolGetConfiguration


CFDictionaryRef SCNetworkProtocolGetConfiguration (
    SCNetworkProtocolRef protocol);  
Parameters
protocol
The network protocol.
Return Value

The configuration settings associated with the protocol; NULL if no configuration settings are associated with the protocol or an error was encountered.

Discussion

Returns the configuration settings associated with the protocol.

Availability
Introduced in Mac OS X v10.4.

SCNetworkProtocolGetEnabled


Boolean SCNetworkProtocolGetEnabled (
    SCNetworkProtocolRef protocol);  
Parameters
protocol
The network protocol.
Return Value

TRUE if the protocol is enabled.

Discussion

Returns whether this protocol has been enabled.

Availability
Introduced in Mac OS X v10.4.

SCNetworkProtocolGetProtocolType


CFStringRef SCNetworkProtocolGetProtocolType (
    SCNetworkProtocolRef protocol);  
Parameters
protocol
The network protocol.
Return Value

The protocol type.

Discussion

Returns the associated network protocol type.

Availability
Introduced in Mac OS X v10.4.

SCNetworkProtocolGetTypeID


CFTypeID SCNetworkProtocolGetTypeID (
    void);  
Discussion

Returns the type identifier of all SCNetworkProtocol instances.

Availability
Introduced in Mac OS X v10.4.

SCNetworkProtocolSetConfiguration


Boolean SCNetworkProtocolSetConfiguration (
    SCNetworkProtocolRef protocol, 
    CFDictionaryRef config);  
Parameters
protocol
The network protocol.
config
The configuration settings to associate with this protocol.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Stores the configuration settings for the protocol.

Availability
Introduced in Mac OS X v10.4.

SCNetworkProtocolSetEnabled


Boolean SCNetworkProtocolSetEnabled (
    SCNetworkProtocolRef protocol, 
    Boolean enabled);  
Parameters
protocol
The network protocol.
enabled
TRUE if the protocol should be enabled.
Return Value

TRUE if the enabled status was saved; FALSE if an error was encountered.

Discussion

Enables or disables the protocol.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceAddProtocolType


Boolean SCNetworkServiceAddProtocolType (
    SCNetworkServiceRef service, 
    CFStringRef protocolType);  
Parameters
service
The network service.
protocolType
The type of SCNetworkProtocol to be added to the service.
Return Value

TRUE if the protocol was added to the service; FALSE if the protocol was already present or an error was encountered.

Discussion

Adds a network protocol of the specified type to the service. The protocal configuration is set to default values that are appropriate for the interface associated with the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceCopy


SCNetworkServiceRef SCNetworkServiceCopy (
    SCPreferencesRef prefs, 
    CFStringRef serviceID);  
Parameters
prefs
The "preferences" session.
serviceID
The unique identifier for the service.
Return Value

A reference to the SCNetworkService from the associated preferences; NULL if the serviceID does not exist in the preferences or if an error was encountered. You must release the returned value.

Discussion

Returns the network service with the specified identifier.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceCopyAll


CFArrayRef /* of SCNetworkServiceRef's */
SCNetworkServiceCopyAll (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

The list of SCNetworkService services associated with the preferences. You must release the returned value.

Discussion

Returns all available network services for the specified preferences.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceCopyProtocol


SCNetworkProtocolRef SCNetworkServiceCopyProtocol (
    SCNetworkServiceRef service, 
    CFStringRef protocolType);  
Parameters
service
The network service.
Return Value

A reference to the SCNetworkProtocol associated with the service; NULL if this protocol has not been added or if an error was encountered. You must release the returned value.

Discussion

Returns the network protocol of the specified type for the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceCopyProtocols


CFArrayRef /* of SCNetworkProtocolRef's */
SCNetworkServiceCopyProtocols (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

The list of SCNetworkProtocol protocols associated with the service. You must release the returned value.

Discussion

Returns all network protocols associated with the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceCreate


SCNetworkServiceRef SCNetworkServiceCreate (
    SCPreferencesRef prefs, 
    SCNetworkInterfaceRef interface);  
Parameters
prefs
The "preferences" session.
Return Value

A reference to the new SCNetworkService. You must release the returned value.

Discussion

Create a new network service for the specified interface in the configuration.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceEstablishDefaultConfiguration


Boolean SCNetworkServiceEstablishDefaultConfiguration (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

TRUE if the configuration was updated; FALSE if an error was encountered.

Discussion

Establishes the "default" configuration for a network service. This configuration includes the addition of network protocols for the service (with "default" configuration options).

Availability
Introduced in Mac OS X v10.5.

SCNetworkServiceGetEnabled


Boolean SCNetworkServiceGetEnabled (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

TRUE if the service is enabled.

Discussion

Returns whether this service has been enabled.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceGetInterface


SCNetworkInterfaceRef SCNetworkServiceGetInterface (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

A reference to the SCNetworkInterface associated with the service; NULL if an error was encountered.

Discussion

Returns the network interface associated with the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceGetName


CFStringRef SCNetworkServiceGetName (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

The [user specified] name.

Discussion

Returns the [user specified] name associated with the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceGetServiceID


CFStringRef SCNetworkServiceGetServiceID (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

The service identifier.

Discussion

Returns the identifier for the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceGetTypeID


CFTypeID SCNetworkServiceGetTypeID (
    void);  
Discussion

Returns the type identifier of all SCNetworkService instances.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceRemove


Boolean SCNetworkServiceRemove (
    SCNetworkServiceRef service);  
Parameters
service
The network service.
Return Value

TRUE if the service was removed; FALSE if an error was encountered.

Discussion

Removes the network service from the configuration.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceRemoveProtocolType


Boolean SCNetworkServiceRemoveProtocolType (
    SCNetworkServiceRef service, 
    CFStringRef protocolType);  
Parameters
service
The network service.
protocolType
The type of SCNetworkProtocol to be removed from the service.
Return Value

TRUE if the protocol was removed to the service; FALSE if the protocol was not configured or an error was encountered.

Discussion

Removes the network protocol of the specified type from the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceSetEnabled


Boolean SCNetworkServiceSetEnabled (
    SCNetworkServiceRef service, 
    Boolean enabled);  
Parameters
service
The network service.
enabled
TRUE if the service should be enabled.
Return Value

TRUE if the enabled status was saved; FALSE if an error was encountered.

Discussion

Enables or disables the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceSetName


Boolean SCNetworkServiceSetName (
    SCNetworkServiceRef service, 
    CFStringRef name);  
Parameters
service
The network service.
name
The [user defined] name to associate with the service.
Return Value

TRUE if the name was saved; FALSE if an error was encountered.

Note: although not technically required, the [user specified] names for all services within any given set should be unique. As such, an error will be returned if you attemp to name two services with the same string.

Discussion

Stores the [user specified] name for the service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetAddService


Boolean SCNetworkSetAddService (
    SCNetworkSetRef set, 
    SCNetworkServiceRef service);  
Parameters
set
The network set.
service
The service to be added.
Return Value

TRUE if the service was added to the set; FALSE if the service was already present or an error was encountered.

Note: prior to Mac OS X 10.5, the Network Preferences UI did not support having a single service being a member of more than one set. An error will be returned if you attempt to add a service to more than one set on a pre-10.5 system.

Discussion

Adds the network service to the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetContainsInterface


Boolean SCNetworkSetContainsInterface (
    SCNetworkSetRef set, 
    SCNetworkInterfaceRef interface);  
Parameters
set
The network set.
interface
The network interface.
Return Value

TRUE if the interface is represented in the set; FALSE if not.

Discussion

Checks if an interface is represented by at least one network service in the specified set.

Availability
Introduced in Mac OS X v10.5.

SCNetworkSetCopy


SCNetworkSetRef SCNetworkSetCopy (
    SCPreferencesRef prefs, 
    CFStringRef setID);  
Parameters
prefs
The "preferences" session.
setID
The unique identifier for the set.
Return Value

A reference to the SCNetworkSet from the associated preferences; NULL if the setID does not exist in the preferences or if an error was encountered. You must release the returned value.

Discussion

Returns the set with the specified identifier.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetCopyAll


CFArrayRef /* of SCNetworkSetRef's */
SCNetworkSetCopyAll (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

The list of SCNetworkSet sets associated with the preferences. You must release the returned value.

Discussion

Returns all available sets for the specified preferences.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetCopyCurrent


SCNetworkSetRef SCNetworkSetCopyCurrent (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

The current set; NULL if no current set has been defined.

Discussion

Returns the "current" set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetCopyServices


CFArrayRef /* of SCNetworkServiceRef's */
SCNetworkSetCopyServices (
    SCNetworkSetRef set);  
Parameters
set
The network set.
Return Value

The list of SCNetworkService services associated with the set. You must release the returned value.

Discussion

Returns all network services associated with the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetCreate


SCNetworkSetRef SCNetworkSetCreate (
    SCPreferencesRef prefs);  
Parameters
prefs
The "preferences" session.
Return Value

A reference to the new SCNetworkSet. You must release the returned value.

Discussion

Create a new set in the configuration.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetGetName


CFStringRef SCNetworkSetGetName (
    SCNetworkSetRef set);  
Parameters
set
The network set.
Return Value

The [user specified] name.

Discussion

Returns the [user specified] name associated with the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetGetServiceOrder


CFArrayRef /* of serviceID CFStringRef's */
SCNetworkSetGetServiceOrder (
    SCNetworkSetRef set);  
Parameters
set
The network set.
Return Value

The ordered list of CFStringRef service identifiers associated with the set; NULL if no service order has been specified or if an error was encountered.

Discussion

Returns the [user specified] ordering of network services within the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetGetSetID


CFStringRef SCNetworkSetGetSetID (
    SCNetworkSetRef set);  
Parameters
set
The network set.
Return Value

The set identifier.

Discussion

Returns the identifier for the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetGetTypeID


CFTypeID SCNetworkSetGetTypeID (
    void);  
Discussion

Returns the type identifier of all SCNetworkSet instances.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetRemove


Boolean SCNetworkSetRemove (
    SCNetworkSetRef set);  
Parameters
set
The network set.
Return Value

TRUE if the set was removed; FALSE if an error was encountered.

Discussion

Removes the set from the configuration.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetRemoveService


Boolean SCNetworkSetRemoveService (
    SCNetworkSetRef set, 
    SCNetworkServiceRef service);  
Parameters
set
The network set.
service
The service to be removed.
Return Value

TRUE if the service was removed from the set; FALSE if the service was not already present or an error was encountered.

Discussion

Removes the network service from the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetSetCurrent


Boolean SCNetworkSetSetCurrent (
    SCNetworkSetRef set);  
Parameters
set
The network set.
Return Value

TRUE if the current set was updated; FALSE if an error was encountered.

Discussion

Specifies the set that should be the "current" set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetSetName


Boolean SCNetworkSetSetName (
    SCNetworkSetRef set, 
    CFStringRef name);  
Parameters
set
The network set.
name
The [user defined] name to associate with the set.
Return Value

TRUE if the name was saved; FALSE if an error was encountered.

Note: although not technically required, the [user specified] names for all set should be unique. As such, an error will be returned if you attemp to name two sets with the same string.

Discussion

Stores the [user specified] name for the set.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetSetServiceOrder


Boolean SCNetworkSetSetServiceOrder (
    SCNetworkSetRef set, 
    CFArrayRef newOrder);  /* 
    serviceID CFStringRef's */
Parameters
set
The network set.
newOrder
The ordered list of CFStringRef service identifiers for the set.
Return Value

TRUE if the new service order was saved; FALSE if an error was encountered.

Discussion

Stores the [user specified] ordering of network services for the set.

Availability
Introduced in Mac OS X v10.4.

SCVLANInterfaceCopyAll


CFArrayRef /* of SCVLANInterfaceRef's */
SCVLANInterfaceCopyAll (
    SCPreferencesRef prefs);  
Return Value

The list of VLAN interfaces on the system. You must release the returned value.

Discussion

Returns all VLAN interfaces on the system.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceCopyAvailablePhysicalInterfaces


CFArrayRef /* of SCNetworkInterfaceRef's */
SCVLANInterfaceCopyAvailablePhysicalInterfaces (
    void);  
Return Value

The list of interfaces. You must release the returned value.

Discussion

Returns the network capable devices on the system that can be associated with a VLAN interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceCreate


SCVLANInterfaceRef SCVLANInterfaceCreate (
    SCPreferencesRef prefs, 
    SCNetworkInterfaceRef physical, 
    CFNumberRef tag);  
Parameters
prefs
The "preferences" session.
physical
The physical interface to associate with the VLAN.
tag
The tag to associate with the VLAN.
Return Value

A reference to the new SCVLANInterface. You must release the returned value.

Note: the tag must be in the range (1 <= tag <= 4094)

Discussion

Create a new SCVLANInterface interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceGetOptions


CFDictionaryRef SCVLANInterfaceGetOptions (
    SCVLANInterfaceRef vlan);  
Parameters
vlan
The SCVLANInterface interface.
Return Value

The configuration settings associated with the VLAN interface; NULL if no changes to the default configuration have been saved.

Discussion

Returns the configuration settings associated with the VLAN interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceGetPhysicalInterface


SCNetworkInterfaceRef SCVLANInterfaceGetPhysicalInterface (
    SCVLANInterfaceRef vlan);  
Parameters
vlan
The SCVLANInterface interface.
Return Value

The list of interfaces.

Discussion

Returns the physical interface for the specified VLAN interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceGetTag


CFNumberRef SCVLANInterfaceGetTag (
    SCVLANInterfaceRef vlan);  
Parameters
vlan
The SCVLANInterface interface.
Return Value

The tag.

Discussion

Returns the tag for the specified VLAN interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceRemove


Boolean SCVLANInterfaceRemove (
    SCVLANInterfaceRef vlan);  
Parameters
vlan
The SCVLANInterface interface.
Return Value

TRUE if the interface was removed; FALSE if an error was encountered.

Discussion

Removes the SCVLANInterface from the configuration.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceSetLocalizedDisplayName


Boolean SCVLANInterfaceSetLocalizedDisplayName (
    SCVLANInterfaceRef vlan, 
    CFStringRef newName);  
Parameters
vlan
The SCVLANInterface interface.
newName
The new display name.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Sets the localized display name for the specified VLAN interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceSetOptions


Boolean SCVLANInterfaceSetOptions (
    SCVLANInterfaceRef vlan, 
    CFDictionaryRef newOptions);  
Parameters
vlan
The SCVLANInterface interface.
newOptions
The new configuration settings.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Discussion

Sets the configuration settings for the specified VLAN interface.

Availability
Introduced in Mac OS X v10.5.

SCVLANInterfaceSetPhysicalInterfaceAndTag


Boolean SCVLANInterfaceSetPhysicalInterfaceAndTag (
    SCVLANInterfaceRef vlan, 
    SCNetworkInterfaceRef physical, 
    CFNumberRef tag);  
Parameters
vlan
The SCVLANInterface interface.
physical
The physical interface to associate with the VLAN.
tag
The tag to associate with the VLAN.
Return Value

TRUE if the configuration was stored; FALSE if an error was encountered.

Note: the tag must be in the range (1 <= tag <= 4094)

Discussion

Updates the specified VLAN interface.

Availability
Introduced in Mac OS X v10.5.

Constants


kSCBondStatusDeviceAggregationStatus


extern const CFStringRef kSCBondStatusDeviceAggregationStatus /* 
    CFNumber */;  

Availability
Introduced in Mac OS X v10.4.

kSCBondStatusDeviceCollecting


extern const CFStringRef kSCBondStatusDeviceCollecting /* CFNumber (0 or 1) */;  

Availability
Introduced in Mac OS X v10.4.

kSCBondStatusDeviceDistributing


extern const CFStringRef kSCBondStatusDeviceDistributing /* CFNumber (0 or 1) */;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceIPv4


extern const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4;  
Discussion

A network interface that can used for layering other interfaces (e.g. 6to4, PPTP, L2TP) over an existing IPv4 network.

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceType6to4


extern const CFStringRef kSCNetworkInterfaceType6to4;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeBluetooth


extern const CFStringRef kSCNetworkInterfaceTypeBluetooth;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeBond


extern const CFStringRef kSCNetworkInterfaceTypeBond;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeEthernet


extern const CFStringRef kSCNetworkInterfaceTypeEthernet;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeFireWire


extern const CFStringRef kSCNetworkInterfaceTypeFireWire;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeIEEE80211


extern const CFStringRef kSCNetworkInterfaceTypeIEEE80211;  // IEEE 802.11, AirPort 

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeIPv4


extern const CFStringRef kSCNetworkInterfaceTypeIPv4;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeIrDA


extern const CFStringRef kSCNetworkInterfaceTypeIrDA;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeL2TP


extern const CFStringRef kSCNetworkInterfaceTypeL2TP;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeModem


extern const CFStringRef kSCNetworkInterfaceTypeModem;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypePPP


extern const CFStringRef kSCNetworkInterfaceTypePPP;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypePPTP


extern const CFStringRef kSCNetworkInterfaceTypePPTP;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeSerial


extern const CFStringRef kSCNetworkInterfaceTypeSerial;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeVLAN


extern const CFStringRef kSCNetworkInterfaceTypeVLAN;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkInterfaceTypeWWAN


extern const CFStringRef kSCNetworkInterfaceTypeWWAN;  

Availability
Introduced in Mac OS X v10.5.

kSCNetworkProtocolTypeAppleTalk


extern const CFStringRef kSCNetworkProtocolTypeAppleTalk;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkProtocolTypeDNS


extern const CFStringRef kSCNetworkProtocolTypeDNS;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkProtocolTypeIPv4


extern const CFStringRef kSCNetworkProtocolTypeIPv4;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkProtocolTypeIPv6


extern const CFStringRef kSCNetworkProtocolTypeIPv6;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkProtocolTypeProxies


extern const CFStringRef kSCNetworkProtocolTypeProxies;  

Availability
Introduced in Mac OS X v10.4.

kSCNetworkProtocolTypeSMB


extern const CFStringRef kSCNetworkProtocolTypeSMB;  

Availability
Introduced in Mac OS X v10.5.

Typedefs


SCBondInterfaceRef


typedef SCNetworkInterfaceRef SCBondInterfaceRef;  
Discussion

This is the type of a reference to an object that represents an Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCBondStatusRef


typedef const struct __SCBondStatus * SCBondStatusRef;  
Discussion

This is the type of a reference to an object that represents the status of an Ethernet Bond interface.

Availability
Introduced in Mac OS X v10.5.

SCNetworkInterfaceRef


typedef const struct __SCNetworkInterface * SCNetworkInterfaceRef;  
Discussion

This is the type of a reference to an object that represents a network interface.

Availability
Introduced in Mac OS X v10.4.

SCNetworkProtocolRef


typedef const struct __SCNetworkProtocol * SCNetworkProtocolRef;  
Discussion

This is the type of a reference to an object that represents a network protocol.

Availability
Introduced in Mac OS X v10.4.

SCNetworkServiceRef


typedef const struct __SCNetworkService * SCNetworkServiceRef;  
Discussion

This is the type of a reference to an object that represents a network service.

Availability
Introduced in Mac OS X v10.4.

SCNetworkSetRef


typedef const struct __SCNetworkSet * SCNetworkSetRef;  
Discussion

This is the type of a reference to an object that represents a network set.

Availability
Introduced in Mac OS X v10.4.

SCVLANInterfaceRef


typedef SCNetworkInterfaceRef SCVLANInterfaceRef;  
Discussion

This is the type of a reference to an object that represents a Virtual LAN (VLAN) interface.

Availability
Introduced in Mac OS X v10.5.

Enumerations


Ethernet Bond Aggregation Status (kSCBondStatusDeviceAggregationStatus) codes


enum { 
    kSCBondStatusOK = 0, /* enabled, active, running, ... */
    kSCBondStatusLinkInvalid = 1, /* The link state was not valid (i.e. down, half-duplex, wrong speed) */
    kSCBondStatusNoPartner = 2, /* The port on the switch that the device is connected doesn't seem to have 802.3ad Link Aggregation enabled */
    kSCBondStatusNotInActiveGroup = 3, /* We're talking to a partner, but the link aggregation group is different from the one that's active */
    kSCBondStatusUnknown = 999 /* Non-specific failure */
};  
Constants
kSCBondStatusOK
Enabled, active, running, ...
kSCBondStatusLinkInvalid
The link state was not valid (i.e. down, half-duplex, wrong speed)
kSCBondStatusNoPartner
The port on the switch that the device is connected doesn't seem to have 802.3ad Link Aggregation enabled
kSCBondStatusNotInActiveGroup
We're talking to a partner, but the link aggregation group is different from the one that's active
kSCBondStatusUnknown
Non-specific failure
Discussion

Returned status codes.

Availability
Introduced in Mac OS X v10.4.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11