Support for IPv6 routing header extension

GNRC implementation of IPv6 routing header extension.

enum @188
GNRC_IPV6_EXT_RH_ERROR = 0
An error occurred during routing header processing.
GNRC_IPV6_EXT_RH_AT_DST

The routing header was successfully processed and this node is the destination (i.e.

ipv6/ext/rh.h::ipv6_ext_rh_t::seg_left == 0)

GNRC_IPV6_EXT_RH_FORWARDED

The routing header was successfully processed and the packet was forwarded to another node or should be forwarded to another node.

When gnrc/ipv6/ext/rh.h::gnrc_ipv6_ext_rh_process() returns this value, the packet was already forwarded to another node. Implementations for specific routing header types should leave the forwarding to the calling gnrc/ipv6/ext/rh.h::gnrc_ipv6_ext_rh_process() and should return gnrc/ipv6/ext/rh.h::@188::GNRC_IPV6_EXT_RH_FORWARDED if they want the packet to be forwarded. They should however set ipv6/hdr.h::ipv6_hdr_t::dst accordingly.

int gnrc_ipv6_ext_rh_process(ipv6_hdr_t * ipv6, ipv6_ext_rh_t * ext)

Process the routing header of an IPv6 packet.

Parameters

ipv6:An IPv6 packet.
ext:A routing header of ipv6.

Return values

  • gnrc/ipv6/ext/rh.h::@188::GNRC_IPV6_EXT_RH_AT_DST, on success
  • gnrc/ipv6/ext/rh.h::@188::GNRC_IPV6_EXT_RH_FORWARDED, when pkt was forwarded
  • gnrc/ipv6/ext/rh.h::@188::GNRC_IPV6_EXT_RH_ERROR, on error