* Using ipv6 stack functions in kernel module
@ 2012-01-22 12:01 Łukasz Czyż
2012-01-22 18:23 ` Dave Hylands
0 siblings, 1 reply; 2+ messages in thread
From: Łukasz Czyż @ 2012-01-22 12:01 UTC (permalink / raw)
To: kernelnewbies
Hello All
I am wirting kernel module and I want to call some ipv6 stack function
from it (like ip6_forward). I am including proper header files so
compiler detects that functions, compiles module, but at the end it
returns warning like that:
WARNING: "ip6_forward" [/path/to/my/module.ko] undefined!
Resulting module cannot be inserted as I get following output:
insmod: error inserting 'module.ko': -1 Unknown symbol in module
I guess that this issue takes place because corresponding macro
EXPORT_SYMBOL(ip6_forward) is not defined in kernel source. But it
seems strange to me that such a fundamental functions cannot be used
by module writers. What is more, I found on net some exemplary module
source and I found ip6_forward function called from it.
I defined "GPL" as license of my module and I try to compile it under
3.0.4 kernel version.
Lukasz
^ permalink raw reply [flat|nested] 2+ messages in thread
* Using ipv6 stack functions in kernel module
2012-01-22 12:01 Using ipv6 stack functions in kernel module Łukasz Czyż
@ 2012-01-22 18:23 ` Dave Hylands
0 siblings, 0 replies; 2+ messages in thread
From: Dave Hylands @ 2012-01-22 18:23 UTC (permalink / raw)
To: kernelnewbies
Hi ?ukasz,
On Sun, Jan 22, 2012 at 4:01 AM, ?ukasz Czy? <perlowy.dzem@gmail.com> wrote:
> Hello All
>
> I am wirting kernel module and I want to call some ipv6 stack function
> from it (like ip6_forward). I am including proper header files so
> compiler detects that functions, compiles module, but at the end it
> returns warning like that:
>
> WARNING: "ip6_forward" [/path/to/my/module.ko] undefined!
>
> Resulting module cannot be inserted as I get following output:
>
> insmod: error inserting 'module.ko': -1 Unknown symbol in module
>
> I guess that this issue takes place because corresponding macro
> EXPORT_SYMBOL(ip6_forward) is not defined in kernel source. But it
> seems strange to me that such a fundamental functions cannot be used
> by module writers. What is more, I found on net some exemplary module
> source and I found ip6_forward function called from it.
So if you're using a module, you can only call functions which are
either declared inline, or which are EXPORT_SYMBOL'd.
If you statically link your module into the kernel, then you can call
any function which is available.
> I defined "GPL" as license of my module and I try to compile it under
> 3.0.4 kernel version.
This would only impact symbols which were declared EXPORT_SYMBOL_GPL.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-22 18:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-22 12:01 Using ipv6 stack functions in kernel module Łukasz Czyż
2012-01-22 18:23 ` Dave Hylands
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).