SCNetworkConfiguration

Overview

The SCNetworkConfiguration programming interface 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. A function that has "Create" or "Copy" in its name returns a reference you must release with the CFRelease function.

Note that when using the functions in this programming interface, you must call the SCPreferencesCommitChanges function to ensure that your changes are committed to permanent storage.

Topics

Configuring Ethernet Bond Interfaces

SCBondInterfaceCopyAll

Returns all Ethernet bond interfaces on the system.

SCBondInterfaceCopyAvailableMemberInterfaces

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

SCBondInterfaceCopyStatus

Returns the status of the specified Ethernet bond interface.

SCBondInterfaceCreate

Creates a new Ethernet bond interface.

SCBondInterfaceGetMemberInterfaces

Returns the member interfaces for the specified Ethernet bond interface.

SCBondInterfaceGetOptions

Returns the configuration settings associated with the specified Ethernet bond interface.

SCBondInterfaceRemove

Removes the Ethernet bond interface from the configuration.

SCBondInterfaceSetLocalizedDisplayName

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

SCBondInterfaceSetMemberInterfaces

Sets the member interfaces for the specified Ethernet bond interface.

SCBondInterfaceSetOptions

Sets the configuration settings for the specified Ethernet bond interface.

SCBondStatusGetInterfaceStatus

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

SCBondStatusGetMemberInterfaces

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

SCBondStatusGetTypeID

Returns the type identifier of all SCBondStatusRef instances.

Configuring Network Interfaces

SCNetworkInterfaceCopyAll

Returns all network-capable interfaces on the system.

SCNetworkInterfaceCopyMTU

Returns the current MTU setting and the range of allowable values for the specified network interface.

SCNetworkInterfaceCopyMediaOptions

Returns information media options for the specified network interface.

SCNetworkInterfaceCopyMediaSubTypeOptions

Returns a list of available media options for the specified interface configuration options and subtype.

SCNetworkInterfaceCopyMediaSubTypes

Returns a list of available media subtypes for the specified interface configuration options.

SCNetworkInterfaceCreateWithInterface

Creates a new network interface layered on top of the specified interface.

SCNetworkInterfaceForceConfigurationRefresh

Sends a notification to interested network configuration agents to immediately retry their configuration.

SCNetworkInterfaceGetBSDName

Returns the BSD interface or device name for the specified interface.

SCNetworkInterfaceGetConfiguration

Returns the configuration settings associated with the specified interface.

SCNetworkInterfaceGetExtendedConfiguration

Returns the extended configuration settings associated with the specified interface.

SCNetworkInterfaceGetHardwareAddressString

Returns a displayable link layer address for the specified interface.

SCNetworkInterfaceGetInterface

Returns the underlying interface, for layered network interfaces.

SCNetworkInterfaceGetInterfaceType

Returns the network interface type of the specified interface.

SCNetworkInterfaceGetLocalizedDisplayName

Returns the localized display name, such as “Ethernet” or “FireWire", for the specified interface.

SCNetworkInterfaceGetSupportedInterfaceTypes

Identifies all of the network interface types, such as PPP, that can be layered on top of the specified interface.

SCNetworkInterfaceGetSupportedProtocolTypes

Identifies all of the network protocol types, such as IPv4 and IPv6, that can be layered on top of the specified interface.

SCNetworkInterfaceGetTypeID

Returns the type identifier of all SCNetworkInterface instances.

SCNetworkInterfaceSetConfiguration

Stores the configuration settings for the specified interface.

SCNetworkInterfaceSetExtendedConfiguration

Stores the extended configuration settings for the specified interface.

SCNetworkInterfaceSetMTU

Sets the requested MTU setting for the specified network interface.

SCNetworkInterfaceSetMediaOptions

Sets the requested media subtype and options for the specified network interface.

Configuring Network Protocols

SCNetworkProtocolGetConfiguration

Returns the configuration settings associated with the specified protocol.

SCNetworkProtocolGetEnabled

Returns a Boolean value indicating whether the specified protocol is enabled.

SCNetworkProtocolGetProtocolType

Returns the type of the specified network protocol.

SCNetworkProtocolGetTypeID

Returns the type identifier of all SCNetworkProtocol instances.

SCNetworkProtocolSetConfiguration

Stores the configuration settings for the specified network protocol.

SCNetworkProtocolSetEnabled

Enables or disables the specified protocol.

