[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tracing syscall?
On Thu, Dec 11, 2003 at 02:32:34AM -0500, Guillaume Thouvenin wrote:
> Selon Daniele Bellucci <bellucda@tiscali.it>:
>
> > On Wed, Dec 10, 2003 at 10:20:23AM -0500, Guillaume Thouvenin wrote:
> >> I'm only interesting by network call. The proble is that the only syscall
> >> is socket(PF_UNIX, SOCK_DGRAM, 0) but socket() is not a syscall, is it?
> >
> > Yes it is, look at net/socket.c::sys_socket
>
> I forgot to say that I'm working on i386. So yes there is a sys_socket()
> function in socket.c but I think it's not a syscall because it doesn't appear in
> the file arch/i386/kernel/entry.S
As I previously wrote, you are correct. The system call, number 102,
is calld sys_socketcall. sys_socketcall receives a first argument that
tells it which of the multiplexed functions it has to call - one of
them being sys_socket().
see net/socket.c, sys_socketcall():
asmlinkage long sys_socketcall(int call, unsigned long __user *args)
{
/* snip sanity checks, copy_from_user(), etc */
switch(call)
{
case SYS_SOCKET:
err = sys_socket(a0,a1,a[2]);
break;
Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
"the nucleus of linux oscillates my world" - gccbot@#offtopic
Digital signature