1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Bluez header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to Android. It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __BLUETOOTH_H
20#define __BLUETOOTH_H
21#ifdef __cplusplus
22#endif
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <stdio.h>
25#include <stdint.h>
26#include <string.h>
27#include <endian.h>
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#include <byteswap.h>
30#ifndef AF_BLUETOOTH
31#define AF_BLUETOOTH 31
32#define PF_BLUETOOTH AF_BLUETOOTH
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#endif
35#define BTPROTO_L2CAP 0
36#define BTPROTO_HCI 1
37#define BTPROTO_SCO 2
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define BTPROTO_RFCOMM 3
40#define BTPROTO_BNEP 4
41#define BTPROTO_CMTP 5
42#define BTPROTO_HIDP 6
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define BTPROTO_AVDTP 7
45#define SOL_HCI 0
46#define SOL_L2CAP 6
47#define SOL_SCO 17
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define SOL_RFCOMM 18
50#ifndef SOL_BLUETOOTH
51#define SOL_BLUETOOTH 274
52#endif
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define BT_SECURITY 4
55struct bt_security {
56 uint8_t level;
57};
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define BT_SECURITY_SDP 0
60#define BT_SECURITY_LOW 1
61#define BT_SECURITY_MEDIUM 2
62#define BT_SECURITY_HIGH 3
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define BT_DEFER_SETUP 7
65#define BT_FLUSHABLE 8
66#define BT_FLUSHABLE_OFF 0
67#define BT_FLUSHABLE_ON 1
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define BT_POWER 9
70struct bt_power {
71 uint8_t force_active;
72};
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74enum {
75 BT_CONNECTED = 1,
76 BT_OPEN,
77 BT_BOUND,
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 BT_LISTEN,
80 BT_CONNECT,
81 BT_CONNECT2,
82 BT_CONFIG,
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 BT_DISCONN,
85 BT_CLOSED
86};
87#if __BYTE_ORDER == __LITTLE_ENDIAN
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define htobs(d) (d)
90#define htobl(d) (d)
91#define btohs(d) (d)
92#define btohl(d) (d)
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#elif __BYTE_ORDER == __BIG_ENDIAN
95#define htobs(d) bswap_16(d)
96#define htobl(d) bswap_32(d)
97#define btohs(d) bswap_16(d)
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define btohl(d) bswap_32(d)
100#else
101#error "Unknown byte order"
102#endif
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define bt_get_unaligned(ptr)  ({   struct __attribute__((packed)) {   typeof(*(ptr)) __v;   } *__p = (void *) (ptr);   __p->__v;  })
105#define bt_put_unaligned(val, ptr)  do {   struct __attribute__((packed)) {   typeof(*(ptr)) __v;   } *__p = (void *) (ptr);   __p->__v = (val);  } while(0)
106typedef struct {
107 uint8_t b[6];
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109} __attribute__((packed)) bdaddr_t;
110#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
111#define BDADDR_ALL (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
112#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#ifdef __cplusplus
115#endif
116#endif
117
118