NdisMIndicatePacket

Hi,
We are developping a NDIS driver on NT which speaks to lower SCSI miniport driver through function pointers. While receving the data, scsi driver calls the function in IP driver, which indicates to the NDIS. But while executing NdisMIndicatePacket, we are getting following on softice.
"Assertoin Failed…Miniport_Lock_Acquired((PNDIS_MINIPORT_BLOCK *)MiniportHandle)) "

As the function is called by lower driver we will not get the NDIS_MINIPORT_HANDLE, So we have saved it in a global variable and we are using this while indicating a packet to NDIS. Is this casuing the above problem?

Thanks in Advance.
Regards,
Vishwanath M.


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

What kind of “NDIS driver” is yours? A Miniport? A protocol? An
intermediate (IM)?

The assertion is normal. Calling into NDIS from a non-NDIS driver
requires you to write an IM. The original (obsolete) IM model had the
following functions to avoid the assertion:

NdisIMSwitchToMiniport() and NdisIMRevertBack()

Check the NT4 DDK docs for a description of these functions.

If you’re on W2K or WXP, better write an NDIS5 “deserialized” IM,
which will also make the assertion go away.

Stephan

On 30 Jan 2002 13:05:12 -0000, “maram vishwanath”
wrote:

>
>
>Hi,=0AWe are developping a NDIS driver on NT which speaks to lower SCSI min=
>iport driver through function pointers. While receving the data, scsi dri=
>ver calls the function in IP driver, which indicates to the NDIS. But whil=
>e executing NdisMIndicatePacket, we are getting following on softice. =0A"A=
>ssertoin Failed…Miniport_Lock_Acquired((PNDIS_MINIPORT_BLOCK *)MiniportH=
>andle)) "=0A =0AAs the function is called by lower driver we will not get t=
>he NDIS_MINIPORT_HANDLE, So we have saved it in a global variable and we ar=
>e using this while indicating a packet to NDIS. Is this casuing the above p=
>roblem? =0A=0A=0AThanks in Advance.=0ARegards,=0AVishwanath M.=0A =0A


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

Hi,

Thanks for the reply…
Actually we are porting the driver from 2k to NT, its a NDIS deserialized miniport (Virtual NIC) driver in 2K. As there is no NDIS_ATTRIBUTE_DESERIALIZE in NT, we used NdisSetAttribute without this flag being set. What flag should we set to make it a deserialized driver? or Is it enough if we call NdisSetAttributeEx with NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER?

thanks in advance,
Indira

Stephan Wolf wrote:

What kind of “NDIS driver” is yours? A Miniport? A protocol? An
intermediate (IM)?

The assertion is normal. Calling into NDIS from a non-NDIS driver
requires you to write an IM. The original (obsolete) IM model had the
following functions to avoid the assertion:

NdisIMSwitchToMiniport() and NdisIMRevertBack()

Check the NT4 DDK docs for a description of these functions.

If you’re on W2K or WXP, better write an NDIS5 “deserialized” IM,
which will also make the assertion go away.

Stephan

On 30 Jan 2002 13:05:12 -0000, “maram vishwanath”
wrote:
>
> >
> >
> >Hi,=0AWe are developping a NDIS driver on NT which speaks to lower SCSI min=
> >iport driver through function pointers. While receving the data, scsi dri=
> >ver calls the function in IP driver, which indicates to the NDIS. But whil=
> >e executing NdisMIndicatePacket, we are getting following on softice. =0A"A=
> >ssertoin Failed…Miniport_Lock_Acquired((PNDIS_MINIPORT_BLOCK *)MiniportH=
> >andle)) "=0A =0AAs the function is called by lower driver we will not get t=
> >he NDIS_MINIPORT_HANDLE, So we have saved it in a global variable and we ar=
> >e using this while indicating a packet to NDIS. Is this casuing the above p=
> >roblem? =0A=0A=0AThanks in Advance.=0ARegards,=0AVishwanath M.=0A =0A


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

Actually, the NT 4.0 versions that support NDIS IM drivers (SP 3 and
higher…) DO support the NDIS_ATTRIBUTE_DESERIALIZE attribute.

You need to fetch an updated NDIS.H and NDIS.LIB that corresponds to NT 4.0
SP 3.

I believe that these items are included with the Microsoft IMSAMP NDIS IM
driver sample that can be downloaded from the Microsoft website. A link to
the MS page that references IMSAMP can be found on the NDIS IM FAQ at the
URL:

http://www.pcausa.com/resources/ndisimfaq.htm.

Look for the topic “Where can I find a NDIS 4 intermediate driver sample?”.

Good luck,

Thomas F. Divine

PCAUSA - Tools & Resources For Network Software Developers
NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
http: - http:
“indira veerad” wrote in message
news:xxxxx@ntdev…

Hi,

Thanks for the reply…
Actually we are porting the driver from 2k to NT, its a NDIS deserialized
miniport (Virtual NIC) driver in 2K. As there is no
NDIS_ATTRIBUTE_DESERIALIZE in NT, we used NdisSetAttribute without this flag
being set. What flag should we set to make it a deserialized driver? or Is
it enough if we call NdisSetAttributeEx with
NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER?

thanks in advance,
Indira

Stephan Wolf wrote:

> What kind of “NDIS driver” is yours? A Miniport? A protocol? An
> intermediate (IM)?
>
> The assertion is normal. Calling into NDIS from a non-NDIS driver
> requires you to write an IM. The original (obsolete) IM model had the
> following functions to avoid the assertion:
>
> NdisIMSwitchToMiniport() and NdisIMRevertBack()
>
> Check the NT4 DDK docs for a description of these functions.
>
> If you’re on W2K or WXP, better write an NDIS5 “deserialized” IM,
> which will also make the assertion go away.
>
> Stephan
> —
> On 30 Jan 2002 13:05:12 -0000, “maram vishwanath”
> wrote:
>
> >
> >
> >Hi,=0AWe are developping a NDIS driver on NT which speaks to lower SCSI
min=
> >iport driver through function pointers. While receving the data, scsi
dri=
> >ver calls the function in IP driver, which indicates to the NDIS. But
whil=
> >e executing NdisMIndicatePacket, we are getting following on softice.
=0A"A=
> >ssertoin Failed…Miniport_Lock_Acquired((PNDIS_MINIPORT_BLOCK
*)MiniportH=
> >andle)) "=0A =0AAs the function is called by lower driver we will not get
t=
> >he NDIS_MINIPORT_HANDLE, So we have saved it in a global variable and we
ar=
> >e using this while indicating a packet to NDIS. Is this casuing the above
p=
> >roblem? =0A=0A=0AThanks in Advance.=0ARegards,=0AVishwanath M.=0A =0A


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


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</http:></http:>

Hi,
thanks for the reply,

  1. Does that mean that in NT a Deserialized driver must
    be an IM driver?

  2. I got the NDIS.H from the Microsoft IMSAMP NDIS IM.
    but Where can I find the NDIS.LIB file?(it was’nt
    there in that download file)

thanks in advance,
Indira

Actually, the NT 4.0 versions that support NDIS IM drivers (SP 3 and
higher…) DO support the NDIS_ATTRIBUTE_DESERIALIZE attribute.

You need to fetch an updated NDIS.H and NDIS.LIB that corresponds to NT 4.0
SP 3.

I believe that these items are included with the Microsoft IMSAMP NDIS IM
driver sample that can be downloaded from the Microsoft website. A link to
the MS page that references IMSAMP can be found on the NDIS IM FAQ at the
URL:

http://www.pcausa.com/resources/ndisimfaq.htm.

Look for the topic “Where can I find a NDIS 4 intermediate driver sample?”.

Good luck,

Thomas F. Divine


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

Thomas is right about NT SP3 supporting “deserialized”. IIRC, this has
been added in NDIS 4.1. Note, however, that NDIS 4.1 is *only* in SP3,
ie. SP2 and lower are only NDIS 4.0.

NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER implies “full-duplex” but it
doesn’t imply “deserialized”, which you need.

As I already mentioned, the alternative is to use
NdisIMSwitchToMiniport() and NdisIMRevertBack() on NT4.

Stephan

On Wed, 30 Jan 2002 23:45:48 -0500, “Thomas F. Divine”
wrote:

>
>Actually, the NT 4.0 versions that support NDIS IM drivers (SP 3 and
>higher…) DO support the NDIS_ATTRIBUTE_DESERIALIZE attribute.
>
>You need to fetch an updated NDIS.H and NDIS.LIB that corresponds to NT 4.0
>SP 3.
>
>I believe that these items are included with the Microsoft IMSAMP NDIS IM
>driver sample that can be downloaded from the Microsoft website. A link to
>the MS page that references IMSAMP can be found on the NDIS IM FAQ at the
>URL:
>
>http://www.pcausa.com/resources/ndisimfaq.htm.
>
>Look for the topic “Where can I find a NDIS 4 intermediate driver sample?”.
>
>Good luck,
>–
>Thomas F. Divine
>
>PCAUSA - Tools & Resources For Network Software Developers
>NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
>http: - http:
>“indira veerad” wrote in message
>news:xxxxx@ntdev…
>
>
>Hi,
>
>Thanks for the reply…
>Actually we are porting the driver from 2k to NT, its a NDIS deserialized
>miniport (Virtual NIC) driver in 2K. As there is no
>NDIS_ATTRIBUTE_DESERIALIZE in NT, we used NdisSetAttribute without this flag
>being set. What flag should we set to make it a deserialized driver? or Is
>it enough if we call NdisSetAttributeEx with
>NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER?
>
>thanks in advance,
>Indira
>
>Stephan Wolf wrote:
>
>> What kind of “NDIS driver” is yours? A Miniport? A protocol? An
>> intermediate (IM)?
>>
>> The assertion is normal. Calling into NDIS from a non-NDIS driver
>> requires you to write an IM. The original (obsolete) IM model had the
>> following functions to avoid the assertion:
>>
>> NdisIMSwitchToMiniport() and NdisIMRevertBack()
>>
>> Check the NT4 DDK docs for a description of these functions.
>>
>> If you’re on W2K or WXP, better write an NDIS5 “deserialized” IM,
>> which will also make the assertion go away.
>>
>> Stephan
>> —
>> On 30 Jan 2002 13:05:12 -0000, “maram vishwanath”
>> wrote:
>>
>> >
>> >
>> >Hi,=0AWe are developping a NDIS driver on NT which speaks to lower SCSI
>min=
>> >iport driver through function pointers. While receving the data, scsi
>dri=
>> >ver calls the function in IP driver, which indicates to the NDIS. But
>whil=
>> >e executing NdisMIndicatePacket, we are getting following on softice.
>=0A"A=
>> >ssertoin Failed…Miniport_Lock_Acquired((PNDIS_MINIPORT_BLOCK
>*)MiniportH=
>> >andle)) "=0A =0AAs the function is called by lower driver we will not get
>t=
>> >he NDIS_MINIPORT_HANDLE, So we have saved it in a global variable and we
>ar=
>> >e using this while indicating a packet to NDIS. Is this casuing the above
>p=
>> >roblem? =0A=0A=0AThanks in Advance.=0ARegards,=0AVishwanath M.=0A =0A


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</http:></http:>

AFAIK, no, a “deserialized” driver does not need to be an IM in NT4
SP3 (NDIS 4.1).

Hmm, not sure if one really needs an updated “ndis.lib”. AFAIK, the
important thing is the updated “ndis.sys” coming with the NT4 SP3.

Stephan

