]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/wait-online/link.h
Merge pull request #7237 from keszybz/growfs
[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 bool required_for_online;
37 char *operational_state;
38 char *state;
39 };
40
41 int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
42 Link *link_free(Link *l);
43 int link_update_rtnl(Link *l, sd_netlink_message *m);
44 int link_update_monitor(Link *l);
45
46 DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);