Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
bluetooth.h File Reference
#include <linux/poll.h>
#include <net/sock.h>
#include <linux/seq_file.h>

Go to the source code of this file.

Data Structures

struct  bt_security
 
struct  bt_power
 
struct  __packed
 
struct  bt_sock
 
struct  bt_sock_list
 
struct  l2cap_ctrl
 
struct  bt_skb_cb
 

Macros

#define AF_BLUETOOTH   31
 
#define PF_BLUETOOTH   AF_BLUETOOTH
 
#define BLUETOOTH_VER_1_1   1
 
#define BLUETOOTH_VER_1_2   2
 
#define BLUETOOTH_VER_2_0   3
 
#define BT_SKB_RESERVE   8
 
#define BTPROTO_L2CAP   0
 
#define BTPROTO_HCI   1
 
#define BTPROTO_SCO   2
 
#define BTPROTO_RFCOMM   3
 
#define BTPROTO_BNEP   4
 
#define BTPROTO_CMTP   5
 
#define BTPROTO_HIDP   6
 
#define BTPROTO_AVDTP   7
 
#define SOL_HCI   0
 
#define SOL_L2CAP   6
 
#define SOL_SCO   17
 
#define SOL_RFCOMM   18
 
#define BT_SECURITY   4
 
#define BT_SECURITY_SDP   0
 
#define BT_SECURITY_LOW   1
 
#define BT_SECURITY_MEDIUM   2
 
#define BT_SECURITY_HIGH   3
 
#define BT_DEFER_SETUP   7
 
#define BT_FLUSHABLE   8
 
#define BT_FLUSHABLE_OFF   0
 
#define BT_FLUSHABLE_ON   1
 
#define BT_POWER   9
 
#define BT_POWER_FORCE_ACTIVE_OFF   0
 
#define BT_POWER_FORCE_ACTIVE_ON   1
 
#define BT_CHANNEL_POLICY   10
 
#define BT_CHANNEL_POLICY_BREDR_ONLY   0
 
#define BT_CHANNEL_POLICY_BREDR_PREFERRED   1
 
#define BT_CHANNEL_POLICY_AMP_PREFERRED   2
 
#define BT_INFO(fmt,...)   bt_info(fmt "\n", ##__VA_ARGS__)
 
#define BT_ERR(fmt,...)   bt_err(fmt "\n", ##__VA_ARGS__)
 
#define BT_DBG(fmt,...)   pr_debug(fmt "\n", ##__VA_ARGS__)
 
#define BDADDR_BREDR   0x00
 
#define BDADDR_LE_PUBLIC   0x01
 
#define BDADDR_LE_RANDOM   0x02
 
#define BDADDR_ANY   (&(bdaddr_t) {{0, 0, 0, 0, 0, 0} })
 
#define BDADDR_LOCAL   (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} })
 
#define bt_sk(__sk)   ((struct bt_sock *) __sk)
 
#define bt_cb(skb)   ((struct bt_skb_cb *)((skb)->cb))
 

Enumerations

enum  {
  BT_CONNECTED = 1, BT_OPEN, BT_BOUND, BT_LISTEN,
  BT_CONNECT, BT_CONNECT2, BT_CONFIG, BT_DISCONN,
  BT_CLOSED
}
 
enum  { BT_SK_DEFER_SETUP, BT_SK_SUSPEND }
 

