34#define SDP_CONTINUATION_LEN 2
35#define SDP_MAX_CONTINUATION_LEN 16
38#define SDP_INACT_TIMEOUT 30
42#define SDP_OFLOW_QOS_FLAG 0
43#define SDP_OFLOW_SERV_TYPE 0
44#define SDP_OFLOW_TOKEN_RATE 0
45#define SDP_OFLOW_TOKEN_BUCKET_SIZE 0
46#define SDP_OFLOW_PEAK_BANDWIDTH 0
47#define SDP_OFLOW_LATENCY 0
48#define SDP_OFLOW_DELAY_VARIATION 0
51#define SDP_IFLOW_QOS_FLAG 0
52#define SDP_IFLOW_SERV_TYPE 0
53#define SDP_IFLOW_TOKEN_RATE 0
54#define SDP_IFLOW_TOKEN_BUCKET_SIZE 0
55#define SDP_IFLOW_PEAK_BANDWIDTH 0
56#define SDP_IFLOW_LATENCY 0
57#define SDP_IFLOW_DELAY_VARIATION 0
63#define SDP_DEVICE_NOTI_LEN sizeof (BT_HDR) + \
64 HCIC_PREAMBLE_SIZE + \
65 HCIC_PARAM_SIZE_WRITE_PARAM1
67#define SDP_DEVICE_NOTI_FLAG 0x03
71#define SDP_PDU_ERROR_RESPONSE 0x01
72#define SDP_PDU_SERVICE_SEARCH_REQ 0x02
73#define SDP_PDU_SERVICE_SEARCH_RSP 0x03
74#define SDP_PDU_SERVICE_ATTR_REQ 0x04
75#define SDP_PDU_SERVICE_ATTR_RSP 0x05
76#define SDP_PDU_SERVICE_SEARCH_ATTR_REQ 0x06
77#define SDP_PDU_SERVICE_SEARCH_ATTR_RSP 0x07
80#define MAX_UUIDS_PER_SEQ 16
81#define MAX_ATTR_PER_SEQ 16
85#ifdef SDP_MAX_ATTR_LEN
86#define MAX_ATTR_LEN SDP_MAX_ATTR_LEN
88#define MAX_ATTR_LEN 256
96 UINT8 value[MAX_UUID_SIZE];
102 tUID_ENT uuid_entry[MAX_UUIDS_PER_SEQ];
116 tATT_ENT attr_entry[MAX_ATTR_PER_SEQ];
132 UINT32 record_handle;
134 UINT16 num_attributes;
136 UINT8 attr_pad[SDP_MAX_PAD_LEN];
143 UINT32 di_primary_handle;
144 BOOLEAN brcm_di_registered;
156#if SDP_SERVER_ENABLED == TRUE
160 UINT16 next_attr_index;
161 UINT16 next_attr_start_id;
163 BOOLEAN last_attr_seq_desc_sent;
171#define SDP_STATE_IDLE 0
172#define SDP_STATE_CONN_SETUP 1
173#define SDP_STATE_CFG_SETUP 2
174#define SDP_STATE_CONNECTED 3
177#define SDP_FLAGS_IS_ORIG 0x01
178#define SDP_FLAGS_HIS_CFG_DONE 0x02
179#define SDP_FLAGS_MY_CFG_DONE 0x04
182 BD_ADDR device_address;
183 TIMER_LIST_ENT timer_entry;
185 UINT16 connection_id;
189#if SDP_CLIENT_ENABLED == TRUE
191 tSDP_DISC_CMPL_CB *p_cb;
192 tSDP_DISC_CMPL_CB2 *p_cb2;
194 UINT32 handles[SDP_MAX_DISC_SERVER_RECS];
197 UINT16 transaction_id;
198 UINT16 disconnect_reason;
199#if (defined(SDP_BROWSE_PLUS) && SDP_BROWSE_PLUS == TRUE)
203#define SDP_DISC_WAIT_CONN 0
204#define SDP_DISC_WAIT_HANDLES 1
205#define SDP_DISC_WAIT_ATTR 2
206#define SDP_DISC_WAIT_SEARCH_ATTR 3
207#define SDP_DISC_WAIT_PASS_THRU 4
208#define SDP_DISC_WAIT_CANCEL 5
211 UINT8 is_attr_search;
214#if SDP_SERVER_ENABLED == TRUE
227#if SDP_SERVER_ENABLED == TRUE
231 UINT16 max_attr_list_size;
232 UINT16 max_recs_per_search;
240#if SDP_DYNAMIC_MEMORY == FALSE
243SDP_API
extern tSDP_CB *sdp_cb_ptr;
244#define sdp_cb (*sdp_cb_ptr)
252SDP_API
extern void sdp_init (
void);
253extern void sdp_disconnect (
tCONN_CB*p_ccb, UINT16 reason);
255#if (defined(SDP_DEBUG) && SDP_DEBUG == TRUE)
256SDP_API
extern UINT16 sdp_set_max_attr_list_size (UINT16 max_size);
261extern void sdp_conn_rcv_l2e_conn_ind (
BT_HDR *p_msg);
262extern void sdp_conn_rcv_l2e_conn_cfm (
BT_HDR *p_msg);
263extern void sdp_conn_rcv_l2e_disc (
BT_HDR *p_msg);
264extern void sdp_conn_rcv_l2e_config_ind (
BT_HDR *p_msg);
265extern void sdp_conn_rcv_l2e_config_cfm (
BT_HDR *p_msg);
266extern void sdp_conn_rcv_l2e_conn_failed (
BT_HDR *p_msg);
267extern void sdp_conn_rcv_l2e_connected (
BT_HDR *p_msg);
268extern void sdp_conn_rcv_l2e_conn_failed (
BT_HDR *p_msg);
269extern void sdp_conn_rcv_l2e_data (
BT_HDR *p_msg);
270extern void sdp_conn_timeout (
tCONN_CB *p_ccb);
272extern tCONN_CB *sdp_conn_originate (UINT8 *p_bd_addr);
276extern tCONN_CB *sdpu_find_ccb_by_cid (UINT16 cid);
278extern tCONN_CB *sdpu_allocate_ccb (
void);
279extern void sdpu_release_ccb (
tCONN_CB *p_ccb);
281extern UINT8 *sdpu_build_attrib_seq (UINT8 *p_out, UINT16 *p_attr, UINT16 num_attrs);
282extern UINT8 *sdpu_build_attrib_entry (UINT8 *p_out,
tSDP_ATTRIBUTE *p_attr);
283extern void sdpu_build_n_send_error (
tCONN_CB *p_ccb, UINT16 trans_num, UINT16 error_code,
char *p_error_text);
285extern UINT8 *sdpu_extract_attr_seq (UINT8 *p, UINT16 param_len,
tSDP_ATTR_SEQ *p_seq);
286extern UINT8 *sdpu_extract_uid_seq (UINT8 *p, UINT16 param_len,
tSDP_UUID_SEQ *p_seq);
288SDP_API
extern UINT8 *sdpu_get_len_from_type (UINT8 *p, UINT8 type, UINT32 *p_len);
289extern BOOLEAN sdpu_is_base_uuid (UINT8 *p_uuid);
290extern BOOLEAN sdpu_compare_uuid_arrays (UINT8 *p_uuid1, UINT32 len1, UINT8 *p_uuid2, UINT16 len2);
291SDP_API
extern BOOLEAN sdpu_compare_bt_uuids (
tBT_UUID *p_uuid1,
tBT_UUID *p_uuid2);
292extern BOOLEAN sdpu_compare_uuid_with_attr (
tBT_UUID *p_btuuid, tSDP_DISC_ATTR *p_attr);
298extern UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out,
tSDP_ATTRIBUTE *p_attr, UINT16 len, UINT16 *offset);
299extern void sdpu_uuid16_to_uuid128(UINT16 uuid16, UINT8* p_uuid128);
304extern tSDP_RECORD *sdp_db_find_record (UINT32 handle);
310#if SDP_SERVER_ENABLED == TRUE
311extern void sdp_server_handle_client_req (
tCONN_CB *p_ccb,
BT_HDR *p_msg);
313#define sdp_server_handle_client_req(p_ccb, p_msg)
318#if SDP_CLIENT_ENABLED == TRUE
319extern void sdp_disc_connected (
tCONN_CB *p_ccb);
322#define sdp_disc_connected(p_ccb)
323#define sdp_disc_server_rsp(p_ccb, p_msg)