#include "sd-dhcp6-client.h"
#include "alloc-util.h"
+#include "device-util.h"
#include "dhcp-identifier.h"
#include "dhcp6-internal.h"
#include "dhcp6-lease-internal.h"
return client->event;
}
+int sd_dhcp6_client_attach_device(sd_dhcp6_client *client, sd_device *dev) {
+ assert_return(client, -EINVAL);
+
+ return device_unref_and_replace(client->dev, dev);
+}
+
static sd_dhcp6_client *dhcp6_client_free(sd_dhcp6_client *client) {
if (!client)
return NULL;
client->fd = safe_close(client->fd);
+ sd_device_unref(client->dev);
+
free(client->req_opts);
free(client->fqdn);
free(client->mudurl);
#include <net/ethernet.h>
#include <sys/types.h>
+#include "sd-device.h"
#include "sd-dhcp6-lease.h"
#include "sd-dhcp6-option.h"
#include "sd-event.h"
int64_t priority);
int sd_dhcp6_client_detach_event(sd_dhcp6_client *client);
sd_event *sd_dhcp6_client_get_event(sd_dhcp6_client *client);
+int sd_dhcp6_client_attach_device(sd_dhcp6_client *client, sd_device *dev);
sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client);
sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client);
int sd_dhcp6_client_new(sd_dhcp6_client **ret);