Add helper function for fetching enabled/disabled state of Prefix
Delegation for a DHCPv6 client. Update function setting prefix
delegation to use an int instead of a boolean.
return 0;
}
-int sd_dhcp6_client_set_prefix_delegation(sd_dhcp6_client *client, bool delegation) {
+int sd_dhcp6_client_get_prefix_delegation(sd_dhcp6_client *client, int *delegation) {
+ assert_return(client, -EINVAL);
+ assert_return(delegation, -EINVAL);
+
+ *delegation = client->prefix_delegation;
+
+ return 0;
+}
+
+int sd_dhcp6_client_set_prefix_delegation(sd_dhcp6_client *client, int delegation) {
assert_return(client, -EINVAL);
client->prefix_delegation = delegation;
#include <inttypes.h>
#include <net/ethernet.h>
-#include <stdbool.h>
#include <sys/types.h>
#include "sd-dhcp6-lease.h"
int sd_dhcp6_client_set_request_option(
sd_dhcp6_client *client,
uint16_t option);
+int sd_dhcp6_client_get_prefix_delegation(sd_dhcp6_client *client,
+ int *delegation);
int sd_dhcp6_client_set_prefix_delegation(sd_dhcp6_client *client,
- bool delegation);
+ int delegation);
int sd_dhcp6_client_get_lease(
sd_dhcp6_client *client,