Just a simple question: why don't you use the pcap API, instead of the Packet one?
GV ----- Original Message ----- From: "Loris Degioanni" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 09, 2002 3:40 PM 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 > > > > > > > > > > >
