Skip to content
Snippets Groups Projects
Commit 04a28270 authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_icmpv6_error: provide NOPs when compiled without module

This is aimed to make the usage code of this module more readable.
parent 697ad17e
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
extern "C" { extern "C" {
#endif #endif
#if defined(MODULE_GNRC_ICMPV6_ERROR) || defined(DOXYGEN)
/** /**
* @brief Sends an ICMPv6 destination unreachable message for sending. * @brief Sends an ICMPv6 destination unreachable message for sending.
* *
...@@ -78,6 +79,17 @@ void gnrc_icmpv6_error_time_exc_send(uint8_t code, ...@@ -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, void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr,
const gnrc_pktsnip_t *orig_pkt); 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 #ifdef __cplusplus
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment