.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "SOCKFD_LOOKUP" "9" "09 October 2005" "" ""
.SH NAME
sockfd_lookup \- Go from a file number to its socket slot
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct socket * sockfd_lookup (int \fIfd\fB, int * \fIerr\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIfd\fB\fR
file handle
.TP
\fB\fIerr\fB\fR
pointer to an error code return
.SH "DESCRIPTION"
.PP
The file handle passed in is locked and the socket it is bound
too is returned. If an error occurs the err pointer is overwritten
with a negative errno code and NULL is returned. The function checks
for both invalid handles and passing a handle which is not a socket.
.PP
On a success the socket object pointer is returned.