Virtual reassembly buffer. More...

Detailed Description

Virtual reassembly buffer.

Files

file  vrb.h
 Virtual reassembly buffer definitions.
 

Data Structures

struct  gnrc_sixlowpan_frag_vrb_t
 Representation of the virtual reassembly buffer entry. More...
 

Functions

gnrc_sixlowpan_frag_vrb_tgnrc_sixlowpan_frag_vrb_add (const gnrc_sixlowpan_frag_rb_base_t *base, gnrc_netif_t *out_netif, const uint8_t *out_dst, size_t out_dst_len)
 Adds a new reassembly buffer entry. More...
 
gnrc_sixlowpan_frag_vrb_tgnrc_sixlowpan_frag_vrb_from_route (const gnrc_sixlowpan_frag_rb_base_t *base, gnrc_netif_t *netif, const gnrc_pktsnip_t *hdr)
 Generate reassembly buffer from a header's forwarding information. More...
 
void gnrc_sixlowpan_frag_vrb_gc (void)
 Checks timeouts and removes entries if necessary.
 
gnrc_sixlowpan_frag_vrb_tgnrc_sixlowpan_frag_vrb_get (const uint8_t *src, size_t src_len, unsigned src_tag)
 Gets a VRB entry. More...
 
static void gnrc_sixlowpan_frag_vrb_rm (gnrc_sixlowpan_frag_vrb_t *vrb)
 Removes an entry from the VRB. More...
 
static bool gnrc_sixlowpan_frag_vrb_entry_empty (gnrc_sixlowpan_frag_vrb_t *vrb)
 Determines if a VRB entry is empty. More...
 
void gnrc_sixlowpan_frag_vrb_reset (void)
 Resets the VRB to a clean state. More...
 

Function Documentation

◆ gnrc_sixlowpan_frag_vrb_add()

gnrc_sixlowpan_frag_vrb_t* gnrc_sixlowpan_frag_vrb_add ( const gnrc_sixlowpan_frag_rb_base_t base,
gnrc_netif_t out_netif,
const uint8_t *  out_dst,
size_t  out_dst_len 
)

Adds a new reassembly buffer entry.

Parameters
[in]baseBase data of the datagram. Must not be NULL.
[in]out_netifNetwork interface that is out-going to out_dst.
[in]out_dstLink-layer destination address to which to forward fragments identified by base. Must not be NULL.
[in]out_dst_lenLength of out_dst. Must be greater than 0.
Precondition
base != NULL
out_dst != NULL
out_dst_len > 0
Returns
A new VRB entry.
NULL, if VRB is full.

◆ gnrc_sixlowpan_frag_vrb_entry_empty()

static bool gnrc_sixlowpan_frag_vrb_entry_empty ( gnrc_sixlowpan_frag_vrb_t vrb)
inlinestatic

Determines if a VRB entry is empty.

Parameters
[in]vrbA VRB entry
Returns
true, if vrb entry is empty.
false, if vrb entry is not empty.

Definition at line 141 of file vrb.h.

◆ gnrc_sixlowpan_frag_vrb_from_route()

gnrc_sixlowpan_frag_vrb_t* gnrc_sixlowpan_frag_vrb_from_route ( const gnrc_sixlowpan_frag_rb_base_t base,
gnrc_netif_t netif,
const gnrc_pktsnip_t hdr 
)

Generate reassembly buffer from a header's forwarding information.

Parameters
[in]baseBase data of the datagram. Must not be NULL.
[in]netifRestict route to this interface. May be NULL for any interface.
[in]hdrHeader from which to take the forwarding information from (e.g. IPv6 header implies hdr->type == GNRC_NETTYPE_IPV6).
Precondition
base != NULL
(hdr != NULL) && (hdr->data != NULL) && (hdr->size > 0)
Returns
The VRB entry pointing to the next hop based on the forwarding information provided in hdr and present in the respective forwarding information base for hdr->type.
NULL, if VRB is full or if there is no route to destination in hdr.

◆ gnrc_sixlowpan_frag_vrb_get()

gnrc_sixlowpan_frag_vrb_t* gnrc_sixlowpan_frag_vrb_get ( const uint8_t *  src,
size_t  src_len,
unsigned  src_tag 
)

Gets a VRB entry.

Parameters
[in]srcLink-layer source address of the original fragment.
[in]src_lenLength of src.
[in]src_tagTag of the original fragment.
Returns
The VRB entry identified by the given parameters.
NULL, if there is no entry in the VRB that could be identified by the given parameters.

◆ gnrc_sixlowpan_frag_vrb_reset()

void gnrc_sixlowpan_frag_vrb_reset ( void  )

Resets the VRB to a clean state.

Note
Only available when TEST_SUITES is defined

◆ gnrc_sixlowpan_frag_vrb_rm()

static void gnrc_sixlowpan_frag_vrb_rm ( gnrc_sixlowpan_frag_vrb_t vrb)
inlinestatic

Removes an entry from the VRB.

Parameters
[in]vrbA VRB entry

Definition at line 125 of file vrb.h.