Re: sys_socket, please help!

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

 



On Fri, Sep 17, 2004 at 19:21:14 +0530, Praveen nair wrote:
> Hi,
>   I am writting a kernel module where i am trying to create a socket
> using the sys_socket call. I have declared the call as extern in my module
> to remove the compilation errors that i as getting. But now when i try to
> load
> the module it says undefined symbol sys_socket, i guess the module that
> exports this symbol is not loaded.
> Can anyone please tell me which module has this symbol??

It's a syscall. That can't be in a module.

It's unlikely that it's actualy exported (acoording to
http://lxr.linux.no, it is not)-- all symbols that can be used by
modules must be explicitely makred as such.

That function is declared asmlinkage. It can't be called without
a proper prototype, because asmlinkage changes the calling convention.

You don't want to use that function anyway.

The problem is, that in a kernel thread (you are working in kernel
thread, right) you don't have file descriptor table available. So you
don't want a file descriptor, you want the struct socket structure. That
is, you want to use the sock_create function. After that, you want to
call it's methods (functions in the .ops element).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[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