Network Component  
MDK Middleware for IPv4 and IPv6 Networking
 
Loading...
Searching...
No Matches
NetICMP: ICMP Control

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

Functions

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

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

◆ EvrNetICMP_ChecksumFailed()

__STATIC_INLINE void EvrNetICMP_ChecksumFailed ( uint16_t  if_id,
uint32_t  length 
)

Event on ICMP frame checksum check failed (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • len: length of the ICMP frame in bytes.

◆ EvrNetICMP_EchoReplyDisabled()

__STATIC_INLINE void EvrNetICMP_EchoReplyDisabled ( uint16_t  if_id)

Event on ICMP sending echo reply disabled (Op)

Parameters
if_idnetwork interface identifier

The event EchoReplyDisabled is created when the network library receives an ECHO request, but the ECHO response is disabled in the interface configuration for IPv4. This configuration option is rarely enabled, usually for security reasons only.

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetICMP_EchoReplyReceived()

__STATIC_INLINE void EvrNetICMP_EchoReplyReceived ( uint16_t  if_id,
uint32_t  data_length 
)

Event on ICMP receive echo reply (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • len: length of the echo reply payload in bytes.

◆ EvrNetICMP_EchoReplyWrongCode()

__STATIC_INLINE void EvrNetICMP_EchoReplyWrongCode ( uint16_t  if_id,
uint8_t  code,
uint8_t  code_valid 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • code: received ICMP code.
  • valid: expected ICMP code.

◆ EvrNetICMP_EchoReplyWrongId()

__STATIC_INLINE void EvrNetICMP_EchoReplyWrongId ( uint16_t  if_id,
uint16_t  eid,
uint16_t  eid_valid 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • eid: received echo identifier.
  • valid: expected echo identifier.

◆ EvrNetICMP_EchoReplyWrongIpAddress()

__STATIC_INLINE void EvrNetICMP_EchoReplyWrongIpAddress ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • ip: IPv4 address of the host that responded.

◆ EvrNetICMP_EchoReplyWrongPayload()

__STATIC_INLINE void EvrNetICMP_EchoReplyWrongPayload ( uint16_t  if_id)

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

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetICMP_EchoReplyWrongState()

__STATIC_INLINE void EvrNetICMP_EchoReplyWrongState ( uint16_t  if_id)

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

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetICMP_EchoRequestReceived()

__STATIC_INLINE void EvrNetICMP_EchoRequestReceived ( uint16_t  if_id,
uint32_t  data_length 
)

Event on ICMP receive echo request (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • len: length of the echo request payload in bytes.

◆ EvrNetICMP_EchoRequestWrongCode()

__STATIC_INLINE void EvrNetICMP_EchoRequestWrongCode ( uint16_t  if_id,
uint8_t  code,
uint8_t  code_valid 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • code: received ICMP code.
  • valid: expected ICMP code.

◆ EvrNetICMP_FrameTooShort()

__STATIC_INLINE void EvrNetICMP_FrameTooShort ( uint16_t  if_id,
uint32_t  length,
uint32_t  min_length 
)

Event on ICMP receive frame is too short (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.

◆ EvrNetICMP_MessageTypeUnknown()

__STATIC_INLINE void EvrNetICMP_MessageTypeUnknown ( uint16_t  if_id,
uint8_t  icmp_type 
)

Event on ICMP message type unknown (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: unknown ICMP message type.

◆ EvrNetICMP_PingClientBusy()

__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

◆ EvrNetICMP_PingDnsError()

__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. To resolve this error, call the function again after a short delay.

Value in the Event Recorder shows:

  • error

◆ EvrNetICMP_PingEcho()

__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.

◆ EvrNetICMP_PingInit()

__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

◆ EvrNetICMP_PingInvalidParameter()

__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

◆ EvrNetICMP_PingRetransmitRequest()

__STATIC_INLINE void EvrNetICMP_PingRetransmitRequest ( uint16_t  if_id)

Event on Ping retransmit echo request (Op)

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetICMP_PingSendRequest()

__STATIC_INLINE void EvrNetICMP_PingSendRequest ( uint16_t  if_id)

Event on Ping send echo request (Op)

Parameters
if_idnetwork interface identifier

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

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetICMP_PingTargetNotValid()

__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

◆ EvrNetICMP_PingTimeout()

__STATIC_INLINE void EvrNetICMP_PingTimeout ( uint16_t  if_id)

Event on Ping client timeout (Op)

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetICMP_PingUninit()

__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

◆ EvrNetICMP_ReceiveFrame()

__STATIC_INLINE void EvrNetICMP_ReceiveFrame ( uint16_t  if_id,
uint32_t  length 
)

Event on ICMP receive frame (Op)

Parameters
if_idnetwork interface identifier
lengthframe length in bytes

The event ReceiveFrame is created when the network library receives the ICMP frame.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • len: length of the received frame in bytes.

◆ EvrNetICMP_SendEchoReply()

__STATIC_INLINE void EvrNetICMP_SendEchoReply ( uint16_t  if_id)

Event on ICMP send echo reply (Op)

Parameters
if_idnetwork interface identifier

The event SendEchoReply is created when the network library wants to send an ICMP echo reply.

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetICMP_SendEchoRequest()

__STATIC_INLINE void EvrNetICMP_SendEchoRequest ( uint16_t  if_id)

Event on ICMP send echo request (Op)

Parameters
if_idnetwork interface identifier

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

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetICMP_ShowFrameHeader()

__STATIC_INLINE void EvrNetICMP_ShowFrameHeader ( const void *  icmp_header)

Event on ICMP display send/receive frame header (Detail)

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 ShowFrameHeader is created when the network library wants to display detailed information about the ICMP 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.