Functions

 __printf (1, 2) int bt_info(const char *fmt
 
void baswap (bdaddr_t *dst, bdaddr_t *src)
 
charbatostr (bdaddr_t *ba)
 
int bt_sock_register (int proto, const struct net_proto_family *ops)
 
int bt_sock_unregister (int proto)
 
void bt_sock_link (struct bt_sock_list *l, struct sock *s)
 
void bt_sock_unlink (struct bt_sock_list *l, struct sock *s)
 
int bt_sock_recvmsg (struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags)
 
int bt_sock_stream_recvmsg (struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags)
 
uint bt_sock_poll (struct file *file, struct socket *sock, poll_table *wait)
 
int bt_sock_ioctl (struct socket *sock, unsigned int cmd, unsigned long arg)
 
int bt_sock_wait_state (struct sock *sk, int state, unsigned long timeo)
 
void bt_accept_enqueue (struct sock *parent, struct sock *sk)
 
void bt_accept_unlink (struct sock *sk)
 
struct sockbt_accept_dequeue (struct sock *parent, struct socket *newsock)
 
int bt_to_errno (__u16 code)
 
int hci_sock_init (void)
 
void hci_sock_cleanup (void)
 
int bt_sysfs_init (void)
 
void bt_sysfs_cleanup (void)
 
int bt_procfs_init (struct module *module, 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)
 
int l2cap_init (void)
 
void l2cap_exit (void)
 
int sco_init (void)
 
void sco_exit (void)
 
void bt_sock_reclassify_lock (struct sock *sk, int proto)
 

Variables

struct dentrybt_debugfs
 

Macro Definition Documentation

#define AF_BLUETOOTH   31

Definition at line 33 of file bluetooth.h.

#define BDADDR_ANY   (&(bdaddr_t) {{0, 0, 0, 0, 0, 0} })

Definition at line 169 of file bluetooth.h.

#define BDADDR_BREDR   0x00

Definition at line 165 of file bluetooth.h.

#define BDADDR_LE_PUBLIC   0x01

Definition at line 166 of file bluetooth.h.

#define BDADDR_LE_RANDOM   0x02

Definition at line 167 of file bluetooth.h.

#define BDADDR_LOCAL   (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} })

Definition at line 170 of file bluetooth.h.

#define BLUETOOTH_VER_1_1   1

Definition at line 38 of file bluetooth.h.

#define BLUETOOTH_VER_1_2   2

Definition at line 39 of file bluetooth.h.

#define BLUETOOTH_VER_2_0   3

Definition at line 40 of file bluetooth.h.

#define bt_cb (   skb)    ((struct bt_skb_cb *)((skb)->cb))

Definition at line 248 of file bluetooth.h.

#define BT_CHANNEL_POLICY   10

Definition at line 83 of file bluetooth.h.

#define BT_CHANNEL_POLICY_AMP_PREFERRED   2

Definition at line 108 of file bluetooth.h.

#define BT_CHANNEL_POLICY_BREDR_ONLY   0

Definition at line 90 of file bluetooth.h.

#define BT_CHANNEL_POLICY_BREDR_PREFERRED   1

Definition at line 97 of file bluetooth.h.

#define BT_DBG (   fmt,
  ... 
)    pr_debug(fmt "\n", ##__VA_ARGS__)

Definition at line 117 of file bluetooth.h.

#define BT_DEFER_SETUP   7

Definition at line 69 of file bluetooth.h.

#define BT_ERR (   fmt,
  ... 
)    bt_err(fmt "\n", ##__VA_ARGS__)

Definition at line 116 of file bluetooth.h.

#define BT_FLUSHABLE   8

Definition at line 71 of file bluetooth.h.

#define BT_FLUSHABLE_OFF   0

Definition at line 73 of file bluetooth.h.

#define BT_FLUSHABLE_ON   1

Definition at line 74 of file bluetooth.h.

#define BT_INFO (   fmt,
  ... 
)    bt_info(fmt "\n", ##__VA_ARGS__)

Definition at line 115 of file bluetooth.h.

#define BT_POWER   9

Definition at line 76 of file bluetooth.h.

#define BT_POWER_FORCE_ACTIVE_OFF   0

Definition at line 80 of file bluetooth.h.

#define BT_POWER_FORCE_ACTIVE_ON   1

Definition at line 81 of file bluetooth.h.

#define BT_SECURITY   4

Definition at line 59 of file bluetooth.h.

#define BT_SECURITY_HIGH   3

Definition at line 67 of file bluetooth.h.

#define BT_SECURITY_LOW   1

Definition at line 65 of file bluetooth.h.

#define BT_SECURITY_MEDIUM   2

Definition at line 66 of file bluetooth.h.

#define BT_SECURITY_SDP   0

Definition at line 64 of file bluetooth.h.

#define bt_sk (   __sk)    ((struct bt_sock *) __sk)

Definition at line 187 of file bluetooth.h.

#define BT_SKB_RESERVE   8

Definition at line 43 of file bluetooth.h.

#define BTPROTO_AVDTP   7

Definition at line 52 of file bluetooth.h.

#define BTPROTO_BNEP   4

Definition at line 49 of file bluetooth.h.

#define BTPROTO_CMTP   5

Definition at line 50 of file bluetooth.h.

#define BTPROTO_HCI   1

Definition at line 46 of file bluetooth.h.

#define BTPROTO_HIDP   6

Definition at line 51 of file bluetooth.h.

#define BTPROTO_L2CAP   0

Definition at line 45 of file bluetooth.h.

#define BTPROTO_RFCOMM   3

Definition at line 48 of file bluetooth.h.

#define BTPROTO_SCO   2

Definition at line 47 of file bluetooth.h.

#define PF_BLUETOOTH   AF_BLUETOOTH

Definition at line 34 of file bluetooth.h.

#define SOL_HCI   0

Definition at line 54 of file bluetooth.h.

#define SOL_L2CAP   6

Definition at line 55 of file bluetooth.h.

#define SOL_RFCOMM   18

Definition at line 57 of file bluetooth.h.

#define SOL_SCO   17

Definition at line 56 of file bluetooth.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
BT_CONNECTED 
BT_OPEN 
BT_BOUND 
BT_LISTEN 
BT_CONNECT 
BT_CONNECT2 
BT_CONFIG 
BT_DISCONN 
BT_CLOSED 

Definition at line 120 of file bluetooth.h.

anonymous enum
Enumerator:
BT_SK_DEFER_SETUP 
BT_SK_SUSPEND 

Definition at line 198 of file bluetooth.h.

Function Documentation

__printf ( ,
 
) const
void baswap ( bdaddr_t *  dst,
bdaddr_t *  src 
)

Definition at line 33 of file lib.c.

char* batostr ( bdaddr_t *  ba)

Definition at line 44 of file lib.c.

struct sock* bt_accept_dequeue ( struct sock parent,
struct socket newsock 
)
read

Definition at line 183 of file af_bluetooth.c.

void bt_accept_enqueue ( struct sock parent,
struct sock sk 
)

Definition at line 161 of file af_bluetooth.c.

void bt_accept_unlink ( struct sock sk)

Definition at line 172 of file af_bluetooth.c.

void bt_procfs_cleanup ( struct net net,
const char name 
)

Definition at line 667 of file af_bluetooth.c.

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

Definition at line 660 of file af_bluetooth.c.

int bt_sock_ioctl ( struct socket sock,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 453 of file af_bluetooth.c.

void bt_sock_link ( struct bt_sock_list l,
struct sock s 
)

Definition at line 145 of file af_bluetooth.c.

uint bt_sock_poll ( struct file file,
struct socket sock,
poll_table wait 
)

Definition at line 411 of file af_bluetooth.c.

void bt_sock_reclassify_lock ( struct sock sk,
int  proto 
)

Definition at line 64 of file af_bluetooth.c.

int bt_sock_recvmsg ( struct kiocb iocb,
struct socket sock,
struct msghdr msg,
size_t  len,
int  flags 
)

Definition at line 219 of file af_bluetooth.c.

int bt_sock_register ( int  proto,
const struct net_proto_family ops 
)

Definition at line 75 of file af_bluetooth.c.

int bt_sock_stream_recvmsg ( struct kiocb iocb,
struct socket sock,
struct msghdr msg,
size_t  len,
int  flags 
)

Definition at line 288 of file af_bluetooth.c.

void bt_sock_unlink ( struct bt_sock_list l,
struct sock s 
)

Definition at line 153 of file af_bluetooth.c.

int bt_sock_unregister ( int  proto)

Definition at line 95 of file af_bluetooth.c.

int bt_sock_wait_state ( struct sock sk,
int  state,
unsigned long  timeo 
)

Definition at line 501 of file af_bluetooth.c.

void bt_sysfs_cleanup ( void  )

Definition at line 599 of file hci_sysfs.c.

int bt_sysfs_init ( void  )

Definition at line 588 of file hci_sysfs.c.

int bt_to_errno ( __u16  code)

Definition at line 59 of file lib.c.

void hci_sock_cleanup ( void  )

Definition at line 1126 of file hci_sock.c.

int hci_sock_init ( void  )

Definition at line 1096 of file hci_sock.c.

void l2cap_exit ( void  )

Definition at line 5665 of file l2cap_core.c.

int l2cap_init ( void  )

Definition at line 5647 of file l2cap_core.c.

void sco_exit ( void  )

Definition at line 1048 of file sco.c.

int sco_init ( void  )

Definition at line 1011 of file sco.c.

Variable Documentation

struct dentry* bt_debugfs

Definition at line 11 of file hci_sysfs.c.