Function SCNetworkInterfaceForceConfigurationRefresh

Source
pub unsafe extern "C-unwind" fn SCNetworkInterfaceForceConfigurationRefresh(
    interface: &SCNetworkInterface,
) -> bool
Available on crate feature SCNetworkConfiguration only.
Expand description

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

Parameter interface: The desired network interface.

Returns: Returns TRUE if the notification was sent; FALSE otherwise.