From: "Christopher Friesen" <[EMAIL PROTECTED]> Date: Fri, 20 Jan 2006 17:06:36 -0600
> I've been asked if there is any way to map a "struct socket *" in > kernelspace, to the userspace fd that corresponds to it. > > I came up with looping through current->files->fd[i] and matching it > against socket->file--if they match then "i" is the fd. > > Is there a better way? It's a many to one mapping, so no. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html