summaryrefslogtreecommitdiffstats
path: root/src/phFriNfc_LlcpTransport.h
Commit message (Collapse)AuthorAgeFilesLines
* LLCP 1.1 implementation.Sunil Jogi2012-01-271-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, in LLCP v1.0, the only way to use the SDP (Service Discovery Protocol) service was to send a CONNECT frame containing the Service Name to the SDP service. This was implicitly preforming a connection request to the requested service. LLCP v1.1 introduced a way to discover services more efficiently and without implicit connection. It also enables connectionless services to have a service name. It is based on a new protocol based on a new SNL frame containing discovery requests and responses. This update comes with new APIs: - phLibNfc_Llcp_DiscoverServices() function can be used to discover remote services. It can take multiple service names and resolve all of them in a single call. - Register service name at bind time. Cache LLCP service name/sap pairs. In LLCP 1.1 specification defines at section 5.9 that any service lookup answer must be valid for the whole LLCP session duration. To enforce this, we cache the SAP/SN pairs locally and make sure that the applications don't break the cache. The stack remains fully retro-compatible with v1.0 devices. Change-Id: I052edd3838013cee65e7415d0ed01fc3e9cad36d
* LLCP 1.1: allow pending operations on connectionless.Sunil Jogi2012-01-271-0/+47
| | | | | | | | | | | | | The pending operations were handled at the connection-oriented sockets level, with no possibility for other transport types to handle pending operations. A dispatcher has been added at the generic transport level to remove this limitation. This feature is needed to implement LLCP v1.1. Change-Id: I69e37ba800d1c531396ca97ab0a0480e0f53d63f
* Fixed erroneous LLCP frame on socket closure.Sylvain Fonteneau2011-01-181-0/+2
| | | | | | | | | | | | | | | Moved data allocation from stack memory to heap in order to avoid invalid memory access. Previously, When trying to send a DM (acknowledgment to socket disconnect request), the stack was allocating some frame data on the stack but these data were used after the function returned. Other calls to the same function are already using variables allocated on heap. Change-Id: Id7356a876fdecdd979ed3ddc6dbe100d6e92d43d
* Allow LLCP socket creation before link establishment.Arnaud Ferir2011-01-181-2/+0
| | | | | | | | | | | | | | | | | This enables to register a server socket prior to LLCP link establishement and avoid any race condition between the local server and the remote client. The modification implies a LLCP socket API change (added the device handle parameter in all LLCP API that can lead to active data exchange). The LLCP socket internal structures are now initialized during LLCP link parameter configuration step instead of LLCP compliancy check to save socket state independently from peer detection. Also removed unused socket states and added some traces. Change-Id: I961c48af4ca9ace68d41b9569dc1038bb2bbdc71
* Close all LLCP sockets when the link goes down.Sylvain Fonteneau2010-12-051-0/+8
| | | | | | | | The LLCP link status callback is now handled first in LIB layer before being forwarded to the client. This is needed to enable the LIB layer to detect the link status change and close the sockets accordingly. Change-Id: I607aaebb4c0c8f2da09c81d4d43b4c705ebfcb13
* Fixed LLCP socket options storage.Sylvain Fonteneau2010-11-011-2/+3
| | | | | | | | Socket options are now copied in the libnfc to avoid referencing a pointer that may not be valid during the whole socket life cycle. Change-Id: I7266164bf157242df1ce7fb7a0f9cffd52938140 Signed-off-by: Nick Pelly <npelly@google.com>
* Fixed LLCP Service Name matching failure.Sylvain Fonteneau2010-10-281-1/+1
| | | | | | | Service Name is now copied in the libnfc to avoid referencing a pointer that may not be valid during the whole socket life. Change-Id: I6572366ac51502d189cc8f1350fa089c11cc2bea
* Initial libnfc checkinNick Pelly2010-09-231-0/+686
Source: Trusted_NFC_Device_Host_AA03.01e02_google.zip code drop (23-Sep-2010) Change-Id: Ie47f18423f949a8d3e0815d13f55c814312add24 Signed-off-by: Nick Pelly <npelly@google.com>