]>
Commit | Line | Data |
---|---|---|
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 | ||
04c01369 | 25 | #include <inttypes.h> |
139b011a | 26 | #include <net/ethernet.h> |
04c01369 | 27 | #include <sys/types.h> |
139b011a | 28 | |
ea3b3a75 | 29 | #include "sd-dhcp6-lease.h" |
71d35b6b | 30 | #include "sd-event.h" |
ea3b3a75 | 31 | |
04c01369 LP |
32 | #include "_sd-common.h" |
33 | ||
34 | _SD_BEGIN_DECLARATIONS; | |
35 | ||
139b011a | 36 | enum { |
10c9ce61 DH |
37 | SD_DHCP6_CLIENT_EVENT_STOP = 0, |
38 | SD_DHCP6_CLIENT_EVENT_RESEND_EXPIRE = 10, | |
39 | SD_DHCP6_CLIENT_EVENT_RETRANS_MAX = 11, | |
40 | SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE = 12, | |
41 | SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST = 13, | |
139b011a PF |
42 | }; |
43 | ||
44 | typedef struct sd_dhcp6_client sd_dhcp6_client; | |
45 | ||
46 | typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event, | |
47 | void *userdata); | |
48 | int sd_dhcp6_client_set_callback(sd_dhcp6_client *client, | |
49 | sd_dhcp6_client_cb_t cb, void *userdata); | |
50 | ||
51 | int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index); | |
c601ebf7 | 52 | int sd_dhcp6_client_set_local_address(sd_dhcp6_client *client, const struct in6_addr *local_address); |
76253e73 DW |
53 | int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr, |
54 | size_t addr_len, uint16_t arp_type); | |
ebe207d4 | 55 | int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid, |
66eac120 | 56 | size_t duid_len); |
04c01369 LP |
57 | int sd_dhcp6_client_set_information_request(sd_dhcp6_client *client, int enabled); |
58 | int sd_dhcp6_client_get_information_request(sd_dhcp6_client *client, int *enabled); | |
da6fe470 PF |
59 | int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client, |
60 | uint16_t option); | |
139b011a | 61 | |
ea3b3a75 PF |
62 | int sd_dhcp6_client_get_lease(sd_dhcp6_client *client, sd_dhcp6_lease **ret); |
63 | ||
139b011a PF |
64 | int sd_dhcp6_client_stop(sd_dhcp6_client *client); |
65 | int sd_dhcp6_client_start(sd_dhcp6_client *client); | |
f667c150 | 66 | int sd_dhcp6_client_is_running(sd_dhcp6_client *client); |
139b011a PF |
67 | int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event, |
68 | int priority); | |
69 | int sd_dhcp6_client_detach_event(sd_dhcp6_client *client); | |
70 | sd_event *sd_dhcp6_client_get_event(sd_dhcp6_client *client); | |
71 | sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client); | |
72 | sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client); | |
73 | int sd_dhcp6_client_new(sd_dhcp6_client **ret); | |
74 | ||
04c01369 LP |
75 | _SD_END_DECLARATIONS; |
76 | ||
139b011a | 77 | #endif |