summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp6-client.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-11 16:03:05 +0100
committerDaniel Mack <github@zonque.org>2015-11-11 16:03:05 +0100
commit3116c225d2e3c0d8e6b3f4d4a9b48443cc7baf2d (patch)
treedefe1a2bab15d776e52b8ba3d5a1c8744c0ef7bf /src/libsystemd-network/sd-dhcp6-client.c
parenta2e6fbf5c047314db036000203b42c6aac1e3511 (diff)
parent4058d339f5b290ec970e1de0d3b804e4934acc20 (diff)
Merge pull request #1843 from teg/ndisc
ndisc and dhcpv6
Diffstat (limited to 'src/libsystemd-network/sd-dhcp6-client.c')
-rw-r--r--src/libsystemd-network/sd-dhcp6-client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index e29de60d24..e00ca2b00d 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -1115,11 +1115,19 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state) {
}
int sd_dhcp6_client_stop(sd_dhcp6_client *client) {
+ assert_return(client, -EINVAL);
+
client_stop(client, SD_DHCP6_CLIENT_EVENT_STOP);
return 0;
}
+int sd_dhcp6_client_is_running(sd_dhcp6_client *client) {
+ assert_return(client, -EINVAL);
+
+ return client->state != DHCP6_STATE_STOPPED;
+}
+
int sd_dhcp6_client_start(sd_dhcp6_client *client) {
int r = 0;
enum DHCP6State state = DHCP6_STATE_SOLICITATION;