summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-09-30 01:40:03 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-10-07 02:44:42 +0900
commitfb486c90824b054b8f3ca028bce953e7c09037be (patch)
tree94bff6563ca6b899c365182dd96de16404ca9edb /src
parentfe2bc17ca7bd42218b147a7781ecf7313090a18c (diff)
downloadsystemd-fb486c90824b054b8f3ca028bce953e7c09037be.tar.gz
network: cleanup networkd-address-label.h
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-address-label.c8
-rw-r--r--src/network/networkd-address-label.h14
-rw-r--r--src/network/networkd-link.c1
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd-network.h1
6 files changed, 10 insertions, 16 deletions
diff --git a/src/network/networkd-address-label.c b/src/network/networkd-address-label.c
index b48e997782..e83665bfda 100644
--- a/src/network/networkd-address-label.c
+++ b/src/network/networkd-address-label.c
@@ -4,12 +4,12 @@
#include <linux/if_addrlabel.h>
#include "alloc-util.h"
-#include "conf-parser.h"
-#include "networkd-address-label.h"
#include "netlink-util.h"
+#include "networkd-address-label.h"
+#include "networkd-link.h"
#include "networkd-manager.h"
+#include "networkd-network.h"
#include "parse-util.h"
-#include "socket-util.h"
AddressLabel *address_label_free(AddressLabel *label) {
if (!label)
@@ -24,6 +24,8 @@ AddressLabel *address_label_free(AddressLabel *label) {
return mfree(label);
}
+DEFINE_NETWORK_SECTION_FUNCTIONS(AddressLabel, address_label_free);
+
static int address_label_new_static(Network *network, const char *filename, unsigned section_line, AddressLabel **ret) {
_cleanup_(network_config_section_freep) NetworkConfigSection *n = NULL;
_cleanup_(address_label_freep) AddressLabel *label = NULL;
diff --git a/src/network/networkd-address-label.h b/src/network/networkd-address-label.h
index dde6877eef..aacab867e7 100644
--- a/src/network/networkd-address-label.h
+++ b/src/network/networkd-address-label.h
@@ -2,35 +2,25 @@
#pragma once
#include <inttypes.h>
-#include <stdbool.h>
#include "conf-parser.h"
#include "in-addr-util.h"
-
-typedef struct AddressLabel AddressLabel;
-
-#include "networkd-link.h"
-#include "networkd-network.h"
#include "networkd-util.h"
typedef struct Network Network;
typedef struct Link Link;
-typedef struct NetworkConfigSection NetworkConfigSection;
-struct AddressLabel {
+typedef struct AddressLabel {
Network *network;
NetworkConfigSection *section;
unsigned char prefixlen;
uint32_t label;
-
union in_addr_union in_addr;
-};
+} AddressLabel;
AddressLabel *address_label_free(AddressLabel *label);
-DEFINE_NETWORK_SECTION_FUNCTIONS(AddressLabel, address_label_free);
-
void network_verify_address_labels(Network *network);
int link_set_address_labels(Link *link);
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index fd339e289a..b94e4945f3 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -20,6 +20,7 @@
#include "missing_network.h"
#include "netlink-util.h"
#include "network-internal.h"
+#include "networkd-address-label.h"
#include "networkd-can.h"
#include "networkd-dhcp-server.h"
#include "networkd-dhcp4.h"
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 444b6fce9c..648e882a29 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -6,6 +6,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#include "conf-parser.h"
#include "netem.h"
#include "network-internal.h"
+#include "networkd-address-label.h"
#include "networkd-can.h"
#include "networkd-conf.h"
#include "networkd-dhcp-common.h"
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index d5b60e8260..95f3f65394 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -14,6 +14,7 @@
#include "in-addr-util.h"
#include "networkd-dhcp-server.h"
#include "network-internal.h"
+#include "networkd-address-label.h"
#include "networkd-manager.h"
#include "networkd-neighbor.h"
#include "networkd-network.h"
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 4f05b92b3e..c129338569 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -12,7 +12,6 @@
#include "conf-parser.h"
#include "hashmap.h"
#include "netdev.h"
-#include "networkd-address-label.h"
#include "networkd-address.h"
#include "networkd-brvlan.h"
#include "networkd-dhcp-common.h"