博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
kylin3.0netfilter的hooks标志变化
阅读量:705 次
发布时间:2019-03-21

本文共 978 字,大约阅读时间需要 3 分钟。

报错:

错误:‘NF_INET_PRE_ROUTING’ 未声明 (在此函数内第一次使用)

在kernel>=2.6.32的版本中,netfilter的hooks定义在linux/netfilter.h中:

45 enum nf_inet_hooks { 46 ~   NF_INET_PRE_ROUTING, 47 ~   NF_INET_LOCAL_IN, 48 ~   NF_INET_FORWARD, 49 ~   NF_INET_LOCAL_OUT, 50 ~   NF_INET_POST_ROUTING, 51 ~   NF_INET_NUMHOOKS 52 };

在kernel==2.6.18的版本中,netfilter的hooks定义在linux/netfilter_ipv4.h中:

41 /* IP Hooks */ 42 /* After promisc drops, checksum checks. */ 43 #define NF_IP_PRE_ROUTING~  0 44 /* If the packet is destined for this box. */ 45 #define NF_IP_LOCAL_IN~ ~   1 46 /* If the packet is destined for another interface. */ 47 #define NF_IP_FORWARD~  ~   2                                                                                                       48 /* Packets coming from a local process. */ 49 #define NF_IP_LOCAL_OUT~~   3 50 /* Packets about to hit the wire. */ 51 #define NF_IP_POST_ROUTING~ 4 52 #define NF_IP_NUMHOOKS~ ~   5

有的文章讲到,在2.6.9版本之后,内核想要将netfilter与协议分离,但是看当前的版本,应该还没有做完,在32版本之后就好很多了

转载地址:http://anwrz.baihongyu.com/

你可能感兴趣的文章