blob: 3aa835729383cd27b5b54c6d23d13d9fd23b0412 [file] [log] [blame] [raw]
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-netlink.h"
#include "log-link.h"
#include "network-util.h"
typedef struct Link Link;
typedef struct Manager Manager;
struct Link {
Manager *manager;
int ifindex;
char *ifname;
unsigned flags;
bool required_for_online;
LinkOperationalStateRange required_operstate;
LinkOperationalState operational_state;
char *state;
};
int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
Link *link_free(Link *l);
int link_update_rtnl(Link *l, sd_netlink_message *m);
int link_update_monitor(Link *l);
DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);