1
0
Fork 0
mirror of https://passt.top/passt synced 2025-05-30 12:55:42 +02:00

pcap: add pcap_iov()

Introduce a new function pcap_iov() to capture packet desribed by an IO
vector.

Update pcap_frame() to manage iovcnt > 1.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-ID: <20240303135114.1023026-2-lvivier@redhat.com>
[dwg: Fixed trivial cppcheck regressions]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Laurent Vivier 2024-03-06 16:58:30 +11:00 committed by Stefano Brivio
parent 3b9098aa49
commit 94502fa15e
3 changed files with 24 additions and 5 deletions

1
iov.c
View file

@ -146,7 +146,6 @@ size_t iov_to_buf(const struct iovec *iov, size_t iov_cnt,
*
* Returns: The total size in bytes.
*/
/* cppcheck-suppress unusedFunction */
size_t iov_size(const struct iovec *iov, size_t iov_cnt)
{
unsigned int i;