aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-helper-transport-bluetooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-helper-transport-bluetooth.c')
-rw-r--r--src/transport/gnunet-helper-transport-bluetooth.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c
index 4923e6428..d16cec981 100644
--- a/src/transport/gnunet-helper-transport-bluetooth.c
+++ b/src/transport/gnunet-helper-transport-bluetooth.c
@@ -21,18 +21,31 @@
21 */ 21 */
22#include "gnunet_config.h" 22#include "gnunet_config.h"
23 23
24#include <sys/param.h>
25#if defined(__linux__)
24#include <bluetooth/bluetooth.h> 26#include <bluetooth/bluetooth.h>
25#include <bluetooth/hci.h> 27#include <bluetooth/hci.h>
26#include <bluetooth/hci_lib.h> 28#include <bluetooth/hci_lib.h>
27#include <bluetooth/rfcomm.h> 29#include <bluetooth/rfcomm.h>
28#include <bluetooth/sdp.h> 30#include <bluetooth/sdp.h>
29#include <bluetooth/sdp_lib.h> 31#include <bluetooth/sdp_lib.h>
32#endif
33#if defined(BSD) && defined(__NetBSD__)
34#include <netbt/bluetooth.h>
35#include <netbt/hci.h>
36#include <netbt/l2cap.h>
37#include <netbt/rfcomm.h>
38#endif
30#include <errno.h> 39#include <errno.h>
40#if defined(__linux__)
31#include <linux/if.h> 41#include <linux/if.h>
42#endif
43#if defined(BSD)
44#include <net/if.h>
45#endif
32#include <stdio.h> 46#include <stdio.h>
33#include <stdlib.h> 47#include <stdlib.h>
34#include <sys/ioctl.h> 48#include <sys/ioctl.h>
35#include <sys/param.h>
36#include <sys/socket.h> 49#include <sys/socket.h>
37#include <sys/stat.h> 50#include <sys/stat.h>
38#include <sys/types.h> 51#include <sys/types.h>
@@ -166,7 +179,7 @@ static struct SendBuffer write_pout;
166static struct SendBuffer write_std; 179static struct SendBuffer write_std;
167 180
168 181
169/* ****** this are the same functions as the ones used in gnunet-helper-transport-wlan.c ****** */ 182/* ****** these are the same functions as the ones used in gnunet-helper-transport-wlan.c ****** */
170 183
171/** 184/**
172 * To what multiple do we align messages? 8 byte should suffice for everyone 185 * To what multiple do we align messages? 8 byte should suffice for everyone
@@ -615,7 +628,8 @@ register_service (struct HardwareInfos *dev, int rc_channel)
615 * 5. set the name, provider and description 628 * 5. set the name, provider and description
616 * 6. register the service record to the local SDP server 629 * 6. register the service record to the local SDP server
617 * 7. cleanup 630 * 7. cleanup
618 */uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 631 */
632 uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
619 dev->pl_mac.mac[5], dev->pl_mac.mac[4], 633 dev->pl_mac.mac[5], dev->pl_mac.mac[4],
620 dev->pl_mac.mac[3], 634 dev->pl_mac.mac[3],
621 dev->pl_mac.mac[2], dev->pl_mac.mac[1], 635 dev->pl_mac.mac[2], dev->pl_mac.mac[1],