mirror of
https://passt.top/passt
synced 2025-06-10 09:35:34 +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
11
flow.c
11
flow.c
|
@ -6,8 +6,16 @@
|
|||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "passt.h"
|
||||
#include "siphash.h"
|
||||
#include "inany.h"
|
||||
#include "flow.h"
|
||||
#include "tcp_conn.h"
|
||||
#include "flow_table.h"
|
||||
|
||||
const char *flow_type_str[] = {
|
||||
[FLOW_TYPE_NONE] = "<none>",
|
||||
|
@ -16,3 +24,6 @@ const char *flow_type_str[] = {
|
|||
};
|
||||
static_assert(ARRAY_SIZE(flow_type_str) == FLOW_NUM_TYPES,
|
||||
"flow_type_str[] doesn't match enum flow_type");
|
||||
|
||||
/* Global Flow Table */
|
||||
union flow flowtab[FLOW_MAX];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue