summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-25 14:22:43 +0100
committerTom Gundersen <teg@jklm.no>2015-10-25 14:22:43 +0100
commit7c8871d31510865e40c8628ef765996202a3cc00 (patch)
tree622b7aa085999fe3d2908772ff0d0c6ec5bf4400 /src/network
parent7c257428969aaba2acc4e26753c86d6f4774354a (diff)
parentf00022dd121c73b543ae667ddce9814bd67a1b73 (diff)
Merge pull request #1654 from poettering/util-lib
Various changes to src/basic/
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c1
-rw-r--r--src/network/networkd-address-pool.c3
-rw-r--r--src/network/networkd-address.c4
-rw-r--r--src/network/networkd-dhcp6.c9
-rw-r--r--src/network/networkd-link.c6
-rw-r--r--src/network/networkd-link.h4
-rw-r--r--src/network/networkd-manager.c18
-rw-r--r--src/network/networkd-ndisc.c4
-rw-r--r--src/network/networkd-netdev-bond.c6
-rw-r--r--src/network/networkd-netdev-tunnel.c8
-rw-r--r--src/network/networkd-netdev-tuntap.c1
-rw-r--r--src/network/networkd-netdev.c7
-rw-r--r--src/network/networkd-network-bus.c4
-rw-r--r--src/network/networkd-network.c9
-rw-r--r--src/network/networkd-route.c4
-rw-r--r--src/network/networkd-util.c4
-rw-r--r--src/network/networkd-wait-online-link.c2
17 files changed, 51 insertions, 43 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index c78b9444b6..acb6b7ce24 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -37,6 +37,7 @@
#include "netlink-util.h"
#include "pager.h"
#include "socket-util.h"
+#include "string-util.h"
#include "strv.h"
#include "terminal-util.h"
#include "util.h"
diff --git a/src/network/networkd-address-pool.c b/src/network/networkd-address-pool.c
index b3450c1456..08e0b9a64b 100644
--- a/src/network/networkd-address-pool.c
+++ b/src/network/networkd-address-pool.c
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "networkd.h"
#include "networkd-address-pool.h"
+#include "networkd.h"
#include "set.h"
+#include "string-util.h"
int address_pool_new(
Manager *m,
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 5d443e9b9b..dcd7b482d3 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -24,11 +24,11 @@
#include "conf-parser.h"
#include "firewall-util.h"
#include "netlink-util.h"
+#include "networkd.h"
#include "set.h"
+#include "string-util.h"
#include "utf8.h"
#include "util.h"
-
-#include "networkd.h"
#include "networkd-address.h"
int address_new(Address **ret) {
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 57c81cb646..c3332bb1ac 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -22,11 +22,11 @@
#include <netinet/ether.h>
#include <linux/if.h>
-#include "networkd-link.h"
-#include "network-internal.h"
-
#include "sd-dhcp6-client.h"
+#include "network-internal.h"
+#include "networkd-link.h"
+
static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link);
static int dhcp6_lease_information_acquired(sd_dhcp6_client *client,
@@ -166,8 +166,7 @@ static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) {
}
int dhcp6_configure(Link *link, bool inf_req) {
- int r;
- bool information_request;
+ int r, information_request;
assert_return(link, -EINVAL);
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 09f4bd7029..1144c82c17 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -25,18 +25,18 @@
#include "bus-util.h"
#include "dhcp-lease-internal.h"
+#include "fd-util.h"
#include "fileio.h"
#include "netlink-util.h"
#include "network-internal.h"
+#include "networkd-link.h"
+#include "networkd-netdev.h"
#include "set.h"
#include "socket-util.h"
#include "udev-util.h"
#include "util.h"
#include "virt.h"
-#include "networkd-link.h"
-#include "networkd-netdev.h"
-
bool link_dhcp6_enabled(Link *link) {
if (link->flags & IFF_LOOPBACK)
return false;
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
index 5c92df4ca8..2a69f1c16b 100644
--- a/src/network/networkd-link.h
+++ b/src/network/networkd-link.h
@@ -25,10 +25,10 @@
#include "sd-dhcp-client.h"
#include "sd-dhcp-server.h"
-#include "sd-ipv4ll.h"
-#include "sd-ndisc.h"
#include "sd-dhcp6-client.h"
+#include "sd-ipv4ll.h"
#include "sd-lldp.h"
+#include "sd-ndisc.h"
typedef struct Link Link;
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index e0e1679ede..febfe2ff81 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -22,21 +22,21 @@
#include <sys/socket.h>
#include <linux/if.h>
-#include "sd-netlink.h"
#include "sd-daemon.h"
+#include "sd-netlink.h"
-#include "conf-parser.h"
-#include "path-util.h"
-#include "libudev-private.h"
-#include "udev-util.h"
-#include "netlink-util.h"
#include "bus-util.h"
+#include "conf-parser.h"
#include "def.h"
-#include "virt.h"
-#include "set.h"
+#include "fd-util.h"
+#include "libudev-private.h"
#include "local-addresses.h"
-
+#include "netlink-util.h"
#include "networkd.h"
+#include "path-util.h"
+#include "set.h"
+#include "udev-util.h"
+#include "virt.h"
/* use 8 MB for receive socket kernel queue. */
#define RCVBUF_SIZE (8*1024*1024)
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 637c29973e..33e692f97f 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -22,10 +22,10 @@
#include <netinet/ether.h>
#include <linux/if.h>
-#include "networkd-link.h"
-
#include "sd-ndisc.h"
+#include "networkd-link.h"
+
static void ndisc_router_handler(sd_ndisc *nd, int event, void *userdata) {
Link *link = userdata;
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
index bcaba57937..f66c88c35e 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/network/networkd-netdev-bond.c
@@ -23,10 +23,12 @@
#include <netinet/ether.h>
#include <linux/if_bonding.h>
-#include "conf-parser.h"
#include "sd-netlink.h"
-#include "networkd-netdev-bond.h"
+
+#include "conf-parser.h"
#include "missing.h"
+#include "string-util.h"
+#include "networkd-netdev-bond.h"
/*
* Number of seconds between instances where the bonding
diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c
index c9b7fa96e2..bbc4606258 100644
--- a/src/network/networkd-netdev-tunnel.c
+++ b/src/network/networkd-netdev-tunnel.c
@@ -26,11 +26,13 @@
#include <linux/ip6_tunnel.h>
#include "sd-netlink.h"
-#include "networkd-netdev-tunnel.h"
+
+#include "conf-parser.h"
+#include "missing.h"
#include "networkd-link.h"
+#include "string-util.h"
#include "util.h"
-#include "missing.h"
-#include "conf-parser.h"
+#include "networkd-netdev-tunnel.h"
#define DEFAULT_TNL_HOP_LIMIT 64
#define IP6_FLOWINFO_FLOWLABEL htonl(0x000FFFFF)
diff --git a/src/network/networkd-netdev-tuntap.c b/src/network/networkd-netdev-tuntap.c
index 6a808b6205..3096c4f72a 100644
--- a/src/network/networkd-netdev-tuntap.c
+++ b/src/network/networkd-netdev-tuntap.c
@@ -24,6 +24,7 @@
#include <linux/if_tun.h>
#include "networkd-netdev-tuntap.h"
+#include "fd-util.h"
#define TUN_DEV "/dev/net/tun"
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 3d4865a780..bd1129a09b 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -23,13 +23,14 @@
#include "conf-files.h"
#include "conf-parser.h"
+#include "fd-util.h"
#include "list.h"
-#include "siphash24.h"
#include "netlink-util.h"
#include "network-internal.h"
-
-#include "networkd.h"
#include "networkd-netdev.h"
+#include "networkd.h"
+#include "siphash24.h"
+#include "string-util.h"
const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
diff --git a/src/network/networkd-network-bus.c b/src/network/networkd-network-bus.c
index 5717a15327..2199b93baa 100644
--- a/src/network/networkd-network-bus.c
+++ b/src/network/networkd-network-bus.c
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "strv.h"
-
#include "networkd.h"
+#include "string-util.h"
+#include "strv.h"
static int property_get_ether_addrs(
sd_bus *bus,
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 97ada56866..150fd052c2 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -24,13 +24,14 @@
#include "conf-files.h"
#include "conf-parser.h"
-#include "util.h"
-#include "hostname-util.h"
#include "dns-domain.h"
+#include "fd-util.h"
+#include "hostname-util.h"
#include "network-internal.h"
-
-#include "networkd.h"
#include "networkd-network.h"
+#include "networkd.h"
+#include "string-util.h"
+#include "util.h"
static int network_load_one(Manager *manager, const char *filename) {
_cleanup_network_free_ Network *network = NULL;
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index aa4ec230ab..fcca679093 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -22,9 +22,9 @@
#include "conf-parser.h"
#include "in-addr-util.h"
#include "netlink-util.h"
-#include "util.h"
-
#include "networkd.h"
+#include "string-util.h"
+#include "util.h"
#include "networkd-route.h"
int route_new(Route **ret) {
diff --git a/src/network/networkd-util.c b/src/network/networkd-util.c
index dde6b327ed..4e4a4bbd58 100644
--- a/src/network/networkd-util.c
+++ b/src/network/networkd-util.c
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "util.h"
#include "conf-parser.h"
-
#include "networkd-util.h"
+#include "string-util.h"
+#include "util.h"
const char *address_family_boolean_to_string(AddressFamilyBoolean b) {
if (b == ADDRESS_FAMILY_YES ||
diff --git a/src/network/networkd-wait-online-link.c b/src/network/networkd-wait-online-link.c
index cacb4c257e..cc4b46d5b0 100644
--- a/src/network/networkd-wait-online-link.c
+++ b/src/network/networkd-wait-online-link.c
@@ -20,10 +20,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-
#include "sd-network.h"
#include "networkd-wait-online-link.h"
+#include "string-util.h"
int link_new(Manager *m, Link **ret, int ifindex, const char *ifname) {
_cleanup_(link_freep) Link *l = NULL;