ndis

Hi all,

I’m completely new to WinNT kernel programming and i’m playing with this stuff for a school project. What I’m trying to do is creating a NDIS fake-enviroment that was able to run drivers in user mode. In this case i took the simple passthru driver delivered with the DDK. So far I’ve been able to compile it and link it in user mode… but, right now, the fake user mode NDIS library is doing nothing. The real problem is when I try to implement something. Since I’m in user mode I want to use all the Win32 functions so the first thing i did was an #include <windows.h> in my code…and when i tried to compile it … an infinite of errors came out…(all declaration stuff). To actually reimplement the ndis functions i used the ndis.h file deleting the keyword EXPORT of the functions I was reimplementng in user mode… so the problem starts when i try to include both kernel mode headers (ntddk.h, ndis.h) and user mode haeders. how could i solve it? I thought i could strip off the declarations i need from ndis.h and the include all the user mode headers, but i don’t like it really much…I was seeking something better.

Another question is ? In the fake ndis enviroment which functions should i use…I thought about using the Win32 subsystem or WinNT native APIs and link my library with ntdll.dll. Ay first approaches don’t cahnge to much from my point of you. Anyone has suggestions?

Thanks
Regards

Matteo Pelati</windows.h>

Hi! I’ve a question about NDIs. Once DriverEntry has been called, which function does NDIS call? ProtocolBindAdapter (in an intermediate driver) ? does it call it once or many times (one for every underlying adapter?

Thanks
Regards

Matteo

Microsoft includes NDIS protocol driver and NDIS IM drivers with the Windows
2000 DDK. It would be a good idea for you to use a debugger or add debug
print statements to trace through the operation of these samples.

NDIS may call ProtocolBindAdapter multiple times (if you are bound to
multiple adapters). Each call will specifiy one adapter that your protocol
should bind to (by calling NdisOpenAdapter).

There are several steps that you must perform in DriverEntry in order for
any of the above to happen. The samples I mentioned illustrate the steps
that you must take in DriverEntry.

In addition, see the NDIS IM FAQ at
http://www.pcausa.com/resources/ndisimfaq.htm

Good luck,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - TDI Client - Windows 95 Redirector
http:

----- Original Message -----
From: Matteo Pelati
To: NT Developers Interest List
Sent: Thursday, September 28, 2000 3:19 PM
Subject: [ntdev] ndis

Hi! I’ve a question about NDIs. Once DriverEntry has been called, which
function does NDIS call? ProtocolBindAdapter (in an intermediate driver) ?
does it call it once or many times (one for every underlying adapter?

Thanks
Regards

Matteo</http:>

Hi! I’d like to get more knowledge of NDIS internals and how it works. Do you think a CHECHED version of NT/2000 could be helpul?

Thanks
Matt

Definitely. Following KB tells you how to turn on NDIS tracing on Win2K
and NT4.0.

http://support.microsoft.com/support/kb/articles/q248/4/13.asp
http:

-Eliyas

http://support.microsoft.com/support/default.asp?PR=ddk
http:N-US> &FR=0&SD=GN&LN=EN-US

-----Original Message-----
From: Matteo Pelati [mailto:xxxxx@dolce.it]
Sent: Monday, October 02, 2000 12:35 AM
To: NT Developers Interest List
Subject: [ntdev] ndis

Hi! I’d like to get more knowledge of NDIS internals and how it works.
Do you think a CHECHED version of NT/2000 could be helpul?

Thanks
Matt</http:></http:>

Yes, but checked version of NDIS.SYS should be sufficient. You can enable
debug messages there – see KB article Q164459. Also, don’t miss NDIS KD
extension (Q248313).

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Matteo Pelati[SMTP:xxxxx@dolce.it]
Reply To: NT Developers Interest List
Sent: Monday, October 02, 2000 9:35 AM
To: NT Developers Interest List
Subject: [ntdev] ndis

Hi! I’d like to get more knowledge of NDIS internals and how it works. Do
you think a CHECHED version of NT/2000 could be helpul?
?
Thanks
Matt