From ca69c3f1964846b27f8333cd06f7594289cbf53b Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 17 Nov 2022 16:58:55 +1100 Subject: inany: Helper functions for handling addresses which could be IPv4 or IPv6 struct tcp_conn stores an address which could be IPv6 or IPv4 using a union. We can do this without an additional tag by encoding IPv4 addresses as IPv4-mapped IPv6 addresses. This approach is useful wider than the specific place in tcp_conn, so expose a new 'union inany_addr' like this from a new inany.h. Along with that create a number of helper functions to make working with these "inany" addresses easier. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- tcp_splice.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tcp_splice.c') diff --git a/tcp_splice.c b/tcp_splice.c index bfcf63d..2be9b77 100644 --- a/tcp_splice.c +++ b/tcp_splice.c @@ -52,6 +52,7 @@ #include "passt.h" #include "log.h" #include "tcp_splice.h" +#include "inany.h" #include "tcp_conn.h" -- cgit v1.2.3