Kernel buffer size

Dec 23, 2013 at 6:12 AM
I am using to capture packets (_communicator.RecievePackets(HandlePacket, 0)

the thing is, the _communicator gets packets that I recieved to my computer before I acatually started the RecievePackets method.
I think that's maybe because there is a buffer that buffers packets. (Is that correct?)

I thought about just setting the BufferSize and lowering it so it will get only packets that are sent while his RecievePackets method is running.

what is the default size of the buffer?
and also, how can I make it only get packets that are recieved while he is running?

Thanks a lot,
Dec 30, 2013 at 3:35 AM
Hi Ofek,

From Pcap.Net PacketCommunicator.SetKernelBuffer() documentation:
    /// Set the size of the kernel buffer associated with an adapter.
    /// If an old buffer was already created with a previous call to SetKernelBufferSize(), it is deleted and its content is discarded.
    /// LivePacketDevice.Open() creates a 1 MByte buffer by default.
For more information, see

I hope this helps,