Support for IPv6 routing header extension

GNRC implementation of IPv6 routing header extension. More...

Detailed Description

GNRC implementation of IPv6 routing header extension.

Files

file  rh.h
 GNRC routing extension header definitions.
 

Enumerations

enum  { GNRC_IPV6_EXT_RH_ERROR = 0, GNRC_IPV6_EXT_RH_AT_DST, GNRC_IPV6_EXT_RH_FORWARDED }
 

Functions

int gnrc_ipv6_ext_rh_process (gnrc_pktsnip_t *pkt)
 Process the routing header of an IPv6 packet. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GNRC_IPV6_EXT_RH_ERROR 

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_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_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_process() and should return GNRC_IPV6_EXT_RH_FORWARDED if they want the packet to be forwarded. They should however set ipv6_hdr_t::dst accordingly.

Definition at line 29 of file rh.h.

Function Documentation

◆ gnrc_ipv6_ext_rh_process()

int gnrc_ipv6_ext_rh_process ( gnrc_pktsnip_t pkt)

Process the routing header of an IPv6 packet.

Parameters
[in]pktAn IPv6 packet containing the routing header in the first snip
Returns
GNRC_IPV6_EXT_RH_AT_DST, on success
GNRC_IPV6_EXT_RH_FORWARDED, when pkt was forwarded
GNRC_IPV6_EXT_RH_ERROR, on error