diff options
| -rw-r--r-- | arp.h | 2 | ||||
| -rw-r--r-- | checksum.h | 3 | ||||
| -rw-r--r-- | flow.h | 6 | ||||
| -rw-r--r-- | flow_table.h | 1 | ||||
| -rw-r--r-- | fwd.h | 10 | ||||
| -rw-r--r-- | icmp.h | 4 | ||||
| -rw-r--r-- | icmp_flow.h | 2 | ||||
| -rw-r--r-- | inany.h | 6 | ||||
| -rw-r--r-- | iov.h | 3 | ||||
| -rw-r--r-- | ip.h | 2 | ||||
| -rw-r--r-- | isolation.h | 3 | ||||
| -rw-r--r-- | lineread.h | 2 | ||||
| -rw-r--r-- | linux_dep.h | 3 | ||||
| -rw-r--r-- | log.h | 2 | ||||
| -rw-r--r-- | migrate.h | 3 | ||||
| -rw-r--r-- | netlink.h | 4 | ||||
| -rw-r--r-- | packet.h | 2 | ||||
| -rw-r--r-- | pasta.h | 2 | ||||
| -rw-r--r-- | pcap.h | 2 | ||||
| -rw-r--r-- | pif.h | 6 | ||||
| -rw-r--r-- | repair.h | 2 | ||||
| -rwxr-xr-x | seccomp.sh | 5 | ||||
| -rw-r--r-- | siphash.h | 3 | ||||
| -rw-r--r-- | tap.h | 5 | ||||
| -rw-r--r-- | tcp.h | 8 | ||||
| -rw-r--r-- | tcp_conn.h | 4 | ||||
| -rw-r--r-- | tcp_internal.h | 5 | ||||
| -rw-r--r-- | tcp_splice.h | 2 | ||||
| -rw-r--r-- | udp.h | 5 | ||||
| -rw-r--r-- | udp_flow.h | 6 | ||||
| -rw-r--r-- | udp_internal.h | 3 | ||||
| -rw-r--r-- | udp_vu.h | 2 | ||||
| -rw-r--r-- | util.c | 1 | ||||
| -rw-r--r-- | vu_common.h | 6 |
34 files changed, 123 insertions, 2 deletions
@@ -6,6 +6,8 @@ #ifndef ARP_H #define ARP_H +#include <linux/if_ether.h> + /** * struct arpmsg - 802.2 ARP IPv4 payload * @sha: Sender hardware address @@ -6,6 +6,9 @@ #ifndef CHECKSUM_H #define CHECKSUM_H +#include <stddef.h> +#include <stdint.h> + struct udphdr; struct icmphdr; struct icmp6hdr; @@ -7,6 +7,12 @@ #ifndef FLOW_H #define FLOW_H +#include <stdint.h> +#include <netinet/in.h> + +#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" @@ -7,7 +7,15 @@ #ifndef FWD_H #define FWD_H -union inany_addr; +#include <assert.h> +#include <stdbool.h> +#include <stddef.h> +#include <stdint.h> + +#include <netinet/in.h> + +#include "inany.h" + struct flowside; /* Number of ports for both TCP and UDP */ @@ -6,6 +6,10 @@ #ifndef ICMP_H #define ICMP_H +#include <stdint.h> + +#include <netinet/in.h> + struct ctx; struct icmp_ping_flow; 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 @@ -9,6 +9,12 @@ #ifndef INANY_H #define INANY_H +#include <assert.h> +#include <string.h> + +#include "ip.h" +#include "siphash.h" + struct siphash_state; /** union inany_addr - Represents either an IPv4 or IPv6 address @@ -15,8 +15,9 @@ #ifndef IOVEC_H #define IOVEC_H -#include <unistd.h> +#include <stdbool.h> #include <string.h> +#include <unistd.h> #define IOV_OF_LVALUE(lval) \ (struct iovec){ .iov_base = &(lval), .iov_len = sizeof(lval) } @@ -9,6 +9,8 @@ #include <netinet/ip.h> #include <netinet/ip6.h> +#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/isolation.h b/isolation.h index 80bb68d..0576168 100644 --- a/isolation.h +++ b/isolation.h @@ -7,6 +7,9 @@ #ifndef ISOLATION_H #define ISOLATION_H +#include <stdbool.h> +#include <unistd.h> + void isolate_initial(int argc, char **argv); void isolate_user(uid_t uid, gid_t gid, bool use_userns, const char *userns, enum passt_modes mode); @@ -6,6 +6,8 @@ #ifndef LINEREAD_H #define LINEREAD_H +#include <sys/types.h> + #define LINEREAD_BUFFER_SIZE 8192 /** 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 <stdint.h> +#include <unistd.h> + /* struct tcp_info_linux - Information from Linux TCP_INFO getsockopt() * * Largely derived from include/linux/tcp.h in the Linux kernel @@ -6,7 +6,9 @@ #ifndef LOG_H #define LOG_H +#include <stdarg.h> #include <stdbool.h> +#include <stddef.h> #include <syslog.h> /* This would make more sense in util.h, but because we use it in die(), that @@ -6,6 +6,9 @@ #ifndef MIGRATE_H #define MIGRATE_H +#include <stdbool.h> +#include <stdint.h> + /** * struct migrate_header - Migration header from source * @magic: 0xB1BB1D1B0BB1D1B0, network order @@ -6,6 +6,10 @@ #ifndef NETLINK_H #define NETLINK_H +#include <stdbool.h> + +#include <netinet/in.h> + extern int nl_sock; extern int nl_sock_ns; @@ -7,6 +7,8 @@ #define PACKET_H #include <stdbool.h> +#include <sys/uio.h> + #include "iov.h" #include "virtio.h" @@ -6,6 +6,8 @@ #ifndef PASTA_H #define PASTA_H +#include <unistd.h> + extern int pasta_child_pid; void pasta_open_ns(struct ctx *c, const char *netns); @@ -6,6 +6,8 @@ #ifndef PCAP_H #define PCAP_H +#include <stddef.h> + extern int pcap_fd; void pcap(const char *pkt, size_t l2len); @@ -7,6 +7,12 @@ #ifndef PIF_H #define PIF_H +#include <stdbool.h> + +#include <netinet/in.h> + +#include "epoll_type.h" + union inany_addr; union sockaddr_inany; @@ -6,6 +6,8 @@ #ifndef REPAIR_H #define REPAIR_H +#include <stdint.h> + void repair_sock_init(const struct ctx *c); int repair_listen_handler(struct ctx *c, uint32_t events); void repair_handler(struct ctx *c, uint32_t events); @@ -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 <stddef.h> +#include <linux/audit.h> +#include <linux/filter.h> +#include <linux/seccomp.h> + #ifndef AUDIT_ARCH_PPC64LE #define AUDIT_ARCH_PPC64LE (AUDIT_ARCH_PPC64 | __AUDIT_ARCH_LE) #endif" @@ -44,6 +44,9 @@ #ifndef SIPHASH_H #define SIPHASH_H +#include <stddef.h> +#include <stdint.h> + /** * struct siphash_state - Internal state of siphash calculation */ @@ -6,6 +6,11 @@ #ifndef TAP_H #define TAP_H +#include <stddef.h> +#include <stdint.h> + +#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 @@ -6,6 +6,14 @@ #ifndef TCP_H #define TCP_H +#include <stdbool.h> +#include <stdint.h> + +#include <netinet/in.h> +#include <sys/socket.h> + +#include "fwd.h" + #define TCP_TIMER_INTERVAL 1000 /* ms */ struct ctx; @@ -9,6 +9,10 @@ #ifndef TCP_CONN_H #define TCP_CONN_H +#include <stdint.h> + +#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 1d335be..d940885 100644 --- a/tcp_internal.h +++ b/tcp_internal.h @@ -6,6 +6,11 @@ #ifndef TCP_INTERNAL_H #define TCP_INTERNAL_H +#include <stdint.h> +#include <netinet/tcp.h> + +#include "util.h" + #define MAX_WS 8 #define MAX_WINDOW (1 << (16 + (MAX_WS))) diff --git a/tcp_splice.h b/tcp_splice.h index a20f3e2..dbfd55d 100644 --- a/tcp_splice.h +++ b/tcp_splice.h @@ -6,6 +6,8 @@ #ifndef TCP_SPLICE_H #define TCP_SPLICE_H +#include <stdint.h> + struct tcp_splice_conn; union sockaddr_inany; @@ -6,6 +6,11 @@ #ifndef UDP_H #define UDP_H +#include <stdint.h> +#include <netinet/in.h> + +#include "fwd.h" + void udp_listen_sock_handler(const struct ctx *c, union epoll_ref ref, uint32_t events, const struct timespec *now); void udp_sock_handler(const struct ctx *c, union epoll_ref ref, @@ -7,6 +7,12 @@ #ifndef UDP_FLOW_H #define UDP_FLOW_H +#include <stdbool.h> +#include <stdint.h> +#include <netinet/in.h> + +#include "flow.h" + /** * struct udp_flow - Descriptor for a flow of UDP packets * @f: Generic flow information 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 <netinet/in.h> +#include <netinet/udp.h> + #include "tap.h" /* needed by udp_meta_t */ /** @@ -6,6 +6,8 @@ #ifndef UDP_VU_H #define UDP_VU_H +#include "flow.h" + void udp_vu_listen_sock_data(const struct ctx *c, union epoll_ref ref, const struct timespec *now); void udp_vu_sock_to_tap(const struct ctx *c, int s, int n, flow_sidx_t tosidx); @@ -25,6 +25,7 @@ #include <errno.h> #include <stdbool.h> #include <linux/errqueue.h> +#include <linux/in6.h> #include <getopt.h> #include "linux_dep.h" diff --git a/vu_common.h b/vu_common.h index 052aff7..76eee87 100644 --- a/vu_common.h +++ b/vu_common.h @@ -7,8 +7,14 @@ #ifndef VU_COMMON_H #define VU_COMMON_H + +#include <stddef.h> + #include <linux/virtio_net.h> +#include "ip.h" +#include "virtio.h" + static inline void *vu_eth(void *base) { return ((char *)base + VNET_HLEN); |
