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

Gianluca Varenni gianluca.varenni at cacetech.com
Tue Sep 8 09:10:32 PDT 2009


----- Original Message ----- 
From: "Tim Dylla" <t.dylla at stagetec.com>
To: <winpcap-users at winpcap.org>
Sent: Monday, September 07, 2009 4:01 AM
Subject: [Winpcap-users] winpcap-app looses packets on full duplex 
GigabitEthernet connection


> 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?
>

I would avoid using PCAP_OPENFLAG_MAX_RESPONSIVENESS, it gives better 
responsiveness at the expense of a bigger cpu load, possibly causing packet 
losses.
Also, which network card are you using?

Have a nice day
GV

> Best,
>
>     T. Dylla
>
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users 



More information about the Winpcap-users mailing list