chiark / gitweb /
sd-network: add new library
[elogind.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
31 sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
32 sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
33 int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
34 int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
35 int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr);
36 int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
37 int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu);
38 int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainname);
39 int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname);
40
41 #endif