]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-ipv4ll.h
Add SPDX license identifiers to source files under the LGPL
[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/***
6 This file is part of systemd.
7
8 Copyright (C) 2014 Axis Communications AB. All rights reserved.
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
5c1d3fc9 24#include <net/ethernet.h>
71d35b6b 25#include <netinet/in.h>
5c1d3fc9
UTL
26
27#include "sd-event.h"
71d35b6b 28
04c01369
LP
29#include "_sd-common.h"
30
31_SD_BEGIN_DECLARATIONS;
5c1d3fc9
UTL
32
33enum {
be19c5b5
DH
34 SD_IPV4LL_EVENT_STOP = 0,
35 SD_IPV4LL_EVENT_BIND = 1,
36 SD_IPV4LL_EVENT_CONFLICT = 2,
5c1d3fc9
UTL
37};
38
39typedef struct sd_ipv4ll sd_ipv4ll;
ccf86354 40typedef void (*sd_ipv4ll_callback_t)(sd_ipv4ll *ll, int event, void *userdata);
5c1d3fc9
UTL
41
42int sd_ipv4ll_detach_event(sd_ipv4ll *ll);
32d20645 43int sd_ipv4ll_attach_event(sd_ipv4ll *ll, sd_event *event, int64_t priority);
5c1d3fc9 44int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address);
ccf86354 45int sd_ipv4ll_set_callback(sd_ipv4ll *ll, sd_ipv4ll_callback_t cb, void *userdata);
5c1d3fc9 46int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr);
2f8e7633 47int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int interface_index);
129dc1b4 48int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address);
38958cd6 49int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint64_t seed);
04c01369 50int sd_ipv4ll_is_running(sd_ipv4ll *ll);
5e25a13a 51int sd_ipv4ll_restart(sd_ipv4ll *ll);
aba496a5
UTL
52int sd_ipv4ll_start(sd_ipv4ll *ll);
53int sd_ipv4ll_stop(sd_ipv4ll *ll);
56cd007a
PF
54sd_ipv4ll *sd_ipv4ll_ref(sd_ipv4ll *ll);
55sd_ipv4ll *sd_ipv4ll_unref(sd_ipv4ll *ll);
73e94c0d 56int sd_ipv4ll_new(sd_ipv4ll **ret);
5c1d3fc9 57
4afd3348
LP
58_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ipv4ll, sd_ipv4ll_unref);
59
04c01369
LP
60_SD_END_DECLARATIONS;
61
5c1d3fc9 62#endif