Re: NDIS Version question.



Thanks guys. I spent some time looking through ndis.h and, as you have
pointed out, it seems that the main difference between ndis 4 and ndis 5 is
CoNDIS, which is no concern for me.

The reason I am asking at all is ... without going into too much detail, on
certain systems (running other IM drivers) my driver causes a blue screen (in
the other IM driver) and this problem does not happen if I install passthru.
So I am diffing my driver against passthru and the first thing I find is some
weird changes in the NDIS compile #defs (in SOURCES and passthru.h) ... the
IM driver registers its protocol interface using ndis v4.0 and registers its
miniport interface using ndis v5.0.

Somebody else who has left our company was responsible for making these
changes ... now I am responsible for fixing them. I will just restore
SOURCES, etc. to be like DDK so that ndis 4.0 is used for both protocol and
miniport ... perhaps this will make my strange problem go away.


"Stephan Wolf [MVP]" wrote:

Hmm, well, interesting indeed. W2K for sure supports NDIS 5 so the OP's
question is actually valid: Why does the sample's "sources" file set
the version to NDIS 4?

I guess the answer is: The main difference is the fact that PASSTHRU
was extended some time ago to support NDIS 5.1 features.

In contrast, any new NDIS features added between NDIS 4.0 and NDIS 5.0
are *not* used by PASSTHRU at all.

In more detail, when compared to their NDIS 4 counterparts, the
NDIS50_PROTOCOL_CHARACTERISTICS and NDIS50_MINIPORT_CHARACTERISTICS
structures only add CoNDIS handlers, which are of no interest to
PASSTHRU.

Thus, there is probably not much of a difference whether PASSTHRU is
compiled for NDIS 4.0 or NDIS 5.0.

See also

"NDIS Driver Compile Flags"
http://www.wd-3.com/031504/NDISCompile.htm

Stephan
---
Thomas F. Divine wrote:
If your driver is to run on Windows 2000 and higher, build like the DDK
sources file says. Your driver will actually be compatible with NDIS 5.

Of your driver is to run only on Windows XP or higher, build like the DDK
sources file says. Your driver will actually be compatible with NDIS 5.1.

Thomas F. Divine, Windows DDK MVP.
http://www.pcausa.com

<DIV>"mirage2k2" <mirage2k2@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:59344B65-C08E-45A0-B7CA-A6D99BEAF6E1@xxxxxxxxxxxxxxxx</DIV>>
Looking at the sources file for passthru example im driver in the 2003 ddk,
it is evident that for a w2k build ndis 4.0 will be used and for xp/2003
ndis
5.1 will be used.

I just spent some time researching the different versions of ndis and its
seems ndis 4.0 is real old and ndis 5.0 was introduced in w2k. Why then
does
passthru want to be built using ndis 4.0 for w2k and not ndis 5.0?

The sources file looks like this ...

!if "$(DDK_TARGET_OS)"=="Win2K"
#
# The driver is built in the Win2K build environment
#
C_DEFINES=$(C_DEFINES) -DNDIS40_MINIPORT=1
C_DEFINES=$(C_DEFINES) -DNDIS40=1
!else
#
# The driver is built in the XP or .NET build environment
# So let us build NDIS 5.1 version.
#
C_DEFINES=$(C_DEFINES) -DNDIS51_MINIPORT=1
C_DEFINES=$(C_DEFINES) -DNDIS51=1
!endif

I am tempted to change it to ...

!if "$(DDK_TARGET_OS)"=="Win2K"
#
# The driver is built in the Win2K build environment
#
C_DEFINES=$(C_DEFINES) -DNDIS50_MINIPORT=1
C_DEFINES=$(C_DEFINES) -DNDIS50=1
!else
...

Can anyone help me out here?


.



Relevant Pages

  • Re: Incorrect server name
    ... There is no primary WINS server defined for this adapter. ... Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) ... Network Monitor Driver ...
    (microsoft.public.windows.server.general)
  • Re: Question about FILE_OBJECT
    ... NDIS IM is a driver that fully conforms to the model, ... I.E. every time they allocated a new context object they ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Running NDISTest on Vista with an NDIS IM Driver
    ... I had a quick look at the ndistest stuff in the WLK1.0c, ... actually some ndis driver in the ... I tried using the version that comes with WLK/DTM on PassThru (NDIS IM ...
    (microsoft.public.development.device.drivers)
  • Re: NDIS functionality details
    ... In my driver I need to decompress compressed video data and provide ... >> NDIS subsystem exports a lot of functions with Ndis* prefix. ... >> DDK says, that there is two ways, one is to copy each packet to driver ...
    (microsoft.public.development.device.drivers)
  • Re: NDIS Intermediate (passthru) communicates with second driver
    ... already occupied by NDIS. ... Now PASSTHRU is an NDIS intermediate driver, ... implements both an NDIS miniport and an NDIS protocol. ... device object via IoCreateDevicein the standard way in your IM. ...
    (microsoft.public.development.device.drivers)

Loading