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> |
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.
configuration
- SCNetworkSetAddService
- SCNetworkSetContainsInterface
- SCNetworkSetCopy
- SCNetworkSetCopyAll
- SCNetworkSetCopyCurrent
- SCNetworkSetCopyServices
- SCNetworkSetCreate
- SCNetworkSetGetName
- SCNetworkSetGetServiceOrder
- SCNetworkSetGetSetID
- SCNetworkSetGetTypeID
- SCNetworkSetRef
- SCNetworkSetRemove
- SCNetworkSetRemoveService
- SCNetworkSetSetCurrent
- SCNetworkSetSetName
- SCNetworkSetSetServiceOrder
configuration
- SCNetworkServiceAddProtocolType
- SCNetworkServiceCopy
- SCNetworkServiceCopyAll
- SCNetworkServiceCopyProtocol
- SCNetworkServiceCopyProtocols
- SCNetworkServiceCreate
- SCNetworkServiceEstablishDefaultConfiguration
- SCNetworkServiceGetEnabled
- SCNetworkServiceGetInterface
- SCNetworkServiceGetName
- SCNetworkServiceGetServiceID
- SCNetworkServiceGetTypeID
- SCNetworkServiceRef
- SCNetworkServiceRemove
- SCNetworkServiceRemoveProtocolType
- SCNetworkServiceSetEnabled
- SCNetworkServiceSetName
configuration (VLAN)
- 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
configuration
- kSCNetworkProtocolTypeAppleTalk
- kSCNetworkProtocolTypeDNS
- kSCNetworkProtocolTypeIPv4
- kSCNetworkProtocolTypeIPv6
- kSCNetworkProtocolTypeProxies
- kSCNetworkProtocolTypeSMB
- SCNetworkProtocolGetConfiguration
- SCNetworkProtocolGetEnabled
- SCNetworkProtocolGetProtocolType
- SCNetworkProtocolGetTypeID
- SCNetworkProtocolRef
- SCNetworkProtocolSetConfiguration
- SCNetworkProtocolSetEnabled
SCBondInterfaceCopyAll |
CFArrayRef /* of SCBondInterfaceRef's */ SCBondInterfaceCopyAll ( SCPreferencesRef prefs);
prefs
The list of Ethernet Bond interfaces on the system. You must release the returned value.
Returns all Ethernet Bond interfaces on the system.
SCBondInterfaceCopyAvailableMemberInterfaces |
CFArrayRef /* of SCNetworkInterfaceRef's */ SCBondInterfaceCopyAvailableMemberInterfaces ( SCPreferencesRef prefs);
prefs
The list of interfaces. You must release the returned value.
Returns all network capable devices on the system that can be added to an Ethernet Bond interface.
SCBondInterfaceCopyStatus |
SCBondStatusRef SCBondInterfaceCopyStatus ( SCBondInterfaceRef bond);
bond
The status associated with the interface. You must release the returned value.
Returns the status of the specified Ethernet Bond interface.
SCBondInterfaceCreate |
SCBondInterfaceRef SCBondInterfaceCreate ( SCPreferencesRef prefs);
prefs
A reference to the new SCBondInterface. You must release the returned value.
Create a new SCBondInterface interface.
SCBondInterfaceGetMemberInterfaces |
CFArrayRef /* of SCNetworkInterfaceRef's */ SCBondInterfaceGetMemberInterfaces ( SCBondInterfaceRef bond);
bond
The list of interfaces.
Returns the member interfaces for the specified Ethernet Bond interface.
SCBondInterfaceGetOptions |
CFDictionaryRef SCBondInterfaceGetOptions ( SCBondInterfaceRef bond);
bond
The configuration settings associated with the Ethernet Bond interface; NULL if no changes to the default configuration have been saved.
Returns the configuration settings associated with a Ethernet Bond interface.
SCBondInterfaceRemove |
Boolean SCBondInterfaceRemove ( SCBondInterfaceRef bond);
bond
TRUE if the interface was removed; FALSE if an error was encountered.
Removes the SCBondInterface from the configuration.
SCBondInterfaceSetLocalizedDisplayName |
Boolean SCBondInterfaceSetLocalizedDisplayName ( SCBondInterfaceRef bond, CFStringRef newName);
bond
newName
TRUE if the configuration was stored; FALSE if an error was encountered.
Sets the localized display name for the specified Ethernet Bond interface.
SCBondInterfaceSetMemberInterfaces |
Boolean SCBondInterfaceSetMemberInterfaces ( SCBondInterfaceRef bond, CFArrayRef members) /* of SCNetworkInterfaceRef's */;
bond
members
TRUE if the configuration was stored; FALSE if an error was encountered.
Sets the member interfaces for the specified Ethernet Bond interface.
SCBondInterfaceSetOptions |
Boolean SCBondInterfaceSetOptions ( SCBondInterfaceRef bond, CFDictionaryRef newOptions);
bond
newOptions
TRUE if the configuration was stored; FALSE if an error was encountered.
Sets the configuration settings for the specified Ethernet Bond interface.
SCBondStatusGetInterfaceStatus |
CFDictionaryRef SCBondStatusGetInterfaceStatus ( SCBondStatusRef bondStatus, SCNetworkInterfaceRef interface);
bondStatus
interface
The interface status.
Returns the status of a specific member interface of an Ethernet Bond or the status of the bond as a whole.
SCBondStatusGetMemberInterfaces |
CFArrayRef /* of SCNetworkInterfaceRef's */ SCBondStatusGetMemberInterfaces ( SCBondStatusRef bondStatus);
bondStatus
The list of interfaces.
Returns the member interfaces that are represented with the Ethernet Bond interface.
SCBondStatusGetTypeID |
CFTypeID SCBondStatusGetTypeID ( void);
Returns the type identifier of all SCBondStatus instances.
SCNetworkInterfaceCopyAll |
CFArrayRef /* of SCNetworkInterfaceRef's */ SCNetworkInterfaceCopyAll ( void);
The list of interfaces on the system. You must release the returned value.
Returns all network capable interfaces on the system.
SCNetworkInterfaceCopyMediaOptions |
Boolean SCNetworkInterfaceCopyMediaOptions ( SCNetworkInterfaceRef interface, CFDictionaryRef *current, CFDictionaryRef *active, CFArrayRef *available, Boolean filter);
interface
current
active
available
filter
TRUE if requested information has been returned.
For the specified network interface, returns information about the currently requested media options, the active media options, and the media options which are available.
SCNetworkInterfaceCopyMediaSubTypeOptions |
CFArrayRef SCNetworkInterfaceCopyMediaSubTypeOptions ( CFArrayRef available, CFStringRef subType);
available
subType
An array of available media options. Each of the available options
is returned as an array of CFString's (e.g.
For the provided interface configuration options and specific subtype, return a list of available media options.
SCNetworkInterfaceCopyMediaSubTypes |
CFArrayRef SCNetworkInterfaceCopyMediaSubTypes ( CFArrayRef available);
available
An array of available media subtypes CFString's (e.g. 10BaseT/UTP, 100baseTX, etc). NULL if no subtypes are available.
For the provided interface configuration options, return a list of available media subtypes.
SCNetworkInterfaceCopyMTU |
Boolean SCNetworkInterfaceCopyMTU ( SCNetworkInterfaceRef interface, int *mtu_cur, int *mtu_min, int *mtu_max);
interface
mtu_cur
mtu_min
mtu_max
TRUE if requested information has been returned.
For the specified network interface, returns information about the currently MTU setting and the range of allowable values.
SCNetworkInterfaceCreateWithInterface |
SCNetworkInterfaceRef SCNetworkInterfaceCreateWithInterface ( SCNetworkInterfaceRef interface, CFStringRef interfaceType);
interface
interfaceType
A reference to the new SCNetworkInterface. You must release the returned value.
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".
SCNetworkInterfaceForceConfigurationRefresh |
Boolean SCNetworkInterfaceForceConfigurationRefresh ( SCNetworkInterfaceRef interface);
interface
Returns TRUE if the notification was sent; FALSE otherwise.
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
SCNetworkInterfaceGetBSDName |
CFStringRef SCNetworkInterfaceGetBSDName ( SCNetworkInterfaceRef interface);
interface
The BSD name associated with the interface (e.g. "en0"); NULL if no BSD name is available.
Returns the BSD interface (en0) or device name (modem) for the interface.
SCNetworkInterfaceGetConfiguration |
CFDictionaryRef SCNetworkInterfaceGetConfiguration ( SCNetworkInterfaceRef interface);
interface
The configuration settings associated with the interface; NULL if no configuration settings are associated with the interface or an error was encountered.
Returns the configuration settings associated with a interface.
SCNetworkInterfaceGetExtendedConfiguration |
CFDictionaryRef SCNetworkInterfaceGetExtendedConfiguration ( SCNetworkInterfaceRef interface, CFStringRef extendedType);
interface
extendedType
The configuration settings associated with the interface; NULL if no configuration settings are associated with the interface or an error was encountered.
Returns the configuration settings associated with a interface.
SCNetworkInterfaceGetHardwareAddressString |
CFStringRef SCNetworkInterfaceGetHardwareAddressString ( SCNetworkInterfaceRef interface);
interface
A string representing the hardware (MAC) address for the interface.
Returns a displayable link layer address for the interface.
SCNetworkInterfaceGetInterface |
SCNetworkInterfaceRef SCNetworkInterfaceGetInterface ( SCNetworkInterfaceRef interface);
interface
The underlying network interface; NULL if this is a leaf interface.
For layered network interfaces, return the underlying interface.
SCNetworkInterfaceGetInterfaceType |
CFStringRef SCNetworkInterfaceGetInterfaceType ( SCNetworkInterfaceRef interface);
interface
The interface type.
Returns the associated network interface type.
SCNetworkInterfaceGetLocalizedDisplayName |
CFStringRef SCNetworkInterfaceGetLocalizedDisplayName ( SCNetworkInterfaceRef interface);
interface
A localized, display name for the interface; NULL if no name is available.
Returns the localized name (e.g. "Ethernet", "FireWire") for the interface.
SCNetworkInterfaceGetSupportedInterfaceTypes |
CFArrayRef /* of kSCNetworkInterfaceTypeXXX CFStringRef's */ SCNetworkInterfaceGetSupportedInterfaceTypes ( SCNetworkInterfaceRef interface);
interface
The list of SCNetworkInterface types supported by the interface; NULL if no interface types are supported.
Identify all of the network interface types (e.g. PPP) that can be layered on top of this interface.
SCNetworkInterfaceGetSupportedProtocolTypes |
CFArrayRef /* of kSCNetworkProtocolTypeXXX CFStringRef's */ SCNetworkInterfaceGetSupportedProtocolTypes ( SCNetworkInterfaceRef interface);
interface
The list of SCNetworkProtocol types supported by the interface; NULL if no protocol types are supported.
Identify all of the network protocol types (e.g. IPv4, IPv6) that can be layered on top of this interface.
SCNetworkInterfaceGetTypeID |
CFTypeID SCNetworkInterfaceGetTypeID ( void);
Returns the type identifier of all SCNetworkInterface instances.
SCNetworkInterfaceSetConfiguration |
Boolean SCNetworkInterfaceSetConfiguration ( SCNetworkInterfaceRef interface, CFDictionaryRef config);
interface
config
TRUE if the configuration was stored; FALSE if an error was encountered.
Stores the configuration settings for the interface.
SCNetworkInterfaceSetExtendedConfiguration |
Boolean SCNetworkInterfaceSetExtendedConfiguration ( SCNetworkInterfaceRef interface, CFStringRef extendedType, CFDictionaryRef config);
interface
config
TRUE if the configuration was stored; FALSE if an error was encountered.
Stores the configuration settings for the interface.
SCNetworkInterfaceSetMediaOptions |
Boolean SCNetworkInterfaceSetMediaOptions ( SCNetworkInterfaceRef interface, CFStringRef subtype, CFArrayRef options);
interface
subtype
options
TRUE if the configuration was updated; FALSE if an error was encountered.
For the specified network interface, sets the requested media subtype and options.
SCNetworkInterfaceSetMTU |
Boolean SCNetworkInterfaceSetMTU ( SCNetworkInterfaceRef interface, int mtu);
interface
mtu
TRUE if the configuration was updated; FALSE if an error was encountered.
For the specified network interface, sets the requested MTU setting.
SCNetworkProtocolGetConfiguration |
CFDictionaryRef SCNetworkProtocolGetConfiguration ( SCNetworkProtocolRef protocol);
protocol
The configuration settings associated with the protocol; NULL if no configuration settings are associated with the protocol or an error was encountered.
Returns the configuration settings associated with the protocol.
SCNetworkProtocolGetEnabled |
Boolean SCNetworkProtocolGetEnabled ( SCNetworkProtocolRef protocol);
protocol
TRUE if the protocol is enabled.
Returns whether this protocol has been enabled.
SCNetworkProtocolGetProtocolType |
CFStringRef SCNetworkProtocolGetProtocolType ( SCNetworkProtocolRef protocol);
protocol
The protocol type.
Returns the associated network protocol type.
SCNetworkProtocolGetTypeID |
CFTypeID SCNetworkProtocolGetTypeID ( void);
Returns the type identifier of all SCNetworkProtocol instances.
SCNetworkProtocolSetConfiguration |
Boolean SCNetworkProtocolSetConfiguration ( SCNetworkProtocolRef protocol, CFDictionaryRef config);
protocol
config
TRUE if the configuration was stored; FALSE if an error was encountered.
Stores the configuration settings for the protocol.
SCNetworkProtocolSetEnabled |
Boolean SCNetworkProtocolSetEnabled ( SCNetworkProtocolRef protocol, Boolean enabled);
protocol
enabled
TRUE if the enabled status was saved; FALSE if an error was encountered.
Enables or disables the protocol.
SCNetworkServiceAddProtocolType |
Boolean SCNetworkServiceAddProtocolType ( SCNetworkServiceRef service, CFStringRef protocolType);
service
protocolType
TRUE if the protocol was added to the service; FALSE if the protocol was already present or an error was encountered.
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.
SCNetworkServiceCopy |
SCNetworkServiceRef SCNetworkServiceCopy ( SCPreferencesRef prefs, CFStringRef serviceID);
prefs
serviceID
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.
Returns the network service with the specified identifier.
SCNetworkServiceCopyAll |
CFArrayRef /* of SCNetworkServiceRef's */ SCNetworkServiceCopyAll ( SCPreferencesRef prefs);
prefs
The list of SCNetworkService services associated with the preferences. You must release the returned value.
Returns all available network services for the specified preferences.
SCNetworkServiceCopyProtocol |
SCNetworkProtocolRef SCNetworkServiceCopyProtocol ( SCNetworkServiceRef service, CFStringRef protocolType);
service
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.
Returns the network protocol of the specified type for the service.
SCNetworkServiceCopyProtocols |
CFArrayRef /* of SCNetworkProtocolRef's */ SCNetworkServiceCopyProtocols ( SCNetworkServiceRef service);
service
The list of SCNetworkProtocol protocols associated with the service. You must release the returned value.
Returns all network protocols associated with the service.
SCNetworkServiceCreate |
SCNetworkServiceRef SCNetworkServiceCreate ( SCPreferencesRef prefs, SCNetworkInterfaceRef interface);
prefs
A reference to the new SCNetworkService. You must release the returned value.
Create a new network service for the specified interface in the configuration.
SCNetworkServiceEstablishDefaultConfiguration |
Boolean SCNetworkServiceEstablishDefaultConfiguration ( SCNetworkServiceRef service);
service
TRUE if the configuration was updated; FALSE if an error was encountered.
Establishes the "default" configuration for a network service. This configuration includes the addition of network protocols for the service (with "default" configuration options).
SCNetworkServiceGetEnabled |
Boolean SCNetworkServiceGetEnabled ( SCNetworkServiceRef service);
service
TRUE if the service is enabled.
Returns whether this service has been enabled.
SCNetworkServiceGetInterface |
SCNetworkInterfaceRef SCNetworkServiceGetInterface ( SCNetworkServiceRef service);
service
A reference to the SCNetworkInterface associated with the service; NULL if an error was encountered.
Returns the network interface associated with the service.
SCNetworkServiceGetName |
CFStringRef SCNetworkServiceGetName ( SCNetworkServiceRef service);
service
The [user specified] name.
Returns the [user specified] name associated with the service.
SCNetworkServiceGetServiceID |
CFStringRef SCNetworkServiceGetServiceID ( SCNetworkServiceRef service);
service
The service identifier.
Returns the identifier for the service.
SCNetworkServiceGetTypeID |
CFTypeID SCNetworkServiceGetTypeID ( void);
Returns the type identifier of all SCNetworkService instances.
SCNetworkServiceRemove |
Boolean SCNetworkServiceRemove ( SCNetworkServiceRef service);
service
TRUE if the service was removed; FALSE if an error was encountered.
Removes the network service from the configuration.
SCNetworkServiceRemoveProtocolType |
Boolean SCNetworkServiceRemoveProtocolType ( SCNetworkServiceRef service, CFStringRef protocolType);
service
protocolType
TRUE if the protocol was removed to the service; FALSE if the protocol was not configured or an error was encountered.
Removes the network protocol of the specified type from the service.
SCNetworkServiceSetEnabled |
Boolean SCNetworkServiceSetEnabled ( SCNetworkServiceRef service, Boolean enabled);
service
enabled
TRUE if the enabled status was saved; FALSE if an error was encountered.
Enables or disables the service.
SCNetworkServiceSetName |
Boolean SCNetworkServiceSetName ( SCNetworkServiceRef service, CFStringRef name);
service
name
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.
Stores the [user specified] name for the service.
SCNetworkSetAddService |
Boolean SCNetworkSetAddService ( SCNetworkSetRef set, SCNetworkServiceRef service);
set
service
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.
Adds the network service to the set.
SCNetworkSetContainsInterface |
Boolean SCNetworkSetContainsInterface ( SCNetworkSetRef set, SCNetworkInterfaceRef interface);
set
interface
TRUE if the interface is represented in the set; FALSE if not.
Checks if an interface is represented by at least one network service in the specified set.
SCNetworkSetCopy |
SCNetworkSetRef SCNetworkSetCopy ( SCPreferencesRef prefs, CFStringRef setID);
prefs
setID
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.
Returns the set with the specified identifier.
SCNetworkSetCopyAll |
CFArrayRef /* of SCNetworkSetRef's */ SCNetworkSetCopyAll ( SCPreferencesRef prefs);
prefs
The list of SCNetworkSet sets associated with the preferences. You must release the returned value.
Returns all available sets for the specified preferences.
SCNetworkSetCopyCurrent |
SCNetworkSetRef SCNetworkSetCopyCurrent ( SCPreferencesRef prefs);
prefs
The current set; NULL if no current set has been defined.
Returns the "current" set.
SCNetworkSetCopyServices |
CFArrayRef /* of SCNetworkServiceRef's */ SCNetworkSetCopyServices ( SCNetworkSetRef set);
set
The list of SCNetworkService services associated with the set. You must release the returned value.
Returns all network services associated with the set.
SCNetworkSetCreate |
SCNetworkSetRef SCNetworkSetCreate ( SCPreferencesRef prefs);
prefs
A reference to the new SCNetworkSet. You must release the returned value.
Create a new set in the configuration.
SCNetworkSetGetName |
CFStringRef SCNetworkSetGetName ( SCNetworkSetRef set);
set
The [user specified] name.
Returns the [user specified] name associated with the set.
SCNetworkSetGetServiceOrder |
CFArrayRef /* of serviceID CFStringRef's */ SCNetworkSetGetServiceOrder ( SCNetworkSetRef set);
set
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.
Returns the [user specified] ordering of network services within the set.
SCNetworkSetGetSetID |
CFStringRef SCNetworkSetGetSetID ( SCNetworkSetRef set);
set
The set identifier.
Returns the identifier for the set.
SCNetworkSetGetTypeID |
CFTypeID SCNetworkSetGetTypeID ( void);
Returns the type identifier of all SCNetworkSet instances.
SCNetworkSetRemove |
Boolean SCNetworkSetRemove ( SCNetworkSetRef set);
set
TRUE if the set was removed; FALSE if an error was encountered.
Removes the set from the configuration.
SCNetworkSetRemoveService |
Boolean SCNetworkSetRemoveService ( SCNetworkSetRef set, SCNetworkServiceRef service);
set
service
TRUE if the service was removed from the set; FALSE if the service was not already present or an error was encountered.
Removes the network service from the set.
SCNetworkSetSetCurrent |
Boolean SCNetworkSetSetCurrent ( SCNetworkSetRef set);
set
TRUE if the current set was updated; FALSE if an error was encountered.
Specifies the set that should be the "current" set.
SCNetworkSetSetName |
Boolean SCNetworkSetSetName ( SCNetworkSetRef set, CFStringRef name);
set
name
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.
Stores the [user specified] name for the set.
SCNetworkSetSetServiceOrder |
Boolean SCNetworkSetSetServiceOrder ( SCNetworkSetRef set, CFArrayRef newOrder); /* serviceID CFStringRef's */
set
newOrder
TRUE if the new service order was saved; FALSE if an error was encountered.
Stores the [user specified] ordering of network services for the set.
SCVLANInterfaceCopyAll |
CFArrayRef /* of SCVLANInterfaceRef's */ SCVLANInterfaceCopyAll ( SCPreferencesRef prefs);
The list of VLAN interfaces on the system. You must release the returned value.
Returns all VLAN interfaces on the system.
SCVLANInterfaceCopyAvailablePhysicalInterfaces |
CFArrayRef /* of SCNetworkInterfaceRef's */ SCVLANInterfaceCopyAvailablePhysicalInterfaces ( void);
The list of interfaces. You must release the returned value.
Returns the network capable devices on the system that can be associated with a VLAN interface.
SCVLANInterfaceCreate |
SCVLANInterfaceRef SCVLANInterfaceCreate ( SCPreferencesRef prefs, SCNetworkInterfaceRef physical, CFNumberRef tag);
prefs
physical
tag
A reference to the new SCVLANInterface.
You must release the returned value.
Note: the tag must be in the range (1 <= tag <= 4094)
Create a new SCVLANInterface interface.
SCVLANInterfaceGetOptions |
CFDictionaryRef SCVLANInterfaceGetOptions ( SCVLANInterfaceRef vlan);
vlan
The configuration settings associated with the VLAN interface; NULL if no changes to the default configuration have been saved.
Returns the configuration settings associated with the VLAN interface.
SCVLANInterfaceGetPhysicalInterface |
SCNetworkInterfaceRef SCVLANInterfaceGetPhysicalInterface ( SCVLANInterfaceRef vlan);
vlan
The list of interfaces.
Returns the physical interface for the specified VLAN interface.
SCVLANInterfaceGetTag |
CFNumberRef SCVLANInterfaceGetTag ( SCVLANInterfaceRef vlan);
vlan
The tag.
Returns the tag for the specified VLAN interface.
SCVLANInterfaceRemove |
Boolean SCVLANInterfaceRemove ( SCVLANInterfaceRef vlan);
vlan
TRUE if the interface was removed; FALSE if an error was encountered.
Removes the SCVLANInterface from the configuration.
SCVLANInterfaceSetLocalizedDisplayName |
Boolean SCVLANInterfaceSetLocalizedDisplayName ( SCVLANInterfaceRef vlan, CFStringRef newName);
vlan
newName
TRUE if the configuration was stored; FALSE if an error was encountered.
Sets the localized display name for the specified VLAN interface.
SCVLANInterfaceSetOptions |
Boolean SCVLANInterfaceSetOptions ( SCVLANInterfaceRef vlan, CFDictionaryRef newOptions);
vlan
newOptions
TRUE if the configuration was stored; FALSE if an error was encountered.
Sets the configuration settings for the specified VLAN interface.
SCVLANInterfaceSetPhysicalInterfaceAndTag |
Boolean SCVLANInterfaceSetPhysicalInterfaceAndTag ( SCVLANInterfaceRef vlan, SCNetworkInterfaceRef physical, CFNumberRef tag);
vlan
physical
tag
TRUE if the configuration was stored; FALSE if an error was encountered.
Note: the tag must be in the range (1 <= tag <= 4094)
Updates the specified VLAN interface.
kSCBondStatusDeviceAggregationStatus |
extern const CFStringRef kSCBondStatusDeviceAggregationStatus /* CFNumber */;
kSCBondStatusDeviceCollecting |
extern const CFStringRef kSCBondStatusDeviceCollecting /* CFNumber (0 or 1) */;
kSCBondStatusDeviceDistributing |
extern const CFStringRef kSCBondStatusDeviceDistributing /* CFNumber (0 or 1) */;
kSCNetworkInterfaceIPv4 |
extern const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4;
A network interface that can used for layering other interfaces (e.g. 6to4, PPTP, L2TP) over an existing IPv4 network.
kSCNetworkInterfaceType6to4 |
extern const CFStringRef kSCNetworkInterfaceType6to4;
kSCNetworkInterfaceTypeBluetooth |
extern const CFStringRef kSCNetworkInterfaceTypeBluetooth;
kSCNetworkInterfaceTypeBond |
extern const CFStringRef kSCNetworkInterfaceTypeBond;
kSCNetworkInterfaceTypeEthernet |
extern const CFStringRef kSCNetworkInterfaceTypeEthernet;
kSCNetworkInterfaceTypeFireWire |
extern const CFStringRef kSCNetworkInterfaceTypeFireWire;
kSCNetworkInterfaceTypeIEEE80211 |
extern const CFStringRef kSCNetworkInterfaceTypeIEEE80211; // IEEE 802.11, AirPort
kSCNetworkInterfaceTypeIPv4 |
extern const CFStringRef kSCNetworkInterfaceTypeIPv4;
kSCNetworkInterfaceTypeIrDA |
extern const CFStringRef kSCNetworkInterfaceTypeIrDA;
kSCNetworkInterfaceTypeL2TP |
extern const CFStringRef kSCNetworkInterfaceTypeL2TP;
kSCNetworkInterfaceTypeModem |
extern const CFStringRef kSCNetworkInterfaceTypeModem;
kSCNetworkInterfaceTypePPP |
extern const CFStringRef kSCNetworkInterfaceTypePPP;
kSCNetworkInterfaceTypePPTP |
extern const CFStringRef kSCNetworkInterfaceTypePPTP;
kSCNetworkInterfaceTypeSerial |
extern const CFStringRef kSCNetworkInterfaceTypeSerial;
kSCNetworkInterfaceTypeVLAN |
extern const CFStringRef kSCNetworkInterfaceTypeVLAN;
kSCNetworkInterfaceTypeWWAN |
extern const CFStringRef kSCNetworkInterfaceTypeWWAN;
kSCNetworkProtocolTypeAppleTalk |
extern const CFStringRef kSCNetworkProtocolTypeAppleTalk;
kSCNetworkProtocolTypeDNS |
extern const CFStringRef kSCNetworkProtocolTypeDNS;
kSCNetworkProtocolTypeIPv4 |
extern const CFStringRef kSCNetworkProtocolTypeIPv4;
kSCNetworkProtocolTypeIPv6 |
extern const CFStringRef kSCNetworkProtocolTypeIPv6;
kSCNetworkProtocolTypeProxies |
extern const CFStringRef kSCNetworkProtocolTypeProxies;
kSCNetworkProtocolTypeSMB |
extern const CFStringRef kSCNetworkProtocolTypeSMB;
SCBondInterfaceRef |
typedef SCNetworkInterfaceRef SCBondInterfaceRef;
This is the type of a reference to an object that represents an Ethernet Bond interface.
SCBondStatusRef |
typedef const struct __SCBondStatus * SCBondStatusRef;
This is the type of a reference to an object that represents the status of an Ethernet Bond interface.
SCNetworkInterfaceRef |
typedef const struct __SCNetworkInterface * SCNetworkInterfaceRef;
This is the type of a reference to an object that represents a network interface.
SCNetworkProtocolRef |
typedef const struct __SCNetworkProtocol * SCNetworkProtocolRef;
This is the type of a reference to an object that represents a network protocol.
SCNetworkServiceRef |
typedef const struct __SCNetworkService * SCNetworkServiceRef;
This is the type of a reference to an object that represents a network service.
SCNetworkSetRef |
typedef const struct __SCNetworkSet * SCNetworkSetRef;
This is the type of a reference to an object that represents a network set.
SCVLANInterfaceRef |
typedef SCNetworkInterfaceRef SCVLANInterfaceRef;
This is the type of a reference to an object that represents a Virtual LAN (VLAN) interface.
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 */ };
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
Returned status codes.
|