Skip to content

Commit 4f5c020

Browse files
committed
sync with lwip2:
remove dead code add (*phy_capture)() for input/output packet capture add lwip_unhandled_packet() weak empty function
1 parent ceb5ba7 commit 4f5c020

File tree

6 files changed

+25
-5
lines changed

6 files changed

+25
-5
lines changed

tools/sdk/lib/liblwip2.a

16.4 KB
Binary file not shown.

tools/sdk/lib/liblwip2_1460.a

16.4 KB
Binary file not shown.

tools/sdk/lwip2/include/gluedebug.h

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#ifndef __GLUE_DEBUG_H
33
#define __GLUE_DEBUG_H
44

5+
// this file is commonly included by both sides of the glue
56
/////////////////////////////////////////////////////////////////////////////
67
// user-definable
78

@@ -27,6 +28,15 @@
2728
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON)
2829
#endif
2930

31+
/////////////////////////////////////////////////////////////////////////////
32+
// packet capture callback from esp side
33+
#include <stdlib.h>
34+
35+
#ifdef __cplusplus
36+
extern "C"
37+
#endif
38+
void (*phy_capture) (int netif_idx, const char* data, size_t len, int out, int success);
39+
3040
/////////////////////////////////////////////////////////////////////////////
3141

3242
#if UDEBUG && UDEBUGSTORE
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// generated by makefiles/make-lwip2-hash
22
#ifndef LWIP_HASH_H
33
#define LWIP_HASH_H
4-
#define LWIP_HASH_STR "STABLE-2_0_3_RELEASE/glue:arduino-2.4.1-3-g24eb8d4"
4+
#define LWIP_HASH_STR "STABLE-2_0_3_RELEASE/glue:arduino-2.4.1-7-g2b827f8"
55
#endif // LWIP_HASH_H

tools/sdk/lwip2/include/lwipopts.h

+13-3
Original file line numberDiff line numberDiff line change
@@ -2688,9 +2688,11 @@
26882688
* Return ERR_OK if packet is accepted, any error code otherwise.
26892689
* Payload points to ethernet header!
26902690
*/
2691-
#ifdef __DOXYGEN__
2692-
#define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif)
2693-
#endif
2691+
//#ifdef __DOXYGEN__
2692+
//#define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif)
2693+
//#endif
2694+
#define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) lwip_unhandled_packet((pbuf), (netif))
2695+
26942696
/**
26952697
* @}
26962698
*/
@@ -3003,4 +3005,12 @@
30033005
#include "lwip-git-hash.h"
30043006
#include <sys/time.h> // settimeofday() + struct timeval
30053007

3008+
// allow to handle special packets (user redefinable)
3009+
struct pbuf;
3010+
struct netif;
3011+
#ifndef LWIP_ERR_T
3012+
#define LWIP_ERR_T s8
3013+
#endif
3014+
LWIP_ERR_T lwip_unhandled_packet (struct pbuf* pbuf, struct netif* netif) __attribute__((weak));
3015+
30063016
#endif // MYLWIPOPTS_H

0 commit comments

Comments
 (0)