1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright (C) 2013 Intel Corporation. All rights reserved.
9 Copyright (C) 2014 Tom Gundersen
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
26 #include <linux/if_packet.h>
28 #include "socket-util.h"
31 #include "dhcp-protocol.h"
33 #include "sd-dhcp-client.h"
35 struct sd_dhcp_lease {
42 be32_t server_address;
52 int dhcp_lease_new(sd_dhcp_lease **ret);
53 int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
56 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_dhcp_lease*, sd_dhcp_lease_unref);
57 #define _cleanup_dhcp_lease_unref_ _cleanup_(sd_dhcp_lease_unrefp)