LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   "NF_IP_PRE_ROUTING" macro not found (http://www.linuxquestions.org/questions/linux-networking-3/nf_ip_pre_routing-macro-not-found-4175431483/)

taufique71 10-10-2012 07:53 AM

"NF_IP_PRE_ROUTING" macro not found
 
I am writing a netfilter module. In my module I included both netfilter.h and netfilter_ipv4.h. But when I am assigning NF_IP_PRE_ROUTING macro to hooknum field of nf_hook_ops struct it is showing me error saying that the macro is not declared. But according to source tree it is supposed to be declared in netfilter_ipv4.h. Can anybody tell me why it is happening and what is the solution of this problem?

N. B.: I am using CentOS 6.0. Kernel release 2.6.32-71.el6.i686.

nini09 10-10-2012 02:14 PM

In the kernel space, NF_INET_PRE_ROUTING should be used, not NF_IP_PRE_ROUTING.

taufique71 10-12-2012 05:16 AM

I am new to this area. So it would be great if you could explain a bit more about the differences between NF_INET_PRE_ROUTING and NF_IP_PRE_ROUTING

nini09 10-12-2012 02:14 PM

NF_IP_PRE_ROUTING constant is for userspace compatibility only. In kernel space, NF_INET_PRE_ROUTING constant can be used only.

taufique71 10-13-2012 03:19 AM

Thanks for your reply. It's working correctly now.


All times are GMT -5. The time now is 01:11 AM.