64 #define INVALID_CONNHANDLE 0xFFFF
65 #define LOOPBACK_CONNHANDLE 0xFFFE
71 #define LINK_NOT_CONNECTED 0x00
72 #define LINK_CONNECTED 0x01
73 #define LINK_AUTHENTICATED 0x02
74 #define LINK_BOUND 0x04
75 #define LINK_ENCRYPTED 0x10
76 #define LINK_SECURE_CONNECTIONS 0x20
77 #define LINK_IN_UPDATE 0x40
80 // Link Database Status callback changeTypes
81 #define LINKDB_STATUS_UPDATE_NEW 0
82 #define LINKDB_STATUS_UPDATE_REMOVED 1
83 #define LINKDB_STATUS_UPDATE_STATEFLAGS 2
86 #define LINKDB_ERR_INSUFFICIENT_AUTHEN 0x05
87 #define LINBDB_ERR_INSUFFICIENT_KEYSIZE 0x0c
88 #define LINKDB_ERR_INSUFFICIENT_ENCRYPTION 0x0f
124 uint16 connectionHandle;
154 typedef void (*
pfnLinkDBCB_t)( uint16 connectionHandle, uint8 changeType );
167 extern uint8 linkDBNumConns;
213 extern uint8
linkDB_Add( uint8 taskID, uint16 connectionHandle,
214 uint8 stateFlags, uint8 addrType, uint8 *pAddr,
215 uint8 *pAddrPriv, uint8 connRole, uint16 connInterval,
241 extern uint8
linkDB_Update( uint16 connectionHandle, uint8 newState,
279 extern uint16 linkDB_MTU( uint16 connectionHandle );
326 extern uint8
linkDB_State( uint16 connectionHandle, uint8 state );
341 extern uint8
linkDB_Authen( uint16 connectionHandle, uint8 keySize,
342 uint8 mitmRequired );
352 extern uint8
linkDB_Role( uint16 connectionHandle );
383 #define linkDB_Up( connectionHandle ) linkDB_State( (connectionHandle), LINK_CONNECTED )
393 #define linkDB_Encrypted( connectionHandle ) linkDB_State( (connectionHandle), LINK_ENCRYPTED )
403 #define linkDB_Authenticated( connectionHandle ) linkDB_State( (connectionHandle), LINK_AUTHENTICATED )
413 #define linkDB_Bonded( connectionHandle ) linkDB_State( (connectionHandle), LINK_BOUND )
#define B_RANDOM_NUM_SIZE
BLE Random Number Size.
Definition: bcomdef.h:149
void linkDB_SecurityModeSCOnly(uint8 state)
Set a device into Secure Connection Only Mode.
uint8 linkDB_Update(uint16 connectionHandle, uint8 newState, uint8 add)
Update the stateFlags of a link record.
uint8 linkDB_Add(uint8 taskID, uint16 connectionHandle, uint8 stateFlags, uint8 addrType, uint8 *pAddr, uint8 *pAddrPriv, uint8 connRole, uint16 connInterval, uint16 MTU)
Adds a record to the link database.
linkDBItem_t * linkDB_FindFirst(uint8 taskID)
Find the first link that matches the taskID.
uint8 linkDB_Authen(uint16 connectionHandle, uint8 keySize, uint8 mitmRequired)
Check to see if the physical link is encrypted and authenticated.
uint8 linkDB_Remove(uint16 connectionHandle)
Remove a record from the link database.
uint8 linkDB_Register(pfnLinkDBCB_t pFunc)
Register with linkDB.
SRK and Sign Counter.
Definition: linkdb.h:101
Encryption Params.
Definition: linkdb.h:110
void linkDB_PerformFunc(pfnPerformFuncCB_t cb)
Perform a function of each connection in the link database.
uint8 linkDB_NumActive(void)
Return the number of active connections.
linkDB item
Definition: linkdb.h:121
NODOC void linkDB_Init(void)
Initialize the Link Database.
linkDBItem_t * linkDB_Find(uint16 connectionHandle)
Find the link.
uint8 linkDB_State(uint16 connectionHandle, uint8 state)
Check to see if a physical link is in a specific state.
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:131
void(* pfnLinkDBCB_t)(uint16 connectionHandle, uint8 changeType)
function pointer used to register for a status callback
Definition: linkdb.h:155
uint8 linkDB_GetInfo(uint16 connectionHandle, linkDBInfo_t *pInfo)
Get information about a link.
void(* pfnPerformFuncCB_t)(linkDBItem_t *pLinkItem)
function pointer used to perform specialized link database searches
Definition: linkdb.h:158
linkDB info
Definition: linkdb.h:139
uint8 linkDB_UpdateMTU(uint16 connectionHandle, uint16 newMtu)
update the MTU size of a link or record.
#define KEYLEN
Default key length.
Definition: bcomdef.h:134
uint8 linkDB_NumConns(void)
return the maximum number of connections supported.
uint8 linkDB_Role(uint16 connectionHandle)
Get the role of a physical link.