24 lines
714 B
C
24 lines
714 B
C
#ifndef LWIP_HDR_LWIPOPTS_MEMBRANE_H
|
|
#define LWIP_HDR_LWIPOPTS_MEMBRANE_H
|
|
|
|
// 1. Run in the App's Thread
|
|
#define NO_SYS 1
|
|
#define LWIP_TIMERS 1
|
|
|
|
// 2. Use the App's Heap (Polkadot has a heap!)
|
|
#define MEM_LIBC_MALLOC 1
|
|
#define MEMP_MEM_MALLOC 1
|
|
#define MEM_ALIGNMENT 64
|
|
|
|
// 3. Performance (Fast Path)
|
|
#define TCP_MSS 1460
|
|
#define TCP_WND (16 * TCP_MSS) // Larger window for high throughput
|
|
#define LWIP_TCP_KEEPALIVE 1
|
|
|
|
// 4. Disable System Features
|
|
#define LWIP_NETCONN 0 // We use Raw API
|
|
#define LWIP_SOCKET 0 // We implement our own Shim
|
|
#define LWIP_STATS 0 // Save cycles
|
|
|
|
#endif
|