Package apple.systemconfiguration.c
Class SystemConfiguration
- java.lang.Object
-
- apple.systemconfiguration.c.SystemConfiguration
-
public final class SystemConfiguration extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSystemConfiguration.Function_SCNetworkReachabilitySetCallback
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static @Nullable CFDictionaryRefCNCopyCurrentNetworkInfo(@NotNull CFStringRef interfaceName)Deprecated.static @Nullable CFArrayRefCNCopySupportedInterfaces()[@function] CNCopySupportedInterfaces copies a list of all interfaces CaptiveNetworkSupport is monitoring.static byteCNMarkPortalOffline(@NotNull CFStringRef interfaceName)Deprecated.static byteCNMarkPortalOnline(@NotNull CFStringRef interfaceName)Deprecated.static byteCNSetSupportedSSIDs(@NotNull CFArrayRef ssidArray)Deprecated.static @NotNull CFStringRefkCFErrorDomainSystemConfiguration()[@const] kCFErrorDomainSystemConfiguration CFError domain associated with errors reported by the SystemConfiguration.framework.static @NotNull CFStringRefkCNNetworkInfoKeyBSSID()[@constant] kCNNetworkInfoKeyBSSID NetworkInfo Dictionary key for BSSID in CFString format API-Since: 4.1static @NotNull CFStringRefkCNNetworkInfoKeySSID()[@constant] kCNNetworkInfoKeySSID NetworkInfo Dictionary key for SSID in CFString format API-Since: 4.1static @NotNull CFStringRefkCNNetworkInfoKeySSIDData()[@constant] kCNNetworkInfoKeySSIDData NetworkInfo Dictionary key for SSID in CFData format API-Since: 4.1static @NotNull CFErrorRefSCCopyLastError()[@function] SCCopyLastError Returns the most recent status or error code generated as the result of calling a System Configuration framework API.static intSCError()[@function] SCError Returns the most recent status or error code generated as the result of calling a System Configuration framework API.static @NotNull java.lang.StringSCErrorString(int status)[@function] SCErrorString Returns a pointer to the message string associated with the specified status or error number.static @Nullable SCNetworkReachabilityRefSCNetworkReachabilityCreateWithAddress(@Nullable CFAllocatorRef allocator, @NotNull sockaddr address)[@function] SCNetworkReachabilityCreateWithAddress Creates a reference to the specified network address.static @Nullable SCNetworkReachabilityRefSCNetworkReachabilityCreateWithAddressPair(@Nullable CFAllocatorRef allocator, @Nullable sockaddr localAddress, @Nullable sockaddr remoteAddress)[@function] SCNetworkReachabilityCreateWithAddressPair Creates a reference to the specified network address.static @Nullable SCNetworkReachabilityRefSCNetworkReachabilityCreateWithName(@Nullable CFAllocatorRef allocator, @NotNull java.lang.String nodename)[@function] SCNetworkReachabilityCreateWithName Creates a reference to the specified network host or node name.static byteSCNetworkReachabilityGetFlags(@NotNull SCNetworkReachabilityRef target, @NotNull org.moe.natj.general.ptr.IntPtr flags)[@function] SCNetworkReachabilityGetFlags Determines if the given target is reachable using the current network configuration.static longSCNetworkReachabilityGetTypeID()[@function] SCNetworkReachabilityGetTypeID Returns the type identifier of all SCNetworkReachability instances.static byteSCNetworkReachabilityScheduleWithRunLoop(@NotNull SCNetworkReachabilityRef target, @NotNull CFRunLoopRef runLoop, @NotNull CFStringRef runLoopMode)[@function] SCNetworkReachabilityScheduleWithRunLoop Schedules the given target with the given run loop and mode.static byteSCNetworkReachabilitySetCallback(@NotNull SCNetworkReachabilityRef target, @Nullable SystemConfiguration.Function_SCNetworkReachabilitySetCallback callout, @Nullable SCNetworkReachabilityContext context)[@function] SCNetworkReachabilitySetCallback Assigns a client to a target, which receives callbacks when the reachability of the target changes.static byteSCNetworkReachabilitySetDispatchQueue(@NotNull SCNetworkReachabilityRef target, @Nullable dispatch_queue_t queue)[@function] SCNetworkReachabilitySetDispatchQueue Schedule or unschedule callbacks for the given target on the given dispatch queue.static byteSCNetworkReachabilityUnscheduleFromRunLoop(@NotNull SCNetworkReachabilityRef target, @NotNull CFRunLoopRef runLoop, @NotNull CFStringRef runLoopMode)[@function] SCNetworkReachabilityUnscheduleFromRunLoop Unschedules the given target from the given run loop and mode.
-
-
-
Method Detail
-
SCNetworkReachabilityCreateWithAddress
@Nullable public static @Nullable SCNetworkReachabilityRef SCNetworkReachabilityCreateWithAddress(@Nullable @Nullable CFAllocatorRef allocator, @NotNull @NotNull sockaddr address)
[@function] SCNetworkReachabilityCreateWithAddress Creates a reference to the specified network address. This reference can be used later to monitor the reachability of the target host.- Parameters:
address- The address of the desired host.- Returns:
- Returns a reference to the new immutable SCNetworkReachabilityRef. You must release the returned value. API-Since: 2.0
-
SCNetworkReachabilityCreateWithAddressPair
@Nullable public static @Nullable SCNetworkReachabilityRef SCNetworkReachabilityCreateWithAddressPair(@Nullable @Nullable CFAllocatorRef allocator, @Nullable @Nullable sockaddr localAddress, @Nullable @Nullable sockaddr remoteAddress)
[@function] SCNetworkReachabilityCreateWithAddressPair Creates a reference to the specified network address. This reference can be used later to monitor the reachability of the target host.- Parameters:
localAddress- The local address associated with a network connection. If NULL, only the remote address is of interest.remoteAddress- The remote address associated with a network connection. If NULL, only the local address is of interest.- Returns:
- Returns a reference to the new immutable SCNetworkReachabilityRef. You must release the returned value. API-Since: 2.0
-
SCNetworkReachabilityCreateWithName
@Nullable public static @Nullable SCNetworkReachabilityRef SCNetworkReachabilityCreateWithName(@Nullable @Nullable CFAllocatorRef allocator, @NotNull @NotNull java.lang.String nodename)
[@function] SCNetworkReachabilityCreateWithName Creates a reference to the specified network host or node name. This reference can be used later to monitor the reachability of the target host.- Parameters:
nodename- The node name of the desired host. This name would be the same as that passed to the gethostbyname(3) or getaddrinfo(3) functions.- Returns:
- Returns a reference to the new immutable SCNetworkReachabilityRef. You must release the returned value. API-Since: 2.0
-
SCNetworkReachabilityGetTypeID
public static long SCNetworkReachabilityGetTypeID()
[@function] SCNetworkReachabilityGetTypeID Returns the type identifier of all SCNetworkReachability instances. API-Since: 2.0
-
SCNetworkReachabilityGetFlags
public static byte SCNetworkReachabilityGetFlags(@NotNull @NotNull SCNetworkReachabilityRef target, @NotNull @NotNull org.moe.natj.general.ptr.IntPtr flags)[@function] SCNetworkReachabilityGetFlags Determines if the given target is reachable using the current network configuration.- Parameters:
target- The network reference associated with the address or name to be checked for reachability.flags- A pointer to memory that will be filled with the SCNetworkReachabilityFlags detailing the reachability of the specified target.- Returns:
- Returns TRUE if the network connection flags are valid; FALSE if the status could not be determined. API-Since: 2.0
-
SCNetworkReachabilitySetCallback
public static byte SCNetworkReachabilitySetCallback(@NotNull @NotNull SCNetworkReachabilityRef target, @Nullable @Nullable SystemConfiguration.Function_SCNetworkReachabilitySetCallback callout, @Nullable @Nullable SCNetworkReachabilityContext context)[@function] SCNetworkReachabilitySetCallback Assigns a client to a target, which receives callbacks when the reachability of the target changes.- Parameters:
target- The network reference associated with the address or name to be checked for reachability.callout- The function to be called when the reachability of the target changes. If NULL, the current client for the target is removed.context- The SCNetworkReachabilityContext associated with the callout. The value may be NULL.- Returns:
- Returns TRUE if the notification client was successfully set. API-Since: 2.0
-
SCNetworkReachabilityScheduleWithRunLoop
public static byte SCNetworkReachabilityScheduleWithRunLoop(@NotNull @NotNull SCNetworkReachabilityRef target, @NotNull @NotNull CFRunLoopRef runLoop, @NotNull @NotNull CFStringRef runLoopMode)[@function] SCNetworkReachabilityScheduleWithRunLoop Schedules the given target with the given run loop and mode.- Parameters:
target- The address or name that is set up for asynchronous notifications. Must be non-NULL.runLoop- A reference to a run loop on which the target should be scheduled. Must be non-NULL.runLoopMode- The mode on which to schedule the target. Must be non-NULL.- Returns:
- Returns TRUE if the target is scheduled successfully; FALSE otherwise. API-Since: 2.0
-
SCNetworkReachabilityUnscheduleFromRunLoop
public static byte SCNetworkReachabilityUnscheduleFromRunLoop(@NotNull @NotNull SCNetworkReachabilityRef target, @NotNull @NotNull CFRunLoopRef runLoop, @NotNull @NotNull CFStringRef runLoopMode)[@function] SCNetworkReachabilityUnscheduleFromRunLoop Unschedules the given target from the given run loop and mode.- Parameters:
target- The address or name that is set up for asynchronous notifications. Must be non-NULL.runLoop- A reference to a run loop from which the target should be unscheduled. Must be non-NULL.runLoopMode- The mode on which to unschedule the target. Must be non-NULL.- Returns:
- Returns TRUE if the target is unscheduled successfully; FALSE otherwise. API-Since: 2.0
-
SCNetworkReachabilitySetDispatchQueue
public static byte SCNetworkReachabilitySetDispatchQueue(@NotNull @NotNull SCNetworkReachabilityRef target, @Nullable @Nullable dispatch_queue_t queue)[@function] SCNetworkReachabilitySetDispatchQueue Schedule or unschedule callbacks for the given target on the given dispatch queue.- Parameters:
target- The address or name that is set up for asynchronous notifications. Must be non-NULL.queue- A libdispatch queue to run the callback on. Pass NULL to unschedule callbacks.- Returns:
- Returns TRUE if the target is scheduled or unscheduled successfully; FALSE otherwise. API-Since: 4.0
-
SCCopyLastError
@NotNull public static @NotNull CFErrorRef SCCopyLastError()
[@function] SCCopyLastError Returns the most recent status or error code generated as the result of calling a System Configuration framework API.- Returns:
- Returns the last error encountered. API-Since: 2.0
-
SCError
public static int SCError()
[@function] SCError Returns the most recent status or error code generated as the result of calling a System Configuration framework API.- Returns:
- Returns the last error encountered. API-Since: 2.0
-
SCErrorString
@NotNull public static @NotNull java.lang.String SCErrorString(int status)
[@function] SCErrorString Returns a pointer to the message string associated with the specified status or error number.- Parameters:
status- The status or error number.- Returns:
- Returns a pointer to the error message string. API-Since: 2.0
-
CNSetSupportedSSIDs
@Deprecated public static byte CNSetSupportedSSIDs(@NotNull @NotNull CFArrayRef ssidArray)Deprecated.[@function] CNSetSupportedSSIDs Provides Captive Network Support with an updated list of SSIDs that this application will perform authentication on. Captive Network Support suppresses showing the Web Sheet for a captive Wi-Fi network if that network's SSID is in the specified list. On iOS, the registrations persist until the application is removed from the device. On MacOSX, the registrations persist as long as the application is running.- Parameters:
ssidArray- A CFArray of CFStrings of the SSIDs.- Returns:
- Returns TRUE if the operation succeeded, FALSE otherwise. API-Since: 4.0 Deprecated-Since: 9.0
-
CNMarkPortalOnline
@Deprecated public static byte CNMarkPortalOnline(@NotNull @NotNull CFStringRef interfaceName)Deprecated.[@function] CNMarkPortalOnline Tells Captive Network Support that your application has authenticated the device to the network. Captive Network Support will notify the rest of the system that WiFi is now a viable interface.- Parameters:
interfaceName- Name of the interface that is now online.- Returns:
- Returns TRUE if the operation succeeded, FALSE otherwise. API-Since: 4.0 Deprecated-Since: 9.0
-
CNMarkPortalOffline
@Deprecated public static byte CNMarkPortalOffline(@NotNull @NotNull CFStringRef interfaceName)Deprecated.[@function] CNMarkPortalOffline Tells Captive Network Support that the device is not authenticated on the given network interface.- Parameters:
interfaceName- Name of the interface that is still captive.- Returns:
- Returns TRUE if the operation succeeded, FALSE otherwise. API-Since: 4.0 Deprecated-Since: 9.0
-
CNCopySupportedInterfaces
@Nullable public static @Nullable CFArrayRef CNCopySupportedInterfaces()
[@function] CNCopySupportedInterfaces copies a list of all interfaces CaptiveNetworkSupport is monitoring.- Returns:
- An array of CFStringRef- BSD interface names. Returns NULL if an error was encountered. You MUST release the returned value. API-Since: 4.1
-
CNCopyCurrentNetworkInfo
@Nullable @Deprecated public static @Nullable CFDictionaryRef CNCopyCurrentNetworkInfo(@NotNull @NotNull CFStringRef interfaceName)
Deprecated.[@function] CNCopyCurrentNetworkInfo Returns the network information for the specified interface when the requesting application meets one of following 4 requirements -. 1. application is using CoreLocation API and has the user's authorization to access location. 2. application has used the NEHotspotConfiguration API to configure the current Wi-Fi network. 3. application has active VPN configurations installed. 4. application has active NEDNSSettingsManager configurations installed. - An application that is linked against iOS 12.0 SDK and above must have the "com.apple.developer.networking.wifi-info" entitlement. - An application will receive a pseudo network information if it is linked against an SDK before iOS 13.0, and if it fails to meet any of the above requirements. - An application will receive NULL if it is linked against iOS 13.0 SDK (or newer), and if it fails to meet any of the above requirements. - On Mac Catalyst platform, to receive current Wi-Fi network information, an application must have "com.apple.developer.networking.wifi-info" entitlement and user's authorization to access location. Network Information dictionary will contain the following keys, and values:- Parameters:
interfaceName- Name of the interface you are interested in- Returns:
- Network Information dictionary associated with the interface. Returns NULL if an error was encountered. You MUST release the returned value. API-Since: 4.1 Deprecated-Since: 100000.0
-
kCFErrorDomainSystemConfiguration
@NotNull public static @NotNull CFStringRef kCFErrorDomainSystemConfiguration()
[@const] kCFErrorDomainSystemConfiguration CFError domain associated with errors reported by the SystemConfiguration.framework. API-Since: 2.0
-
kCNNetworkInfoKeySSIDData
@NotNull public static @NotNull CFStringRef kCNNetworkInfoKeySSIDData()
[@constant] kCNNetworkInfoKeySSIDData NetworkInfo Dictionary key for SSID in CFData format API-Since: 4.1
-
kCNNetworkInfoKeySSID
@NotNull public static @NotNull CFStringRef kCNNetworkInfoKeySSID()
[@constant] kCNNetworkInfoKeySSID NetworkInfo Dictionary key for SSID in CFString format API-Since: 4.1
-
kCNNetworkInfoKeyBSSID
@NotNull public static @NotNull CFStringRef kCNNetworkInfoKeyBSSID()
[@constant] kCNNetworkInfoKeyBSSID NetworkInfo Dictionary key for BSSID in CFString format API-Since: 4.1
-
-