net: split net into net{,-common,-legacy,-lwip}
Make net.h a wrapper which includes net-common.h and either
net-legacy.h or net-lwip.h based on NET_LWIP. The function
copy_filename() can be useful when NET_LWIP is enabled, therefore
move it out of net/net.c which is built only when networking choice
is NET and create a new file net/net-common.c.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/include/net-lwip.h b/include/net-lwip.h
new file mode 100644
index 0000000..5c3f9e7
--- /dev/null
+++ b/include/net-lwip.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __NET_LWIP_H__
+#define __NET_LWIP_H__
+
+#include <lwip/ip4.h>
+#include <lwip/netif.h>
+
+struct netif *net_lwip_new_netif(struct udevice *udev);
+struct netif *net_lwip_new_netif_noip(struct udevice *udev);
+void net_lwip_remove_netif(struct netif *netif);
+struct netif *net_lwip_get_netif(void);
+
+#endif /* __NET_LWIP_H__ */