libnetutils/dhcp_utils.c
int dhcp_release_lease(const char *interface)
{
    const char *ctrl_prop = "ctl.stop";
    const char *desired_status = "stopped";

    /* Stop the daemon and wait until it's reported to be stopped */
    property_set(ctrl_prop, DAEMON_NAME);
    if (wait_for_property(DAEMON_PROP_NAME, desired_status, 5) < 0) {
        return -1;
    }
    return 0;
}
/**
 * Release the current DHCP client lease.
 */
Release the current DHCP client lease.
Release the current DHCP client lease .
int dhcp_release_lease(const char *interface)
{
    const char *ctrl_prop = "ctl.stop";
    const char *desired_status = "stopped";
    property_set(ctrl_prop, DAEMON_NAME);
    if (wait_for_property(DAEMON_PROP_NAME, desired_status, 5) < 0) {
        return -1;
    }
    return 0;
}
int dhcp_release_lease ( const char * interface ) { const char * ctrl_prop = " " ; const char * desired_status = " " ; property_set ( ctrl_prop , DAEMON_NAME ) ; if ( wait_for_property ( DAEMON_PROP_NAME , desired_status , 5 ) < 0 ) { return -1 ; } return 0 ; }
Release the current DHCP client lease.
Release the current DHCP client lease .
/* Stop the daemon and wait until it's reported to be stopped */