diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-30 13:02:09 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-12-04 09:51:02 +0100 |
commit | f08ce92a134e83e7c36050f4482b140b937c8dbb (patch) | |
tree | cd0ab75fb606e95bac6dff4d747f2a4377941214 /flow_table.h | |
parent | 16ae03260800b8044efa541edcf43d4fb83b740d (diff) | |
download | passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.tar passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.tar.gz passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.tar.bz2 passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.tar.lz passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.tar.xz passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.tar.zst passt-f08ce92a134e83e7c36050f4482b140b937c8dbb.zip |
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>
Diffstat (limited to 'flow_table.h')
-rw-r--r-- | flow_table.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/flow_table.h b/flow_table.h new file mode 100644 index 0000000..c4c646b --- /dev/null +++ b/flow_table.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright Red Hat + * Author: David Gibson <david@gibson.dropbear.id.au> + * + * Definitions for the global table of packet flows. + */ +#ifndef FLOW_TABLE_H +#define FLOW_TABLE_H + +/** + * union flow - Descriptor for a logical packet flow (e.g. connection) + * @f: Fields common between all variants + * @tcp: Fields for non-spliced TCP connections + * @tcp_splice: Fields for spliced TCP connections +*/ +union flow { + struct flow_common f; + struct tcp_tap_conn tcp; + struct tcp_splice_conn tcp_splice; +}; + +/* Global Flow Table */ +extern union flow flowtab[]; + +#endif /* FLOW_TABLE_H */ |