The following files were modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.54 1.55=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.36 1.37=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added read_remote_name().
The diff of the modified file(s):
--- bt_if.c 7 Nov 2002 14:38:19 -0000 1.54
+++ bt_if.c 19 Nov 2002 14:15:46 -0000 1.55
@@ -1180,6 +1180,26 @@
#endif
}
=20
+int
+read_remote_name(int bt_cfd, int line, unsigned char *name, unsigned int l=
ength)
+{
+#ifndef BT_USERSTACK
+ *(int*)name =3D line;
+ *((int*)name+1) =3D length;
+
+ if (ioctl(bt_cfd, BTREADREMOTENAME, name) < 0)
+ {
+ perror(__FUNCTION__);
+ return -1;
+ }
+
+ return 0;
+#else
+ fprintf(stderr, __FUNCTION__ ": Not yet implemented...\n");
+ return -1;
+#endif
+}
+
int bt_write_scan_enable(int bt_cfd, unsigned int flags)
{
int result;
--- bt_if.h 6 Aug 2002 17:56:15 -0000 1.36
+++ bt_if.h 19 Nov 2002 14:15:46 -0000 1.37
@@ -1,7 +1,7 @@
/*
* bt_if.h -- Interface functions towards kernel / userstack
*
- * Copyright (C) 2000, 2001 Axis Communications AB
+ * Copyright (C) 2000, 2001, 2002 Axis Communications AB
*
* Author: Mattias Agren <mat...@ax...>
*
@@ -39,7 +39,6 @@
*
*/
=20=20
-
#ifndef __BT_IF_H__
#define __BT_IF_H__
=20
@@ -140,6 +139,8 @@
/* Disconnect the BB connection (Consafe) */
#define BTDISCONNECT_BB _IOW(BT_IOC_MAGIC, 0x11, unsigned char[6])
=20
+#define BTREADREMOTENAME _IOWR(BT_IOC_MAGIC, 0x12, unsigned char[BT_NAME_L=
ENGTH])
+
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
/* Ioctls for executing HCI commands */
=20
@@ -180,7 +181,7 @@
#define HCIREADSTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x33, unsigned char[7])
#define HCIWRITESTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x34, unsigned char[22])
#define HCIDELETESTOREDLINKKEY _IOWR(BT_IOC_MAGIC, 0x35, unsigned char[7])
-#define HCISETLOCALNAME _IOW(BT_IOC_MAGIC, 0x36, unsigned char[248])
+#define HCISETLOCALNAME _IOW(BT_IOC_MAGIC, 0x36, unsigned char[BT_NAME_LEN=
GTH])
#define HCIREADSCANENABLE _IOR(BT_IOC_MAGIC, 0x37, int)
#define HCIWRITESCANENABLE _IOW(BT_IOC_MAGIC, 0x38, int)
#define HCIWRITEPAGESCANACTIVITY _IOW(BT_IOC_MAGIC, 0x39, unsigned int[2])
@@ -196,7 +197,6 @@
#define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x57, unsigned char[=
3])
#define HCIWRITELINKSUPERVISIONTO _IOW(BT_IOC_MAGIC, 0x58, unsigned char[8=
])
=20=20
-
/* Informational Parameters */
=20
#define HCIREADCOUNTRYCODE _IOR(BT_IOC_MAGIC, 0x43, int)
@@ -358,6 +358,7 @@
void bt_set_bd_addr(int bt_cfd, unsigned char *bd);
void read_local_bd(int bt_cfd, unsigned char *bd_addr);
void read_remote_bd(int bt_cfd, int line, unsigned char *bd_addr);
+int read_remote_name(int bt_cfd, int line, unsigned char *name, unsigned i=
nt length);
void role_switch(int bt_cfd, unsigned char *bd_addr, int role);
=20
int bt_set_event_filter(int bt_cfd, unsigned char *filter, int len);
|