Hi All,
If I want to develop a layer to provide me with the NIC card/network (mainly
connection less) information and have control over starting and stoping
those NIC cards then do I have to develop a "NDIS Intermediate driver" or is
there other solution(s)??? if the first one is correct, then I was reading
in a web site that there are two ways of developing such, one is through
Hooking and another through combined protocol/miniport driver, though it was
saying that Hooking is best but not supported and not document by MS at
all.... is this true??? where can I read indepth info on how to develop
intermediate drivers????

thank you in advance.

Re: intermediate driver or others!!! by James

James
Mon Mar 01 19:40:29 CST 2004

Hooking is ugly. Occasionally it may be necessary, but this is not one of
those occasions.

Look, this is really a "religious" question. It's impossible to settle the
issue purely on merits. If you're doing something purely for your amusement
or information, hook away. If you're writing code that may be distributed
outside your lab or home, stick to supported methods. In the present case,
an IM driver, or a protocol/miniport driver, works pretty well. Of course,
it may be more work than hooking, but here, you're getting what you pay for.

--
James Antognini
Windows DDK Support

This posting is provided "AS IS" with no warranties, and confers no rights.

"Lord of the Ring" <lordofthering@hotmail.com> wrote in message
news:unuokG$$DHA.3824@TK2MSFTNGP09.phx.gbl...
> Hi All,
> If I want to develop a layer to provide me with the NIC card/network
(mainly
> connection less) information and have control over starting and stoping
> those NIC cards then do I have to develop a "NDIS Intermediate driver" or
is
> there other solution(s)??? if the first one is correct, then I was reading
> in a web site that there are two ways of developing such, one is through
> Hooking and another through combined protocol/miniport driver, though it
was
> saying that Hooking is best but not supported and not document by MS at
> all.... is this true??? where can I read indepth info on how to develop
> intermediate drivers????
>
> thank you in advance.
>
>



Re: intermediate driver or others!!! by Lord

Lord
Mon Mar 01 20:04:57 CST 2004

ok... thanks... so I won't ask "religious" question:)
How about my other question? althoug I assume that based on your response,
I'm in right track and I have to develop an IM driver to achieve my goals in
accessing NIC/network information???
is the following link the right resource to start with
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnce30/html/ndis30.asp

Is there others that you can refer me too

thank you for your response....



"James Antognini [MSFT]" <jantogni@online.microsoft.com> wrote in message
news:%23JM6Zd$$DHA.3824@TK2MSFTNGP09.phx.gbl...

> Hooking is ugly. Occasionally it may be necessary, but this is not one of
> those occasions.
>
> Look, this is really a "religious" question. It's impossible to settle the
> issue purely on merits. If you're doing something purely for your
amusement
> or information, hook away. If you're writing code that may be distributed
> outside your lab or home, stick to supported methods. In the present case,
> an IM driver, or a protocol/miniport driver, works pretty well. Of course,
> it may be more work than hooking, but here, you're getting what you pay
for.
>
> --
> James Antognini
> Windows DDK Support
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Lord of the Ring" <lordofthering@hotmail.com> wrote in message
> news:unuokG$$DHA.3824@TK2MSFTNGP09.phx.gbl...
> > Hi All,
> > If I want to develop a layer to provide me with the NIC card/network
> (mainly
> > connection less) information and have control over starting and stoping
> > those NIC cards then do I have to develop a "NDIS Intermediate driver"
or
> is
> > there other solution(s)??? if the first one is correct, then I was
reading
> > in a web site that there are two ways of developing such, one is through
> > Hooking and another through combined protocol/miniport driver, though it
> was
> > saying that Hooking is best but not supported and not document by MS at
> > all.... is this true??? where can I read indepth info on how to develop
> > intermediate drivers????
> >
> > thank you in advance.
> >
> >
>
>



Re: intermediate driver or others!!! by Thomas

Thomas
Mon Mar 01 20:19:27 CST 2004

If you want to control "starting and stopping the NDIS cards", then you
probably need to look at the SetupDi API and the BindView application in
Windows DDK. This API allows you to have some control over the installation
of NDIS components.

If your question really concerns "starting and stopping NDIS packets", then
an NDIS Intermediate driver is the way to go on platforms that actually
suport the technology. In my book that is Windows 2000 and higher.

Good luck,

Thomas F. Divine
www.pcausa.com


"Lord of the Ring" <lordofthering@hotmail.com> wrote in message
news:unuokG$$DHA.3824@TK2MSFTNGP09.phx.gbl...
> Hi All,
> If I want to develop a layer to provide me with the NIC card/network
(mainly
> connection less) information and have control over starting and stoping
> those NIC cards then do I have to develop a "NDIS Intermediate driver" or
is
> there other solution(s)??? if the first one is correct, then I was reading
> in a web site that there are two ways of developing such, one is through
> Hooking and another through combined protocol/miniport driver, though it
was
> saying that Hooking is best but not supported and not document by MS at
> all.... is this true??? where can I read indepth info on how to develop
> intermediate drivers????
>
> thank you in advance.
>
>



Re: intermediate driver or others!!! by bburgin

bburgin
Mon Mar 01 23:00:02 CST 2004

------=_NextPart_0001_1FD22E0E
Content-Type: text/plain
Content-Transfer-Encoding: 7bit



Yes, if it's just starting or stopping the NIC, then use SetupDi. See the
devcon sample in the DDK. The second part of your question is to query
information. This can be done by OIDs via WMI or
IOCTL_NDIS_QUERY_GLOBAL_STATS.

If you are ever in need of a IM driver, never do hooking. This was
necessary in 98 (mostly because we never provided a passthru sample for 98
and the installation of that driver in 98 has several problems), but
there's no reason to do it in any NT-based system. It is unsupported and
can cause problems.

