barcaroller
2014-03-30 14:01:09 UTC
I have two questions related to buffers in libpcap.
- I would like to to use the pcap_set_buffer_size() to run various
performance tests. However, I do not know the default buffer size (on
a 64-bit Linux system with 16 GB of RAM) and I do not know how to get
it (there is no pcap_get_buffer_size()). How can I tell what the
existing buffer size is before I start changing that value?
- I would like to improve the performance of pcap_dump() when writing
packets to disk. I know that pcap_dump() already uses some kind of
buffering. What is the best way to approach this? Can the
aforementioned function (pcap_set_buffer_size()) be used for this
purpose, or is that function used only during packet capture (e.g.
pcap_next())?
Thanks much!
- I would like to to use the pcap_set_buffer_size() to run various
performance tests. However, I do not know the default buffer size (on
a 64-bit Linux system with 16 GB of RAM) and I do not know how to get
it (there is no pcap_get_buffer_size()). How can I tell what the
existing buffer size is before I start changing that value?
- I would like to improve the performance of pcap_dump() when writing
packets to disk. I know that pcap_dump() already uses some kind of
buffering. What is the best way to approach this? Can the
aforementioned function (pcap_set_buffer_size()) be used for this
purpose, or is that function used only during packet capture (e.g.
pcap_next())?
Thanks much!