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]"