<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Not completely. The problem is that the error buffer used
internally in the pcap_t handle is not per_thread. So if two threads try to
transmit on the same pcap_t handle and they both fail, you might get garbage in
the error message string returned by pcap_geterror.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=carlomedas@gmail.com href="mailto:carlomedas@gmail.com">Carlo
Medas</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, September 28, 2008 6:45
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users]
pcap_sendpacket async or sync behaviour?</DIV>
<DIV><BR></DIV>
<DIV dir=ltr>Dear Gianluca,
<DIV><BR></DIV>
<DIV>another question regarding pcap_sendpacket: is it multithread safe?</DIV>
<DIV>I mean, can I concurrently call pcap_sendpacket on a same capture session
handle from multiple threads without the need of external
synchronisation?</DIV>
<DIV><BR></DIV>
<DIV>Thanks in advance, your advices are very precious.</DIV>
<DIV><BR></DIV>
<DIV>Ciao,</DIV>
<DIV><BR></DIV>
<DIV>\Carlo<BR><BR>
<DIV class=gmail_quote>On Fri, Sep 26, 2008 at 9:00 AM, Carlo Medas <SPAN
dir=ltr><<A href="mailto:carlomedas@gmail.com"
target=_blank>carlomedas@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Dear Gianluca,
<DIV><BR></DIV>
<DIV>thanks for your more than exaustive answer. The way it works sounds
great for any need, moreover for my needs (network monitoring).</DIV>
<DIV><BR></DIV>
<DIV>Thanks and ciao,</DIV>
<DIV><BR></DIV>
<DIV><FONT color=#888888>\Carlo</FONT>
<DIV>
<DIV></DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On Thu, Sep 25, 2008 at 8:30 PM, Gianluca Varenni
<SPAN dir=ltr><<A href="mailto:gianluca.varenni@cacetech.com"
target=_blank>gianluca.varenni@cacetech.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV bgcolor="#ffffff">
<DIV><FONT size=2>Carlo, </FONT></DIV>
<DIV><FONT size=2>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.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Does it make any sense to you?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>
<DIV></DIV>
<DIV>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A
title=carlomedas@gmail.com href="mailto:carlomedas@gmail.com"
target=_blank>Carlo Medas</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=winpcap-users@winpcap.org href="mailto:winpcap-users@winpcap.org"
target=_blank>winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, September 24, 2008
10:09 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users]
pcap_sendpacket async or sync behaviour?</DIV>
<DIV><BR></DIV>
<DIV dir=ltr>Dear all,
<DIV><BR></DIV>
<DIV>sorry for newbie question but... I was wondering if pcap_sendpacket
is sync or async.</DIV>
<DIV><BR></DIV>
<DIV>If it's async, do I get a special error reported?</DIV>
<DIV>If it's sync, I suppose that it would block until my packet has
been sent?</DIV>
<DIV><BR></DIV>
<DIV>Thank you in advance.</DIV>
<DIV><BR></DIV>
<DIV>Best regards,</DIV>
<DIV><BR></DIV>
<DIV>\Carlo Medas</DIV></DIV></DIV></DIV>
<P></P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing list<BR><A href="mailto:Winpcap-users@winpcap.org"
target=_blank>Winpcap-users@winpcap.org</A><BR><A
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>
<P></P></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Winpcap-users
mailing list<BR><A href="mailto:Winpcap-users@winpcap.org"
target=_blank>Winpcap-users@winpcap.org</A><BR><A
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>