----- Original Message -----
From: "Jesper Munkholm Jensen (JMJ)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 09, 2002 4:55 PM
Subject: RE: [WinPcap-users] Changes to the Packet.dll and kernell driver


> Hi again :o),
>
> Ok. I haven't heard of RDTSC before.

RDTSC is an x86 assembly instruction present on Pentium processors, and
stands for

ReaD TimeStamp Counter

It gives the number of CPU clocks since boot.
It is very fast  (1 or 2 clock ticks) and precise, BUT

- how do you calculate the cpu frequency exactly? (This is a real pain!)
- how do you deal with SpeedStep?
- how do solve the problem that the cpu clock frequency is not so stable?

GV


>
> I'm aware of the header fact, and that one more more reason for not using
> this function. At the present, I dissolve the buffer from the Packet dll
> into unique packets, partly because i have to implement error in some of
the
> packets, and partly because I'm implementing a bandwith limitation of down
> to 110 kbit/s, and calculate the bandwith that i've saved up every 1 ms.
> This means that i only send one packet most of the time any way. The thing
> that just bothers me is that I can't use the timestamp to calculate the tx
> time. But i've implemented some multithreading (And some priority scheme)
in
> a way that should ensure that my packets are fetched into the program as
> soon as they arrive.
>
> Again - Thanks for a great library!
>
> - Jesper Munkholm
>
> -----Original Message-----
> From: Loris Degioanni [mailto:[EMAIL PROTECTED]]
> Sent: 9. august 2002 15:40
> To: [EMAIL PROTECTED]
> Subject: Re: [WinPcap-users] Changes to the Packet.dll and kernell
> driver
>
>
> Hi,
>
> ----- Original Message -----
> From: "Jesper Munkholm Jensen (JMJ)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 09, 2002 1:16 PM
> Subject: RE: [WinPcap-users] Changes to the Packet.dll and kernell driver
>
>
> > Hi again,
> >
> > I meant where all the changes maid to the wpcap.dll, but i then
continued
> > browsing through the new documentation, and found my answers.
> > But now i have a new one :o)
> >
> > The function PacketSendPackets() that can send a buffer of raw packets.
It
> > is written that it demands alot of processor power. I've been looking
into
> > the timing functions of 2000, and i believe I now how you acomplish this
> > high resolution.
> > But the function (KeQueryPerformanceCounter) which i'm thinking of
> disables
> > all (or some) interrupts when working, and for this reason Microsoft
> doesn't
> > recommend using it to measure accomplished time, or to call it
frequently.
> > Is this the one you use??
>
> Yes.
> AFAIK, KeQueryPerformanceCounter() doesn't disable interrupts. I suspect
> Microsoft doesn't recommend using it because it's normally damn slow.
> However, there is no other documented way to achieve microsecond precision
> under WinNTx, unless using RDTSC, that however is often a real pain.
>
> > I'm developing a bridge, which among other things, introduces a delay to
> all
> > packets. One of my problems have been getting a reference from WinPcap,
> > which could enable me to use the timestamp in the packet header when i
> > calculate the time when the packet should be sent. Am I right in
asumming
> > that with version 3, i could retrieve a buffer of packets (With
> > PacketGetPacket()), modify the timestamp of each packet in the buffer,
to
> > represent the time the individual packet should be sent, and then pass
the
> > buffer to the kernell driver with the PacketSendPackets() function?
>
> Yes, but take care that:
> - if you work at packet.dll level, you will have to play a little with
> headers, because the dump_bpf_hdr used by PacketSendPackets() is the one
> passed to wpcap.dll applications, and is slightly different from the
bpf_hdr
> of PacketReceivePacket.
> - the timestamps are considered to be relative, so PacketSendPackets()
> always starts to send immediately
>
> Loris
>
> > I hope you can catch my drift as they say. I'm just a bit curious :o)
> >
> > - Jesper Munkholm
> >
> > -----Original Message-----
> > From: Gianluca Varenni [mailto:[EMAIL PROTECTED]]
> > Sent: 9. august 2002 12:21
> > To: [EMAIL PROTECTED]
> > Subject: Re: [WinPcap-users] Changes to the Packet.dll and kernell
> > driver
> >
> >
> >
> > ----- Original Message -----
> > From: "Jesper Munkholm Jensen (JMJ)" <[EMAIL PROTECTED]>
> > To: "WinPcap Users List (E-mail)" <[EMAIL PROTECTED]>
> > Sent: Friday, August 09, 2002 11:35 AM
> > Subject: [WinPcap-users] Changes to the Packet.dll and kernell driver
> >
> >
> > > Hi,
> > >
> > > A quick question. I browsed through the new WinPcap 3.0 documentation
> last
> > > night, but didn't browse it to the end. Does the new release contain
any
> > > significant changes to the Packet.dll and the kernel driver, or are
all
> > > changes maid to the WinPcap??
> >
> > What do you mean?
> >
> > WinPcap is not only wpcap.dll, it is composed of wpcap.dll, packet.dll
and
> > the kernel driver.
> >
> > If you refer to wpcap.dll, yes, there are some new APIs, among which
> > pcap_findalldevs, pcap_read_ex, pcap_livedump.
> >
> > GV
> >
> > >
> > > - Jesper Munkholm
> > >
> >
> >
> >
>



Reply via email to