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
|