Support for IPv6 option extension headers

GNRC implementation of IPv6 hop-by-hop and destination option header extension. More...

Detailed Description

GNRC implementation of IPv6 hop-by-hop and destination option header extension.

Files

file  opt.h
 GNRC hop-by-hop and destination option header definitions.
 

Functions

gnrc_pktsnip_tgnrc_ipv6_ext_opt_process (gnrc_pktsnip_t *pkt, uint8_t protnum)
 Processes all options within an IPv6 option header. More...
 

Function Documentation

◆ gnrc_ipv6_ext_opt_process()

gnrc_pktsnip_t* gnrc_ipv6_ext_opt_process ( gnrc_pktsnip_t pkt,
uint8_t  protnum 
)

Processes all options within an IPv6 option header.

Precondition
pkt != NULL
(protnum == PROTNUM_IPV6_EXT_HOPOPT) || (protnum == PROTNUM_IPV6_EXT_DST)
Parameters
[in]pktThe packet containing the option header. The option must be contained in the first snip, with all preceding headers marked (in receive order). Must not be NULL.
[in]protnumThe protocol number of the option header. Must be PROTNUM_IPV6_EXT_HOPOPT or PROTNUM_IPV6_EXT_DST
Returns
pkt with the option header marked on success.
NULL, if the packet was consumed by the option handling.
NULL, on error. pkt is released with EINVAL in that case and if necessary and `gnrc_icmpv6_error` is used, the according ICMPv6 error message is sent.