NDIS_PER_PACKET_INFO_FROM_PACKET

Hi,

The DDK says the that for the above MACRO ndis will pass the pointer to the
ChecksumOffloading Structure ( assuming that is parameter passed to the
MACRO ) but it doesn’t seem to be passing it, it seems to be passing the
value of the first member in the MACRO, so when I run HCT it panics.

If put a & infront of the value it passes ( that’s taking the address of
what is passes ) then type cast to the checksum structure and then access
the members, it works fine and HCT passes.

Is this a bug ???
Will this apply to all the other parameters also, also I can’t seem to
figure it out, if one looks at ndis.h then we find that it is returning a
pointer but in reality it doesn’t seem to be.

To check doubts on my code, I’,m putting the piece of code in here that does
this.

****************************************************************************
***********************************

PNDIS_TCP_IP_CHECKSUM_PACKET_INFO pChksumPktInfo=NULL;



if(NDIS_GET_PACKET_PROTOCOL_TYPE(PacketArray[i]) ==
NDIS_PROTOCOL_ID_TCP_IP)
{
pChksumPktInfo =
(PNDIS_TCP_IP_CHECKSUM_PACKET_INFO)(&(NDIS_PER_PACKET_INFO_FROM_PACKET(Packe
tArray[i], TcpIpChecksumPacketInfo)));

if(pChksumPktInfo)
{

if (pChksumPktInfo->Transmit.NdisPacketChecksumV4)
{

if(pChksumPktInfo->Transmit.NdisPacketTcpChecksum)
xxxxxxxxxxxx

else
if(pChksumPktInfo->Transmit.NdisPacketUdpChecksum)
xxxxxxxxxxxx

if(pChksumPktInfo->Transmit.NdisPacketIpChecksum)
xxxxxxxxxxxx
}
}
}

****************************************************************************
***********************************

This code runs perfectly fine.

now in this code if I remove the “&” and then run the code it panics!!! (
which according to the DDK it shouldn’t )

Anyone, any clues ???

Thanks,
Ramit.


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