tcpdump mailing list archives
Directly accessing packet buffer
From: Rayne <hjazz6 () ymail com>
Date: Mon, 28 Mar 2011 23:18:29 -0700 (PDT)
Hi, I'm not sure if this is the right place to ask this question. Please direct me to a more suitable forum if otherwise. I would like to be able to directly access the buffer where packets are stored when they're received. After some googling, I think perhaps libpcap with mmap would be the solution. Does libpcap 1.0 and above support mmap?
From my understanding, mmap would allow me to directly access the buffer without having to explicitly copy the packet to another buffer for me to do processing. I would also appreciate it if someone can let me know where I can find examples of such applications, as many examples of mmap I've found involves mapping a buffer for file operations, rather than integrating it with pcap functions like pcap_loop, pcap_next_ex etc.
Thank you. Regards, Rayne - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Directly accessing packet buffer Rayne (Mar 28)
- Re: Directly accessing packet buffer Guy Harris (Mar 28)