mirror of
https://passt.top/passt
synced 2024-09-18 21:50:57 +00:00
Move all the TCP parts using internal buffers to tcp_buf.c and keep generic TCP management functions in tcp.c. Add tcp_internal.h to export needed functions from tcp.c and tcp_buf.h from tcp_buf.c With this change we can use existing TCP functions with a different kind of memory storage as for instance the shared memory provided by the guest via vhost-user. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
17 lines
519 B
C
17 lines
519 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright (c) 2021 Red Hat GmbH
|
|
* Author: Stefano Brivio <sbrivio@redhat.com>
|
|
*/
|
|
|
|
#ifndef TCP_BUF_H
|
|
#define TCP_BUF_H
|
|
|
|
void tcp_sock4_iov_init(const struct ctx *c);
|
|
void tcp_sock6_iov_init(const struct ctx *c);
|
|
void tcp_flags_flush(const struct ctx *c);
|
|
void tcp_payload_flush(const struct ctx *c);
|
|
int tcp_buf_data_from_sock(struct ctx *c, struct tcp_tap_conn *conn);
|
|
int tcp_buf_send_flag(struct ctx *c, struct tcp_tap_conn *conn, int flags);
|
|
|
|
#endif /*TCP_BUF_H */
|