Bryan S. Burgin
bburgin@microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_1FD22E0E
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20
\par
\par Yes, if it's just starting or stopping the NIC, then use SetupDi. See the devcon sample in the DDK. The second part of your question is to query information. This can be done by OIDs via WMI or IOCTL_NDIS_QUERY_GLOBAL_STATS.
\par
\par If you are ever in need of a IM driver, never do hooking. This was necessary in 98 (mostly because we never provided a passthru sample for 98 and the installation of that driver in 98 has several problems), but there's no reason to do it in any NT-based system. It is unsupported and can cause problems.
\par
\par Bryan S. Burgin
\par bburgin@microsoft.com
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par }
------=_NextPart_0001_1FD22E0E--


Re: intermediate driver or others!!! by Lord

Lord
Tue Mar 02 13:02:22 CST 2004

well thank you all for your responses... would you please just clarify one
thing for me???
you say that I have to use "SetupDI and OIDs via WMI or
IOCTL_NDIS_QUERY_GLOBAL_STATS"
then you say that "> If you are ever in need of a IM driver,"

so if I use the first set of function calls (SetupDI and OIDs via WMI or
IOCTL_NDIS_QUERY_GLOBAL_STATS) then am I actually developing an IM driver or
not??? If this is not an IM then were would my layer reside? bellow TCP and
IM?? I'm a bit confused and I would greatly appreciate it if you could help
me to figure this out...


""Bryan S. Burgin [MSFT]"" <bburgin@online.microsoft.com> wrote in message
news:nZOP$MBAEHA.1268@cpmsftngxa06.phx.gbl...
>
>
> Yes, if it's just starting or stopping the NIC, then use SetupDi. See the
> devcon sample in the DDK. The second part of your question is to query
> information. This can be done by OIDs via WMI or
> IOCTL_NDIS_QUERY_GLOBAL_STATS.
>
> If you are ever in need of a IM driver, never do hooking. This was
> necessary in 98 (mostly because we never provided a passthru sample for 98
> and the installation of that driver in 98 has several problems), but
> there's no reason to do it in any NT-based system. It is unsupported and
> can cause problems.
>
> Bryan S. Burgin
> bburgin@microsoft.com
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.



Re: intermediate driver or others!!! by Thomas

Thomas
Tue Mar 02 16:35:09 CST 2004


"Lord of the Ring" <lordofthering@hotmail.com> wrote in message
news:%23IM4YjIAEHA.2660@TK2MSFTNGP10.phx.gbl...
> well thank you all for your responses... would you please just clarify one
> thing for me???
> you say that I have to use "SetupDI and OIDs via WMI or
> IOCTL_NDIS_QUERY_GLOBAL_STATS"
> then you say that "> If you are ever in need of a IM driver,"
>
> so if I use the first set of function calls (SetupDI and OIDs via WMI or
> IOCTL_NDIS_QUERY_GLOBAL_STATS) then am I actually developing an IM driver
or
> not??? If this is not an IM then were would my layer reside? bellow TCP
and
> IM?? I'm a bit confused and I would greatly appreciate it if you could
help
> me to figure this out...
>
>
If you use these techniques then you are writing a Win32 user-mode
application.

SetupDi is a user-mode API that can be used to enumerate/install/remove
drivers.

WMI is a powerful (complex/twisted/indirect) user-mode API that can be used
to "manage" many things - including Windows networking drivers and services.
For example, using WMI (or IOCTL_NDIS_QUERY_GLOBAL_STATS) your user-mode
application can query (ask for) various pieces of information identified
using NDIS object identifiers (OIDs - specified in the DDK). WMI can also be
used to set some pieces of information using NDIS the NDIS OIDs that are
defined.

Good luck,

Thomas F. Divine
http://www.rawether.net



Re: intermediate driver or others!!! by Lord

Lord
Thu Mar 04 15:53:32 CST 2004

Thank you all for your reponses and explanations

"Thomas F. Divine [DDK MVP]" <tdivine@NOpcausaSPAM.com> wrote in message
news:%23euDgZKAEHA.3828@TK2MSFTNGP10.phx.gbl...
>
> "Lord of the Ring" <lordofthering@hotmail.com> wrote in message
> news:%23IM4YjIAEHA.2660@TK2MSFTNGP10.phx.gbl...
> > well thank you all for your responses... would you please just clarify
one
> > thing for me???
> > you say that I have to use "SetupDI and OIDs via WMI or
> > IOCTL_NDIS_QUERY_GLOBAL_STATS"
> > then you say that "> If you are ever in need of a IM driver,"
> >
> > so if I use the first set of function calls (SetupDI and OIDs via WMI or
> > IOCTL_NDIS_QUERY_GLOBAL_STATS) then am I actually developing an IM
driver
> or
> > not??? If this is not an IM then were would my layer reside? bellow TCP
> and
> > IM?? I'm a bit confused and I would greatly appreciate it if you could
> help
> > me to figure this out...
> >
> >
> If you use these techniques then you are writing a Win32 user-mode
> application.
>
> SetupDi is a user-mode API that can be used to enumerate/install/remove
> drivers.
>
> WMI is a powerful (complex/twisted/indirect) user-mode API that can be
used
> to "manage" many things - including Windows networking drivers and
services.
> For example, using WMI (or IOCTL_NDIS_QUERY_GLOBAL_STATS) your user-mode
> application can query (ask for) various pieces of information identified
> using NDIS object identifiers (OIDs - specified in the DDK). WMI can also
be
> used to set some pieces of information using NDIS the NDIS OIDs that are
> defined.
>
> Good luck,
>
> Thomas F. Divine
> http://www.rawether.net
>
>