ICMPv6 echo messages

ICMPv6 echo request and reply. More...

Detailed Description

ICMPv6 echo request and reply.

Files

file  echo.h
 ICMPv6 echo message definitions.
 

Functions

gnrc_pktsnip_tgnrc_icmpv6_echo_build (uint8_t type, uint16_t id, uint16_t seq, uint8_t *data, size_t data_len)
 Builds an ICMPv6 echo message of type type for sending. More...
 
void gnrc_icmpv6_echo_req_handle (gnrc_netif_t *netif, ipv6_hdr_t *ipv6_hdr, icmpv6_echo_t *echo, uint16_t len)
 ICMPv6 echo request handler. More...
 

Function Documentation

◆ gnrc_icmpv6_echo_build()

gnrc_pktsnip_t* gnrc_icmpv6_echo_build ( uint8_t  type,
uint16_t  id,
uint16_t  seq,
uint8_t *  data,
size_t  data_len 
)

Builds an ICMPv6 echo message of type type for sending.

Parameters
[in]typeType of the echo message. Expected to be either ICMPV6_ECHO_REQ or ICMPV6_ECHO_REP.
[in]idID for the echo message in host byte-order
[in]seqSequence number for the echo message in host byte-order
[in]dataPayload for the echo message
[in]data_lenLength of data
Returns
The echo message on success
NULL, on failure

◆ gnrc_icmpv6_echo_req_handle()

void gnrc_icmpv6_echo_req_handle ( gnrc_netif_t netif,
ipv6_hdr_t ipv6_hdr,
icmpv6_echo_t echo,
uint16_t  len 
)

ICMPv6 echo request handler.

Parameters
[in]netifThe interface the echo request was received on.
[in]ipv6_hdrThe IPv6 header of the echo request.
[in]echoThe Echo Request message.
[in]lenLength of the echo request message (ipv6_hdr_t::len of ipv6_hdr minus length of extension headers).