]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/wait-online/link.h
tree-wide: drop license boilerplate
[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
11 #include "sd-netlink.h"
12
13 typedef struct Link Link;
14 typedef struct Manager Manager;
15
16 struct Link {
17 Manager *manager;
18
19 int ifindex;
20 char *ifname;
21 unsigned flags;
22
23 bool required_for_online;
24 char *operational_state;
25 char *state;
26 };
27
28 int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
29 Link *link_free(Link *l);
30 int link_update_rtnl(Link *l, sd_netlink_message *m);
31 int link_update_monitor(Link *l);
32
33 DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);