Loading...
Searching...
No Matches

Provides minimal fragment forwarding using the VRB. More...

Detailed Description

Provides minimal fragment forwarding using the VRB.

See also
RFC 8930
Virtual reassembly buffer
Warning
This feature is experimental!

Files

file  minfwd.h
 Minimal fragment forwarding definitions.
 

Functions

int gnrc_sixlowpan_frag_minfwd_forward (gnrc_pktsnip_t *pkt, const sixlowpan_frag_n_t *frag, gnrc_sixlowpan_frag_vrb_t *vrbe, unsigned page)
 Forwards a fragment according to a VRB entry.
 
int gnrc_sixlowpan_frag_minfwd_frag_iphc (gnrc_pktsnip_t *pkt, size_t orig_datagram_size, const ipv6_addr_t *ipv6_addr, gnrc_sixlowpan_frag_fb_t *fbuf)
 Fragments a packet with just the IPHC (and padding payload to get to 8 byte) as the first fragment.
 

Function Documentation

◆ gnrc_sixlowpan_frag_minfwd_forward()

int gnrc_sixlowpan_frag_minfwd_forward ( gnrc_pktsnip_t pkt,
const sixlowpan_frag_n_t frag,
gnrc_sixlowpan_frag_vrb_t vrbe,
unsigned  page 
)

Forwards a fragment according to a VRB entry.

Parameters
[in]pktThe fragment to forward (without fragmentation header). Is consumed by this function.
[in]fragThe originally received fragmentation header.
[in]vrbeVirtual reassembly buffer containing the forwarding information. Removed when datagram was completely forwarded.
[in]pageCurrent 6Lo dispatch parsing page.
Precondition
vrbe != NULL
pkt != NULL
frag != NULL
Returns
0 on success.
-ENOMEM, when packet buffer is too full to prepare packet for forwarding.

◆ gnrc_sixlowpan_frag_minfwd_frag_iphc()

int gnrc_sixlowpan_frag_minfwd_frag_iphc ( gnrc_pktsnip_t pkt,
size_t  orig_datagram_size,
const ipv6_addr_t ipv6_addr,
gnrc_sixlowpan_frag_fb_t fbuf 
)

Fragments a packet with just the IPHC (and padding payload to get to 8 byte) as the first fragment.

Precondition
(frag_msg != NULL)
(pkt != NULL) && (pkt->type == GNRC_NETTYPE_NETIF)
(pkt->next != NULL) && (pkt->next->type == GNRC_NETTYPE_SIXLOWPAN)
Parameters
[in]pktThe compressed packet to be sent. Must be in send order with a packet snip of type GNRC_NETTYPE_NETIF first, GNRC_NETTYPE_SIXLOWPAN (the IPHC header including NHC) second, and 0 or more snips of payload.
[in]orig_datagram_sizeThe size of the pkt before compression (without GNRC_NETTYPE_NETIF snip). This can differ from frag_msg's gnrc_sixlowpan_msg_frag_t::datagram_size as it might just be a fragment in forwarding that is re-compressed in pkt.
[in]ipv6_addrThe (uncompressed) destination address of pkt.
[in]fbufA fragmentation buffer entry.
Returns
0, when fragmentation was successful
-1, on error. pkt is not released in that case and should be handled by normal fragmentation.