[lwip-devel] New Hook IP function for output packages
From:
Daniel Lastanao
Subject:
[lwip-devel] New Hook IP function for output packages
Date:
Fri, 13 Jan 2023 20:31:11 +0100
I already wrote a thread a few months ago about implementing the functions
LWIP_HOOK_IP4_OUTPUT and LWIP_HOOK_IP6_OUTPUT. Now that I´m implementing it. I define these functions in ip4_output and in ip6_output as follows.
if (LWIP_HOOK_IP4_OUTPUT(p, src, dest, ttl, tos, proto, netif)){
/* the packet has been eaten */
return ERR_OK;
}
#endif
return ip4_output_if(p, src, dest, ttl, tos, proto, netif);
}
I try to see if these functions work by printing a sentence each time the ESP32 sends a package and the program does not enter the function every time the esp32 sends a packet.
The function is defined in the opt.h file and in my files to use it in my main.cpp.