summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-01 16:33:32 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-01 16:33:32 -0400
commit272b48187cee0b42b6e936ad2c045f13b391f3ad (patch)
tree383049270ccbac5040e4404bbe71ac49d0c423db /src/libsystemd-network
parent46277a7844c854210eaa0a3612fa297ec33ddb7b (diff)
find src \( -name '*.h' -o -name '*.c' \) -type f -exec ./fixup_includes {} \;
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-internal.h5
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h7
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-server-internal.h4
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h3
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-internal.h2
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-neighbor.h5
-rw-r--r--src/libsystemd-network/include/systemd-network/network-internal.h3
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp-client.h3
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h3
-rw-r--r--src/libsystemd-network/src/arp-util.c4
-rw-r--r--src/libsystemd-network/src/dhcp-identifier.c10
-rw-r--r--src/libsystemd-network/src/dhcp-network.c8
-rw-r--r--src/libsystemd-network/src/dhcp-option.c1
-rw-r--r--src/libsystemd-network/src/dhcp6-network.c6
-rw-r--r--src/libsystemd-network/src/dhcp6-option.c9
-rw-r--r--src/libsystemd-network/src/icmp6-util.c4
-rw-r--r--src/libsystemd-network/src/lldp-neighbor.c2
-rw-r--r--src/libsystemd-network/src/lldp-network.c2
-rw-r--r--src/libsystemd-network/src/network-internal.c11
-rw-r--r--src/libsystemd-network/src/sd-dhcp-client.c15
-rw-r--r--src/libsystemd-network/src/sd-dhcp-lease.c11
-rw-r--r--src/libsystemd-network/src/sd-dhcp-server.c7
-rw-r--r--src/libsystemd-network/src/sd-dhcp6-client.c15
-rw-r--r--src/libsystemd-network/src/sd-dhcp6-lease.c4
-rw-r--r--src/libsystemd-network/src/sd-ipv4acd.c5
-rw-r--r--src/libsystemd-network/src/sd-ipv4ll.c5
-rw-r--r--src/libsystemd-network/src/sd-lldp.c7
-rw-r--r--src/libsystemd-network/src/sd-ndisc.c5
-rw-r--r--src/libsystemd-network/test/test-acd.c5
-rw-r--r--src/libsystemd-network/test/test-dhcp-client.c6
-rw-r--r--src/libsystemd-network/test/test-dhcp-option.c4
-rw-r--r--src/libsystemd-network/test/test-dhcp-server.c2
-rw-r--r--src/libsystemd-network/test/test-dhcp6-client.c8
-rw-r--r--src/libsystemd-network/test/test-ipv4ll-manual.c2
-rw-r--r--src/libsystemd-network/test/test-ipv4ll.c5
-rw-r--r--src/libsystemd-network/test/test-lldp.c4
-rw-r--r--src/libsystemd-network/test/test-ndisc-rs.c5
37 files changed, 95 insertions, 112 deletions
diff --git a/src/libsystemd-network/include/systemd-network/dhcp-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-internal.h
index ac9f9705eb..0fb012e240 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-internal.h
@@ -25,10 +25,9 @@
#include <net/if_arp.h>
#include <stdint.h>
-#include "systemd-network/sd-dhcp-client.h"
-
-#include "systemd-network/dhcp-protocol.h"
#include "basic/socket-util.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/sd-dhcp-client.h"
int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
uint32_t xid, const uint8_t *mac_addr,
diff --git a/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
index 048e89dc9a..d4108c1095 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
@@ -20,14 +20,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdint.h>
#include <linux/if_packet.h>
+#include <stdint.h>
-#include "systemd-network/sd-dhcp-client.h"
-
-#include "systemd-network/dhcp-protocol.h"
#include "basic/list.h"
#include "basic/util.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/sd-dhcp-client.h"
struct sd_dhcp_route {
struct in_addr dst_addr;
diff --git a/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
index 97543b992a..53b46a8514 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
@@ -20,13 +20,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "systemd-network/sd-dhcp-server.h"
#include <systemd/sd-event.h>
-#include "systemd-network/dhcp-internal.h"
#include "basic/hashmap.h"
#include "basic/log.h"
#include "basic/util.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/sd-dhcp-server.h"
typedef struct DHCPClientId {
size_t length;
diff --git a/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
index c7c7a08769..3f51830c94 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
@@ -22,9 +22,8 @@
#include <stdint.h>
-#include "systemd-network/sd-dhcp6-lease.h"
-
#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/sd-dhcp6-lease.h"
struct sd_dhcp6_lease {
unsigned n_ref;
diff --git a/src/libsystemd-network/include/systemd-network/lldp-internal.h b/src/libsystemd-network/include/systemd-network/lldp-internal.h
index 9001237fe2..a79031b40d 100644
--- a/src/libsystemd-network/include/systemd-network/lldp-internal.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-internal.h
@@ -21,11 +21,11 @@
***/
#include <systemd/sd-event.h>
-#include "systemd-network/sd-lldp.h"
#include "basic/hashmap.h"
#include "basic/log.h"
#include "basic/prioq.h"
+#include "systemd-network/sd-lldp.h"
struct sd_lldp {
int ifindex;
diff --git a/src/libsystemd-network/include/systemd-network/lldp-neighbor.h b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
index f2730bb608..cbd9470be0 100644
--- a/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
@@ -23,11 +23,10 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "systemd-network/sd-lldp.h"
-
#include "basic/hash-funcs.h"
-#include "systemd-network/lldp-internal.h"
#include "basic/time-util.h"
+#include "systemd-network/lldp-internal.h"
+#include "systemd-network/sd-lldp.h"
typedef struct LLDPNeighborID {
/* The spec calls this an "MSAP identifier" */
diff --git a/src/libsystemd-network/include/systemd-network/network-internal.h b/src/libsystemd-network/include/systemd-network/network-internal.h
index a5606cb2a8..4f98e84c80 100644
--- a/src/libsystemd-network/include/systemd-network/network-internal.h
+++ b/src/libsystemd-network/include/systemd-network/network-internal.h
@@ -21,9 +21,8 @@
#include <stdbool.h>
-#include "systemd-network/sd-dhcp-lease.h"
-
#include "shared/condition.h"
+#include "systemd-network/sd-dhcp-lease.h"
#include "udev.h"
bool net_match_config(const struct ether_addr *match_mac,
diff --git a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
index cc51933b1b..375acd5ea7 100644
--- a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
@@ -25,9 +25,10 @@
#include <netinet/in.h>
#include <sys/types.h>
-#include "systemd-network/sd-dhcp-lease.h"
#include <systemd/sd-event.h>
+#include "systemd-network/sd-dhcp-lease.h"
+
#include "_sd-common.h"
_SD_BEGIN_DECLARATIONS;
diff --git a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
index dd6cb32aae..7111ca1274 100644
--- a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
@@ -24,9 +24,10 @@
#include <net/ethernet.h>
#include <sys/types.h>
-#include "systemd-network/sd-dhcp6-lease.h"
#include <systemd/sd-event.h>
+#include "systemd-network/sd-dhcp6-lease.h"
+
#include "_sd-common.h"
_SD_BEGIN_DECLARATIONS;
diff --git a/src/libsystemd-network/src/arp-util.c b/src/libsystemd-network/src/arp-util.c
index a254fe7c62..15867c24a3 100644
--- a/src/libsystemd-network/src/arp-util.c
+++ b/src/libsystemd-network/src/arp-util.c
@@ -18,12 +18,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/filter.h>
#include <arpa/inet.h>
+#include <linux/filter.h>
-#include "systemd-network/arp-util.h"
#include "basic/fd-util.h"
#include "basic/util.h"
+#include "systemd-network/arp-util.h"
int arp_network_bind_raw_socket(int ifindex, be32_t address, const struct ether_addr *eth_mac) {
struct sock_filter filter[] = {
diff --git a/src/libsystemd-network/src/dhcp-identifier.c b/src/libsystemd-network/src/dhcp-identifier.c
index fce44636bc..3edba38bd8 100644
--- a/src/libsystemd-network/src/dhcp-identifier.c
+++ b/src/libsystemd-network/src/dhcp-identifier.c
@@ -17,16 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
+#include <libudev.h>
#include <systemd/sd-id128.h>
-#include "systemd-network/dhcp-identifier.h"
-#include "systemd-network/dhcp6-protocol.h"
-#include "systemd-network/network-internal.h"
#include "basic/siphash24.h"
#include "basic/sparse-endian.h"
-#include "shared/udev-util.h"
#include "basic/virt.h"
+#include "shared/udev-util.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/network-internal.h"
#define SYSTEMD_PEN 43793
#define HASH_KEY SD_ID128_MAKE(80,11,8c,c2,fe,4a,03,ee,3e,d6,0c,6f,36,39,14,09)
diff --git a/src/libsystemd-network/src/dhcp-network.c b/src/libsystemd-network/src/dhcp-network.c
index a310e9e88e..d5fa3ebf2d 100644
--- a/src/libsystemd-network/src/dhcp-network.c
+++ b/src/libsystemd-network/src/dhcp-network.c
@@ -18,18 +18,18 @@
***/
#include <errno.h>
+#include <linux/filter.h>
+#include <linux/if_infiniband.h>
+#include <linux/if_packet.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
-#include <linux/filter.h>
-#include <linux/if_infiniband.h>
-#include <linux/if_packet.h>
-#include "systemd-network/dhcp-internal.h"
#include "basic/fd-util.h"
#include "basic/socket-util.h"
+#include "systemd-network/dhcp-internal.h"
static int _bind_raw_socket(int ifindex, union sockaddr_union *link,
uint32_t xid, const uint8_t *mac_addr,
diff --git a/src/libsystemd-network/src/dhcp-option.c b/src/libsystemd-network/src/dhcp-option.c
index bd0ecd11e6..f47b2ae9e7 100644
--- a/src/libsystemd-network/src/dhcp-option.c
+++ b/src/libsystemd-network/src/dhcp-option.c
@@ -24,7 +24,6 @@
#include "basic/alloc-util.h"
#include "basic/utf8.h"
-
#include "systemd-network/dhcp-internal.h"
static int option_append(uint8_t options[], size_t size, size_t *offset,
diff --git a/src/libsystemd-network/src/dhcp6-network.c b/src/libsystemd-network/src/dhcp6-network.c
index 53019977fd..0222b03a75 100644
--- a/src/libsystemd-network/src/dhcp6-network.c
+++ b/src/libsystemd-network/src/dhcp6-network.c
@@ -18,6 +18,7 @@
***/
#include <errno.h>
+#include <linux/if_packet.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
#include <stdio.h>
@@ -25,12 +26,11 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-#include <linux/if_packet.h>
-#include "systemd-network/dhcp6-internal.h"
-#include "systemd-network/dhcp6-protocol.h"
#include "basic/fd-util.h"
#include "basic/socket-util.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
int dhcp6_network_bind_udp_socket(int index, struct in6_addr *local_address) {
union sockaddr_union src = {
diff --git a/src/libsystemd-network/src/dhcp6-option.c b/src/libsystemd-network/src/dhcp6-option.c
index 8c7c179587..060a822834 100644
--- a/src/libsystemd-network/src/dhcp6-option.c
+++ b/src/libsystemd-network/src/dhcp6-option.c
@@ -21,16 +21,15 @@
#include <netinet/in.h>
#include <string.h>
-#include "systemd-network/sd-dhcp6-client.h"
-
#include "basic/alloc-util.h"
-#include "systemd-network/dhcp6-internal.h"
-#include "systemd-network/dhcp6-protocol.h"
-#include "shared/dns-domain.h"
#include "basic/sparse-endian.h"
#include "basic/strv.h"
#include "basic/unaligned.h"
#include "basic/util.h"
+#include "shared/dns-domain.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/sd-dhcp6-client.h"
#define DHCP6_OPTION_IA_NA_LEN 12
#define DHCP6_OPTION_IA_TA_LEN 4
diff --git a/src/libsystemd-network/src/icmp6-util.c b/src/libsystemd-network/src/icmp6-util.c
index 582e5d89c1..cdca20efa5 100644
--- a/src/libsystemd-network/src/icmp6-util.c
+++ b/src/libsystemd-network/src/icmp6-util.c
@@ -18,6 +18,7 @@
***/
#include <errno.h>
+#include <linux/if_packet.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
@@ -26,11 +27,10 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-#include <linux/if_packet.h>
#include "basic/fd-util.h"
-#include "systemd-network/icmp6-util.h"
#include "basic/socket-util.h"
+#include "systemd-network/icmp6-util.h"
#define IN6ADDR_ALL_ROUTERS_MULTICAST_INIT \
{ { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
diff --git a/src/libsystemd-network/src/lldp-neighbor.c b/src/libsystemd-network/src/lldp-neighbor.c
index 520d0090af..406af019f5 100644
--- a/src/libsystemd-network/src/lldp-neighbor.c
+++ b/src/libsystemd-network/src/lldp-neighbor.c
@@ -22,9 +22,9 @@
#include "basic/ether-addr-util.h"
#include "basic/hexdecoct.h"
#include "basic/in-addr-util.h"
+#include "basic/unaligned.h"
#include "systemd-network/lldp-internal.h"
#include "systemd-network/lldp-neighbor.h"
-#include "basic/unaligned.h"
static void lldp_neighbor_id_hash_func(const void *p, struct siphash *state) {
const LLDPNeighborID *id = p;
diff --git a/src/libsystemd-network/src/lldp-network.c b/src/libsystemd-network/src/lldp-network.c
index 9af66bdcb5..7e7281d53b 100644
--- a/src/libsystemd-network/src/lldp-network.c
+++ b/src/libsystemd-network/src/lldp-network.c
@@ -22,8 +22,8 @@
#include <netinet/if_ether.h>
#include "basic/fd-util.h"
-#include "systemd-network/lldp-network.h"
#include "basic/socket-util.h"
+#include "systemd-network/lldp-network.h"
int lldp_network_bind_raw_socket(int ifindex) {
diff --git a/src/libsystemd-network/src/network-internal.c b/src/libsystemd-network/src/network-internal.c
index e3973c11a9..87feb094c6 100644
--- a/src/libsystemd-network/src/network-internal.c
+++ b/src/libsystemd-network/src/network-internal.c
@@ -21,16 +21,10 @@
#include <linux/if.h>
#include <netinet/ether.h>
-#include "systemd-network/sd-ndisc.h"
-
#include "basic/alloc-util.h"
-#include "shared/condition.h"
-#include "shared/conf-parser.h"
-#include "systemd-network/dhcp-lease-internal.h"
#include "basic/ether-addr-util.h"
#include "basic/hexdecoct.h"
#include "basic/log.h"
-#include "systemd-network/network-internal.h"
#include "basic/parse-util.h"
#include "basic/siphash24.h"
#include "basic/socket-util.h"
@@ -38,6 +32,11 @@
#include "basic/strv.h"
#include "basic/utf8.h"
#include "basic/util.h"
+#include "shared/condition.h"
+#include "shared/conf-parser.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-ndisc.h"
const char *net_get_name(struct udev_device *device) {
const char *name, *field;
diff --git a/src/libsystemd-network/src/sd-dhcp-client.c b/src/libsystemd-network/src/sd-dhcp-client.c
index 7f734a7b37..b3ef17961d 100644
--- a/src/libsystemd-network/src/sd-dhcp-client.c
+++ b/src/libsystemd-network/src/sd-dhcp-client.c
@@ -18,27 +18,26 @@
***/
#include <errno.h>
+#include <linux/if_infiniband.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
-#include <linux/if_infiniband.h>
-
-#include "systemd-network/sd-dhcp-client.h"
#include "basic/alloc-util.h"
#include "basic/async.h"
-#include "systemd-network/dhcp-identifier.h"
-#include "systemd-network/dhcp-internal.h"
-#include "systemd-network/dhcp-lease-internal.h"
-#include "systemd-network/dhcp-protocol.h"
-#include "shared/dns-domain.h"
#include "basic/hostname-util.h"
#include "basic/random-util.h"
#include "basic/string-util.h"
#include "basic/util.h"
+#include "shared/dns-domain.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/sd-dhcp-client.h"
#define MAX_CLIENT_ID_LEN (sizeof(uint32_t) + MAX_DUID_LEN) /* Arbitrary limit */
#define MAX_MAC_ADDR_LEN CONST_MAX(INFINIBAND_ALEN, ETH_ALEN)
diff --git a/src/libsystemd-network/src/sd-dhcp-lease.c b/src/libsystemd-network/src/sd-dhcp-lease.c
index d0e54ae376..0edc075b58 100644
--- a/src/libsystemd-network/src/sd-dhcp-lease.c
+++ b/src/libsystemd-network/src/sd-dhcp-lease.c
@@ -24,22 +24,21 @@
#include <stdlib.h>
#include <string.h>
-#include "systemd-network/sd-dhcp-lease.h"
-
#include "basic/alloc-util.h"
-#include "systemd-network/dhcp-lease-internal.h"
-#include "systemd-network/dhcp-protocol.h"
-#include "shared/dns-domain.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/hexdecoct.h"
#include "basic/hostname-util.h"
#include "basic/in-addr-util.h"
-#include "systemd-network/network-internal.h"
#include "basic/parse-util.h"
#include "basic/stdio-util.h"
#include "basic/string-util.h"
#include "basic/unaligned.h"
+#include "shared/dns-domain.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-dhcp-lease.h"
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) {
assert_return(lease, -EINVAL);
diff --git a/src/libsystemd-network/src/sd-dhcp-server.c b/src/libsystemd-network/src/sd-dhcp-server.c
index 2209855067..5abc923d92 100644
--- a/src/libsystemd-network/src/sd-dhcp-server.c
+++ b/src/libsystemd-network/src/sd-dhcp-server.c
@@ -20,15 +20,14 @@
#include <sys/ioctl.h>
-#include "systemd-network/sd-dhcp-server.h"
-
#include "basic/alloc-util.h"
-#include "systemd-network/dhcp-internal.h"
-#include "systemd-network/dhcp-server-internal.h"
#include "basic/fd-util.h"
#include "basic/in-addr-util.h"
#include "basic/siphash24.h"
#include "basic/string-util.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-server-internal.h"
+#include "systemd-network/sd-dhcp-server.h"
#define DHCP_DEFAULT_LEASE_TIME_USEC USEC_PER_HOUR
#define DHCP_MAX_LEASE_TIME_USEC (USEC_PER_HOUR*12)
diff --git a/src/libsystemd-network/src/sd-dhcp6-client.c b/src/libsystemd-network/src/sd-dhcp6-client.c
index c2aa36aa9d..1f46946b14 100644
--- a/src/libsystemd-network/src/sd-dhcp6-client.c
+++ b/src/libsystemd-network/src/sd-dhcp6-client.c
@@ -18,24 +18,23 @@
***/
#include <errno.h>
+#include <linux/if_infiniband.h>
#include <string.h>
#include <sys/ioctl.h>
-#include <linux/if_infiniband.h>
-
-#include "systemd-network/sd-dhcp6-client.h"
#include "basic/alloc-util.h"
-#include "systemd-network/dhcp-identifier.h"
-#include "systemd-network/dhcp6-internal.h"
-#include "systemd-network/dhcp6-lease-internal.h"
-#include "systemd-network/dhcp6-protocol.h"
#include "basic/fd-util.h"
#include "basic/in-addr-util.h"
-#include "systemd-network/network-internal.h"
#include "basic/random-util.h"
#include "basic/socket-util.h"
#include "basic/string-table.h"
#include "basic/util.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-lease-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-dhcp6-client.h"
#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
diff --git a/src/libsystemd-network/src/sd-dhcp6-lease.c b/src/libsystemd-network/src/sd-dhcp6-lease.c
index da241936c5..cb53533492 100644
--- a/src/libsystemd-network/src/sd-dhcp6-lease.c
+++ b/src/libsystemd-network/src/sd-dhcp6-lease.c
@@ -21,10 +21,10 @@
#include <errno.h>
#include "basic/alloc-util.h"
-#include "systemd-network/dhcp6-lease-internal.h"
-#include "systemd-network/dhcp6-protocol.h"
#include "basic/strv.h"
#include "basic/util.h"
+#include "systemd-network/dhcp6-lease-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
int dhcp6_lease_clear_timers(DHCP6IA *ia) {
assert_return(ia, -EINVAL);
diff --git a/src/libsystemd-network/src/sd-ipv4acd.c b/src/libsystemd-network/src/sd-ipv4acd.c
index 8c603d8a7d..b361b16e7f 100644
--- a/src/libsystemd-network/src/sd-ipv4acd.c
+++ b/src/libsystemd-network/src/sd-ipv4acd.c
@@ -24,10 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include "systemd-network/sd-ipv4acd.h"
-
#include "basic/alloc-util.h"
-#include "systemd-network/arp-util.h"
#include "basic/fd-util.h"
#include "basic/in-addr-util.h"
#include "basic/list.h"
@@ -35,6 +32,8 @@
#include "basic/refcnt.h"
#include "basic/siphash24.h"
#include "basic/util.h"
+#include "systemd-network/arp-util.h"
+#include "systemd-network/sd-ipv4acd.h"
/* Constants from the RFC */
#define PROBE_WAIT 1
diff --git a/src/libsystemd-network/src/sd-ipv4ll.c b/src/libsystemd-network/src/sd-ipv4ll.c
index fc3c0dd090..c8428ba489 100644
--- a/src/libsystemd-network/src/sd-ipv4ll.c
+++ b/src/libsystemd-network/src/sd-ipv4ll.c
@@ -24,9 +24,6 @@
#include <stdlib.h>
#include <string.h>
-#include "systemd-network/sd-ipv4acd.h"
-#include "systemd-network/sd-ipv4ll.h"
-
#include "basic/alloc-util.h"
#include "basic/in-addr-util.h"
#include "basic/list.h"
@@ -35,6 +32,8 @@
#include "basic/siphash24.h"
#include "basic/sparse-endian.h"
#include "basic/util.h"
+#include "systemd-network/sd-ipv4acd.h"
+#include "systemd-network/sd-ipv4ll.h"
#define IPV4LL_NETWORK 0xA9FE0000L
#define IPV4LL_NETMASK 0xFFFF0000L
diff --git a/src/libsystemd-network/src/sd-lldp.c b/src/libsystemd-network/src/sd-lldp.c
index 09c5ba5a5b..412c070ebb 100644
--- a/src/libsystemd-network/src/sd-lldp.c
+++ b/src/libsystemd-network/src/sd-lldp.c
@@ -20,15 +20,14 @@
#include <arpa/inet.h>
-#include "systemd-network/sd-lldp.h"
-
#include "basic/alloc-util.h"
+#include "basic/ether-addr-util.h"
#include "basic/fd-util.h"
+#include "basic/socket-util.h"
#include "systemd-network/lldp-internal.h"
#include "systemd-network/lldp-neighbor.h"
#include "systemd-network/lldp-network.h"
-#include "basic/socket-util.h"
-#include "basic/ether-addr-util.h"
+#include "systemd-network/sd-lldp.h"
#define LLDP_DEFAULT_NEIGHBORS_MAX 128U
diff --git a/src/libsystemd-network/src/sd-ndisc.c b/src/libsystemd-network/src/sd-ndisc.c
index 0e19febff1..7d19373f18 100644
--- a/src/libsystemd-network/src/sd-ndisc.c
+++ b/src/libsystemd-network/src/sd-ndisc.c
@@ -24,15 +24,14 @@
#include <string.h>
#include <sys/ioctl.h>
-#include "systemd-network/sd-ndisc.h"
-
#include "basic/alloc-util.h"
#include "basic/async.h"
-#include "systemd-network/icmp6-util.h"
#include "basic/in-addr-util.h"
#include "basic/list.h"
#include "basic/socket-util.h"
#include "basic/string-util.h"
+#include "systemd-network/icmp6-util.h"
+#include "systemd-network/sd-ndisc.h"
#define NDISC_ROUTER_SOLICITATION_INTERVAL 4 * USEC_PER_SEC
#define NDISC_MAX_ROUTER_SOLICITATIONS 3
diff --git a/src/libsystemd-network/test/test-acd.c b/src/libsystemd-network/test/test-acd.c
index bf3f401ade..73f9e04e6f 100644
--- a/src/libsystemd-network/test/test-acd.c
+++ b/src/libsystemd-network/test/test-acd.c
@@ -18,11 +18,10 @@
***/
#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-
#include <linux/veth.h>
#include <net/if.h>
+#include <stdlib.h>
+#include <unistd.h>
#include <systemd/sd-event.h>
diff --git a/src/libsystemd-network/test/test-dhcp-client.c b/src/libsystemd-network/test/test-dhcp-client.c
index bee542ac42..c116696c8d 100644
--- a/src/libsystemd-network/test/test-dhcp-client.c
+++ b/src/libsystemd-network/test/test-dhcp-client.c
@@ -22,15 +22,15 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "systemd-network/sd-dhcp-client.h"
#include <systemd/sd-event.h>
#include "basic/alloc-util.h"
+#include "basic/fd-util.h"
+#include "basic/util.h"
#include "systemd-network/dhcp-identifier.h"
#include "systemd-network/dhcp-internal.h"
#include "systemd-network/dhcp-protocol.h"
-#include "basic/fd-util.h"
-#include "basic/util.h"
+#include "systemd-network/sd-dhcp-client.h"
static uint8_t mac_addr[] = {'A', 'B', 'C', '1', '2', '3'};
diff --git a/src/libsystemd-network/test/test-dhcp-option.c b/src/libsystemd-network/test/test-dhcp-option.c
index 20995c98ba..eda42b0ba5 100644
--- a/src/libsystemd-network/test/test-dhcp-option.c
+++ b/src/libsystemd-network/test/test-dhcp-option.c
@@ -4,10 +4,10 @@
#include <string.h>
#include "basic/alloc-util.h"
-#include "systemd-network/dhcp-internal.h"
-#include "systemd-network/dhcp-protocol.h"
#include "basic/macro.h"
#include "basic/util.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-protocol.h"
struct option_desc {
uint8_t sname[64];
diff --git a/src/libsystemd-network/test/test-dhcp-server.c b/src/libsystemd-network/test/test-dhcp-server.c
index d7029d1cc5..0796a98707 100644
--- a/src/libsystemd-network/test/test-dhcp-server.c
+++ b/src/libsystemd-network/test/test-dhcp-server.c
@@ -20,10 +20,10 @@
#include <errno.h>
-#include "systemd-network/sd-dhcp-server.h"
#include <systemd/sd-event.h>
#include "systemd-network/dhcp-server-internal.h"
+#include "systemd-network/sd-dhcp-server.h"
static void test_pool(struct in_addr *address, unsigned size, int ret) {
_cleanup_(sd_dhcp_server_unrefp) sd_dhcp_server *server = NULL;
diff --git a/src/libsystemd-network/test/test-dhcp6-client.c b/src/libsystemd-network/test/test-dhcp6-client.c
index 9709fabf74..66424bc624 100644
--- a/src/libsystemd-network/test/test-dhcp6-client.c
+++ b/src/libsystemd-network/test/test-dhcp6-client.c
@@ -24,16 +24,16 @@
#include <sys/types.h>
#include <unistd.h>
-#include "systemd-network/sd-dhcp6-client.h"
#include <systemd/sd-event.h>
-#include "systemd-network/dhcp6-internal.h"
-#include "systemd-network/dhcp6-lease-internal.h"
-#include "systemd-network/dhcp6-protocol.h"
#include "basic/fd-util.h"
#include "basic/macro.h"
#include "basic/socket-util.h"
#include "basic/virt.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-lease-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/sd-dhcp6-client.h"
static struct ether_addr mac_addr = {
.ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'}
diff --git a/src/libsystemd-network/test/test-ipv4ll-manual.c b/src/libsystemd-network/test/test-ipv4ll-manual.c
index aba41f4af9..00b909f021 100644
--- a/src/libsystemd-network/test/test-ipv4ll-manual.c
+++ b/src/libsystemd-network/test/test-ipv4ll-manual.c
@@ -18,10 +18,10 @@
***/
#include <errno.h>
+#include <linux/veth.h>
#include <net/if.h>
#include <stdlib.h>
#include <unistd.h>
-#include <linux/veth.h>
#include <systemd/sd-event.h>
diff --git a/src/libsystemd-network/test/test-ipv4ll.c b/src/libsystemd-network/test/test-ipv4ll.c
index afb69a22fc..af259cf0de 100644
--- a/src/libsystemd-network/test/test-ipv4ll.c
+++ b/src/libsystemd-network/test/test-ipv4ll.c
@@ -25,12 +25,11 @@
#include <sys/types.h>
#include <unistd.h>
-#include "systemd-network/sd-ipv4ll.h"
-#include "systemd-network/arp-util.h"
-
#include "basic/fd-util.h"
#include "basic/socket-util.h"
#include "basic/util.h"
+#include "systemd-network/arp-util.h"
+#include "systemd-network/sd-ipv4ll.h"
static bool verbose = false;
static bool extended = false;
diff --git a/src/libsystemd-network/test/test-lldp.c b/src/libsystemd-network/test/test-lldp.c
index ea625ea28b..858c7789d7 100644
--- a/src/libsystemd-network/test/test-lldp.c
+++ b/src/libsystemd-network/test/test-lldp.c
@@ -25,13 +25,13 @@
#include <unistd.h>
#include <systemd/sd-event.h>
-#include "systemd-network/sd-lldp.h"
#include "basic/alloc-util.h"
#include "basic/fd-util.h"
-#include "systemd-network/lldp-network.h"
#include "basic/macro.h"
#include "basic/string-util.h"
+#include "systemd-network/lldp-network.h"
+#include "systemd-network/sd-lldp.h"
#define TEST_LLDP_PORT "em1"
#define TEST_LLDP_TYPE_SYSTEM_NAME "systemd-lldp"
diff --git a/src/libsystemd-network/test/test-ndisc-rs.c b/src/libsystemd-network/test/test-ndisc-rs.c
index 200983b4ab..92445eff5d 100644
--- a/src/libsystemd-network/test/test-ndisc-rs.c
+++ b/src/libsystemd-network/test/test-ndisc-rs.c
@@ -19,10 +19,9 @@
#include <netinet/icmp6.h>
-#include "systemd-network/sd-ndisc.h"
-
-#include "systemd-network/icmp6-util.h"
#include "basic/socket-util.h"
+#include "systemd-network/icmp6-util.h"
+#include "systemd-network/sd-ndisc.h"
static struct ether_addr mac_addr = {
.ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'}