1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

dhcp: introduce sd_dhcp_client_send_renew()

This commit is contained in:
Yu Watanabe 2019-03-04 17:20:04 +09:00
parent bdbb98d9ae
commit 1c9a2e266f
2 changed files with 12 additions and 0 deletions

View File

@ -1881,6 +1881,17 @@ static int client_receive_message_raw(
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 r;

View File

@ -177,6 +177,7 @@ int sd_dhcp_client_get_lease(
int sd_dhcp_client_stop(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_renew(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);