tcpdump mailing list archives
Re: Headroom
From: "Harley Stenzel" <hstenzel () gmail com>
Date: Fri, 6 Oct 2006 15:55:42 -0400
[Attempting to confuse dup message detection] On 10/6/06, Gianluca Varenni <gianluca.varenni () cacetech com> wrote:
Uhm, what's the purpose of some amount of memory put in front of the pcap_t structure? Maybe I don't understand your proposal completely...
I don't want the data in front of the pcap_t structure, I want it in front of the body of the packet that libpcap gives to a calling application. I maintain a libpcap stack application. We may perform some action on a packet that we receive, and that action may require prepending data or additional protocol headers. [please, list software, let me post!] [pretty please?] Presently, in order to prepend, I have to copy the packet to a larger buffer. I would prefer to not have to copy all the data from every packet into a new buffer simply so I can prepend 6 to 28 octets, depending on the protocols involved So, to that end, I want a way to tell libpcap to leave some amount of data unused in the buffer, so I can programatically know that it's safe to write to that number of octets in the contiguous block leading the packet. This does not help at all with the classic protocol analyzer operation; it is useful for applications which use libpcap for "stack" type operations. This is why headroom of 0 should be default. [and why I promise to try to be better about remembering to use the correct account to post]
GV
--Harley - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Headroom Harley Stenzel (Oct 06)
- Re: Headroom Gianluca Varenni (Oct 06)
- Re: Headroom Harley Stenzel (Oct 06)
- Re: Headroom Gianluca Varenni (Oct 06)
- Re: Headroom Harley Stenzel (Oct 06)
- Re: Headroom Harley Stenzel (Oct 06)
- Re: Headroom Stephen Donnelly (Oct 08)
- Re: Headroom Gianluca Varenni (Oct 06)