6LoWPAN Fragmentation¶
6LoWPAN Fragmentation headers and functionality
See also
-
GNRC_SIXLOWPAN_MSG_FRAG_SND
¶ Message type for passing one 6LoWPAN fragment down the network stack.
1
(0x0225)
-
GNRC_SIXLOWPAN_MSG_FRAG_GC_RBUF
¶ Message type for triggering garbage collection reassembly buffer.
1
(0x0226)
-
gnrc_sixlowpan_msg_frag_t *
gnrc_sixlowpan_msg_frag_get
(void)¶ Allocates a gnrc_sixlowpan_msg_frag_t object.
Return values
- A gnrc_sixlowpan_msg_frag_t if available
- NULL, otherwise
-
void
gnrc_sixlowpan_frag_send
(include/net/gnrc/pkt.h::gnrc_pktsnip_t
* pkt, void * ctx, unsigned page)¶ Sends a packet fragmented.
Parameters
pkt: A packet. May be NULL. ctx: Message containing status of the 6LoWPAN fragmentation progress. Expected to be of type gnrc_sixlowpan_msg_frag_t, with gnrc_sixlowpan_msg_frag_t set to pkt
. Must not be NULL.page: Current 6Lo dispatch parsing page.
-
void
gnrc_sixlowpan_frag_recv
(include/net/gnrc/pkt.h::gnrc_pktsnip_t
* pkt, void * ctx, unsigned page)¶ Handles a packet containing a fragment header.
Parameters
pkt: The packet to handle ctx: Context for the packet. May be NULL. page: Current 6Lo dispatch parsing page.
-
void
gnrc_sixlowpan_frag_rbuf_gc
(void)¶ Garbage collect reassembly buffer.
-
void
gnrc_sixlowpan_frag_rbuf_remove
(gnrc_sixlowpan_rbuf_t * rbuf)¶ Removes an entry from the reassembly buffer.
Parameters
rbuf: A reassembly buffer entry. Must not be NULL.
-
void
gnrc_sixlowpan_frag_rbuf_dispatch_when_complete
(gnrc_sixlowpan_rbuf_t * rbuf, gnrc_netif_hdr_t * netif)¶ Checks if a reassembly buffer entry is complete and dispatches it to the next layer if that is the case.
Parameters
rbuf: A reassembly buffer entry. Must not be NULL. netif: Original gnrc_netif_hdr_t of the last received frame. Used to construct the gnrc_netif_hdr_t of the completed datagram. Must not be NULL.
-
struct
gnrc_sixlowpan_rbuf_t
¶ An entry in the 6LoWPAN reassembly buffer.
A recipient of a fragment SHALL use
- the source address,
- the destination address,
- the datagram size (
include/net/gnrc/pkt.h::gnrc_pktsnip::size
of rbuf_t::pkt), and - the datagram tag
to identify all fragments that belong to the given datagram.
See also
-
include/net/gnrc/pkt.h::gnrc_pktsnip_t
*pkt
¶ The reassembled packet in the packet buffer.
-
uint8_t
src
()¶ source address
-
uint8_t
dst
()¶ destination address
-
uint8_t
src_len
¶ length of
frag.h::gnrc_sixlowpan_rbuf_t::src
-
uint8_t
dst_len
¶ length of
frag.h::gnrc_sixlowpan_rbuf_t::dst
-
uint16_t
tag
¶ the datagram’s tag
-
uint16_t
current_size
¶ The number of bytes currently received of the complete datagram.
-
struct
gnrc_sixlowpan_msg_frag_t
¶ Definition of 6LoWPAN fragmentation type.
-
include/net/gnrc/pkt.h::gnrc_pktsnip_t
*pkt
¶ Pointer to the IPv6 packet to be fragmented.
-
msp430_types.h::size_t
datagram_size
¶ Length of just the (uncompressed) IPv6 packet to be fragmented.
-
uint16_t
offset
¶ Offset of the Nth fragment from the beginning of the payload datagram.
-
kernel_types.h::kernel_pid_t
pid
¶ PID of the interface.
-