You can subscribe to this list here.
| 2001 |
Jan
|
Feb
(44) |
Mar
(202) |
Apr
(134) |
May
(89) |
Jun
(94) |
Jul
(58) |
Aug
(58) |
Sep
(56) |
Oct
(75) |
Nov
(26) |
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(24) |
Feb
(30) |
Mar
(15) |
Apr
(49) |
May
(12) |
Jun
(6) |
Jul
(11) |
Aug
(20) |
Sep
(19) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
| 2003 |
Jan
(7) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(51) |
Dec
(1) |
| 2004 |
Jan
(11) |
Feb
(5) |
Mar
|
Apr
(5) |
May
(2) |
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Anders J. <and...@us...> - 2002-03-08 09:30:27
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btmem.h 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added separate define for memsize when running PAN. The diff of the modified file(s): --- btmem.h 24 Jan 2002 12:37:40 -0000 1.22 +++ btmem.h 8 Mar 2002 09:30:24 -0000 1.23 @@ -53,11 +53,14 @@ #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ - +#ifdef CONFIG_BLUETOOTH_PAN +#define BT_BUF_SIZE 25000 +#else #ifdef CONFIG_BLUETOOTH_UNPLUG_TEST=20 #define BT_BUF_SIZE 20000 #else #define BT_BUF_SIZE 2500 +#endif #endif =20 /* There should be less than this amomunt of data in the buffer before we = wake |
|
From: Anders J. <and...@us...> - 2002-03-07 21:34:10
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bttest.c 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Updated to reflect changes in test.c.
The diff of the modified file(s):
--- bttest.c 6 Feb 2002 11:31:56 -0000 1.24
+++ bttest.c 7 Mar 2002 21:34:09 -0000 1.25
@@ -565,16 +565,6 @@
hotlist[i][0], hotlist[i][1], hotlist[i][2], hotlist[i][3], h=
otlist[i][4], hotlist[i][5]);
}
}
- else if(strcmp(buf, "test_case_disable_disconnect") =3D=3D 0)
- {
- printf("Disabling sending of disconnect respons\n");
- bt_testcmd(bt_cfd, buf);
- }
- else if(strcmp(buf, "test_case_enable_disconnect") =3D=3D 0)
- {
- printf("Enabling sending of disconnect respons\n");
- bt_testcmd(bt_cfd, buf);
- }=20=20=20
else if(sscanf(buf, "bnep_test %d %d",=20
&tmp[0], &tmp[1]) =3D=3D 2)
{=20
@@ -598,7 +588,10 @@
printf("Remote Name (%02X:%02X:%02X:%02X:%02X:%02X): %s\n",=20
bd[0], bd[1], bd[2], bd[3], bd[4], bd[5], remote_name);
}
-
+ else if(strncmp(buf, "test_case_", 10) =3D=3D 0)
+ {
+ bt_testcmd(bt_cfd, buf);
+ }
else
{
printf("> error: command not recognized or wrong syntax\n");
|
|
From: Anders J. <and...@us...> - 2002-03-07 21:32:30
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.194 1.195=20=20=20=20=20=20=20=20=20=20=20
sdp.c 1.86 1.87=20=20=20=20=20=20=20=20=20=20=20=20
test.c 1.33 1.34=20=20=20=20=20=20=20=20=20=20=20=20
unplug_test.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added some testcases to test.c
* Added complete SDP-tests according to latest test-specifications. To be u=
sed with
the sdp-test database located in the sdp_server directory.
* Temporarily disabled the connect_cfm message which originally was intende=
d to
let the user know that we got at connection cfm.
* Make sure we don't wait for additional ACL-data forever. If we receive a =
second
packet when we expect continious data from a previous packet we should di=
scard
the previous data or else a new buffer will be allocated and after a coup=
le
of thoose we run out of inbuffers.
The diff of the modified file(s):
--- hci.c 28 Feb 2002 20:12:15 -0000 1.194
+++ hci.c 7 Mar 2002 21:32:29 -0000 1.195
@@ -486,6 +486,21 @@
=20
if (pb_flag =3D=3D L2CAP_FRAME_START) {
D_REC(__FUNCTION__ ": New frame\n");
+=09=09=09=09=09
+ /* BT Specification Part D 2.4.1: All segments associated
+ with and L2CAP packet must be passed through to the=20
+ baseband before any other L2CAP packet destined to=20
+ the same unit may be sent. This means if we got a=20
+ new L2CAP packet while we expecting another segment
+ of the previous packet something is wrong. This may
+ be a result of wrong length-indicator in the l2cap
+ header and we silently discard the previous packet */
+
+ if(get_inbuffer(hci_hdl)) {
+ D_ERR(__FUNCTION__ ": Discarding data in previous buffer\n");
+ hci_clear_buffer(hci_hdl);
+ }
+=09=09=09=09=09
in_buf =3D get_free_inbuffer();
if (in_buf) {
in_buf->nbr_of_hci_pkt =3D 1;
@@ -1805,6 +1820,7 @@
in_buf->l2cap_len =3D 0;
in_buf->empty =3D TRUE;
in_buf->nbr_of_hci_pkt =3D 0;
+ in_buf->hci_hdl =3D 0;
}
=20
/* Finds the in buffer for a given connection handler */
@@ -1821,7 +1837,6 @@
}
=20
if (i >=3D NBR_OF_HCI_INBUFFERS) {
- D_ERR(__FUNCTION__ ": WARNING! No inbuffer with hci_hdl %d\n", hci_hdl);
return NULL;
}
=20=09
@@ -1898,6 +1913,7 @@
hci_ctrl.hci_in_buf[i].l2cap_len =3D 0;
hci_ctrl.hci_in_buf[i].empty =3D TRUE;
hci_ctrl.hci_in_buf[i].nbr_of_hci_pkt =3D 0;
+ hci_ctrl.hci_in_buf[i].hci_hdl =3D 0;
}
=20=09
for (i =3D 0; i < MAX_NBR_OF_CONNECTIONS; i ++) {
--- sdp.c 25 Feb 2002 14:28:19 -0000 1.86
+++ sdp.c 7 Mar 2002 21:32:29 -0000 1.87
@@ -521,7 +521,7 @@
=20=20=20
if (status) {
DSYS(__FUNCTION__ " Connection failed\n");
- bt_connect_cfm(CREATE_SDP_ID(sdp->line, 0), -1);
+ //bt_connect_cfm(CREATE_SDP_ID(sdp->line, 0), -1);
return;
}
=20
--- test.c 25 Feb 2002 14:08:37 -0000 1.33
+++ test.c 7 Mar 2002 21:32:28 -0000 1.34
@@ -134,8 +134,15 @@
s32 use_multiple_conf_params =3D 0;
s32 disable_testpsm =3D 0;
s32 dont_send_disconnect_rsp =3D 0;
+s32 dont_accept_mtu =3D 0;
+s32 use_contflag =3D 0;
+s32 send_null_config =3D 0;
+s32 add_value =3D 0;
+s32 dont_send_connect_response =3D 0;
+
=20
u8 testdata[UPTEST_DATA_LEN];
+u16 contflag=3D0;
=20
#ifdef __KERNEL__
#define strtoul simple_strtoul
@@ -225,6 +232,7 @@
}
=20
/* start 5 sec timer */=09=09
+ if(!dont_send_connect_response) {
#ifdef __KERNEL__
init_timer(&test_timer);
test_timer.function =3D test_timeout;
@@ -236,6 +244,12 @@
sleep(5);
#endif
}
+ }
+
+ if(dont_send_connect_response) {
+ return;
+ }
+=09
=20=09
if (disable_testpsm =3D=3D 1)
{
@@ -302,11 +316,21 @@
if (use_multiple_conf_params) {
if (l2ca_config_req(con, 1280, NULL, 0x1234, 0)) {
D_ERR("test_config_cfm : Configuration request failed\n"); }
- } else {
+ } else if(use_contflag) {
+ contflag =3D 1;
+ if (l2ca_config_req(con, 1280, NULL, 0, 0)) {
+ D_ERR("test_config_cfm : Configuration request failed\n"); }
+ } else if(send_null_config) {
+ send_null_config =3D 0;
if (l2ca_config_req(con, 0, NULL, 0, 0)) {
D_ERR("test_config_cfm : Configuration request failed\n"); }
+ } else {
+ if (l2ca_config_req(con, 1280, NULL, 0, 0)) {
+ D_ERR("test_config_cfm : Configuration request failed\n"); }
}
=20=09=09
+=09=09
+=09=09
/* store connection */
if (con->psm =3D=3D L2CAP_TEST_LAYER)
testcon =3D con;
@@ -326,7 +350,14 @@
D_STATE("test_config_ind : remote cid : %d remote_mtu : %d\n",=20
con->remote_cid, con->remote_mtu);
=20
- if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) {
+ if(dont_accept_mtu) {
+ if (l2ca_config_rsp(con, 640, NULL, CONF_FAILURE)) {
+ D_ERR("test_config_ind : Configuration response failed\n");
+=09=09=09
+ }
+ dont_accept_mtu =3D 0;
+ }
+ else if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) {
D_ERR("test_config_ind : Configuration response failed\n");
=20=09=09=09
}
@@ -369,6 +400,19 @@
void test_config_cfm(l2cap_con *con, s32 status)
{
D_STATE("test_config_cfm : remote cid : %d\n", con->remote_cid);
+ if(status) {
+ if(l2ca_config_req(con, con->remote_mtu, &con->remote_qos, con->flush_ti=
meout, 0)) {
+ D_ERR("test_config_cfm : Configuration request failed\n");=20
+ }
+ return;
+ }=09
+
+ if(contflag) {
+ contflag =3D 0;
+ if (l2ca_config_req(con, 0, NULL, 0x1234, 0)) {
+ D_ERR("test_config_cfm : Configuration request failed\n");=20
+ }
+ }
=20=09
if(con->current_state =3D=3D OPEN) {
D_STATE("Now we have an open l2cap channel\n");
@@ -509,6 +553,16 @@
}
=20
return test_send_data(con, testdata, len);
+ } else if(!strncmp(cmd, "set_error ", 10)) {
+ int pos =3D 10, n =3D 0;
+ if(*(cmd + 10) =3D=3D '-') {
+ n =3D -(strtoul(cmd + 11, NULL, 0));
+ } else {
+ n =3D strtoul(cmd + 10, NULL, 0);
+ }
+ printk("Setting l2cap size error value =3D %d\n", n);
+=09=09
+ add_value =3D n;
} else if(!strncmp(cmd, "sdptest ", 8)) {
int n =3D strtoul(cmd+8, NULL, 0);=09
return do_sdp_test(n);
@@ -517,6 +571,15 @@
return 0;
} else if(!strcmp(cmd, "test_case_enable_disconnect")) {
dont_send_disconnect_rsp =3D 0;
+ return 0;
+ } else if(!strcmp(cmd, "test_case_dont_accept_mtu")) {
+ dont_accept_mtu =3D 1;
+ return 0;
+ } else if(!strcmp(cmd, "test_case_send_null_config")) {
+ send_null_config =3D 1;
+ return 0;
+ } else if(!strncmp(cmd, "dont_send_connect_response ", 27)) {
+ dont_send_connect_response =3D strtoul(cmd+27, NULL, 0);
return 0;
} else {
printk("Unknown test cmd!\n");
--- unplug_test.c 9 Jan 2002 10:55:58 -0000 1.9
+++ unplug_test.c 7 Mar 2002 21:32:28 -0000 1.10
@@ -165,48 +165,204 @@
=20
/* UUID 16 */
unsigned char sdp_data_52111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
- 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
+ 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x00 };
=20
/* UUID 32 */
unsigned char sdp_data_52111_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
- 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff,
0x00 };
=20
/* UUID 128 */
unsigned char sdp_data_52111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
0x35, 0x11,=20
0x1c,=20
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
0x00, 0xff,
0x00 };
=20
=20
-unsigned char sdp_data_52113_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
- 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0x01,
+unsigned char sdp_data_52112_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x29,
+ 0x35, 0x24,=20
+ 0x19, 0x10, 0x00,=20
+ 0x19, 0x10, 0x02,=20
+ 0x19, 0x11, 0x03,
+ 0x19, 0x11, 0x05,
+ 0x19, 0x13, 0x00,
+ 0x19, 0x13, 0x01,
+ 0x19, 0x13, 0x02,
+ 0x19, 0x13, 0x03,
+ 0x19, 0x13, 0x04,
+ 0x19, 0x13, 0x05,
+ 0x19, 0x13, 0x06,
+ 0x19, 0x13, 0x07,
+ 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_52113_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x09,
- 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0x01,
+unsigned char sdp_data_52112_2[] =3D { 0x02, 0x77, 0x78, 0x00, 0x2a,
+ 0x35, 0x24,=20
+ 0x19, 0x10, 0x00,=20
+ 0x19, 0x10, 0x02,=20
+ 0x19, 0x11, 0x03,
+ 0x19, 0x11, 0x05,
+ 0x19, 0x13, 0x00,
+ 0x19, 0x13, 0x01,
+ 0x19, 0x13, 0x02,
+ 0x19, 0x13, 0x03,
+ 0x19, 0x13, 0x04,
+ 0x19, 0x13, 0x05,
+ 0x19, 0x13, 0x06,
+ 0x19, 0x13, 0x07,
+ 0x00, 0xff,
0x01, 0x00 };
=20
-unsigned char sdp_data_52114[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+unsigned char sdp_data_52112_3[] =3D { 0x02, 0x77, 0x79, 0x00, 0x41,
+ 0x35, 0x3c,=20
+ 0x1a, 0x00, 0x00, 0x10, 0x00,=20
+ 0x1a, 0x00, 0x00, 0x10, 0x02,=20
+ 0x1a, 0x00, 0x00, 0x11, 0x03,
+ 0x1a, 0x00, 0x00, 0x11, 0x05,
+ 0x1a, 0x00, 0x00, 0x13, 0x00,
+ 0x1a, 0x00, 0x00, 0x13, 0x01,
+ 0x1a, 0x00, 0x00, 0x13, 0x02,
+ 0x1a, 0x00, 0x00, 0x13, 0x03,
+ 0x1a, 0x00, 0x00, 0x13, 0x04,
+ 0x1a, 0x00, 0x00, 0x13, 0x05,
+ 0x1a, 0x00, 0x00, 0x13, 0x06,
+ 0x1a, 0x00, 0x00, 0x13, 0x07,
+ 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_52112_4[] =3D { 0x02, 0x77, 0x80, 0x00, 0x42,
+ 0x35, 0x3c,=20
+ 0x1a, 0x00, 0x00, 0x10, 0x00,=20
+ 0x1a, 0x00, 0x00, 0x10, 0x02,=20
+ 0x1a, 0x00, 0x00, 0x11, 0x03,
+ 0x1a, 0x00, 0x00, 0x11, 0x05,
+ 0x1a, 0x00, 0x00, 0x13, 0x00,
+ 0x1a, 0x00, 0x00, 0x13, 0x01,
+ 0x1a, 0x00, 0x00, 0x13, 0x02,
+ 0x1a, 0x00, 0x00, 0x13, 0x03,
+ 0x1a, 0x00, 0x00, 0x13, 0x04,
+ 0x1a, 0x00, 0x00, 0x13, 0x05,
+ 0x1a, 0x00, 0x00, 0x13, 0x06,
+ 0x1a, 0x00, 0x00, 0x13, 0x07,
+ 0x00, 0xff,
+ 0x01, 0x00 };
+
+
+
+unsigned char sdp_data_52112_5[] =3D { 0x02, 0x77, 0x81, 0x00, 0xd1,
+ 0x35, 0xcc,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,
+ 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,
+ 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x03, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x04, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x05, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x06, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x07, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_52112_6[] =3D { 0x02, 0x77, 0x82, 0x00, 0xd2,
+ 0x35, 0xcc,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,
+ 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,
+ 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x03, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x04, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x05, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x06, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x1c,=20
+ 0x00, 0x00, 0x13, 0x07, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x01, 0x00 };
+
+unsigned char sdp_data_52113_1[] =3D { 0x02, 0x77, 0x83, 0x00, 0x08,
0x35, 0x03, 0x19, 0x12, 0x34, 0x00, 0xff,
0x00 };
=20
+unsigned char sdp_data_52113_2[] =3D { 0x02, 0x77, 0x84, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x12, 0x34, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_52113_3[] =3D { 0x02, 0x77, 0x85, 0x00, 0x16,
+ 0x35, 0x11,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x00 };
+
/* UUID 16 */
-unsigned char sdp_data_52121_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+unsigned char sdp_data_52121_1[] =3D { 0x02, 0x77, 0x86, 0x00, 0x0a,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
0x00 };
=20
/* UUID 32 */
-unsigned char sdp_data_52121_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0c,
+unsigned char sdp_data_52121_2[] =3D { 0x02, 0x77, 0x87, 0x00, 0x0c,
0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff,
0x00 };
=20
/* UUID 128 */
-unsigned char sdp_data_52121_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x18,
+unsigned char sdp_data_52121_3[] =3D { 0x02, 0x77, 0x88, 0x00, 0x18,
0x35, 0x11,=20
0x1c,=20
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00,
@@ -214,48 +370,90 @@
0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_52122[] =3D { 0x02, 0x77, 0x77, 0x00, 0x06,
- 0x19, 0x00, 0x01, 0x00, 0xff, 0x00 };
=20=20=20
-unsigned char sdp_data_53111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+unsigned char sdp_data_52122_1[] =3D { 0x02, 0x77, 0x89, 0x00, 0x06,
+ 0x19, 0x00, 0x01,=20
+ 0x00, 0xff, 0x00 };
+
+unsigned char sdp_data_52122_2[] =3D { 0x02, 0x77, 0x89, 0x00, 0x08,
+ 0x1a, 0x00, 0x00, 0x00, 0x01,=20
+ 0x00, 0xff, 0x00 };
+
+unsigned char sdp_data_52122_3[] =3D { 0x02, 0x77, 0x89, 0x00, 0x14,
+ 0x1c,=20
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,=20
+ 0x00, 0xff, 0x00 };
+
+
+=20=20
+unsigned char sdp_data_53111_1[] =3D { 0x02, 0x77, 0x90, 0x00, 0x08,
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_53111_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+unsigned char sdp_data_53111_2[] =3D { 0x04, 0x88, 0x91, 0x00, 0x0c,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
=20
=20
+unsigned char sdp_data_53112_1[] =3D { 0x02, 0x77, 0x90, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+ 0x00 };
=20
-unsigned char sdp_data_53113_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x35,
+unsigned char sdp_data_53112_2[] =3D { 0x04, 0x88, 0x92, 0x00, 0x0c,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
=20
+unsigned char sdp_data_53112_3[] =3D { 0x04, 0x88, 0x92, 0x00, 0x0d,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x35,
+ 0x03, 0x09, 0x00, 0x01, 0x01, 0x00 };
+
+unsigned char sdp_data_53113_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+ 0x00 };
+
unsigned char sdp_data_53113_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x35,
- 0x03, 0x09, 0x00, 0x01, 0x01 };
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x03, 0x00 };
=20
-unsigned char sdp_data_53114[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x03, 0x09, 0x00, 0x01, 0x00 };
+unsigned char sdp_data_53114_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x00 };
=20
-unsigned char sdp_data_53115[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+unsigned char sdp_data_53114_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x04, 0x00 };
=20
-unsigned char sdp_data_53118[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+unsigned char sdp_data_53117_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_53117_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x05, 0x00 };
=20
-unsigned char sdp_data_531110[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+
+unsigned char sdp_data_53119_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_53119_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x08, 0x00 };
=20
-unsigned char sdp_data_531117[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+unsigned char sdp_data_531116_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_531116_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x09, 0x00 };
=20
-unsigned char sdp_data_531120[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+unsigned char sdp_data_531119_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_531119_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x01, 0xff, 0x00 };
=20
@@ -284,133 +482,221 @@
0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x01, 0x00};
=20
-
-unsigned char sdp_data_54112[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+unsigned char sdp_data_54112_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
0x35, 0x03, 0x09, 0x01, 0xff, 0x00 };
=20
-unsigned char sdp_data_54113[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+unsigned char sdp_data_54112_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 };
+
+unsigned char sdp_data_54112_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x01, 0=
xff, 0x00};
+
+unsigned char sdp_data_54113_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x03, 0x19, 0x12, 0x34, 0x00, 0xff,
0x35, 0x03, 0x09, 0x01, 0xff, 0x00 };
=20
-unsigned char sdp_data_54114[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+unsigned char sdp_data_54113_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x12, 0x34, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x01, 0xff, 0x00 };
+
+unsigned char sdp_data_54113_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x01, 0=
xff, 0x00};
+
+
+
+unsigned char sdp_data_54114_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
-unsigned char sdp_data_54116_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
- 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x06,
+unsigned char sdp_data_54114_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
-unsigned char sdp_data_54116_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0e,
- 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x06,
+unsigned char sdp_data_54114_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x01, 0x00};
+
+
+unsigned char sdp_data_54115_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x07,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+unsigned char sdp_data_54115_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0e,
+ 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0x07,
0x35, 0x03, 0x09, 0x00, 0x01, 0x01, 0x00 };
=20
-unsigned char sdp_data_541110[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
- 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+unsigned char sdp_data_54115_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07,
0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
-unsigned char sdp_data_541111[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+unsigned char sdp_data_54115_4[] =3D { 0x06, 0x88, 0x88, 0x00, 0x10,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x01, 0x00 };
+
+unsigned char sdp_data_54115_5[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0x07 ,0x35, 0x03, 0x09, 0x00, 0=
x01, 0x00};
+
+unsigned char sdp_data_54115_6[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1c, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0x07 ,0x35, 0x03, 0x09, 0x00, 0=
x01, 0x01, 0x00};
+
+unsigned char sdp_data_54119_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x03, 0x00 };
+
+unsigned char sdp_data_54119_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x03, 0x00 };
+
+unsigned char sdp_data_54119_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x03, 0x00};
+
+unsigned char sdp_data_541110_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x04, 0x00 };
=20
-unsigned char sdp_data_541112[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
- 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+unsigned char sdp_data_541110_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x04, 0x00 };
+
+unsigned char sdp_data_541110_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35=
, 0x11, 0x1c,
+ 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x04, 0x00};
+
+unsigned char sdp_data_541111_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x05, 0x00 };
=20
-unsigned char sdp_data_541120[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
- 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+unsigned char sdp_data_541111_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 };
+
+unsigned char sdp_data_541111_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35=
, 0x11, 0x1c,
+ 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x05, 0x00};
+
+unsigned char sdp_data_541119_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x09, 0x00 };
+
+unsigned char sdp_data_541119_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x09, 0x00 };
=20
+unsigned char sdp_data_541119_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35=
, 0x11, 0x1c,
+ 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x09, 0x00};
+
unsigned char sdp_data_54121_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0b,
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x09, 0x00, 0x09, 0x00 };
+
unsigned char sdp_data_54121_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff,
0x09, 0x00, 0x09, 0x00 };
+
unsigned char sdp_data_54121_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x19, 0x35,=
0x11, 0x1c,
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0=
x10, 0x00,
0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,=20
0x00, 0xff, 0x09, 0x00, 0x09, 0x00 };
=20
-unsigned char sdp_data_54122[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
- 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
- 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
=20
-#if 0
+
+
+unsigned char sdp_data_54122_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 };
+
+unsigned char sdp_data_54122_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x11,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x11, 0x03, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x05, 0x00 };
+
+unsigned char sdp_data_54122_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1d, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x05, 0x00};
+
/* UUID 16 */
-unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+unsigned char sdp_data_55111_1_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
+unsigned char sdp_data_55111_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x01,=20
+ 0x00 };
=20
-unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
+unsigned char sdp_data_55111_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x01,=20
+ 0x00 };
=20
-unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
+unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x01,=20
+ 0x00 };
=20
=20
-unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+unsigned char sdp_data_55111_5_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x01, 0x15, 0x08, 0x00, 0xff, 0x35,
0x03, 0x09, 0x02, 0x00, 0x00 };
=20
-unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
- 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
+unsigned char sdp_data_55111_7_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x15, 0x09, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+unsigned char sdp_data_55111_8[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x01, 0x15, 0x07, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
-#endif
-#if 0
+
/* UUID 32 */
-unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
- 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff,
- 0x00 };
=20
-unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
=20
-unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+unsigned char sdp_data_55111_1_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_55111_5_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x03, 0x09, 0x02, 0x00, 0x00 };
=20
-unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
- 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff,
+unsigned char sdp_data_55111_7_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x15, 0x09, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x03, 0x09, 0x00, 0x01, 0x00 };
-#endif
=20
-#if 1
+
+
+
+
+
+
/* UUID 128 */
-unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+unsigned char sdp_data_55111_1_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
0x35, 0x11,=20
0x1c,=20
0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00,
@@ -418,20 +704,9 @@
0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
-
-unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35,
- 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-
-unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+unsigned char sdp_data_55111_5_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
0x35, 0x11,=20
0x1c,=20
0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00,
@@ -439,23 +714,54 @@
0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x03, 0x09, 0x02, 0x00, 0x00 };
-
-unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+unsigned char sdp_data_55111_7_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
0x35, 0x11,=20
0x1c,=20
- 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x15, 0x09, 0x00, 0x00, 0x10, 0x00,
0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
- 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
-#endif
+unsigned char sdp_data_55112_1_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+unsigned char sdp_data_55112_1_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+unsigned char sdp_data_55112_1_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x3=
5, 0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x05, 0x00};
+
+unsigned char sdp_data_55112_2_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x02, 0x00, 0x00 };
+
+unsigned char sdp_data_55112_2_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x02, 0x00, 0x00 };
+
+unsigned char sdp_data_55112_2_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x3=
5, 0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x02, 0=
x00, 0x00};
+
+unsigned char sdp_data_55112_3_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x15, 0x09, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+unsigned char sdp_data_55112_3_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x15, 0x09, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+unsigned char sdp_data_55112_3_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x3=
5, 0x11, 0x1c,
+ 0x00, 0x00, 0x15, 0x09, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x01, 0x00};
+
=20
=20
extern u8 testdata[];
@@ -581,8 +887,8 @@
* Data Transferred (L2CAP Test 5)
*/
=20
-#define OPTION_MTU1 4096
-#define OPTION_MTU2 8192
+#define OPTION_MTU1 48
+#define OPTION_MTU2 48
=20
static s32 test_2_5_1(void)
{
@@ -809,25 +1115,67 @@
}
}
=20
-static s32 sdp_test_52113(void)
+static s32 sdp_test_52112(void)
{
static int t =3D 0;
s32 retval =3D 0;
-=09
- if (!t) {
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52=
113_1[4] + 5);
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_1, sdp_data_52=
112_1[4] + 5);
t =3D 1;
- } else {
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52=
113_2[4] + 5);
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_2, sdp_data_52=
112_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_3, sdp_data_52=
112_3[4] + 5);
+ t =3D 3;
+ break;
+=09=09
+ case 3:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_4, sdp_data_52=
112_4[4] + 5);
+ t =3D 4;
+ break;
+=09=09
+ case 4:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_5, sdp_data_52=
112_5[4] + 5);
+ t =3D 5;
+ break;
+=09=09
+ case 5:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52112_6, sdp_data_52=
112_6[4] + 5);
t =3D 0;
+ break;
}
return retval;
}
=20
=20
-static s32 sdp_test_52114(void)
+static s32 sdp_test_52113(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_52114, sdp_data_52114[4] =
+ 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52=
113_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52=
113_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_52113_3, sdp_data_52=
113_3[4] + 5);
+ t =3D 3;
+ break;
+ }
+=09
+ return retval;
}
=20
static s32 sdp_test_52121(void)
@@ -847,7 +1195,17 @@
=20
static s32 sdp_test_52122(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_52122, sdp_data_52122[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52122_1, sdp_data_52122_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52122_2, sdp_data_52122_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52122_3, sdp_data_52122_=
3[4] + 5);
+ }
}
=20
static s32 sdp_test_53111(void)
@@ -864,49 +1222,142 @@
=20=09
}
=20
-static s32 sdp_test_53113(void)
+static s32 sdp_test_53112(void)
{
static int t =3D 0;
- s32 retval;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53112_1, sdp_data_53=
112_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53112_2, sdp_data_53=
112_2[4] + 5);
+ t =3D 2;
+ break;
=20=09
- if (!t) {
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53=
113_2[4] + 5);
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53112_3, sdp_data_53=
112_3[4] + 5);
+ t =3D 0;
+ break;
+ }
+=09
+ return retval;
+}
+
+static s32 sdp_test_53113(void)
+{
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53=
113_1[4] + 5);
t =3D 1;
- } else {
+ break;
+ case 1:
retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53113_2, sdp_data_53=
113_2[4] + 5);
t =3D 0;
+ break;
}
+=09
return retval;
}
=20
static s32 sdp_test_53114(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_53114, sdp_data_53114[4] =
+ 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53114_1, sdp_data_53=
114_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53114_2, sdp_data_53=
114_2[4] + 5);
+ t =3D 0;
+ break;
}
=20
-static s32 sdp_test_53115(void)
-{
- return sdp_send_data(&sdp_con_list[0], sdp_data_53115, sdp_data_53115[4] =
+ 5);
+ return retval;
}
=20
-static s32 sdp_test_53118(void)
+static s32 sdp_test_53117(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_53118, sdp_data_53118[4] =
+ 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53117_1, sdp_data_53=
117_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53117_2, sdp_data_53=
117_2[4] + 5);
+ t =3D 0;
+ break;
}
=20
-static s32 sdp_test_531110(void)
+ return retval;
+}
+
+static s32 sdp_test_53119(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_531110, sdp_data_531110[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53119_1, sdp_data_53=
119_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_53119_2, sdp_data_53=
119_2[4] + 5);
+ t =3D 0;
+ break;
}
=20
-static s32 sdp_test_531117(void)
+ return retval;
+}
+
+static s32 sdp_test_531116(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_531117, sdp_data_531117[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531116_1, sdp_data_5=
31116_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531116_2, sdp_data_5=
31116_2[4] + 5);
+ t =3D 0;
+ break;
}
=20
-static s32 sdp_test_531120(void)
+ return retval;
+}
+
+static s32 sdp_test_531119(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_531120, sdp_data_531120[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531119_1, sdp_data_5=
31119_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_531119_2, sdp_data_5=
31119_2[4] + 5);
+ t =3D 0;
+ break;
+ }
+=09
+ return retval;
}
=20
static s32 sdp_test_53121(void)
@@ -921,7 +1372,7 @@
=20
static s32 sdp_test_53123(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] =
+ 5);
+ return sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] =
+ 5 + 2);
}
=20
static s32 sdp_test_54111(void)
@@ -941,51 +1392,177 @@
=20
static s32 sdp_test_54112(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_54112, sdp_data_54112[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54112_1, sdp_data_54112_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54112_2, sdp_data_54112_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54112_3, sdp_data_54112_=
3[4] + 5);
+ }
}
=20
static s32 sdp_test_54113(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_54113, sdp_data_54113[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54113_1, sdp_data_54113_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54113_2, sdp_data_54113_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54113_3, sdp_data_54113_=
3[4] + 5);
+ }
}
=20
static s32 sdp_test_54114(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_54114, sdp_data_54114[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54114_1, sdp_data_54114_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54114_2, sdp_data_54114_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54114_3, sdp_data_54114_=
3[4] + 5);
+ }
}
=20
-static s32 sdp_test_54116(void)
+static s32 sdp_test_54115(void)
{
static int t =3D 0;
- s32 retval;
- if (!t) {
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54116_1, sdp_data_54=
116_1[4] + 5);
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_1, sdp_data_54=
115_1[4] + 5);
t =3D 1;
- } else {
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54116_2, sdp_data_54=
116_2[4] + 5);
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_2, sdp_data_54=
115_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_3, sdp_data_54=
115_3[4] + 5);
+ t =3D 3;
+ break;
+=09=09
+ case 3:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_4, sdp_data_54=
115_4[4] + 5);
+ t =3D 4;
+ break;
+=09=09
+ case 4:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_5, sdp_data_54=
115_5[4] + 5);
+ t =3D 5;
+ break;
+=09=09
+ case 5:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54115_6, sdp_data_54=
115_6[4] + 5);
t =3D 0;
+ break;
}=20
return retval;
}
=20
-static s32 sdp_test_541110(void)
+static s32 sdp_test_54119(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_541110, sdp_data_541110[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54119_1, sdp_data_54=
119_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54119_2, sdp_data_54=
119_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_54119_3, sdp_data_54=
119_3[4] + 5);
+ t =3D 0;
+ break;
+ }
+ return retval;
}
=20
-static s32 sdp_test_541111(void)
+static s32 sdp_test_541110(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_541111, sdp_data_541111[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541110_1, sdp_data_5=
41110_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541110_2, sdp_data_5=
41110_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541110_3, sdp_data_5=
41110_3[4] + 5);
+ t =3D 0;
+ break;
+ }
+ return retval;
}
=20
-static s32 sdp_test_541112(void)
+static s32 sdp_test_541111(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_541112, sdp_data_541112[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541111_1, sdp_data_5=
41111_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541111_2, sdp_data_5=
41111_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541111_3, sdp_data_5=
41111_3[4] + 5);
+ t =3D 0;
+ break;
+ }
+ return retval;
}
=20
-static s32 sdp_test_541120(void)
+static s32 sdp_test_541119(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_541120, sdp_data_541120[4=
] + 5);
+ static int t =3D 0;
+ s32 retval =3D 0;
+ switch(t)=20
+ {
+ case 0:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541119_1, sdp_data_5=
41119_1[4] + 5);
+ t =3D 1;
+ break;
+ case 1:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541119_2, sdp_data_5=
41119_2[4] + 5);
+ t =3D 2;
+ break;
+=09=09
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_541119_3, sdp_data_5=
41119_3[4] + 5);
+ t =3D 0;
+ break;
+ }
+ return retval;
}
=20
static s32 sdp_test_54121(void)
@@ -1005,7 +1582,17 @@
=20
static s32 sdp_test_54122(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_54122, sdp_data_54122[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54122_1, sdp_data_54122_=
1[4] + 5 - 2);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54122_2, sdp_data_54122_=
2[4] + 5 - 2);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54122_3, sdp_data_54122_=
3[4] + 5 - 2);
+ }
}
=20
static s32 sdp_test_55111(void)
@@ -1017,37 +1604,104 @@
=20
switch (t) {
case 0:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1, sdp_data_5=
5111_1[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1_1, sdp_data_=
55111_1_1[4] + 5);
t =3D 1;
break;
=20=09=20=20
case 1:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_1, sdp_data=
_55111_2_1[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55=
111_2[4] + 5);
t =3D 2;
break;
case 2:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_2, sdp_data=
_55111_2_2[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55=
111_3[4] + 5);
t =3D 3;
break;
case 3:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_3, sdp_data=
_55111_2_3[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55=
111_4[4] + 5);
t =3D 4;
break;
=20=09=20=20
case 4:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_5=
5111_3[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5_1, sdp_data_=
55111_5_1[4] + 5);
t =3D 5;
break;
case 5:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_5=
5111_4[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_55=
111_6[4] + 5);
t =3D 6;
break;
case 6:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5, sdp_data_5=
5111_5[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7_1, sdp_data_=
55111_7_1[4] + 5);
t =3D 7;
break;
case 7:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55=
111_8[4] + 5);
+ t =3D 8;
+ break;
+=20=20=20=20=20=20=20=20
+ case 8:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1_2, sdp_data_=
55111_1_2[4] + 5);
+ t =3D 9;
+ break;=20
+ case 9:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55=
111_2[4] + 5);
+ t =3D 10;
+ break;
+ case 10:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55=
111_3[4] + 5);
+ t =3D 11;
+ break;
+ case 11:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55=
111_4[4] + 5);
+ t =3D 12;
+ break;
+=09=09
+ case 12:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5_2, sdp_data_=
55111_5_2[4] + 5);
+ t =3D 13;
+ break;
+ case 13:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_55=
111_6[4] + 5);
+ t =3D 14;
+ break;
+ case 14:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7_2, sdp_data_=
55111_7_2[4] + 5);
+ t =3D 15;
+ break;
+ case 15:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55=
111_8[4] + 5);
+ t =3D 16;
+ break;
+ case 16:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1_3, sdp_data_=
55111_1_3[4] + 5);
+ t =3D 17;
+ break;=20
+ case 17:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55=
111_2[4] + 5);
+ t =3D 18;
+ break;
+ case 18:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55=
111_3[4] + 5);
+ t =3D 19;
+ break;
+ case 19:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55=
111_4[4] + 5);
+ t =3D 20;
+ break;
+=09=09
+ case 20:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5_3, sdp_data_=
55111_5_3[4] + 5);
+ t =3D 21;
+ break;
+ case 21:
retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_5=
5111_6[4] + 5);
+ t =3D 22;
+ break;
+ case 22:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7_3, sdp_data_=
55111_7_3[4] + 5);
+ t =3D 23;
+ break;
+ case 23:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55=
111_8[4] + 5);
t =3D 0;
break;
=20=09=20=20
@@ -1060,18 +1714,56 @@
=20=20=20
static int t =3D 0;
s32 retval =3D 0;
- /*
+
+ printk("NOW RUNNING TESTCASE 55112, case %d\n", t);
+
switch (t) {
case 0:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1, sdp_data_55=
112_1[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1_1, sdp_data_=
55112_1_1[4] + 5);
t =3D 1;
break;
=20
case 1:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2, sdp_data_55=
112_2[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2_1, sdp_data_=
55112_2_1[4] + 5);
+ t =3D 2;
+ break;
+
+ case 2:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_3_1, sdp_data_=
55112_3_1[4] + 5);
+ t =3D 3;
+ break;
+
+ case 3:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1_2, sdp_data_=
55112_1_2[4] + 5);
+ t =3D 4;
+ break;
+
+ case 4:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2_2, sdp_data_=
55112_2_2[4] + 5);
+ t =3D 5;
+ break;
+
+ case 5:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_3_2, sdp_data_=
55112_3_2[4] + 5);
+ t =3D 6;
+ break;
+
+ case 6:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1_3, sdp_data_=
55112_1_3[4] + 5);
+ t =3D 7;
+ break;
+
+ case 7:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2_3, sdp_data_=
55112_2_3[4] + 5);
+ t =3D 8;
+ break;
+
+ case 8:
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_3_3, sdp_data_=
55112_3_3[4] + 5);
t =3D 0;
break;
- }*/
+
+ }
return retval;
}
=20
@@ -1761,18 +2453,18 @@
case 2135 : return test_2_13_5();
=20
case 52111: return sdp_test_52111();
+ case 52112: return sdp_test_52112();
case 52113: return sdp_test_52113();
- case 52114: return sdp_test_52114();
case 52121: return sdp_test_52121();
case 52122: return sdp_test_52122();
case 53111: return sdp_test_53111();
+ case 53112: return sdp_test_53112();
case 53113: return sdp_test_53113();
case 53114: return sdp_test_53114();
- case 53115: return sdp_test_53115();
- case 53118: return sdp_test_53118();
- case 531110: return sdp_test_531110();
- case 531117: return sdp_test_531117();
- case 531120: return sdp_test_531120();
+ case 53117: return sdp_test_53117();
+ case 53119: return sdp_test_53119();
+ case 531116: return sdp_test_531116();
+ case 531119: return sdp_test_531119();
case 53121: return sdp_test_53121();
case 53122: return sdp_test_53122();
case 53123: return sdp_test_53123();
@@ -1780,11 +2472,11 @@
case 54112: return sdp_test_54112();
case 54113: return sdp_test_54113();
case 54114: return sdp_test_54114();
- case 54116: return sdp_test_54116();
+ case 54115: return sdp_test_54115();
+ case 54119: return sdp_test_54119();
case 541110: return sdp_test_541110();
case 541111: return sdp_test_541111();
- case 541112: return sdp_test_541112();
- case 541120: return sdp_test_541120();
+ case 541119: return sdp_test_541119();
case 54121: return sdp_test_54121();
case 54122: return sdp_test_54122();
case 55111: return sdp_test_55111();
|
|
From: Anders J. <and...@us...> - 2002-03-07 21:23:20
|
The following files were modified in apps/bluetooth/sdp_server:
Name Old version New version Comment
---- ----------- ----------- -------
sdp_parser.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20
sdp_server.c 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20
sdp_server.h 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20
sdp_test.xml 1.1 Added
The accompanying log:
* Added FULL support for the continuation flag.
* Added sdp-test-database.
* Fixed several potential bugs in the sdp_server.
The diff of the modified file(s):
--- sdp_parser.c 27 Aug 2001 15:08:58 -0000 1.21
+++ sdp_parser.c 7 Mar 2002 21:23:19 -0000 1.22
@@ -346,6 +346,11 @@
cur_pos +=3D 2;
=20
cont_state_len =3D data[cur_pos++];
+ if (cont_state_len)
+ {
+ /* One byte for continuation data */
+ cur_pos +=3D 1;
+ }
=20
if (len < cur_pos)
{
@@ -363,10 +368,8 @@
=20=20=20
if (cont_state_len)
{
- cur_pos +=3D data[cur_pos];
-=20=20=20=20
D_MISC("Sending continuationstate packet");
- send_cont_state_search_rsp(cont_state_len, data + cur_pos, max_rec_cnt=
,db);
+ send_cont_state_search_rsp(data[cur_pos - 1], db);
}
else
{
@@ -485,8 +488,8 @@
if (cont_state_len)
{
D_MISC("Sending continuationstate packet");
- send_cont_state_attr_rsp(cont_state_len, data + cur_pos, max_attr_cnt,
- db);
+ send_cont_state_attr_rsp(data[cur_pos - 1], max_attr_cnt,
+ db, SDP_SERVICEATTR_REQ);
}
else
{
@@ -671,8 +674,8 @@
if (cont_state_len)
{
D_MISC("Sending continuationstate packet");
- send_cont_state_attr_rsp(cont_state_len, data + cur_pos, max_attr_cnt,
- db);
+ send_cont_state_attr_rsp(data[cur_pos - 1], max_attr_cnt,
+ db, SDP_SERVICESEARCHATTR_REQ);
}
else
{
--- sdp_server.c 19 Nov 2001 08:43:02 -0000 1.31
+++ sdp_server.c 7 Mar 2002 21:23:19 -0000 1.32
@@ -70,7 +70,6 @@
=20
/* Debug for the get record handle functions */
#define SDP_DEBUG_GET_RECORD_HDL 0
-
/* Debug all malloc and free commands */
#define SDP_DEBUG_MEM 0
=20
@@ -154,7 +153,7 @@
=20
int set_cont_state_attr(unsigned char *pkt, int len, int max_attr_len);
=20
-int set_cont_state_search(unsigned char *pkt, unsigned int len, unsigned i=
nt max_rec_cnt);
+int set_cont_state_search(unsigned char *pkt, unsigned int len);
=20
static int xml_fd;
static int parse_err;
@@ -1362,8 +1361,8 @@
int rsp_pkt_len;
unsigned int *rec_hdl_list;
unsigned int rec_hdl_cnt =3D 0;
- unsigned int max_rec_cnt;
- int i;
+ unsigned int rec_to_send =3D 0;
+ int i, j =3D 0;
=20
rec_hdl_list =3D get_all_rec_hdl(db_hdl->service_class_list, db_hdl->ser=
vice_class_cnt);
=20
@@ -1382,33 +1381,32 @@
=20
D_MISC("Found %d rec handles in database\n", rec_hdl_cnt);
=20
+ /* We shouldn't return more than max_rec_cnt */
+ if (rec_hdl_cnt > db_hdl->max_rec_cnt)=20
+ {
+ D_REC("Only send %d out of %d record handles\n", db_hdl->max_rec_cnt, =
rec_hdl_cnt);
+ rec_hdl_cnt =3D db_hdl->max_rec_cnt;
+ }
+
/* Calculate how many records we can fit into response */
/* SdpHdrSize[5] + TotSrvCnt[2] + CurSrvRevCnt[2] + possibl ContState[2]=
=20
=3D> 11 bytes. Each rec hdl is 4 bytes */
=20
- max_rec_cnt =3D MIN(db_hdl->max_rec_cnt, (db_hdl->db.l2cap_mtu - 11)/4);
-
- if (rec_hdl_cnt > max_rec_cnt)=20
- {
- D_REC("Only send %d out of %d record handles\n", max_rec_cnt, rec_hdl_=
cnt);
- rec_hdl_cnt =3D max_rec_cnt;
- }
+ rec_to_send =3D MIN(rec_hdl_cnt, (db_hdl->db.l2cap_mtu - 11) / 4);
=20=20=20
rsp_pkt_len =3D SDP_HDR_SIZE;=20=20
=20=20=20
- /* Set the total service record count */
+ /* Set the total service record count which are going to be sent */
rsp_pkt[rsp_pkt_len++] =3D SHORT2CHAR_MS(rec_hdl_cnt);
rsp_pkt[rsp_pkt_len++] =3D SHORT2CHAR_LS(rec_hdl_cnt);
=20=20=20
- /* fixme -- total/current should probably differ sometimes... */
-=20=20
- /* Set the current service record count */
- rsp_pkt[rsp_pkt_len++] =3D SHORT2CHAR_MS(rec_hdl_cnt);
- rsp_pkt[rsp_pkt_len++] =3D SHORT2CHAR_LS(rec_hdl_cnt);
+ /* Set the current service record count which can be transmitted in one =
packet */
+ rsp_pkt[rsp_pkt_len++] =3D SHORT2CHAR_MS(rec_to_send);
+ rsp_pkt[rsp_pkt_len++] =3D SHORT2CHAR_LS(rec_to_send);
=20=20=20
if (rec_hdl_list)
{
- for (i =3D 0; i < rec_hdl_cnt; i++)
+ for (i =3D 0; i < rec_to_send; i++)
{
rsp_pkt[rsp_pkt_len++] =3D (rec_hdl_list[i] >> 24) & 0xff;
rsp_pkt[rsp_pkt_len++] =3D (rec_hdl_list[i] >> 16) & 0xff;
@@ -1417,24 +1415,42 @@
}
}
=20=20=20
- set_sdp_hdr(rsp_pkt, SDP_SERVICESEARCH_RSP, db_hdl->db.trans_id,
- rsp_pkt_len - SDP_HDR_SIZE);
-
- D_REC("l2cap_mtu:%d, mrc:%d, db->mrc:%d\n", db_hdl->db.l2cap_mtu, max_re=
c_cnt, db_hdl->max_rec_cnt);
-
- /* If Max Service Record Count is set to a value less than the number of
- available records in database we should not set cont state */
+ /* Check if we should set continuation flag, if true save the rest of
+ our found records */
+ if(rec_hdl_cnt > rec_to_send)
+ {
+ cont_state_buf =3D malloc(sizeof(cont_state_struct) + ((rec_hdl_cnt -=
rec_to_send) * 4));
+ D_MEM("---> malloc%d %ld bytes at 0x%8p", malloc_dbg++, sizeof(cont_s=
tate_struct) +=20
+ ((rec_hdl_cnt - rec_to_send) * 4), cont_state_buf);
=20
- /* set_cont_state_search searches rsp_pkt for currently set rec cnt=20
- and we compare that with max_rec_cnt. If current is larger than
- max rec cnt, we set continuation state and change headers in rsp
- packet. If not we simply put a 0 in the end to indicate no cont=20
- state */
+ if(cont_state_buf)=20
+ {
+ cont_state_buf->id =3D 0;
+ cont_state_buf->pdu =3D SDP_SERVICESEARCH_REQ;
+ cont_state_buf->cur_pos =3D 0;
+ cont_state_buf->total_len =3D rec_hdl_cnt * 4;
=20=20=20
- /* fixme -- as of today we can only handle continuation state for=20
- 1 client at a time */
+ for(i =3D rec_to_send ; i < rec_hdl_cnt ; i++)
+ {
+ cont_state_buf->data[j++] =3D (rec_hdl_list[i] >> 24) & 0xff;
+ cont_state_buf->data[j++] =3D (rec_hdl_list[i] >> 16) & 0xff;
+ cont_state_buf->data[j++] =3D (rec_hdl_list[i] >> 8) & 0xff;
+ cont_state_buf->data[j++] =3D rec_hdl_list[i] & 0xff;
+ }
=20
- rsp_pkt_len =3D set_cont_state_search(rsp_pkt, rsp_pkt_len, max_rec_cnt);
+ cont_state_buf->len =3D j;
+ rsp_pkt[rsp_pkt_len++] =3D 0x01;
+ rsp_pkt[rsp_pkt_len++] =3D cont_state_buf->id;
+ }
+ else
+ {
+ set_err(SDP_INSUFFICIENT_RESOURCES);
+ }
+ }=20
+ else=20
+ {
+ rsp_pkt[rsp_pkt_len++] =3D 0x00;
+ }=20=20=20=20=20=20=20=20
=20
if (is_err())
{
@@ -1442,6 +1458,12 @@
return;
}
=20=20=20
+ set_sdp_hdr(rsp_pkt, SDP_SERVICESEARCH_RSP, db_hdl->db.trans_id,
+ rsp_pkt_len - SDP_HDR_SIZE);
+
+ D_REC("l2cap_mtu:%d, Records to send:%d, Total max records to return:%d\=
n",=20
+ db_hdl->db.l2cap_mtu, rec_to_send, db_hdl->max_rec_cnt);
+=20=20
write2stack(db_hdl->db.sdp_con_id, rsp_pkt, rsp_pkt_len);=20
}
=20
@@ -1452,6 +1474,11 @@
int rsp_pkt_len, i, des_len_pos;
unsigned char *tmp_ptr;
unsigned int max_attr_byte_cnt;
+ unsigned int cont_bytes =3D 1;
+ unsigned int bytes_to_send =3D 0;
+
+ max_attr_byte_cnt =3D MIN(db_hdl->max_attr_byte_cnt, db_hdl->db.l2cap_mt=
u - 9);
+ /* 9 comes from SDP_HDR_SIZE + attr byte nt field + 2 bytes for cont sta=
te */
=20=20=20=20=20
/* Skip the sdp header and the attribute byte count field */
rsp_pkt_len =3D SDP_HDR_SIZE + 2;
@@ -1460,6 +1487,8 @@
des_len_pos =3D rsp_pkt_len;
rsp_pkt_len++;
=20
+ bytes_to_send =3D rsp_pkt_len - SDP_HDR_SIZE - 2;
+
for (i =3D 0; i < db_hdl->attr_cnt; i++)
{
if ((db_hdl->attr_list[i] & 0xffff) ^ (db_hdl->attr_list[i] >> 16))
@@ -1486,32 +1515,58 @@
}
}
=20
+ if((rsp_pkt_len - SDP_HDR_SIZE - 2) > max_attr_byte_cnt)
+ {
+ bytes_to_send =3D max_attr_byte_cnt;
+ cont_state_buf =3D malloc(sizeof(cont_state_struct) + (rsp_pkt_len - S=
DP_HDR_SIZE - 2 - bytes_to_send));
+ D_MEM("---> malloc%d %ld bytes at 0x%8p", malloc_dbg++, sizeof(cont_st=
ate_struct) +=20
+ rsp_pkt_len - SDP_HDR_SIZE - 2 - bytes_to_send, cont_state_buf);
+=20=20=20=20
+ if(cont_state_buf)=20
+ {
+ memcpy(cont_state_buf->data, &rsp_pkt[bytes_to_send + SDP_HDR_SIZE +=
2],=20
+ rsp_pkt_len - SDP_HDR_SIZE - 2 - bytes_to_send);
+ cont_state_buf->id =3D 0;
+ cont_state_buf->len =3D rsp_pkt_len - SDP_HDR_SIZE - 2 - bytes_to_se=
nd;
+ cont_state_buf->cur_pos =3D 0;
+ cont_state_buf->total_len =3D rsp_pkt_len - SDP_HDR_SIZE - 2;
+ cont_state_buf->pdu =3D SDP_SERVICEATTR_REQ;
+ cont_bytes =3D 2;
+ rsp_pkt[bytes_to_send + SDP_HDR_SIZE + 2] =3D 0x01;
+ rsp_pkt[bytes_to_send + SDP_HDR_SIZE + 2 + 1] =3D 0x00;
+ }
+ else
+ {
+ set_err(SDP_INSUFFICIENT_RESOURCES);
+ }
+ }=20
+ else
+ {
+ bytes_to_send =3D rsp_pkt_len - SDP_HDR_SIZE - 2;
+ rsp_pkt[bytes_to_send + SDP_HDR_SIZE + 2] =3D 0x00;
+ }
+
/* Set the attribute byte count to packet length minus sdp pdu header si=
ze
minus attribute byte count field length, minus continuation field len=
gth*/
- rsp_pkt[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(rsp_pkt_len - SDP_HDR_SIZE - 2=
);
- rsp_pkt[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(rsp_pkt_len - SDP_HDR_SIZE - 2=
);
+ rsp_pkt[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(bytes_to_send);
+ rsp_pkt[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(bytes_to_send);
=20
/* The length of the attribute list is the length of the attribute byte
count minus the size of the data element sequence header */
rsp_pkt[des_len_pos] =3D rsp_pkt_len - SDP_HDR_SIZE - 2 - 2;
=20=20=20
set_sdp_hdr(rsp_pkt, SDP_SERVICEATTR_RSP, db_hdl->db.trans_id,
- rsp_pkt_len - SDP_HDR_SIZE);
-
- max_attr_byte_cnt =3D MIN(db_hdl->max_attr_byte_cnt, db_hdl->db.l2cap_mt=
u - 9);
- /* 9 comes from SDP_HDR_SIZE + attr byte nt field + 2 bytes for cont sta=
te */
+ bytes_to_send + 2 + cont_bytes);
=20
D_REC("l2cap_mtu:%d, mabc:%d, db->mabc:%d\n", db_hdl->db.l2cap_mtu, max_=
attr_byte_cnt, db_hdl->max_attr_byte_cnt);
=20=20=20=20
- rsp_pkt_len =3D set_cont_state_attr(rsp_pkt, rsp_pkt_len, max_attr_byte_=
cnt);
-
if (is_err())
{
send_error_rsp(&db_hdl->db, get_err());
return;
}
=20=20=20
- write2stack(db_hdl->db.sdp_con_id, rsp_pkt, rsp_pkt_len);=20
+ write2stack(db_hdl->db.sdp_con_id, rsp_pkt, bytes_to_send + 2 + cont_byt=
es + SDP_HDR_SIZE);=20
}
=20
void
@@ -1519,11 +1574,17 @@
{
unsigned char *tmp_ptr;
unsigned int *rec_hdl_list;
- unsigned int rec_hdl_cnt;
+ unsigned int rec_hdl_cnt =3D 0;
unsigned char rsp_pkt[1024];
unsigned int max_attr_byte_cnt;
+ unsigned int bytes_to_send;
+ unsigned int cont_bytes =3D 1;
+
int rsp_pkt_len =3D 0, tmp_len, des_len_pos, i, j =3D 0;
=20
+ max_attr_byte_cnt =3D MIN(db_hdl->max_attr_byte_cnt, db_hdl->db.l2cap_mt=
u - 9);
+ /* 9 comes from SDP_HDR_SIZE + attr byte nt field + 2 bytes for cont sta=
te */
+
rec_hdl_list =3D get_all_rec_hdl(db_hdl->service_class_list, db_hdl->ser=
vice_class_cnt);
=20
D_REC("Got a record handle list");
@@ -1552,6 +1613,8 @@
des_len_pos =3D rsp_pkt_len;
rsp_pkt_len +=3D 2;
=20
+ bytes_to_send =3D rsp_pkt_len - SDP_HDR_SIZE - 2;
+
for (j =3D 0; j < rec_hdl_cnt; j++)
{
tmp_len =3D 2;
@@ -1590,173 +1653,102 @@
}
}
=20
- /* Set the attribute byte count to packet length minus sdp pdu header si=
ze
- minus attribute byte count field length */
- rsp_pkt[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(rsp_pkt_len - SDP_HDR_SIZE - 2=
);
- rsp_pkt[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(rsp_pkt_len - SDP_HDR_SIZE - 2=
);
-
- /* The length of the attribute list is the same as the packet length min=
us
- the packet header length minus the attibute byte count filed minus the
- data element sequence header*/
- rsp_pkt[des_len_pos] =3D SHORT2CHAR_MS(rsp_pkt_len - SDP_HDR_SIZE - =
2 - 3);
- rsp_pkt[des_len_pos + 1] =3D SHORT2CHAR_LS(rsp_pkt_len - SDP_HDR_SIZE - =
2 - 3);
-
- set_sdp_hdr(rsp_pkt, SDP_SERVICESEARCHATTR_RSP, db_hdl->db.trans_id,
- rsp_pkt_len - SDP_HDR_SIZE);
-
- max_attr_byte_cnt =3D MIN(db_hdl->max_attr_byte_cnt, db_hdl->db.l2cap_mt=
u - 9);
- /* 9 comes from SDP_HDR_SIZE + attr byte nt field + 2 bytes for cont sta=
te */
-
- D_REC("l2cap_mtu:%d, mabc:%d, db->mabc:%d\n", db_hdl->db.l2cap_mtu, max_=
attr_byte_cnt, db_hdl->max_attr_byte_cnt);
-=20=20
- rsp_pkt_len =3D set_cont_state_attr(rsp_pkt, rsp_pkt_len, max_attr_byte_=
cnt);
-=20=20
- if (is_err())
- {
- send_error_rsp(&db_hdl->db, get_err());
- return;
- }
-=20=20
- /* FIXME: Add features to handle continuation state packets */
- write2stack(db_hdl->db.sdp_con_id, rsp_pkt, rsp_pkt_len);=20
-}
-
-int
-set_cont_state_search(unsigned char *pkt, unsigned int len, unsigned int m=
ax_rec_cnt)
+ /* Did all data fit into one respone? If false we should copy the remain=
ing
+ data to the cont.buffer and set the continuationflag */
+ if((rsp_pkt_len - SDP_HDR_SIZE - 2) > max_attr_byte_cnt)
{
- int cur_rec_cnt;
- int cnt_len;
-
- cur_rec_cnt =3D CHAR2INT16(pkt[SDP_HDR_SIZE+2], pkt[SDP_HDR_SIZE+3]);
+ bytes_to_send =3D max_attr_byte_cnt;
+ cont_state_buf =3D malloc(sizeof(cont_state_struct) + (rsp_pkt_len - S=
DP_HDR_SIZE - 2 - bytes_to_send));
+ D_MEM("---> malloc%d %ld bytes at 0x%8p", malloc_dbg++, sizeof(cont_st=
ate_struct) +=20
+ rsp_pkt_len - SDP_HDR_SIZE - 2 - bytes_to_send, cont_state_buf);
=20
- if (cur_rec_cnt > max_rec_cnt)
+ if(cont_state_buf)=20
{
- S_FNC("Setting cont state, cur_rec_cnt:%d, max_rec_cnt:%d",
- cur_rec_cnt, max_rec_cnt);
-
- pkt[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(max_rec_cnt);
- pkt[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(max_rec_cnt);
-
- pkt[SDP_HDR_SIZE+2] =3D SHORT2CHAR_MS(max_rec_cnt);
- pkt[SDP_HDR_SIZE+3] =3D SHORT2CHAR_LS(max_rec_cnt);
-=20=20=20=20
- /* There are cnt_len byte too much to fit the data in one packet */
- cnt_len =3D (cur_rec_cnt - max_rec_cnt) * 4;
-=20=20=20=20
- /* The packet can't be longer than this, excluding the continuation st=
ate
- bytes */
- len -=3D cnt_len;
-=20=20=20=20
- cont_state_buf =3D malloc(sizeof(cont_state_struct) + cnt_len);
- D_MEM("---> malloc%d %ld bytes at 0x%8p", malloc_dbg++, sizeof(cont_st=
ate_struct) + cnt_len, cont_state_buf);
-
- if (!cont_state_buf)
+ memcpy(cont_state_buf->data, &rsp_pkt[bytes_to_send + SDP_HDR_SIZE +=
2],=20
+ rsp_pkt_len - SDP_HDR_SIZE - 2 - bytes_to_send);
+ cont_state_buf->id =3D 0;
+ cont_state_buf->len =3D rsp_pkt_len - SDP_HDR_SIZE - 2 - bytes_to_se=
nd;
+ cont_state_buf->cur_pos =3D 0;
+ cont_state_buf->total_len =3D rsp_pkt_len - SDP_HDR_SIZE - 2;
+ cont_state_buf->pdu =3D SDP_SERVICESEARCHATTR_REQ;
+ cont_bytes =3D 2;
+ rsp_pkt[bytes_to_send + SDP_HDR_SIZE + 2] =3D 0x01;
+ rsp_pkt[bytes_to_send + SDP_HDR_SIZE + 2 + 1] =3D 0x00;
+ }
+ else
{
set_err(SDP_INSUFFICIENT_RESOURCES);
- return 0;
}
-=20=20=20=20
- cont_state_buf->pdu =3D pkt[SDP_HDR_TYPE];
- D_MISC("PDU: 0x%02x", cont_state_buf->pdu);
-=20=20=20=20
- cont_state_buf->len =3D cnt_len;
- memcpy(cont_state_buf->data, pkt + len, cnt_len);
-=20=20=20=20
- len =3D SDP_HDR_SIZE + 2 + 2 + (max_rec_cnt * 4);
-
- pkt[len++] =3D 1;
- pkt[len++] =3D 0;
}
else
{
- D_MISC("No continuation state set\n");
- pkt[len++] =3D 0;
- }
-=20=20
-=20=20
- /* Change the length field */
- pkt[SDP_HDR_LENGTH_MS] =3D SHORT2CHAR_MS(len - SDP_HDR_SIZE);
- pkt[SDP_HDR_LENGTH_LS] =3D SHORT2CHAR_LS(len - SDP_HDR_SIZE);
-
- return len;
+ bytes_to_send =3D rsp_pkt_len - SDP_HDR_SIZE - 2;
+ rsp_pkt[bytes_to_send + SDP_HDR_SIZE + 2] =3D 0x00;
}
=20
-/* FIXME: This function only handles continuation state from one query yet=
*/
-
-int
-set_cont_state_attr(unsigned char *pkt, int len, int max_attr_len)
-{
- int cur_attr_cnt;
- int cont_len;
=20
- cur_attr_cnt =3D CHAR2INT16(pkt[SDP_HDR_SIZE], pkt[SDP_HDR_SIZE+1]);
-
- S_FNC("len %d, max_attr_len %d, cur_attr_cnt %d", len, max_attr_len, cur=
_attr_cnt);
-
- PRINT_DATA(__FUNCTION__, pkt, len);
-
- if (max_attr_len < cur_attr_cnt)
- {
- S_FNC("max_attr_len:%d, cur_attr_cnt:%d and packet length:%d", max_att=
r_len, cur_attr_cnt, len);
-
- /* There are cont_len byte to much to fit the data in one packet */
- cont_len =3D cur_attr_cnt - max_attr_len;
-
- /* The packet can't be longer than this, excluding the continuation st=
ate
- bytes */
- len -=3D cont_len;
-
- cont_state_buf =3D malloc(sizeof(cont_state_struct) + cont_len);
- D_MEM("---> malloc%d %ld bytes at 0x%8p", malloc_dbg++, sizeof(cont_st=
ate_struct) + cont_len , cont_state_buf);
-
- if (!cont_state_buf)
- {
- set_err(SDP_INSUFFICIENT_RESOURCES);
- return 0;
- }
+ /* Set the attribute byte count to packet length minus sdp pdu header si=
ze
+ minus attribute byte count field length which is bytes_to_send */
+ rsp_pkt[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(bytes_to_send);
+ rsp_pkt[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(bytes_to_send);
=20=20=20=20=20
- cont_state_buf->pdu =3D pkt[SDP_HDR_TYPE];
- D_MISC("PDU: 0x%02x", cont_state_buf->pdu);
+ /* bytes_to_send is the total number of bytes in the attribute ID list a=
nd
+ the size of the data element sequence is that size - 3 bytes for the
+ header of the DES */
+ rsp_pkt[des_len_pos] =3D SHORT2CHAR_MS(rsp_pkt_len - SDP_HDR_SIZE - =
5);
+ rsp_pkt[des_len_pos + 1] =3D SHORT2CHAR_LS(rsp_pkt_len - SDP_HDR_SIZE - =
5);
=20
- cont_state_buf->len =3D cont_len;
- memcpy(cont_state_buf->data, pkt + len, cont_len);
+ /* Parameterlength for the PDU is total number of bytes in our Attribute=
IDList
+ + 2 bytes for MaximumAttributeCount + the continuationflag */
+ set_sdp_hdr(rsp_pkt, SDP_SERVICESEARCHATTR_RSP, db_hdl->db.trans_id,
+ bytes_to_send + 2 + cont_bytes);
=20
- pkt[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(max_attr_len);
- pkt[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(max_attr_len);
+ D_REC("l2cap_mtu:%d, mabc:%d, db->mabc:%d\n", db_hdl->db.l2cap_mtu, max_=
attr_byte_cnt, db_hdl->max_attr_byte_cnt);
=20=20=20=20=20
- pkt[len++] =3D 1;
- pkt[len++] =3D 0;
- }
- else
+ if (is_err())
{
- S_FNC("No continuation State set");
- pkt[len++] =3D 0;
+ send_error_rsp(&db_hdl->db, get_err());
+ return;
}
=20=20=20
- /* Change the length field */
-
- S_FNC("Changing length field");
- pkt[SDP_HDR_LENGTH_MS] =3D SHORT2CHAR_MS(len - SDP_HDR_SIZE);
- pkt[SDP_HDR_LENGTH_LS] =3D SHORT2CHAR_LS(len - SDP_HDR_SIZE);
-
- return len;
+ /* Length is bytes_to_send + 2 bytes for MaximumAttributeBytesCount + co=
nt. bytes + header size for the PDU */
+ write2stack(db_hdl->db.sdp_con_id, rsp_pkt, bytes_to_send + 2 + cont_byt=
es + SDP_HDR_SIZE);=20
}
=20
void
-send_cont_state_search_rsp(int len, unsigned char *info, int max_rec_cnt,
+send_cont_state_search_rsp(unsigned char cont_id,
database_query_struct *db)
{
unsigned char *send_buf;
int send_len;
+ int total_record_cnt;
+ int records_to_send;
+ int prev_send;
+ int cont_bytes =3D 1;
=20=20=20
- if (!cont_state_buf) {
+ if (!cont_state_buf ||=20
+ (cont_state_buf->pdu !=3D SDP_SERVICESEARCH_REQ) ||=20
+ (cont_state_buf->id !=3D cont_id))=20
+ {
send_error_rsp(db, SDP_INVALID_CONTINUATION_STATE);
}
- else if ((max_rec_cnt * 4) >=3D cont_state_buf->len)
+
+ total_record_cnt =3D cont_state_buf->total_len / 4;
+ prev_send =3D ((cont_state_buf->total_len - cont_state_buf->len) + cont_=
state_buf->cur_pos) / 4;
+
+ records_to_send =3D MIN(total_record_cnt - prev_send, (db->l2cap_mtu - 1=
1) / 4);
+=20=20
+ if((records_to_send + prev_send) !=3D total_record_cnt)
{
+ cont_bytes =3D 2;
+ }
+=20=20
+ /* Is it possible for the client to change its max_record_count in a=20
+ subsequent request?? */
+
/* Allocate space for the SDP header, the attribute byte count field,
the attributes and the continuation state field */
- send_len =3D SDP_HDR_SIZE + 2 + 2 + cont_state_buf->len + 1;
+ send_len =3D SDP_HDR_SIZE + 2 + 2 + records_to_send * 4 + cont_bytes;
=20
send_buf =3D malloc(send_len);
D_MEM("---> malloc%d %d bytes at 0x%8p", malloc_dbg++, send_len, send_=
buf);
@@ -1766,56 +1758,90 @@
return;
}
=20
- set_sdp_hdr(send_buf, cont_state_buf->pdu, db->trans_id, send_len - SD=
P_HDR_SIZE);
+ set_sdp_hdr(send_buf, SDP_SERVICESEARCH_RSP, db->trans_id, send_len - SD=
P_HDR_SIZE);
=20
- /* Set the attribute byte count field */
- send_buf[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(cont_state_buf->len / 4);
- send_buf[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(cont_state_buf->len / 4);
+ /* Set the total attribute byte count field */
+ send_buf[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(total_record_cnt);
+ send_buf[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(total_record_cnt);
=20
/* Set the attribute byte count field */
- send_buf[SDP_HDR_SIZE+2] =3D SHORT2CHAR_MS(cont_state_buf->len / 4);
- send_buf[SDP_HDR_SIZE+3] =3D SHORT2CHAR_LS(cont_state_buf->len / 4);
+ send_buf[SDP_HDR_SIZE+2] =3D SHORT2CHAR_MS(records_to_send);
+ send_buf[SDP_HDR_SIZE+3] =3D SHORT2CHAR_LS(records_to_send);
=20
- memcpy(send_buf + SDP_HDR_SIZE + 2 + 2, cont_state_buf->data, cont_sta=
te_buf->len);
+ memcpy(send_buf + SDP_HDR_SIZE + 2 + 2, &cont_state_buf->data[cont_state=
_buf->cur_pos], records_to_send * 4);
=20
+ if(cont_bytes =3D=3D 2)=20
+ {
+ send_buf[send_len - 2] =3D 1;
+ send_buf[send_len - 1] =3D ++cont_state_buf->id;
+ cont_state_buf->cur_pos +=3D records_to_send * 4;
+ }
+ else
+ {
send_buf[send_len - 1] =3D 0;
+ free(cont_state_buf);
+ D_MEM("<--- free%d 0x%8p", --malloc_dbg, cont_state_buf);
+ cont_state_buf =3D NULL;
+ }
=20
/* Send the whole buffer */
write2stack(db->sdp_con_id, send_buf, send_len);
=20
D_MEM("<--- free%d 0x%8p", --malloc_dbg, send_buf);
free(send_buf);
-
- D_MEM("<--- free%d 0x%8p", --malloc_dbg, cont_state_buf);
- free(cont_state_buf);
- cont_state_buf =3D NULL;
- }
- else
- {
- /* Write as much as possible */
-
- /* FIXME: Have to implement this too... */
-
- send_error_rsp(db, SDP_INVALID_SDP_VERSION);
- }
}
=20
void
-send_cont_state_attr_rsp(int len, unsigned char *info, int max_attr_cnt,
- database_query_struct *db)
+send_cont_state_attr_rsp(unsigned char cont_id, int max_attr_cnt,
+ database_query_struct *db, unsigned char pdu)
{
unsigned char *send_buf;
int send_len;
+ int total_cnt;
+ int bytes_to_send;
+ int prev_send;
+ int cont_bytes =3D 2;
+ unsigned char reply_pdu;
=20=20=20
- if (!cont_state_buf) {
+ if (!cont_state_buf ||=20
+ (cont_state_buf->pdu !=3D pdu) ||=20
+ (cont_state_buf->id !=3D cont_id))=20
+ {
send_error_rsp(db, SDP_INVALID_CONTINUATION_STATE);
}
- else if (max_attr_cnt >=3D cont_state_buf->len)
+
+ if(cont_state_buf->pdu =3D=3D SDP_SERVICESEARCHATTR_REQ)=20
+ {
+ reply_pdu =3D SDP_SERVICESEARCHATTR_RSP;
+ }
+ else
{
+ reply_pdu =3D SDP_SERVICEATTR_RSP;
+ }
+=20=20
+
+ total_cnt =3D cont_state_buf->total_len;
+ prev_send =3D (total_cnt - cont_state_buf->len) + cont_state_buf->cur_po=
s;
+=20=20
+ bytes_to_send =3D MIN(total_cnt - prev_send, max_attr_cnt);
+
+ /* Calculate how much data we can fit in one response */
+ /* SdpHdrSize[5] + AttributeListCount[2] + possibl ContState[2]=20
+ =3D> 9 bytes. */
+
+ if((bytes_to_send + 9) > db->l2cap_mtu - 9)
+ {
+ bytes_to_send =3D db->l2cap_mtu - 9;
+ }
+
+ if(bytes_to_send + cont_state_buf->cur_pos =3D=3D cont_state_buf->len)
+ {
+ cont_bytes =3D 1;
+ }
+
/* Allocate space for the SDP header, the attribute byte count field,
the attributes and the continuation state field */
- send_len =3D SDP_HDR_SIZE + 2 + cont_state_buf->len + 1;
-
+ send_len =3D SDP_HDR_SIZE + 2 + bytes_to_send + cont_bytes;
send_buf =3D malloc(send_len);
D_MEM("---> malloc%d %d bytes at 0x%8p", malloc_dbg++, send_len, send_=
buf);
if (!send_buf)
@@ -1824,32 +1850,29 @@
return;
}
=20
- set_sdp_hdr(send_buf, cont_state_buf->pdu, db->trans_id, send_len - SD=
P_HDR_SIZE);
-
/* Set the attribute byte count field */
- send_buf[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(cont_state_buf->len);
- send_buf[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(cont_state_buf->len);
-
- memcpy(send_buf + SDP_HDR_SIZE + 2, cont_state_buf->data, cont_state_b=
uf->len);
-
- send_buf[send_len - 1] =3D 0;
-
- /* Send the whole buffer */
- write2stack(db->sdp_con_id, send_buf, send_len);
-
- D_MEM("<--- free%d 0x%8p", --malloc_dbg, send_buf);
- free(send_buf);
+ send_buf[SDP_HDR_SIZE] =3D SHORT2CHAR_MS(bytes_to_send);
+ send_buf[SDP_HDR_SIZE+1] =3D SHORT2CHAR_LS(bytes_to_send);
=20
+ memcpy(send_buf + SDP_HDR_SIZE + 2, &cont_state_buf->data[cont_state_buf=
->cur_pos], bytes_to_send);
+ cont_state_buf->cur_pos +=3D bytes_to_send;
+ if(cont_bytes =3D=3D 2)=20
+ {
+ send_buf[SDP_HDR_SIZE + 2 + bytes_to_send] =3D 0x01;
+ send_buf[SDP_HDR_SIZE + 2 + bytes_to_send + 1] =3D ++cont_state_buf->i=
d;
+ }
+ else
+ {
+ send_buf[SDP_HDR_SIZE + 2 + bytes_to_send] =3D 0x00;
D_MEM("<--- free%d 0x%8p", --malloc_dbg, cont_state_buf);
free(cont_state_buf);
cont_state_buf =3D NULL;
}
- else
- {
- /* Write as much as possible */
=20
- /* FIXME: Have to implement this too... */
+ set_sdp_hdr(send_buf, reply_pdu, db->trans_id, bytes_to_send + 2 + cont_=
bytes);
+ /* Send the whole buffer */
+ write2stack(db->sdp_con_id, send_buf, send_len);
=20
- send_error_rsp(db, SDP_INVALID_SDP_VERSION);
- }
+ D_MEM("<--- free%d 0x%8p", --malloc_dbg, send_buf);
+ free(send_buf);
}
--- sdp_server.h 14 Jun 2001 10:30:42 -0000 1.11
+++ sdp_server.h 7 Mar 2002 21:23:19 -0000 1.12
@@ -151,8 +151,11 @@
=20
typedef struct cont_state_struct
{
+ unsigned char id;
unsigned char pdu;
int len;
+ int cur_pos;
+ int total_len;
unsigned char data[0];
} cont_state_struct;
=20
@@ -162,11 +165,13 @@
void init_sdp_server(int fd);
void print_data(const char *message, const unsigned char *buf, int len);
void
-send_cont_state_search_rsp(int len, unsigned char *info, int max_rec_cnt,
+send_cont_state_search_rsp(unsigned char cont_id,
database_query_struct *db);
void
-send_cont_state_attr_rsp(int len, unsigned char *info, int max_attr_cnt,
- database_query_struct *db);
+send_cont_state_attr_rsp(unsigned char cont_id, int max_attr_cnt,
+ database_query_struct *db, unsigned char pdu);
+
+
unsigned int *get_more_rec_hdl(unsigned short servive_class, int fd);
void send_error_rsp(database_query_struct *db, unsigned short err_code);
=20
|
|
From: Anders J. <and...@us...> - 2002-03-01 13:30:29
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap.c 1.131 1.132=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added BNEP to psm2str function.
* Replaced hardcoded values with global defines.
The diff of the modified file(s):
--- l2cap.c 25 Feb 2002 14:08:36 -0000 1.131
+++ l2cap.c 1 Mar 2002 13:30:27 -0000 1.132
@@ -3323,23 +3323,26 @@
const u8* psm2str(u16 psm)
{
switch (psm) {
- case 1:
+ case SDP_LAYER:
return "SDP";
=20
- case 3:
+ case RFCOMM_LAYER:
return "RFCOMM";
=20
- case 5:
+ case TCS_LAYER:
return "TCS";
=20
- case 0x1231:
+ case L2CAP_TEST_LAYER:
return "TEST";
=20
- case 0x1233:
+ case L2CAP_TEST2_LAYER:
return "TEST-2";
=20
- case 0x4461:
+ case L2CAP_TEST3_LAYER:
return "TEST-3";
+=09=09
+ case BNEP_LAYER:
+ return "BNEP";
=20
default:
return "Unknown";
|
|
From: Anders J. <and...@us...> - 2002-02-28 20:12:16
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.223 1.224=20=20=20=20=20=20=20=20=20=20=20
hci.c 1.193 1.194=20=20=20=20=20=20=20=20=20=20=20
hci_sec.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.61 1.62=20=20=20=20=20=20=20=20=20=20=20=20
sec_client.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Modified event filter setting procedure to handle any kind of filter.
* Number of cmdbuffers isn't decreased after a set_baudrate command.
The diff of the modified file(s):
--- bluetooth.c 12 Feb 2002 13:54:00 -0000 1.223
+++ bluetooth.c 28 Feb 2002 20:12:14 -0000 1.224
@@ -974,11 +974,15 @@
case HCISET_EVENT_FILTER:
{
u8 param[size];
+ u16 filter_size;
=20
BT_DRIVER(__FUNCTION__ ": HCISET_EVENT_FILTER\n");
copy_from_user(param, (s32*)arg, size);
=20=09=09
- hci_set_event_filter(param);
+ /* The size of the filter is in the first two bytes */
+ filter_size =3D ((param[0] << 8) & 0xff00) | param [1];
+
+ hci_set_event_filter(¶m[2], filter_size);
break;
}=09
=20=09=09
--- hci.c 13 Feb 2002 10:04:54 -0000 1.193
+++ hci.c 28 Feb 2002 20:12:15 -0000 1.194
@@ -2818,18 +2818,14 @@
=20
=20
s32
-hci_set_event_filter(u8 *data)
+hci_set_event_filter(u8 *data, u16 len)
{
D_CMD(__FUNCTION__ "\n");
=20
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(SET_EVENT_FILTER, HCI_HC);
- c_pkt.data[0] =3D data[0];
- c_pkt.data[1] =3D data[1];
- c_pkt.data[2] =3D data[2];
-
- c_pkt.len =3D 3;
-=20=20
+ memcpy(c_pkt.data, data, len);
+ c_pkt.len =3D len;
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
--- hci_sec.c 22 Feb 2002 13:16:59 -0000 1.1
+++ hci_sec.c 28 Feb 2002 20:12:15 -0000 1.2
@@ -85,15 +85,14 @@
=20
=20
=20
-void hci_process_sec_man_response(u16 result, u32 user_data, u32 request_v=
alue, unsigned char * event_param, unsigned char * remote_bd)
+void=20
+hci_process_sec_man_response(u16 result, u32 user_data, u32 request_value,=
unsigned char * event_param, unsigned char * remote_bd)
{
u8 pin_length =3D 0;
=20=09
- switch (request_value)
- {
+ switch (request_value) {
case PIN_CODE_REQUEST:
- switch(result)
- {
+ switch(result) {
case SECURITY_OK:
/* Calculate the PIN LENGTH */
while ((pin_length <=3D 16) && (event_param[pin_length] !=3D '\0'=
))
@@ -117,8 +116,7 @@
break;
=20=09=20=20=20=20
case LINK_KEY_REQUEST:
- switch(result)
- {
+ switch(result) {
case SECURITY_OK:
D(printk("Link key returned\n"));
hci_link_key_request_reply(remote_bd, event_param);
--- hci_vendor.c 28 Feb 2002 10:40:05 -0000 1.61
+++ hci_vendor.c 28 Feb 2002 20:12:15 -0000 1.62
@@ -1067,7 +1067,12 @@
#ifdef __KERNEL__
bt_wait_tx(2000); /* wait until DMA empty + 2 ms */
#endif
- hci_ctrl.hc_buf.cmd_num--;
+
+ /* FIXME: We don't catch a command status event after this and if=20
+ we decrease the number of buffers free it won't be updated
+ after the baudrate setting. We need to do this in a more
+ proper way. */
+ //hci_ctrl.hc_buf.cmd_num--;
=20
return tmp;
}
|
|
From: Anders J. <and...@us...> - 2002-02-28 20:09:29
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.93 1.94=20=20=20=20=20=20=20=20=20=20=20=20 hci.h 1.75 1.76=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * set_event_filter now handle any type of filter. The diff of the modified file(s): --- btcommon.h 6 Feb 2002 11:19:58 -0000 1.93 +++ btcommon.h 28 Feb 2002 20:09:27 -0000 1.94 @@ -186,7 +186,7 @@ #define HCIWRITE_AUTHENTICATION_ENABLE _IOWR(BT_IOC_MAGIC, 0x3c, s32) #define HCIREAD_ENCRYPTION_MODE _IOR(BT_IOC_MAGIC, 0x3d, s32) #define HCIWRITE_ENCRYPTION_MODE _IOWR(BT_IOC_MAGIC, 0x3e, s32) -#define HCISET_EVENT_FILTER _IOW(BT_IOC_MAGIC, 0x3f, u8[3]) +#define HCISET_EVENT_FILTER _IOW(BT_IOC_MAGIC, 0x3f, u8[255]) #define HCIREADTRANSMITPOWERLEVEL _IOWR(BT_IOC_MAGIC, 0x40, u8) =20 /* Informational Parameters */ --- hci.h 13 Feb 2002 10:04:34 -0000 1.75 +++ hci.h 28 Feb 2002 20:09:27 -0000 1.76 @@ -171,7 +171,7 @@ s32 hci_read_link_supervision_to(u32 hdl); s32 hci_write_link_supervision_to(u32 hdl, u32 link_to, s32 block); s32 hci_write_class_of_device(u8 *class_of_device); -s32 hci_set_event_filter(u8 *data); +s32 hci_set_event_filter(u8 *data, u16 len); s32 hci_read_power_transmit_level(u32 con_hdl, unsigned char type); s32 hci_write_page_to(u32 page_to); s32 hci_write_hold_mode_activity(u32 hma); |
|
From: Anders J. <and...@us...> - 2002-02-28 20:08:34
|
The following files were modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_if.c 1.43 1.44=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20
bt_vendor.c 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* bt_set_event_filter should now handle any type of filter.
The diff of the modified file(s):
--- bt_if.c 26 Feb 2002 18:08:59 -0000 1.43
+++ bt_if.c 28 Feb 2002 20:08:31 -0000 1.44
@@ -863,18 +863,22 @@
#endif
}
=20
-int bt_set_event_filter(int bt_cfd, unsigned char filter[3])
+int bt_set_event_filter(int bt_cfd, unsigned char *filter, int len)
{
int result;
+ unsigned char tmp[255];
=20
- syslog(LOG_INFO, "Setting event filter [0x%x 0x%x 0x%x]",=20
- filter[0], filter[1], filter[2]);
+ syslog(LOG_INFO, "Setting event filter");
=20
#ifdef BT_USERSTACK
- result =3D hci_set_event_filter((u8*)filter);
+ result =3D hci_set_event_filter((u8*)filter, len);
#else
=20
- if ((result =3D ioctl(bt_cfd, HCISET_EVENT_FILTER, filter)) < 0)
+ tmp[0] =3D (len >> 8) & 0xff;
+ tmp[1] =3D len & 0xff;
+ memcpy(&tmp[2], filter, len);
+
+ if ((result =3D ioctl(bt_cfd, HCISET_EVENT_FILTER, tmp)) < 0)
{=20
perror(__FUNCTION__);
exit(1);
--- bt_if.h 6 Feb 2002 11:31:56 -0000 1.31
+++ bt_if.h 28 Feb 2002 20:08:31 -0000 1.32
@@ -178,7 +178,7 @@
#define HCIWRITE_AUTHENTICATION_ENABLE _IOWR(BT_IOC_MAGIC, 0x3c, int)
#define HCIREAD_ENCRYPTION_MODE _IOR(BT_IOC_MAGIC, 0x3d, int)
#define HCIWRITE_ENCRYPTION_MODE _IOWR(BT_IOC_MAGIC, 0x3e, int)
-#define HCISET_EVENT_FILTER _IOW(BT_IOC_MAGIC, 0x3f, unsigned char[3])
+#define HCISET_EVENT_FILTER _IOW(BT_IOC_MAGIC, 0x3f, unsigned char[255])
=20
/* Informational Parameters */
=20
@@ -333,7 +333,7 @@
void read_remote_bd(int bt_cfd, int line, unsigned char *bd_addr);
void role_switch(int bt_cfd, unsigned char *bd_addr, int role);
=20
-int bt_set_event_filter(int bt_cfd, unsigned char filter[3]);
+int bt_set_event_filter(int bt_cfd, unsigned char *filter, int len);
int bt_write_scan_enable(int bt_cfd, unsigned int flags);
void bt_write_pagescan_activity(int bt_cfd, unsigned int interval,=20
unsigned int wind);
--- bt_vendor.c 16 Oct 2001 15:02:20 -0000 1.31
+++ bt_vendor.c 28 Feb 2002 20:08:31 -0000 1.32
@@ -474,6 +474,7 @@
csr_init_hw(int bt_cfd, int phys_fd, const char *speedstr)
{
/* Connection setup, all devices, no auto accept */
+ unsigned char clear_filter[1] =3D { 0x00 };
unsigned char filter[3] =3D { 0x02, 0x00, 0x01 };
unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
int firmware =3D -1;
@@ -491,7 +492,8 @@
=20
bt_write_pagescan_activity(bt_cfd, 0x0800, 0x12);
=20
- bt_set_event_filter(bt_cfd, filter);
+ bt_set_event_filter(bt_cfd, clear_filter, 1);
+ bt_set_event_filter(bt_cfd, filter, 3);
=20
sleep(1);=20=20
=20
@@ -565,7 +567,7 @@
=20
D(syslog(LOG_INFO, "Setting baudrate in Digianswer PC card"));
=20
- bt_set_event_filter(bt_cfd, filter);
+ bt_set_event_filter(bt_cfd, filter, 3);
=20
if (speedstr)
{
@@ -605,7 +607,7 @@
sleep(1);
=20
/* set_event_filter must be called for m/s switch on IrmaC! */
- bt_set_event_filter(bt_cfd, filter);
+ bt_set_event_filter(bt_cfd, filter, 3);
=20
sleep(1); // wait for HW...
=20
@@ -681,7 +683,7 @@
=20
sleep(1);
=20
- bt_set_event_filter(bt_cfd, filter);
+ bt_set_event_filter(bt_cfd, filter, 3);
}
=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=3D=3D=3D*/
@@ -704,7 +706,7 @@
D(syslog(LOG_INFO, "Setting write_scan_enable in generic module"));
=20=20=20
bt_write_scan_enable(bt_cfd, wrscan);
- bt_set_event_filter(bt_cfd, filter);
+ bt_set_event_filter(bt_cfd, filter, 3);
}
=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=3D=3D=3D*/
|
|
From: Anders J. <and...@us...> - 2002-02-28 15:45:12
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
Makefile 1.30 1.31=20=20=20=20=20=20=20=20=20=20=20=20
sec_client.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added hci_sec.c to makefile.
* Corrected typo.
The diff of the modified file(s):
--- Makefile 4 Feb 2002 11:53:45 -0000 1.30
+++ Makefile 28 Feb 2002 15:45:08 -0000 1.31
@@ -4,7 +4,7 @@
=20
OBJS =3D bluetooth.o bt_proc.o btdebug.o btmem.o hci.o hci_vendor.o \
l2cap.o l2cap_con.o l2cap_sec.o rfcomm.o rfcomm_sec.o \
- sec_client.o sdp.o tcs.o test.o
+ sec_client.o sdp.o tcs.o test.o hci_sec.o
=20
BOBJS =3D bcsp.o bcsp_datagram.o bcsp_integrity.o bcsp_mux.o \
bcsp_sequence.o bcsp_slip.o
--- sec_client.c 22 Feb 2002 14:02:40 -0000 1.21
+++ sec_client.c 28 Feb 2002 15:45:08 -0000 1.22
@@ -725,7 +725,7 @@
break;
=20=09=09
case HCI:
- D_PROC(FNC"Message to HCI\n");
+ D_PROC(__FUNCTION__ ": Message to HCI\n");
hci_process_sec_man_response(sec_hdl->request_result,
sec_hdl->originator_data,
sec_hdl->request_value,
|
|
From: Alain P. <apa...@us...> - 2002-02-28 10:40:08
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.60 1.61=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added big endian support when askping firmware version
Sorry : add a define (CONFIG_BLUETOOTH_SD_SPECIFIC) because the
module doesn't work if the firmware value is stored in the string.
I will remove this define a soon as I understood why it change
the csr module behavior.
The diff of the modified file(s):
--- hci_vendor.c 23 Oct 2001 09:20:59 -0000 1.60
+++ hci_vendor.c 28 Feb 2002 10:40:05 -0000 1.61
@@ -557,6 +557,13 @@
cmd =3D (struct csr_bccmd *)data;
ps =3D (struct csr_bccmd_ps *)cmd->payload;
=20
+ /* Invert u16 if big endian */
+ cmd->type =3D le16_to_cpu(cmd->type);
+ cmd->len =3D le16_to_cpu(cmd->len);
+ cmd->seq =3D le16_to_cpu(cmd->seq);
+ cmd->var_id =3D le16_to_cpu(cmd->var_id);
+ cmd->status =3D le16_to_cpu(cmd->status);
+
if (cmd->status =3D=3D CSR_STATUS_OK) {
if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP) {
switch (cmd->var_id) {
@@ -565,10 +572,12 @@
break;
=20=09=09=09=09
case CSR_CMD_BUILD_ID:
+#ifndef CONFIG_BLUETOOTH_SD_SPECIFIC
/* Store this for later retrieval */
sprintf(bt_hw_firmware_info,
"\n Firmware version: %d",
cmd->payload[0]);
+#endif
break;
=20=09=09=09=09
case CSR_CMD_CHIP_VER:
@@ -829,6 +838,8 @@
csr_bccmd *cmd;
csr_bccmd_ps *ps;
=20
+#ifndef CONFIG_BLUETOOTH_SD_SPECIFIC
+
D_CMD(__FUNCTION__" : ps_key 0x%x [%d]\n", ps_key, rw_mode);=09
PRINTPKT("pars : ", (u8*)retb, n_pars*sizeof(u16));
=20
@@ -876,6 +887,9 @@
/* Signal status back in SETREQ ? */
=20
return tmp;
+#else
+ return 0;
+#endif
}
=20
s32=20
@@ -944,26 +958,26 @@
CSR_SET_CH_ID(msg, CSR_CH_ID_BCCMD);
=20
/* BCCMD type */
- cmd->type =3D CSR_MSGTYPE_GETREQ;
- cmd->len =3D 5 + 6;
- cmd->seq =3D csr_count++;
- cmd->var_id =3D CSR_CMD_BUILD_ID;
- cmd->status =3D CSR_STATUS_OK; /* always OK in GETREQ */
+ cmd->type =3D cpu_to_le16(CSR_MSGTYPE_GETREQ);
+ cmd->len =3D cpu_to_le16(5 + 6);
+ cmd->seq =3D cpu_to_le16(csr_count++);
+ cmd->var_id =3D cpu_to_le16(CSR_CMD_BUILD_ID);
+ cmd->status =3D cpu_to_le16(CSR_STATUS_OK); /* always OK in GETREQ */
memset(cmd->payload, 0, 6*sizeof(u16));
=20
tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
if (tmp < 0)
return tmp;
=20
- cmd->seq =3D csr_count++;
- cmd->var_id =3D CSR_CMD_CHIP_VER;
+ cmd->seq =3D cpu_to_le16(csr_count++);
+ cmd->var_id =3D cpu_to_le16(CSR_CMD_CHIP_VER);
memset(cmd->payload, 0, 6*sizeof(u16));
tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
if (tmp < 0)
return tmp;
=20
- cmd->seq =3D csr_count++;
- cmd->var_id =3D CSR_CMD_CHIP_REV;
+ cmd->seq =3D cpu_to_le16(csr_count++);
+ cmd->var_id =3D cpu_to_le16(CSR_CMD_CHIP_REV);
memset(cmd->payload, 0, 6*sizeof(u16));
tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N, DEFAULT_TIMEOUT);
=20
|
|
From: Peter K. <pk...@us...> - 2002-02-26 18:09:00
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_if.c 1.42 1.43=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed a couple of extraneous & (address dereferences) which
amongst others caused bt_set_event_filter() to not function
properly (actually it did not work at all).
The diff of the modified file(s):
--- bt_if.c 26 Feb 2002 17:43:32 -0000 1.42
+++ bt_if.c 26 Feb 2002 18:08:59 -0000 1.43
@@ -587,7 +587,7 @@
msg[7] =3D (unsigned char)(type & 0xff);
=20
#ifndef BT_USERSTACK=20
- if ((ret_val =3D ioctl(bt_cfd, BTGETINFO, &msg)) < 0)
+ if ((ret_val =3D ioctl(bt_cfd, BTGETINFO, msg)) < 0)
{
printf("Error : [%s (%d)]\n", error_msg(ret_val), MSG_GET_CODE(-ret_va=
l));
}
@@ -854,7 +854,7 @@
tmp[0] =3D interval;
tmp[1] =3D wind;
=20
- if (ioctl(bt_cfd, HCIWRITEPAGESCANACTIVITY, &tmp) < 0)
+ if (ioctl(bt_cfd, HCIWRITEPAGESCANACTIVITY, tmp) < 0)
{=20
perror(__FUNCTION__);
exit(1);
@@ -871,10 +871,10 @@
filter[0], filter[1], filter[2]);
=20
#ifdef BT_USERSTACK
- result =3D hci_set_event_filter((u8*)&filter);
+ result =3D hci_set_event_filter((u8*)filter);
#else
=20
- if ((result =3D ioctl(bt_cfd, HCISET_EVENT_FILTER, &filter)) < 0)
+ if ((result =3D ioctl(bt_cfd, HCISET_EVENT_FILTER, filter)) < 0)
{=20
perror(__FUNCTION__);
exit(1);
|
|
From: Peter K. <pk...@us...> - 2002-02-26 17:50:57
|
The following files were modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_if.c 1.41 1.42=20=20=20=20=20=20=20=20=20=20=20=20
bt_misc.c 1.23 1.24=20=20=20=20=20=20=20=20=20=20=20=20
bt_misc.h 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20
btconfig.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added get_domain_name() which tries to get the domain name first
from /etc/resolv.conf, and if that fails using gethostname() or
getdomainname() (whichever succeeds).
The diff of the modified file(s):
--- bt_if.c 16 Oct 2001 16:15:34 -0000 1.41
+++ bt_if.c 26 Feb 2002 17:43:32 -0000 1.42
@@ -971,13 +971,11 @@
=20
void set_local_hostname(int bt_cfd, const char *local_name)
{
- unsigned char domainname[DOMAIN_NAME_LENGTH+1];
unsigned char buf[LOCAL_NAME_LENGTH + HOST_NAME_LENGTH +=20
DOMAIN_NAME_LENGTH + 5];
int len =3D 0;
=20
*buf =3D '\0';
- *domainname =3D '\0';
=20
if (*local_name)
{
@@ -1001,11 +999,12 @@
=20
if (!strchr(&buf[len], '.'))
{
- getdomainname(domainname, DOMAIN_NAME_LENGTH);
- if (*domainname)
+ char* domain_name =3D get_domain_name();
+
+ if (*domain_name)
{
strcat(buf, ".");
- strcat(buf, domainname);
+ strncat(buf, domain_name, DOMAIN_NAME_LENGTH);
}
}
=20
--- bt_misc.c 16 Oct 2001 15:02:19 -0000 1.23
+++ bt_misc.c 26 Feb 2002 17:43:32 -0000 1.24
@@ -44,7 +44,6 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <stdio.h>
-#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <stdlib.h>
@@ -53,6 +52,7 @@
#include <errno.h>
#include <stdarg.h>
#include <signal.h>
+#include <ctype.h>
#include <linux/serial.h> /* struct serial_struct */
=20
/* The following includes are required to be able to determine the local
@@ -313,6 +313,73 @@
strcpy(ip, inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr));
=20
return ip;
+}
+
+char*
+get_domain_name(void)
+{
+ static char domain_name[256];
+ static char line[256];
+ FILE* file;
+
+ *domain_name =3D '\0';
+
+ /* Extract the domain name from the /etc/resolv.conf file */
+
+ if ((file =3D fopen("/etc/resolv.conf", "r")))
+ {
+ while (fgets(line, sizeof line, file))
+ {
+ char* s =3D line;
+
+ while (isspace(*s))
+ {
+ s++;
+ }
+
+ if (!strncasecmp(s, "domain", 6) && isspace(s[6]))
+ {
+ char* d =3D domain_name;
+
+ s +=3D 7;
+ while (isspace(*s))
+ {
+ s++;
+ }
+
+ while (*s && !isspace(*s))
+ {
+ *d++ =3D *s++;
+ }
+ *d =3D '\0';
+
+ if (*domain_name)
+ {
+ break;
+ }
+ }
+ else if (!strncasecmp(s, "search", 6) && isspace(s[6]))
+ {
+ char* d =3D domain_name;
+
+ s +=3D 7;
+ while (isspace(*s))
+ {
+ s++;
+ }
+
+ while (*s && !isspace(*s))
+ {
+ *d++ =3D *s++;
+ }
+ *d =3D '\0';
+ }
+ }
+
+ fclose(file);
+ }
+
+ return domain_name;
}
=20
int=20
--- bt_misc.h 16 Oct 2001 15:02:20 -0000 1.12
+++ bt_misc.h 26 Feb 2002 17:43:32 -0000 1.13
@@ -64,6 +64,9 @@
int restart_btd(void);
=20
char *get_local_ip_address(void);
+
+char* get_domain_name(void);
+
const char *bd2str(const unsigned char *bd);
#ifndef BT_USERSTACK
void print_data(const char *message, const unsigned char *buf, int len);
--- btconfig.c 12 Oct 2001 07:37:39 -0000 1.10
+++ btconfig.c 26 Feb 2002 17:43:32 -0000 1.11
@@ -428,19 +428,18 @@
=20
if (var_add_host_name =3D=3D TRUE)
{
- char tmp_str[DOMAIN_NAME_LENGTH];
-
D(syslog(LOG_INFO, __FUNCTION__": Add hostname and domain name"));
=20=20=20=20=20=20=20
gethostname(ip_name, HOST_NAME_LENGTH);
=20=20=20=20=20=20=20
if (!strchr(ip_name, '.'))
{
- getdomainname(tmp_str, DOMAIN_NAME_LENGTH);
- if (*tmp_str)
+ char* domain_name =3D get_domain_name();
+
+ if (*domain_name)
{
strcat(ip_name, ".");
- strcat(ip_name, tmp_str);
+ strncat(ip_name, domain_name, DOMAIN_NAME_LENGTH);
}
}
}
|
|
From: Mildred F. <mil...@as...> - 2002-02-26 11:08:20
|
is there an open source implementation of the hci transport layer in rs232 ? thanks ! mildred -------------- Mildred L. Frisco Science Research Specialist II Communications Engineering Division Advanced Science and Technology Institute UP Technology Park, C. P. Garcia Avenue Diliman, Quezon City PHILIPPINES Telefax: 435-1071 http://www.asti.dost.gov.ph mil...@as... ....... God gives every bird his worm, but he does not throw it into the nest. -- Swedish Proverb |
|
From: Anders J. <and...@us...> - 2002-02-25 14:38:05
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bnep.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20
rfcomm.c 1.131 1.132=20=20=20=20=20=20=20=20=20=20=20
sdp.c 1.85 1.86=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected cut-and-paste mistake.
* Discovered that funcion isn't an english word! :)
The diff of the modified file(s):
--- bnep.c 25 Feb 2002 14:08:35 -0000 1.9
+++ bnep.c 25 Feb 2002 14:28:18 -0000 1.10
@@ -1322,7 +1322,7 @@
=20=09
/* If we weren't the initiator, we now send our configuration request. */
/* Fix l2cap->remote_mtu should be max BNEP_MTU??? */
- if (!l2ca_local_conf_done(con) && !con->conf_req_sent) {
+ if (!l2ca_local_conf_done(l2cap) && !l2cap->conf_req_sent) {
if (l2ca_config_req(l2cap, BNEP_MTU,=20
NULL, BNEP_FLUSH_TIMEOUT, 0)) {
D_ERR(__FUNCTION__": l2ca_config_req failed\n");
--- rfcomm.c 25 Feb 2002 14:08:36 -0000 1.131
+++ rfcomm.c 25 Feb 2002 14:28:19 -0000 1.132
@@ -911,7 +911,7 @@
}
=20
/* check if we received a pos response on a previous conf req */=20
- if (!l2ca_local_conf_done(con) && !con->conf_req_sent) {
+ if (!l2ca_local_conf_done(l2cap) && !l2cap->conf_req_sent) {
l2cap->local_mtu=3Dl2cap->remote_mtu;
=20
DSYS(FNC"Local l2cap mtu set to %d\n",=20
--- sdp.c 25 Feb 2002 14:08:37 -0000 1.85
+++ sdp.c 25 Feb 2002 14:28:19 -0000 1.86
@@ -526,7 +526,7 @@
}
=20
if(l2cap->current_state !=3D OPEN) {
- DSYS(__FUNTION__ ": Configuration not done yet\n");
+ DSYS(__FUNCTION__ ": Configuration not done yet\n");
}
=20
/* Find the connecting sdp_con */
|
|
From: Anders J. <and...@us...> - 2002-02-25 14:09:07
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap.h 1.43 1.44=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added l2ca_conf_done. The diff of the modified file(s): --- l2cap.h 9 Jan 2002 10:07:35 -0000 1.43 +++ l2cap.h 25 Feb 2002 14:09:05 -0000 1.44 @@ -429,11 +429,13 @@ /* FIXME */ void l2ca_qos_violation_ind(l2cap_con *con); =20 -int l2ca_opened(l2cap_con *con); +s32 l2ca_opened(l2cap_con *con); =20 -int l2ca_remote_conf_done(l2cap_con *con); +s32 l2ca_remote_conf_done(l2cap_con *con); =20 -int l2ca_local_conf_done(l2cap_con *con); +s32 l2ca_local_conf_done(l2cap_con *con); + +s32 l2ca_conf_done(l2cap_con *con); =20 =20 /*******************************************************************/ |
|
From: Anders J. <and...@us...> - 2002-02-25 14:08:38
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bnep.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20
l2cap.c 1.130 1.131=20=20=20=20=20=20=20=20=20=20=20
rfcomm.c 1.130 1.131=20=20=20=20=20=20=20=20=20=20=20
sdp.c 1.84 1.85=20=20=20=20=20=20=20=20=20=20=20=20
test.c 1.32 1.33=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Handle continuation flag in the configprocedure correctly.=20
* Handle the hintflag in a configurationoption.
The diff of the modified file(s):
--- bnep.c 20 Feb 2002 10:13:37 -0000 1.8
+++ bnep.c 25 Feb 2002 14:08:35 -0000 1.9
@@ -1316,27 +1316,20 @@
{
D_MISC(__FUNCTION__": remote cid %d\n", l2cap->remote_cid);
=20=09
- /* Check if we have sent a pos response yet */
- if (!l2ca_remote_conf_done(l2cap)) {
- /* Send a positive response */
if (l2ca_config_rsp(l2cap, l2cap->remote_mtu, NULL, CONF_SUCCESS)) {
D_ERR(__FUNCTION__": l2ca_config_rsp failed\n");
}
- } else {
- DSYS(__FUNCTION__": already sent a pos response\n");
- }
=20=09
/* If we weren't the initiator, we now send our configuration request. */
/* Fix l2cap->remote_mtu should be max BNEP_MTU??? */
- if (!l2cap->initiator) {
- if (!l2ca_local_conf_done(l2cap)) {
- if (l2ca_config_req(l2cap, l2cap->remote_mtu,=20
+ if (!l2ca_local_conf_done(con) && !con->conf_req_sent) {
+ if (l2ca_config_req(l2cap, BNEP_MTU,=20
NULL, BNEP_FLUSH_TIMEOUT, 0)) {
D_ERR(__FUNCTION__": l2ca_config_req failed\n");
}
- } else {
- DSYS(__FUNCTION__": already ready with config req\n");
}
+ else {
+ DSYS(__FUNCTION__": already ready with config req\n");
}
}
=20
@@ -1354,7 +1347,7 @@
DSYS(__FUNCTION__ ": l2cap configuration failed\n");
/* FIX ME notify usermode and reset connection */
return;
- } else {
+ } else if(l2cap->current_state =3D=3D OPEN) {
D_MISC(__FUNCTION__ ": remote cid %d\n", l2cap->remote_cid);
DSYS(__FUNCTION__ ": bnep channel opened\n");
dev =3D l2cap->upper_con;
@@ -1366,6 +1359,8 @@
bnep_setup_connection(local);=20
}
D_MISC("Interface %s\n", dev->name);
+ } else {
+ DSYS(__FUNCTION__": not done with configuration yet\n");
}
}
=20
--- l2cap.c 19 Feb 2002 19:04:41 -0000 1.130
+++ l2cap.c 25 Feb 2002 14:08:36 -0000 1.131
@@ -722,8 +722,7 @@
=20=09=09
switch (con->current_state) {
case CLOSED:
- /* FIXME - send peer=20
- 'l2cap_config_rsp_neg' */
+ l2cap_config_rsp(con, 0, NULL, CONF_REJ);
break;
=20=09=09=09
case CONFIG: {
@@ -1094,27 +1093,31 @@
#ifdef CONFIG_BLUETOOTH_L2CAP_USE_TIMERS
disable_rtx(con);
#endif
+ /* Do we expect any more values, if not we are done with our sides
+ configuration, reset the req_sent variable */
+ if(!confrsp->flags) {
con->conf_req_ready =3D TRUE;
+ con->conf_req_sent =3D 0;
+ }
=20
- if (!con->conf_rsp_ready) {
- /* Upper layers still haven't replied pos */
- D_STATE(__FUNCTION__": Still haven't replied pos on other sides conf r=
eq\n");
- return ;
- } else {=09=09=09=09
+
+ /* If both sides is ready with the configuration enter the
+ open state otherwise reside in CONFIG state */
+
+ if (l2ca_conf_done(con)) {=09=09=09
ENTERSTATE(con, OPEN);
PRINTSTATE(con);
DSYS("l2cap channel (%d,%d) [%s] connected\n",=20
con->local_cid, con->remote_cid,=20
psm2str(con->psm));
+ } else {
+ D_STATE(__FUNCTION__ ": Both sides not done with the configuration yet=
\n");
+ }
=20=09=09=09=09
/* notify upper layers that we successfully
opened a connection ! */
l2ca_config_cfm(con, confrsp->result);
-
- /* reset variable */
- con->conf_req_sent =3D 0;
return;
- }
=20=09=09=09
case CONF_FAILURE:
=20
@@ -1819,12 +1822,14 @@
=20
if (result =3D=3D CONF_SUCCESS) {
/* upper layers responded OK */
- con->conf_rsp_ready =3D TRUE;
=20
ret_val =3D l2cap_config_rsp(con, out_mtu, in_flow, result);
+ if(!con->remote_flags) {
+ con->conf_rsp_ready =3D TRUE;
+ }
=20
- /* check if we have sent a configure request yet */
- if (con->conf_req_ready && !con->remote_flags) {
+ /* Is the configuration done yet then enter OPEN state */
+ if (l2ca_conf_done(con)) {
/* all done, proceed to OPEN */
ENTERSTATE(con, OPEN);
PRINTSTATE(con);
@@ -3148,6 +3153,11 @@
return con->conf_req_ready;
}
=20
+s32 l2ca_conf_done(l2cap_con *con)
+{
+ return (con->conf_req_ready && con->conf_rsp_ready);
+}
+
/* Parse and set remote options in l2cap con */
s32=20
parse_options(l2cap_con *con, u8 *data, u32 len)
@@ -3163,7 +3173,9 @@
=20
while (pos < len) {
opt =3D (l2cap_option*)(data + pos);
- switch (opt->type) {
+=09=09
+ /* Strip the hint-bit before using */
+ switch (opt->type & 0x7f) {
case OPT_MTU:
con->remote_mtu =3D *(opt->option_data) |=20
(*(opt->option_data + 1) << 8);
--- rfcomm.c 3 Dec 2001 11:31:31 -0000 1.130
+++ rfcomm.c 25 Feb 2002 14:08:36 -0000 1.131
@@ -904,33 +904,14 @@
void=20
rfcomm_config_ind(l2cap_con* l2cap)
{
-
- /*=20
- FIXME
- Check whether the received params are acceptable,=20
- accept all for now
- */
-
D_CTRL("rfcomm_config_ind : remote cid %d\n", l2cap->remote_cid);
- /* check if we have sent a pos response yet */
- if (!l2ca_remote_conf_done(l2cap)){
- /* still haven't sent a pos configure response*/
-=09=09
if (l2ca_config_rsp(l2cap, l2cap->remote_mtu,=20
NULL, CONF_SUCCESS)) {
D_ERR(FNC"l2ca_config_rsp failed\n");
}
- } else=20
- DSYS(FNC"already have sent back a pos response\n");
-
=20
/* check if we received a pos response on a previous conf req */=20
- if (((rfcomm_con*) l2cap->upper_con)->initiator =3D=3D FALSE) {
-
- /* check if we received a pos response on a=20
- previous config req */=20
- if (!l2ca_local_conf_done(l2cap))
- {
+ if (!l2ca_local_conf_done(con) && !con->conf_req_sent) {
l2cap->local_mtu=3Dl2cap->remote_mtu;
=20
DSYS(FNC"Local l2cap mtu set to %d\n",=20
@@ -940,11 +921,9 @@
0, 0)) {
D_ERR(FNC"l2ca_config_req failed\n");
}
- } else=20
+ } else {
DSYS(FNC"already ready with config req\n");
-
}=20
-
}
=20
/* The lower protocol layer, L2CAP, indicates that the configuration
@@ -964,7 +943,7 @@
bt_connect_cfm(CREATE_RFCOMM_ID(rfcomm->line,0), status);
rfcomm_reset_con(rfcomm->line);
return;
- } else {
+ } else if(l2cap->current_state =3D=3D OPEN) {
DSYS(FNC"l2cap is now open\n");
=20=09=09
if (rfcomm->initiator &&=20
@@ -984,9 +963,9 @@
rfcomm->dlci[j].mtu =3D (l2cap->remote_mtu-5);
}
}
+ } else {
+ DSYS(FNC": configuration not done yet\n");
}
-=20=20=20=20=20=20=20=20
-
}
=20
/* The lower protocol layer, L2CAP, indicates that the lower layer=20
--- sdp.c 15 Jan 2002 11:02:28 -0000 1.84
+++ sdp.c 25 Feb 2002 14:08:37 -0000 1.85
@@ -525,6 +525,10 @@
return;
}
=20
+ if(l2cap->current_state !=3D OPEN) {
+ DSYS(__FUNTION__ ": Configuration not done yet\n");
+ }
+
/* Find the connecting sdp_con */
while ((i < MAX_NBR_SDP) && (!stop)) {
if ((sdp_con_list[i].state =3D=3D SDP_CONNECTING) &&=20
@@ -566,23 +570,12 @@
{
D_MISC(__FUNCTION__ " remote cid : %d\n", l2cap->remote_cid);
=20
- /* FIXME -- Check whether the received params are=20
- acceptable, accept all for now */
-
- /* check if we have sent a pos response yet */
- if (!l2ca_remote_conf_done(l2cap)) {
- /* still haven't sent a pos configure response*/
if (l2ca_config_rsp(l2cap, 0, NULL, CONF_SUCCESS)) {
D_ERR(__FUNCTION__ " Conf rsp failed\n");
}
- } else=20
- DSYS("already have sent back a pos response\n");
=20
- /* check if we received a pos response on a=20
- previous config req */=20
if (!l2ca_local_conf_done(l2cap) && !l2cap->conf_req_sent) {
/* FIXME -- use real options not static values */
-=09=09
if (l2ca_config_req(l2cap, 0, NULL, 0, 0)) {
D_ERR(__FUNCTION__ " Config request failed\n");
}
--- test.c 22 Oct 2001 13:25:54 -0000 1.32
+++ test.c 25 Feb 2002 14:08:37 -0000 1.33
@@ -326,18 +326,13 @@
D_STATE("test_config_ind : remote cid : %d remote_mtu : %d\n",=20
con->remote_cid, con->remote_mtu);
=20=09
- /* check if we have sent a pos response yet */
- if (!l2ca_remote_conf_done(con)) {
- /* still haven't sent a pos configure response*/
-
if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) {
D_ERR("test_config_ind : Configuration response failed\n");
+=09=09=09
}=20=20=20=20
- } else=20
- printk("test_config_ind : already have sent back a pos response\n");
=20
- /* check if we received a pos response on a previous config req */=20
- if (!l2ca_local_conf_done(con)) {
+ /* Are we ready with our sides configuration */=20
+ if (!l2ca_local_conf_done(con) && !con->conf_req_sent) {
=20
/* still haven't sent config request yet */
=20
@@ -375,7 +370,9 @@
{
D_STATE("test_config_cfm : remote cid : %d\n", con->remote_cid);
=20=09
+ if(con->current_state =3D=3D OPEN) {
D_STATE("Now we have an open l2cap channel\n");
+ }
=20
/* negotiate upper protocol */
}
|
|
From: Alain P. <apa...@us...> - 2002-02-22 14:08:03
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
sec_client.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added a call for security event concerning the HCI layer. Include hci_sec.h.
The diff of the modified file(s):
--- sec_client.c 13 Feb 2002 14:05:04 -0000 1.20
+++ sec_client.c 22 Feb 2002 14:02:40 -0000 1.21
@@ -49,6 +49,7 @@
#include <linux/bluetooth/sec_client.h>
#include <linux/bluetooth/l2cap_sec.h>
#include <linux/bluetooth/rfcomm_sec.h>
+#include <linux/bluetooth/hci_sec.h>
#include <linux/bluetooth/btmem.h>
#include <linux/proc_fs.h>
#else /* user mode */
@@ -699,6 +700,10 @@
=20=09
D_PROC(__FUNCTION__ ": Someone wrote %d bytes to sec proc-file\n", count);
=20=09
+ /* Verify that I read at least the number of byte I am waiting */
+ if (count < sizeof (*sec_hdl))
+ D_ERR(__FUNCTION__ ": Only %d bytes were wroten in proc file instead of=
%d", count, sizeof (*sec_hdl));
+=09
/* D_XMIT(__FUNCTION__ ": Preparing to send data to sec_con[%d]\n", secb_h=
dl->sec_con_id); */
if (sec_hdl->originator =3D=3D BT_SEC_MAN) /* o.k. new request */
{
@@ -717,6 +722,15 @@
rfcomm_process_sec_man_response(sec_hdl->request_result,
sec_hdl->originator_data,
sec_hdl->request_value);
+ break;
+=09=09
+ case HCI:
+ D_PROC(FNC"Message to HCI\n");
+ hci_process_sec_man_response(sec_hdl->request_result,
+ sec_hdl->originator_data,
+ sec_hdl->request_value,
+ sec_hdl->event_param,
+ sec_hdl->remote_bd);
break;
=20
default:
|
|
From: Alain P. <apa...@us...> - 2002-02-22 13:48:13
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_sec.h 1.1 Added The accompanying log: Added the header file for hci_sec.c |
|
From: Alain P. <apa...@us...> - 2002-02-22 13:17:03
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_sec.c 1.1 Added The accompanying log: Add file to handle hci layer security request like PIN and link key |
|
From: Fredrik S. <fre...@us...> - 2002-02-20 10:13:38
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bnep.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed stripping of the Ethernet checksum as this turned out to be a bug i=
n the Etrax Ethernet driver.
The diff of the modified file(s):
--- bnep.c 13 Feb 2002 14:05:03 -0000 1.7
+++ bnep.c 20 Feb 2002 10:13:37 -0000 1.8
@@ -411,20 +411,17 @@
{
bt_tx_buf *tx_buf;
struct net_local *local;
- struct net_local *other;
-=09
struct ethhdr *eth;
struct bnep_compressed_ethernet_dest_only bnep_c_d;
struct bnep_general_ethernet bnep_g;=20
struct bnep_compressed_ethernet_source_only bnep_c_s;
struct bnep_compressed_ethernet bnep_c;
void *bhdr;
- int i, bhdrlen, ethhdrlen =3D sizeof(struct ethhdr), buflen, strip_len =
=3D 0, j;
+ int i, bhdrlen, ethhdrlen =3D sizeof(struct ethhdr), buflen;
u16 proto, payload_proto;=20
int send_packet =3D 0;
int dest =3D 1;
int source =3D 1;
- int fromLAN =3D 1;
=20
eth =3D (struct ethhdr *)skb->data;
=20=09
@@ -582,40 +579,9 @@
=20
/* Everything examined; time to send the data */
=20
- /* check whether the we have room for the bt_tx_buf ( -4 ?) */
+ /* check whether we have room for the bt_tx_buf */
buflen =3D skb->len + sizeof(bnep_tx_buf) - ethhdrlen + bhdrlen;
=20=20=20
-
- /* Check the data source as we should
- strip 4 bytes when it comes from the LAN.=20
- Found during UPF7 but can't reproduce it here.*/
-#if 0
- for(i =3D 0 ; i < BNEP_INTERFACES; i++) {
- other =3D dev_bnep[i].priv;
- if(other->state !=3D CONNECTED) {
- continue;
- }
-=09
- for (j =3D 0; j < 6; j++) {
- if (eth->h_source[j] !=3D other->l2cap->remote_bd[5-j]) {
- fromLAN =3D 1;
- break;
- }
- fromLAN =3D 0;
- }
-
- if(!fromLAN) {
- break;
- }
- }
-
- if(!source && fromLAN && (skb->len >=3D 4)) {
- strip_len =3D 4;
- }
-
- buflen -=3D strip_len;
-#endif
-=20=20
D_XMIT("buflen %i\n",buflen);
if (buf_write_room() < buflen) {
D_ERR(__FUNCTION__": not enough room for a %d byte bt_tx_buf\n", skb->le=
n);
@@ -635,7 +601,7 @@
memcpy(tx_buf->data + sizeof(bnep_tx_buf) + bhdrlen,=20
skb->data + ethhdrlen,=20
buflen - bhdrlen - sizeof(bnep_tx_buf));
- tx_buf->cur_len =3D skb->len - ethhdrlen + bhdrlen - strip_len; /*-4*/
+ tx_buf->cur_len =3D skb->len - ethhdrlen + bhdrlen;
/* transmit the packet */
D_XMIT("bnep: tx packet\n");
l2cap_send_data(tx_buf, local->l2cap);
|
|
From: Anders J. <and...@us...> - 2002-02-19 19:04:42
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap.c 1.129 1.130=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Disconnect after a succesful echorequest if we initiated the connection.
The diff of the modified file(s):
--- l2cap.c 11 Feb 2002 17:52:38 -0000 1.129
+++ l2cap.c 19 Feb 2002 19:04:41 -0000 1.130
@@ -2846,6 +2846,7 @@
l2cap_con *con;
s32 i, retval =3D 0;
u8 rev_bd[6];
+ int first_conn =3D 0;
=20
D_XMIT("Sending ping\n");
print_data("Ping destination: bd ", bd, 6);
@@ -2859,6 +2860,8 @@
=20
if (con =3D=3D NULL) {
D_STATE(__FUNCTION__ ": create new baseband link\n");
+ first_conn =3D 1;
+=09=09
con =3D create_con(0/* not yet set */,=20
get_cid(), 0/* not yet set */);
if (con =3D=3D NULL) {
@@ -2915,6 +2918,10 @@
if (con->c_status =3D=3D CSTATUS_MAX_NO_RTX) {
/* max number reached, try to disconnect */
retval =3D l2cap_disconnect_req(con);
+ }
+
+ if(first_conn) {
+ lp_disconnect(con->hci_hdl);
}
=20
return retval;
|
|
From: Anders J. <and...@us...> - 2002-02-19 19:03:45
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20 btping.c 1.1 Added The accompanying log: * Added btping. The diff of the modified file(s): --- Makefile 6 Feb 2002 11:31:56 -0000 1.12 +++ Makefile 19 Feb 2002 19:03:44 -0000 1.13 @@ -5,7 +5,7 @@ include $(APPS)/Rules.elinux endif =20 -PROGS =3D btdm memul bti btinq btcon btdisc btconfig # btsend bttest +PROGS =3D btdm memul bti btinq btcon btdisc btconfig btping # btsend b= ttest =20 # Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude # files in $(include_dir)/readline. Define HAVE_READLINE if you have the @@ -32,6 +32,7 @@ BTINQOBJS =3D btinq.o bt_if.o bt_misc.o BTTESTOBJS =3D bttest.o bt_misc.o bt_vendor.o bt_if.o BTCONFIGOBJS =3D btconfig.o bt_vendor.o bt_if.o bt_misc.o +BTPINGOBJS =3D btping.o bt_if.o bt_misc.o =20 ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap @@ -83,6 +84,9 @@ $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ =20 btconfig: $(BTCONFIGOBJS) + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ + +btping: $(BTPINGOBJS) $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ =20 install: $(PROGS) |
|
From: Anders J. <and...@us...> - 2002-02-13 14:05:07
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bnep.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20
l2cap_sec.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20
sec_client.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Check that L2CAP really have an upper connection when we got a disconnect=
_ind.
* Always send authentication_pending as a reply on a l2cap_connection_req w=
hen
using the securitymanager and BNEP.
* Handle NULL-BD adresses in the sec_client.
The diff of the modified file(s):
--- bnep.c 12 Feb 2002 13:54:00 -0000 1.6
+++ bnep.c 13 Feb 2002 14:05:03 -0000 1.7
@@ -1416,11 +1416,13 @@
/* acknowledge the disconnect */
if (l2ca_disconnect_rsp(l2cap)) {
D_ERR("ether_disconnect_ind: l2ca_disconnect_rsp failed\n");
- //return;
}
+=09
+ if(dev) {
local =3D dev->priv;
local->l2cap =3D NULL;
local->state =3D DISCONNECTED;
+ }
}
=20
static void=20
--- l2cap_sec.c 15 Feb 2001 16:27:33 -0000 1.3
+++ l2cap_sec.c 13 Feb 2002 14:05:04 -0000 1.4
@@ -115,6 +115,9 @@
/* send connection response PSM security block */
l2ca_connect_rsp(con, RES_SECNEG, STAT_NOINFO);
break;
+ case AUTHENTICATION_PENDING:
+ l2ca_connect_rsp(con, RES_PENDING, STAT_AUTHENTPEND);
+ break;
=20
case GENERAL_FAILURE:
/* send connection response PSM security block */
--- sec_client.c 10 Dec 2001 16:18:14 -0000 1.19
+++ sec_client.c 13 Feb 2002 14:05:04 -0000 1.20
@@ -171,9 +171,10 @@
s32 delete_link_key(link_key_information_type *link_key);
=20
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
+u8 null_bd_addr[BD_ADDRESS_SIZE];
=20
-/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
=20
+/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
static link_key_list_type link_key_list;
=20
#ifdef __KERNEL__
@@ -300,6 +301,7 @@
void=20
sec_man_init(enum security_requests user)
{
+ int i;
#ifndef __KERNEL__
sec_man_sock =3D open_socket(SEC_MAN_SRV_SOCK);
#endif
@@ -307,6 +309,10 @@
=20
/* To indicate that nothing is ready */
security_query.originator =3D SEC_CLIENT;=20
+=09
+ for(i =3D 0 ; i < BD_ADDRESS_SIZE ; i++) {
+ null_bd_addr[i] =3D 0;
+ }
}
=20
void
@@ -552,7 +558,12 @@
D_PROC("Called sec_man_event user:%d event:%02x\n", user, event);
security_query.request_type =3D user;
security_query.request_value =3D event;
+ if(bd_addr) {
memcpy(security_query.remote_bd, bd_addr, BD_ADDRESS_SIZE);
+ } else {
+ memcpy(security_query.remote_bd, null_bd_addr, BD_ADDRESS_SIZE);
+ }
+=09=09
security_query.originator =3D BT_SEC_MAN;
=20=09=09
if (param_len > MAX_EVENT_DATA_LENGTH) {
|
|
From: Fredrik S. <fre...@us...> - 2002-02-13 10:04:55
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci.c 1.192 1.193=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Change default link supervision timeout from 20 sec to 5 sec.
The diff of the modified file(s):
--- hci.c 12 Feb 2002 11:02:21 -0000 1.192
+++ hci.c 13 Feb 2002 10:04:54 -0000 1.193
@@ -883,6 +883,10 @@
}
/* reset variable again */
i_am_initiator =3D 0;
+
+ /* Change link supervision timeout. */
+ hci_write_link_supervision_to(
+ hci_hdl, DEFAULT_LINK_SUPERVISION_TIMEOUT, 0);
}
#endif /* HCI_EMULATION */
=20
@@ -2956,7 +2960,7 @@
}
=20
s32=20
-hci_write_link_supervision_to(u32 hdl, u32 link_to)
+hci_write_link_supervision_to(u32 hdl, u32 link_to, s32 block)
{
D_CMD(__FUNCTION__ "\n");
c_pkt.type =3D CMD_PKT;
@@ -2967,10 +2971,10 @@
c_pkt.data[3] =3D (link_to >> 8) & 0xff;
c_pkt.len =3D 4;
=20=20=20
- print_data("write_link_to:",(u8*)&c_pkt,
- c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
-
+ if (block)
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
+ else
+ return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
}
=20
/* Defines of Informational Parameters function */
|
|
From: Fredrik S. <fre...@us...> - 2002-02-13 10:04:35
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.74 1.75=20=20=20=20=20=20=20=20=20=20=20=20 hci_internal.h 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Change default link supervision timeout from 20 sec to 5 sec. The diff of the modified file(s): --- hci.h 6 Feb 2002 11:19:58 -0000 1.74 +++ hci.h 13 Feb 2002 10:04:34 -0000 1.75 @@ -169,7 +169,7 @@ s32 hci_read_encryption_mode(void); s32 hci_write_encryption_mode(u8 mode); s32 hci_read_link_supervision_to(u32 hdl); -s32 hci_write_link_supervision_to(u32 hdl, u32 link_to); +s32 hci_write_link_supervision_to(u32 hdl, u32 link_to, s32 block); s32 hci_write_class_of_device(u8 *class_of_device); s32 hci_set_event_filter(u8 *data); s32 hci_read_power_transmit_level(u32 con_hdl, unsigned char type); --- hci_internal.h 12 Feb 2002 10:57:41 -0000 1.22 +++ hci_internal.h 13 Feb 2002 10:04:34 -0000 1.23 @@ -292,6 +292,10 @@ #define DEFAULT_TIMEOUT 2=20 #define LONG_TIMEOUT 15 =20 +/* How long the baseband waits after link loss until disconnecting + the client. Measured in baseband slots (0.625 msec). */ +#define DEFAULT_LINK_SUPERVISION_TIMEOUT (5000000/625) /* 5 sec */ + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* Struct used to keep track of the current number of buffers, and the siz= es |