Hello,
I would be very glad if you order your questions and formalize them more
exact, my english is not so good ;))
- How can I find out the name of protocol, that executes NdisOpenAdapter ?
Wnen NdisRegisterProtocol called you have protocol name and should associate
it with protocol handle. After this you can get protoco name in OpenAdapter.
- NdisOpenAdapter has parameter called AdapterName. This is the name of an
Adapter.
Yes
I guess, that registry contains a list of all adapters, registred in
system.
Where is it located ?
Don’t remember exactly now, try to search.
Btw, you’d better order ready sample driver and wont spend time.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of jenson
Sent: Thursday, October 18, 2001 3:56 PM
To: NT Developers Interest List
Subject: [ntdev] Re: NT intermediate network driver
Thank You ! It works now … 
Now I Have another question, concerning this topic …
During initialization process NdisOpenAdapter executes several times. It
means, that there
is number of Protocols, that execute this function …
- How can I find out the name of protocol, that executes NdisOpenAdapter ?
Thank You in advance.
----- Original Message -----
From: “Vadim Smirnov”
To: “NT Developers Interest List”
Sent: Wednesday, October 17, 2001 8:42 PM
Subject: [ntdev] Re: NT intermediate network driver
> Yes, but I suppose you already hooked TCPIP protocol handlers. You’ll get
> NDIS_OPEN_BLOCK initialized in ProtocolOpenAdapter complete handler.
>
> Good Luck,
>
> Vadim
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of jenson
> Sent: Wednesday, October 17, 2001 6:19 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: NT intermediate network driver
>
>
> Hello Vadim !
> Can You tell a bit more about subsituting miniport functions in
> NDIS_OPEN_BLOCK ?
> My OpenAdapter returns with NDIS_STATUS_PENDING and
> Handlers inside NDIS_OPEN_BLOCK are set to 0…
>
> Can You give an advise how can I get Miniport-routines and where to
replace
> them ?
>
> thank You in advance.
>
> > Michal,
> >
> > I’ve simply modified export table of NDIS.SYS (my driver loads after
> > NDIS.SYS and before any protocol drivers), hooking NdisRegisterProtocol,
> > NdisDeregisterProtocol, NdisOpenAdapter, NdisCloseAdapter entries. After
> > this I can intercept any registering protocol and adapter opening. In
> > NdisRegisterProtocol I modify NDIS_PROTOCOL_CHARACTERISTICS structure
> > substituting my own handlers, this gives control on incoming trafic
> > (ProtocolReceive) and completion handlers. In NdisOpenAdapter I modify
> > NDIS_OPEN_BLOCK structure (returned parameter NdisBindingHandle actually
> is
> > a pointer to this structure and such functions like NdisSend are defined
> as
> > macros calling handlers from this structure in ndis.h ) and substitute
> such
> > handlers like SendHandler, SendPacketsHandler, RequestHandler. Other
work
> is
> > very similar to PIM for 9x/ME. Actually, I’ve moved code from NT/XP to
> 9x/ME
> > for two days. Of course this was not my first driver based on this
> > technology(elsewhere it was not so fast, I’ve already knew what I’m
> doing),
> > I just wanted to create packet filtering framework for my own needs.
> >
> > Another way could be modification of the NDIS.SYS code in the beginning
of
> > functions mentioned before, putting there jump to your own code. Then in
> new
> > handler after call processing you could restore original function code,
> call
> > it, then modify code back. This is what Dan Lanciany (www.danlan.com)
did
> in
> > his driver. It works but IMHO it’s not the best way because require
> multiply
> > code modifications (and WP bit resetting for 2000/XP).
> >
> > One more way is like well-known personal firewall ZoneAlarm
> > (www.zonealarm.com) works. It register it’s own fake protocol (most of
the
> > handlers are null subroutines, others like ReceiveHandler returnes
> > NDIS_STATUS_NOT_ACCEPTED). I was a bit confused what for it register
> > protocol. Then found that just for getting ProtocolBindingHandle, which
is
> > actually a pointer to internal NDIS structure NDIS_PROTOCOL_BLOCK
(defined
> > on different wayes for different NDIS versions). This structure contains
a
> > pointer to NDIS_PROTOCOL_BLOCK list of all previously registered
> protocols,
> > NDIS_PROTOCOL_CHARACTERISTICS given in NdisRegisterProtocol and pointer
to
> a
> > list of all adapters (described by NDIS_OPEN_BLOCK structure) binded to
> this
> > protocol. So having this pointer you may substitute all protocol
handlers
> > you want and NDIS_OPEN_BLOCK handlers also, getting ful control over all
> > network trafic. Additionally, it tracks all working processes and
threads
> in
> > the system and hooks TDI for originated call process determination, but
> this
> > is out of our subject.
> >
> > As for perfomance impact, it even less then in case of using IM driver,
> > especially if you implement pass/block decision, because it does not
> require
> > repacketization (IM always does).
> >
> > Regards,
> >
> > Vadim
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com]On Behalf Of Michal Vodicka
> > Sent: Wednesday, October 10, 2001 10:07 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] Re: NT intermediate network driver
> >
> >
> > > ----------
> > > From: Vadim Smirnov[SMTP:xxxxx@pcausa.com]
> > > Reply To: NT Developers Interest List
> > > Sent: Wednesday, October 10, 2001 1:39 PM
> > > To: NT Developers Interest List
> > > Subject: [ntdev] Re: NT intermediate network driver
> > >
> > > NDIS-hooking driver. There could be real discussion what approach is
> > > better,
> > > but as for me I prefer NDIS-hooking. It allows to have single binary
> > > driver
> > > working from NT4.0 till XP, simple in installation (just new service
> entry
> > > in registry), transparent dial-up support. You could say that hooking
is
> > > terrible thing and MS never certify such driver, but this does not
mean
> > > that
> > > it can’t be succefully implemented and robust in use.
> > >
> > Vadim, it is interesting. How do you implement hooking driver for NT?
> >
> > As for “terrible thing”, I don’t think so. If I return 5 years back when
> > started IM driver project for NT4 and know about future problems, I
would
> > prefer such solution and to avoid them all. w2k introduced NDIS filter
> > drivers which is IMHO good solution but it doesn’t solve compatibility
> > problem you mentioned. The only problem I see is performance degradation
> but
> > it is low comparing to mentioned user mode solution and maybe even
> > inconsiderable.
> >
> > Best regards,
> >
> > Michal Vodicka
> > Veridicom
> > (RKK - Skytale)
> > [WWW: http://www.veridicom.com , http://www.skytale.com]
> >
> >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@pcausa.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@beep.ru
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@pcausa.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@beep.ru
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: xxxxx@pcausa.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com