]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-dhcp6-client.h
sd-dhcp: fix namespacing
[thirdparty/systemd.git] / src / systemd / sd-dhcp6-client.h
CommitLineData
139b011a
PF
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3#ifndef foosddhcp6clienthfoo
4#define foosddhcp6clienthfoo
5
6/***
7 This file is part of systemd.
8
9 Copyright (C) 2014 Intel Corporation. All rights reserved.
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23***/
24
25#include <net/ethernet.h>
26
27#include "sd-event.h"
28
ea3b3a75
PF
29#include "sd-dhcp6-lease.h"
30
139b011a
PF
31enum {
32 DHCP6_EVENT_STOP = 0,
d1b0afe3
PF
33 DHCP6_EVENT_RESEND_EXPIRE = 10,
34 DHCP6_EVENT_RETRANS_MAX = 11,
a34b57c0 35 DHCP6_EVENT_IP_ACQUIRE = 12,
bbfa43ca 36 DHCP6_EVENT_INFORMATION_REQUEST = 13,
139b011a
PF
37};
38
39typedef struct sd_dhcp6_client sd_dhcp6_client;
40
41typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event,
42 void *userdata);
43int sd_dhcp6_client_set_callback(sd_dhcp6_client *client,
44 sd_dhcp6_client_cb_t cb, void *userdata);
45
46int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index);
76253e73
DW
47int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
48 size_t addr_len, uint16_t arp_type);
ebe207d4 49int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid,
66eac120 50 size_t duid_len);
bbfa43ca
PF
51int sd_dhcp6_client_set_information_request(sd_dhcp6_client *client,
52 bool enabled);
53int sd_dhcp6_client_get_information_request(sd_dhcp6_client *client,
54 bool *enabled);
da6fe470
PF
55int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
56 uint16_t option);
139b011a 57
ea3b3a75
PF
58int sd_dhcp6_client_get_lease(sd_dhcp6_client *client, sd_dhcp6_lease **ret);
59
139b011a
PF
60int sd_dhcp6_client_stop(sd_dhcp6_client *client);
61int sd_dhcp6_client_start(sd_dhcp6_client *client);
62int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event,
63 int priority);
64int sd_dhcp6_client_detach_event(sd_dhcp6_client *client);
65sd_event *sd_dhcp6_client_get_event(sd_dhcp6_client *client);
66sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client);
67sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client);
68int sd_dhcp6_client_new(sd_dhcp6_client **ret);
69
70#endif