]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-ipv4ll.h
sd-event: add relative timer calls
[thirdparty/systemd.git] / src / systemd / sd-ipv4ll.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
5c1d3fc9
UTL
2#ifndef foosdipv4llfoo
3#define foosdipv4llfoo
4
5/***
810adae9 6 Copyright © 2014 Axis Communications AB. All rights reserved.
5c1d3fc9
UTL
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20***/
21
5c1d3fc9 22#include <net/ethernet.h>
71d35b6b 23#include <netinet/in.h>
5c1d3fc9
UTL
24
25#include "sd-event.h"
71d35b6b 26
04c01369
LP
27#include "_sd-common.h"
28
29_SD_BEGIN_DECLARATIONS;
5c1d3fc9
UTL
30
31enum {
be19c5b5
DH
32 SD_IPV4LL_EVENT_STOP = 0,
33 SD_IPV4LL_EVENT_BIND = 1,
34 SD_IPV4LL_EVENT_CONFLICT = 2,
5c1d3fc9
UTL
35};
36
37typedef struct sd_ipv4ll sd_ipv4ll;
ccf86354 38typedef void (*sd_ipv4ll_callback_t)(sd_ipv4ll *ll, int event, void *userdata);
5c1d3fc9
UTL
39
40int sd_ipv4ll_detach_event(sd_ipv4ll *ll);
32d20645 41int sd_ipv4ll_attach_event(sd_ipv4ll *ll, sd_event *event, int64_t priority);
5c1d3fc9 42int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address);
ccf86354 43int sd_ipv4ll_set_callback(sd_ipv4ll *ll, sd_ipv4ll_callback_t cb, void *userdata);
5c1d3fc9 44int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr);
2f8e7633 45int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int interface_index);
129dc1b4 46int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address);
38958cd6 47int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint64_t seed);
04c01369 48int sd_ipv4ll_is_running(sd_ipv4ll *ll);
5e25a13a 49int sd_ipv4ll_restart(sd_ipv4ll *ll);
aba496a5
UTL
50int sd_ipv4ll_start(sd_ipv4ll *ll);
51int sd_ipv4ll_stop(sd_ipv4ll *ll);
56cd007a
PF
52sd_ipv4ll *sd_ipv4ll_ref(sd_ipv4ll *ll);
53sd_ipv4ll *sd_ipv4ll_unref(sd_ipv4ll *ll);
73e94c0d 54int sd_ipv4ll_new(sd_ipv4ll **ret);
5c1d3fc9 55
4afd3348
LP
56_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4ll, sd_ipv4ll_unref);
57
04c01369
LP
58_SD_END_DECLARATIONS;
59
5c1d3fc9 60#endif