network: Clean up includes

Split out of #37344.
This commit is contained in:
Daan De Meyer
2025-05-22 02:15:43 +09:00
committed by Yu Watanabe
parent f712008289
commit baa3fadfb7
243 changed files with 706 additions and 920 deletions
-1
View File
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "fd-util.h"
#include "fs-util.h"
#include "fuzz.h"
#include "networkd-manager.h"
#include "tmpfile-util.h"
-1
View File
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "fd-util.h"
#include "fs-util.h"
#include "fuzz.h"
#include "networkd-manager.h"
#include "tmpfile-util.h"
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <getopt.h>
#include <sys/stat.h>
#include "alloc-util.h"
#include "build.h"
@@ -9,12 +10,13 @@
#include "fd-util.h"
#include "fs-util.h"
#include "generator.h"
#include "macro.h"
#include "log.h"
#include "main-func.h"
#include "mkdir.h"
#include "network-generator.h"
#include "path-util.h"
#include "proc-cmdline.h"
#include "string-util.h"
#define NETWORK_UNIT_DIRECTORY "/run/systemd/network/"
+1 -3
View File
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "alloc-util.h"
#include "extract-word.h"
#include "fd-util.h"
#include "fileio.h"
#include "hostname-util.h"
#include "log.h"
#include "macro.h"
#include "memstream-util.h"
#include "netif-naming-scheme.h"
#include "network-generator.h"
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "macro.h"
#include "network-generator.h"
#include "string-util.h"
#include "tests.h"
static void test_network_one(const char *ifname, const char *key, const char *value, const char *expected) {
+3 -3
View File
@@ -2,11 +2,11 @@
* Copyright © 2020 VMware, Inc. */
#include <linux/if_arp.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "bareudp.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "conf-parser.h"
#include "string-table.h"
static const char* const bare_udp_protocol_table[_BARE_UDP_PROTOCOL_MAX] = {
+3 -7
View File
@@ -2,11 +2,7 @@
* Copyright © 2020 VMware, Inc. */
#pragma once
typedef struct BareUDP BareUDP;
#include <linux/if_ether.h>
#include "conf-parser.h"
#include "forward.h"
#include "netdev.h"
typedef enum BareUDPProtocol {
@@ -18,13 +14,13 @@ typedef enum BareUDPProtocol {
_BARE_UDP_PROTOCOL_INVALID = -EINVAL,
} BareUDPProtocol;
struct BareUDP {
typedef struct BareUDP {
NetDev meta;
BareUDPProtocol iftype;
uint16_t dest_port;
uint16_t min_port;
};
} BareUDP;
DEFINE_NETDEV_CAST(BAREUDP, BareUDP);
extern const NetDevVTable bare_udp_vtable;
+3 -7
View File
@@ -1,19 +1,15 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <inttypes.h>
#include <linux/genetlink.h>
#include <linux/if_arp.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "batadv.h"
#include "fileio.h"
#include "conf-parser.h"
#include "netlink-util.h"
#include "network-internal.h"
#include "networkd-manager.h"
#include "parse-util.h"
#include "stdio-util.h"
#include "string-table.h"
#include "string-util.h"
static void batadv_init(NetDev *n) {
BatmanAdvanced *b = BATADV(n);
+1 -1
View File
@@ -4,7 +4,7 @@
#include <linux/batman_adv.h>
#include "conf-parser.h"
#include "forward.h"
#include "netdev.h"
#define BATADV_GENL_NAME "batadv"
+8 -4
View File
@@ -3,16 +3,20 @@
#include <linux/if_arp.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "bond.h"
#include "bond-util.h"
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "extract-word.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "string-table.h"
#include "in-addr-util.h"
#include "networkd-link.h"
#include "ordered-set.h"
#include "set.h"
#include "string-util.h"
#include "time-util.h"
/*
* Number of seconds between instances where the bonding
* driver sends learning packets to each slaves peer switch
+1 -5
View File
@@ -1,13 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <linux/if_bonding.h>
#include <netinet/in.h>
#include "bond-util.h"
#include "macro.h"
#include "forward.h"
#include "netdev.h"
#include "ordered-set.h"
typedef struct Bond {
NetDev meta;
+4 -2
View File
@@ -2,13 +2,15 @@
#include <linux/if_arp.h>
#include <linux/if_bridge.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "bridge.h"
#include "conf-parser.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "string-table.h"
#include "string-util.h"
#include "vlan-util.h"
assert_cc((int) MULTICAST_ROUTER_NONE == (int) MDB_RTR_TYPE_DISABLED);
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "conf-parser.h"
#include "forward.h"
#include "netdev.h"
#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128U
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "netdev.h"
typedef struct Dummy {
+2 -5
View File
@@ -1,16 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/fou.h>
#include <linux/ip.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "fou-tunnel.h"
#include "ip-protocol-list.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "parse-util.h"
#include "string-table.h"
#include "string-util.h"
+1 -1
View File
@@ -2,9 +2,9 @@
#pragma once
#include <linux/fou.h>
#include <netinet/in.h>
#include "in-addr-util.h"
#include "forward.h"
#include "netdev.h"
typedef enum FooOverUDPEncapType {
+2 -7
View File
@@ -1,19 +1,14 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include "alloc-util.h"
#include "sd-netlink.h"
#include "conf-parser.h"
#include "extract-word.h"
#include "geneve.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "parse-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#define GENEVE_FLOW_LABEL_MAX_MASK 0xFFFFFU
#define DEFAULT_GENEVE_DESTINATION_PORT 6081
+4 -4
View File
@@ -1,11 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct Geneve Geneve;
#include <linux/if_link.h>
#include "forward.h"
#include "in-addr-util.h"
#include "netdev.h"
#include "networkd-network.h"
#define GENEVE_VID_MAX (1u << 24) - 1
@@ -17,7 +17,7 @@ typedef enum GeneveDF {
_NETDEV_GENEVE_DF_INVALID = -EINVAL,
} GeneveDF;
struct Geneve {
typedef struct Geneve {
NetDev meta;
uint32_t id;
@@ -39,7 +39,7 @@ struct Geneve {
union in_addr_union remote;
bool inherit_inner_protocol;
};
} Geneve;
DEFINE_NETDEV_CAST(GENEVE, Geneve);
extern const NetDevVTable geneve_vtable;
+4 -4
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "hsr.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "networkd-link.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
+2 -4
View File
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct Hsr Hsr;
#include <linux/if_link.h>
#include "netdev.h"
@@ -14,13 +12,13 @@ typedef enum HsrProtocol {
_NETDEV_HSR_PROTOCOL_INVALID = -EINVAL,
} HsrProtocol;
struct Hsr {
typedef struct Hsr {
NetDev meta;
char **ports;
HsrProtocol protocol;
uint8_t supervision;
};
} Hsr;
DEFINE_NETDEV_CAST(HSR, Hsr);
extern const NetDevVTable hsr_vtable;
+4
View File
@@ -3,10 +3,14 @@
#include <linux/if_arp.h>
#include <linux/if_link.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "ipoib.h"
#include "networkd-network.h"
#include "parse-util.h"
#include "string-table.h"
#include "string-util.h"
assert_cc((int) IP_OVER_INFINIBAND_MODE_DATAGRAM == (int) IPOIB_MODE_DATAGRAM);
assert_cc((int) IP_OVER_INFINIBAND_MODE_CONNECTED == (int) IPOIB_MODE_CONNECTED);
-3
View File
@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <errno.h>
#include "conf-parser.h"
#include "netdev.h"
typedef enum IPoIBMode {
+2 -3
View File
@@ -1,14 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "ipvlan.h"
#include "ipvlan-util.h"
#include "networkd-link.h"
#include "string-util.h"
DEFINE_CONFIG_PARSE_ENUM(config_parse_ipvlan_mode, ipvlan_mode, IPVlanMode);
DEFINE_CONFIG_PARSE_ENUM(config_parse_ipvlan_flags, ipvlan_flags, IPVlanFlags);
-2
View File
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <linux/if_link.h>
#include <netinet/in.h>
#include "ipvlan-util.h"
#include "netdev.h"
+4 -3
View File
@@ -1,19 +1,20 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/genetlink.h>
#include <linux/if_arp.h>
#include <linux/l2tp.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "conf-parser.h"
#include "extract-word.h"
#include "hashmap.h"
#include "l2tp-tunnel.h"
#include "netlink-util.h"
#include "networkd-address.h"
#include "networkd-manager.h"
#include "networkd-route-util.h"
#include "parse-util.h"
#include "set.h"
#include "socket-util.h"
#include "string-table.h"
#include "string-util.h"
+1 -2
View File
@@ -2,11 +2,10 @@
#pragma once
#include <linux/l2tp.h>
#include <netinet/in.h>
#include "in-addr-util.h"
#include "forward.h"
#include "netdev.h"
#include "networkd-util.h"
typedef enum L2tpL2specType {
NETDEV_L2TP_L2SPECTYPE_NONE = L2TP_L2SPECTYPE_NONE,
+2 -5
View File
@@ -1,10 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/genetlink.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/if_macsec.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "conf-parser.h"
@@ -17,8 +16,6 @@
#include "networkd-manager.h"
#include "parse-helpers.h"
#include "parse-util.h"
#include "socket-util.h"
#include "string-table.h"
#include "string-util.h"
#include "unaligned.h"
+4 -6
View File
@@ -2,12 +2,10 @@
#pragma once
#include <linux/if_macsec.h>
#include <netinet/in.h>
#include <net/ethernet.h>
#include "ether-addr-util.h"
#include "in-addr-util.h"
#include "forward.h"
#include "netdev.h"
#include "networkd-util.h"
#include "sparse-endian.h"
/* See the definition of MACSEC_NUM_AN in kernel's drivers/net/macsec.c */
@@ -61,7 +59,7 @@ typedef struct ReceiveChannel {
unsigned n_rxsa;
} ReceiveChannel;
struct MACsec {
typedef struct MACsec {
NetDev meta;
uint16_t port;
@@ -72,7 +70,7 @@ struct MACsec {
OrderedHashmap *receive_channels_by_section;
OrderedHashmap *transmit_associations_by_section;
OrderedHashmap *receive_associations_by_section;
};
} MACsec;
DEFINE_NETDEV_CAST(MACSEC, MACsec);
extern const NetDevVTable macsec_vtable;
+4 -2
View File
@@ -1,14 +1,16 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "macvlan.h"
#include "macvlan-util.h"
#include "networkd-network.h"
#include "parse-util.h"
#include "set.h"
#include "string-util.h"
typedef enum BCQueueThreshold {
BC_QUEUE_THRESHOLD_UNDEF = INT32_MIN,
+2 -5
View File
@@ -1,13 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct MacVlan MacVlan;
#include "macvlan-util.h"
#include "netdev.h"
#include "set.h"
struct MacVlan {
typedef struct MacVlan {
NetDev meta;
MacVlanMode mode;
@@ -15,7 +12,7 @@ struct MacVlan {
uint32_t bc_queue_length;
int32_t bc_queue_threshold;
};
} MacVlan;
DEFINE_NETDEV_CAST(MACVLAN, MacVlan);
DEFINE_NETDEV_CAST(MACVTAP, MacVlan);
+1
View File
@@ -9,6 +9,7 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
#include "batadv.h"
#include "bond.h"
#include "bridge.h"
#include "condition.h"
#include "conf-parser.h"
#include "fou-tunnel.h"
#include "geneve.h"
+1
View File
@@ -3,6 +3,7 @@
#include "netdev-util.h"
#include "networkd-address.h"
#include "networkd-link.h"
#include "set.h"
#include "string-table.h"
static const char * const netdev_local_address_type_table[_NETDEV_LOCAL_ADDRESS_TYPE_MAX] = {
+1 -6
View File
@@ -1,12 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <errno.h>
#include "in-addr-util.h"
#include "macro.h"
typedef struct Link Link;
#include "networkd-forward.h"
typedef enum NetDevLocalAddressType {
NETDEV_LOCAL_ADDRESS_IPV4LL,
+4 -7
View File
@@ -1,28 +1,28 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include <unistd.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "arphrd-util.h"
#include "bareudp.h"
#include "batadv.h"
#include "bond.h"
#include "bridge.h"
#include "condition.h"
#include "conf-files.h"
#include "conf-parser.h"
#include "dummy.h"
#include "fd-util.h"
#include "fou-tunnel.h"
#include "geneve.h"
#include "hashmap.h"
#include "hsr.h"
#include "ifb.h"
#include "ipoib.h"
#include "ipvlan.h"
#include "l2tp-tunnel.h"
#include "list.h"
#include "macsec.h"
#include "macvlan.h"
#include "netdev.h"
@@ -31,12 +31,9 @@
#include "network-util.h"
#include "networkd-manager.h"
#include "networkd-queue.h"
#include "networkd-setlink.h"
#include "networkd-sriov.h"
#include "networkd-state-file.h"
#include "nlmon.h"
#include "path-lookup.h"
#include "siphash24.h"
#include "stat-util.h"
#include "string-table.h"
#include "string-util.h"
+1 -8
View File
@@ -1,15 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-netlink.h"
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "hash-funcs.h"
#include "list.h"
#include "log-link.h"
#include "netdev-util.h"
#include "time-util.h"
#include "networkd-forward.h"
/* Special hardware address value to suppress generating persistent hardware address for the netdev. */
#define HW_ADDR_NONE ((struct hw_addr_data) { .length = 1, })
@@ -109,9 +105,6 @@ typedef enum NetDevCreateType {
_NETDEV_CREATE_INVALID = -EINVAL,
} NetDevCreateType;
typedef struct Manager Manager;
typedef struct Condition Condition;
typedef struct NetDev {
Manager *manager;
+2 -4
View File
@@ -1,13 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct NLMon NLMon;
#include "netdev.h"
struct NLMon {
typedef struct NLMon {
NetDev meta;
};
} NLMon;
DEFINE_NETDEV_CAST(NLMON, NLMon);
+2 -3
View File
@@ -1,13 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/fou.h>
#include <linux/if_arp.h>
#include <linux/if_tunnel.h>
#include <linux/ip.h>
#include <linux/ip6_tunnel.h>
#include <netinet/in.h>
#include "af-list.h"
#include "sd-netlink.h"
#include "alloc-util.h"
#include "conf-parser.h"
#include "hexdecoct.h"
+1 -3
View File
@@ -1,11 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "conf-parser.h"
#include "forward.h"
#include "fou-tunnel.h"
#include "in-addr-util.h"
#include "netdev.h"
#include "netdev-util.h"
#include "networkd-link.h"
typedef enum Ip6TnlMode {
+5 -5
View File
@@ -1,21 +1,21 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <errno.h>
#include <fcntl.h>
#include <linux/if_tun.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <net/if_arp.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "alloc-util.h"
#include "daemon-util.h"
#include "fd-util.h"
#include "networkd-link.h"
#include "hashmap.h"
#include "networkd-manager.h"
#include "socket-util.h"
#include "string-util.h"
#include "tuntap.h"
#include "user-record.h"
#include "user-util.h"
#include "userdb.h"
#define TUN_DEV "/dev/net/tun"
+1 -1
View File
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "netdev.h"
#include "user-util.h"
typedef struct TunTap {
NetDev meta;
+2 -7
View File
@@ -1,16 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct VCan VCan;
#include <linux/can/netlink.h>
#include <netinet/in.h>
#include "netdev.h"
struct VCan {
typedef struct VCan {
NetDev meta;
};
} VCan;
DEFINE_NETDEV_CAST(VCAN, VCan);
+3 -3
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <errno.h>
#include <linux/if_arp.h>
#include <linux/veth.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "netlink-util.h"
#include "string-util.h"
#include "veth.h"
static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
+2 -4
View File
@@ -1,17 +1,15 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct Veth Veth;
#include "netdev.h"
struct Veth {
typedef struct Veth {
NetDev meta;
char *ifname_peer;
struct hw_addr_data hw_addr_peer;
int ifindex_peer;
};
} Veth;
DEFINE_NETDEV_CAST(VETH, Veth);
extern const NetDevVTable veth_vtable;
+6 -2
View File
@@ -1,12 +1,16 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <errno.h>
#include <linux/if_arp.h>
#include <linux/if_vlan.h>
#include <net/if.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "extract-word.h"
#include "parse-util.h"
#include "set.h"
#include "siphash24.h"
#include "string-util.h"
#include "vlan.h"
#include "vlan-util.h"
+3 -5
View File
@@ -1,12 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct VLan VLan;
#include "forward.h"
#include "netdev.h"
#include "set.h"
struct VLan {
typedef struct VLan {
NetDev meta;
uint16_t id;
@@ -19,7 +17,7 @@ struct VLan {
Set *egress_qos_maps;
Set *ingress_qos_maps;
};
} VLan;
DEFINE_NETDEV_CAST(VLAN, VLan);
extern const NetDevVTable vlan_vtable;
+2 -2
View File
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include "sd-netlink.h"
#include "vrf.h"
+2 -4
View File
@@ -1,15 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct Vrf Vrf;
#include "netdev.h"
struct Vrf {
typedef struct Vrf {
NetDev meta;
uint32_t table;
};
} Vrf;
DEFINE_NETDEV_CAST(VRF, Vrf);
extern const NetDevVTable vrf_vtable;
+3
View File
@@ -3,6 +3,9 @@
#include <linux/can/vxcan.h>
#include <linux/if_arp.h>
#include "sd-netlink.h"
#include "string-util.h"
#include "vxcan.h"
static int netdev_vxcan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
+2 -4
View File
@@ -1,16 +1,14 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct VxCan VxCan;
#include "netdev.h"
struct VxCan {
typedef struct VxCan {
NetDev meta;
char *ifname_peer;
int ifindex_peer;
};
} VxCan;
DEFINE_NETDEV_CAST(VXCAN, VxCan);
+4 -5
View File
@@ -1,17 +1,16 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <net/if.h>
#include <netinet/in.h>
#include "alloc-util.h"
#include "sd-netlink.h"
#include "conf-parser.h"
#include "extract-word.h"
#include "in-addr-util.h"
#include "networkd-link.h"
#include "parse-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
#include "vxlan.h"
static const char* const df_table[_NETDEV_VXLAN_DF_MAX] = {
+2 -5
View File
@@ -1,13 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct VxLan VxLan;
#include <linux/if_link.h>
#include "in-addr-util.h"
#include "netdev.h"
#include "netdev-util.h"
#define VXLAN_VID_MAX (1u << 24) - 1
#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
@@ -20,7 +17,7 @@ typedef enum VxLanDF {
_NETDEV_VXLAN_DF_INVALID = -EINVAL,
} VxLanDF;
struct VxLan {
typedef struct VxLan {
NetDev meta;
uint32_t vni;
@@ -63,7 +60,7 @@ struct VxLan {
bool vnifilter;
struct ifla_vxlan_port_range port_range;
};
} VxLan;
DEFINE_NETDEV_CAST(VXLAN, VxLan);
extern const NetDevVTable vxlan_vtable;
+6 -6
View File
@@ -4,19 +4,20 @@
***/
#include <linux/if_arp.h>
#include <linux/ipv6_route.h>
#include <net/if.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include "sd-netlink.h"
#include "sd-resolve.h"
#include "alloc-util.h"
#include "conf-parser.h"
#include "creds-util.h"
#include "dns-domain.h"
#include "event-util.h"
#include "fd-util.h"
#include "extract-word.h"
#include "fileio.h"
#include "hashmap.h"
#include "hexdecoct.h"
#include "memory-util.h"
#include "netlink-util.h"
@@ -28,9 +29,8 @@
#include "parse-util.h"
#include "path-util.h"
#include "random-util.h"
#include "resolve-private.h"
#include "set.h"
#include "string-util.h"
#include "strv.h"
#include "wireguard.h"
static void wireguard_resolve_endpoints(NetDev *netdev);
+4 -8
View File
@@ -2,16 +2,12 @@
#pragma once
typedef struct Wireguard Wireguard;
#include <linux/wireguard.h>
#include <netinet/in.h>
#include "sd-event.h"
#include "sd-resolve.h"
#include "in-addr-util.h"
#include "list.h"
#include "netdev.h"
#include "networkd-forward.h"
#include "socket-util.h"
typedef struct WireguardIPmask {
@@ -50,7 +46,7 @@ typedef struct WireguardPeer {
LIST_FIELDS(struct WireguardPeer, peers);
} WireguardPeer;
struct Wireguard {
typedef struct Wireguard {
NetDev meta;
unsigned last_peer_section;
@@ -66,7 +62,7 @@ struct Wireguard {
Set *routes;
uint32_t route_table;
uint32_t route_priority;
};
} Wireguard;
DEFINE_NETDEV_CAST(WIREGUARD, Wireguard);
extern const NetDevVTable wireguard_vtable;
+1
View File
@@ -8,6 +8,7 @@
#include "networkd-manager.h"
#include "networkd-wiphy.h"
#include "parse-util.h"
#include "string-util.h"
#include "wifi-util.h"
#include "wlan.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include <linux/nl80211.h>
#include "conf-parser.h"
#include "forward.h"
#include "netdev.h"
typedef struct WLan {
+2
View File
@@ -2,6 +2,8 @@
#include <linux/if_arp.h>
#include "sd-netlink.h"
#include "missing_network.h"
#include "networkd-link.h"
#include "xfrm.h"
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "forward.h"
#include "netdev.h"
typedef struct Xfrm {
+5 -1
View File
@@ -2,6 +2,7 @@
#include <unistd.h>
#include "sd-bus.h"
#include "sd-daemon.h"
#include "sd-device.h"
#include "sd-netlink.h"
@@ -14,6 +15,7 @@
#include "bus-wait-for-jobs.h"
#include "conf-files.h"
#include "edit-util.h"
#include "errno-util.h"
#include "extract-word.h"
#include "log.h"
#include "mkdir-label.h"
@@ -23,13 +25,15 @@
#include "networkctl-config-file.h"
#include "networkctl-util.h"
#include "pager.h"
#include "path-lookup.h"
#include "path-util.h"
#include "pretty-print.h"
#include "selinux-util.h"
#include "socket-util.h"
#include "stat-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "terminal-util.h"
#include "virt.h"
typedef enum ReloadFlags {
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "sd-bus.h"
#include "alloc-util.h"
#include "bus-error.h"
#include "bus-locator.h"
+7
View File
@@ -1,12 +1,19 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "sd-dhcp-lease.h"
#include "sd-hwdb.h"
#include "sd-netlink.h"
#include "alloc-util.h"
#include "ether-addr-util.h"
#include "format-ifname.h"
#include "format-table.h"
#include "in-addr-util.h"
#include "local-addresses.h"
#include "log.h"
#include "networkctl-dump-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
int dump_list(Table *table, const char *key, char * const *l) {
+1 -6
View File
@@ -1,12 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-dhcp-lease.h"
#include "sd-hwdb.h"
#include "sd-netlink.h"
#include "ether-addr-util.h"
#include "format-table.h"
#include "forward.h"
int dump_list(Table *table, const char *key, char * const *l);
int ieee_oui(sd_hwdb *hwdb, const struct ether_addr *mac, char **ret);
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "sd-journal.h"
#include "ansi-color.h"
#include "journal-internal.h"
#include "log.h"
+5
View File
@@ -2,6 +2,9 @@
#include <linux/if_tunnel.h>
#include "sd-bus.h"
#include "sd-netlink.h"
#include "alloc-util.h"
#include "bus-common-errors.h"
#include "bus-error.h"
@@ -13,6 +16,8 @@
#include "networkctl-link-info.h"
#include "networkctl-util.h"
#include "sort-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "strxcpyx.h"
#include "wifi-util.h"
+1 -5
View File
@@ -3,14 +3,10 @@
#include <linux/if.h>
#include <linux/if_link.h>
#include <linux/nl80211.h>
#include <stdint.h>
#include "sd-bus.h"
#include "sd-device.h"
#include "sd-netlink.h"
#include "ether-addr-util.h"
#include "ethtool-util.h"
#include "forward.h"
#include "in-addr-util.h"
typedef struct VxLanInfo {
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "sd-bus.h"
#include "sd-netlink.h"
#include "sd-network.h"
#include "alloc-util.h"
+2
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "alloc-util.h"
#include "format-table.h"
#include "json-util.h"
#include "log.h"
#include "networkctl.h"
@@ -8,6 +9,7 @@
#include "networkctl-lldp.h"
#include "networkctl-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "terminal-util.h"
#include "varlink-util.h"
+1 -3
View File
@@ -1,9 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-varlink.h"
#include "format-table.h"
#include "forward.h"
int dump_lldp_neighbors(sd_varlink *vl, Table *table, int ifindex);
int link_lldp_status(int argc, char *argv[], void *userdata);
+4 -2
View File
@@ -1,9 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <net/if.h>
#include "sd-bus.h"
#include "sd-netlink.h"
#include "bus-error.h"
#include "bus-locator.h"
#include "errno-util.h"
#include "fd-util.h"
#include "format-ifname.h"
#include "log.h"
@@ -14,7 +16,7 @@
#include "parse-util.h"
#include "polkit-agent.h"
#include "set.h"
#include "strv.h"
#include "string-util.h"
#include "varlink-util.h"
static int link_up_down_send_message(sd_netlink *rtnl, char *command, int index) {
+11 -2
View File
@@ -1,16 +1,23 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <net/if.h>
#include "sd-bus.h"
#include "sd-device.h"
#include "sd-dhcp-client-id.h"
#include "sd-dhcp-lease.h"
#include "sd-hwdb.h"
#include "sd-netlink.h"
#include "sd-network.h"
#include "sd-varlink.h"
#include "alloc-util.h"
#include "bond-util.h"
#include "bridge-util.h"
#include "bus-error.h"
#include "bus-util.h"
#include "errno-util.h"
#include "escape.h"
#include "extract-word.h"
#include "format-table.h"
#include "format-util.h"
#include "geneve-util.h"
#include "glyph-util.h"
@@ -28,7 +35,9 @@
#include "networkctl-status-system.h"
#include "networkctl-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
#include "udev-util.h"
static int dump_dhcp_leases(Table *table, const char *prefix, sd_bus *bus, const LinkInfo *link) {
+2
View File
@@ -3,6 +3,7 @@
#include "sd-network.h"
#include "alloc-util.h"
#include "format-table.h"
#include "fs-util.h"
#include "glyph-util.h"
#include "log.h"
@@ -12,6 +13,7 @@
#include "networkctl-status-system.h"
#include "networkctl-util.h"
#include "sort-util.h"
#include "string-util.h"
#include "strv.h"
static int ifindex_str_compare_func(char * const *a, char * const *b) {
+1 -2
View File
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-hwdb.h"
#include "sd-netlink.h"
#include "forward.h"
int system_status(sd_netlink *rtnl, sd_hwdb *hwdb);
+3
View File
@@ -3,12 +3,15 @@
#include <sys/stat.h>
#include <unistd.h>
#include "sd-bus.h"
#include "alloc-util.h"
#include "ansi-color.h"
#include "log.h"
#include "networkctl.h"
#include "networkctl-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "varlink-util.h"
+1 -4
View File
@@ -1,10 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include "sd-bus.h"
#include "sd-varlink.h"
#include "forward.h"
int varlink_connect_networkd(sd_varlink **ret_varlink);
bool networkd_is_running(void);
+1 -1
View File
@@ -14,11 +14,11 @@
#include "networkctl-lldp.h"
#include "networkctl-misc.h"
#include "networkctl-status-link.h"
#include "networkctl-util.h"
#include "parse-argument.h"
#include "parse-util.h"
#include "path-util.h"
#include "pretty-print.h"
#include "string-util.h"
#include "verbs.h"
PagerFlags arg_pager_flags = 0;
+1 -3
View File
@@ -1,9 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include "output-mode.h"
#include "forward.h"
#include "pager.h"
extern PagerFlags arg_pager_flags;
+4 -1
View File
@@ -6,11 +6,14 @@
#include "alloc-util.h"
#include "arphrd-util.h"
#include "hash-funcs.h"
#include "id128-util.h"
#include "memory-util.h"
#include "networkd-address-generation.h"
#include "networkd-address.h"
#include "networkd-link.h"
#include "networkd-network.h"
#include "set.h"
#include "siphash24.h"
#include "string-util.h"
#define DAD_CONFLICTS_IDGEN_RETRIES_RFC7217 3
+1 -7
View File
@@ -1,13 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "conf-parser.h"
#include "hashmap.h"
#include "in-addr-util.h"
typedef struct Address Address;
typedef struct IPv6Token IPv6Token;
typedef struct Link Link;
#include "networkd-forward.h"
IPv6Token* ipv6_token_ref(IPv6Token *token);
IPv6Token* ipv6_token_unref(IPv6Token *token);
+6 -2
View File
@@ -1,16 +1,20 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_addr.h>
#include <linux/if_addrlabel.h>
#include <net/if.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "netlink-util.h"
#include "conf-parser.h"
#include "hashmap.h"
#include "networkd-address-label.h"
#include "networkd-link.h"
#include "networkd-manager.h"
#include "networkd-network.h"
#include "networkd-queue.h"
#include "parse-util.h"
#include "string-util.h"
AddressLabel *address_label_free(AddressLabel *label) {
if (!label)
+2 -8
View File
@@ -1,15 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <inttypes.h>
#include <netinet/in.h>
#include "conf-parser.h"
#include "in-addr-util.h"
#include "networkd-util.h"
typedef struct Link Link;
typedef struct Manager Manager;
typedef struct Network Network;
#include "networkd-forward.h"
typedef struct AddressLabel {
Manager *manager;
+2 -1
View File
@@ -5,7 +5,8 @@
#include "networkd-address-pool.h"
#include "networkd-manager.h"
#include "networkd-queue.h"
#include "string-util.h"
#include "ordered-set.h"
#include "set.h"
#define RANDOM_PREFIX_TRIAL_MAX 1024
+1 -2
View File
@@ -1,10 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "networkd-forward.h"
#include "in-addr-util.h"
typedef struct Manager Manager;
typedef struct AddressPool {
Manager *manager;
+11 -3
View File
@@ -1,16 +1,21 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <net/if.h>
#include <net/if_arp.h>
#include <stdio.h>
#include "sd-event.h"
#include "sd-netlink.h"
#include "af-list.h"
#include "alloc-util.h"
#include "bitfield.h"
#include "conf-parser.h"
#include "errno-util.h"
#include "firewall-util.h"
#include "in-addr-prefix-util.h"
#include "logarithm.h"
#include "memory-util.h"
#include "netlink-util.h"
#include "networkd-address-generation.h"
#include "networkd-address.h"
#include "networkd-address-pool.h"
#include "networkd-dhcp-prefix-delegation.h"
@@ -23,10 +28,13 @@
#include "networkd-queue.h"
#include "networkd-route.h"
#include "networkd-route-util.h"
#include "ordered-set.h"
#include "parse-util.h"
#include "set.h"
#include "siphash24.h"
#include "socket-util.h"
#include "string-util.h"
#include "strv.h"
#include "strxcpyx.h"
#define ADDRESSES_PER_LINK_MAX 16384U
#define STATIC_ADDRESSES_PER_NETWORK_MAX 8192U
+4 -16
View File
@@ -1,24 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include "conf-parser.h"
#include "firewall-util.h"
#include "hash-funcs.h"
#include "forward.h"
#include "in-addr-util.h"
#include "network-util.h"
#include "networkd-address-generation.h"
#include "networkd-link.h"
#include "networkd-forward.h"
#include "networkd-util.h"
#include "time-util.h"
typedef struct Address Address;
typedef struct Manager Manager;
typedef struct Network Network;
typedef struct Request Request;
typedef int (*address_ready_callback_t)(Address *address);
typedef int (*address_netlink_handler_t)(
sd_netlink *rtnl,
@@ -27,7 +15,7 @@ typedef int (*address_netlink_handler_t)(
Link *link,
Address *address);
struct Address {
typedef struct Address {
Link *link;
Network *network;
ConfigSection *section;
@@ -71,7 +59,7 @@ struct Address {
address_ready_callback_t callback;
NFTSetContext nft_set_context;
};
} Address;
void log_address_debug(const Address *address, const char *str, const Link *link);
+5 -3
View File
@@ -3,11 +3,11 @@
Copyright © 2014 Intel Corporation. All rights reserved.
***/
#include <net/ethernet.h>
#include <net/if.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "bridge.h"
#include "conf-parser.h"
#include "hashmap.h"
#include "netlink-util.h"
#include "networkd-bridge-fdb.h"
#include "networkd-link.h"
@@ -16,7 +16,9 @@
#include "networkd-queue.h"
#include "networkd-util.h"
#include "parse-util.h"
#include "socket-util.h"
#include "string-table.h"
#include "string-util.h"
#include "vlan-util.h"
#include "vxlan.h"
+3 -6
View File
@@ -5,15 +5,12 @@
Copyright © 2014 Intel Corporation. All rights reserved.
***/
#include <inttypes.h>
#include <linux/neighbour.h>
#include <net/ethernet.h>
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "forward.h"
#include "in-addr-util.h"
typedef struct Link Link;
typedef struct Network Network;
#include "networkd-forward.h"
typedef enum NeighborCacheEntryFlags {
NEIGHBOR_CACHE_ENTRY_FLAGS_USE = NTF_USE,
+4 -2
View File
@@ -1,9 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_bridge.h>
#include <net/if.h>
#include "netlink-util.h"
#include "sd-netlink.h"
#include "conf-parser.h"
#include "hashmap.h"
#include "networkd-bridge-mdb.h"
#include "networkd-link.h"
#include "networkd-manager.h"
+1 -5
View File
@@ -1,14 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <inttypes.h>
#include <net/ethernet.h>
#include "conf-parser.h"
#include "in-addr-util.h"
typedef struct Link Link;
typedef struct Network Network;
#include "networkd-forward.h"
typedef enum BridgeMDBEntryType {
BRIDGE_MDB_ENTRY_TYPE_L2,
+3 -4
View File
@@ -4,17 +4,16 @@
***/
#include <linux/if_bridge.h>
#include <netinet/in.h>
#include <stdbool.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "conf-parser.h"
#include "netlink-util.h"
#include "networkd-bridge-vlan.h"
#include "networkd-link.h"
#include "networkd-manager.h"
#include "networkd-network.h"
#include "parse-util.h"
#include "string-util.h"
#include "vlan-util.h"
static bool is_bit_set(unsigned nr, const uint32_t *addr) {
+1 -9
View File
@@ -5,12 +5,7 @@
Copyright © 2016 BISDN GmbH. All rights reserved.
***/
#include <inttypes.h>
#include <stdbool.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "networkd-forward.h"
#include "vlan-util.h"
#define BRIDGE_VLAN_BITMAP_MAX 4096
@@ -20,9 +15,6 @@
#define BRIDGE_VLAN_REMOVE_PVID (UINT16_MAX - 1)
assert_cc(BRIDGE_VLAN_REMOVE_PVID > VLANID_MAX);
typedef struct Link Link;
typedef struct Network Network;
void network_adjust_bridge_vlan(Network *network);
int bridge_vlan_set_message(Link *link, sd_netlink_message *m, bool is_set);
+2 -2
View File
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/can/netlink.h>
#include <net/if.h>
#include "sd-netlink.h"
#include "networkd-can.h"
#include "networkd-link.h"
#include "networkd-network.h"
#include "networkd-setlink.h"
#include "parse-util.h"
#include "string-util.h"
+1 -7
View File
@@ -1,13 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <linux/can/netlink.h>
#include "sd-netlink.h"
#include "conf-parser.h"
typedef struct Link Link;
#include "networkd-forward.h"
int can_set_netlink_message(Link *link, sd_netlink_message *m);
-1
View File
@@ -4,7 +4,6 @@
***/
#include "conf-parser.h"
#include "constants.h"
#include "networkd-address-label.h"
#include "networkd-conf.h"
#include "networkd-manager.h"
+1 -3
View File
@@ -5,9 +5,7 @@
Copyright © 2014 Vinay Kulkarni <kulkarniv@vmware.com>
***/
#include "conf-parser.h"
typedef struct Manager Manager;
#include "networkd-forward.h"
int manager_parse_config_file(Manager *m);
+9 -1
View File
@@ -1,14 +1,20 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <netinet/in.h>
#include "sd-bus.h"
#include "sd-dhcp6-lease.h"
#include "sd-dhcp6-option.h"
#include "alloc-util.h"
#include "bus-error.h"
#include "bus-locator.h"
#include "dhcp-option.h"
#include "dhcp6-internal.h"
#include "dhcp6-option.h"
#include "escape.h"
#include "extract-word.h"
#include "hexdecoct.h"
#include "in-addr-prefix-util.h"
#include "networkd-dhcp-common.h"
@@ -17,8 +23,10 @@
#include "networkd-network.h"
#include "networkd-route-util.h"
#include "parse-util.h"
#include "set.h"
#include "socket-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "vrf.h"
+1 -8
View File
@@ -3,12 +3,9 @@
#include <netinet/in.h>
#include "conf-parser.h"
#include "dhcp-duid-internal.h"
#include "dns-resolver-internal.h"
#include "in-addr-util.h"
#include "set.h"
#include "time-util.h"
#include "networkd-forward.h"
/* Special values for *_uplink_index. */
#define UPLINK_INDEX_AUTO 0 /* uplink will be selected automatically */
@@ -21,10 +18,6 @@
#define IPV6RA_ROUTE_METRIC_LOW 2048
#define DHCP6PD_ROUTE_METRIC 256
typedef struct Link Link;
typedef struct Manager Manager;
typedef struct Network Network;
typedef enum DHCPOptionDataType {
DHCP_OPTION_DATA_UINT8,
DHCP_OPTION_DATA_UINT16,
@@ -1,8 +1,15 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/ipv6_route.h>
#include <linux/rtnetlink.h>
#include "sd-dhcp-client.h"
#include "sd-dhcp6-client.h"
#include "sd-netlink.h"
#include "sd-radv.h"
#include "dhcp6-lease-internal.h"
#include "errno-util.h"
#include "hashmap.h"
#include "in-addr-prefix-util.h"
#include "networkd-address.h"
@@ -17,6 +24,7 @@
#include "networkd-route-util.h"
#include "networkd-setlink.h"
#include "parse-util.h"
#include "set.h"
#include "string-util.h"
#include "strv.h"
#include "tunnel.h"
+1 -10
View File
@@ -1,16 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include "sd-dhcp-lease.h"
#include "sd-dhcp6-lease.h"
#include "conf-parser.h"
typedef struct Address Address;
typedef struct Link Link;
typedef struct Network Network;
#include "networkd-forward.h"
bool link_dhcp_pd_is_enabled(Link *link);
bool dhcp_pd_is_uplink(Link *link, Link *target, bool accept_auto);
+4 -3
View File
@@ -1,13 +1,14 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "sd-bus.h"
#include "alloc-util.h"
#include "bus-common-errors.h"
#include "bus-util.h"
#include "bus-object.h"
#include "dhcp-server-lease-internal.h"
#include "hashmap.h"
#include "networkd-dhcp-server-bus.h"
#include "networkd-link-bus.h"
#include "networkd-manager.h"
#include "strv.h"
static int property_get_leases(
sd_bus *bus,
+1 -4
View File
@@ -1,10 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-bus.h"
#include "sd-dhcp-server.h"
#include "bus-object.h"
#include "networkd-forward.h"
extern const BusObjectImplementation dhcp_server_object;
@@ -1,11 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "alloc-util.h"
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "hashmap.h"
#include "networkd-dhcp-server-static-lease.h"
#include "networkd-network.h"
#include "networkd-util.h"
#include "string-util.h"
static DHCPStaticLease* dhcp_static_lease_free(DHCPStaticLease *static_lease) {
if (!static_lease)

Some files were not shown because too many files have changed in this diff Show More