[Winpcap-users] winpcap-app looses packets on full duplex Gigabit Ethernet connection

Tim Dylla t.dylla at stagetec.com
Mon Sep 7 04:01:24 PDT 2009


Hi List,

  I'm trying to exchange Data between a PC and a DSP over Gigabit
Ethernet. Since it's a point-to-point connection and bandwidth is
critical I don't use any other Protocol than Ethernet frames.
The DSP is capable of utilizing the full bandwidth of a full duplex
Gigabit Connection, so there is a lot of traffic to be captured and sent.
On the PC I use WinPcap to capture and send raw Ethernet frames from/to
the DSP. Unfortunately, when I stress the Connection (sending and
receiving Packets at full bandwidth), packets get lost while capturing.
Interestingly, if I use Wireshark and let it write the captured packets
to disk, all packets get captured, but at the same time, some of them do
not show up in my little Winpcap-based app.
I use the pcap_loop() approach in a dedicated Thread and provide a -1
for the amount of packets to capture (capture unless pcap_breakloop() is
called). Another Thread sends packet queues by subsequent calls of
pcap_sendqueue_transmit().
To open the NIC-device I call pcap_open() with following flags:
PCAP_OPENFLAG_MAX_RESPONSIVENESS | PCAP_OPENFLAG_NOCAPTURE_LOCAL.
The packets have all the same Length of 1514 byte (incl. Etherframe header).

Does anyone know a better way to capture Ethernet frames
programmatically? Or can anyone give me a hint, how to avoid this problem?

Best,

     T. Dylla




More information about the Winpcap-users mailing list