Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NetICMP: ICMP Control

Events generated by the Network - ICMP Control functions. More...

Functions

__STATIC_INLINE void EvrNetICMP_ReceiveFrame (const void *icmp_header)
 Event on ICMP receive frame (Op) More...
 
__STATIC_INLINE void EvrNetICMP_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on ICMP receive frame is too short (Error) More...
 
__STATIC_INLINE void EvrNetICMP_ChecksumFailed (uint32_t length)
 Event on ICMP frame checksum check failed (Error) More...
 
__STATIC_INLINE void EvrNetICMP_EchoRequestWrongCode (uint8_t code, uint8_t code_valid)
 Event on ICMP receive wrong code in echo request (Error) More...
 
__STATIC_INLINE void EvrNetICMP_EchoRequestReceived (uint32_t data_length)
 Event on ICMP receive echo request (Op) More...
 
__STATIC_INLINE void EvrNetICMP_SendEchoReply (const void *icmp_header)
 Event on ICMP send echo reply (Op) More...
 
__STATIC_INLINE void EvrNetICMP_EchoReplyReceived (uint32_t data_length)
 Event on ICMP receive echo reply (Op) More...
 
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongState (void)
 Event on ICMP receive echo reply in wrong state (Error) More...
 
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongCode (uint8_t code, uint8_t code_valid)
 Event on ICMP receive wrong code in echo reply (Error) More...
 
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongIpAddress (const uint8_t *ip4_addr)
 Event on ICMP wrong source IPv4 address in echo reply (Error) More...
 
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongId (uint16_t eid, uint16_t eid_valid)
 Event on ICMP wrong echo identifier in echo reply (Error) More...
 
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongPayload (void)
 Event on ICMP invalid payload data in echo reply (Error) More...
 
__STATIC_INLINE void EvrNetICMP_MessageTypeUnknown (uint8_t icmp_type)
 Event on ICMP message type unknown (Op) More...
 
__STATIC_INLINE void EvrNetICMP_SendEchoRequest (const void *icmp_header)
 Event on ICMP send echo request (Op) More...
 
__STATIC_INLINE void EvrNetICMP_PingInit (void)
 Event on Ping client initialize (Op) More...
 
__STATIC_INLINE void EvrNetICMP_PingEcho (const uint8_t *ip4_addr)
 Event on Ping echo request (API) More...
 
__STATIC_INLINE void EvrNetICMP_PingTargetNotValid (void)
 Event on Ping target name not valid (Error) More...
 
__STATIC_INLINE void EvrNetICMP_PingDnsError (void)
 Event on Ping host name resolver error (Error) More...
 
__STATIC_INLINE void EvrNetICMP_PingInvalidParameter (void)
 Event on Ping invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetICMP_PingClientBusy (void)
 Event on Ping client busy (Error) More...
 
__STATIC_INLINE void EvrNetICMP_PingSendRequest (void)
 Event on Ping send echo request (Op) More...
 
__STATIC_INLINE void EvrNetICMP_PingRetransmitRequest (void)
 Event on Ping retransmit echo request (Op) More...
 
__STATIC_INLINE void EvrNetICMP_PingTimeout (void)
 Event on Ping client timeout (Op) More...
 
__STATIC_INLINE void EvrNetICMP_PingUninit (void)
 Event on Ping client de-initialize (Op) More...
 

Description

Events generated by the Network - ICMP Control functions.

The Network ICMP Control functions generate events that report events in the Internet Control Message Protocol version 4 and help in troubleshooting.

Function Documentation

__STATIC_INLINE void EvrNetICMP_ChecksumFailed ( uint32_t  length)

Event on ICMP frame checksum check failed (Error)

Parameters
lengthframe length in bytes

The event ChecksumFailed is created when the network library has checked the checksum on the received ICMP frame and the verification failed. The ICMP frame is therefore discarded.

Value in the Event Recorder shows:

  • len: length of the ICMP frame in bytes.
__STATIC_INLINE void EvrNetICMP_EchoReplyReceived ( uint32_t  data_length)

