state: migrate to lif_state_record from a bare dictionary containing the mapped ifs

This commit is contained in:
Ariadne Conill 2020-09-08 14:59:58 -06:00
parent 923b96fab8
commit 8e4eb5d00c
3 changed files with 30 additions and 8 deletions

View file

@ -19,6 +19,11 @@
#include <stdio.h>
#include "libifupdown/interface.h"
struct lif_state_record {
char *mapped_if;
size_t refcount;
};
extern bool lif_state_read(struct lif_dict *state, FILE *f);
extern bool lif_state_read_path(struct lif_dict *state, const char *path);
extern void lif_state_upsert(struct lif_dict *state, const char *ifname, struct lif_interface *iface);