]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/systemd/sd-ipv4acd.h
Merge pull request #2727 from ian-kelling/man-pr-v3
[thirdparty/systemd.git] / src / systemd / sd-ipv4acd.h
1 #ifndef foosdipv4acdfoo
2 #define foosdipv4acdfoo
3
4 /***
5 This file is part of systemd.
6
7 Copyright (C) 2014 Axis Communications AB. All rights reserved.
8 Copyright (C) 2015 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
24 #include <net/ethernet.h>
25 #include <netinet/in.h>
26
27 #include "sd-event.h"
28
29 #include "_sd-common.h"
30
31 _SD_BEGIN_DECLARATIONS;
32
33 enum {
34 SD_IPV4ACD_EVENT_STOP = 0,
35 SD_IPV4ACD_EVENT_BIND = 1,
36 SD_IPV4ACD_EVENT_CONFLICT = 2,
37 };
38
39 typedef struct sd_ipv4acd sd_ipv4acd;
40 typedef void (*sd_ipv4acd_callback_t)(sd_ipv4acd *ll, int event, void *userdata);
41
42 int sd_ipv4acd_detach_event(sd_ipv4acd *ll);
43 int sd_ipv4acd_attach_event(sd_ipv4acd *ll, sd_event *event, int64_t priority);
44 int sd_ipv4acd_get_address(sd_ipv4acd *ll, struct in_addr *address);
45 int sd_ipv4acd_set_callback(sd_ipv4acd *ll, sd_ipv4acd_callback_t cb, void *userdata);
46 int sd_ipv4acd_set_mac(sd_ipv4acd *ll, const struct ether_addr *addr);
47 int sd_ipv4acd_set_index(sd_ipv4acd *ll, int interface_index);
48 int sd_ipv4acd_set_address(sd_ipv4acd *ll, const struct in_addr *address);
49 int sd_ipv4acd_is_running(sd_ipv4acd *ll);
50 int sd_ipv4acd_start(sd_ipv4acd *ll);
51 int sd_ipv4acd_stop(sd_ipv4acd *ll);
52 sd_ipv4acd *sd_ipv4acd_ref(sd_ipv4acd *ll);
53 sd_ipv4acd *sd_ipv4acd_unref(sd_ipv4acd *ll);
54 int sd_ipv4acd_new(sd_ipv4acd **ret);
55
56 _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4acd, sd_ipv4acd_unref);
57
58 _SD_END_DECLARATIONS;
59
60 #endif