LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-10-2012, 07:53 AM   #1
taufique71
LQ Newbie
 
Registered: Sep 2012
Location: Dhaka, Bangladesh
Distribution: CentOS
Posts: 6

Rep: Reputation: Disabled
"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.
 
Old 10-10-2012, 02:14 PM   #2
nini09
Member
 
Registered: Apr 2009
Posts: 991

Rep: Reputation: 67
In the kernel space, NF_INET_PRE_ROUTING should be used, not NF_IP_PRE_ROUTING.
 
Old 10-12-2012, 05:16 AM   #3
taufique71
LQ Newbie
 
Registered: Sep 2012
Location: Dhaka, Bangladesh
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-12-2012, 02:14 PM   #4
nini09
Member
 
Registered: Apr 2009
Posts: 991

Rep: Reputation: 67
NF_IP_PRE_ROUTING constant is for userspace compatibility only. In kernel space, NF_INET_PRE_ROUTING constant can be used only.
 
Old 10-13-2012, 03:19 AM   #5
taufique71
LQ Newbie
 
Registered: Sep 2012
Location: Dhaka, Bangladesh
Distribution: CentOS
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for your reply. It's working correctly now.
 
  


Reply

Tags
netfilter modules


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos Server Failed @ Bootup: Missing "/sbin/blkid" & "fsck" command not found beagle7 Linux - Newbie 4 08-24-2012 01:33 AM
What is the meaning of using "__KERNEL__" and "MODULE" macro? nithima Linux - Newbie 1 10-18-2010 08:26 PM
automount 5.0.3 with auto.smb script yields "key "<name>" not found in map" rbergen Linux - Software 0 01-01-2010 12:27 PM
LFS6.3 - Ch5.4.1 "/bin/sh sort not found" error at "make bootstrap" ubyt3m3 Linux From Scratch 2 06-23-2008 12:09 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM


All times are GMT -5. The time now is 04:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration