chiark / gitweb /
libsystemd-network: move network-utils from src/shared
authorTom Gundersen <teg@jklm.no>
Fri, 21 Mar 2014 20:38:14 +0000 (21:38 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 21 Mar 2014 20:54:37 +0000 (21:54 +0100)
This does not belong in shared as it is mostly a detail of our networking subsystem.

Moreover, now we can use libudev here, which will simplify things.

13 files changed:
Makefile.am
src/libsystemd-network/network-internal.c [moved from src/shared/net-util.c with 99% similarity]
src/libsystemd-network/network-internal.h [moved from src/shared/net-util.h with 99% similarity]
src/network/network-util.h
src/network/networkd-address.c
src/network/networkd-link.c
src/network/networkd-netdev-gperf.gperf
src/network/networkd-netdev.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-route.c
src/udev/net/link-config-gperf.gperf
src/udev/net/link-config.c

index 65a7ffeb2720ea440f6ce6c16843597701b894e5..54cd1c6bdf5d1bd3e3f68efb184a8576d96967f6 100644 (file)
@@ -779,8 +779,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/ima-util.h \
        src/shared/ptyfwd.c \
        src/shared/ptyfwd.h \
-       src/shared/net-util.c \
-       src/shared/net-util.h \
        src/shared/errno-list.c \
        src/shared/errno-list.h \
        src/shared/af-list.c \
@@ -2460,7 +2458,9 @@ libsystemd_network_la_SOURCES = \
        src/libsystemd-network/sd-ipv4ll.c \
        src/libsystemd-network/ipv4ll-network.c \
        src/libsystemd-network/ipv4ll-packet.c \
-       src/libsystemd-network/ipv4ll-internal.h
+       src/libsystemd-network/ipv4ll-internal.h \
+       src/libsystemd-network/network-internal.c \
+       src/libsystemd-network/network-internal.h
 
 libsystemd_network_la_LIBADD = \
        libsystemd-label.la \
@@ -2720,6 +2720,7 @@ libudev_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-label.la \
        libsystemd-internal.la \
+       libsystemd-network.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
similarity index 99%
rename from src/shared/net-util.c
rename to src/libsystemd-network/network-internal.c
index 1c223117b88dcb83a2bf4f5b7d83acd756c474ef..eed0fda92df2248c13d11b3edddf3acf74998b7d 100644 (file)
@@ -27,7 +27,7 @@
 #include "strv.h"
 #include "siphash24.h"
 #include "libudev-private.h"
-#include "net-util.h"
+#include "network-internal.h"
 #include "log.h"
 #include "utf8.h"
 #include "util.h"
similarity index 99%
rename from src/shared/net-util.h
rename to src/libsystemd-network/network-internal.h
index 4a8d3f9fdfde03430eb5e6499f92525f959d6fda..65cd0d72a04b521d4b214859c3293de0c9f2446a 100644 (file)
@@ -25,6 +25,7 @@
 #include <netinet/in.h>
 #include <stdbool.h>
 
+#include "udev.h"
 #include "condition-util.h"
 
 bool net_match_config(const struct ether_addr *match_mac,
index 9979e6d9060d7b6f580e2dc84e163adbcd99c9a4..139efc767752dd207a4f8339be96a6af3772ea21 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include "util.h"
+#include "sd-network.h"
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_network_monitor*, sd_network_monitor_unref);
 
index 414b3bccfa6430409fb48fc3e7006ca2f88944bb..dd4c822c674a52b44ce8e99a7651fcc91e397b0c 100644 (file)
@@ -26,7 +26,7 @@
 #include "utf8.h"
 #include "util.h"
 #include "conf-parser.h"
-#include "net-util.h"
+#include "network-internal.h"
 
 int address_new_static(Network *network, unsigned section, Address **ret) {
         _cleanup_address_free_ Address *address = NULL;
index 4044f0b5a52e65dfd6e0febd4957b809c80dd797..aa59dd7cf44efb735ef07c5395f5bfc36b491994 100644 (file)
@@ -26,7 +26,7 @@
 #include "libudev-private.h"
 #include "util.h"
 #include "bus-util.h"
-#include "net-util.h"
+#include "network-internal.h"
 
 #include "dhcp-lease-internal.h"
 
index 2793d77a79329a484de6c591ff331b6dafaa70b5..ea7ba5734b8a71fbccf839fe3f411563ad00d1a0 100644 (file)
@@ -2,7 +2,7 @@
 #include <stddef.h>
 #include "conf-parser.h"
 #include "networkd.h"
-#include "net-util.h"
+#include "network-internal.h"
 %}
 struct ConfigPerfItem;
 %null_strings
index 298bf277f31e526bc44b4e38f36dd6757d905ffc..3a670b3f0e7f970af78f9e6121b40815a3d89c91 100644 (file)
@@ -20,7 +20,7 @@
 ***/
 
 #include "networkd.h"
-#include "net-util.h"
+#include "network-internal.h"
 #include "path-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
index 7e3829a4a15d18503f59833140fda20aa36c3c3c..6ba890ff9b9a24485807f49a7a3be778140c57a2 100644 (file)
@@ -2,7 +2,7 @@
 #include <stddef.h>
 #include "conf-parser.h"
 #include "networkd.h"
-#include "net-util.h"
+#include "network-internal.h"
 %}
 struct ConfigPerfItem;
 %null_strings
index 6e9915b75dabb2834ffbed4b14dd97fa4b4656f4..776a9d3040f75370ef399cb53232c5742feb5a95 100644 (file)
@@ -20,7 +20,7 @@
 ***/
 
 #include "networkd.h"
-#include "net-util.h"
+#include "network-internal.h"
 #include "path-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
index 0cb7239ca04182945015d28aa4192383529e697a..8b020adba469a29739357262e8e362a8bae6b659 100644 (file)
@@ -26,7 +26,7 @@
 #include "utf8.h"
 #include "util.h"
 #include "conf-parser.h"
-#include "net-util.h"
+#include "network-internal.h"
 
 int route_new_static(Network *network, unsigned section, Route **ret) {
         _cleanup_route_free_ Route *route = NULL;
index 819e93c4d78ad987cb86dfa0a2a309ce9ccb1ecc..f562498f6d9d3f5a490cd2ea8ed61f5057bf0bb8 100644 (file)
@@ -1,7 +1,7 @@
 %{
 #include <stddef.h>
 #include "conf-parser.h"
-#include "net-util.h"
+#include "network-internal.h"
 #include "link-config.h"
 #include "ethtool-util.h"
 %}
index 472a4150c3d4dcf832c2a61a6d3a0ea523893d90..5bb6b02c1bb7b326e823651045cfb08b1aca8f2c 100644 (file)
@@ -38,7 +38,7 @@
 #include "fileio.h"
 #include "hashmap.h"
 #include "rtnl-util.h"
-#include "net-util.h"
+#include "network-internal.h"
 #include "siphash24.h"
 
 struct link_config_ctx {