mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
dhcp: introduce sd_dhcp_client_send_renew()
This commit is contained in:
parent
bdbb98d9ae
commit
1c9a2e266f
@ -1881,6 +1881,17 @@ static int client_receive_message_raw(
|
|||||||
return client_handle_message(client, &packet->dhcp, len);
|
return client_handle_message(client, &packet->dhcp, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sd_dhcp_client_send_renew(sd_dhcp_client *client) {
|
||||||
|
assert_return(client, -EINVAL);
|
||||||
|
assert_return(client->fd >= 0, -EINVAL);
|
||||||
|
|
||||||
|
client->start_delay = 0;
|
||||||
|
client->attempt = 1;
|
||||||
|
client->state = DHCP_STATE_RENEWING;
|
||||||
|
|
||||||
|
return client_initialize_time_events(client);
|
||||||
|
}
|
||||||
|
|
||||||
int sd_dhcp_client_start(sd_dhcp_client *client) {
|
int sd_dhcp_client_start(sd_dhcp_client *client) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
@ -177,6 +177,7 @@ int sd_dhcp_client_get_lease(
|
|||||||
int sd_dhcp_client_stop(sd_dhcp_client *client);
|
int sd_dhcp_client_stop(sd_dhcp_client *client);
|
||||||
int sd_dhcp_client_start(sd_dhcp_client *client);
|
int sd_dhcp_client_start(sd_dhcp_client *client);
|
||||||
int sd_dhcp_client_send_release(sd_dhcp_client *client);
|
int sd_dhcp_client_send_release(sd_dhcp_client *client);
|
||||||
|
int sd_dhcp_client_send_renew(sd_dhcp_client *client);
|
||||||
|
|
||||||
sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client);
|
sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client);
|
||||||
sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client);
|
sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client);
|
||||||
|
Loading…
Reference in New Issue
Block a user