mirror of
https://passt.top/passt
synced 2025-06-16 20:35:33 +02:00
flow, tcp: Move TCP connection table to unified flow table
We want to generalise "connection" tracking to things other than true TCP connections. Continue implenenting this by renaming the TCP connection table to the "flow table" and moving it to flow.c. The definitions are split between flow.h and flow_table.h - we need this separation to avoid circular dependencies: the definitions in flow.h will be needed by many headers using the flow mechanism, but flow_table.h needs all those protocol specific headers in order to define the full flow table entry. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
16ae032608
commit
f08ce92a13
9 changed files with 107 additions and 82 deletions
5
tcp.h
5
tcp.h
|
@ -8,9 +8,6 @@
|
|||
|
||||
#define TCP_TIMER_INTERVAL 1000 /* ms */
|
||||
|
||||
#define TCP_CONN_INDEX_BITS 17 /* 128k - 1 */
|
||||
#define TCP_MAX_CONNS MAX_FROM_BITS(TCP_CONN_INDEX_BITS)
|
||||
|
||||
struct ctx;
|
||||
|
||||
void tcp_timer_handler(struct ctx *c, union epoll_ref ref);
|
||||
|
@ -56,7 +53,6 @@ union tcp_listen_epoll_ref {
|
|||
/**
|
||||
* struct tcp_ctx - Execution context for TCP routines
|
||||
* @hash_secret: 128-bit secret for hash functions, ISN and hash table
|
||||
* @conn_count: Count of total connections in connection table
|
||||
* @port_to_tap: Ports bound host-side, packets to tap or spliced
|
||||
* @fwd_in: Port forwarding configuration for inbound packets
|
||||
* @fwd_out: Port forwarding configuration for outbound packets
|
||||
|
@ -66,7 +62,6 @@ union tcp_listen_epoll_ref {
|
|||
*/
|
||||
struct tcp_ctx {
|
||||
uint64_t hash_secret[2];
|
||||
int conn_count;
|
||||
struct port_fwd fwd_in;
|
||||
struct port_fwd fwd_out;
|
||||
struct timespec timer_run;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue