Then, rework header inclusions for DHCP related files.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <linux/if_ether.h>
-
#include "sd-dhcp-client-id.h"
#include "dhcp-duid-internal.h"
-#include "sd-forward.h"
-#include "sparse-endian.h"
+#include "dhcp-forward.h"
+#include "ether-addr-util.h"
/* RFC 2132 section 9.14: its minimum length is 2.
* Note, its maximum is not mentioend in the RFC. Hence, 255. */
#include "sd-dhcp-client.h"
#include "dhcp-client-id-internal.h"
+#include "dhcp-forward.h"
#include "dhcp-protocol.h"
#include "ether-addr-util.h"
#include "iovec-wrapper.h"
#include "network-common.h"
-#include "sd-forward.h"
-#include "socket-util.h"
-#include "tlv-util.h"
struct sd_dhcp_client {
unsigned n_ref;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-forward.h"
+#include "dhcp-forward.h"
int dhcp_client_send_message(sd_dhcp_client *client, uint8_t type);
#include "sd-dhcp-duid.h"
#include "sd-id128.h"
+#include "dhcp-forward.h"
#include "ether-addr-util.h"
-#include "sd-forward.h"
-#include "sparse-endian.h"
#define SYSTEMD_PEN 43793
--- /dev/null
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "sd-forward.h"
+#include "sparse-endian.h"
+
+struct in_pktinfo;
+struct iphdr;
+struct udphdr;
+
+typedef struct sd_dhcp_client sd_dhcp_client;
+typedef struct sd_dhcp_client_id sd_dhcp_client_id;
+typedef struct sd_dhcp_duid sd_dhcp_duid;
+typedef struct sd_dhcp_lease sd_dhcp_lease;
+typedef struct sd_dhcp_message sd_dhcp_message;
+typedef struct sd_dhcp_relay sd_dhcp_relay;
+typedef struct sd_dhcp_relay_interface sd_dhcp_relay_interface;
+typedef struct sd_dhcp_route sd_dhcp_route;
+typedef struct sd_dhcp_server sd_dhcp_server;
+typedef struct sd_dhcp_server_lease sd_dhcp_server_lease;
+
+typedef struct DHCPMessageHeader DHCPMessageHeader;
+typedef struct DHCPRequest DHCPRequest;
+typedef struct DHCPServerData DHCPServerData;
+
+typedef struct TLV TLV;
Copyright © 2013 Intel Corporation. All rights reserved.
***/
+#include <netinet/in.h>
+
#include "sd-dhcp-lease.h"
-#include "sd-forward.h"
-#include "dhcp-client-id-internal.h"
+#include "dhcp-forward.h"
#include "dhcp-message.h"
+#include "time-util.h"
struct sd_dhcp_lease {
unsigned n_ref;
#include "alloc-util.h"
#include "ansi-color.h"
#include "arphrd-util.h"
+#include "dhcp-message.h"
#include "dhcp-message-dump.h"
-#include "dhcp-protocol.h"
#include "dhcp-route.h"
#include "dns-resolver-internal.h"
#include "escape.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "dhcp-message.h"
+#include "dhcp-forward.h"
typedef enum {
DUMP_DHCP_MESSAGE_LEGEND = 1 << 0,
#include "alloc-util.h"
#include "dhcp-client-id-internal.h"
#include "dhcp-message.h"
-#include "dhcp-protocol.h"
#include "dhcp-route.h"
#include "dns-def.h"
#include "dns-domain.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-dhcp-client-id.h"
-#include "sd-forward.h"
-
+#include "dhcp-forward.h"
#include "dhcp-protocol.h"
#include "tlv-util.h"
#include "sd-dhcp-protocol.h" /* IWYU pragma: export */
-#include "sd-forward.h"
-#include "sparse-endian.h"
+#include "dhcp-forward.h"
#include "time-util.h"
/* RFC 8925 - IPv6-Only Preferred Option for DHCPv4 3.4.
#include "sd-event.h"
#include "dhcp-message.h"
-#include "dhcp-protocol.h"
#include "dhcp-relay-internal.h"
#include "errno-util.h"
#include "ether-addr-util.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
+#include <netinet/in.h>
+#include <sys/uio.h>
+
#include "sd-dhcp-relay.h"
-#include "dhcp-message.h"
-#include "ether-addr-util.h"
+#include "dhcp-forward.h"
#include "network-common.h"
-#include "sd-forward.h"
-#include "tlv-util.h"
#define DHCP_RELAY_IFINDEX_UNBOUND (-100)
#include "sd-event.h"
#include "dhcp-message.h"
-#include "dhcp-protocol.h"
#include "dhcp-relay-internal.h"
#include "hashmap.h"
#include "in-addr-util.h"
#include "sd-dhcp-lease.h"
-#include "dhcp-route.h" /* IWYU pragma: keep */
+#include "dhcp-route.h"
int sd_dhcp_route_get_destination(sd_dhcp_route *route, struct in_addr *ret) {
assert_return(route, -EINVAL);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-forward.h"
+#include <netinet/in.h>
-#include "in-addr-util.h" /* IWYU pragma: keep */
+#include "dhcp-forward.h" /* IWYU pragma: export */
struct sd_dhcp_route {
struct in_addr dst_addr;
Copyright © 2013 Intel Corporation. All rights reserved.
***/
+#include <netinet/in.h>
+
#include "sd-dhcp-server.h"
+#include "dhcp-forward.h"
#include "dhcp-message.h"
#include "network-common.h"
-#include "sd-forward.h"
-#include "sparse-endian.h"
-#include "tlv-util.h"
typedef struct sd_dhcp_server {
unsigned n_ref;
#include "sd-dhcp-server-lease.h"
#include "dhcp-client-id-internal.h"
-#include "dhcp-server-internal.h"
-#include "dhcp-server-request.h"
+#include "dhcp-forward.h"
#include "ether-addr-util.h"
-#include "sd-forward.h"
typedef struct sd_dhcp_server_lease {
unsigned n_ref;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-dhcp-server-lease.h"
-
#include "dhcp-client-id-internal.h"
-#include "dhcp-message.h"
+#include "dhcp-forward.h"
#include "ether-addr-util.h"
-#include "sd-forward.h"
-#include "sparse-endian.h"
#include "time-util.h"
typedef struct DHCPRequest {
#include "dhcp-server-internal.h"
#include "dhcp-server-lease-internal.h"
+#include "dhcp-server-request.h"
#include "dhcp-server-send.h"
#include "errno-util.h"
#include "fd-util.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-forward.h"
-
-#include "dhcp-server-request.h"
+#include "dhcp-forward.h"
int dhcp_server_send_reply(
sd_dhcp_server *server,
#include "socket-util.h"
#include "string-util.h"
#include "time-util.h"
+#include "tlv-util.h"
#include "web-util.h"
#define MAX_MAC_ADDR_LEN CONST_MAX(INFINIBAND_ALEN, ETH_ALEN)
#include "alloc-util.h"
#include "dhcp-client-internal.h"
#include "dhcp-lease-internal.h"
-#include "dhcp-route.h" /* IWYU pragma: keep */
+#include "dhcp-route.h"
#include "dns-resolver-internal.h"
#include "in-addr-util.h"
#include "ip-util.h"
#include "in-addr-util.h"
#include "iovec-util.h"
#include "prioq.h"
+#include "tlv-util.h"
static sd_dhcp_relay* dhcp_relay_free(sd_dhcp_relay *relay) {
if (!relay)
#include "sd-event.h"
#include "alloc-util.h"
+#include "dhcp-server-internal.h"
#include "dhcp-server-lease-internal.h"
+#include "dhcp-server-request.h"
#include "dns-domain.h"
#include "errno-util.h"
#include "fd-util.h"
#include "dhcp-client-internal.h"
#include "dhcp-message.h"
-#include "dhcp-protocol.h"
#include "ether-addr-util.h"
#include "fd-util.h"
#include "hashmap.h"
#include "ip-util.h"
#include "log.h"
#include "set.h"
+#include "socket-util.h"
#include "strv.h"
#include "tests.h"
#include "dhcp-client-id-internal.h"
#include "dhcp-message.h"
#include "dhcp-message-dump.h"
-#include "dhcp-protocol.h"
#include "dhcp-route.h"
#include "dns-packet.h"
#include "dns-resolver-internal.h"
#include "sd-event.h"
-#include "dhcp-protocol.h"
-#include "dhcp-relay-internal.h" /* IWYU pragma: keep */
+#include "dhcp-message.h"
+#include "dhcp-relay-internal.h"
#include "ether-addr-util.h"
#include "fd-util.h"
#include "hashmap.h"
typedef enum sd_ndisc_event_t sd_ndisc_event_t;
typedef struct sd_ipv4ll sd_ipv4ll;
-typedef struct sd_dhcp_client sd_dhcp_client;
-typedef struct sd_dhcp_lease sd_dhcp_lease;
-typedef struct sd_dhcp_route sd_dhcp_route;
-typedef struct sd_dhcp_relay sd_dhcp_relay;
-typedef struct sd_dhcp_relay_interface sd_dhcp_relay_interface;
-typedef struct sd_dhcp_server sd_dhcp_server;
typedef struct sd_dns_resolver sd_dns_resolver;
typedef struct sd_ndisc sd_ndisc;
typedef struct sd_radv sd_radv;
#include "alloc-util.h"
#include "bus-object.h"
+#include "dhcp-server-internal.h"
#include "dhcp-server-lease-internal.h"
#include "hashmap.h"
#include "networkd-dhcp-server-bus.h"
/* IWYU pragma: always_keep */
#include "conf-parser-forward.h" /* IWYU pragma: export */
+#include "dhcp-forward.h" /* IWYU pragma: export */
#include "shared-forward.h" /* IWYU pragma: export */
typedef enum NetDevLocalAddressType NetDevLocalAddressType;
#include "sd-dhcp6-client.h"
#include "dhcp-lease-internal.h" /* IWYU pragma: keep */
+#include "dhcp-server-internal.h"
#include "dhcp-server-lease-internal.h"
#include "dhcp6-lease-internal.h"
#include "extract-word.h"