mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 06:36:51 +08:00
opt.h, ip_frag.c, ip_frag.h, ip.c: Added option IP_FRAG_USES_STATIC_BUF (defaulting to off for now) that can be set to 0 to send fragmented packets by passing PBUF_REFs down the stack.
This commit is contained in:
@@ -39,24 +39,25 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
|
||||
#if (IP_FRAG || IP_REASSEMBLY)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The IP timer interval in milliseconds. */
|
||||
#if IP_REASSEMBLY
|
||||
/* The IP reassembly timer interval in milliseconds. */
|
||||
#define IP_TMR_INTERVAL 1000
|
||||
|
||||
void ip_frag_init(void);
|
||||
void ip_reass_init(void);
|
||||
void ip_reass_tmr(void);
|
||||
struct pbuf * ip_reass(struct pbuf *p);
|
||||
#endif /* IP_REASSEMBLY */
|
||||
|
||||
#if IP_FRAG
|
||||
err_t ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest);
|
||||
#endif /* IP_FRAG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IP_FRAG || IP_REASSEMBLY */
|
||||
|
||||
#endif /* __LWIP_IP_FRAG_H__ */
|
||||
|
||||
@@ -264,8 +264,18 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#define IP_REASS_BUFSIZE 5760
|
||||
#endif
|
||||
|
||||
/* Use a static MTU-sized buffer for IP fragmentation.
|
||||
|
||||
* Otherwise pbufs are allocated and reference the original
|
||||
* packet data to be fragmented.
|
||||
|
||||
*/
|
||||
#ifndef IP_FRAG_USES_STATIC_BUF
|
||||
#define IP_FRAG_USES_STATIC_BUF 1
|
||||
#endif
|
||||
|
||||
/* Assumed max MTU on any interface for IP frag buffer */
|
||||
#ifndef IP_FRAG_MAX_MTU
|
||||
#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU)
|
||||
#define IP_FRAG_MAX_MTU 1500
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user