error.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include <errno.h>
21 #include <stdint.h>
22 
23 #include "net/icmpv6.h"
24 #include "net/ipv6/hdr.h"
25 #include "net/gnrc/ipv6.h"
26 #include "net/gnrc/netapi.h"
27 #include "net/gnrc/pkt.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #if defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN)
45 void gnrc_icmpv6_error_dst_unr_send(uint8_t code, const gnrc_pktsnip_t *orig_pkt);
46 
59  const gnrc_pktsnip_t *orig_pkt);
60 
73  const gnrc_pktsnip_t *orig_pkt);
74 
88 void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr,
89  const gnrc_pktsnip_t *orig_pkt);
90 #else /* defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN) */
91 /* NOPs to make the usage code more readable */
92 #define gnrc_icmpv6_error_dst_unr_send(code, orig_pkt) \
93  (void)code; (void)orig_pkt
94 #define gnrc_icmpv6_error_pkt_too_big_send(mtu, orig_pkt) \
95  (void)mtu; (void)orig_pkt
96 #define gnrc_icmpv6_error_time_exc_send(code, orig_pkt) \
97  (void)code; (void)orig_pkt
98 #define gnrc_icmpv6_error_param_prob_send(code, ptr, orig_pkt) \
99  (void)code; (void)ptr, (void)orig_pkt
100 #endif /* defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN) */
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
Definitions for GNRC's IPv6 implementation.
void gnrc_icmpv6_error_time_exc_send(uint8_t code, const gnrc_pktsnip_t *orig_pkt)
Sends an ICMPv6 time exceeded message for sending.
void gnrc_icmpv6_error_dst_unr_send(uint8_t code, const gnrc_pktsnip_t *orig_pkt)
Sends an ICMPv6 destination unreachable message for sending.
void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr, const gnrc_pktsnip_t *orig_pkt)
Sends an ICMPv6 parameter problem message for sending.
void gnrc_icmpv6_error_pkt_too_big_send(uint32_t mtu, const gnrc_pktsnip_t *orig_pkt)
Sends an ICMPv6 packet too big message for sending.
ICMPv6 type and function definitions.
General definitions for network packets and their helper functions.
IPv6 header type and helper function definitions.
Generic interface to communicate with GNRC modules.
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:105