#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"
#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(…);
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(…);
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
{ … }
EXPORT_SYMBOL(…);
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(…);