LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-30-2007, 03:17 AM   #1
goforce
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
header file: linux/netfilter.h code error


Hi all,

I tried to do a Make on the Kernel AODV source codes version 2.2.2 which uses netfilter.h in its codes but it gives compilation errors as it can't find struct type defined as "nf_hook_ops" in usr/include/linux/netfilter.h

Am I missing something here? why is the netfilter.h different from what was at this site Linux/include/linux/netfilter.h ??? how do I get the latest version of the header files? For your information, I'm running Ubuntu 7.10 with the latest Linux kernel version 2.6.22 and has perform all available updates. anyone using Ubuntu 7.10 having the same netfiler.h file as mine?

Thanks alot for your help.
 
Old 10-30-2007, 02:59 PM   #2
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Mint, Arch, Debian7
Posts: 194

Rep: Reputation: 23
I think you are missing the kernel source, use apt-get or synaptic to install the 2.6.22 kernel headers and try again.
 
Old 10-30-2007, 11:12 PM   #3
goforce
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,

Thanks for ur reply.

I did install the linux-libc-dev from Synaptic package manager. It says:

Linux Kernel Headers for development
This package provides headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries.

But my compile still fails...i wonder if this is the package you are talking about?

Below is a copy of my netfilter.h which is shorter than what is at the site I listed above, can I check if ur header file contain the same code?

--------------------------------------------------------------------------------
#ifndef __LINUX_NETFILTER_H
#define __LINUX_NETFILTER_H


/* Responses from hook functions. */
#define NF_DROP 0
#define NF_ACCEPT 1
#define NF_STOLEN 2
#define NF_QUEUE 3
#define NF_REPEAT 4
#define NF_STOP 5
#define NF_MAX_VERDICT NF_STOP

/* we overload the higher bits for encoding auxiliary data such as the queue
* number. Not nice, but better than additional function arguments. */
#define NF_VERDICT_MASK 0x0000ffff
#define NF_VERDICT_BITS 16

#define NF_VERDICT_QMASK 0xffff0000
#define NF_VERDICT_QBITS 16

#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE)

/* only for userspace compatibility */
/* Generic cache responses from hook functions.
<= 0x2000 is used for protocol-flags. */
#define NFC_UNKNOWN 0x4000
#define NFC_ALTERED 0x8000

#endif /*__LINUX_NETFILTER_H*/
----------------------------------------------------------------------------
 
  


Reply



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
header file: linux/netfilter.h code error goforce Programming 1 10-30-2007 03:24 AM
netfilter packet capturing-sample code for linux 2.6 kernel anandkj Linux - Networking 0 07-04-2007 04:37 AM
How to let source code know where the header file is? ArthurHuang Programming 3 06-13-2006 12:01 PM
Including the header file of a module in kernel code omkarlagu Linux - Newbie 0 02-05-2006 07:55 AM
source code of others.h header file cynthia_thomas Linux - General 1 02-01-2006 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration