|
From: Anders J. <and...@us...> - 2003-11-04 15:24:31
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Changed bt_inquiry call to return a list of found devices.
* Changed bt_read_remote_name to use HCIREMOTENAME_REQUEST.
* All output from inquiry shall be done from the calling application.
The diff of the modified file(s):
--- bt_if.c 2003/11/04 10:59:39 1.1
+++ bt_if.c 2003/11/04 15:24:30 1.2
@@ -393,7 +393,6 @@ void bt_showstatus(void)
#endif
}
=20
-/* fixme<1> -- add usermode stack version */
int
bt_send(int fd, int len, int repeat)
{
@@ -989,8 +988,8 @@ bt_write_page_scan_activity(int bt_cfd,=20
#endif
}
=20
-int
-bt_inquiry(int bt_cfd, int nbr_rsp, int t, int get_name)
+inquiry_results *
+bt_inquiry(int bt_cfd, int nbr_rsp, int t)
{
int retval =3D 0;
#ifdef BTD_USERSTACK
@@ -1004,13 +1003,12 @@ bt_inquiry(int bt_cfd, int nbr_rsp, int=20
=20
retval =3D hci_inquiry(inq_lap, t, nbr_rsp);
#else
- int i;
inquiry_results *inq_res;
=20
if (!(inq_res =3D malloc(sizeof *inq_res + nbr_rsp * 6)))
{
- fprintf(stderr, "%s: Failed to allocate result structure!\n", __FUNCTI=
ON__);
- return -ENOMEM;
+ fprintf(stderr, "Inquiry failed: %s\n", strerror(errno));
+ return NULL;
}
=20
inq_res->nbr_of_units =3D nbr_rsp;
@@ -1020,75 +1018,12 @@ bt_inquiry(int bt_cfd, int nbr_rsp, int=20
{
fprintf(stderr, "Inquiry failed [%s (%d)]\n", error_msg(retval), MSG_G=
ET_CODE(-retval));
free(inq_res);
- return retval;
- }
-
- if (get_name)
- {
- unsigned char name_device[255];
- /* First print the number of units found */
- printf("%d", inq_res->nbr_of_units);
-
- for (i =3D 0; i < inq_res->nbr_of_units; i++)
- {
- /* Copy BD_ADDR to send in ioctl */
- memcpy(name_device,inq_res->bd_addr + 6*i, 6);
-
- if ((retval =3D ioctl(bt_cfd, HCIREMOTENAME_REQUEST, name_device)) <=
0)
- {
- fprintf (stderr, "Remote name request failed [%s (%d)]\n", error_m=
sg(retval), MSG_GET_CODE(-retval));
- /* Test if the problem is that the IOCTL doesn't exist */
- if (errno =3D=3D EINVAL)
- fprintf(stderr, "btinq: error: the ioctl HCIREMOTENAME_REQUEST d=
oesn't exist in the driver");
- /* Print a default name */
- printf("\nDevice with unknown name");
- }
- else
- {
- switch (retval)
- {
- case 0x04: /* Page timeout */
- printf("\nDevice with unknown name");
- break;
-
- case 0x00:
- if (name_device[0] =3D=3D '\0')
- {
- printf("Device with empty name\n");
- }
- else
- {
- printf("\n%s", name_device);
- }
- break;
-
- default:
- printf("\nDevice with unrecoverable name");
- break;
- } /* Switch */
+ return NULL;
}
=20
- /* Print BD address */
- printf("\n%02x:%02x:%02x:%02x:%02x:%02x",
- inq_res->bd_addr[0+6*i], inq_res->bd_addr[1+6*i],
- inq_res->bd_addr[2+6*i], inq_res->bd_addr[3+6*i],
- inq_res->bd_addr[4+6*i], inq_res->bd_addr[5+6*i]);
- } /* End of loop on every addresses founded */
- } /* End of if get_name */
- else
- {
- /* Just write addresses as it was historically done */
- for (i =3D 0; i < inq_res->nbr_of_units; i++)
- {
- printf("BD %d: %02x:%02x:%02x:%02x:%02x:%02x\n",i,
- inq_res->bd_addr[0+6*i], inq_res->bd_addr[1+6*i],
- inq_res->bd_addr[2+6*i], inq_res->bd_addr[3+6*i],
- inq_res->bd_addr[4+6*i], inq_res->bd_addr[5+6*i]);
- }
- }
- free(inq_res);
+ return inq_res;
#endif
- return retval;
+ return inq_res;
}
=20
void
@@ -1235,18 +1170,25 @@ read_remote_bd(int bt_cfd, int line, uns
}
=20
int
-read_remote_name(int bt_cfd, int line, unsigned char *name, unsigned int l=
ength)
+read_remote_name(int bt_cfd, unsigned char *buf, unsigned int length)
{
-#ifndef BT_USERSTACK
- *(int*)name =3D line;
- *((int*)name+1) =3D length;
+ unsigned char tmpbuf[255];
+ int cpylen =3D length - 1;
+ memcpy(tmpbuf, buf, 6);
+ if(cpylen > 254)
+ {
+ cpylen =3D 254;
+ }
=20
- if (ioctl(bt_cfd, BTREADREMOTENAME, name) < 0)
+#ifndef BT_USERSTACK
+ if (ioctl(bt_cfd, HCIREMOTENAME_REQUEST, tmpbuf) < 0)
{
perror(__FUNCTION__);
return -1;
}
=20
+ memcpy(buf, tmpbuf, cpylen);
+ buf[cpylen] =3D 0;
return 0;
#else
fprintf(stderr, __FUNCTION__ ": Not yet implemented...\n");
--- bt_if.h 2003/11/04 10:59:39 1.1
+++ bt_if.h 2003/11/04 15:24:30 1.2
@@ -356,13 +356,13 @@ int bt_ping(int bt_cfd, unsigned char bd
int bt_getinfo(int bt_cfd, unsigned char bd[6], unsigned short type);
int bt_testcmd(int bt_cfd, unsigned char *cmd);
=20
-int bt_inquiry(int bt_cfd, int nbr_rsp, int t, int get_name);
+inquiry_results *bt_inquiry(int bt_cfd, int nbr_rsp, int t);
int bt_set_baudrate(int bt_cfd, const char *speedstr);
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);
void read_remote_class(int bt_cfd, unsigned char *bd_addr, unsigned char *=
remote_class);
-int read_remote_name(int bt_cfd, int line, unsigned char *name, unsigned i=
nt length);
+int read_remote_name(int bt_cfd, unsigned char *buf, unsigned int 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);
|
|
From: Anders J. <and...@us...> - 2003-11-06 19:12:10
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added IOCTL:s to write/read pincode type.
The diff of the modified file(s):
--- bt_if.c 2003/11/05 19:04:53 1.4
+++ bt_if.c 2003/11/06 19:12:09 1.5
@@ -1164,6 +1164,40 @@ int bt_read_country_code(int bt_cfd)
return result;
}
=20
+int bt_read_pin_type(int bt_cfd)
+{
+ int retval;
+ if (ioctl(bt_cfd, HCIREADPINTYPE, &retval) < 0)
+ {
+ perror(__FUNCTION__);
+ exit(1);
+ }
+
+ if(retval < 0)
+ {
+ fprintf(stderr, "Read pin type failed [%s (%d)]\n", error_msg(retval),=
MSG_GET_CODE(-retval));
+ } else {
+ printf("Pin type: %s\n", retval =3D=3D 0 ? "Variable" : "Fixed");
+ }
+ return retval;
+}
+
+int bt_write_pin_type(int bt_cfd, int type)
+{
+ if (ioctl(bt_cfd, HCIWRITEPINTYPE, &type) < 0)
+ {
+ perror(__FUNCTION__);
+ exit(1);
+ }
+ if(type < 0)
+ {
+ fprintf(stderr, "Write pin type failed [%s (%d)]\n", error_msg(type), =
MSG_GET_CODE(-type));
+ } else {
+ printf("Success!\n");
+ }
+ return type;
+}
+
/* =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 */
/* Misc functions */
=20
--- bt_if.h 2003/11/05 19:04:53 1.4
+++ bt_if.h 2003/11/06 19:12:09 1.5
@@ -190,6 +190,8 @@
#define HCIWRITEPAGETO _IOW(BT_IOC_MAGIC, 0x54, unsigned char[4])
#define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x57, unsigned char[=
3])
#define HCIWRITELINKSUPERVISIONTO _IOW(BT_IOC_MAGIC, 0x58, unsigned char[8=
])
+#define HCIWRITEPINTYPE _IOWR(BT_IOC_MAGIC, 0x60, int)
+#define HCIREADPINTYPE _IOWR(BT_IOC_MAGIC, 0x61, int)
=20
/* Informational Parameters */
=20
@@ -400,6 +402,11 @@ void set_local_hostname(int bt_cfd, cons
=20
/* Sets friendly name to name */
void bt_set_local_name(int bt_cfd, const unsigned char *name);
+
+/* Write / Read pin type */
+int bt_write_pin_type(int bt_cfd, int type);
+int bt_read_pin_type(int bt_cfd);
+
=20
/*
* Misc functions
|
|
From: Anders J. <and...@us...> - 2003-11-17 15:01:30
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added bt_read_ledenable and bt_write_ledenable
The diff of the modified file(s):
--- bt_if.c 2003/11/06 19:12:09 1.5
+++ bt_if.c 2003/11/17 15:00:47 1.6
@@ -1198,6 +1198,30 @@ int bt_write_pin_type(int bt_cfd, int ty
return type;
}
=20
+int bt_read_ledenable(int bt_cfd)
+{
+ int param =3D 0;
+ if (ioctl(bt_cfd, BTLEDSTATUS, ¶m) < 0)
+ {
+ perror(__FUNCTION__);
+ exit(1);
+ }
+
+ return param;
+}
+
+int bt_write_ledenable(int bt_cfd, unsigned char enable)
+{
+ int param =3D enable & 0x0f;
+ param |=3D 0xf0;
+ if (ioctl(bt_cfd, BTLEDSTATUS, ¶m) < 0)
+ {
+ perror(__FUNCTION__);
+ exit(1);
+ }
+ return 0;
+}
+
/* =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 */
/* Misc functions */
=20
--- bt_if.h 2003/11/06 19:12:09 1.5
+++ bt_if.h 2003/11/17 15:00:48 1.6
@@ -135,6 +135,9 @@
/* Disconnect all connections */
#define BTDISCONNECT_ALL _IO(BT_IOC_MAGIC, 0x14)
=20
+/* Read/Write LED enabled, CRIS-specific */
+#define BTLEDSTATUS _IOW(BT_IOC_MAGIC, 0x15, int)
+
/* =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
@@ -406,6 +409,10 @@ void bt_set_local_name(int bt_cfd, const
/* Write / Read pin type */
int bt_write_pin_type(int bt_cfd, int type);
int bt_read_pin_type(int bt_cfd);
+
+/* Read / Write led enable, cris-specific */
+int bt_read_ledenable(int bt_cfd);
+int bt_write_ledenable(int bt_cfd, unsigned char enable);
=20
=20
/*
|
|
From: Anders J. <and...@us...> - 2004-01-09 15:30:00
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added SDP-stuff.
The diff of the modified file(s):
--- bt_if.c 2003/11/17 15:00:47 1.6
+++ bt_if.c 2004/01/09 15:29:59 1.7
@@ -1222,6 +1222,30 @@ int bt_write_ledenable(int bt_cfd, unsig
return 0;
}
=20
+int sdp_connect(int bt_cfd, unsigned char *bd,
+ unsigned char *pin, int pinlen)
+{
+ unsigned int result =3D 0;
+ bt_connection con;
+=20=20
+ memcpy(con.bd, bd, 6);
+ memcpy(con.pincode.data, pin, MIN(pinlen, 0x10));
+ con.pincode.len =3D pinlen;
+=20=20
+ result =3D ioctl(bt_cfd, SDPCONNECT, &con);
+ if (result&0x0ff)
+ {
+ printf("SDP connect failed [%s ((0x%X))]\n",
+ error_msg(result & 0x0ff), result);
+ }
+ else
+ {
+ printf("SDP connected\n");
+ }
+ return result;
+}
+
+
/* =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 */
/* Misc functions */
=20
--- bt_if.h 2003/11/17 15:00:48 1.6
+++ bt_if.h 2004/01/09 15:29:59 1.7
@@ -123,7 +123,7 @@
#define BTWAITNEWCONNECTIONS _IO(BT_IOC_MAGIC, 0x0D)
#define BTISLOWERCONNECTED _IOW(BT_IOC_MAGIC, 0x0E, int)
=20
-//#define BT_SDP_REQUEST _IOW(BT_IOC_MAGIC, 0x0F, bt_sdp_request)
+#define BT_SDP_REQUEST _IOWR(BT_IOC_MAGIC, 0x0F, bt_sdp_request)
#define BT_GETCACHEDLINKKEY _IOWR(BT_IOC_MAGIC, 0x10, unsigned char[22])
=20
/* Disconnect the BB connection */
@@ -138,6 +138,9 @@
/* Read/Write LED enabled, CRIS-specific */
#define BTLEDSTATUS _IOW(BT_IOC_MAGIC, 0x15, int)
=20
+/* Initiate a SDP-connection */
+#define SDPCONNECT _IOW(BT_IOC_MAGIC, 0x16, bt_connection)
+
/* =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
@@ -304,6 +307,14 @@ typedef struct ping_struct
unsigned char data[1024];
} ping_struct;
=20
+typedef struct bt_sdp_request
+{
+ u_int16_t len;
+ u_int16_t allocated;
+ unsigned char bd[6];
+ unsigned char data[0];
+} __attribute__ ((packed)) bt_sdp_request;
+
/* =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 */
/* Functions common to both usermode and kernel stack */
=20
@@ -350,6 +361,9 @@ void bt_showstatus(void);
int bt_force_msswitch_as_server(int bt_cfd, int enable);
int bt_dont_allow_slave(int bt_cfd, int flag);
int bt_set_max_conections(int bt_cfd, int connections);
+
+/* SDP functions */
+int sdp_connect(int bt_cfd, unsigned char *bd, unsigned char *pin, int pin=
len);
=20
/*
* HCI command functions
|
|
From: Anders J. <and...@us...> - 2004-01-31 02:46:44
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added function to only connect basebaned.
Added function to do authentication and encryption.
The diff of the modified file(s):
--- bt_if.c 2004/01/20 17:55:52 1.8
+++ bt_if.c 2004/01/30 11:58:37 1.9
@@ -1245,6 +1245,29 @@ int sdp_connect(int bt_cfd, unsigned cha
return result;
}
=20
+int bb_connect(int bt_cfd, unsigned char *bd,
+ unsigned char *pin, int pinlen)
+{
+ int result =3D 0;
+ bt_connection con;
+=20=20
+ memcpy(con.bd, bd, 6);
+ memcpy(con.pincode.data, pin, MIN(pinlen, 0x10));
+ con.pincode.len =3D pinlen;
+=20=20
+ result =3D ioctl(bt_cfd, BBCONNECT, &con);
+ if (result&0x0ff)
+ {
+ printf("BB connect failed [%s ((0x%X))]\n",
+ error_msg(result), result);
+ }
+ else
+ {
+ printf("BB connected\n");
+ }
+ return result;
+}
+
=20
/* =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 */
/* Misc functions */
@@ -1412,6 +1435,26 @@ int start_sdp_server(void)
return sdpsrv_pid;
}
=20
+/* Will perform an authentication and then encrypt the link associated
+ with the BD */
+int
+bt_authenticate_encrypt(int bt_cfd, unsigned char *bd)
+{
+ int retval;
+ unsigned char rev_bd[6];
+ for(retval =3D 0; retval < 6 ; retval++)
+ {
+ rev_bd[5-retval] =3D bd[retval];
+ }
+=20=20
+ if ((retval =3D ioctl(bt_cfd, HCIAUTHENTICATION_ENCRYPTION, &rev_bd)) < =
0)
+ {
+ printf("Authentication/Encryption failed [%s ((0x%X))]\n",
+ error_msg(retval), retval & 0xff);
+ }
+ return retval;
+}
+
int strtobd(unsigned char *src, unsigned char *dst)
{
int bd[6], parseok =3D 0, i;
--- bt_if.h 2004/01/09 15:29:59 1.7
+++ bt_if.h 2004/01/30 11:58:37 1.8
@@ -141,6 +141,9 @@
/* Initiate a SDP-connection */
#define SDPCONNECT _IOW(BT_IOC_MAGIC, 0x16, bt_connection)
=20
+/* Initiate a baseband connection */
+#define BBCONNECT _IOW(BT_IOC_MAGIC, 0x17, bt_connection)
+
/* =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
@@ -155,6 +158,7 @@
#define HCISETCONNECTION_ENCRYPTION _IOW(BT_IOC_MAGIC, 0x26, unsigned char=
[7])
#define HCIREMOTENAME_REQUEST _IOW(BT_IOC_MAGIC, 0x27, unsigned char[255])
#define HCIREADCLOCKOFFSET _IOWR(BT_IOC_MAGIC, 0x53, unsigned char[4])
+#define HCIAUTHENTICATION_ENCRYPTION _IOW(BT_IOC_MAGIC, 0x66, unsigned cha=
r[6])
=20
/* Link Policy Commands */
=20
@@ -365,6 +369,9 @@ int bt_set_max_conections(int bt_cfd, in
/* SDP functions */
int sdp_connect(int bt_cfd, unsigned char *bd, unsigned char *pin, int pin=
len);
=20
+/* Baseband functions */
+int bb_connect(int bt_cfd, unsigned char *bd, unsigned char *pin, int pinl=
en);
+
/*
* HCI command functions
*/
@@ -428,6 +435,8 @@ int bt_read_pin_type(int bt_cfd);
int bt_read_ledenable(int bt_cfd);
int bt_write_ledenable(int bt_cfd, unsigned char enable);
=20
+/* Authenticate and encryption */
+int bt_authenticate_encrypt(int bt_cfd, unsigned char *bd);
=20
/*
* Misc functions
|
|
From: Anders J. <and...@us...> - 2004-02-10 00:22:46
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
bt_write_page_to argument changed to int.
The diff of the modified file(s):
--- bt_if.c 2004/01/30 11:58:37 1.9
+++ bt_if.c 2004/02/09 15:09:58 1.10
@@ -759,9 +759,9 @@ bt_write_num_broadcast_rtx(int bt_cfd, u
}
=20
void
-bt_write_page_to(int bt_cfd, unsigned char* page_to)
+bt_write_page_to(int bt_cfd, int page_to)
{
- if (ioctl(bt_cfd, HCIWRITEPAGETO, page_to) < 0)
+ if (ioctl(bt_cfd, HCIWRITEPAGETO, &page_to) < 0)
{
perror(__FUNCTION__);
}
--- bt_if.h 2004/01/30 11:58:37 1.8
+++ bt_if.h 2004/02/09 15:09:58 1.9
@@ -412,7 +412,7 @@ void bt_exit_sniff_mode(int bt_cfd, unsi
void bt_read_clock_offset(int bt_cfd, unsigned char* con_hdl);
void bt_read_num_broadcast_rtx(int bt_cfd);
void bt_write_num_broadcast_rtx(int bt_cfd, unsigned char* num_rtx);
-void bt_write_page_to(int bt_cfd, unsigned char* page_to);
+void bt_write_page_to(int bt_cfd, int page_to);
void bt_read_tx_power_level(int bt_cfd, unsigned char* tx_power_level);
void bt_write_link_supervision_to(int bt_cfd, unsigned char* link_to);
void bt_write_page_scan_activity(int bt_cfd, unsigned char* page_scan);
|
|
From: Anders J. <and...@us...> - 2004-02-12 22:39:19
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_misc.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_misc.h 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
get_local_ip_address now takes the device as argument.
The diff of the modified file(s):
--- bt_misc.c 2003/11/05 19:04:53 1.2
+++ bt_misc.c 2004/02/12 22:34:06 1.3
@@ -286,7 +286,7 @@ open_tcpsocket(const char *addrstr, int=20
* Retrieve the numerical IP address of eth0 for now.
*/
char *
-get_local_ip_address(void)
+get_local_ip_address(char *dev)
{
int fd;
struct ifreq ifr;
@@ -299,7 +299,7 @@ get_local_ip_address(void)
}
=20
ifr.ifr_addr.sa_family =3D AF_INET;
- strcpy(ifr.ifr_name, "eth0");
+ strcpy(ifr.ifr_name, dev);
if (ioctl(fd, SIOCGIFADDR, (int)&ifr) < 0)
{
syslog(LOG_INFO, "%s: Could not determine local IP address!", __FUNCTI=
ON__);
--- bt_misc.h 2003/11/05 19:04:53 1.2
+++ bt_misc.h 2004/02/12 22:34:06 1.3
@@ -63,7 +63,7 @@ int write_pidfile(const char *pidname);
=20
int restart_btd(void);
=20
-char *get_local_ip_address(void);
+char *get_local_ip_address(char *dev);
=20
char* get_domain_name(void);
=20
|
|
From: Anders J. <and...@us...> - 2004-04-14 17:55:53
|
The following files were modified in libs/openbt:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added functions for read/delete linkkeys.
The diff of the modified file(s):
--- bt_if.c 2004/02/09 15:09:58 1.10
+++ bt_if.c 2004/04/14 17:55:39 1.11
@@ -1268,6 +1268,26 @@ int bb_connect(int bt_cfd, unsigned char
return result;
}
=20
+int bt_read_stored_linkkey(int bt_cfd, unsigned char *bd,
+ int read_all)
+{
+ unsigned char data[7];
+ data[0] =3D read_all;
+ memcpy(data + 1, bd, 6);
+ return ioctl(bt_cfd, HCIREADSTOREDLINKKEY, data);
+}
+
+
+int bt_delete_stored_linkkey(int bt_cfd, unsigned char *bd,
+ int delete_all)
+{
+ unsigned char data[7];
+ data[0] =3D delete_all;
+ memcpy(data + 1, bd, 6);
+ return ioctl(bt_cfd, HCIDELETESTOREDLINKKEY, data);
+}
+
+
=20
/* =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 */
/* Misc functions */
--- bt_if.h 2004/02/09 15:09:58 1.9
+++ bt_if.h 2004/04/14 17:55:39 1.10
@@ -438,6 +438,11 @@ int bt_write_ledenable(int bt_cfd, unsig
/* Authenticate and encryption */
int bt_authenticate_encrypt(int bt_cfd, unsigned char *bd);
=20
+/* Read / Delete linkkeys */
+int bt_read_stored_linkkey(int bt_cfd, unsigned char *bd,
+ int read_all);
+int bt_delete_stored_linkkey(int bt_cfd, unsigned char *bd,
+ int delete_all);
/*
* Misc functions
*/
|