]> git.proxmox.com Git - systemd.git/blob - src/systemd/sd-dhcp6-lease.h
Merge tag 'upstream/229'
[systemd.git] / src / systemd / sd-dhcp6-lease.h
1 #ifndef foosddhcp6leasehfoo
2 #define foosddhcp6leasehfoo
3
4 /***
5 This file is part of systemd.
6
7 Copyright (C) 2014 Tom Gundersen
8 Copyright (C) 2014-2015 Intel Corporation. All rights reserved.
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 ***/
23
24 #include <inttypes.h>
25 #include <netinet/in.h>
26
27 #include "_sd-common.h"
28
29 _SD_BEGIN_DECLARATIONS;
30
31 typedef struct sd_dhcp6_lease sd_dhcp6_lease;
32
33 void sd_dhcp6_lease_reset_address_iter(sd_dhcp6_lease *lease);
34 int sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease,
35 struct in6_addr *addr,
36 uint32_t *lifetime_preferred,
37 uint32_t *lifetime_valid);
38
39 int sd_dhcp6_lease_get_dns(sd_dhcp6_lease *lease, struct in6_addr **addrs);
40 int sd_dhcp6_lease_get_domains(sd_dhcp6_lease *lease, char ***domains);
41 int sd_dhcp6_lease_get_ntp_addrs(sd_dhcp6_lease *lease,
42 struct in6_addr **addrs);
43 int sd_dhcp6_lease_get_ntp_fqdn(sd_dhcp6_lease *lease, char ***ntp_fqdn);
44
45 sd_dhcp6_lease *sd_dhcp6_lease_ref(sd_dhcp6_lease *lease);
46 sd_dhcp6_lease *sd_dhcp6_lease_unref(sd_dhcp6_lease *lease);
47
48 _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_dhcp6_lease, sd_dhcp6_lease_unref);
49
50 _SD_END_DECLARATIONS;
51
52 #endif