1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

gnrc_ipv6: make next-header demuxer private

Since the recursion into `gnrc_ipv6_demux()` was removed in
`gnrc_ipv6_ext`, `gnrc_ipv6.c` is the only user of this function,
so it can be made private. It was only made public so it can be used
from `gnrc_ipv6_ext`.
This commit is contained in:
Martine Lenders 2018-10-24 00:19:49 +02:00 committed by Martine Lenders
parent f671a87fe2
commit 764ed8c300
2 changed files with 3 additions and 30 deletions

View File

@ -127,32 +127,6 @@ extern fib_table_t gnrc_ipv6_fib_table;
*/
kernel_pid_t gnrc_ipv6_init(void);
/**
* @brief Demultiplexes a packet according to @p nh.
*
* @internal
*
* **Do not use outside this module or its submodules!!!**
* Public access needed for Extension Headers.
*
* About `current` and `pkt`:
*
* current pkt
* | |
* v v
* IPv6 <- IPv6_EXT <- IPv6_EXT <- UNDEF
*
* This situation may happen when the packet has a source routing extension
* header (RFC 6554), and the packet is forwarded from an interface to another.
*
* @param[in] netif The receiving interface.
* @param[in] current A snip to process.
* @param[in] pkt A packet.
* @param[in] nh A protocol number (see @ref net_protnum) of the current snip.
*/
void gnrc_ipv6_demux(gnrc_netif_t *netif, gnrc_pktsnip_t *current,
gnrc_pktsnip_t *pkt, uint8_t nh);
/**
* @brief Get the IPv6 header from a given list of @ref gnrc_pktsnip_t
*

View File

@ -93,8 +93,8 @@ kernel_pid_t gnrc_ipv6_init(void)
static void _dispatch_next_header(gnrc_pktsnip_t *current, gnrc_pktsnip_t *pkt,
uint8_t nh, bool interested);
void gnrc_ipv6_demux(gnrc_netif_t *netif, gnrc_pktsnip_t *current,
gnrc_pktsnip_t *pkt, uint8_t nh)
static void _demux(gnrc_netif_t *netif, gnrc_pktsnip_t *current,
gnrc_pktsnip_t *pkt, uint8_t nh)
{
bool interested;
@ -848,8 +848,7 @@ static void _receive(gnrc_pktsnip_t *pkt)
#endif /* MODULE_GNRC_IPV6_ROUTER */
}
/* IPv6 internal demuxing (ICMPv6, Extension headers etc.) */
gnrc_ipv6_demux(netif, pkt, pkt, hdr->nh);
_demux(netif, pkt, pkt, hdr->nh);
}
/** @} */