[Winpcap-users] pcap_sendpacket async or sync behaviour?

Carlo Medas carlomedas at gmail.com
Sun Sep 28 13:45:18 GMT 2008


Dear Gianluca,
another question regarding pcap_sendpacket: is it multithread safe?
I mean, can I concurrently call pcap_sendpacket on a same capture session
handle from multiple threads without the need of external synchronisation?

Thanks in advance, your advices are very precious.

Ciao,

\Carlo

On Fri, Sep 26, 2008 at 9:00 AM, Carlo Medas <carlomedas at gmail.com> wrote:

> Dear Gianluca,
> thanks for your more than exaustive answer. The way it works sounds great
> for any need, moreover for my needs (network monitoring).
>
> Thanks and ciao,
>
> \Carlo
>
>
> On Thu, Sep 25, 2008 at 8:30 PM, Gianluca Varenni <
> gianluca.varenni at cacetech.com> wrote:
>
>>  Carlo,
>> pcap_sendpacket is basically sync, i.e. it passes the packet to be
>> transmitted to the underlying miniport controlling the NIC, and it waits for
>> such miniport to return. However, the miniport might decide to return
>> success even if the packet has been scheduled to be transmitted (i.e. it's
>> in some transmit queue) but has not actually been transmitted yet.
>>
>> Does it make any sense to you?
>>
>> Have a nice day
>> GV
>>
>> ----- Original Message -----
>> *From:* Carlo Medas <carlomedas at gmail.com>
>> *To:* winpcap-users at winpcap.org
>> *Sent:* Wednesday, September 24, 2008 10:09 AM
>> *Subject:* [Winpcap-users] pcap_sendpacket async or sync behaviour?
>>
>> Dear all,
>> sorry for newbie question but... I was wondering if pcap_sendpacket is
>> sync or async.
>>
>> If it's async, do I get a special error reported?
>> If it's sync, I suppose that it would block until my packet has been sent?
>>
>> Thank you in advance.
>>
>> Best regards,
>>
>> \Carlo Medas
>>
>> ------------------------------
>>
>> _______________________________________________
>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20080928/fb170f4f/attachment.htm


More information about the Winpcap-users mailing list