#include "lwip/opt.h"
#include "lwip/ip_frag.h"
#include "lwip/ip.h"
#include "lwip/inet.h"
#include "lwip/inet_chksum.h"
#include "lwip/netif.h"
#include "lwip/snmp.h"
#include "lwip/stats.h"
#include "lwip/icmp.h"
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | ip_reass_helper |
Defines | |
#define | IP_REASS_FLAG_LASTFRAG 0x01 |
#define | IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB) |
Functions | |
void | ip_reass_tmr (void) |
struct pbuf * | ip_reass (struct pbuf *p) |
err_t | ip_frag (struct pbuf *p, struct netif *netif, struct ip_addr *dest) |
Variables | |
PACK_STRUCT_BEGIN struct ip_reass_helper | PACK_STRUCT_STRUCT |
This is the IPv4 packet segmentation and reassembly implementation.
Definition in file ip_frag.c.
#define IP_ADDRESSES_AND_ID_MATCH | ( | iphdrA, | ||
iphdrB | ||||
) |
#define IP_REASS_FLAG_LASTFRAG 0x01 |
The IP reassembly code currently has the following limitations:
Setting this to 0, you can turn off checking the fragments for overlapping regions. The code gets a little smaller. Only use this if you know that overlapping won't occur on your network! Set to 0 to prevent freeing the oldest datagram when the reassembly buffer is full (IP_REASS_MAX_PBUFS pbufs are enqueued). The code gets a little smaller. Datagrams will be freed by timeout only. Especially useful when MEMP_NUM_REASSDATA is set to 1, so one datagram can be reassembled at a time, only.
Fragment an IP datagram if too large for the netif.
Chop the datagram in MTU sized chunks and send them in order by using a fixed size static memory buffer (PBUF_REF) or point PBUF_REFs into p (depending on IP_FRAG_USES_STATIC_BUF).
p | ip packet to send | |
netif | the netif on which to send | |
dest | destination ip address to which to send |
Definition at line 628 of file ip_frag.c.
void ip_reass_tmr | ( | void | ) |
PACK_STRUCT_BEGIN struct etharp_hdr PACK_STRUCT_STRUCT |
This is a helper struct which holds the starting offset and the ending offset of this fragment to easily chain the fragments. It has to be packed since it has to fit inside the IP header.
the ARP message