Skip to content
Snippets Groups Projects
Unverified Commit 152a9dc3 authored by Koen Zandberg's avatar Koen Zandberg Committed by GitHub
Browse files

Merge pull request #10247 from miri64/ipv6_ext_rh/cleanup/central-types

ipv6_ext_rh: define type numbers at central place
parents 411b12b4 521fa8d9
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,6 @@
extern "C" {
#endif
/**
* @brief Type for source routing header.
*/
#define GNRC_RPL_SRH_TYPE (3U)
/**
* @brief The RPL Source routing header.
*
......
......@@ -32,6 +32,34 @@
extern "C" {
#endif
/**
* @name Routing header types
* @see [IANA, IPv6 parameters](https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#ipv6-parameters-3)
* @{
*/
/**
* @brief Type 0 routing header (deprecated)
*/
#define IPV6_EXT_RH_TYPE_0 (0U)
/**
* @brief Nimrod routing header (deprecated)
*/
#define IPV6_EXT_RH_TYPE_NIMROD (1U)
/**
* @brief Type 2 routing header
* @see [RFC 6275, section 6.4](https://tools.ietf.org/html/rfc6275#section-6.4)
*/
#define IPV6_EXT_RH_TYPE_2 (2U)
/**
* @brief RPL source routing header
* @see [RFC 6554](https://tools.ietf.org/html/rfc6554)
*/
#define IPV6_EXT_RH_TYPE_RPL_SRH (3U)
/** @} */
/**
* @brief IPv6 routing extension header.
*
......
......@@ -25,7 +25,7 @@ int gnrc_ipv6_ext_rh_process(ipv6_hdr_t *hdr, ipv6_ext_rh_t *ext)
switch (ext->type) {
#ifdef MODULE_GNRC_RPL_SRH
case GNRC_RPL_SRH_TYPE:
case IPV6_EXT_RH_TYPE_RPL_SRH:
return gnrc_rpl_srh_process(hdr, (gnrc_rpl_srh_t *)ext);
#endif
......
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