RE: Problems when implement NAT using NDIS Intermediate d river

Thanks Michal.
Actually I have debug my driver using softice. But I could not find what
caused page fault. There is no QOS packet scheuler installed on my OS.

Passthru runs very well with one wan adapter and one ethernet adapter.
I made me very confused because I could not find the essential difference
between Passthru and my driver.

Everything can be wrong. The only good way how to solve such a problem is to
take a debugger and find what causes page fault.

It is important to understand how NdisWan uses Ethernet addresses to
distinguigh WAN lines – see NDIS_WAN_LINE_UP docs. It may not be your
problem now but it may be necessary for the future.

An idea: do you have QOS packet scheduler installed (layered over your
driver)? If so, try to disable (uninstall) it and see if there is still a
problem.

Best regards,

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

> ----------
> From: iban[SMTP:brucie@263.net]
> Reply To: NT Developers Interest List
> Sent: Tuesday, September 25, 2001 6:56 AM
> To: NT Developers Interest List
> Subject: [ntdev] Problems when implement NAT using NDIS Intermediate
> driver
>
> First I have to appologized for my poor English.
>
> I am doing an NAT project which uses NDIS IM Driver based on
> Passthru for 2k and IMSAMP for NT4.0. My driver runs very well
> when working with two ethernet cards.
>
> But when I tried to run my driver with one Modem and one ethernet
> card,
> I encoutered some problems.
>
> I read Passthru example of XP DDK, and add NdisMediumWan to
> NdisMediuArray.
> In MpInitialize, I add the following lines as Passthru for XP:
> Medium=pAdapt->Medium;
> if (Medium == NdisMediumWan)
> {
> Medium = NdisMedium802_3;
> }
> And the inf was also modified as “ethernet, tokenring, fddi, wan”.
>
> Ok, My driver can bind with wan adapter and ethernet adapter. All are
> well.
>
> But when I dial up to connect to my ISP, a Page Fault occured when
> “registering computer on the network”.
>
> Then I added some DbgPrint to my driver, I found the Page Fault
> occured after
> MpQueryInformation return. The codes of MpQueryInformation are quite
> similar to that of IMSAMP.
>
> What is wrong? Please help me, any suggestions are appreciated.
> Thanks
> brucie
> brucie@263.net
> b???.???????&?v?‘?ׯj??؜’??'?Ӣ?칻?&ޱ??i?Z?G?j)m?W???u???b??(??
> (
>


You are currently subscribed to ntdev as: brucie@263.net
To unsubscribe send a blank email to xxxxx@lists.osr.com
b???.???????&?v?'?ׯj?.n?Qyȩf??]?:.?˛???m??֛???zf???%y?ޞ?^?˛??^r*Lzfެ?…???l??ܢ

Thanks.

Last night I debugged my driver again. A pagefault occurred after
mpqueryinformation. The last OID is OID_GEN_LINK_SPEED. I used “stack”
command of Softice to see the stack information.

The following lines are the output of “stack -v -r” command.It seems
the error occurred while DHCP. What is the meaning of the text in the
output line, such as tcpip!.text+00012C38?

ED24F8A4 ED2E4977 00000000
… wanarp!.text+4697
tcpip!.text+00013EF2
tcpip!.text+ABBC
tcpip!.text+00012C38
tcpip!.text+00013897
tcpip!.text+00013665
tcpip!.text+0001370B
tcpip!.text+00011CBF
afd!PAGEAFD+6D87
ntoskrnl!RtlOemStringToUnicodeString+0295
ntoskrnl!NtDeviceIoControlFile+0028
ntdll!.text+00015BE2
ws2_32!.text+20F1
dhcpcsvc!.text+3631
dhcpcsvc!.text+EEB2
dhcpcsvc!.text+EF25
dhcpcsvc!.text+00010A97
dhcpcsvc!.text+00010DE7
dhcpcsvc!.text+00010E93
dhcpcsvc!.text+000112B2
dhcpcsvc!.text+0001132E
dhcpcsvc!.text+E020
dhcpcsvc!.text+E255
dhcpcsvc!.text+812C
dhcpcsvc!.text+90DD

Thanks Michal.
Actually I have debug my driver using softice. But I could not find what
caused page fault. There is no QOS packet scheuler installed on my OS.

Passthru runs very well with one wan adapter and one ethernet adapter.
I made me very confused because I could not find the essential difference
between Passthru and my driver.
>Everything can be wrong. The only good way how to solve such a problem is to
>take a debugger and find what causes page fault.
>
>It is important to understand how NdisWan uses Ethernet addresses to
>distinguigh WAN lines – see NDIS_WAN_LINE_UP docs. It may not be your
>problem now but it may be necessary for the future.
>
>An idea: do you have QOS packet scheduler installed (layered over your
>driver)? If so, try to disable (uninstall) it and see if there is still a
>problem.
>
>Best regards,
>
>Michal Vodicka
>Veridicom
>(RKK - Skytale)
>[WWW: http://www.veridicom.com , http://www.skytale.com]
>
>
>
>> ----------
>> From: iban[SMTP:brucie@263.net]
>> Reply To: NT Developers Interest List
>> Sent: Tuesday, September 25, 2001 6:56 AM
>> To: NT Developers Interest List
>> Subject: [ntdev] Problems when implement NAT using NDIS Intermediate
>> driver
>>
>> First I have to appologized for my poor English.
>>
>> I am doing an NAT project which uses NDIS IM Driver based on
>> Passthru for 2k and IMSAMP for NT4.0. My driver runs very well
>> when working with two ethernet cards.
>>
>> But when I tried to run my driver with one Modem and one ethernet
>> card,
>> I encoutered some problems.
>>
>> I read Passthru example of XP DDK, and add NdisMediumWan to
>> NdisMediuArray.
>> In MpInitialize, I add the following lines as Passthru for XP:
>> Medium=pAdapt->Medium;
>> if (Medium == NdisMediumWan)
>> {
>> Medium = NdisMedium802_3;
>> }
>> And the inf was also modified as “ethernet, tokenring, fddi, wan”.
>>
>> Ok, My driver can bind with wan adapter and ethernet adapter. All are
>> well.
>>
>> But when I dial up to connect to my ISP, a Page Fault occured when
>> “registering computer on the network”.
>>
>> Then I added some DbgPrint to my driver, I found the Page Fault
>> occured after
>> MpQueryInformation return. The codes of MpQueryInformation are quite
>> similar to that of IMSAMP.
>>
>> What is wrong? Please help me, any suggestions are appreciated.
>> Thanks
>> brucie
>> brucie@263.net
>> b???.???????&?v?‘?ׯj??؜’??'?Ӣ?칻?&ޱ??i?Z?G?j)m?W???u???b??(??
>> (
>>
>
>—
>You are currently subscribed to ntdev as: brucie@263.net
>To unsubscribe send a blank email to xxxxx@lists.osr.com
(???r??z{e?˛???m?m?{]z???&j)@u?Ӣ?칻?&ޱ??i?Z?G?j)m?W???u?칻-E?"?Ǧm??(Z?X???,??&

No, It seems that PtReceive is not called by NDIS before PAGEFAULT because
I add some dbgprints in the beginning of PtReceive but no output while
PAGE FAULT occurred.

???

Hi Bruce

Did you also add the NdisMediumWan case to the PtReceive and
PtReceiveComplete function?

Othmar Christen
Project Engineer, Research & Development PC Applications
mailto:xxxxx@crypto.ch mailto:xxxxx
>
>Crypto AG
>P. O. Box 460
>CH-6301 Zug / Switzerland
>Phone: +41 41/749 77 22
> direct: +41 41/749 73 82
>Fax: +41 41/741 22 72
>http://www.crypto.ch http:</http:>
>
>-----Original Message-----
>From: iban [mailto:brucie@263.net]
>Sent: Dienstag, 25. September 2001 06:56
>To: NT Developers Interest List
>Subject: [ntdev] Problems when implement NAT using NDIS Intermediate driver
>
>
>I read Passthru example of XP DDK, and add NdisMediumWan to
>
>NdisMediuArray.
>
>In MpInitialize, I add the following lines as Passthru for XP:
>
> Medium=pAdapt->Medium;
>
> if (Medium == NdisMediumWan)
>
> {
>
> Medium = NdisMedium802_3;
>
> }
>
>And the inf was also modified as “ethernet, tokenring, fddi, wan”.
>
>
>
>
>
>—
>You are currently subscribed to ntdev as: brucie@263.net
>To unsubscribe send a blank email to xxxxx@lists.osr.com

= = = = = = = = = = = = = = = = = = = =
yours Iban
xxxxx@smccenter.dhs.org

b???.???????&?v?'?ׯj?.n?Qyȩf??]?:.?˛???m??֛???zf???%y?ޞ?^?˛??^r*Lzfެ?…???l??ܢ</mailto:xxxxx>