Project

General

Profile

Actions

Feature #197

closed

Investigate removing memcpy() from pcap runmodes and possibly others.

Added by Will Metcalf over 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

currently in the pcap run modes inside of the callback function we do the following memcpy()

memcpy(p->pkt, pkt, p->pktlen);

This is an artifact from the NFQUEUE and is needed by that run mode, but may not be needed by libpcap. We should investigate modifying pkt to simply use the ptr given to use by libpcap. Not sure if this is thread safe etc. In my initial test making the following code modifications lead to a 20% increase but also a pretty big loss in accuracy.

decode.h
//uint8_t pkt[IPV6_HEADER_LEN + 65536 + 28];
uint8_t *pkt;

source-pcap.c
//memcpy(p->pkt, pkt, p->pktlen);
p->pkt = pkt;


Files

Actions

Also available in: Atom PDF