Hi,

> Ok. May have found another way around.
>
> But i'm a bit interested in the other solution. Is it me, or is the packet
> copied 2 times each way. Once from the NIC-driver buffer to the kernel
> driver buffer, and then from the kernel driver buffer to the user
> application buffer??

Correct

> I was hoping i could remove the step from the kernel buffer to the user
> buffer, and then spare me the trouble of learning about the NIC driver
(and
> its buffer).

Good point.
Removing the second copy is one of the first solutions that comes in mind
when trying to optimize the performance of the driver. The problem is that
it's very complex to implement: it requires advanced kernel programming
tricks and it raises several synchronization issues. The result is that it's
rare to obtain remarkable advantages with this technique and therefore we
are not considering its implementation.

> Another question. In theory, how big can the kernel buffer be?? (I realise
> that a buffer greater than available physical memory would be bad)

Since it is allocated from the non-paged pool, its size is limited by the
size of that pool. If I remember well, it should be 196MB. Obviously, as the
name suggests, it cannot never exceed the physical memory if it's less than
196MB.

Loris

> Thank for the quick reply!
>
> - Jesper
>
> -----Original Message-----
> From: Loris Degioanni [mailto:[EMAIL PROTECTED]]
> Sent: torsdag, juli 04, 2002 11:14
> To: Jesper Munkholm Jensen (JMJ)
> Cc: [EMAIL PROTECTED]
> Subject: Re: [WinPcap-users] Retrieving only the header..
>
>
> Sorry, not supported.
> Adding such a feature shouldn't be too complex, but you will have to play
> with the driver sources.
>
> Loris
>
> > Hi,
> >
> > Does anyone know if it is possible (without changing the Winpcap
library)
> to
> > retrieve the header of a packet, whilst the packet it self is saved in
the
> > kernel buffer? I must then be able to pass the header (the bpf header)
to
> a
> > send function, which the sends the packet on a different network
adapter.
> >
> > The main idea is to get some information about the packet from kernel
mode
> > to user mode, where it is dicided where the packet should go, and then
> sent
> > there, without copying the packet data itself.
> >
> > I know that it can be implemented by making the Ndis calls my self, but
> > would prefer that it could be done with winpcap.
> >
> > I hope somebody has an idea,
> >
> > - Jesper
> >


Reply via email to