Subject: Re: question regarding the socket() function.
To: Shankar Agarwal <shankar_agarwal@net.com>
From: Frederick Bruckman <fb@enteract.com>
List: tech-kern
Date: 03/12/2001 20:51:23
On Tue, 13 Mar 2001, Christos Zoulas wrote:

> In article <3AAD85EC.55033291@net.com>,
> Shankar Agarwal <shankar_agarwal@net.com> wrote:
> >I am trying to find out where the function socket() is actually
> >defined.I did a search on the sources and i kind of could not locate
> >this
> >function. Also i could not find the code for the function bind()
> >connect(). I think i might be missing something here as i am directly
> >looking for a function with a name socket, bind and connect. So if that
> >is wrong then i will be grateful to you if you let me know the correct
> >way to do it. I am using cscope to search for this purpose.
>
> These are system calls; they are implemented as assembly language stubs
> in the Makefile in /usr/src/lib/libc/sys.

If you want to see the actual code, in the kernel, that would be
sys_bind(), sys_socket(), sys_connect() in /sys/kern/uipc_syscalls.c.


Frederick