]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/wait-online/link.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / network / wait-online / link.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright 2014 Lennart Poettering
8 Copyright 2014 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 "sd-netlink.h"
25
26 typedef struct Link Link;
27 typedef struct Manager Manager;
28
29 struct Link {
30 Manager *manager;
31
32 int ifindex;
33 char *ifname;
34 unsigned flags;
35
36 char *operational_state;
37 char *state;
38 };
39
40 int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
41 Link *link_free(Link *l);
42 int link_update_rtnl(Link *l, sd_netlink_message *m);
43 int link_update_monitor(Link *l);
44 bool link_relevant(Link *l);
45
46 DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);