linux/net/bluetooth/af_bluetooth.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 address family and sockets. */

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

#include <asm/ioctls.h>

#include <net/bluetooth/bluetooth.h>
#include <linux/proc_fs.h>

#include "leds.h"
#include "selftest.h"

/* Bluetooth sockets */
#define BT_MAX_PROTO
static const struct net_proto_family *bt_proto[BT_MAX_PROTO];
static DEFINE_RWLOCK(bt_proto_lock);

static struct lock_class_key bt_lock_key[BT_MAX_PROTO];
static const char *const bt_key_strings[BT_MAX_PROTO] =;

static struct lock_class_key bt_slock_key[BT_MAX_PROTO];
static const char *const bt_slock_key_strings[BT_MAX_PROTO] =;

void bt_sock_reclassify_lock(struct sock *sk, int proto)
{}
EXPORT_SYMBOL();

int bt_sock_register(int proto, const struct net_proto_family *ops)
{}
EXPORT_SYMBOL();

void bt_sock_unregister(int proto)
{}
EXPORT_SYMBOL();

static int bt_sock_create(struct net *net, struct socket *sock, int proto,
			  int kern)
{}

struct sock *bt_sock_alloc(struct net *net, struct socket *sock,
			   struct proto *prot, int proto, gfp_t prio, int kern)
{}
EXPORT_SYMBOL();

void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
{}
EXPORT_SYMBOL();

void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
{}
EXPORT_SYMBOL();

void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh)
{}
EXPORT_SYMBOL();

/* Calling function must hold the sk lock.
 * bt_sk(sk)->parent must be non-NULL meaning sk is in the parent list.
 */
void bt_accept_unlink(struct sock *sk)
{}
EXPORT_SYMBOL();

struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
{}
EXPORT_SYMBOL();

int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
		    int flags)
{}
EXPORT_SYMBOL();

static long bt_sock_data_wait(struct sock *sk, long timeo)
{}

int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
			   size_t size, int flags)
{}
EXPORT_SYMBOL();

static inline __poll_t bt_accept_poll(struct sock *parent)
{}

__poll_t bt_sock_poll(struct file *file, struct socket *sock,
		      poll_table *wait)
{}
EXPORT_SYMBOL();

int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{}
EXPORT_SYMBOL();

/* This function expects the sk lock to be held when called */
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
{}
EXPORT_SYMBOL();

/* This function expects the sk lock to be held when called */
int bt_sock_wait_ready(struct sock *sk, unsigned int msg_flags)
{}
EXPORT_SYMBOL();

#ifdef CONFIG_PROC_FS
static void *bt_seq_start(struct seq_file *seq, loff_t *pos)
	__acquires(seq->private->l->lock)
{}

static void *bt_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{}

static void bt_seq_stop(struct seq_file *seq, void *v)
	__releases(seq->private->l->lock)
{}

static int bt_seq_show(struct seq_file *seq, void *v)
{}

static const struct seq_operations bt_seq_ops =;

int bt_procfs_init(struct net *net, const char *name,
		   struct bt_sock_list *sk_list,
		   int (*seq_show)(struct seq_file *, void *))
{}

void bt_procfs_cleanup(struct net *net, const char *name)
{}
#else
int bt_procfs_init(struct net *net, const char *name,
		   struct bt_sock_list *sk_list,
		   int (*seq_show)(struct seq_file *, void *))
{
	return 0;
}

void bt_procfs_cleanup(struct net *net, const char *name)
{
}
#endif
EXPORT_SYMBOL();
EXPORT_SYMBOL();

static const struct net_proto_family bt_sock_family_ops =;

struct dentry *bt_debugfs;
EXPORT_SYMBOL_GPL();

#define VERSION

static int __init bt_init(void)
{}

static void __exit bt_exit(void)
{}

subsys_initcall(bt_init);
module_exit(bt_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_LICENSE();
MODULE_ALIAS_NETPROTO();