]>
Commit | Line | Data |
---|---|---|
fe8db0c5 TG |
1 | #ifndef foosddhcpleasehfoo |
2 | #define foosddhcpleasehfoo | |
a6cc569e TG |
3 | |
4 | /*** | |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright (C) 2013 Intel Corporation. All rights reserved. | |
8 | Copyright (C) 2014 Tom Gundersen | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
04c01369 | 24 | #include <inttypes.h> |
fe8db0c5 | 25 | #include <net/ethernet.h> |
04c01369 LP |
26 | #include <netinet/in.h> |
27 | #include <sys/types.h> | |
28 | ||
29 | #include "_sd-common.h" | |
30 | ||
31 | _SD_BEGIN_DECLARATIONS; | |
a6cc569e | 32 | |
fe8db0c5 | 33 | typedef struct sd_dhcp_lease sd_dhcp_lease; |
f8693fc7 | 34 | typedef struct sd_dhcp_route sd_dhcp_route; |
a6cc569e | 35 | |
fe8db0c5 TG |
36 | sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease); |
37 | sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease); | |
74b2466e | 38 | |
fe8db0c5 | 39 | int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr); |
68ceb9df | 40 | int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime); |
0339cd77 LP |
41 | int sd_dhcp_lease_get_t1(sd_dhcp_lease *lease, uint32_t *t1); |
42 | int sd_dhcp_lease_get_t2(sd_dhcp_lease *lease, uint32_t *t2); | |
43 | int sd_dhcp_lease_get_broadcast(sd_dhcp_lease *lease, struct in_addr *addr); | |
fe8db0c5 TG |
44 | int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr); |
45 | int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr); | |
8e34a618 | 46 | int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr); |
0ad853bc | 47 | int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr); |
a2ba62c7 LP |
48 | int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr); |
49 | int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr); | |
fe8db0c5 TG |
50 | int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu); |
51 | int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainname); | |
b85bc551 | 52 | int sd_dhcp_lease_get_search_domains(sd_dhcp_lease *lease, char ***domains); |
fe8db0c5 | 53 | int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname); |
ce78df79 | 54 | int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_path); |
f8693fc7 | 55 | int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, sd_dhcp_route ***routes); |
0339cd77 LP |
56 | int sd_dhcp_lease_get_vendor_specific(sd_dhcp_lease *lease, const void **data, size_t *data_len); |
57 | int sd_dhcp_lease_get_client_id(sd_dhcp_lease *lease, const void **client_id, size_t *client_id_len); | |
8eb9058d | 58 | int sd_dhcp_lease_get_timezone(sd_dhcp_lease *lease, const char **timezone); |
74b2466e | 59 | |
f8693fc7 BG |
60 | int sd_dhcp_route_get_destination(sd_dhcp_route *route, struct in_addr *destination); |
61 | int sd_dhcp_route_get_destination_prefix_length(sd_dhcp_route *route, uint8_t *length); | |
62 | int sd_dhcp_route_get_gateway(sd_dhcp_route *route, struct in_addr *gateway); | |
63 | ||
4afd3348 LP |
64 | _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_dhcp_lease, sd_dhcp_lease_unref); |
65 | ||
04c01369 LP |
66 | _SD_END_DECLARATIONS; |
67 | ||
fe8db0c5 | 68 | #endif |