1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
3 #ifndef foosddhcpleasehfoo
4 #define foosddhcpleasehfoo
7 This file is part of systemd.
9 Copyright (C) 2013 Intel Corporation. All rights reserved.
10 Copyright (C) 2014 Tom Gundersen
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.
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.
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/>.
26 #include <netinet/in.h>
27 #include <net/ethernet.h>
29 typedef struct sd_dhcp_lease sd_dhcp_lease;
32 sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
33 sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
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, const struct in_addr **addr);
42 int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr);
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 **routesgn);