From owner-freebsd-hackers Mon Mar 12 17:19: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from relay2.net.com (relay2.net.com [134.56.3.108]) by hub.freebsd.org (Postfix) with ESMTP id 420F937B719 for ; Mon, 12 Mar 2001 17:18:55 -0800 (PST) (envelope-from shankar_agarwal@net.com) Received: from isis.net.com (fremont-ns1.net.com [134.56.112.20]) by relay2.net.com (8.9.3/8.9.3) with ESMTP id OAA21915 for ; Tue, 13 Mar 2001 14:34:12 -0800 (PST) Received: from west-mail.net.com by isis.net.com (8.9.3/SMI-SVR4) id RAA10103; Mon, 12 Mar 2001 17:18:46 -0800 (PST) Received: from net.com ([134.56.103.239]) by west-mail.net.com (Netscape Messaging Server 3.6) with ESMTP id AAA8D7; Mon, 12 Mar 2001 17:20:02 -0800 Message-ID: <3AAD7654.AD45B74C@net.com> Date: Mon, 12 Mar 2001 17:22:28 -0800 From: Shankar Agarwal Organization: N.E.T. http://www.net.com X-Mailer: Mozilla 4.61C-NETv45 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en, en-GB, fr, de MIME-Version: 1.0 To: John Gregor , bsd hackers Subject: Re: Question regarding the funcation socket()... References: <200103130106.f2D16lZ02260@vieo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi John, Thanks a lot for this fast reply. One more quick question i don't see any function socket(int,int,int) in uipc_syscalls.c though i see sys_socket function in this file. From what i understand socket libraby function should call trap which should call syscall function which in turn should call this sys_socket function. What i am looking for is the source code for this libraby function socket() whose prototype is defined in socket.h. I tried using cscope on the source files and i could not locate it through that also. Thanks Regards Shankar John Gregor wrote: > > > I am trying to find out where the function socket() is actually defined. > > sys/kern/uipc_syscalls.c > > cscope is your friend. > > > Moreover is see __P with all the function prototypes. Can anyone > > tell me what do they mean. I am right now assuming for my work that > > they just mean blank. > > Bad assumption. Depending on the compiler, __P either returns the > argument passed to the macro or '()'. This is because pre-ANSI C > didn't support function prototypes. > > pre-ANSI > > int foo(); > > ANSI > > int foo(char *, int *, int, int); > > Again, cscope is your friend. > > -JohnG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message