From 4d6ac814d5a46ca08a6f3cd6a1431a17cd65bc3e Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 5 Jun 2023 14:54:20 +0000 Subject: [PATCH] ports: Move VLAN settings into its own header file Signed-off-by: Michael Tremer --- src/networkd/port-vlan.h | 11 +++++++++++ src/networkd/port.h | 10 ++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/networkd/port-vlan.h b/src/networkd/port-vlan.h index f02c529c..cffc1787 100644 --- a/src/networkd/port-vlan.h +++ b/src/networkd/port-vlan.h @@ -23,6 +23,17 @@ #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 diff --git a/src/networkd/port.h b/src/networkd/port.h index f8beed3b..21e2a121 100644 --- a/src/networkd/port.h +++ b/src/networkd/port.h @@ -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, -- 2.47.2