1 /****************************************************************************
2 ****************************************************************************
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.
10 ****************************************************************************
11 ****************************************************************************/
23 #define AF_BLUETOOTH 31
24 #define PF_BLUETOOTH AF_BLUETOOTH
27 #define SOL_BLUETOOTH 274
29 #define BTPROTO_L2CAP 0
32 #define BTPROTO_RFCOMM 3
33 #define BTPROTO_BNEP 4
34 #define BTPROTO_CMTP 5
35 #define BTPROTO_HIDP 6
36 #define BTPROTO_AVDTP 7
41 #if __BYTE_ORDER == __LITTLE_ENDIAN
46 #elif __BYTE_ORDER == __BIG_ENDIAN
47 #define htobs(d) bswap_16(d)
48 #define htobl(d) bswap_32(d)
49 #define btohs(d) bswap_16(d)
50 #define btohl(d) bswap_32(d)
52 #error "Unknown byte order"
54 #define bt_get_unaligned(ptr) ({ struct __attribute__((packed)) { typeof(*(ptr)) __v; } *__p = (void *) (ptr); __p->__v; })
55 #define bt_put_unaligned(val, ptr) do { struct __attribute__((packed)) { typeof(*(ptr)) __v; } *__p = (void *) (ptr); __p->__v = (val); } while(0)
56 #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
57 #define BDADDR_ALL (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
58 #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
64 } __attribute__ ((packed
)) bdaddr_t
;
66 bacpy (bdaddr_t
* dst
, const bdaddr_t
* src
)
68 memcpy (dst
, src
, sizeof (bdaddr_t
));