1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 15:31:17 +01:00

gnrc_icmpv6_error: provide NOPs when compiled without module

This is aimed to make the usage code of this module more readable.
This commit is contained in:
Martine Lenders 2018-11-14 13:54:12 +01:00
parent 697ad17ed1
commit 04a2827089

View File

@ -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
}