Yup got it...thanx a lot, i am now using the sock_ calls to get that done. :) -praveen. -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx]On Behalf Of Jan Hudec Sent: Saturday, September 18, 2004 5:19 PM To: Praveen nair Cc: kernelnewbies@xxxxxxxxxxxx Subject: Re: sys_socket, please help! 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> http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at netadmin@xxxxxxxxx and delete this mail. _____________________________________________________________________