]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-dhcp-lease.h
sd-dhcp-client/networkd: set lifetimes for IPv4 addresses
[thirdparty/systemd.git] / src / systemd / sd-dhcp-lease.h
CommitLineData
a6cc569e
TG
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
fe8db0c5
TG
3#ifndef foosddhcpleasehfoo
4#define foosddhcpleasehfoo
a6cc569e
TG
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
fe8db0c5
TG
26#include <netinet/in.h>
27#include <net/ethernet.h>
a6cc569e 28
fe8db0c5 29typedef struct sd_dhcp_lease sd_dhcp_lease;
a6cc569e 30
fe8db0c5
TG
31sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
32sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
33int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
68ceb9df 34int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime);
fe8db0c5
TG
35int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
36int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr);
8e34a618 37int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr);
0ad853bc 38int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr);
fe8db0c5 39int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
46844696 40int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
fe8db0c5
TG
41int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu);
42int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainname);
43int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname);
ce78df79 44int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_path);
a6cc569e 45
fe8db0c5 46#endif