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

dhcp6: Provide method to access IAID

This commit is contained in:
Susant Sahani 2020-06-09 10:48:36 +02:00 committed by Yu Watanabe
parent ed66590d15
commit d69d4038ec
2 changed files with 15 additions and 0 deletions

View File

@ -342,6 +342,18 @@ int sd_dhcp6_client_set_iaid(sd_dhcp6_client *client, uint32_t iaid) {
return 0; return 0;
} }
int sd_dhcp6_client_get_iaid(sd_dhcp6_client *client, uint32_t *iaid) {
assert_return(client, -EINVAL);
assert_return(iaid, -EINVAL);
if (!client->iaid_set)
return -ENODATA;
*iaid = be32toh(client->ia_na.ia_na.id);
return 0;
}
int sd_dhcp6_client_set_fqdn( int sd_dhcp6_client_set_fqdn(
sd_dhcp6_client *client, sd_dhcp6_client *client,
const char *fqdn) { const char *fqdn) {

View File

@ -110,6 +110,9 @@ int sd_dhcp6_client_set_duid_llt(
int sd_dhcp6_client_set_iaid( int sd_dhcp6_client_set_iaid(
sd_dhcp6_client *client, sd_dhcp6_client *client,
uint32_t iaid); uint32_t iaid);
int sd_dhcp6_client_get_iaid(
sd_dhcp6_client *client,
uint32_t *iaid);
int sd_dhcp6_client_set_fqdn( int sd_dhcp6_client_set_fqdn(
sd_dhcp6_client *client, sd_dhcp6_client *client,
const char *fqdn); const char *fqdn);