gnrc/ipv6.h¶
Definitions for GNRC’s IPv6 implementation.
-
GNRC_IPV6_STACK_SIZE¶ Default stack size to use for the IPv6 thread.
1
(THREAD_STACKSIZE_DEFAULT)
-
GNRC_IPV6_PRIO¶ Default priority for the IPv6 thread.
1
(THREAD_PRIORITY_MAIN - 3)
-
GNRC_IPV6_MSG_QUEUE_SIZE¶ Default message queue size to use for the IPv6 thread.
1
(8U)
-
GNRC_IPV6_STATIC_LLADDR¶ Add a static IPv6 link local address to any network interface.
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
CFLAGSin the application’s Makefile, like:1 2
IPV6_STATIC_LLADDR ?= '"fe80::cafe:cafe:cafe:1"' CFLAGS += -DGNRC_IPV6_STATIC_LLADDR=$(STATIC_IPV6_LLADDR)
-
kernel_types.h::kernel_pid_tgnrc_ipv6_pid¶ The PID to the IPv6 thread.
This variable is preferred for IPv6 internal communication only. Please use Network protocol registry for external communication.Note
Use
gnrc/ipv6.h::gnrc_ipv6_init()to initialize. Do not set by hand.
-
kernel_types.h::kernel_pid_tgnrc_ipv6_init(void)¶ Initialization of the IPv6 thread.
Return values
- 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.
-
void
gnrc_ipv6_demux(gnrc_netif_t * netif,include/net/gnrc/pkt.h::gnrc_pktsnip_t* current,include/net/gnrc/pkt.h::gnrc_pktsnip_t* pkt, uint8_t nh)¶ Demultiplexes a packet according to
nh.
-
ipv6_hdr_t *
gnrc_ipv6_get_header(include/net/gnrc/pkt.h::gnrc_pktsnip_t* pkt)¶ Get the IPv6 header from a given list of
include/net/gnrc/pkt.h::gnrc_pktsnip_t.This function may be used with e.g. a pointer to a (full) UDP datagram.
Parameters
pkt: The pointer to the first include/net/gnrc/pkt.h::gnrc_pktsnip_tof the packet.Return values
- A pointer to the ipv6_hdr_t of the packet.
- NULL if the packet does not contain an IPv6 header.