]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-ipv4acd.h
Merge pull request #2495 from heftig/master
[thirdparty/systemd.git] / src / systemd / sd-ipv4acd.h
CommitLineData
e3dca008
TG
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
e3dca008 24#include <net/ethernet.h>
71d35b6b 25#include <netinet/in.h>
e3dca008
TG
26
27#include "sd-event.h"
71d35b6b 28
04c01369
LP
29#include "_sd-common.h"
30
31_SD_BEGIN_DECLARATIONS;
e3dca008
TG
32
33enum {
2237aa02
DH
34 SD_IPV4ACD_EVENT_STOP = 0,
35 SD_IPV4ACD_EVENT_BIND = 1,
36 SD_IPV4ACD_EVENT_CONFLICT = 2,
e3dca008
TG
37};
38
39typedef struct sd_ipv4acd sd_ipv4acd;
40typedef void (*sd_ipv4acd_cb_t)(sd_ipv4acd *ll, int event, void *userdata);
41
42int sd_ipv4acd_detach_event(sd_ipv4acd *ll);
43int sd_ipv4acd_attach_event(sd_ipv4acd *ll, sd_event *event, int priority);
44int sd_ipv4acd_get_address(sd_ipv4acd *ll, struct in_addr *address);
45int sd_ipv4acd_set_callback(sd_ipv4acd *ll, sd_ipv4acd_cb_t cb, void *userdata);
46int sd_ipv4acd_set_mac(sd_ipv4acd *ll, const struct ether_addr *addr);
47int sd_ipv4acd_set_index(sd_ipv4acd *ll, int interface_index);
48int sd_ipv4acd_set_address(sd_ipv4acd *ll, const struct in_addr *address);
04c01369 49int sd_ipv4acd_is_running(sd_ipv4acd *ll);
e3dca008
TG
50int sd_ipv4acd_start(sd_ipv4acd *ll);
51int sd_ipv4acd_stop(sd_ipv4acd *ll);
52sd_ipv4acd *sd_ipv4acd_ref(sd_ipv4acd *ll);
53sd_ipv4acd *sd_ipv4acd_unref(sd_ipv4acd *ll);
4afd3348
LP
54int sd_ipv4acd_new(sd_ipv4acd **ret);
55
56_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4acd, sd_ipv4acd_unref);
e3dca008 57
04c01369
LP
58_SD_END_DECLARATIONS;
59
e3dca008 60#endif