This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neco/src/types.h

38 lines
582 B
C

#pragma once
#include <libubox/avl.h>
#include <net/if.h>
#include <stdint.h>
typedef struct {
uint8_t addr[6];
} macaddr_t;
#define NODE_NAME(c) (*(char **)&(c)->node.key)
typedef struct {
struct avl_tree subtypes;
struct avl_tree interfaces;
} config_t;
typedef struct {
struct avl_node node;
} subconfig_type_t;
typedef struct {
struct avl_node node;
struct avl_tree subconfigs;
macaddr_t macaddr;
uint16_t mtu;
} interface_config_t;
typedef struct {
struct avl_node node;
const char *type;
} interface_subconfig_t;
typedef struct {
} interface_generator_t;