TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Data Structures | Macros | Typedefs | Functions
linkdb.h File Reference

Detailed Description

LinkDB layer interface.

Go to the source code of this file.

Data Structures

struct  encParams_t
 Encryption Params. More...
 
struct  linkDBInfo_t
 linkDB info More...
 
struct  linkDBItem_t
 linkDB item More...
 
struct  linkSec_t
 SRK and Sign Counter. More...
 

Macros

#define INVALID_CONNHANDLE   0xFFFF
 Invalid connection handle, used for no connection handle.
 
#define LINBDB_ERR_INSUFFICIENT_KEYSIZE   0x0c
 Link is encrypted but the key size is too small.
 
#define LINK_AUTHENTICATED   0x02
 Link is authenticated.
 
#define LINK_BOUND   0x04
 Link is bonded.
 
#define LINK_CONNECTED   0x01
 Link is connected.
 
#define LINK_ENCRYPTED   0x10
 Link is encrypted.
 
#define LINK_IN_UPDATE   0x40
 Link is in update procedure.
 
#define LINK_NOT_CONNECTED   0x00
 Link isn't connected.
 
#define LINK_SECURE_CONNECTIONS   0x20
 Link uses Secure Connections.
 
#define linkDB_Authenticated(connectionHandle)   linkDB_State( (connectionHandle), LINK_AUTHENTICATED )
 Check to see if the physical link is authenticated. More...
 
#define linkDB_Bonded(connectionHandle)   linkDB_State( (connectionHandle), LINK_BOUND )
 Check to see if the physical link is bonded. More...
 
#define linkDB_Encrypted(connectionHandle)   linkDB_State( (connectionHandle), LINK_ENCRYPTED )
 Check to see if the physical link is encrypted. More...
 
#define LINKDB_ERR_INSUFFICIENT_AUTHEN   0x05
 Link isn't even encrypted.
 
#define LINKDB_ERR_INSUFFICIENT_ENCRYPTION   0x0f
 Link is encrypted but it's not authenticated.
 
#define LINKDB_STATUS_UPDATE_NEW   0
 New connection created.
 
#define LINKDB_STATUS_UPDATE_REMOVED   1
 Connection was removed.
 
#define LINKDB_STATUS_UPDATE_STATEFLAGS   2
 Connection state flag changed.
 
#define linkDB_Up(connectionHandle)   linkDB_State( (connectionHandle), LINK_CONNECTED )
 Check to see if a physical link is up (connected). More...
 
#define LOOPBACK_CONNHANDLE   0xFFFE
 Loopback connection handle, used to loopback a message.
 

Typedefs

typedef void(* pfnLinkDBCB_t) (uint16 connectionHandle, uint8 changeType)
 function pointer used to register for a status callback
 
typedef void(* pfnPerformFuncCB_t) (linkDBItem_t *pLinkItem)
 function pointer used to perform specialized link database searches
 

Functions

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. More...
 
uint8 linkDB_Authen (uint16 connectionHandle, uint8 keySize, uint8 mitmRequired)
 Check to see if the physical link is encrypted and authenticated. More...
 
linkDBItem_tlinkDB_Find (uint16 connectionHandle)
 Find the link. More...
 
linkDBItem_tlinkDB_FindFirst (uint8 taskID)
 Find the first link that matches the taskID. More...
 
uint8 linkDB_GetInfo (uint16 connectionHandle, linkDBInfo_t *pInfo)
 Get information about a link. More...
 
NODOC void linkDB_Init (void)
 Initialize the Link Database.
 
uint16 linkDB_MTU (uint16 connectionHandle)
 This function is used to get the MTU size of a link. More...
 
uint8 linkDB_NumActive (void)
 Return the number of active connections. More...
 
uint8 linkDB_NumConns (void)
 return the maximum number of connections supported. More...
 
void linkDB_PerformFunc (pfnPerformFuncCB_t cb)
 Perform a function of each connection in the link database. More...
 
uint8 linkDB_Register (pfnLinkDBCB_t pFunc)
 Register with linkDB. More...
 
uint8 linkDB_Remove (uint16 connectionHandle)
 Remove a record from the link database. More...
 
uint8 linkDB_Role (uint16 connectionHandle)
 Get the role of a physical link. More...
 
void linkDB_SecurityModeSCOnly (uint8 state)
 Set a device into Secure Connection Only Mode. More...
 
uint8 linkDB_State (uint16 connectionHandle, uint8 state)
 Check to see if a physical link is in a specific state. More...
 
uint8 linkDB_Update (uint16 connectionHandle, uint8 newState, uint8 add)
 Update the stateFlags of a link record. More...
 
uint8 linkDB_UpdateMTU (uint16 connectionHandle, uint16 newMtu)
 update the MTU size of a link or record. More...
 
Copyright 2017, Texas Instruments Incorporated