Skip to main content

C2xSecPacketIsSecured

Valid for: CANoe DE

Function Syntax

long C2xSecPacketIsSecured (long packetHandle);

Description

Checks if the packet is secured by a security layer (Security Header or WAVE Security Services).

Parameters

  • packetHandle: Handle of the packet.

Return Values

  • 1: The packet is secured.
  • 0: The packet is not secured.

Example

void OnC2xPacket (long channel, long dir, long radioChannel, long signalStrength, long sigQuality, long packet)
{
  byte hashedId8[8] ;

  if (C2xSecPacketIsSecured(packet))
  {
    C2xSecPacketGetSignerHashedId8(packet, hashedId8);
    /* ... */
  }
}