diff --git a/sys/include/net/gnrc/icmpv6/error.h b/sys/include/net/gnrc/icmpv6/error.h index 552c93be348766e2cb849f522d7aa5b5c7de1caf..7bd527e13162a71a217b8ecbc01ccf86de2c10fa 100644 --- a/sys/include/net/gnrc/icmpv6/error.h +++ b/sys/include/net/gnrc/icmpv6/error.h @@ -33,6 +33,7 @@ extern "C" { #endif +#if defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN) /** * @brief Sends an ICMPv6 destination unreachable message for sending. * @@ -78,6 +79,17 @@ void gnrc_icmpv6_error_time_exc_send(uint8_t code, */ void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr, const gnrc_pktsnip_t *orig_pkt); +#else /* defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN) */ +/* NOPs to make the usage code more readable */ +#define gnrc_icmpv6_error_dst_unr_send(code, orig_pkt) \ + (void)code; (void)orig_pkt +#define gnrc_icmpv6_error_pkt_too_big_send(mtu, orig_pkt) \ + (void)mtu; (void)orig_pkt +#define gnrc_icmpv6_error_time_exc_send(code, orig_pkt) \ + (void)code; (void)orig_pkt +#define gnrc_icmpv6_error_param_prob_send(code, ptr, orig_pkt) \ + (void)code; (void)ptr, (void)orig_pkt +#endif /* defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN) */ #ifdef __cplusplus }