As I understand, Linux kernel has five hook points for IPv4 packet flow defined in netfilter_ipv4.h
file:
/* IP Hooks */
/* After promisc drops, checksum checks. */
#define NF_IP_PRE_ROUTING 0
/* If the packet is destined for this box. */
#define NF_IP_LOCAL_IN 1
/* If the packet is destined for another interface. */
#define NF_IP_FORWARD 2
/* Packets coming from a local process. */
#define NF_IP_LOCAL_OUT 3
/* Packets about to hit the wire. */
#define NF_IP_POST_ROUTING 4
..and according to netfilter_ipv6.h
same seems to be true for IPv6:
/* IP6 Hooks */
/* After promisc drops, checksum checks. */
#define NF_IP6_PRE_ROUTING 0
/* If the packet is destined for this box. */
#define NF_IP6_LOCAL_IN 1
/* If the packet is destined for another interface. */
#define NF_IP6_FORWARD 2
/* Packets coming from a local process. */
#define NF_IP6_LOCAL_OUT 3
/* Packets about to hit the wire. */
#define NF_IP6_POST_ROUTING 4
This makes me wonder that is it correct to think of netfilter
/iptables
architecture in a way that chains
define the place where operations happen and tables
determine which operations can be done? In addition, do tables
matter for kernel as well or are they simply meant for iptables
users to group types of processing which can occur?