[net][lwip] lwip hook functions are provided to provide greater flexibility for unknown Ethernet protocols
This commit is contained in:
parent
a939e8e4ea
commit
13a6c5201d
|
@ -281,6 +281,10 @@ if RT_USING_LWIP
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
config RT_LWIP_ENABLE_USER_HOOKS
|
||||||
|
bool "Enable user-defined LWIP hooks"
|
||||||
|
default n
|
||||||
|
|
||||||
menuconfig RT_LWIP_DEBUG
|
menuconfig RT_LWIP_DEBUG
|
||||||
bool "Enable lwIP Debugging Options"
|
bool "Enable lwIP Debugging Options"
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -654,4 +654,15 @@
|
||||||
#endif
|
#endif
|
||||||
#endif /* RT_USING_LWIP_VER_NUM >= 0x20000 */
|
#endif /* RT_USING_LWIP_VER_NUM >= 0x20000 */
|
||||||
|
|
||||||
|
#if RT_LWIP_ENABLE_USER_HOOKS
|
||||||
|
/**
|
||||||
|
* This hook provides flexibility for handling unknown Ethernet protocols.
|
||||||
|
*
|
||||||
|
* For example, you can define how to handle packets of unknown types,
|
||||||
|
* such as forwarding them to another interface, discarding them,
|
||||||
|
* or passing them to an application for further processing.
|
||||||
|
*/
|
||||||
|
#define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL lwip_hook_unknown_eth_protocol
|
||||||
|
#endif /* RT_LWIP_ENABLE_USER_HOOKS */
|
||||||
|
|
||||||
#endif /* __LWIPOPTS_H__ */
|
#endif /* __LWIPOPTS_H__ */
|
||||||
|
|
Loading…
Reference in New Issue