Skip to main content
Open topic with navigation CAPL Functions » Ethernet » Function Overview » ethernetPacket::GetSourceEndpoint

ethernetPacket::GetSourceEndpoint

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

Description

Assigns the source IP address and UDP/TCP port number to an ip_Endpoint variable. Note: The ethernetPacket must contain IPv4 or IPv6 protocol and UDP or TCP protocol. If it does not contain the expected protocols, use ethernetPacket::<protocol>.IsAvailable() before calling this method.

Parameters

  • endpoint: IP address and port is assigned to this variable.

Return Values

  • 0: success
  • -1: No IPv4 or IPv6 protocol available in packet.
  • -2: No UDP or TCP protocol available in packet.

Example