]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/wait-online/link.h
Merge pull request #4538 from fbuihuu/confirm-spawn-fixes
[thirdparty/systemd.git] / src / network / wait-online / link.h
1 #pragma once
2
3 /***
4 This file is part of systemd.
5
6 Copyright 2014 Lennart Poettering
7 Copyright 2014 Tom Gundersen
8
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
13
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21 ***/
22
23 #include "sd-netlink.h"
24
25 typedef struct Link Link;
26 typedef struct Manager Manager;
27
28 struct Link {
29 Manager *manager;
30
31 int ifindex;
32 char *ifname;
33 unsigned flags;
34
35 char *operational_state;
36 char *state;
37 };
38
39 int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
40 Link *link_free(Link *l);
41 int link_update_rtnl(Link *l, sd_netlink_message *m);
42 int link_update_monitor(Link *l);
43 bool link_relevant(Link *l);
44
45 DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);