From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: passt.top; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=io5407/3; dkim-atps=neutral Received: from mail-yx1-xb149.google.com (mail-yx1-xb149.google.com [IPv6:2607:f8b0:4864:20::b149]) by passt.top (Postfix) with ESMTPS id CC1755A0265 for ; Thu, 19 Feb 2026 19:45:01 +0100 (CET) Received: by mail-yx1-xb149.google.com with SMTP id 956f58d0204a3-649b6352303so2196586d50.2 for ; Thu, 19 Feb 2026 10:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771526700; x=1772131500; darn=passt.top; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=IdaZLfpm6UMnYqhaEmXpgLru8j87Dqus52SbX5Wiwag=; b=io5407/38+vFZB6C5FeY9MpwhWagQ/biH4xyeMkill+LEv6FqOwouUoMDDhBS8gyEa 0fWGPCJYe/sEke3xWE4dY5GsnCjTh5rNvUNmQpH2amodEolM+19XLtzVWmNb6MiivrxL e50XdJ4LBgkiNdN+/q2h040rGrD4BBGRztwIwp2z3MXQREw6IBtQkokl38K1LWeSPjFI cIOkbrGIvpsUQitaY5G9t7B9yhfiHlgXisx5IWP3EJU/AoQ75rvaskg0730ALcj8g59N JcFQxXabq+DocbGfX6dfUVuuYmOIuY6xzf6I1zJXmnv2Zl0xVfuTeBXCMKSzTGjcz4y0 Nn9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771526700; x=1772131500; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IdaZLfpm6UMnYqhaEmXpgLru8j87Dqus52SbX5Wiwag=; b=cfUyOrpLJkliA47gS2oOPVSFRwSQs7ePuMDwBp6iL6BxHI/DS2HcRNRVnKAWYuw2ss +cWRbMpiehylXDYibzEHqpFmbHNTZGZI2Fqh/FN3WukjwVS0y2LDM33v5/VR8ymQDnmf RYyw48/vO/y1DMsjIDW+CILZD/yixnhli4T9kl9/oTsVUuREI+RUamz+OjfhVT/+brbS 0EtMYQ2uUnSzBKfkXhpxJumvMGCywKzb2CR6jOwQi1zFKUBoP1YnUAsSQvUPGvqvcKcX qS8nSc23gn7nvW7Fdayg7w/mk56Buc5k7T3Mf5AWfO1v3Eg5ZnZeRsPxW+VOjO5hm2Gk xcRg== X-Gm-Message-State: AOJu0YzE56YEO+ibMBtXa5e6aUww7CkjuQ5Tw+JBKX5cpGjSMzWMFWFr K2MJ7/l/si34fRLOi/shM3/aTpdYdyHAfhEz34UrRU+VGQOX1QV61RKAZNmONqYReCSnrKfWyIM chdh/tYIeQCQfuSIxivBKhnrpfoEKdxGHR+rsvyjgEtdzC0ec2kCk03bVowgwudALevhVB4hRi1 C7yTu4P+w589qOTDhma//K6NoG7JzGJ2GSSiyrPA== X-Received: from yxuy7.prod.google.com ([2002:a53:be07:0:b0:64a:f2dc:284c]) (user=pefoley job=prod-delivery.src-stubby-dispatcher) by 2002:a05:690e:23db:b0:649:b9f4:c53d with SMTP id 956f58d0204a3-64c21b5fe6bmr11114319d50.67.1771526700086; Thu, 19 Feb 2026 10:45:00 -0800 (PST) Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.371.g1d285c8824-goog Message-ID: <20260219184454.1501389-1-pefoley@google.com> Subject: [PATCH] Add missing includes to headers From: Peter Foley To: passt-dev@passt.top Content-Type: text/plain; charset="UTF-8" X-MailFrom: 3LFqXaQcKCZEAz096zJ19916z.x97AvDDE-yzGAvDDE.E9A@flex--pefoley.bounces.google.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: DTFECUOCCRFHEWXLMLKO6YSSU5QLQ5AH X-Message-ID-Hash: DTFECUOCCRFHEWXLMLKO6YSSU5QLQ5AH X-Mailman-Approved-At: Sat, 21 Feb 2026 18:49:47 +0100 CC: Peter Foley X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Date: Thu, 19 Feb 2026 18:45:02 X-Original-Date: Thu, 19 Feb 2026 13:44:54 -0500 Support build systems like bazel that check that headers are self-contained. Signed-off-by: Peter Foley --- flow.h | 6 ++++++ flow_table.h | 1 + icmp_flow.h | 2 ++ inany.h | 5 +++++ ip.h | 2 ++ linux_dep.h | 3 +++ pif.h | 4 ++++ seccomp.sh | 5 +++++ siphash.h | 3 +++ tap.h | 5 +++++ tcp_conn.h | 4 ++++ tcp_internal.h | 5 +++++ udp_internal.h | 3 +++ util.c | 1 + 14 files changed, 49 insertions(+) diff --git a/flow.h b/flow.h index d636358..897c9ea 100644 --- a/flow.h +++ b/flow.h @@ -7,6 +7,12 @@ #ifndef FLOW_H #define FLOW_H +#include +#include + +#include "inany.h" +#include "util.h" + #define FLOW_TIMER_INTERVAL 1000 /* ms */ /** diff --git a/flow_table.h b/flow_table.h index 73de13b..8fb7b5c 100644 --- a/flow_table.h +++ b/flow_table.h @@ -7,6 +7,7 @@ #ifndef FLOW_TABLE_H #define FLOW_TABLE_H +#include "pif.h" #include "tcp_conn.h" #include "icmp_flow.h" #include "udp_flow.h" diff --git a/icmp_flow.h b/icmp_flow.h index fb93801..3af98be 100644 --- a/icmp_flow.h +++ b/icmp_flow.h @@ -7,6 +7,8 @@ #ifndef ICMP_FLOW_H #define ICMP_FLOW_H +#include "flow.h" + /** * struct icmp_ping_flow - Descriptor for a flow of ping requests/replies * @f: Generic flow information diff --git a/inany.h b/inany.h index b02c289..c7de094 100644 --- a/inany.h +++ b/inany.h @@ -9,6 +9,11 @@ #ifndef INANY_H #define INANY_H +#include + +#include "ip.h" +#include "siphash.h" + struct siphash_state; /** union inany_addr - Represents either an IPv4 or IPv6 address diff --git a/ip.h b/ip.h index a8043c2..3be2d4e 100644 --- a/ip.h +++ b/ip.h @@ -9,6 +9,8 @@ #include #include +#include "util.h" + #define IN4_IS_ADDR_UNSPECIFIED(a) \ (((struct in_addr *)(a))->s_addr == htonl_constant(INADDR_ANY)) #define IN4_IS_ADDR_BROADCAST(a) \ diff --git a/linux_dep.h b/linux_dep.h index 89e590c..3f8184b 100644 --- a/linux_dep.h +++ b/linux_dep.h @@ -7,6 +7,9 @@ #ifndef LINUX_DEP_H #define LINUX_DEP_H +#include +#include + /* struct tcp_info_linux - Information from Linux TCP_INFO getsockopt() * * Largely derived from include/linux/tcp.h in the Linux kernel diff --git a/pif.h b/pif.h index 0f7f667..7c755bd 100644 --- a/pif.h +++ b/pif.h @@ -7,6 +7,10 @@ #ifndef PIF_H #define PIF_H +#include + +#include "epoll_type.h" + union inany_addr; union sockaddr_inany; diff --git a/seccomp.sh b/seccomp.sh index 60ebe84..5347586 100755 --- a/seccomp.sh +++ b/seccomp.sh @@ -34,6 +34,11 @@ AUDIT_ARCH="AUDIT_ARCH_$(echo ${ARCH} | tr '[a-z]' '[A-Z]' \ HEADER="/* This file was automatically generated by $(basename ${0}) */ +#include +#include +#include +#include + #ifndef AUDIT_ARCH_PPC64LE #define AUDIT_ARCH_PPC64LE (AUDIT_ARCH_PPC64 | __AUDIT_ARCH_LE) #endif" diff --git a/siphash.h b/siphash.h index e760236..bbddcac 100644 --- a/siphash.h +++ b/siphash.h @@ -44,6 +44,9 @@ #ifndef SIPHASH_H #define SIPHASH_H +#include +#include + /** * struct siphash_state - Internal state of siphash calculation */ diff --git a/tap.h b/tap.h index cc780d1..07ca096 100644 --- a/tap.h +++ b/tap.h @@ -6,6 +6,11 @@ #ifndef TAP_H #define TAP_H +#include +#include + +#include "passt.h" + /** L2_MAX_LEN_PASTA - Maximum frame length for pasta mode (with L2 header) * * The kernel tuntap device imposes a maximum frame size of 65535 including diff --git a/tcp_conn.h b/tcp_conn.h index 21cea10..d4d0139 100644 --- a/tcp_conn.h +++ b/tcp_conn.h @@ -9,6 +9,10 @@ #ifndef TCP_CONN_H #define TCP_CONN_H +#include + +#include "flow.h" + /** * struct tcp_tap_conn - Descriptor for a TCP connection (not spliced) * @f: Generic flow information diff --git a/tcp_internal.h b/tcp_internal.h index 518913b..591e58c 100644 --- a/tcp_internal.h +++ b/tcp_internal.h @@ -6,6 +6,11 @@ #ifndef TCP_INTERNAL_H #define TCP_INTERNAL_H +#include +#include + +#include "util.h" + #define MAX_WS 8 #define MAX_WINDOW (1 << (16 + (MAX_WS))) diff --git a/udp_internal.h b/udp_internal.h index 0a8fe49..64e4577 100644 --- a/udp_internal.h +++ b/udp_internal.h @@ -6,6 +6,9 @@ #ifndef UDP_INTERNAL_H #define UDP_INTERNAL_H +#include +#include + #include "tap.h" /* needed by udp_meta_t */ /** diff --git a/util.c b/util.c index a48f727..db27431 100644 --- a/util.c +++ b/util.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "linux_dep.h" -- 2.53.0.371.g1d285c8824-goog