]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/networkd/port.c
ports: Add scaffolding for physical Ethernet interfaces
[people/ms/network.git] / src / networkd / port.c
index 84fceee885ad04ff32e942487b910e59c24e8f2c..f54795694640bed6d584afc6fc18cc785b954518 100644 (file)
 #include "port.h"
 #include "port-bonding.h"
 #include "port-dummy.h"
+#include "port-ethernet.h"
 #include "port-veth.h"
 #include "port-vlan.h"
 #include "stats-collector.h"
 #include "string.h"
 
 static const nw_string_table_t nw_port_type_id[] = {
-       { NW_PORT_BONDING, "bonding" },
-       { NW_PORT_DUMMY,   "dummy" },
-       { NW_PORT_VETH,    "veth", },
-       { NW_PORT_VLAN,    "vlan" },
+       { NW_PORT_BONDING,  "bonding" },
+       { NW_PORT_DUMMY,    "dummy" },
+       { NW_PORT_ETHERNET, "ethernet" },
+       { NW_PORT_VETH,     "veth", },
+       { NW_PORT_VLAN,     "vlan" },
        { -1, NULL },
 };
 
@@ -167,8 +169,13 @@ int nw_port_create(nw_port** port, nw_daemon* daemon,
                        p->type = &nw_port_type_dummy;
                        break;
 
+               case NW_PORT_ETHERNET:
+                       p->type = &nw_port_type_ethernet;
+                       break;
+
                case NW_PORT_VETH:
                        p->type = &nw_port_type_veth;
+                       break;
 
                case NW_PORT_VLAN:
                        p->type = &nw_port_type_vlan;
@@ -329,6 +336,7 @@ int __nw_port_drop_port(nw_daemon* daemon, nw_port* port, void* data) {
 
                case NW_PORT_BONDING:
                case NW_PORT_DUMMY:
+               case NW_PORT_ETHERNET:
                case NW_PORT_VETH:
                        break;
        }