Configuring Network Services

SCNetworkServiceAddProtocolType

Adds the network protocol of the specified type to the specified service.

SCNetworkServiceCopy

Returns the network service with the specified identifier.

SCNetworkServiceCopyAll

Returns all available network services for the specified preferences.

SCNetworkServiceCopyProtocol

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

SCNetworkServiceCopyProtocols

Returns all network protocols associated with the specified service.

SCNetworkServiceCreate

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

SCNetworkServiceEstablishDefaultConfiguration

Establishes the default configuration for the specified network service.

SCNetworkServiceGetEnabled

Returns a Boolean value indicating whether the specified service is enabled.

SCNetworkServiceGetInterface

Returns the network interface associated with the specified service.

SCNetworkServiceGetName

Returns the user-specified name associated with the specified service.

SCNetworkServiceGetServiceID

Returns the identifier for the specified service.

SCNetworkServiceGetTypeID

Returns the type identifier of all SCNetworkService instances.

SCNetworkServiceRemove

Removes the specified network service from the configuration.

SCNetworkServiceRemoveProtocolType

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

SCNetworkServiceSetEnabled

Enables or disables the specified service.

SCNetworkServiceSetName

Stores the user-specified name for the specified service.

Configuring Network Sets

SCNetworkSetAddService

Adds the specified network service to the specified set.

SCNetworkSetContainsInterface

Returns a Boolean value indicating whether the specified interface is represented by at least one network service in the specified set.

SCNetworkSetCopy

Returns the set with the specified identifier.

SCNetworkSetCopyAll

Returns all available sets for the specified preferences session.

SCNetworkSetCopyCurrent

Returns the current set.

SCNetworkSetCopyServices

Returns all network services associated with the specified set.

SCNetworkSetCreate

Creates a new set in the configuration.

SCNetworkSetGetName

Returns the user-specified name associated with the specified set.

SCNetworkSetGetServiceOrder

Returns the user-specified ordering of network services within the specified set.

SCNetworkSetGetSetID

Returns the identifier for the specified set.

SCNetworkSetGetTypeID

Returns the type identifier of all SCNetworkSet instances.

SCNetworkSetRemove

Removes the specified set from the configuration.

SCNetworkSetRemoveService

Removes the specified network service from the specified set.

SCNetworkSetSetCurrent

Specifies the set that should be the current set.

SCNetworkSetSetName

Stores the user-specified name for the specified set.

SCNetworkSetSetServiceOrder

Stores the user-specified ordering of network services for the specified set.

Configuring VLAN Interfaces

SCVLANInterfaceCopyAll

Returns all virtual LAN (VLAN) interfaces on the system.

SCVLANInterfaceCopyAvailablePhysicalInterfaces

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

SCVLANInterfaceCreate

Creates a new virtual LAN (VLAN) interface.

SCVLANInterfaceGetOptions

Returns the configuration settings associated with the virtual LAN (VLAN) interface.

SCVLANInterfaceGetPhysicalInterface

Returns the physical interface for the specified virtual LAN (VLAN) interface.

SCVLANInterfaceGetTag

Returns the tag for the specified virtual LAN (VLAN) interface.

SCVLANInterfaceRemove

Removes the virtual LAN (VLAN) interface from the configuration.

SCVLANInterfaceSetLocalizedDisplayName

Sets the localized display name for the specified virtual LAN (VLAN) interface.

SCVLANInterfaceSetOptions

Sets the specified configuration settings for the specified virtual LAN (VLAN) interface.

SCVLANInterfaceSetPhysicalInterfaceAndTag

Updates the specified virtual LAN (VLAN) interface with the specified information.

Data Types

SCNetworkInterfaceRef

The reference to an object that represents a network interface.

SCBondInterfaceRef

The reference to an object that represents an Ethernet bond interface.

SCBondStatusRef

The reference to an object that represents the status of an Ethernet bond interface.

SCVLANInterfaceRef

The reference to an object that represents a virtual LAN (VLAN) interface.

SCNetworkProtocolRef

The reference to an object that represents a network protocol.

SCNetworkServiceRef

The reference to an object that represents a network service.

SCNetworkSetRef

The reference to an object that represents a network set.

Constants

Ethernet Bond Aggregation Status

Ethernet bond aggregation status codes.

Network Interface Types

Keys that identify network interface types.

Network Protocol Types

Keys that identify network protocol types.