On 31 Jan 2002 08:02:05 -0000, “indira veerad”
wrote:

>Hi,=0Athanks for the reply,=0A=0A1. Does that mean that in NT a Deserialize=
>d driver must =0A be an IM driver? =0A=0A2. I got the NDIS.H from the Mi=
>crosoft IMSAMP NDIS IM. =0A but Where can I find the NDIS.LIB file?(it wa=
>s’nt =0A there in that download file) =0A=0Athanks in advance,=0AIndira=
>=0A=0A=0AActually, the NT 4.0 versions that support NDIS IM drivers (SP 3 a=
>nd=0Ahigher…) DO support the NDIS_ATTRIBUTE_DESERIALIZE attribute.=0A=
>=0AYou need to fetch an updated NDIS.H and NDIS.LIB that corresponds to NT =
>4.0=0ASP 3.=0A=0AI believe that these items are included with the Microsoft=
> IMSAMP NDIS IM=0Adriver sample that can be downloaded from the Microsoft w=
>ebsite. A link to=0Athe MS page that references IMSAMP can be found on the =
>NDIS IM FAQ at the=0AURL:=0A=0Ahttp://www.pcausa.com/resources/ndisimfaq.ht=
>m.=0A=0ALook for the topic “Where can I find a NDIS 4 intermediate driver s=
>ample?”.=0A=0AGood luck,=0A–=0AThomas F. Divine =0A


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

Updated ndis.lib is necessary only if one needs some function which isn’t in
the original one. It is relatively easy to create ndis.lib by hand. Create a
fake user mode code which exports all ndis functions, compile and as a side
effect lib is created. Exported functions have to have correct number of
parameters (DWORD) and .def file is necessary. If should start with NAME
NDIS.SYS and list all exported functions with stdcall parameters
(NdisSend@12).

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From: xxxxx@hotmail.com[SMTP:xxxxx@hotmail.com]
Reply To: xxxxx@lists.osr.com
Sent: Thursday, January 31, 2002 3:20 PM
To: xxxxx@lists.osr.com
Subject: [ntdev] Re: NdisMIndicatePacket

AFAIK, no, a “deserialized” driver does not need to be an IM in NT4
SP3 (NDIS 4.1).

Hmm, not sure if one really needs an updated “ndis.lib”. AFAIK, the
important thing is the updated “ndis.sys” coming with the NT4 SP3.

Stephan

On 31 Jan 2002 08:02:05 -0000, “indira veerad”
wrote:
>
> >Hi,=0Athanks for the reply,=0A=0A1. Does that mean that in NT a
> Deserialize=
> >d driver must =0A be an IM driver? =0A=0A2. I got the NDIS.H from the
> Mi=
> >crosoft IMSAMP NDIS IM. =0A but Where can I find the NDIS.LIB file?(it
> wa=
> >s’nt =0A there in that download file) =0A=0Athanks in
> advance,=0AIndira=
> >=0A=0A=0AActually, the NT 4.0 versions that support NDIS IM drivers (SP 3
> a=
> >nd=0Ahigher…) DO support the NDIS_ATTRIBUTE_DESERIALIZE
> attribute.=0A=
> >=0AYou need to fetch an updated NDIS.H and NDIS.LIB that corresponds to
> NT =
> >4.0=0ASP 3.=0A=0AI believe that these items are included with the
> Microsoft=
> > IMSAMP NDIS IM=0Adriver sample that can be downloaded from the Microsoft
> w=
> >ebsite. A link to=0Athe MS page that references IMSAMP can be found on
> the =
> >NDIS IM FAQ at
> the=0AURL:=0A=0Ahttp://www.pcausa.com/resources/ndisimfaq.ht=
> >m.=0A=0ALook for the topic “Where can I find a NDIS 4 intermediate driver
> s=
> >ample?”.=0A=0AGood luck,=0A–=0AThomas F. Divine =0A
>
> —
> You are currently subscribed to ntdev as: michal.vodicka@st.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