1/******************************************************************************
2 *
3 *  Copyright (C) 2010-2012 Broadcom Corporation
4 *
5 *  Licensed under the Apache License, Version 2.0 (the "License");
6 *  you may not use this file except in compliance with the License.
7 *  You may obtain a copy of the License at:
8 *
9 *  http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 *
17 ******************************************************************************/
18
19/******************************************************************************
20 *
21 *  This file contains the LLCP API definitions
22 *
23 ******************************************************************************/
24#ifndef LLCP_API_H
25#define LLCP_API_H
26
27#include "nfc_target.h"
28#include "llcp_defs.h"
29
30/*****************************************************************************
31**  Constants
32*****************************************************************************/
33#define LLCP_STATUS_SUCCESS         0       /* Successfully done                */
34#define LLCP_STATUS_FAIL            1       /* Failed without specific reason   */
35#define LLCP_STATUS_CONGESTED       2       /* Data link is congested           */
36
37typedef UINT8 tLLCP_STATUS;
38
39#define LLCP_MIN_OFFSET             (NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE + LLCP_PDU_HEADER_SIZE + LLCP_SEQUENCE_SIZE)
40
41#define LLCP_INVALID_SAP            0xFF    /* indication of failure to allocate data link resource */
42
43/*****************************************************************************
44**  Type Definitions
45*****************************************************************************/
46typedef struct
47{
48    BOOLEAN is_initiator;       /* TRUE if we are POLL mode */
49    UINT8   max_payload_size;   /* 64, 128, 192 or 254 */
50    UINT8   waiting_time;
51    UINT8  *p_gen_bytes;
52    UINT8   gen_bytes_len;
53} tLLCP_ACTIVATE_CONFIG;
54
55typedef struct
56{
57    UINT16  miu;                        /* Local receiving MIU      */
58    UINT8   rw;                         /* Local receiving window   */
59    char    sn[LLCP_MAX_SN_LEN + 1];    /* Service name to connect  */
60} tLLCP_CONNECTION_PARAMS;
61
62/*********************************
63**  Callback Functions Prototypes
64**********************************/
65
66/* Link Management Callback Events */
67
68#define LLCP_LINK_ACTIVATION_FAILED_EVT     0x00    /* Fail to activate link    */
69#define LLCP_LINK_ACTIVATION_COMPLETE_EVT   0x01    /* LLCP Link is activated   */
70#define LLCP_LINK_DEACTIVATED_EVT           0x02    /* LLCP Link is deactivated */
71
72/* Link Management Callback Reasons */
73
74#define LLCP_LINK_SUCCESS                   0x00    /* Success                                  */
75#define LLCP_LINK_VERSION_FAILED            0x01    /* Failed to agree version                  */
76#define LLCP_LINK_BAD_GEN_BYTES             0x02    /* Failed to parse received general bytes   */
77#define LLCP_LINK_INTERNAL_ERROR            0x03    /* internal error                           */
78#define LLCP_LINK_LOCAL_INITIATED           0x04    /* Link has been deactivated by local       */
79#define LLCP_LINK_REMOTE_INITIATED          0x05    /* Link has been deactivated by remote      */
80#define LLCP_LINK_TIMEOUT                   0x06    /* Link has been deactivated by timeout     */
81#define LLCP_LINK_FRAME_ERROR               0x07    /* Link has been deactivated by frame error */
82#define LLCP_LINK_RF_TRANSMISSION_ERR       NFC_STATUS_RF_TRANSMISSION_ERR
83#define LLCP_LINK_RF_PROTOCOL_ERR           NFC_STATUS_RF_PROTOCOL_ERR
84#define LLCP_LINK_RF_TIMEOUT                NFC_STATUS_TIMEOUT
85#define LLCP_LINK_RF_LINK_LOSS_ERR          NFC_STATUS_LINK_LOSS
86
87typedef void (tLLCP_LINK_CBACK) (UINT8 event, UINT8 reason);
88
89/* Minimum length of Gen Bytes for LLCP */
90/* In CE4 low power mode, NFCC can store up to 21 bytes */
91#define LLCP_MIN_GEN_BYTES                  20
92
93/* Service Access Point (SAP) Callback Events */
94
95#define LLCP_SAP_EVT_DATA_IND               0x00    /* Received data on SAP         */
96#define LLCP_SAP_EVT_CONNECT_IND            0x01    /* Connection request from peer */
97#define LLCP_SAP_EVT_CONNECT_RESP           0x02    /* Connection accepted by peer  */
98#define LLCP_SAP_EVT_DISCONNECT_IND         0x03    /* Received disconnect request  */
99#define LLCP_SAP_EVT_DISCONNECT_RESP        0x04    /* Received disconnect response */
100#define LLCP_SAP_EVT_CONGEST                0x05    /* congested status is changed  */
101#define LLCP_SAP_EVT_LINK_STATUS            0x06    /* Change of LLCP Link status   */
102#define LLCP_SAP_EVT_TX_COMPLETE            0x07    /* tx queue is empty and all PDU is acked   */
103
104#define LLCP_LINK_TYPE_LOGICAL_DATA_LINK      0x01
105#define LLCP_LINK_TYPE_DATA_LINK_CONNECTION   0x02
106
107typedef struct
108{
109    UINT8   event;              /* LLCP_SAP_EVT_DATA_IND        */
110    UINT8   local_sap;          /* SAP of local device          */
111    UINT8   remote_sap;         /* SAP of remote device         */
112    UINT8   link_type;          /* link type                    */
113} tLLCP_SAP_DATA_IND;
114
115typedef struct
116{
117    UINT8   event;              /* LLCP_SAP_EVT_CONNECT_IND     */
118    UINT8   server_sap;         /* SAP of local server          */
119    UINT8   local_sap;          /* SAP of local device          */
120    UINT8   remote_sap;         /* SAP of remote device         */
121    UINT16  miu;                /* MIU of peer device           */
122    UINT8   rw;                 /* RW of peer device            */
123    char   *p_service_name;     /* Service name (only for SDP)  */
124} tLLCP_SAP_CONNECT_IND;
125
126typedef struct
127{
128    UINT8   event;              /* LLCP_SAP_EVT_CONNECT_RESP    */
129    UINT8   local_sap;          /* SAP of local device          */
130    UINT8   remote_sap;         /* SAP of remote device         */
131    UINT16  miu;                /* MIU of peer device           */
132    UINT8   rw;                 /* RW of peer device            */
133} tLLCP_SAP_CONNECT_RESP;
134
135#define LLCP_SAP_DISCONNECT_REASON_TIMEOUT  0x80
136typedef struct
137{
138    UINT8   event;              /* LLCP_SAP_EVT_DISCONNECT_IND  */
139    UINT8   local_sap;          /* SAP of local device          */
140    UINT8   remote_sap;         /* SAP of remote device         */
141} tLLCP_SAP_DISCONNECT_IND;
142
143typedef struct
144{
145    UINT8   event;              /* LLCP_SAP_EVT_DISCONNECT_RESP */
146    UINT8   local_sap;          /* SAP of local device          */
147    UINT8   remote_sap;         /* SAP of remote device         */
148    UINT8   reason;             /* Reason of DM PDU if not timeout */
149} tLLCP_SAP_DISCONNECT_RESP;
150
151typedef struct
152{
153    UINT8   event;              /* LLCP_SAP_EVT_CONGEST         */
154    UINT8   local_sap;          /* SAP of local device          */
155    UINT8   remote_sap;         /* SAP of remote device         */
156    BOOLEAN is_congested;       /* TRUE if congested            */
157    UINT8   link_type;          /* congested link type          */
158} tLLCP_SAP_CONGEST;
159
160typedef struct
161{
162    UINT8   event;              /* LLCP_SAP_EVT_LINK_STATUS     */
163    UINT8   local_sap;          /* SAP of local device          */
164    BOOLEAN is_activated;       /* TRUE if LLCP link is activated  */
165    BOOLEAN is_initiator;       /* TRUE if local LLCP is initiator */
166} tLLCP_SAP_LINK_STATUS;
167
168typedef struct
169{
170    UINT8   event;              /* LLCP_SAP_EVT_TX_COMPLETE     */
171    UINT8   local_sap;          /* SAP of local device          */
172    UINT8   remote_sap;         /* SAP of remote device         */
173} tLLCP_SAP_TX_COMPLETE;
174
175typedef struct
176{
177    UINT8   event;              /* event                        */
178    UINT8   local_sap;          /* SAP of local device          */
179} tLLCP_SAP_HEADER;
180
181typedef union
182{
183    tLLCP_SAP_HEADER            hdr;                /* common header                */
184    tLLCP_SAP_DATA_IND          data_ind;           /* LLCP_SAP_EVT_DATA_IND        */
185    tLLCP_SAP_CONNECT_IND       connect_ind;        /* LLCP_SAP_EVT_CONNECT_IND     */
186    tLLCP_SAP_CONNECT_RESP      connect_resp;       /* LLCP_SAP_EVT_CONNECT_RESP    */
187    tLLCP_SAP_DISCONNECT_IND    disconnect_ind;     /* LLCP_SAP_EVT_DISCONNECT_IND  */
188    tLLCP_SAP_DISCONNECT_RESP   disconnect_resp;    /* LLCP_SAP_EVT_DISCONNECT_RESP */
189    tLLCP_SAP_CONGEST           congest;            /* LLCP_SAP_EVT_CONGEST         */
190    tLLCP_SAP_LINK_STATUS       link_status;        /* LLCP_SAP_EVT_LINK_STATUS     */
191    tLLCP_SAP_TX_COMPLETE       tx_complete;        /* LLCP_SAP_EVT_TX_COMPLETE     */
192} tLLCP_SAP_CBACK_DATA;
193
194typedef void (tLLCP_APP_CBACK) (tLLCP_SAP_CBACK_DATA *p_data);
195
196/* Service Discovery Callback */
197
198typedef void (tLLCP_SDP_CBACK) (UINT8 tid, UINT8 remote_sap);
199
200/* LLCP DTA Callback - notify DTA responded SNL for connectionless echo service */
201
202typedef void (tLLCP_DTA_CBACK) (void);
203
204/*****************************************************************************
205**  External Function Declarations
206*****************************************************************************/
207#ifdef __cplusplus
208extern "C"
209{
210#endif
211
212/*******************************************************************************
213**
214** Function         LLCP_SetConfig
215**
216** Description      Set configuration parameters for LLCP
217**                  - Local Link MIU
218**                  - Option parameter
219**                  - Waiting Time Index
220**                  - Local Link Timeout
221**                  - Inactivity Timeout as initiator role
222**                  - Inactivity Timeout as target role
223**                  - Delay SYMM response
224**                  - Data link connection timeout
225**                  - Delay timeout to send first PDU as initiator
226**
227** Returns          void
228**
229*******************************************************************************/
230LLCP_API extern void LLCP_SetConfig (UINT16 link_miu,
231                                     UINT8  opt,
232                                     UINT8  wt,
233                                     UINT16 link_timeout,
234                                     UINT16 inact_timeout_init,
235                                     UINT16 inact_timeout_target,
236                                     UINT16 symm_delay,
237                                     UINT16 data_link_timeout,
238                                     UINT16 delay_first_pdu_timeout);
239
240/*******************************************************************************
241**
242** Function         LLCP_GetConfig
243**
244** Description      Get configuration parameters for LLCP
245**                  - Local Link MIU
246**                  - Option parameter
247**                  - Response Waiting Time Index
248**                  - Local Link Timeout
249**                  - Inactivity Timeout as initiator role
250**                  - Inactivity Timeout as target role
251**                  - Delay SYMM response
252**                  - Data link connection timeout
253**                  - Delay timeout to send first PDU as initiator
254**
255** Returns          void
256**
257*******************************************************************************/
258LLCP_API extern void LLCP_GetConfig (UINT16 *p_link_miu,
259                                     UINT8  *p_opt,
260                                     UINT8  *p_wt,
261                                     UINT16 *p_link_timeout,
262                                     UINT16 *p_inact_timeout_init,
263                                     UINT16 *p_inact_timeout_target,
264                                     UINT16 *p_symm_delay,
265                                     UINT16 *p_data_link_timeout,
266                                     UINT16 *p_delay_first_pdu_timeout);
267
268/*******************************************************************************
269**
270** Function         LLCP_GetDiscoveryConfig
271**
272** Description      Returns discovery config for LLCP MAC link activation
273**                  This function is called to get general bytes for NFC_PMID_ATR_REQ_GEN_BYTES
274**                  or NFC_PMID_ATR_RES_GEN_BYTES before starting discovery.
275**
276**                  wt:Waiting time 0 - 8, only for listen
277**                  p_gen_bytes: pointer to store LLCP magic number and paramters
278**                  p_gen_bytes_len: length of buffer for gen bytes as input
279**                                   (NOTE:it must be bigger than LLCP_MIN_GEN_BYTES)
280**                                   actual gen bytes size as output
281**
282**                  Restrictions on the use of ISO 18092
283**                  1. The DID features shall not be used.
284**                  2. the NAD features shall not be used.
285**                  3. Frame waiting time extentions (WTX) shall not be used.
286**
287** Returns          None
288**
289*******************************************************************************/
290LLCP_API extern void LLCP_GetDiscoveryConfig (UINT8 *p_wt,
291                                              UINT8 *p_gen_bytes,
292                                              UINT8 *p_gen_bytes_len);
293
294/*******************************************************************************
295**
296** Function         LLCP_ActivateLink
297**
298** Description      This function will activate LLCP link with LR, WT and Gen Bytes
299**                  in activation NTF from NFCC.
300**
301**                  LLCP_LINK_ACTIVATION_COMPLETE_EVT will be returned through
302**                  callback function if successful.
303**                  Otherwise, LLCP_LINK_ACTIVATION_FAILED_EVT will be returned.
304**
305** Returns          LLCP_STATUS_SUCCESS if success
306**
307*******************************************************************************/
308LLCP_API extern tLLCP_STATUS LLCP_ActivateLink (tLLCP_ACTIVATE_CONFIG config,
309                                                tLLCP_LINK_CBACK     *p_link_cback);
310
311/*******************************************************************************
312**
313** Function         LLCP_DeactivateLink
314**
315** Description      Deactivate LLCP link
316**
317**                  LLCP_LINK_DEACTIVATED_EVT will be returned through callback
318**                  when LLCP link is deactivated. Then NFC link may be deactivated.
319**
320** Returns          LLCP_STATUS_SUCCESS if success
321**
322*******************************************************************************/
323LLCP_API extern tLLCP_STATUS LLCP_DeactivateLink (void);
324
325/*******************************************************************************
326**
327** Function         LLCP_RegisterServer
328**
329** Description      Register server and callback function
330**
331**                  reg_sap : Well-Known SAP except LM and SDP (0x02 - 0x0F)
332**                            Advertized by SDP (0x10 - 0x1F)
333**                            LLCP_INVALID_SAP, LLCP will allocate between 0x10 and 0x1F
334**                  link_type : LLCP_LINK_TYPE_LOGICAL_DATA_LINK
335**                              and/or LLCP_LINK_TYPE_DATA_LINK_CONNECTION
336**                  p_service_name : Null-terminated string up to LLCP_MAX_SN_LEN
337**
338** Returns          SAP between 0x02 and 0x1F, if success
339**                  LLCP_INVALID_SAP, otherwise
340**
341*******************************************************************************/
342LLCP_API extern UINT8 LLCP_RegisterServer (UINT8           reg_sap,
343                                           UINT8           link_type,
344                                           char            *p_service_name,
345                                           tLLCP_APP_CBACK *p_sap_cback);
346
347/*******************************************************************************
348**
349** Function         LLCP_RegisterClient
350**
351** Description      Register client and callback function
352**
353**                  link_type : LLCP_LINK_TYPE_LOGICAL_DATA_LINK
354**                              and/or LLCP_LINK_TYPE_DATA_LINK_CONNECTION
355**
356** Returns          SAP between 0x20 and 0x3F, if success
357**                  LLCP_INVALID_SAP, otherwise
358**
359*******************************************************************************/
360LLCP_API extern UINT8 LLCP_RegisterClient (UINT8           link_type,
361                                           tLLCP_APP_CBACK *p_sap_cback);
362
363/*******************************************************************************
364**
365** Function         LLCP_Deregister
366**
367** Description      Deregister server or client
368**
369**
370** Returns          LLCP_STATUS_SUCCESS if success
371**
372*******************************************************************************/
373LLCP_API extern tLLCP_STATUS LLCP_Deregister (UINT8 sap);
374
375/*******************************************************************************
376**
377** Function         LLCP_IsLogicalLinkCongested
378**
379** Description      Check if logical link is congested
380**
381**
382** Returns          TRUE if congested
383**
384*******************************************************************************/
385LLCP_API extern BOOLEAN LLCP_IsLogicalLinkCongested (UINT8 local_sap,
386                                                     UINT8 num_pending_ui_pdu,
387                                                     UINT8 total_pending_ui_pdu,
388                                                     UINT8 total_pending_i_pdu);
389
390/*******************************************************************************
391**
392** Function         LLCP_SendUI
393**
394** Description      Send connnectionless data to DSAP
395**
396**
397** Returns          LLCP_STATUS_SUCCESS if success
398**                  LLCP_STATUS_CONGESTED if logical link is congested
399**                  LLCP_STATUS_FAIL, otherwise
400**
401*******************************************************************************/
402LLCP_API extern tLLCP_STATUS LLCP_SendUI (UINT8 ssap, UINT8 dsap, BT_HDR *p_buf);
403
404/*******************************************************************************
405**
406** Function         LLCP_ReadLogicalLinkData
407**
408** Description      Read information of UI PDU for local SAP
409**
410**                  - Remote SAP who sent UI PDU is returned.
411**                  - Information of UI PDU up to max_data_len is copied into p_data.
412**                  - Information of next UI PDU is not concatenated.
413**                  - Recommended max_data_len is link MIU of local device
414**
415** Returns          TRUE if more information of UI PDU or more UI PDU in queue
416**
417*******************************************************************************/
418LLCP_API extern BOOLEAN LLCP_ReadLogicalLinkData (UINT8  local_sap,
419                                                  UINT32 max_data_len,
420                                                  UINT8  *p_remote_sap,
421                                                  UINT32 *p_data_len,
422                                                  UINT8  *p_data);
423
424/*******************************************************************************
425**
426** Function         LLCP_FlushLogicalLinkRxData
427**
428** Description      Discard received data in logical data link of local SAP
429**
430**
431** Returns          length of data flushed
432**
433*******************************************************************************/
434LLCP_API extern UINT32 LLCP_FlushLogicalLinkRxData (UINT8 local_sap);
435
436/*******************************************************************************
437**
438** Function         LLCP_ConnectReq
439**
440** Description      Create data link connection between registered SAP and DSAP
441**                  in peer LLCP,
442**
443**
444** Returns          LLCP_STATUS_SUCCESS if success
445**                  LLCP_STATUS_FAIL, otherwise
446**
447*******************************************************************************/
448LLCP_API extern tLLCP_STATUS LLCP_ConnectReq (UINT8 reg_sap, UINT8 dsap,
449                                              tLLCP_CONNECTION_PARAMS *p_params);
450
451/*******************************************************************************
452**
453** Function         LLCP_ConnectCfm
454**
455** Description      Accept connection request from peer LLCP
456**
457**
458** Returns          LLCP_STATUS_SUCCESS if success
459**                  LLCP_STATUS_FAIL, otherwise
460**
461*******************************************************************************/
462LLCP_API extern tLLCP_STATUS LLCP_ConnectCfm (UINT8 local_sap,
463                                              UINT8 remote_sap,
464                                              tLLCP_CONNECTION_PARAMS *p_params);
465
466/*******************************************************************************
467**
468** Function         LLCP_ConnectReject
469**
470** Description      Reject connection request from peer LLCP
471**
472**                  reason : LLCP_SAP_DM_REASON_APP_REJECTED
473**                           LLCP_SAP_DM_REASON_PERM_REJECT_THIS
474**                           LLCP_SAP_DM_REASON_PERM_REJECT_ANY
475**                           LLCP_SAP_DM_REASON_TEMP_REJECT_THIS
476**                           LLCP_SAP_DM_REASON_TEMP_REJECT_ANY
477**
478** Returns          LLCP_STATUS_SUCCESS if success
479**                  LLCP_STATUS_FAIL, otherwise
480**
481*******************************************************************************/
482LLCP_API extern tLLCP_STATUS LLCP_ConnectReject (UINT8 local_sap,
483                                                 UINT8 remote_sap,
484                                                 UINT8 reason);
485
486/*******************************************************************************
487**
488** Function         LLCP_IsDataLinkCongested
489**
490** Description      Check if data link is congested
491**
492**
493** Returns          TRUE if congested
494**
495*******************************************************************************/
496LLCP_API extern BOOLEAN LLCP_IsDataLinkCongested (UINT8 local_sap,
497                                                  UINT8 remote_sap,
498                                                  UINT8 num_pending_i_pdu,
499                                                  UINT8 total_pending_ui_pdu,
500                                                  UINT8 total_pending_i_pdu);
501
502/*******************************************************************************
503**
504** Function         LLCP_SendData
505**
506** Description      Send connection-oriented data
507**
508**
509** Returns          LLCP_STATUS_SUCCESS if success
510**                  LLCP_STATUS_CONGESTED if data link is congested
511**
512*******************************************************************************/
513LLCP_API extern tLLCP_STATUS LLCP_SendData (UINT8  local_sap,
514                                            UINT8  remote_sap,
515                                            BT_HDR *p_buf);
516
517/*******************************************************************************
518**
519** Function         LLCP_ReadDataLinkData
520**
521** Description      Read information of I PDU for data link connection
522**
523**                  - Information of I PDU up to max_data_len is copied into p_data.
524**                  - Information of next I PDU is not concatenated.
525**                  - Recommended max_data_len is data link connection MIU of local
526**                    end point
527**
528** Returns          TRUE if more data in queue
529**
530*******************************************************************************/
531LLCP_API extern BOOLEAN LLCP_ReadDataLinkData (UINT8  local_sap,
532                                               UINT8  remote_sap,
533                                               UINT32 max_data_len,
534                                               UINT32 *p_data_len,
535                                               UINT8  *p_data);
536
537/*******************************************************************************
538**
539** Function         LLCP_FlushDataLinkRxData
540**
541** Description      Discard received data in data link connection
542**
543**
544** Returns          length of rx data flushed
545**
546*******************************************************************************/
547LLCP_API extern UINT32 LLCP_FlushDataLinkRxData (UINT8  local_sap,
548                                                 UINT8  remote_sap);
549
550/*******************************************************************************
551**
552** Function         LLCP_DisconnectReq
553**
554** Description      Disconnect data link
555**                  discard any pending data if flush is set to TRUE
556**
557** Returns          LLCP_STATUS_SUCCESS if success
558**
559*******************************************************************************/
560LLCP_API extern tLLCP_STATUS LLCP_DisconnectReq (UINT8   local_sap,
561                                                 UINT8   remote_sap,
562                                                 BOOLEAN flush);
563
564/*******************************************************************************
565**
566** Function         LLCP_SetTxCompleteNtf
567**
568** Description      This function is called to get LLCP_SAP_EVT_TX_COMPLETE
569**                  when Tx queue is empty and all PDU is acked.
570**                  This is one time event, so upper layer shall call this function
571**                  again to get next LLCP_SAP_EVT_TX_COMPLETE.
572**
573** Returns          LLCP_STATUS_SUCCESS if success
574**
575*******************************************************************************/
576LLCP_API extern tLLCP_STATUS LLCP_SetTxCompleteNtf (UINT8 local_sap,
577                                                    UINT8 remote_sap);
578
579/*******************************************************************************
580**
581** Function         LLCP_SetLocalBusyStatus
582**
583** Description      Set local busy status
584**
585**
586** Returns          LLCP_STATUS_SUCCESS if success
587**
588*******************************************************************************/
589LLCP_API extern tLLCP_STATUS LLCP_SetLocalBusyStatus (UINT8   local_sap,
590                                                      UINT8   remote_sap,
591                                                      BOOLEAN is_busy);
592
593/*******************************************************************************
594**
595** Function         LLCP_GetRemoteWKS
596**
597** Description      Return well-known service bitmap of connected device
598**
599**
600** Returns          WKS bitmap if success
601**
602*******************************************************************************/
603LLCP_API extern UINT16 LLCP_GetRemoteWKS (void);
604
605/*******************************************************************************
606**
607** Function         LLCP_GetRemoteLSC
608**
609** Description      Return link service class of connected device
610**
611**
612** Returns          link service class
613**
614*******************************************************************************/
615LLCP_API extern UINT8 LLCP_GetRemoteLSC (void);
616
617/*******************************************************************************
618**
619** Function         LLCP_GetLinkMIU
620**
621** Description      Return local and remote link MIU
622**
623**
624** Returns          None
625**
626*******************************************************************************/
627LLCP_API extern void LLCP_GetLinkMIU (UINT16 *p_local_link_miu, UINT16 *p_remote_link_miu);
628
629/*******************************************************************************
630**
631** Function         LLCP_DiscoverService
632**
633** Description      Return SAP of service name in connected device through callback
634**
635**
636** Returns          LLCP_STATUS_SUCCESS if success
637**
638*******************************************************************************/
639LLCP_API extern tLLCP_STATUS LLCP_DiscoverService (char            *p_name,
640                                                   tLLCP_SDP_CBACK *p_cback,
641                                                   UINT8           *p_tid);
642
643/*******************************************************************************
644**
645** Function         LLCP_SetTraceLevel
646**
647** Description      This function sets the trace level for LLCP.  If called with
648**                  a value of 0xFF, it simply returns the current trace level.
649**
650** Returns          The new or current trace level
651**
652*******************************************************************************/
653LLCP_API extern UINT8 LLCP_SetTraceLevel (UINT8 new_level);
654
655/*******************************************************************************
656**
657** Function         LLCP_RegisterDtaCback
658**
659** Description      Register callback function for LLCP DTA testing
660**
661**
662** Returns          void
663**
664*******************************************************************************/
665LLCP_API extern void LLCP_RegisterDtaCback (tLLCP_DTA_CBACK *p_dta_cback);
666
667#if (LLCP_TEST_INCLUDED == TRUE)
668/*******************************************************************************
669**
670** Function         LLCP_SetTestParams
671**
672** Description      Set test parameters for LLCP
673**
674**
675** Returns          void
676**
677*******************************************************************************/
678LLCP_API extern void LLCP_SetTestParams (UINT8 version, UINT16 wks);
679#endif
680
681#ifdef __cplusplus
682}
683#endif
684
685#endif  /* LLCP_API_H */
686
687