LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-05-2007, 06:45 AM   #1
anandkj
LQ Newbie
 
Registered: Jul 2007
Posts: 18

Rep: Reputation: 0
problem with inet_ntoa function in LKM


hi
i'm trying my hands on LKMs as part of my project. i have a problem "insmod"ing one of my modules. the module contains an "inet_ntoa" function,which was intended to convert the IP address of the packets(which i receive thru netfilter hook).
when i try to insmod, the error shown isunrecognised type, due to the reason that "inet_ntoa" is not there in /proc/kallsyms file.

i'd like to knw if i can replace "inet_ntoa" with some other function which is ther in kallsyms.
thanks in advance...
 
Old 07-05-2007, 09:20 AM   #2
mallux
Member
 
Registered: Jun 2007
Location: London, UK
Distribution: Ubuntu, RHEL, Fedora
Posts: 46
Blog Entries: 1

Rep: Reputation: 16
Can't find a reference to inet_ntoa (as in the userland function) but there used to be an in_ntoa which was removed in 2.4.19 (ChangeLog) in favour of the NIPQUAD macro.

Don't think it would be a direct drop-in replacement for your function but it probably wouldn't be too hard to fiddle your source to make it work. Have a look here for some example usage in a recent kernel.
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem compiling LKM in linux 2.6.21 anandkj Linux - General 2 07-03-2007 11:32 PM
problem in LKM kumar.manoj412 Linux - General 2 05-26-2007 12:19 PM
LKM register_chrdev_region(..) problem allomeen Linux - Software 0 04-11-2006 04:55 PM
inet_ntoa() problem with array of sockaddr_in ahogg Programming 5 05-05-2004 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration