[Winpcap-users] Re: problem with winpcap

Loris Degioanni loris.degioanni at gmail.com
Sun May 29 17:14:25 GMT 2005



Guy Harris wrote:
> 
> On May 27, 2005, at 8:00 AM, Essam Jarrous wrote:
> 
>> dear Mr. Harris..
> 
> 
> Unfortunately, Mr. Harris's involvement with WinPcap is primarily as
> 
>     1) a developer of libpcap, primarily on UN*X systems (and  primarily 
> BSD at that)
> 
> and
> 
>     2) a developer of a program that uses libpcap/WinPcap (Ethereal)
> 
> rather than as a core developer of WinPcap, so directly asking him  
> questions about WinPcap, rather than asking winpcap-users at winpcap.org  
> (a list that includes the developers of WinPcap), is probably not the  
> right thing to do.
> 
>> i'm working with winpcap to capture and send packets, but when  using 
>> pcap_sendpacket i'm experiencing a high delay 

This is quite normal. With the WinPcap approach, sending a packet is a 
transisiton from user level to kernel level, plus an interaction between 
the NPF driver and NDIS, plus a possible buffering in the NIC driver.

>> in addition to losing some packets in high traffic 

This instead is not normal. pcap_senpacket is blocking, so you should 
maybe slow-down, not loose packets.

 >> so i tried to use queues  instead but
>> that's could not help because i need to send each  packet in real time.

In this case, buffering can only amplify your problem.
If you really have real-time constraints, WinPcap is probably not the 
best solution. An obvious step is going into the kernel. Unless you 
write your own NIC driver, you won't have total control on the packet 
transmission time, but my experience shows that at reasonable rates 
NdisSend() is quite responsive.

Loris

> 
> I'll let the WinPcap developers answer this.
> 
>> i'm trying to use libnet for sending but does libnet support  sending 
>> number of bytes written by me as is without adding any  headers?
> 
> 
> Is that Mike Shiffman's libnet?  If so, I think it should support  that, 
> but you should check the documentation.
> 
>> or is there any way to make pcap faster and more reliable  ( 
>> increasing buffer size or something alike)?
>>
>> any reply will be highly appreciated, and thanks in advance
>>
>>
>> regards;
>> Essam Jarrous
>>
> 
> _______________________________________________
> 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