Messages in this thread | | | Date | Mon, 14 Oct 2002 15:00:12 -0700 | From | "Maksim (Max) Krasnyanskiy" <> | Subject | Re: [PATCH] Export sockfd_lookup function |
| |
At 05:01 PM 10/14/2002 -0400, Alexander Viro wrote:
>On Mon, 14 Oct 2002, Maksim (Max) Krasnyanskiy wrote: > > > > > Can we export sockfd_lookup function ? > > I need it in one of the Bluetooth modules which has to look up 'struct > socket' > > from fd in the ioctl handler. > >What the hell does that ioctl do with file descriptors in the first place? What is so unusual in dealing with file descriptors in ioctl ?
Anyway, that ioctl takes file descriptor, finds struct socket and starts kernel thread, struct socket is then used in that kernel thread (sock->ops->sendmsg, etc). Take a look in net/bluetooth/bnep/sock.c:bnep_sock_ioctl() if you're interested.
Max
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |