GNRC's IPv6 implementation. More...

Detailed Description

The IPv6 control thread understands messages of type

Modules

 ICMPv6
 GNRC's implementation of ICMPv6.
 
 IPv6 address blacklist
 This refuses IPv6 addresses that are defined in this list.
 
 IPv6 address whitelist
 This allows you to only accept IPv6 addresses that are defined in this list.
 
 IPv6 extension headers.
 Implementation of IPv6 extension headers.
 
 IPv6 header defintions
 
 IPv6 neighbor cache
 Translates IPv6 addresses to link layer addresses.
 
 IPv6 network interfaces
 IPv6 specific information on Network interfaces.
 
 Neighbor Information Base for IPv6
 Neighbor Information Base (NIB) for IPv6.
 

Files

file  gnrc/ipv6.h
 Definitions for GNRC's IPv6 implementation.
 

Macros

#define GNRC_IPV6_STACK_SIZE   (THREAD_STACKSIZE_DEFAULT)
 Default stack size to use for the IPv6 thread.
 
#define GNRC_IPV6_PRIO   (THREAD_PRIORITY_MAIN - 3)
 Default priority for the IPv6 thread.
 
#define GNRC_IPV6_MSG_QUEUE_SIZE   (8U)
 Default message queue size to use for the IPv6 thread.
 
#define GNRC_IPV6_STATIC_LLADDR
 Add a static IPv6 link local address to any network interface. More...
 

Functions

kernel_pid_t gnrc_ipv6_init (void)
 Initialization of the IPv6 thread. More...
 
void gnrc_ipv6_demux (kernel_pid_t iface, gnrc_pktsnip_t *current, gnrc_pktsnip_t *pkt, uint8_t nh)
 Demultiplexes a packet according to nh.
 
ipv6_hdr_tgnrc_ipv6_get_header (gnrc_pktsnip_t *pkt)
 Get the IPv6 header from a given list of gnrc_pktsnip_t. More...
 

Variables

kernel_pid_t gnrc_ipv6_pid
 The PID to the IPv6 thread. More...
 

Macro Definition Documentation

◆ GNRC_IPV6_STATIC_LLADDR

#define GNRC_IPV6_STATIC_LLADDR

This macro allows to specify a certain link local IPv6 address to be assigned to a network interface on startup, which might be handy for testing. Note: a) a interface will keep its auto-generated link local address, too b) the address is incremented by 1, if multiple interfaces are present

To use the macro just add it to CFLAGS in the application's Makefile, like:

IPV6_STATIC_LLADDR ?= '"fe80::cafe:cafe:cafe:1"'
CFLAGS += -DGNRC_IPV6_STATIC_LLADDR=$(STATIC_IPV6_LLADDR)

Definition at line 87 of file gnrc/ipv6.h.

Function Documentation

◆ gnrc_ipv6_get_header()

ipv6_hdr_t* gnrc_ipv6_get_header ( gnrc_pktsnip_t pkt)

This function may be used with e.g. a pointer to a (full) UDP datagram.

Parameters
[in]pktThe pointer to the first gnrc_pktsnip_t of the packet.
Returns
A pointer to the ipv6_hdr_t of the packet.
NULL if the packet does not contain an IPv6 header.

◆ gnrc_ipv6_init()

kernel_pid_t gnrc_ipv6_init ( void  )
Returns
The PID to the IPv6 thread, on success.
a negative errno on error.
-EOVERFLOW, if there are too many threads running already
-EEXIST, if IPv6 was already initialized.

Variable Documentation

◆ gnrc_ipv6_pid

kernel_pid_t gnrc_ipv6_pid
Note
Use gnrc_ipv6_init() to initialize. Do not set by hand.

This variable is preferred for IPv6 internal communication only. Please use Network protocol registry for external communication.