mirror of
https://passt.top/passt
synced 2025-05-22 01:05:35 +02:00
tcp: Move tcp_l2_buf_fill_headers() to tcp_buf.c
This function only has callers in tcp_buf.c. More importantly, it's inherently tied to the "buf" path, because it uses internal knowledge of how we lay out the various headers across our locally allocated buffers. Therefore, move it to tcp_buf.c. Slightly reformat the prototypes while we're at it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
This commit is contained in:
parent
3958736de5
commit
71a16dbc49
4 changed files with 61 additions and 79 deletions
|
@ -168,19 +168,15 @@ void tcp_update_check_tcp4(const struct iphdr *iph,
|
|||
void tcp_update_check_tcp6(const struct ipv6hdr *ip6h,
|
||||
const struct iovec *iov, int iov_cnt,
|
||||
size_t l4offset);
|
||||
size_t tcp_fill_headers4(const struct tcp_tap_conn *conn,
|
||||
struct tap_hdr *taph,
|
||||
struct iphdr *iph, struct tcp_payload_t *bp,
|
||||
size_t dlen, const uint16_t *check,
|
||||
uint32_t seq, bool no_tcp_csum);
|
||||
size_t tcp_fill_headers6(const struct tcp_tap_conn *conn,
|
||||
struct tap_hdr *taph,
|
||||
struct ipv6hdr *ip6h, struct tcp_payload_t *bp,
|
||||
size_t dlen, uint32_t seq, bool no_tcp_csum);
|
||||
size_t tcp_l2_buf_fill_headers(const struct tcp_tap_conn *conn,
|
||||
struct iovec *iov, size_t dlen,
|
||||
const uint16_t *check, uint32_t seq,
|
||||
bool no_tcp_csum);
|
||||
void tcp_fill_headers4(const struct tcp_tap_conn *conn,
|
||||
struct tap_hdr *taph, struct iphdr *iph,
|
||||
struct tcp_payload_t *bp, size_t dlen,
|
||||
const uint16_t *check, uint32_t seq, bool no_tcp_csum);
|
||||
void tcp_fill_headers6(const struct tcp_tap_conn *conn,
|
||||
struct tap_hdr *taph, struct ipv6hdr *ip6h,
|
||||
struct tcp_payload_t *bp, size_t dlen,
|
||||
uint32_t seq, bool no_tcp_csum);
|
||||
|
||||
int tcp_update_seqack_wnd(const struct ctx *c, struct tcp_tap_conn *conn,
|
||||
bool force_seq, struct tcp_info_linux *tinfo);
|
||||
int tcp_prepare_flags(const struct ctx *c, struct tcp_tap_conn *conn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue