From 59c01ea05de84366d8a6ce0fbdfcbde54dace582 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Mon, 29 May 2023 23:38:28 +0800 Subject: [PATCH] netfilter: add NF_IP_xxx definition we will integrate network management tools in future projects. In the process of porting the tools, we encounter some situations where the structure is not defined, refer to the common implementation of other systems and add relevant definitions. Signed-off-by: zhanghongyu --- include/nuttx/net/netfilter/netfilter.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/nuttx/net/netfilter/netfilter.h b/include/nuttx/net/netfilter/netfilter.h index 28dc521a29..a16711328c 100644 --- a/include/nuttx/net/netfilter/netfilter.h +++ b/include/nuttx/net/netfilter/netfilter.h @@ -41,6 +41,15 @@ #define NF_STOP 5 /* Deprecated, for userspace nf_queue compatibility. */ #define NF_MAX_VERDICT NF_STOP +/* IP Hooks */ + +#define NF_IP_PRE_ROUTING 0 /* After promisc drops, checksum checks. */ +#define NF_IP_LOCAL_IN 1 /* If the packet is destined for this box. */ +#define NF_IP_FORWARD 2 /* If the packet is destined for another interface. */ +#define NF_IP_LOCAL_OUT 3 /* Packets coming from a local process. */ +#define NF_IP_POST_ROUTING 4 /* Packets about to hit the wire. */ +#define NF_IP_NUMHOOKS 5 + /**************************************************************************** * Public Types ****************************************************************************/