#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/pbuf.h"
#include "lwip/netif.h"
#include "lwip/ip_addr.h"
#include "lwip/ip.h"
Data Structures | |
struct | pbuf_custom_ref |
A custom pbuf that holds a reference to another pbuf, which is freed when this custom pbuf is freed. More... | |
Functions | |
err_t | ip_frag (struct pbuf *p, struct netif *netif, ip_addr_t *dest) |
Fragment an IP datagram if too large for the netif. More... | |
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 |
References pbuf_custom::custom_free_function, ERR_MEM, ERR_OK, htons, if(), inet_chksum(), ip_frag(), ip_frag_alloc_pbuf_custom_ref(), ip_frag_free_pbuf_custom_ref(), IP_HLEN, IP_MF, IP_OFFMASK, IP_REASS_DEBUG, ipfrag_free_pbuf_custom(), IPFRAG_STATS_INC, IPH_CHKSUM_SET, IPH_LEN_SET, IPH_OFFSET, IPH_OFFSET_SET, iphdr, pbuf::len, LWIP_ASSERT, LWIP_DEBUGF, LWIP_MEM_ALIGN, netif::mtu, pbuf::next, ntohs, NULL, pbuf_custom_ref::original, netif::output, pbuf::payload, pbuf_alloc(), pbuf_alloced_custom(), pbuf_cat(), pbuf_chain(), pbuf_copy_partial(), pbuf_free(), pbuf_header(), PBUF_IP, PBUF_LINK, PBUF_RAM, PBUF_RAW, pbuf_realloc(), PBUF_REF, pbuf_ref(), pbuf_custom_ref::pc, SMEMCPY, snmp_inc_ipfragcreates, snmp_inc_ipfragoks, and pbuf::tot_len.
Referenced by ip_frag().