23 #include <linux/module.h>
25 #include <linux/types.h>
26 #include <linux/capability.h>
27 #include <linux/errno.h>
28 #include <linux/kernel.h>
29 #include <linux/poll.h>
30 #include <linux/fcntl.h>
32 #include <linux/socket.h>
49 static int cmtp_sock_release(
struct socket *
sock)
51 struct sock *
sk = sock->
sk;
53 BT_DBG(
"sock %p sk %p", sock, sk);
66 static int cmtp_sock_ioctl(
struct socket *sock,
unsigned int cmd,
unsigned long arg)
76 BT_DBG(
"cmd %x arg %lx", cmd, arg);
141 static int cmtp_sock_compat_ioctl(
struct socket *sock,
unsigned int cmd,
unsigned long arg)
152 cl.ci = compat_ptr(uci);
165 return cmtp_sock_ioctl(sock, cmd, arg);
169 static const struct proto_ops cmtp_sock_ops = {
172 .release = cmtp_sock_release,
173 .ioctl = cmtp_sock_ioctl,
175 .compat_ioctl = cmtp_sock_compat_ioctl,
192 static struct proto cmtp_proto = {
195 .obj_size =
sizeof(
struct bt_sock)
214 sock->
ops = &cmtp_sock_ops;
231 .create = cmtp_sock_create
244 BT_ERR(
"Can't register CMTP socket");
250 BT_ERR(
"Failed to create CMTP proc file");
255 BT_INFO(
"CMTP socket layer initialized");
268 BT_ERR(
"Can't unregister CMTP socket");