mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
gnrc_icmpv6_error: remove static inline from functions
This commit is contained in:
parent
a79d03835a
commit
a30bdebc2c
@ -85,19 +85,7 @@ gnrc_pktsnip_t *gnrc_icmpv6_error_param_prob_build(uint8_t code, void *ptr,
|
||||
* @param[in] code The code for the message @see net/icmpv6.h.
|
||||
* @param[in] orig_pkt The invoking packet.
|
||||
*/
|
||||
static inline void gnrc_icmpv6_error_dst_unr_send(uint8_t code, gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_dst_unr_build(code, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, EHOSTUNREACH);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
void gnrc_icmpv6_error_dst_unr_send(uint8_t code, gnrc_pktsnip_t *orig_pkt);
|
||||
|
||||
/**
|
||||
* @brief Sends an ICMPv6 packet too big message for sending.
|
||||
@ -105,19 +93,7 @@ static inline void gnrc_icmpv6_error_dst_unr_send(uint8_t code, gnrc_pktsnip_t *
|
||||
* @param[in] mtu The maximum transission unit of the next-hop link.
|
||||
* @param[in] orig_pkt The invoking packet.
|
||||
*/
|
||||
static inline void gnrc_icmpv6_error_pkt_too_big_send(uint32_t mtu, gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_pkt_too_big_build(mtu, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, EMSGSIZE);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
void gnrc_icmpv6_error_pkt_too_big_send(uint32_t mtu, gnrc_pktsnip_t *orig_pkt);
|
||||
|
||||
/**
|
||||
* @brief Sends an ICMPv6 time exceeded message for sending.
|
||||
@ -125,19 +101,7 @@ static inline void gnrc_icmpv6_error_pkt_too_big_send(uint32_t mtu, gnrc_pktsnip
|
||||
* @param[in] code The code for the message @see net/icmpv6.h.
|
||||
* @param[in] orig_pkt The invoking packet.
|
||||
*/
|
||||
static inline void gnrc_icmpv6_error_time_exc_send(uint8_t code, gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_time_exc_build(code, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, ETIMEDOUT);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
void gnrc_icmpv6_error_time_exc_send(uint8_t code, gnrc_pktsnip_t *orig_pkt);
|
||||
|
||||
/**
|
||||
* @brief Sends an ICMPv6 parameter problem message for sending.
|
||||
@ -146,20 +110,8 @@ static inline void gnrc_icmpv6_error_time_exc_send(uint8_t code, gnrc_pktsnip_t
|
||||
* @param[in] ptr Pointer to the errorneous octet in @p orig_pkt.
|
||||
* @param[in] orig_pkt The invoking packet.
|
||||
*/
|
||||
static inline void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr,
|
||||
gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_param_prob_build(code, ptr, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, EINVAL);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr,
|
||||
gnrc_pktsnip_t *orig_pkt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@ -118,4 +118,61 @@ gnrc_pktsnip_t *gnrc_icmpv6_error_param_prob_build(uint8_t code, void *ptr,
|
||||
return pkt;
|
||||
}
|
||||
|
||||
void gnrc_icmpv6_error_dst_unr_send(uint8_t code, gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_dst_unr_build(code, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, EHOSTUNREACH);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
|
||||
void gnrc_icmpv6_error_pkt_too_big_send(uint32_t mtu, gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_pkt_too_big_build(mtu, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, EMSGSIZE);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
|
||||
void gnrc_icmpv6_error_time_exc_send(uint8_t code, gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_time_exc_build(code, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, ETIMEDOUT);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
|
||||
void gnrc_icmpv6_error_param_prob_send(uint8_t code, void *ptr,
|
||||
gnrc_pktsnip_t *orig_pkt)
|
||||
{
|
||||
gnrc_pktsnip_t *pkt = gnrc_icmpv6_error_param_prob_build(code, ptr, orig_pkt);
|
||||
|
||||
if (pkt != NULL) {
|
||||
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
|
||||
}
|
||||
#ifdef MODULE_GNRC_PKTBUF
|
||||
gnrc_pktbuf_release_error(orig_pkt, EINVAL);
|
||||
#else
|
||||
(void)orig_pkt;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user