Working hook in platformio.ini
This commit is contained in:
parent
42be57d91f
commit
2d36e41641
1 changed files with 7 additions and 0 deletions
|
@ -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.
|
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}
|
\subsection{Benchmark}
|
||||||
|
|
Reference in a new issue