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

 


SCDynamicStoreKey

Includes:
<sys/cdefs.h>
<CoreFoundation/CoreFoundation.h>

Overview

The SCDynamicStoreKey API provides convenience functions that an application can use to create a correctly formatted dynamic store key for accessing specific items in the dynamic store. An application can then use the resulting string in any function that requires a dynamic store key.



Functions

SCDynamicStoreKeyCreate
SCDynamicStoreKeyCreateComputerName
SCDynamicStoreKeyCreateConsoleUser
SCDynamicStoreKeyCreateHostNames
SCDynamicStoreKeyCreateLocation
SCDynamicStoreKeyCreateNetworkGlobalEntity
SCDynamicStoreKeyCreateNetworkInterface
SCDynamicStoreKeyCreateNetworkInterfaceEntity
SCDynamicStoreKeyCreateNetworkServiceEntity
SCDynamicStoreKeyCreateProxies

SCDynamicStoreKeyCreate


CFStringRef SCDynamicStoreKeyCreate ( 
    CFAllocatorRef allocator, 
    CFStringRef fmt, 
    ... );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
fmt
A CFStringRef describing the format for this key.
Return Value

Returns a string containing the formatted key.

Discussion

Creates a dynamic store key using the given format.


SCDynamicStoreKeyCreateComputerName


CFStringRef SCDynamicStoreKeyCreateComputerName ( 
    CFAllocatorRef allocator );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Return Value

Returns a notification string for the current computer or host name.

Discussion

Creates a key that can be used in conjuntion with SCDynamicStoreSetNotificationKeys function to receive notifications when the current computer name changes.


SCDynamicStoreKeyCreateConsoleUser


CFStringRef SCDynamicStoreKeyCreateConsoleUser ( 
    CFAllocatorRef allocator );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Return Value

Returns a notification string for the current console user.

Discussion

Creates a key that can be used in conjunction with SCDynamicStoreSetNotificationKeys function to receive notifications when the current console user changes.


SCDynamicStoreKeyCreateHostNames


CFStringRef SCDynamicStoreKeyCreateHostNames ( 
    CFAllocatorRef allocator );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Return Value

Returns a notification string for the HostNames entity.

Discussion

Creates a key that can be used in conjunction with the SCDynamicStoreSetNotificationKeys function to receive notifications when the HostNames entity changes. The HostNames entity includes the local host name.


SCDynamicStoreKeyCreateLocation


CFStringRef SCDynamicStoreKeyCreateLocation ( 
    CFAllocatorRef allocator );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Return Value

Returns a notification string for the current location identifier.

Discussion

Creates a key that can be used in conjunction with the SCDynamicStoreSetNotificationKeys function to receive notifications when the location identifier changes.


SCDynamicStoreKeyCreateNetworkGlobalEntity


CFStringRef SCDynamicStoreKeyCreateNetworkGlobalEntity ( 
    CFAllocatorRef allocator, 
    CFStringRef domain, 
    CFStringRef entity );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
domain
A string specifying the desired domain, such as the requested configuration (kSCDynamicStoreDomainSetup) or the actual state (kSCDynamicStoreDomainState).
entity
A string containing the specific global entity, such as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
Return Value

Returns a string containing the formatted key.

Discussion

Creates a dynamic store key that can be used to access a specific global (as opposed to a per-service or per-interface) network configuration entity.


SCDynamicStoreKeyCreateNetworkInterface


CFStringRef SCDynamicStoreKeyCreateNetworkInterface ( 
    CFAllocatorRef allocator, 
    CFStringRef domain );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
domain
A string specifying the desired domain, such as the requested configuration (kSCDynamicStoreDomainSetup) or the actual state (kSCDynamicStoreDomainState).
Return Value

Returns a string containing the formatted key.

Discussion

Creates a dynamic store key that can be used to access the network interface configuration information stored in the dynamic store.


SCDynamicStoreKeyCreateNetworkInterfaceEntity


CFStringRef SCDynamicStoreKeyCreateNetworkInterfaceEntity ( 
    CFAllocatorRef allocator, 
    CFStringRef domain, 
    CFStringRef ifname, 
    CFStringRef entity );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
domain
A string specifying the desired domain, such as the requested configuration (kSCDynamicStoreDomainSetup) or the actual state (kSCDynamicStoreDomainState).
ifname
A string containing the interface name or a regular expression pattern.
entity
A string containing the specific global entity, such as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
Return Value

Returns a string containing the formatted key.

Discussion

Creates a dynamic store key that can be used to access the per-interface network configuration information stored in the dynamic store.


SCDynamicStoreKeyCreateNetworkServiceEntity


CFStringRef SCDynamicStoreKeyCreateNetworkServiceEntity ( 
    CFAllocatorRef allocator, 
    CFStringRef domain, 
    CFStringRef serviceID, 
    CFStringRef entity );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
domain
A string specifying the desired domain, such as the requested configuration (kSCDynamicStoreDomainSetup) or the actual state (kSCDynamicStoreDomainState).
serviceID
A string containing the service ID or a regular expression pattern.
entity
A string containing the specific global entity, such as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
Return Value

Returns a string containing the formatted key.



Discussion

Creates a dynamic store key that can be used to access the per-service network configuration information stored in the dynamic store.


SCDynamicStoreKeyCreateProxies


CFStringRef SCDynamicStoreKeyCreateProxies ( 
    CFAllocatorRef allocator );  
Parameters
allocator
The CFAllocator that should be used to allocate memory for this key. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Return Value

Returns a notification string for the current proxy settings.

Discussion

Creates a key that can be used in conjunction with the SCDynamicStoreSetNotificationKeys function to receive notifications when the current network proxy settings (such as HTTP or FTP) are changed.


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