LinuxQuestions.org
Visit Jeremy's Blog.
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 05-31-2010, 01:51 AM   #1
Santoshkb
Member
 
Registered: Sep 2007
Posts: 56

Rep: Reputation: 15
Question Need help for linking kernel functions in my object


Hi everyone,

How can we use kernel functions in my kernel module which i insert by insmod. have googled but couldnt find the related solution.

Compilation throws warning, but gets compiled when inserting it fails as symbol is unresolved.

In my case i want to use fib_validate_source (ip source validating funtion) for my kernel module.

I've include the corresponding header files.

WARNING: "__fib_res_prefsrc" [/home/santosh/phase-1/virtual_firewall/fastpath_firewall/attack_test_framework/ip_attack/ipattackdetect.ko] undefined!
WARNING: "free_fib_info" [/home/santosh/phase-1/virtual_firewall/fastpath_firewall/attack_test_framework/ip_attack/ipattackdetect.ko] undefined!
WARNING: "fib_lookup" [/home/santosh/phase-1/virtual_firewall/fastpath_firewall/attack_test_framework/ip_attack/ipattackdetect.ko] undefined!
WARNING: "ipv4_devconf" [/home/santosh/phase-1/virtual_firewall/fastpath_firewall/attack_test_framework/ip_attack/ipattackdetect.ko] undefined!
CC /home/santosh/phase-1/virtual_firewall/fastpath_firewall/attack_test_framework/ip_attack/ipattackdetect.mod.o
LD [M] /home/santosh/phase-1/virtual_firewall/fastpath_firewall/attack_test_framework/ip_attack/ipattackdetect.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-128.el5-i686'

[root@IDA ip_attack]# insmod ipattackdetect.ko
insmod: error inserting 'ipattackdetect.ko': -1 Unknown symbol in module

I'm using 2.6.18 kernel.

I think only the function with EXPORT_SYMBOL(fun) can be used, please let me know is there any similar function for validation of source ip?

Please correct me if i'm wrong.

Last edited by Santoshkb; 05-31-2010 at 06:55 AM. Reason: guessed reason
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling kernel functions from userspace - question about linking JohnGraham Programming 2 02-06-2010 05:24 PM
Problems linking object files with geany on ubuntu scratchmonkey Programming 8 03-10-2009 10:09 PM
Linking precompile archive/object files with kernel module possible? Mechanic Linux - General 0 08-25-2006 02:08 PM
Object linking order causes Segmentation fault??? The_Nerd Programming 1 11-03-2005 11:26 PM
problem with linking between functions ams Programming 6 03-01-2005 11:08 AM

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

All times are GMT -5. The time now is 04:27 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