]> git.ipfire.org Git - network.git/commitdiff
ports: Move VLAN settings into its own header file
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Jun 2023 14:54:20 +0000 (14:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Jun 2023 14:54:20 +0000 (14:54 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/networkd/port-vlan.h
src/networkd/port.h

index f02c529c99ef2fabe012cef35fbf324446208c46..cffc1787558cca8d76d6a5875fe923df7150a910 100644 (file)
 
 #include "port.h"
 
+struct nw_port_vlan {
+       nw_port* parent;
+
+       // The VLAN ID
+       int id;
+
+       // If the parent has not been read from the configuration we will
+       // save the name and try to find it later.
+       char __parent_name[IF_NAMESIZE];
+};
+
 extern const nw_port_info_t nw_port_info_vlan;
 
 // ID
index f8beed3b59e37871ba301913563c9e3f175b277c..21e2a121340302cad5e49ecc0745855374efbdb5 100644 (file)
@@ -48,6 +48,7 @@ typedef struct nw_port_info nw_port_info_t;
 #include "config.h"
 #include "daemon.h"
 #include "port-bonding.h"
+#include "port-vlan.h"
 
 struct nw_port_info {
        // IFLA_INFO_KIND/IFLA_INFO_DATA
@@ -93,14 +94,7 @@ struct nw_port {
        struct nw_port_bonding bonding;
 
        // VLAN settings
-       struct nw_port_vlan {
-               nw_port* parent;
-               int id;
-
-               // If the parent has not been read from the configuration we will
-               // save the name and try to find it later.
-               char __parent_name[IF_NAMESIZE];
-       } vlan;
+       struct nw_port_vlan vlan;
 };
 
 int nw_port_create(nw_port** port, nw_daemon* daemon,