<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=KOI8-R>
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Why I (think I) need it:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am working on a simulator. This simulator
simulates ethernet embedded chips. It "sits" between a simulated
microcontroller and the live network. As such, it receives and sends packets. As
an additional debugging facility (after all, that is what simulation is all
about), I want to pcap_dump the received and transmitted packets into a file.
That way they can be analysed with Etherreal (sorry: WireShark). To pcap_dump
the packets, I need a pkt_header. The received packets already have this, but I
need to create some valid header for the packets I send.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Setting the time in this header to zeroes would be
the easiest, but how does WireShark react on this? I can/will sort this out
myself, but when the question about timeval went by, I decided to attach my
question to it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Marcel</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></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=vbor@isd.dp.ua href="mailto:vbor@isd.dp.ua">Vasily Borovyak</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> Thursday, June 08, 2006 1:52
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users] Re:
header->ts.tv_usec</DIV>
<DIV><BR></DIV><TT>I do not understand why do you need that. Could you please
explain?<BR>As far as I know timeval is used not for the <B>time</B>
representing but for the <B>short period of time</B>
representing.<BR><BR><BR>So I can only assume the answer for your
question.<BR></TT><TT>I made a quick look at the wpcap sources and found these
lines:<BR><B> timeout.tv_sec = to_ms /
1000;<BR> timeout.tv_usec = (to_ms * 1000) %
1000000;<BR></B>Where <B>to_ms</B> is the some microseconds
value.<BR><BR></TT><BR>Marcel van Lieshout wrote:
<BLOCKQUOTE cite=mid001201c68ae7$fb35bfc0$41cda8c0@hmcs.local type="cite">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
<DIV><FONT face=Arial size=2>yes and</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>When generating packets to be saved to
disk using <FONT face="Times New Roman" size=3>pcap_dump(), what is the
easiest way to generate the timestamp from the current
time?</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Marcel</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">-----
Original Message ----- </DIV>
<DIV
style="BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><B>From:</B>
<A title=chikabanga2005@yahoo.com
href="mailto:chikabanga2005@yahoo.com">joe kibz</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><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; font-size-adjust: none; font-stretch: normal"><B>Sent:</B>
Thursday, June 08, 2006 12:08 PM</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B>
[Winpcap-users] Re: header->ts.tv_usec</DIV>
<DIV><BR></DIV>
<DIV>Problem:</DIV>
<DIV> </DIV>
<DIV>The timeval ts for the generic header for each packet captured
.</DIV>
<DIV>What exactly does the second value <A class=code
href="file:///C:/joekibz/WpdPack/docs/html/structpcap__pkthdr.html#o0"
moz-do-not-send="true">ts</A>.tv_usec represent ?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>joe</DIV>
<P>__________________________________________________<BR>Do You
Yahoo!?<BR>Tired of spam? Yahoo! Mail has the best spam protection around
<BR><A href="http://mail.yahoo.com">http://mail.yahoo.com</A> </P>
<P>__________________________________________________<BR>Do You
Yahoo!?<BR>Tired of spam? Yahoo! Mail has the best spam protection around
<BR><A class=moz-txt-link-freetext
href="http://mail.yahoo.com">http://mail.yahoo.com</A> </P>
<P></P>
<HR>
_______________________________________________<BR>Winpcap-users mailing
list<BR><A class=moz-txt-link-abbreviated
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR><A
class=moz-txt-link-freetext
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR></BLOCKQUOTE><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
Winpcap-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A>
<A class=moz-txt-link-freetext href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</A>
</PRE></BLOCKQUOTE><BR><PRE class=moz-signature cols="80">--
Best regards. Vasily Borovyak <A class=moz-txt-link-rfc2396E href="mailto:vbor@isd.dp.ua"><vbor@isd.dp.ua></A></PRE>
<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>