On Thu, 22 Feb 2024 16:55:58 +1100 David Gibson <david(a)gibson.dropbear.id.au> wrote:Update the low-level helper pcap_frame() to take a struct iovec and offset within it, rather than an explicit pointer and length for the frame. This moves the handling of an offset (to skip vnet_len) from pcap_multiple() to pcap_frame(). This doesn't accomplish a great deal immediately, but will make subsequent changes easier. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- pcap.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pcap.c b/pcap.c index 501d52d4..8876a051 100644 --- a/pcap.c +++ b/pcap.c @@ -67,24 +67,25 @@ struct pcap_pkthdr { /** * pcap_frame() - Capture a single frame to pcap file with given timestamp - * @pkt: Pointer to data buffer, including L2 headers - * @len: L2 packet length + * @iov: iovec referencing buffer containing frame (with L2 headers)For consistency with, say, 1/6: "IO vector" -- Stefano