testcase TC_CheckPDUTPProperties()
{
dword srcAddr, dstAddr, srcPort, dstPort;
if (TestWaitForPDU(engineDataPDU, 0, 200)!=1)
{
TestStepFail("PDU not received");
}
else
{
if (TestGetWaitPDUsTPIPv4SrcAddr(srcAddr)==0
&& TestGetWaitPDUsTPIPv4DstAddr(dstAddr)==0
&& TestGetWaitPDUsTPTCPSrcPort(srcPort)==0
&& TestGetWaitPDUsTPTCPDstPort(dstPort)==0)
{
if (srcAddr != IpGetAddressAsNumber("192.168.0.1"))
TestStepFail("source address not matching");
else if (dstAddr != IpGetAddressAsNumber("192.168.0.2"))
TestStepFail("destination address not matching");
else if (srcPort != 1234)
TestStepFail("source port not matching");
else if (dstPort != 4321)
TestStepFail("destination port not matching");
}
else
TestStepFail("could not retrieve expected PDU TP properties");
}
}