linux/net/bluetooth/sco.c

/*
   BlueZ - Bluetooth protocol stack for Linux
   Copyright (C) 2000-2001 Qualcomm Incorporated

   Written 2000,2001 by Maxim Krasnyansky <[email protected]>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2 as
   published by the Free Software Foundation;

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
   SOFTWARE IS DISCLAIMED.
*/

/* Bluetooth SCO sockets. */

#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/sched/signal.h>

#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/sco.h>

static bool disable_esco;

static const struct proto_ops sco_sock_ops;

static struct bt_sock_list sco_sk_list =;

/* ---- SCO connections ---- */
struct sco_conn {};

#define sco_conn_lock(c)
#define sco_conn_unlock(c)

static void sco_sock_close(struct sock *sk);
static void sco_sock_kill(struct sock *sk);

/* ----- SCO socket info ----- */
#define sco_pi(sk)

struct sco_pinfo {};

/* ---- SCO timers ---- */
#define SCO_CONN_TIMEOUT
#define SCO_DISCONN_TIMEOUT

static struct sock *sco_sock_hold(struct sco_conn *conn)
{}

static void sco_sock_timeout(struct work_struct *work)
{}

static void sco_sock_set_timer(struct sock *sk, long timeout)
{}

static void sco_sock_clear_timer(struct sock *sk)
{}

/* ---- SCO connections ---- */
static struct sco_conn *sco_conn_add(struct hci_conn *hcon)
{}

/* Delete channel.
 * Must be called on the locked socket. */
static void sco_chan_del(struct sock *sk, int err)
{}

static void sco_conn_del(struct hci_conn *hcon, int err)
{}

static void __sco_chan_add(struct sco_conn *conn, struct sock *sk,
			   struct sock *parent)
{}

static int sco_chan_add(struct sco_conn *conn, struct sock *sk,
			struct sock *parent)
{}

static int sco_connect(struct sock *sk)
{}

static int sco_send_frame(struct sock *sk, struct sk_buff *skb)
{}

static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
{}

/* -------- Socket interface ---------- */
static struct sock *__sco_get_sock_listen_by_addr(bdaddr_t *ba)
{}

/* Find socket listening on source bdaddr.
 * Returns closest match.
 */
static struct sock *sco_get_sock_listen(bdaddr_t *src)
{}

static void sco_sock_destruct(struct sock *sk)
{}

static void sco_sock_cleanup_listen(struct sock *parent)
{}

/* Kill socket (only if zapped and orphan)
 * Must be called on unlocked socket.
 */
static void sco_sock_kill(struct sock *sk)
{}

static void __sco_sock_close(struct sock *sk)
{}

/* Must be called on unlocked socket. */
static void sco_sock_close(struct sock *sk)
{}

static void sco_sock_init(struct sock *sk, struct sock *parent)
{}

static struct proto sco_proto =;

static struct sock *sco_sock_alloc(struct net *net, struct socket *sock,
				   int proto, gfp_t prio, int kern)
{}

static int sco_sock_create(struct net *net, struct socket *sock, int protocol,
			   int kern)
{}

static int sco_sock_bind(struct socket *sock, struct sockaddr *addr,
			 int addr_len)
{}

static int sco_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags)
{}

static int sco_sock_listen(struct socket *sock, int backlog)
{}

static int sco_sock_accept(struct socket *sock, struct socket *newsock,
			   struct proto_accept_arg *arg)
{}

static int sco_sock_getname(struct socket *sock, struct sockaddr *addr,
			    int peer)
{}

static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
			    size_t len)
{}

static void sco_conn_defer_accept(struct hci_conn *conn, u16 setting)
{}

static int sco_sock_recvmsg(struct socket *sock, struct msghdr *msg,
			    size_t len, int flags)
{}

static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
			       sockptr_t optval, unsigned int optlen)
{}

static int sco_sock_getsockopt_old(struct socket *sock, int optname,
				   char __user *optval, int __user *optlen)
{}

static int sco_sock_getsockopt(struct socket *sock, int level, int optname,
			       char __user *optval, int __user *optlen)
{}

static int sco_sock_shutdown(struct socket *sock, int how)
{}

static int sco_sock_release(struct socket *sock)
{}

static void sco_conn_ready(struct sco_conn *conn)
{}

/* ----- SCO interface with lower layer (HCI) ----- */
int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
{}

static void sco_connect_cfm(struct hci_conn *hcon, __u8 status)
{}

static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
{}

void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
{}

static struct hci_cb sco_cb =;

static int sco_debugfs_show(struct seq_file *f, void *p)
{}

DEFINE_SHOW_ATTRIBUTE();

static struct dentry *sco_debugfs;

static const struct proto_ops sco_sock_ops =;

static const struct net_proto_family sco_sock_family_ops =;

int __init sco_init(void)
{}

void sco_exit(void)
{}

module_param(disable_esco, bool, 0644);
MODULE_PARM_DESC();