Socket programming question

2007-11-14 Thread Andrew Falanga
Hi, My question has to do with how someone would find out if a call to socket(2) actually produced a socket. I know that the API works, I've programmed with it many times, but is there a way to find out if 's' returned by socket(2) is actually valid in whatever kernel structure it is stored? I

Re: Socket programming question

2007-11-14 Thread Derek Ragona
At 04:21 PM 11/14/2007, Andrew Falanga wrote: Hi, My question has to do with how someone would find out if a call to socket(2) actually produced a socket. I know that the API works, I've programmed with it many times, but is there a way to find out if 's' returned by socket(2) is actually

Re: Socket programming question

2007-11-14 Thread Heiko Wundram (Beenic)
Am Mittwoch, 14. November 2007 23:21:43 schrieb Andrew Falanga: My question has to do with how someone would find out if a call to socket(2) actually produced a socket. I know that the API works, I've programmed with it many times, but is there a way to find out if 's' returned by socket(2)

Re: Socket programming question

2007-11-14 Thread Bruce Cran
Derek Ragona wrote: With internet sockets, these get added to the TCP stack, and their are kernel structures created too I'm sure, but I have no idea how to find those. Netstat will show sockets in use though. sockstat(1) might also be useful as it shows information about what program

Re: Socket programming question

2007-11-14 Thread Giorgos Keramidas
On 2007-11-14 15:21, Andrew Falanga [EMAIL PROTECTED] wrote: Hi, My question has to do with how someone would find out if a call to socket(2) actually produced a socket. I know that the API works, I've programmed with it many times, but is there a way to find out if 's' returned by socket(2)

Re: Socket programming question

2007-11-14 Thread Andrew Falanga
On Nov 14, 2007 4:55 PM, Heiko Wundram (Beenic) [EMAIL PROTECTED] wrote: Sorry to say that, but it doesn't make sense as it's worded. The descriptor returned by socket(2) is valid if it's = 0 (that's the API contract for the socket(2) C function), and remains valid until the program ends