Event on ICMP receive echo reply (Op)

Parameters
data_lengthlength of the payload data

The event EchoReplyReceived is created when the network library receives a valid ICMP echo reply.

Value in the Event Recorder shows:

  • len: length of the echo reply payload in bytes.
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongCode ( uint8_t  code,
uint8_t  code_valid 
)

Event on ICMP receive wrong code in echo reply (Error)

Parameters
codereceived ICMP code
code_validvalid ICMP code

The event EchoReplyWrongCode is created when the network library receives the ICMP echo reply, but the code byte is invalid. The ICMP frame is therefore discarded.

Value in the Event Recorder shows:

  • code: received ICMP code.
  • valid: expected ICMP code.
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongId ( uint16_t  eid,
uint16_t  eid_valid 
)

Event on ICMP wrong echo identifier in echo reply (Error)

Parameters
eidreceived echo identifier
eid_validvalid echo identifier

The event EchoReplyWrongId is created when the network library receives the ICMP echo reply, but the echo identifier is not identical to the identifier that was sent in echo request. The ICMP frame is therefore discarded.

Value in the Event Recorder shows:

  • eid: received echo identifier.
  • valid: expected echo identifier.
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongIpAddress ( const uint8_t *  ip4_addr)

Event on ICMP wrong source IPv4 address in echo reply (Error)

Parameters
ip4_addrpointer to IPv4 address

The event EchoReplyWrongIpAddress is created when the network library receives an echo reply that came from another IPv4 address instead of the address to which the echo request was sent. The echo reply is therefore discarded.

Value in the Event Recorder shows:

  • ip: IPv4 address of the host that responded.
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongPayload ( void  )

Event on ICMP invalid payload data in echo reply (Error)

The event EchoReplyWrongPayload is created when the network library receives the ICMP echo reply, but the data on the payload is not identical to the data that was sent in echo request. The ICMP frame is therefore discarded.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetICMP_EchoReplyWrongState ( void  )

Event on ICMP receive echo reply in wrong state (Error)

The event EchoReplyWrongState is created when the network library receives an ICMP echo reply, but the ping process is idle. This means that the network library does not wait for the echo reply. The echo reply is therefore discarded.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetICMP_EchoRequestReceived ( uint32_t  data_length)

Event on ICMP receive echo request (Op)

Parameters
data_lengthlength of the payload data

The event EchoRequestReceived is created when the network library receives a valid ICMP echo request.

Value in the Event Recorder shows:

  • len: length of the echo request payload in bytes.
__STATIC_INLINE void EvrNetICMP_EchoRequestWrongCode ( uint8_t  code,
uint8_t  code_valid 
)

Event on ICMP receive wrong code in echo request (Error)

Parameters
codereceived ICMP code
code_validvalid ICMP code

The event EchoRequestWrongCode is created when the network library receives the ICMP echo request, but the code byte is invalid. The ICMP frame is therefore discarded.

Value in the Event Recorder shows:

  • code: received ICMP code.
  • valid: expected ICMP code.
__STATIC_INLINE void EvrNetICMP_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on ICMP receive frame is too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame

The event FrameTooShort is created when the network library receives the ICMP frame that is too short. The frame is discarded.

Value in the Event Recorder shows:

  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.
__STATIC_INLINE void EvrNetICMP_MessageTypeUnknown ( uint8_t  icmp_type)

Event on ICMP message type unknown (Op)

Parameters
icmp_typewrong ICMP message type value

The event MessageTypeUnknown is created when the network library receives the ICMP frame, but the type of message is not supported. The ICMP frame is therefore discarded.

Value in the Event Recorder shows:

  • type: unknown ICMP message type.
__STATIC_INLINE void EvrNetICMP_PingClientBusy ( void  )

Event on Ping client busy (Error)

The event PingClientBusy is created when the function netPing_Echo is executed, and the internal ping process is still busy.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetICMP_PingDnsError ( void  )

Event on Ping host name resolver error (Error)

The event PingDnsError is created when the function netPing_EchoX is executed, and the internal DNS resolver failed.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetICMP_PingEcho ( const uint8_t *  ip4_addr)

