ip6_frag.h File Reference
`#include "lwip/opt.h"`
`#include "lwip/pbuf.h"`
`#include "lwip/ip6_addr.h"`
`#include "lwip/ip6.h"`
`#include "lwip/netif.h"`

## Data Structures

struct | ip6_reassdata
struct | pbuf_custom_ref

## Macros

#define | IP6_REASS_TMR_INTERVAL 1000
#define | IPV6_FRAG_COPYHEADER 0

## Functions

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

## Detailed Description

IPv6 fragmentation and reassembly.

## Macro Definition Documentation

## IP6_REASS_TMR_INTERVAL

#define IP6_REASS_TMR_INTERVAL 1000

The IPv6 reassembly timer interval in milliseconds.

## IPV6_FRAG_COPYHEADER

#define IPV6_FRAG_COPYHEADER 0

IP6_FRAG_COPYHEADER==1: for platforms where sizeof(void*) > 4, "struct ip6_reass_helper" is too large to be stored in the IPv6 fragment header, and will bleed into the header before it, which may be the IPv6 header or an extension header. This means that for each first fragment packet, we need to 1) make a copy of some IPv6 header fields (src+dest) that we need later on, just in case we do overwrite part of the IPv6 header, and 2) make a copy of the header data that we overwrote, so that we can restore it before either completing reassembly or sending an ICMPv6 reply. The last part is true even if this setting is disabled, but if it is enabled, we need to save a bit more data (up to the size of a pointer) because we overwrite more.

## Function Documentation

## ip6_frag()

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

  p | ipv6 packet to send
  netif | the netif on which to send
  dest | destination ipv6 address to which to send

Returns
  ERR_OK if sent successfully, err_t otherwise

## ip6_reass()

struct pbuf* ip6_reass | ( | struct pbuf * | p | ) |

Reassembles incoming IPv6 fragments into an IPv6 datagram.

Parameters

  p | points to the IPv6 Fragment Header

Returns
  NULL if reassembly is incomplete, pbuf pointing to IPv6 Header if reassembly is complete