Implementation of IPv6 extension headers. More...
Implementation of IPv6 extension headers.
Modules | |
GNRC IPv6 extension header compile configurations | |
Support for IPv6 fragmentation extension | |
GNRC implementation of IPv6 fragmentation extension. | |
Support for IPv6 option extension headers | |
GNRC implementation of IPv6 hop-by-hop and destination option header extension. | |
Support for IPv6 routing header extension | |
GNRC implementation of IPv6 routing header extension. | |
Files | |
file | ext.h |
Definititions for IPv6 extension headers. | |
Functions | |
gnrc_pktsnip_t * | gnrc_ipv6_ext_build (gnrc_pktsnip_t *ipv6, gnrc_pktsnip_t *next, uint8_t nh, size_t size) |
Builds an extension header for sending. More... | |
gnrc_pktsnip_t * | gnrc_ipv6_ext_process_hopopt (gnrc_pktsnip_t *pkt, uint8_t *protnum) |
Processes a packet's payload as hop-by-hop option if protnum is pointing to a value equal to PROTNUM_IPV6_EXT_HOPOPT. More... | |
gnrc_pktsnip_t * | gnrc_ipv6_ext_process_all (gnrc_pktsnip_t *pkt, uint8_t *protnum) |
Processes a packet's extension headers after a potential initial hop-by-hop header. More... | |
gnrc_pktsnip_t* gnrc_ipv6_ext_build | ( | gnrc_pktsnip_t * | ipv6, |
gnrc_pktsnip_t * | next, | ||
uint8_t | nh, | ||
size_t | size | ||
) |
Builds an extension header for sending.
[in] | ipv6 | The IPv6 header. Can be NULL. |
[in] | next | The next header. Must be a successor to ipv6 if it is not NULL. |
[in] | nh | Protocol Numbers of the next header. |
[in] | size | Size of the extension header. |
gnrc_pktsnip_t* gnrc_ipv6_ext_process_all | ( | gnrc_pktsnip_t * | pkt, |
uint8_t * | protnum | ||
) |
Processes a packet's extension headers after a potential initial hop-by-hop header.
pkt
. If a hop-by-hop option is found in gnrc_pktsnip_t::data of pkt
, the function will return an error.[in] | pkt | An IPv6 packet in receive order. |
[in,out] | protnum | In: The Protocol Numbers of gnrc_pktsnip_t::data of pkt (i.e. the first extension header to be processed). Out: The Protocol Numbers of header in gnrc_pktsnip_t::data of pkt . The extension headers are now marked, so their data can be found in gnrc_pktsnip_t::next of pkt and the following. If the return value is NULL, the value of protnum is undefined. |
pkt
with all extension headers marked until the first non-extension header. pkt
is released with EINVAL in that case. gnrc_pktsnip_t* gnrc_ipv6_ext_process_hopopt | ( | gnrc_pktsnip_t * | pkt, |
uint8_t * | protnum | ||
) |
Processes a packet's payload as hop-by-hop option if protnum
is pointing to a value equal to PROTNUM_IPV6_EXT_HOPOPT.
pkt
.[in] | pkt | An IPv6 packet in receive order. It assumed that gnrc_pktsnip_t::data points to a hop-by-hop option when protnum points to value equal to PROTNUM_IPV6_EXT_HOPOPT. |
[in,out] | protnum | In: The Protocol Numbers of gnrc_pktsnip_t::data of pkt . Out: If protnum was PROTNUM_IPV6_EXT_HOPOPT on in and the return value is not NULL it points to the value of the next header field of the processed hop-by-hop option header. Since the hop-by-hop option header is now marked, gnrc_pktsnip_t::data of pkt will then be identified by protnum . If protnum was PROTNUM_IPV6_EXT_HOPOPT on in and the return value is NULL the value protnum is pointing to is undefined. If protnum unequal to PROTNUM_IPV6_EXT_HOPOPT on in the value protnum is pointing to remains unchanged. |
pkt
with the hop-by-hop option marked on success. pkt
is released with EINVAL in that case.