Event on Ping echo request (API)

Parameters
ip4_addrpointer to IPv4 address

The event PingEcho is created when the functions netPing_Echo or netPing_EchoX are executed.

Value in the Event Recorder shows:

  • ip: target IPv4 address.
__STATIC_INLINE void EvrNetICMP_PingInit ( void  )

Event on Ping client initialize (Op)

The event PingInit is created when the ping process is initialized, that is, when the function netInitialize is executed.

Value in the Event Recorder shows:

  • ping
__STATIC_INLINE void EvrNetICMP_PingInvalidParameter ( void  )

Event on Ping invalid parameter (Error)

The event PingInvalidParameter is created when the function netPing_Echo is executed, and the function input parameter is invalid.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetICMP_PingRetransmitRequest ( void  )

Event on Ping retransmit echo request (Op)

The event PingRetransmitRequest is created when the network library wants to retransmit an ICMP echo request because the target host is not responding.

Value in the Event Recorder shows:

  • resend
__STATIC_INLINE void EvrNetICMP_PingSendRequest ( void  )

Event on Ping send echo request (Op)

The event PingSendRequest is created when the network library wants to send an ICMP echo request.

Value in the Event Recorder shows:

  • send
__STATIC_INLINE void EvrNetICMP_PingTargetNotValid ( void  )

Event on Ping target name not valid (Error)

The event PingTargetNotValid is created when the function netPing_EchoX is executed, and the target name is invalid and can not be resolved.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetICMP_PingTimeout ( void  )

Event on Ping client timeout (Op)

The event PingTimeout is created when the network library has left the internal ping process because the target host is not responding.

Value in the Event Recorder shows:

  • timeout
__STATIC_INLINE void EvrNetICMP_PingUninit ( void  )

Event on Ping client de-initialize (Op)

The event PingUninit is created when the function netUninitialize is executed.

Value in the Event Recorder shows:

  • ping
__STATIC_INLINE void EvrNetICMP_ReceiveFrame ( const void *  icmp_header)

Event on ICMP receive frame (Op)

Parameters
icmp_headerpointer to ICMP frame header of 8 bytes
  • Type (1 byte)
  • Code (1 byte)
  • Chksum (2 bytes)
  • EchoId (2 bytes)
  • EchoSeq (2 bytes)

The event ReceiveFrame is created when the network library receives the ICMP frame. This event displays detailed information about the ICMP protocol header.

Value in the Event Recorder shows:

  • type: Type of message (ECHO_REQUEST, ECHO_REPLY, DEST_UNREACH, TIME_EXCEEDED, TRACE_ROUTE).
  • code: Message code byte.
  • cksum: Checksum of ICMP frame.
__STATIC_INLINE void EvrNetICMP_SendEchoReply ( const void *  icmp_header)

Event on ICMP send echo reply (Op)

Parameters
icmp_headerpointer to ICMP frame header of 8 bytes
  • Type (1 byte)
  • Code (1 byte)
  • Chksum (2 bytes)
  • EchoId (2 bytes)
  • EchoSeq (2 bytes)

The event SendEchoReply is created when the network library wants to send an ICMP echo reply. This event displays detailed information about the ICMP protocol header.

Value in the Event Recorder shows:

  • type: Type of message (ECHO_REPLY).
  • code: Message code byte.
  • cksum: Checksum of ICMP frame.
__STATIC_INLINE void EvrNetICMP_SendEchoRequest ( const void *  icmp_header)

Event on ICMP send echo request (Op)

Parameters
icmp_headerpointer to ICMP frame header of 8 bytes
  • Type (1 byte)
  • Code (1 byte)
  • Chksum (2 bytes)
  • EchoId (2 bytes)
  • EchoSeq (2 bytes)

The event SendEchoRequest is created when the network library wants to send an ICMP echo request. This event displays detailed information about the ICMP protocol header.

Value in the Event Recorder shows:

  • type: Type of message (ECHO_REQUEST).
  • code: Message code byte.
  • cksum: Checksum of ICMP frame.