lwIP
2.1.0
Lightweight IP stack
|
#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) |
IPv6 fragmentation and reassembly.
#define IP6_REASS_TMR_INTERVAL 1000 |
The IPv6 reassembly timer interval in milliseconds.
#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.
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
p | ipv6 packet to send |
netif | the netif on which to send |
dest | destination ipv6 address to which to send |