<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16535"><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="chmetcnv"></o:SmartTagType>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:14.5pt;
        font-family:SimSun;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
span.comment
        {color:maroon;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY
style="TEXT-JUSTIFY-TRIM: punctuation; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody lang=ZH-CN leftMargin=0 link=blue topMargin=0 vLink=purple
name="Compose message area" CanvasTabStop="true">
<DIV><FONT face=Calibri>IndexOutOfRangeException certainly doesn't come from
WinPcap.</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Are you using a wrapper to use the WinPcap
API?</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Have a nice day</FONT></DIV>
<DIV><FONT face=Calibri>GV</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=jli@altobeam.com
href="mailto:jli@altobeam.com">jli</A> </DIV>
<DIV><B>Sent:</B> Tuesday, May 18, 2010 6:58 PM</DIV>
<DIV><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Subject:</B> [Winpcap-users] send a packet after start a capturing, it
that ok?</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV style="LAYOUT-GRID: 15.6pt none" class=Section1>
<P class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt"
lang=EN-US>Hi:<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 18pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" lang=EN-US>I’m developing USB-NIC
driver , I want to control my hardware(cypress usb controller CY68013 and
<st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False"
SourceValue="3" UnitName="g" w:st="on">3G</st1:chmetcnv> IC) via winpcap,
and I met a problem;<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 18pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" lang=EN-US>I want to read a register
of <st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False"
SourceValue="3" UnitName="g" w:st="on">3G</st1:chmetcnv> IC, so in MyRead()
function, I open a device , and start the capture by calling
<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 36pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt"
lang=EN-US>pcap_loop(adhandle,0,packet_handler,NULL),<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 13.5pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" lang=EN-US> then, I call
<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 36pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt"
lang=EN-US>pcap_sendpacket()<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 13.5pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" lang=EN-US> to send a command to
my usb device so it will read register of <st1:chmetcnv TCSC="0" NumberType="1"
Negative="False" HasSpace="False" SourceValue="3" UnitName="g"
w:st="on">3G</st1:chmetcnv> IC via i<st1:chmetcnv TCSC="0" NumberType="1"
Negative="False" HasSpace="False" SourceValue="2" UnitName="C"
w:st="on">2c</st1:chmetcnv> bus and reply the data to PC witch I want to
captured in packet_handler, the sending is ok,<o:p></o:p></SPAN></FONT></P>
<P style="TEXT-INDENT: 13.5pt" class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" lang=EN-US>but when MyRead() function
return, IndexOutOfRangeException happened, can you tell me
why?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt"
lang=EN-US><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT size=1 face=Arial><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 9pt"
lang=EN-US><o:p> </o:p></SPAN></FONT></P></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></BODY></HTML>