Happy time always short:(((
Another problem:(((
I am using Passthru to implement NAT. The driver runs
well with two ethernet NICs. If I dont start NAT packet
tranlsation, The driver still runs well with one LAN adapter
and one wan adapter.
But when I start NAT packet translation,After some packets
(always 2 to 4 packets) which comes from LAN adapter are
translated and sended by wan adapter, there is a kernel
bug check occurred.
Softice tell me:
kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
I could not find what 0xD2 means because it is not list in the
windbg references.
Here is the code I used to redirect the packet:
***********************************************
//translate packet from LAN and send via WAN.
if(pAdapt->IsLocal)
{
if(!TranslateLocalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via global adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList->Next;
} else
{ pAdaptSend = pAdaptList; }
NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
}
//translate packet from WAN and send via LAN
if(!TranslateGlobalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via local adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList;
}
else
{
pAdaptSend = pAdaptList->Next;
}
NdisSend(&Status,
pAdaptSend->BindingHandle,
Packet);
*************************************************
I read DDK document about NDISWAN. Should I queue the packet
and then send it?
Please give me suggestion:)))
Thanks
yours brucie
???y˫???+.n?+???u?ڲ˛??^r*D???kN???r??zǧu??jy???^j???ׯ??? 0?j?b??(??(
It’s very difficult to say something definite, because you provide vey few
information. Did not you forget that LAN Ethernet and NDISWANIP has
different MTU?
Regards,
Vadim
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of iban
Sent: Friday, October 05, 2001 1:19 PM
To: NT Developers Interest List
Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
Happy time always short:(((
Another problem:(((
I am using Passthru to implement NAT. The driver runs
well with two ethernet NICs. If I dont start NAT packet
tranlsation, The driver still runs well with one LAN adapter
and one wan adapter.
But when I start NAT packet translation,After some packets
(always 2 to 4 packets) which comes from LAN adapter are
translated and sended by wan adapter, there is a kernel
bug check occurred.
Softice tell me:
kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
I could not find what 0xD2 means because it is not list in the
windbg references.
Here is the code I used to redirect the packet:
***********************************************
//translate packet from LAN and send via WAN.
if(pAdapt->IsLocal)
{
if(!TranslateLocalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via global adapter
if (pAdaptList->IsLocal)
pAdaptSend = pAdaptList->Next;
} else
{ pAdaptSend = pAdaptList; }
NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
}
//translate packet from WAN and send via LAN
if(!TranslateGlobalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via local adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList;
}
else
{
pAdaptSend = pAdaptList->Next;
}
NdisSend(&Status,
pAdaptSend->BindingHandle,
Packet);
*************************************************
I read DDK document about NDISWAN. Should I queue the packet
and then send it?
Please give me suggestion:)))
Thanks
yours brucie
b???.???????v??ׯj???\j?r???ޱ??i?Z?G?j)m?W???u???^U?-??+
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
Question… Is that your own Packet???
You must copy the packets to your own before sending them.
Steve
-----Original Message-----
From: iban
To: NT Developers Interest List
Date: Friday, October 05, 2001 10:41 AM
Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
Happy time always short:(((
Another problem:(((
I am using Passthru to implement NAT. The driver runs
well with two ethernet NICs. If I dont start NAT packet
tranlsation, The driver still runs well with one LAN adapter
and one wan adapter.
But when I start NAT packet translation,After some packets
(always 2 to 4 packets) which comes from LAN adapter are
translated and sended by wan adapter, there is a kernel
bug check occurred.
Softice tell me:
kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
I could not find what 0xD2 means because it is not list in the
windbg references.
Here is the code I used to redirect the packet:
***********************************************
//translate packet from LAN and send via WAN.
if(pAdapt->IsLocal)
{
if(!TranslateLocalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via global adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList->Next;
} else
{ pAdaptSend = pAdaptList; }
NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
}
//translate packet from WAN and send via LAN
if(!TranslateGlobalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via local adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList;
}
else
{
pAdaptSend = pAdaptList->Next;
}
NdisSend(&Status,
pAdaptSend->BindingHandle,
Packet);
*************************************************
I read DDK document about NDISWAN. Should I queue the packet
and then send it?
Please give me suggestion:)))
Thanks
yours brucie
b???.???????&?v?'?ׯj?-z??m??q?&N???r??zǧu??jy???^j???ׯ?~?2X???,??&
—
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
I just test to translate icmp echo request/reply packet.
ICMP packet’s length always equals to 74 bytes. I think
it doesnt exceed the MTU of NDISWANIP.
I debug the code of PtStatus when NDIS_STATUS_WAN_LINE_UP
to see the value of MaximumTotalSize in structure of NDIS_WAN
_LINE_UP. The value always equals to 0x5DC.
It’s very difficult to say something definite, because you provide vey few
information. Did not you forget that LAN Ethernet and NDISWANIP has
different MTU?Regards,
Vadim
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of iban
Sent: Friday, October 05, 2001 1:19 PM
To: NT Developers Interest List
Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapterHappy time always short:(((
Another problem:(((
I am using Passthru to implement NAT. The driver runs
well with two ethernet NICs. If I dont start NAT packet
tranlsation, The driver still runs well with one LAN adapter
and one wan adapter.
But when I start NAT packet translation,After some packets
(always 2 to 4 packets) which comes from LAN adapter are
translated and sended by wan adapter, there is a kernel
bug check occurred.
Softice tell me:
kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
I could not find what 0xD2 means because it is not list in the
windbg references.
Here is the code I used to redirect the packet:
***********************************************
//translate packet from LAN and send via WAN.
if(pAdapt->IsLocal)
{
if(!TranslateLocalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via global adapter
if (pAdaptList->IsLocal)pAdaptSend = pAdaptList->Next;
} else
{ pAdaptSend = pAdaptList; }
NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
}
//translate packet from WAN and send via LAN
if(!TranslateGlobalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via local adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList;
}
else
{
pAdaptSend = pAdaptList->Next;
}
NdisSend(&Status,
pAdaptSend->BindingHandle,
Packet);
*************************************************
I read DDK document about NDISWAN. Should I queue the packet
and then send it?
Please give me suggestion:)))
Thanks
yours brucie
You are currently subscribed to ntdev as: brucie@263.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
brucie
brucie@263.net
http://www.mbone.com.cn
http://www.rizcom.com.cn
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
Yes , it is my own packet. When run with two LAN adapters
, it is right.
Question… Is that your own Packet???
You must copy the packets to your own before sending them.
Steve
-----Original Message-----
From: iban
> To: NT Developers Interest List
> Date: Friday, October 05, 2001 10:41 AM
> Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
>
>
> Happy time always short:(((
> Another problem:(((
> I am using Passthru to implement NAT. The driver runs
> well with two ethernet NICs. If I dont start NAT packet
> tranlsation, The driver still runs well with one LAN adapter
> and one wan adapter.
> But when I start NAT packet translation,After some packets
> (always 2 to 4 packets) which comes from LAN adapter are
> translated and sended by wan adapter, there is a kernel
> bug check occurred.
> Softice tell me:
> kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
> I could not find what 0xD2 means because it is not list in the
> windbg references.
> Here is the code I used to redirect the packet:
> ***********************************************
> //translate packet from LAN and send via WAN.
> if(pAdapt->IsLocal)
> {
> if(!TranslateLocalICMPPacket(
> pAdapt,
> pEthHeader,
> iphdr,
> icmphdr)) break;
> //send packet via global adapter
> if (pAdaptList->IsLocal)
> {
> pAdaptSend = pAdaptList->Next;
> } else
> { pAdaptSend = pAdaptList; }
> NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
> }
> //translate packet from WAN and send via LAN
> if(!TranslateGlobalICMPPacket(
> pAdapt,
> pEthHeader,
> iphdr,
> icmphdr)) break;
> //send packet via local adapter
> if (pAdaptList->IsLocal)
> {
> pAdaptSend = pAdaptList;
> }
> else
> {
> pAdaptSend = pAdaptList->Next;
> }
> NdisSend(&Status,
> pAdaptSend->BindingHandle,
> Packet);
>*************************************************
> I read DDK document about NDISWAN. Should I queue the packet
> and then send it?
> Please give me suggestion:)))
> Thanks
> yours brucie
>
>
> b???.???????&?v?'?ׯj?-z??m??q?&N???r??zǧu??jy???^j???ׯ?~?2X???,??&
>
>
>—
>You are currently subscribed to ntdev as: brucie@263.net
>To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
brucie
brucie@263.net
http://www.mbone.com.cn
http://www.rizcom.com.cn
—
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
This information may apply:
http://www.pcausa.com/support/KB05050101.htm
Good luck,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:
----- Original Message -----
From: iban
To: NT Developers Interest List
Sent: Friday, October 05, 2001 5:18 AM
Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
Happy time always short:(((
Another problem:(((
I am using Passthru to implement NAT. The driver runs
well with two ethernet NICs. If I dont start NAT packet
tranlsation, The driver still runs well with one LAN adapter
and one wan adapter.
But when I start NAT packet translation,After some packets
(always 2 to 4 packets) which comes from LAN adapter are
translated and sended by wan adapter, there is a kernel
bug check occurred.
Softice tell me:
kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
I could not find what 0xD2 means because it is not list in the
windbg references.
Here is the code I used to redirect the packet:
***********************************************
//translate packet from LAN and send via WAN.
if(pAdapt->IsLocal)
{
if(!TranslateLocalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via global adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList->Next;
} else
{ pAdaptSend = pAdaptList; }
NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
}
//translate packet from WAN and send via LAN
if(!TranslateGlobalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via local adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList;
}
else
{
pAdaptSend = pAdaptList->Next;
}
NdisSend(&Status,
pAdaptSend->BindingHandle,
Packet);
*************************************************
I read DDK document about NDISWAN. Should I queue the packet
and then send it?
Please give me suggestion:)))
Thanks
yours brucie
b???.???????v??ׯj?]???z??Ɯ?d??{.n???zwZnV??隊[h???z{]z?y??b??(??(
—
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:>
what is the SendWindow in NDIS_WAN_LINE_UP mean?
Need I queued the translated packet
and send the packet via NDISWAN later?
Yes , it is my own packet. When run with two LAN adapters
, it is right.>Question… Is that your own Packet???
>
>You must copy the packets to your own before sending them.
>
>Steve
>
> -----Original Message-----
> From: iban
>> To: NT Developers Interest List
>> Date: Friday, October 05, 2001 10:41 AM
>> Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
>>
>>
>> Happy time always short:(((
>> Another problem:(((
>> I am using Passthru to implement NAT. The driver runs
>> well with two ethernet NICs. If I dont start NAT packet
>> tranlsation, The driver still runs well with one LAN adapter
>> and one wan adapter.
>> But when I start NAT packet translation,After some packets
>> (always 2 to 4 packets) which comes from LAN adapter are
>> translated and sended by wan adapter, there is a kernel
>> bug check occurred.
>> Softice tell me:
>> kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
>> I could not find what 0xD2 means because it is not list in the
>> windbg references.
>> Here is the code I used to redirect the packet:
>> ***********************************************
>> //translate packet from LAN and send via WAN.
>> if(pAdapt->IsLocal)
>> {
>> if(!TranslateLocalICMPPacket(
>> pAdapt,
>> pEthHeader,
>> iphdr,
>> icmphdr)) break;
>> //send packet via global adapter
>> if (pAdaptList->IsLocal)
>> {
>> pAdaptSend = pAdaptList->Next;
>> } else
>> { pAdaptSend = pAdaptList; }
>> NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
>> }
>> //translate packet from WAN and send via LAN
>> if(!TranslateGlobalICMPPacket(
>> pAdapt,
>> pEthHeader,
>> iphdr,
>> icmphdr)) break;
>> //send packet via local adapter
>> if (pAdaptList->IsLocal)
>> {
>> pAdaptSend = pAdaptList;
>> }
>> else
>> {
>> pAdaptSend = pAdaptList->Next;
>> }
>> NdisSend(&Status,
>> pAdaptSend->BindingHandle,
>> Packet);
>>************************************************
>> I read DDK document about NDISWAN. Should I queue the packet
>> and then send it?
>> Please give me suggestion:)))
>> Thanks
>> yours brucie
>>
>>
>> b???.???????&?v?‘?ׯj?-z??m??q?&N???r??zǧu??jy???^j???ׯ?~?2X???,??&
>>
>>
>>—
>>You are currently subscribed to ntdev as: brucie@263.net
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
> brucie
> brucie@263.net
>http://www.mbone.com.cn
>http://www.rizcom.com.cn
>
>
>—
>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?ޞ?^?˛??^rLzfެ? ???l??ܢ
You must also insure that the NDIS packet that you allocate for sending is allocated from the packet pool for the adapter taht you are sending on. If you are translating received packets, then understand that the NDIS_PACKET reserved areas are used differently for sending and receieving. See the discussion about NDIS_PACKET reserved areas at:
http://www.pcausa.com/resources/ndispacket.htm
Good luck,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:
----- Original Message -----
From: Thomas F. Divine
To: NT Developers Interest List
Sent: Friday, October 05, 2001 9:41 AM
Subject: [ntdev] Re: BugCheckCode=0xD2 while NAT with wan adapter
This information may apply:
http://www.pcausa.com/support/KB05050101.htm
Good luck,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:
----- Original Message -----
From: iban
To: NT Developers Interest List
Sent: Friday, October 05, 2001 5:18 AM
Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
Happy time always short:(((
Another problem:(((
I am using Passthru to implement NAT. The driver runs
well with two ethernet NICs. If I dont start NAT packet
tranlsation, The driver still runs well with one LAN adapter
and one wan adapter.
But when I start NAT packet translation,After some packets
(always 2 to 4 packets) which comes from LAN adapter are
translated and sended by wan adapter, there is a kernel
bug check occurred.
Softice tell me:
kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
I could not find what 0xD2 means because it is not list in the
windbg references.
Here is the code I used to redirect the packet:
***********************************************
//translate packet from LAN and send via WAN.
if(pAdapt->IsLocal)
{
if(!TranslateLocalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via global adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList->Next;
} else
{ pAdaptSend = pAdaptList; }
NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
}
//translate packet from WAN and send via LAN
if(!TranslateGlobalICMPPacket(
pAdapt,
pEthHeader,
iphdr,
icmphdr)) break;
//send packet via local adapter
if (pAdaptList->IsLocal)
{
pAdaptSend = pAdaptList;
}
else
{
pAdaptSend = pAdaptList->Next;
}
NdisSend(&Status,
pAdaptSend->BindingHandle,
Packet);
*************************************************
I read DDK document about NDISWAN. Should I queue the packet
and then send it?
Please give me suggestion:)))
Thanks
yours brucie
b???.???????v??ׯj?]???z??Ɯ?d??{.n???zwZnV??隊[h???z{]z?y??b??(??(
—
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:></http:></http:>
Thanks Thomas. I read the KB article you suggest.
There are two packets pools in my driver, one for receive and another for send.
And I use NdisMIndicateReceivePacket in my code.
So I guest the problem is not caused by NdisReInitilizePacket??
This information may apply:
http://www.pcausa.com/support/KB05050101.htm
Good luck,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:
???y˫???+.n?+???u?ڲ˛??^r*D???kN???r??zǧu??jy???^j???ׯ??? 0?j?b??(??(</http:></http:>
Probably not if you do that.
Thos
----- Original Message -----
From: iban
To: NT Developers Interest List
Sent: Friday, October 05, 2001 10:37 AM
Subject: [ntdev] Re: BugCheckCode=0xD2 while NAT with wan adapter
Thanks Thomas. I read the KB article you suggest.
There are two packets pools in my driver, one for receive and another for send.
And I use NdisMIndicateReceivePacket in my code.
So I guest the problem is not caused by NdisReInitilizePacket??
This information may apply:
>http://www.pcausa.com/support/KB05050101.htm
Good luck,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:
b???.???????v??ׯj?]???z??Ɯ?d??{.n???zwZnV??隊[h???z{]z?y??b??(??(
—
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:>
I examined my code again and read DDK document about ProtocolReceivePacket.
Here is my PtReceivePakcet:
**************************************
INT
PtReceivePacket(
IN NDIS_HANDLE ProtocolBindingContext,
IN PNDIS_PACKET Packet
)
{
PADAPT pAdapt = (PADAPT)ProtocolBindingContext;
NDIS_STATUS Status;
PNDIS_PACKET pOurPacket;
INT ReturnedRefCount;
NDIS_STATUS MPPacketStatus;
BOOLEAN bDuplicatePacketData = FALSE;
PRSVD PktContext;
// Repackage The Original Packet In New NDIS_PACKET
bDuplicatePacketData = FALSE;
pOurPacket = IMRepackagePacket( pAdapt, Packet);
if( !pOurPacket )
{
return 0;
}
//translate packet and send via another adapt
if (pAdapt->NatState == 1)
{
if (RePackageEtherFrame(pAdapt, pOurPacket))
{
return 0;
}
}
NdisMIndicateReceivePacket( pAdapt->MiniportHandle, &pOurPacket, 1 );
Status = NDIS_GET_PACKET_STATUS( pOurPacket );
if( Status != NDIS_STATUS_PENDING )
{
IMFreePacketAndBuffers( pOurPacket, pAdapt );
ReturnedRefCount = 0;
}
else
{
ReturnedRefCount = 1; // up the ref count on the packet
}
return ReturnedRefCount;
}
**************************************
The error may be occurred at
pOurPacket = IMRepackagePacket( pAdapt, Packet);
if( !pOurPacket )
{
return 0;
}
//translate packet and send via another adapt
if (pAdapt->NatState == 1)
{
if (RePackageEtherFrame(pAdapt, pOurPacket))
{
return 0;
}
}
After IMRepackagePacket, pOurPacket–>protocolreserved.OriginalPkt = Packet;
Here ProtocolReserved of packet is defined as:
typedef struct _ProtRsvd
{
LIST_ENTRY qLink; // Not Used During Indications…
PNDIS_PACKET OriginalPkt;
} RSVD, *PRSVD;
#define PROTOLRSVD_FROM_PACKET( _pkt ) \
((PRSVD)((_pkt)->ProtocolReserved ))
In RepackageEtherFrame, I dont not change the OriginalPkt and if the packet
need to be redirected , PtReceivePacket return zero.
Because I called NdisSend in RepackageEtherFrame, and when send complete,
MpSendComplete will be called.
In MpSendComplete, I called
NdisReturnPakcet(OriginalPkt, 1);
Here maybe the error. DDK saids
“When ProtocolReceivePacket returns zero,
NDIS either calls another bound protocol
with the receive indication or returns
the given packet descriptor at Packet to
the miniport that made the indication.”
It means that if PtReceivePacket returns zero, the Packet descriptor
will be returned by NDIS. But at the same time or later
MpSendComplete is called and then NdisReturnPacket. But
now the ownership of the originalpkt is not retain by my driver.
Is it right?
I just test to translate icmp echo request/reply packet.
ICMP packet’s length always equals to 74 bytes. I think
it doesnt exceed the MTU of NDISWANIP.
I debug the code of PtStatus when NDIS_STATUS_WAN_LINE_UP
to see the value of MaximumTotalSize in structure of NDIS_WAN
_LINE_UP. The value always equals to 0x5DC.>It’s very difficult to say something definite, because you provide vey few
>information. Did not you forget that LAN Ethernet and NDISWANIP has
>different MTU?
>
>Regards,
>
>Vadim
> -----Original Message-----
> From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com]On Behalf Of iban
> Sent: Friday, October 05, 2001 1:19 PM
> To: NT Developers Interest List
> Subject: [ntdev] BugCheckCode=0xD2 while NAT with wan adapter
>
>
> Happy time always short:(((
> Another problem:(((
> I am using Passthru to implement NAT. The driver runs
> well with two ethernet NICs. If I dont start NAT packet
> tranlsation, The driver still runs well with one LAN adapter
> and one wan adapter.
> But when I start NAT packet translation,After some packets
> (always 2 to 4 packets) which comes from LAN adapter are
> translated and sended by wan adapter, there is a kernel
> bug check occurred.
> Softice tell me:
> kebugcheckex: bugcheckcode=0xD2 p1=…p2=…,p3=…,p4=…
> I could not find what 0xD2 means because it is not list in the
> windbg references.
> Here is the code I used to redirect the packet:
> ***********************************************
> //translate packet from LAN and send via WAN.
> if(pAdapt->IsLocal)
> {
> if(!TranslateLocalICMPPacket(
> pAdapt,
> pEthHeader,
> iphdr,
> icmphdr)) break;
> //send packet via global adapter
> if (pAdaptList->IsLocal)
>
>
> pAdaptSend = pAdaptList->Next;
> } else
> { pAdaptSend = pAdaptList; }
> NdisSend(&Status, pAdaptSend->BindingHandle, Packet);
> }
> //translate packet from WAN and send via LAN
> if(!TranslateGlobalICMPPacket(
> pAdapt,
> pEthHeader,
> iphdr,
> icmphdr)) break;
> //send packet via local adapter
> if (pAdaptList->IsLocal)
> {
> pAdaptSend = pAdaptList;
> }
> else
> {
> pAdaptSend = pAdaptList->Next;
> }
> NdisSend(&Status,
> pAdaptSend->BindingHandle,
> Packet);
> *************************************************
> I read DDK document about NDISWAN. Should I queue the packet
> and then send it?
> Please give me suggestion:)))
> Thanks
> yours brucie
>
>
>
>
>—
>You are currently subscribed to ntdev as: brucie@263.net
>To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
brucie
brucie@263.net
http://www.mbone.com.cn
http://www.rizcom.com.cn
You are currently subscribed to ntdev as: brucie@263.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
brucie
brucie@263.net
http://www.mbone.com.cn
http://www.rizcom.com.cn
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