Query: sockfd_lookup
OS: centos
Section: 9
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SOCKFD_LOOKUP(9) Linux Networking SOCKFD_LOOKUP(9)NAMEsockfd_lookup - Go from a file number to its socket slotSYNOPSISstruct socket * sockfd_lookup(int fd, int * err);ARGUMENTSfd file handle err pointer to an error code returnDESCRIPTIONThe 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. On a success the socket object pointer is returned.COPYRIGHTKernel Hackers Manual 3.10 June 2014 SOCKFD_LOOKUP(9)