diff --git a/ESPFirewall/lib/Firewall/docs/firewall/firewall.tex b/ESPFirewall/lib/Firewall/docs/firewall/firewall.tex index 62f4130..0b3df8a 100644 --- a/ESPFirewall/lib/Firewall/docs/firewall/firewall.tex +++ b/ESPFirewall/lib/Firewall/docs/firewall/firewall.tex @@ -116,4 +116,11 @@ Looking at the printed protocols this means 6 == "TCP" and 17 == "UDP". After learning the protocols that need to be filtered and looked out for, a hook needs to be registered in order to filter the packets based on our rules. +To register a hook \verb|LWIP_HOOK_IP4_INPUT| needs to be set as \verb|build_flag| in the \verb|platformio.ini| file to overwrite it in LwIP. This is an easy way of testing if it works as expected, but should be written in a function for any other use-case. + +\begin{verbatim} +build_flags = + '-DLWIP_HOOK_IP4_INPUT(pbuf, input_netif)=({ESP_LOGI("HOOK","TEST");0;})' +\end{verbatim} + \subsection{Benchmark}