BTRFS: Reimplement TreeIterator, add some error checks and remove redundancies.
[haiku.git] / headers / os / bluetooth / bluetooth.h
blob72f18559dec475e6b4f0a6ef079ab8497abe2de0
1 /*
2 * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
3 * Copyright 2008 Mika Lindqvist, monni1995_at_gmail.com
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6 #ifndef _BLUETOOTH_H
7 #define _BLUETOOTH_H
9 #include <ByteOrder.h>
11 /* Bluetooth version */
12 #define BLUETOOTH_1_1B 0
13 #define BLUETOOTH_1_1 1
14 #define BLUETOOTH_1_2 2
15 #define BLUETOOTH_2_0 3
17 #define BLUETOOTH_VERSION BLUETOOTH_2_0
20 /* Bluetooth common types */
22 /* BD Address */
23 typedef struct {
24 uint8 b[6];
25 } __attribute__((packed)) bdaddr_t;
28 #define BDADDR_NULL ((bdaddr_t) {{0, 0, 0, 0, 0, 0}})
29 #define BDADDR_LOCAL ((bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
30 #define BDADDR_BROADCAST ((bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
31 #define BDADDR_ANY BDADDR_BROADCAST
34 /* Link key */
35 typedef struct {
36 uint8 l[16];
37 } __attribute__((packed)) linkkey_t;
40 /* 128 integer type needed for SDP */
41 struct int128 {
42 int8 b[16];
44 typedef struct int128 int128;
45 typedef struct int128 uint128;
47 /* Protocol definitions - add to as required... */
48 #define BLUETOOTH_PROTO_HCI 134 /* HCI protocol number */
49 #define BLUETOOTH_PROTO_L2CAP 135 /* L2CAP protocol number */
50 #define BLUETOOTH_PROTO_RFCOMM 136 /* RFCOMM protocol number */
52 #define BLUETOOTH_PROTO_MAX 256
55 #endif // _BLUETOOTH_H