Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2006 10:06:34 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        vpaces@chello.sk
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: Question:socket sources
Message-ID:  <451E79EA.4090805@mac.com>
In-Reply-To: <20060930095650.NMHP18728.viefep17-int.chello.at@localhost>
References:  <20060930095650.NMHP18728.viefep17-int.chello.at@localhost>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
vpaces@chello.sk wrote:
[ ... ]
> For example:
> int     socket(int domain, int type, int protocol);
> int     bind(int s, const struct sockaddr *addr, socklen_t addrlen);
> 
> Browsing through your WWW CVS repository I'm just finding sources for MAN pages in directory / src / lib / libc / sys: 
> access.2, connect.2 and so on. 
> But where are the C sources of these calls? Or are the sources of these system calls not available?

C functions from section 2 of the manpages are "system calls", which means 
that a stub function is generated in libc via makesyscalls.sh, but most of the 
work in done in the kernel:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/uipc_syscalls.c?rev=1.221.2.4
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/uipc_socket.c?rev=1.283

-- 
-Chuck



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?451E79EA.4090805>