LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 03-09-2007, 01:18 AM   #1
gomathisankar
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Rep: Reputation: 0
Question Problem in porting module from 2.4 to 2.6


Hi ,
I am trying to compile AODV source code which is written for 2.4 Kernel.Now i am trying to port it to 2.6.15 (fedora 5.0 )kernel. I am getting these probem.

1. skb->nfcache |= NFC_ALTERED
But in 2.6 sk_buff doesn't have nfcache. I have commented this for compiltaion .How to add this

2. struct socket *sock;
sock->sk->broadcast=1;
sock->sk->protinfo.af_inet.ttl=ttl;

But in 2.6 struct sock is not having the broadcast and the protinfo is converted to void* in 2.6. How can i specify the ttl value. I have commented this for compilation. How to include htis

3. nf_register_queue_handler(PF_INET, recvFn , data);
I converted it to
struct nf_queue_handler *qh;
qh = kmalloc(sizeof(qh),GFP_KERNEL);
qh->data = data;
qh->outfn = recvfn;
qh->name = name;
// I don't know what is the use of the Func????.
// I just filled it by a string.
status = nf_register_queue_handler(PF_INET,qh);
Is it right???

4. The receive Function has a parameter queuenum. What is the use of this.How to use this . I just left it as it is

5. And when i am trying to send a broadcast messgae using sock_sendmsg,it is failing continuously .And I am getting a -13 as the return value. What will be the problem.

Any help will be much helpfull for me

Regards
Gomathi S P
 
Old 09-21-2007, 04:37 PM   #2
ashishsharma
LQ Newbie
 
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
nf_queue_handler issue from 2.4 to 2.6

Hi,
I am facing the same problem. I noticed that there are many more changes required to make the code compile. Just wanted to ask you, if you finally managed to figure out the nf_register_queue problem and if that works?

----------------
nf_register_queue_handler(PF_INET, recvFn , data);
I converted it to
struct nf_queue_handler *qh;
qh = kmalloc(sizeof(qh),GFP_KERNEL);
qh->data = data;
qh->outfn = recvfn;
qh->name = name; // I don't know what is the use of the Func????.
// I just filled it by a string.
status = nf_register_queue_handler(PF_INET,qh);
Is it right???
-----------------

My kernel hangs with some error message in __nf_queue showing up in the call trace. Could you let me know if you figured out the correct answer for this problem?




Quote:
Originally Posted by gomathisankar View Post
Hi ,
I am trying to compile AODV source code which is written for 2.4 Kernel.Now i am trying to port it to 2.6.15 (fedora 5.0 )kernel. I am getting these probem.

1. skb->nfcache |= NFC_ALTERED
But in 2.6 sk_buff doesn't have nfcache. I have commented this for compiltaion .How to add this

2. struct socket *sock;
sock->sk->broadcast=1;
sock->sk->protinfo.af_inet.ttl=ttl;

But in 2.6 struct sock is not having the broadcast and the protinfo is converted to void* in 2.6. How can i specify the ttl value. I have commented this for compilation. How to include htis

3. nf_register_queue_handler(PF_INET, recvFn , data);
I converted it to
struct nf_queue_handler *qh;
qh = kmalloc(sizeof(qh),GFP_KERNEL);
qh->data = data;
qh->outfn = recvfn;
qh->name = name;
// I don't know what is the use of the Func????.
// I just filled it by a string.
status = nf_register_queue_handler(PF_INET,qh);
Is it right???

4. The receive Function has a parameter queuenum. What is the use of this.How to use this . I just left it as it is

5. And when i am trying to send a broadcast messgae using sock_sendmsg,it is failing continuously .And I am getting a -13 as the return value. What will be the problem.

Any help will be much helpfull for me

Regards
Gomathi S P
 
Old 09-23-2007, 06:50 PM   #3
pcgayan
LQ Newbie
 
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
Unhappy aodv 0.9 works on fedora core 2

hi,

I have see this problem when i try to install aodv 0.9.3 in fedora core 2,
but aodv 0.9 or below versions can compile and run successfully in fedora core 2, but problem is the gateway mode is not working in 0.9, its only working from 0.9.3, iam also trying to install 0.9.3 in fedora core 2.

if you guys come up with something please let me now.

thank you,
pcgayan
 
  


Reply

Tags
linux, networking



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
Problem installing module in Fedora Core 2 (2.6 kernel vs 2.4 problem?) Arodef Linux - Kernel 3 11-30-2007 02:55 PM
problem configuring vmware...module problem? aw76 Linux - Software 6 01-08-2006 05:53 AM
Kde porting nc3b Programming 1 01-06-2006 09:53 AM
urgent porting problem vrdhananjay Programming 2 01-13-2005 02:49 PM
fglrx module not found but X runs using module biger problem though HELP! fireicer Linux - Newbie 4 07-30-2004 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:30 AM.

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