STM32F7 Ethernet interface for nucleo STM32F767

Embed: (wiki syntax)

« Back to documentation index

lwip_ip6_frag.c File Reference

lwip_ip6_frag.c File Reference

IPv6 fragmentation and reassembly. More...

Go to the source code of this file.

Functions

static void ip6_reass_free_complete_datagram (struct ip6_reassdata *ipr)
 Free a datagram (struct ip6_reassdata) and all its pbufs.
static void ip6_reass_remove_oldest_datagram (struct ip6_reassdata *ipr, int pbufs_needed)
 Free the oldest datagram to make room for enqueueing new fragments.
struct pbufip6_reass (struct pbuf *p)
 Reassembles incoming IPv6 fragments into an IPv6 datagram.
static struct pbuf_custom_refip6_frag_alloc_pbuf_custom_ref (void)
 Allocate a new struct pbuf_custom_ref.
static void ip6_frag_free_pbuf_custom_ref (struct pbuf_custom_ref *p)
 Free a struct pbuf_custom_ref.
static void ip6_frag_free_pbuf_custom (struct pbuf *p)
 Free-callback function to free a 'struct pbuf_custom_ref', called by pbuf_free.
err_t ip6_frag (struct pbuf *p, struct netif *netif, const ip6_addr_t *dest)
 Fragment an IPv6 datagram if too large for the netif or path MTU.

Detailed Description

IPv6 fragmentation and reassembly.

Definition in file lwip_ip6_frag.c.


Function Documentation

err_t ip6_frag ( struct pbuf p,
struct netif netif,
const ip6_addr_t dest 
)

Fragment an IPv6 datagram if too large for the netif or path MTU.

Chop the datagram in MTU sized chunks and send them in order by pointing PBUF_REFs into p

Parameters:
pipv6 packet to send
netifthe netif on which to send
destdestination ipv6 address to which to send
Returns:
ERR_OK if sent successfully, err_t otherwise

Definition at line 660 of file lwip_ip6_frag.c.

static struct pbuf_custom_ref* ip6_frag_alloc_pbuf_custom_ref ( void   ) [static, read]

Allocate a new struct pbuf_custom_ref.

Definition at line 619 of file lwip_ip6_frag.c.

static void ip6_frag_free_pbuf_custom ( struct pbuf p ) [static]

Free-callback function to free a 'struct pbuf_custom_ref', called by pbuf_free.

Definition at line 635 of file lwip_ip6_frag.c.

static void ip6_frag_free_pbuf_custom_ref ( struct pbuf_custom_ref p ) [static]

Free a struct pbuf_custom_ref.

Definition at line 626 of file lwip_ip6_frag.c.

struct pbuf* ip6_reass ( struct pbuf p ) [read]

Reassembles incoming IPv6 fragments into an IPv6 datagram.

Parameters:
ppoints to the IPv6 Fragment Header
Returns:
NULL if reassembly is incomplete, pbuf pointing to IPv6 Header if reassembly is complete

Definition at line 259 of file lwip_ip6_frag.c.

static void ip6_reass_free_complete_datagram ( struct ip6_reassdata ipr ) [static]

Free a datagram (struct ip6_reassdata) and all its pbufs.

Updates the total count of enqueued pbufs (ip6_reass_pbufcount), sends an ICMP time exceeded packet.

Parameters:
iprdatagram to free

Definition at line 146 of file lwip_ip6_frag.c.

static void ip6_reass_remove_oldest_datagram ( struct ip6_reassdata ipr,
int  pbufs_needed 
) [static]

Free the oldest datagram to make room for enqueueing new fragments.

The datagram ipr is not freed!

Parameters:
iprip6_reassdata for the current fragment
pbufs_needednumber of pbufs needed to enqueue (used for freeing other datagrams if not enough space)

Definition at line 223 of file lwip_ip6_frag.c.