Chani
Chani

Reputation: 5165

Using the skbuff header file.

I am developing an application that makes a guess on whether your applications are under attack or not by monitoring the ports of your system. For this I decided to catch live sk_buff variables through a kernel module.

But currently I am stuck with the following problem:

Cant access skbuff.h header file. When i do

#include<linux/skbuff.h>;

it says it cant find the required header on netbeans. I looked at the code samples online and they have all been able to do

#include<linux/skbuff.h>;

without any problems.

P.S. I am running Ubuntu 11.04

screenshot from netbeans

Upvotes: 1

Views: 817

Answers (1)

I have almost no idea what NetBeans is. I'm guessing that it is some "apparently" sexy editor which is able to drive some compilation.

(Actually, I think that for kernel related development, you should learn how to use make gcc and other tools manually; your IDE is hiding some complexity that you need to tackle with: so I think that using any kind of IDE for kernel related code is wrong.).

So you need to figure out how to pass additional -I flags to the gcc compiler. I can just recall you what the -I dir flag mean: It is a preprocessor option which "add the directory dir to the list of directories to be searched for header files."

As to how to configure your damn NetBeans IDE to suit your need, I have no idea! Why don't you just use an editor (emacs or vim) and run make by yourself? Then you'll have to edit some Makefile option, often CFLAGS.

Upvotes: 2

Related Questions