network: cleanup header inclusion
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bond.h"
|
||||
#include "conf-parser.h"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#include "bridge.h"
|
||||
#include "missing.h"
|
||||
#include "netlink-util.h"
|
||||
#include "netdev/bridge.h"
|
||||
#include "network-internal.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "string-table.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include "netdev/dummy.h"
|
||||
#include "dummy.h"
|
||||
|
||||
const NetDevVTable dummy_vtable = {
|
||||
.object_size = sizeof(Dummy),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
#pragma once
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
typedef struct Dummy {
|
||||
NetDev meta;
|
||||
|
||||
@@ -6,14 +6,12 @@
|
||||
#include <linux/ip.h>
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "fou-tunnel.h"
|
||||
#include "ip-protocol-list.h"
|
||||
#include "missing.h"
|
||||
#include "netdev/fou-tunnel.h"
|
||||
#include "netlink-util.h"
|
||||
#include "networkd-link.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "parse-util.h"
|
||||
#include "sd-netlink.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <linux/fou.h>
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
typedef enum FooOverUDPEncapType {
|
||||
NETDEV_FOO_OVER_UDP_ENCAP_UNSPEC = FOU_ENCAP_UNSPEC,
|
||||
|
||||
@@ -2,19 +2,17 @@
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-parser.h"
|
||||
#include "extract-word.h"
|
||||
#include "geneve.h"
|
||||
#include "missing.h"
|
||||
#include "netlink-util.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "missing.h"
|
||||
#include "networkd-manager.h"
|
||||
|
||||
#define GENEVE_FLOW_LABEL_MAX_MASK 0xFFFFFU
|
||||
#define DEFAULT_GENEVE_DESTINATION_PORT 6081
|
||||
|
||||
@@ -5,7 +5,6 @@ typedef struct Geneve Geneve;
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "netdev.h"
|
||||
#include "networkd-link.h"
|
||||
#include "networkd-network.h"
|
||||
|
||||
#define GENEVE_VID_MAX (1u << 24) - 1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <net/if.h>
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "netdev/ipvlan.h"
|
||||
#include "ipvlan.h"
|
||||
#include "networkd-link.h"
|
||||
#include "string-table.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <linux/if_link.h>
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
typedef enum IPVlanMode {
|
||||
NETDEV_IPVLAN_MODE_L2 = IPVLAN_MODE_L2,
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include <linux/l2tp.h>
|
||||
#include <linux/genetlink.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "hashmap.h"
|
||||
#include "l2tp-tunnel.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "networkd-address.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "path-util.h"
|
||||
#include "sd-netlink.h"
|
||||
#include "socket-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <net/if.h>
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "netdev/macvlan.h"
|
||||
#include "macvlan.h"
|
||||
#include "string-table.h"
|
||||
|
||||
static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct MacVlan MacVlan;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
typedef enum MacVlanMode {
|
||||
NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE,
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include "bond.h"
|
||||
#include "bridge.h"
|
||||
#include "conf-parser.h"
|
||||
#include "network-internal.h"
|
||||
#include "netdev/bond.h"
|
||||
#include "netdev/bridge.h"
|
||||
#include "netdev/geneve.h"
|
||||
#include "netdev/ipvlan.h"
|
||||
#include "netdev/macsec.h"
|
||||
#include "netdev/macvlan.h"
|
||||
#include "netdev/tunnel.h"
|
||||
#include "netdev/tuntap.h"
|
||||
#include "netdev/veth.h"
|
||||
#include "netdev/vlan.h"
|
||||
#include "netdev/vxlan.h"
|
||||
#include "netdev/vrf.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev/vxcan.h"
|
||||
#include "netdev/wireguard.h"
|
||||
#include "netdev/fou-tunnel.h"
|
||||
#include "netdev/l2tp-tunnel.h"
|
||||
#include "netdev/xfrm.h"
|
||||
#include "geneve.h"
|
||||
#include "ipvlan.h"
|
||||
#include "macsec.h"
|
||||
#include "macvlan.h"
|
||||
#include "tunnel.h"
|
||||
#include "tuntap.h"
|
||||
#include "veth.h"
|
||||
#include "vlan-util.h"
|
||||
#include "vlan.h"
|
||||
#include "vxlan.h"
|
||||
#include "vrf.h"
|
||||
#include "netdev.h"
|
||||
#include "network-internal.h"
|
||||
#include "vxcan.h"
|
||||
#include "wireguard.h"
|
||||
#include "fou-tunnel.h"
|
||||
#include "l2tp-tunnel.h"
|
||||
#include "xfrm.h"
|
||||
%}
|
||||
struct ConfigPerfItem;
|
||||
%null_strings
|
||||
|
||||
+22
-23
@@ -4,41 +4,40 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bond.h"
|
||||
#include "bridge.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "dummy.h"
|
||||
#include "fd-util.h"
|
||||
#include "fou-tunnel.h"
|
||||
#include "geneve.h"
|
||||
#include "ipvlan.h"
|
||||
#include "l2tp-tunnel.h"
|
||||
#include "list.h"
|
||||
#include "netdev/bond.h"
|
||||
#include "netdev/bridge.h"
|
||||
#include "netdev/dummy.h"
|
||||
#include "netdev/fou-tunnel.h"
|
||||
#include "netdev/geneve.h"
|
||||
#include "netdev/ipvlan.h"
|
||||
#include "netdev/l2tp-tunnel.h"
|
||||
#include "netdev/macsec.h"
|
||||
#include "netdev/macvlan.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev/netdevsim.h"
|
||||
#include "netdev/nlmon.h"
|
||||
#include "netdev/tunnel.h"
|
||||
#include "netdev/tuntap.h"
|
||||
#include "netdev/vcan.h"
|
||||
#include "netdev/veth.h"
|
||||
#include "netdev/vlan.h"
|
||||
#include "netdev/vrf.h"
|
||||
#include "netdev/vxcan.h"
|
||||
#include "netdev/vxlan.h"
|
||||
#include "netdev/wireguard.h"
|
||||
#include "netdev/xfrm.h"
|
||||
#include "macsec.h"
|
||||
#include "macvlan.h"
|
||||
#include "netdev.h"
|
||||
#include "netdevsim.h"
|
||||
#include "netlink-util.h"
|
||||
#include "network-internal.h"
|
||||
#include "networkd-link.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "nlmon.h"
|
||||
#include "siphash24.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "tunnel.h"
|
||||
#include "tuntap.h"
|
||||
#include "vcan.h"
|
||||
#include "veth.h"
|
||||
#include "vlan.h"
|
||||
#include "vrf.h"
|
||||
#include "vxcan.h"
|
||||
#include "vxlan.h"
|
||||
#include "wireguard.h"
|
||||
#include "xfrm.h"
|
||||
|
||||
const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
|
||||
[NETDEV_KIND_BRIDGE] = &bridge_vtable,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "list.h"
|
||||
#include "../networkd-link.h"
|
||||
#include "networkd-link.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct netdev_join_callback netdev_join_callback;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include "netdev/netdevsim.h"
|
||||
#include "missing.h"
|
||||
#include "netdevsim.h"
|
||||
|
||||
const NetDevVTable netdevsim_vtable = {
|
||||
.object_size = sizeof(NetDevSim),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct NetDevSim NetDevSim;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct NetDevSim {
|
||||
NetDev meta;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include "netdev/nlmon.h"
|
||||
#include "nlmon.h"
|
||||
|
||||
static int netdev_nlmon_verify(NetDev *netdev, const char *filename) {
|
||||
assert(netdev);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct NLMon NLMon;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct NLMon {
|
||||
NetDev meta;
|
||||
|
||||
@@ -6,16 +6,13 @@
|
||||
#include <linux/if_tunnel.h>
|
||||
#include <linux/ip6_tunnel.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "missing.h"
|
||||
#include "netlink-util.h"
|
||||
#include "networkd-link.h"
|
||||
#include "netdev/tunnel.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "tunnel.h"
|
||||
#include "util.h"
|
||||
|
||||
#define DEFAULT_TNL_HOP_LIMIT 64
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "in-addr-util.h"
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev/fou-tunnel.h"
|
||||
#include "fou-tunnel.h"
|
||||
#include "netdev.h"
|
||||
|
||||
typedef enum Ip6TnlMode {
|
||||
NETDEV_IP6_TNL_MODE_IP6IP6,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "netdev/tuntap.h"
|
||||
#include "tuntap.h"
|
||||
#include "user-util.h"
|
||||
|
||||
#define TUN_DEV "/dev/net/tun"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct TunTap TunTap;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct TunTap {
|
||||
NetDev meta;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include "netdev/vcan.h"
|
||||
#include "vcan.h"
|
||||
|
||||
const NetDevVTable vcan_vtable = {
|
||||
.object_size = sizeof(VCan),
|
||||
|
||||
@@ -6,7 +6,7 @@ typedef struct VCan VCan;
|
||||
#include <netinet/in.h>
|
||||
#include <linux/can/netlink.h>
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct VCan {
|
||||
NetDev meta;
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include <net/if.h>
|
||||
#include <linux/veth.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "netdev/veth.h"
|
||||
#include "veth.h"
|
||||
|
||||
static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
|
||||
Veth *v;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct Veth Veth;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct Veth {
|
||||
NetDev meta;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <net/if.h>
|
||||
#include <linux/if_vlan.h>
|
||||
|
||||
#include "netdev/vlan.h"
|
||||
#include "vlan-util.h"
|
||||
#include "vlan.h"
|
||||
|
||||
static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *req) {
|
||||
struct ifla_vlan_flags flags = {};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct VLan VLan;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct VLan {
|
||||
NetDev meta;
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
#include "missing.h"
|
||||
#include "netdev/vrf.h"
|
||||
#include "vrf.h"
|
||||
|
||||
static int netdev_vrf_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
|
||||
Vrf *v;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct Vrf Vrf;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct Vrf {
|
||||
NetDev meta;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <linux/can/vxcan.h>
|
||||
|
||||
#include "netdev/vxcan.h"
|
||||
#include "vxcan.h"
|
||||
|
||||
static int netdev_vxcan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
|
||||
VxCan *v;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct VxCan VxCan;
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
struct VxCan {
|
||||
NetDev meta;
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
@@ -12,9 +10,7 @@
|
||||
#include "strv.h"
|
||||
#include "parse-util.h"
|
||||
#include "missing.h"
|
||||
|
||||
#include "networkd-link.h"
|
||||
#include "netdev/vxlan.h"
|
||||
#include "vxlan.h"
|
||||
|
||||
static const char* const df_table[_NETDEV_VXLAN_DF_MAX] = {
|
||||
[NETDEV_VXLAN_DF_NO] = "no",
|
||||
|
||||
@@ -6,7 +6,7 @@ typedef struct VxLan VxLan;
|
||||
#include <linux/if_link.h>
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
#define VXLAN_VID_MAX (1u << 24) - 1
|
||||
#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "hexdecoct.h"
|
||||
#include "memory-util.h"
|
||||
#include "netlink-util.h"
|
||||
#include "networkd-link.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "networkd-util.h"
|
||||
#include "parse-util.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include "missing_network.h"
|
||||
#include "netdev/xfrm.h"
|
||||
#include "xfrm.h"
|
||||
|
||||
static int xfrm_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *message) {
|
||||
Xfrm *x;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
#pragma once
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netdev.h"
|
||||
|
||||
typedef struct Xfrm {
|
||||
NetDev meta;
|
||||
|
||||
Reference in New Issue
Block a user