viral
Tue Oct 18 00:49:36 CDT 2005
Hi,
Thanks for the reply. Actually what I wanted to know is how can I use single
passthru that handles both PPP and ethernet packets. I need single passthru
whose wansendhandler should be called for PPP packets and LanSendHandler for
ethernet packets. Do I need to create different inf files for LAN and WAN.
How can I register both LAN and WAN handled functions in DriverEntry. How
can I call same driver's DriverEntry twice so that once it will register
LAN's function and other time for WAN. I think the question is clear now to
you
Thanks
Viral
"Thomas F. Divine [DDK MVP]" <tdivine@NOpcausaSPAM.com> wrote in message
news:O8a4W1y0FHA.3892@TK2MSFTNGP12.phx.gbl...
>
> "viral shah" <viral@xyz.com> wrote in message
> news:eSf65iy0FHA.3780@TK2MSFTNGP12.phx.gbl...
> > On Window XP, Is there a way I can use same NDIS IM driver to register
> > both
> > WAN and LAN functions in DriverEntry? (so that same sys file will be
used
> > for WAN and LAN IM driver). If possible, can anyone tell me the changes
> > need
> > to be done in inf files and DriverEntry funtion and then how it will
work.
> >
> > Regards
> > Viral
> >
> The DDK PassThru driver includes logic to allow the IM to bind to
NDISWANIP.
>
> In your IM's service INF file add "wan" to the FilterMediaTypes:
>
> HKR, Ndi\Interfaces, FilterMediaTypes, , "ethernet, tokenring, fddi,
wan"
>
> In your ProtocolBindAdapter handler at the point where NdisOpenAdapter has
> returned successfully you examine the returned MediumIndex to determine
the
> meduim of the adapter you are bound to. For WAN you make a small change,
> that is already in the PassThru sample:
>
> //
> // Usually we export the medium type of the adapter below as our
> // virtual miniport's medium type. However if the adapter below us
> // is a WAN device, then we claim to be of medium type 802.3.
> //
> Medium = pAdapt->Medium;
>
> if (Medium == NdisMediumWan)
> {
> Medium = NdisMedium802_3;
> }
>
> Understand that so far Microsoft has NOT designed a NDIS filtering
mechanism
> that filters over connection-oriented NDIS miniports. You can only filter
> connectionless NDIS miniports (such as NDISWANIP) using Microsoft provided
> NDIS IM filter technology.
>
> Good luck,
>
> Thomas F. Divine, Windows DDK MVP
>
http://www.pcausa.com
>