]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
b44cd882 TG |
2 | #ifndef foosddhcpserverhfoo |
3 | #define foosddhcpserverhfoo | |
4 | ||
5 | /*** | |
810adae9 | 6 | Copyright © 2013 Intel Corporation. All rights reserved. |
b44cd882 TG |
7 | systemd is free software; you can redistribute it and/or modify it |
8 | under the terms of the GNU Lesser General Public License as published by | |
9 | the Free Software Foundation; either version 2.1 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | systemd is distributed in the hope that it will be useful, but | |
13 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | Lesser General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU Lesser General Public License | |
18 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
19 | ***/ | |
20 | ||
04c01369 | 21 | #include <inttypes.h> |
b44cd882 TG |
22 | #include <netinet/in.h> |
23 | ||
461dbb2f | 24 | #include "sd-dhcp-option.h" |
b44cd882 | 25 | #include "sd-event.h" |
71d35b6b | 26 | |
04c01369 LP |
27 | #include "_sd-common.h" |
28 | ||
29 | _SD_BEGIN_DECLARATIONS; | |
b44cd882 TG |
30 | |
31 | typedef struct sd_dhcp_server sd_dhcp_server; | |
32 | ||
1a04db0f LP |
33 | int sd_dhcp_server_new(sd_dhcp_server **ret, int ifindex); |
34 | ||
b44cd882 TG |
35 | sd_dhcp_server *sd_dhcp_server_ref(sd_dhcp_server *server); |
36 | sd_dhcp_server *sd_dhcp_server_unref(sd_dhcp_server *server); | |
37 | ||
32d20645 | 38 | int sd_dhcp_server_attach_event(sd_dhcp_server *client, sd_event *event, int64_t priority); |
b44cd882 TG |
39 | int sd_dhcp_server_detach_event(sd_dhcp_server *client); |
40 | sd_event *sd_dhcp_server_get_event(sd_dhcp_server *client); | |
41 | ||
04c01369 | 42 | int sd_dhcp_server_is_running(sd_dhcp_server *server); |
7c16313f | 43 | |
ff734080 TG |
44 | int sd_dhcp_server_start(sd_dhcp_server *server); |
45 | int sd_dhcp_server_stop(sd_dhcp_server *server); | |
46 | ||
99634696 | 47 | int sd_dhcp_server_configure_pool(sd_dhcp_server *server, struct in_addr *address, unsigned char prefixlen, uint32_t offset, uint32_t size); |
52750344 | 48 | |
8eb9058d | 49 | int sd_dhcp_server_set_timezone(sd_dhcp_server *server, const char *timezone); |
299d578f SS |
50 | int sd_dhcp_server_set_dns(sd_dhcp_server *server, const struct in_addr dns[], unsigned n); |
51 | int sd_dhcp_server_set_ntp(sd_dhcp_server *server, const struct in_addr ntp[], unsigned n); | |
52 | int sd_dhcp_server_set_sip(sd_dhcp_server *server, const struct in_addr sip[], unsigned n); | |
f678ac7e | 53 | int sd_dhcp_server_set_pop3_server(sd_dhcp_server *server, const struct in_addr pop3_server[], unsigned n); |
2c649ca1 | 54 | int sd_dhcp_server_set_smtp_server(sd_dhcp_server *server, const struct in_addr smtp_server[], unsigned n); |
77ff6022 | 55 | int sd_dhcp_server_set_emit_router(sd_dhcp_server *server, int enabled); |
8eb9058d | 56 | |
461dbb2f | 57 | int sd_dhcp_server_add_option(sd_dhcp_server *server, sd_dhcp_option *v); |
7354900d | 58 | int sd_dhcp_server_add_vendor_option(sd_dhcp_server *server, sd_dhcp_option *v); |
564ca984 | 59 | |
586ac6f7 LP |
60 | int sd_dhcp_server_set_max_lease_time(sd_dhcp_server *server, uint32_t t); |
61 | int sd_dhcp_server_set_default_lease_time(sd_dhcp_server *server, uint32_t t); | |
62 | ||
52750344 | 63 | int sd_dhcp_server_forcerenew(sd_dhcp_server *server); |
1a04db0f | 64 | |
4afd3348 LP |
65 | _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_dhcp_server, sd_dhcp_server_unref); |
66 | ||
04c01369 LP |
67 | _SD_END_DECLARATIONS; |
68 | ||
b44cd882 | 69 | #endif |