Re: netlink problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux