]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/networkd/zone.h
zones: Move "struct nw_zone" into header
[people/ms/network.git] / src / networkd / zone.h
index 6ab951b4a6243906e94d4f544e0e79b2b3f9663a..2d1e1dc0ce6fa2d8d552c7756d2659de807c26de 100644 (file)
@@ -23,7 +23,6 @@
 
 #define ZONE_CONFIG_DIR                        CONFIG_DIR "/zones"
 
-#define NETWORK_ZONE_NAME_MAX_LENGTH           16
 #define NETWORK_ZONE_DEFAULT_MTU                       1500
 
 typedef struct nw_zone nw_zone;
@@ -32,10 +31,25 @@ typedef enum nw_zone_type_id {
        __EMPTY
 } nw_zone_type_id_t;
 
+#include <linux/if.h>
 #include <linux/if_link.h>
 
 #include "config.h"
 #include "daemon.h"
+#include "link.h"
+
+struct nw_zone {
+       nw_daemon* daemon;
+       int nrefs;
+
+       // Link
+       nw_link* link;
+
+       char name[IFNAMSIZ];
+
+       // Configuration
+       nw_config *config;
+};
 
 int nw_zone_create(nw_zone** zone, nw_daemon* daemon, const nw_zone_type_id_t type,
        const char* name, nw_config* config);