Date: Mon, 12 Mar 2001 17:22:28 -0800 From: Shankar Agarwal <shankar_agarwal@net.com> To: John Gregor <johng@vieo.com>, bsd hackers <freebsd-hackers@FreeBSD.ORG> Subject: Re: Question regarding the funcation socket()... Message-ID: <3AAD7654.AD45B74C@net.com> References: <200103130106.f2D16lZ02260@vieo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AAD7654.AD45B74C>