Working hook in platformio.ini

This commit is contained in:
Florian Hoss 2022-07-25 15:48:30 +02:00
parent 42be57d91f
commit 2d36e41641

View file

@ -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}