tcpdump mailing list archives

Headroom


From: "Harley Stenzel" <hstenzel () gmail com>
Date: Fri, 6 Oct 2006 13:46:36 -0400

Greetings--

Has the idea of headroom for libpcap-based stack applications been
discussed before?  The idea is to have a known amount of empty/usable
space in front of the buffer given to the application by the
pcap_dispatch callback, pcap_next(), or pcap_next_ex().

It looks like it'd be a ((pcap_t *)p)->headroom, which would be added
to p->offset and p->bufsize for malloc.

p->offset would still have to guarantee alignment for for the data,
not for the beginning of the buffer.

Headroom would have to be specified at pcap_open_live() or
pcap_open_offline() time, so it could alter the pcap_t initialization
logic. I suppose the best approach would be to make an additional
variant of those functions, so the prototype changes don't ripple to
other apps.  Possibly have it be an additional options structure,
which may be null to get the current behavior.

Any thoughts?

Thanks.

--Harley
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: