]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/systemd/sd-dhcp-lease.h
resolved: add a DNS client stub resolver
[thirdparty/systemd.git] / src / systemd / sd-dhcp-lease.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 #ifndef foosddhcpleasehfoo
4 #define foosddhcpleasehfoo
5
6 /***
7 This file is part of systemd.
8
9 Copyright (C) 2013 Intel Corporation. All rights reserved.
10 Copyright (C) 2014 Tom Gundersen
11
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 ***/
25
26 #include <netinet/in.h>
27 #include <net/ethernet.h>
28
29 typedef struct sd_dhcp_lease sd_dhcp_lease;
30 struct sd_dhcp_route;
31
32 sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
33 sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
34
35 int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
36 int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime);
37 int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
38 int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr);
39 int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr);
40 int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr);
41 int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
42 int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
43 int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu);
44 int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainname);
45 int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname);
46 int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_path);
47 int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **routes, size_t *routes_size);
48
49 #endif