Re: Where is connect?

2008-02-26 Thread Mel
On Tuesday 26 February 2008 03:23:45 a arcadia wrote:
 This is likely a silly question but where exactly is the source for
 connect?  Under /usr/src/lib/libc/sys there is connect.2 but  no
 connect.c, or any other socket functions for that matter.

sys/kern/uipc_syscalls.c

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Where is connect?

2008-02-25 Thread a arcadia
This is likely a silly question but where exactly is the source for
connect?  Under /usr/src/lib/libc/sys there is connect.2 but  no
connect.c, or any other socket functions for that matter.

Thanks

Abe
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Where is connect?

2008-02-25 Thread Giorgos Keramidas
On 2008-02-25 21:23, a arcadia [EMAIL PROTECTED] wrote:
 This is likely a silly question but where exactly is the source for
 connect?  Under /usr/src/lib/libc/sys there is connect.2 but  no
 connect.c, or any other socket functions for that matter.

It is a system call.  The userlevel part of system calls is,
traditionally, only a very thin wrapper around their kernel
counterparts.

If you look at `/usr/src/sys/kern/syscalls.master' you can see a line
which maps the connect(2) system call to the connect() kernel function:

% 98  AUE_CONNECT STD { int connect(int s, caddr_t name, \
% int namelen); }

The connect() function itself is easy to locate in src/sys/kern:

% [EMAIL PROTECTED]:/usr/src/sys/kern$ grep -n '^connect' *.c
% uipc_syscalls.c:501:connect(td, uap)
% [EMAIL PROTECTED]:/usr/src/sys/kern$

This is the entry point of the connect(2) system call.  Things go on
from this point into the network stack  protocol support code.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]