Loading...
Searching...
No Matches
echo.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
22
23#include <inttypes.h>
24
25#include "byteorder.h"
26#include "compiler_hints.h"
27#include "net/gnrc/netif.h"
28#include "net/gnrc/netif/hdr.h"
29#include "net/ipv6/hdr.h"
30#include "net/icmpv6.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
49ACCESS(read_only, 4, 5)
50gnrc_pktsnip_t *gnrc_icmpv6_echo_build(uint8_t type, uint16_t id, uint16_t seq,
51 const void *data, size_t data_len);
52
63 icmpv6_echo_t *echo, uint16_t len);
64
78int gnrc_icmpv6_echo_send(const gnrc_netif_t *netif, const ipv6_addr_t *addr,
79 uint16_t id, uint16_t seq, uint8_t ttl, size_t len);
80
93 int corrupt, uint32_t rtt_us, void *ctx);
107
108#ifdef __cplusplus
109}
110#endif
111
Functions to work with different byte orders.
Common macros and compiler attributes/pragmas configuration.
#define ACCESS(mode, ptr_idx, size_idx)
Emit an attribute (if supported by the compiler) that declares how a function will access its paramet...
Definition for GNRC's network interfaces.
int gnrc_icmpv6_echo_send(const gnrc_netif_t *netif, const ipv6_addr_t *addr, uint16_t id, uint16_t seq, uint8_t ttl, size_t len)
Send out ICMPv6 echo request.
gnrc_pktsnip_t * gnrc_icmpv6_echo_build(uint8_t type, uint16_t id, uint16_t seq, const void *data, size_t data_len)
Builds an ICMPv6 echo message of type type for sending.
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.
int(* gnrc_icmpv6_echo_rsp_handle_cb_t)(gnrc_pktsnip_t *pkt, int corrupt, uint32_t rtt_us, void *ctx)
ICMPv6 echo response callback.
Definition echo.h:92
int gnrc_icmpv6_echo_rsp_handle(gnrc_pktsnip_t *pkt, size_t len, gnrc_icmpv6_echo_rsp_handle_cb_t cb, void *ctx)
Parse ICMPv6 echo response.
struct gnrc_pktsnip gnrc_pktsnip_t
Type to represent parts (either headers or payload) of a packet, called snips.
ICMPv6 type and function definitions.
Adds include for missing inttype definitions.
Generic network interface header.
IPv6 header type and helper function definitions.
Representation of a network interface.
Definition netif.h:140
Echo request and response message format.
Definition icmpv6.h:215
Data type to represent an IPv6 packet header.
Definition hdr.h:66
Data type to represent an IPv6 address.
Definition addr.h:67