|
From: Anders J. <and...@us...> - 2004-01-09 15:29:06
|
The following files were modified in linux/include/linux/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btcommon.h 1.104 1.105=20=20=20=20=20=20=20=20=20=20=20=20=20
sdp.h 1.29 1.30=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added IOCTL and structs used for SDP-queries.
The diff of the modified file(s):
--- btcommon.h 2003/11/17 14:57:54 1.104
+++ btcommon.h 2004/01/09 15:28:59 1.105
@@ -146,13 +146,14 @@
#define BTWAITFORCONNECTION _IOW(BT_IOC_MAGIC, 0x0C, s32)
#define BTWAITNEWCONNECTIONS _IO(BT_IOC_MAGIC, 0x0D)
#define BTISLOWERCONNECTED _IOW(BT_IOC_MAGIC, 0x0E, s32)
-#define BT_SDP_REQUEST _IOW(BT_IOC_MAGIC, 0x0F, bt_sdp_request)
+#define BT_SDP_REQUEST _IOWR(BT_IOC_MAGIC, 0x0F, bt_sdp_request)
#define BT_GETCACHEDLINKKEY _IOWR(BT_IOC_MAGIC, 0x10, u8[22])
#define BTDISCONNECT_BB _IOW(BT_IOC_MAGIC, 0x11, u8[6])
#define BTREADREMOTENAME _IOWR(BT_IOC_MAGIC, 0x12, u8[BT_NAME_LENGTH])
#define BTREADREMOTECLASSOFDEV _IOWR(BT_IOC_MAGIC, 0x13, u8[6])
#define BTDISCONNECT_ALL _IO(BT_IOC_MAGIC, 0x14)
#define BTLEDSTATUS _IOW(BT_IOC_MAGIC, 0x15, s32)
+#define SDPCONNECT _IOW(BT_IOC_MAGIC, 0x16, bt_connection)
=20
/* Ioctls executing HCI commands */
=20
@@ -486,13 +487,30 @@ typedef struct rfcomm_con{
/****************** SDP connection object ****************************/
=20
enum sdp_states{SDP_DISCONNECTED, SDP_CONNECTING, SDP_CONNECTED};
+enum sdp_request_states{SDP_REQUEST_IDLE, SDP_REQUEST_SENT, SDP_REQUEST_RE=
SPONSE};
+
+typedef struct bt_sdp_request
+{
+ u16 len;
+ u16 allocated;
+ u8 bd[6];
+ u8 data[0];
+} __attribute__ ((packed)) bt_sdp_request;
=20
typedef struct sdp_con{
l2cap_con *l2cap;
u32 initiator;
enum sdp_states state;
u32 id;
- u8 line;
+ bt_timer_obj timer;
+#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0)
+ wait_queue_head_t waitqueue;
+#else
+ struct wait_queue *waitqueue;
+#endif
+ s32 status;
+ bt_sdp_request *request;
+ s32 request_status;
} __attribute__ ((packed)) sdp_con;
=20
/****************** BT connection object ********************************/
@@ -515,17 +533,7 @@ typedef struct bt_connection{
bt_pincode pincode;
u16 bnep_src_uuid;
u16 bnep_dst_uuid;
-} bt_connection;
-
-typedef struct bt_sdp_request
-{
- u32 conID;
- u8 sdpCommand;
- u8 pduPayload[256];
- int pduLength;
- u8 requestResponse[256];
- int responseLength;
-} bt_sdp_request;
+} __attribute__ ((packed)) bt_connection;
=20
/****************** Other structures used in the stack *******************=
***/
=20
@@ -546,13 +554,6 @@ typedef struct bt_session
rfcomm_con *rfcomm;
u8 dlci;
s32 state;
-
- /* sdp */
- u8 *sdpRequestResponseData;
- u16 sdpRequestResponseDataLength;
- int sdpID;
-
- /* tcs ? */
} bt_session;
=20
#define ANY_LINE 255
--- sdp.h 2003/11/05 15:22:54 1.29
+++ sdp.h 2004/01/09 15:29:03 1.30
@@ -82,7 +82,8 @@ void sdp_shutdown(void);
s32 sdp_create_proc_file(void);
s32 sdp_remove_proc_file(void);
#endif
-s32 sdp_connect_req(u8* bd_addr, u8 line, bt_pincode *pincode);
+s32 sdp_connect(u8* bd_addr, bt_pincode *pincode);
+s32 sdp_connect_req(u8* bd_addr, bt_pincode *pincode);
void sdp_connect_ind(l2cap_con *l2cap);
void sdp_connect_pnd(l2cap_con *l2cap, int status);
void sdp_connect_cfm(l2cap_con *l2cap, s32 status);
@@ -93,6 +94,8 @@ void sdp_disconnect_ind(l2cap_con *l2cap
void sdp_disconnect_cfm(l2cap_con *l2cap);
void sdp_receive_data(l2cap_con *l2cap, u8* data, u32 len);
s32 sdp_send_data(sdp_con *sdp, u8 *data, u32 len);
+s32 sdp_query(bt_sdp_request *request);
+
=20
#ifdef __KERNEL__
s32 sdpStartRequest(u8 sdpIndex, u8 sdpCommand, u8 *pduData, u16 pduLength=
);
|