network: cleanup networkd-address-label.h
This commit is contained in:
parent
fe2bc17ca7
commit
fb486c9082
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue