diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-18 15:26:28 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-19 18:32:37 +0200 |
commit | 4e2d36e83fb1ff86c2e7f6d0832827d59f829934 (patch) | |
tree | 3057970692f0a3924a12bc27bfbf758db6204030 /flow_table.h | |
parent | 8012f5ff55b64fcfcc8c9512492247153327d3c4 (diff) | |
download | passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.tar passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.tar.gz passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.tar.bz2 passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.tar.lz passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.tar.xz passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.tar.zst passt-4e2d36e83fb1ff86c2e7f6d0832827d59f829934.zip |
flow: Common address information for target side
Require the address and port information for the target (non
initiating) side to be populated when a flow enters TGT state.
Implement that for TCP and ICMP. For now this leaves some information
redundantly recorded in both generic and type specific fields. We'll
fix that in later patches.
For TCP we now use the information from the flow to construct the
destination socket address in both tcp_conn_from_tap() and
tcp_splice_connect().
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/flow_table.h b/flow_table.h index 586d857..aabdbb7 100644 --- a/flow_table.h +++ b/flow_table.h @@ -134,7 +134,10 @@ const struct flowside *flow_initiate_af(union flow *flow, uint8_t pif, const struct flowside *flow_initiate_sa(union flow *flow, uint8_t pif, const union sockaddr_inany *ssa, in_port_t dport); -void flow_target(union flow *flow, uint8_t pif); +const struct flowside *flow_target_af(union flow *flow, uint8_t pif, + sa_family_t af, + const void *saddr, in_port_t sport, + const void *daddr, in_port_t dport); union flow *flow_set_type(union flow *flow, enum flow_type type); #define FLOW_SET_TYPE(flow_, t_, var_) (&flow_set_type((flow_), (t_))->var_) |