]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
e3dca008 TG |
2 | #ifndef foosdipv4acdfoo |
3 | #define foosdipv4acdfoo | |
4 | ||
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright (C) 2014 Axis Communications AB. All rights reserved. | |
9 | Copyright (C) 2015 Tom Gundersen | |
10 | ||
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. | |
15 | ||
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. | |
20 | ||
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/>. | |
23 | ***/ | |
24 | ||
e3dca008 | 25 | #include <net/ethernet.h> |
71d35b6b | 26 | #include <netinet/in.h> |
e3dca008 TG |
27 | |
28 | #include "sd-event.h" | |
71d35b6b | 29 | |
04c01369 LP |
30 | #include "_sd-common.h" |
31 | ||
32 | _SD_BEGIN_DECLARATIONS; | |
e3dca008 TG |
33 | |
34 | enum { | |
2237aa02 DH |
35 | SD_IPV4ACD_EVENT_STOP = 0, |
36 | SD_IPV4ACD_EVENT_BIND = 1, | |
37 | SD_IPV4ACD_EVENT_CONFLICT = 2, | |
e3dca008 TG |
38 | }; |
39 | ||
40 | typedef struct sd_ipv4acd sd_ipv4acd; | |
b24ef049 LP |
41 | typedef void (*sd_ipv4acd_callback_t)(sd_ipv4acd *acd, int event, void *userdata); |
42 | ||
43 | int sd_ipv4acd_detach_event(sd_ipv4acd *acd); | |
44 | int sd_ipv4acd_attach_event(sd_ipv4acd *acd, sd_event *event, int64_t priority); | |
45 | int sd_ipv4acd_get_address(sd_ipv4acd *acd, struct in_addr *address); | |
46 | int sd_ipv4acd_set_callback(sd_ipv4acd *acd, sd_ipv4acd_callback_t cb, void *userdata); | |
47 | int sd_ipv4acd_set_mac(sd_ipv4acd *acd, const struct ether_addr *addr); | |
48 | int sd_ipv4acd_set_ifindex(sd_ipv4acd *acd, int interface_index); | |
49 | int sd_ipv4acd_set_address(sd_ipv4acd *acd, const struct in_addr *address); | |
50 | int sd_ipv4acd_is_running(sd_ipv4acd *acd); | |
51 | int sd_ipv4acd_start(sd_ipv4acd *acd); | |
52 | int sd_ipv4acd_stop(sd_ipv4acd *acd); | |
53 | sd_ipv4acd *sd_ipv4acd_ref(sd_ipv4acd *acd); | |
54 | sd_ipv4acd *sd_ipv4acd_unref(sd_ipv4acd *acd); | |
4afd3348 LP |
55 | int sd_ipv4acd_new(sd_ipv4acd **ret); |
56 | ||
57 | _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4acd, sd_ipv4acd_unref); | |
e3dca008 | 58 | |
04c01369 LP |
59 | _SD_END_DECLARATIONS; |
60 | ||
e3dca008 | 61 | #endif |