socket bound?

Ron Stanonik stanonik at nprdc.navy.mil
Thu Jun 14 06:43:35 AEST 1990


How can I tell if a socket (4.3bsd, sunos, et al) is bound?
getsockname returns a struct sockaddr_in regardless.
Checking sin_port?  It does seem to be 0 when unbound,
but is this reliable?

Next question, how can I unbind a socket?  unlink it?

Are either of these documented in TFM?

Thanks,

Ron Stanonik
stanonik at nprdc.navy.mil



More information about the Comp.unix.wizards mailing list