[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: netlink problem
I myself could solve the problem. Basically what was happening is I didnt
include linux/init.h so things were messing up somewhere in
module_initialization.
btw i get following warning in module compilation. Any idea what it is
for?
Warning: Ignoring changed section attributes for .modinfo
gcc 2.96, kernel 2.4.1, flags -DMODULE -DMODVERSIONS -D__KERNEL -Wall
regards,
<snip>
>mymodule_init()
>{
>
> ...
>
> return mymodulenetlink_init();
>}
>
>mymodulenetlink_init()
>{
> sk = netlink_kernel_create(NETLINK_MYMODUE,
> mymodule_rec_function);
>
> printk(sk->socket);
>}
>
>the printk statement above indicates the sk->socket is NULL. However this
>could not happen if one follows
>netlink_kernel_create->netlink_create->sock_alloc->sock_init_data
>and returns a valid pointer (for sk, which it is returning.) any ideas?
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/