Skip to main content

TestGetWaitPDUsTPIPv4SrcAddr

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

  • long TestGetWaitPDUsTPIPv4SrcAddr(dword &IPv4SourceAddress); //form 1
  • long TestGetWaitPDUsTPIPv4SrcAddr(dword explicitJoinIndex, dword &IPv4SourceAddress); //form 2

Description

If a PDU was received via IPv4 that triggered the last wait function, with form 1 the IPv4 source address can be requested. Form 2 can only be used for joined events. The number of the joined event (return value of TestJoin…) is here being used as an index.

Parameters

  • IPv4SourceAddress: IPv4 source address in network byte order.
  • explicitJoinIndex: Number of the joined event corresponds with the return value of TestJoin….

Return Values

  • 0: Data access successful.
  • -1: Data access could not be executed, the last event was not a PDU event.
  • -2: Data access could not be executed; the explicitJoinIndex is out-of-range.

Example

TestWaitForPDUTestGetWaitPDUDataTestGetWaitPDUsTPIPv4DstAddrTestGetWaitPDUsTPIPv6DstAddrTestGetWaitPDUsTPIPv6SrcAddrTestGetWaitPDUsTPTCPDstPortTestGetWaitPDUsTPTCPSrcPortTestGetWaitPDUsTPUDPDstPortTestGetWaitPDUsTPUDPSrcPort