aboutgitcodebugslistschat
path: root/udp.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-11-07 12:40:15 +1100
committerStefano Brivio <sbrivio@redhat.com>2023-11-07 09:53:41 +0100
commit732e24937618f5848e182dc8a38eb170cf079394 (patch)
treef9748dad8026c85506fad12fd8bb400782635be9 /udp.h
parent125c5e52a5c963ead98b175c440314b4c9071143 (diff)
downloadpasst-732e24937618f5848e182dc8a38eb170cf079394.tar
passt-732e24937618f5848e182dc8a38eb170cf079394.tar.gz
passt-732e24937618f5848e182dc8a38eb170cf079394.tar.bz2
passt-732e24937618f5848e182dc8a38eb170cf079394.tar.lz
passt-732e24937618f5848e182dc8a38eb170cf079394.tar.xz
passt-732e24937618f5848e182dc8a38eb170cf079394.tar.zst
passt-732e24937618f5848e182dc8a38eb170cf079394.zip
pif: Record originating pif in listening socket refs
For certain socket types, we record in the epoll ref whether they're sockets in the namespace, or on the host. We now have the notion of "pif" to indicate what "place" a socket is associated with, so generalise the simple one-bit 'ns' to a pif id. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'udp.h')
-rw-r--r--udp.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/udp.h b/udp.h
index 7837134..dbaa018 100644
--- a/udp.h
+++ b/udp.h
@@ -20,21 +20,21 @@ void udp_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s);
/**
* union udp_epoll_ref - epoll reference portion for TCP connections
+ * @port: Source port for connected sockets, bound port otherwise
+ * @pif: pif for this socket
* @bound: Set if this file descriptor is a bound socket
* @splice: Set if descriptor packets to be "spliced"
* @orig: Set if a spliced socket which can originate "connections"
- * @ns: Set if this is a socket in the pasta network namespace
* @v6: Set for IPv6 sockets or connections
- * @port: Source port for connected sockets, bound port otherwise
* @u32: Opaque u32 value of reference
*/
union udp_epoll_ref {
struct {
+ in_port_t port;
+ uint8_t pif;
bool splice:1,
orig:1,
- ns:1,
v6:1;
- uint32_t port:16;
};
uint32_t u32;
};