[Winpcap-users] Slow sending?
New accounts at sandmik.net
accounts at sandmik.net
Fri Mar 31 08:19:31 GMT 2006
Hey guys, thanks a lot for everybody that helped.
pcap_setmintocopy did the trick.
From 2 seconds ping time, down to < 10 msec.
They should mention it in the manual in the section of sending packets
and not just in the exported function section.
Thanks.
New accounts at sandmik.net wrote:
> Oh one more thing,
>
> I am sure about the results as I am testing it by pinging two
> machines (that are arp poisoned) on the network.
>
> The ping is taking around 2 seconds, after some debugging and testing
> with ethereal, I found out that each one send there is a delay of
> around 1 second, hence the 2 seconds in the ping.
>
> Thank you again.
>
> Loris Degioanni wrote:
>
>> As far as I know, libdnet and most of the other traffic injection
>> libraries end up using WinPcap for actual transmission, so switching
>> to them is not going to help a lot.
>>
>> First of all, a delay of 1 second seems quite huge, even if a system
>> call per packet is issued. Are you sure the delay is in transmission
>> and not in reception?
>> A Rx 1 sec delay is normal if you don't set a low timeout and mintocopy.
>>
>> Second: I know of several winpcap-based arp poisoners, and they
>> appear to work pretty well. You may want to look at their sources to
>> learn how they achieve that. For example, look at
>> http://ettercap.sourceforge.net for a very well known one. You'll
>> find more of them at http://www.winpcap.org/misc/links.htm#tools.
>>
>> Loris
>>
>>
>> New accounts at sandmik.net wrote:
>>
>>> Thank you loris for trying to help me.
>>>
>>> I have used the queue version as well but I did not get higher
>>> performance, I believe because everytime I call this function I only
>>> have one packet to send. My ARP Poisoner has to relay packets as
>>> soon as they come... So I have this incredible delay.
>>>
>>> I think I will be looking into other means (maybe other libraries)
>>> of sending the packets (like libdnet, just found it on the web).
>>>
>>> If you have used any other mean to send ethernet packets, I would
>>> appreciate the help.
>>>
>>> Thanks again.
>>>
>>> Loris Degioanni wrote:
>>>
>>>> If you want to increase the Tx performance, use buffered send
>>>> functions(pcap_sendqueue*). pcap_sendpacket() does a context switch
>>>> per packet, that's the reason why it's so slow.
>>>>
>>>> Loris
>>>>
>>>>
>>>> Accounts wrote:
>>>>
>>>>> Hi Everybody.
>>>>>
>>>>> I am using WinPCap to do active redirection of packets. Everything
>>>>> is working very well except I have one problem.
>>>>>
>>>>> WinPCap seems to be very slow to send the packets?
>>>>>
>>>>> I checked my code from the time I receive the packet to my code until
>>>>> the time I call pcap_sendpacket, there is less than 1 ms so I know
>>>>> the
>>>>> problem
>>>>> is not a bottleneck in my code. However looking at ethereal and doing
>>>>> some pinging tests. It looks like after I call pcap_sendpacket it is
>>>>> taking up to 1 second to actually go out.
>>>>>
>>>>> Any ideas?!
>>>>>
>>>>> Any help would be appreciated.
>>>>>
>>>>> And also I tried to use send queues but the same problem.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Winpcap-users mailing list
>>>>> Winpcap-users at winpcap.org
>>>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>>>
>>>> _______________________________________________
>>>> Winpcap-users mailing list
>>>> Winpcap-users at winpcap.org
>>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Winpcap-users mailing list
>>> Winpcap-users at winpcap.org
>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>
>> _______________________________________________
>> Winpcap-users mailing list
>> Winpcap-users at winpcap.org
>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>
>>
>
> _______________________________________________
> 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