Lines Matching refs:pLlcpSocket
37 …c NFCSTATUS phFriNfc_Llcp_Send_ReceiveReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket);
38 …NFCSTATUS phFriNfc_Llcp_Send_ReceiveNotReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket);
269 …void phFriNfc_LlcpTransport_ConnectionOriented_Abort(phFriNfc_LlcpTransport_Socket_t * pLlcpSocket) in phFriNfc_LlcpTransport_ConnectionOriented_Abort() argument
271 if (pLlcpSocket->pfSocketSend_Cb != NULL) in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
273 pLlcpSocket->pfSocketSend_Cb(pLlcpSocket->pSendContext, NFCSTATUS_ABORTED); in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
274 pLlcpSocket->pfSocketSend_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
276 pLlcpSocket->pSendContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
277 if (pLlcpSocket->pfSocketRecv_Cb != NULL) in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
279 pLlcpSocket->pfSocketRecv_Cb(pLlcpSocket->pRecvContext, NFCSTATUS_ABORTED); in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
280 pLlcpSocket->pfSocketRecv_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
282 pLlcpSocket->pRecvContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
283 if (pLlcpSocket->pfSocketAccept_Cb != NULL) in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
285 pLlcpSocket->pfSocketAccept_Cb(pLlcpSocket->pAcceptContext, NFCSTATUS_ABORTED); in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
286 pLlcpSocket->pfSocketAccept_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
288 pLlcpSocket->pAcceptContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
289 if (pLlcpSocket->pfSocketConnect_Cb != NULL) in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
291 pLlcpSocket->pfSocketConnect_Cb(pLlcpSocket->pConnectContext, 0, NFCSTATUS_ABORTED); in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
292 pLlcpSocket->pfSocketConnect_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
294 pLlcpSocket->pConnectContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
295 if (pLlcpSocket->pfSocketDisconnect_Cb != NULL) in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
297 pLlcpSocket->pfSocketDisconnect_Cb(pLlcpSocket->pDisconnectContext, NFCSTATUS_ABORTED); in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
298 pLlcpSocket->pfSocketDisconnect_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
300 pLlcpSocket->pDisconnectContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
302 pLlcpSocket->pfSocketRecvFrom_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
303 pLlcpSocket->pfSocketListen_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
304 pLlcpSocket->pListenContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Abort()
308 …ic NFCSTATUS phFriNfc_Llcp_Send_ReceiveReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket) in phFriNfc_Llcp_Send_ReceiveReady_Frame() argument
313 if(testAndSetSendPending(pLlcpSocket->psTransport)) in phFriNfc_Llcp_Send_ReceiveReady_Frame()
315 pLlcpSocket->bSocketRRPending = TRUE; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
321 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
322 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_RR; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
323 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
326 pLlcpSocket->sSequence.ns = 0; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
327 pLlcpSocket->sSequence.nr = pLlcpSocket->socket_VR; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
330 pLlcpSocket->socket_VRA = (uint8_t)pLlcpSocket->sSequence.nr; in phFriNfc_Llcp_Send_ReceiveReady_Frame()
333 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport, in phFriNfc_Llcp_Send_ReceiveReady_Frame()
334 &pLlcpSocket->sLlcpHeader, in phFriNfc_Llcp_Send_ReceiveReady_Frame()
335 &pLlcpSocket->sSequence, in phFriNfc_Llcp_Send_ReceiveReady_Frame()
338 pLlcpSocket->index, in phFriNfc_Llcp_Send_ReceiveReady_Frame()
339 pLlcpSocket->psTransport); in phFriNfc_Llcp_Send_ReceiveReady_Frame()
341 clearSendPending(pLlcpSocket->psTransport); in phFriNfc_Llcp_Send_ReceiveReady_Frame()
348 … NFCSTATUS phFriNfc_Llcp_Send_ReceiveNotReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket) in phFriNfc_Llcp_Send_ReceiveNotReady_Frame() argument
354 if(testAndSetSendPending(pLlcpSocket->psTransport)) in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
356 pLlcpSocket->bSocketRNRPending = TRUE; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
362 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
363 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_RNR; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
364 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
367 pLlcpSocket->sSequence.ns = 0x00; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
368 pLlcpSocket->sSequence.nr = pLlcpSocket->socket_VR; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
371 pLlcpSocket->socket_VRA = (uint8_t)pLlcpSocket->sSequence.nr; in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
374 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport, in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
375 &pLlcpSocket->sLlcpHeader, in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
376 &pLlcpSocket->sSequence, in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
379 pLlcpSocket->index, in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
380 pLlcpSocket->psTransport); in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
382 clearSendPending(pLlcpSocket->psTransport); in phFriNfc_Llcp_Send_ReceiveNotReady_Frame()
472 phFriNfc_LlcpTransport_Socket_t *pLlcpSocket = NULL; in Handle_ConnectionFrame() local
568 pLlcpSocket = &psTransport->pSocketTable[index]; in Handle_ConnectionFrame()
571 pLlcpSocket->remoteMIU = remoteMIU; in Handle_ConnectionFrame()
572 pLlcpSocket->remoteRW = remoteRW; in Handle_ConnectionFrame()
575 pLlcpSocket->socket_dSap = ssap; in Handle_ConnectionFrame()
576 pLlcpSocket->socket_sSap = dsap; in Handle_ConnectionFrame()
579 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketBound; in Handle_ConnectionFrame()
580 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eConnectionOriented; in Handle_ConnectionFrame()
590 if(pLlcpSocket != NULL) in Handle_ConnectionFrame()
593 pLlcpSocket->remoteMIU = 0; in Handle_ConnectionFrame()
594 pLlcpSocket->remoteRW = 0; in Handle_ConnectionFrame()
597 pLlcpSocket->socket_dSap = 0; in Handle_ConnectionFrame()
598 pLlcpSocket->socket_sSap = 0; in Handle_ConnectionFrame()
601 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault; in Handle_ConnectionFrame()
602 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType; in Handle_ConnectionFrame()
614 pListen_Cb(pListenContext,pLlcpSocket); in Handle_ConnectionFrame()
1534 …cpTransport_ConnectionOriented_SocketGetLocalOptions(phFriNfc_LlcpTransport_Socket_t *pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_SocketGetLocalOptions() argument
1540 psLocalOptions->miu = pLlcpSocket->sSocketOption.miu; in phFriNfc_LlcpTransport_ConnectionOriented_SocketGetLocalOptions()
1543 psLocalOptions->rw = pLlcpSocket->sSocketOption.rw; in phFriNfc_LlcpTransport_ConnectionOriented_SocketGetLocalOptions()
1568 …Transport_ConnectionOriented_SocketGetRemoteOptions(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_SocketGetRemoteOptions() argument
1574 psRemoteOptions->miu = pLlcpSocket->remoteMIU; in phFriNfc_LlcpTransport_ConnectionOriented_SocketGetRemoteOptions()
1577 psRemoteOptions->rw = pLlcpSocket->remoteRW; in phFriNfc_LlcpTransport_ConnectionOriented_SocketGetRemoteOptions()
1607 …iNfc_LlcpTransport_ConnectionOriented_Listen(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_Listen() argument
1615 pLlcpSocket->pfSocketListen_Cb = pListen_Cb; in phFriNfc_LlcpTransport_ConnectionOriented_Listen()
1618 pLlcpSocket->pListenContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Listen()
1621 pLlcpSocket->bSocketListenPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Listen()
1624 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketRegistered; in phFriNfc_LlcpTransport_ConnectionOriented_Listen()
1652 …c_LlcpTransport_ConnectionOriented_Accept(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_Accept() argument
1666 memcpy(&pLlcpSocket->sSocketOption, psOptions, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t)); in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1669 …pLlcpSocket ->localMIUX = (pLlcpSocket->sSocketOption.miu - PHFRINFC_LLCP_MIU_DEFAULT) & PHFRINFC_… in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1670 pLlcpSocket ->localRW = pLlcpSocket->sSocketOption.rw & PHFRINFC_LLCP_TLV_RW_MASK; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1673 for(i=0;i<pLlcpSocket->localRW;i++) in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1675 …pLlcpSocket->sSocketRwBufferTable[i].buffer = psWorkingBuffer->buffer + (i*pLlcpSocket->sSocketOpt… in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1676 pLlcpSocket->sSocketRwBufferTable[i].length = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1680 …pLlcpSocket->sSocketSendBuffer.buffer = psWorkingBuffer->buffer + pLlcpSocket->bufferRwMaxLeng… in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1681 pLlcpSocket->sSocketSendBuffer.length = pLlcpSocket->bufferSendMaxLength; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1684 …pLlcpSocket->sSocketLinearBuffer.buffer = psWorkingBuffer->buffer + pLlcpSocket->bufferRwMaxLeng… in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1685 pLlcpSocket->sSocketLinearBuffer.length = pLlcpSocket->bufferLinearLength; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1687 if(pLlcpSocket->sSocketLinearBuffer.length != 0) in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1690 phFriNfc_Llcp_CyclicFifoInit(&pLlcpSocket->sCyclicFifoBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1691 pLlcpSocket->sSocketLinearBuffer.buffer, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1692 pLlcpSocket->sSocketLinearBuffer.length); in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1695 pLlcpSocket->pSocketErrCb = pErr_Cb; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1696 pLlcpSocket->pContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1699 pLlcpSocket->pfSocketAccept_Cb = pAccept_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1700 pLlcpSocket->pAcceptContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1703 pLlcpSocket->socket_VR = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1704 pLlcpSocket->socket_VRA = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1705 pLlcpSocket->socket_VS = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1706 pLlcpSocket->socket_VSA = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1709 if(pLlcpSocket->localMIUX != PHFRINFC_LLCP_MIUX_DEFAULT) in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1712 phFriNfc_Llcp_EncodeMIUX(pLlcpSocket->localMIUX, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1716 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1730 if(pLlcpSocket->sSocketOption.rw != PHFRINFC_LLCP_RW_DEFAULT) in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1733 phFriNfc_Llcp_EncodeRW(&pLlcpSocket->sSocketOption.rw); in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1736 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1740 &pLlcpSocket->sSocketOption.rw); in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1751 if(testAndSetSendPending(pLlcpSocket->psTransport)) in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1753 pLlcpSocket->bSocketAcceptPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1756 pLlcpSocket->sSocketSendBuffer.length = offset; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1763 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1764 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_CC; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1765 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1768 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketAccepted; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1771 pLlcpSocket->sSocketSendBuffer.length = offset; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1774 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1775 &pLlcpSocket->sLlcpHeader, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1777 &pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1779 pLlcpSocket->index, in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1780 pLlcpSocket->psTransport); in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1782 clearSendPending(pLlcpSocket->psTransport); in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1790 pLlcpSocket->pfSocketAccept_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1791 pLlcpSocket->pAcceptContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Accept()
1812 …fc_LlcpTransport_ConnectionOriented_Reject( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phLibNfc_LlcpTransport_ConnectionOriented_Reject() argument
1819 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketRejected; in phLibNfc_LlcpTransport_ConnectionOriented_Reject()
1822 pLlcpSocket->pfSocketSend_Cb = pReject_RspCb; in phLibNfc_LlcpTransport_ConnectionOriented_Reject()
1823 pLlcpSocket->pRejectContext = pContext; in phLibNfc_LlcpTransport_ConnectionOriented_Reject()
1826 status = phFriNfc_LlcpTransport_SendDisconnectMode(pLlcpSocket->psTransport, in phLibNfc_LlcpTransport_ConnectionOriented_Reject()
1827 pLlcpSocket->socket_dSap, in phLibNfc_LlcpTransport_ConnectionOriented_Reject()
1828 pLlcpSocket->socket_sSap, in phLibNfc_LlcpTransport_ConnectionOriented_Reject()
1858 …c_LlcpTransport_ConnectionOriented_Connect( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_Connect() argument
1872 pLlcpSocket->socket_dSap = nSap; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1877 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_SDP; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1881 pLlcpSocket->pfSocketConnect_Cb = pConnect_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1882 pLlcpSocket->pConnectContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1885 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1886 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_CONNECT; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1887 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1890 if(pLlcpSocket->localMIUX != PHFRINFC_LLCP_MIUX_DEFAULT) in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1893 phFriNfc_Llcp_EncodeMIUX(pLlcpSocket->localMIUX, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1897 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1910 if(pLlcpSocket->sSocketOption.rw != PHFRINFC_LLCP_RW_DEFAULT) in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1913 phFriNfc_Llcp_EncodeRW(&pLlcpSocket->sSocketOption.rw); in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1916 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1920 &pLlcpSocket->sSocketOption.rw); in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1932 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1945 if(testAndSetSendPending(pLlcpSocket->psTransport)) in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1947 pLlcpSocket->bSocketConnectPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1950 pLlcpSocket->sSocketSendBuffer.length = offset; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1957 pLlcpSocket->sSocketSendBuffer.length = offset; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1960 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketConnecting; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1962 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1963 &pLlcpSocket->sLlcpHeader, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1965 &pLlcpSocket->sSocketSendBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1967 pLlcpSocket->index, in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1968 pLlcpSocket->psTransport); in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1970 clearSendPending(pLlcpSocket->psTransport); in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1978 pLlcpSocket->pfSocketConnect_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
1979 pLlcpSocket->pConnectContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Connect()
2009 …LlcpTransport_ConnectionOriented_Disconnect(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect() argument
2016 pLlcpSocket->pfSocketDisconnect_Cb = pDisconnect_RspCb; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2017 pLlcpSocket->pDisconnectContext = pContext; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2020 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDisconnecting; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2023 if((pLlcpSocket->bSocketSendPending == TRUE) || (pLlcpSocket->bSocketRecvPending == TRUE)) in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2025 pLlcpSocket->bSocketSendPending = FALSE; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2026 pLlcpSocket->bSocketRecvPending = FALSE; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2029 if (pLlcpSocket->pfSocketSend_Cb != NULL) in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2032 pphFriNfc_LlcpTransportSocketSendCb_t pfSendCb = pLlcpSocket->pfSocketSend_Cb; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2033 void* pSendContext = pLlcpSocket->pSendContext; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2035 pLlcpSocket->pfSocketSend_Cb = NULL; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2036 pLlcpSocket->pSendContext = NULL; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2041 if (pLlcpSocket->pfSocketRecv_Cb != NULL) in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2044 pphFriNfc_LlcpTransportSocketRecvCb_t pfRecvCb = pLlcpSocket->pfSocketRecv_Cb; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2045 void* pRecvContext = pLlcpSocket->pRecvContext; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2047 pLlcpSocket->pfSocketRecv_Cb = NULL; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2048 pLlcpSocket->pRecvContext = NULL; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2055 if( testAndSetSendPending(pLlcpSocket->psTransport)) in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2057 pLlcpSocket->bSocketDiscPending = TRUE; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2063 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2064 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_DISC; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2065 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2067 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport, in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2068 &pLlcpSocket->sLlcpHeader, in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2072 pLlcpSocket->index, in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2073 pLlcpSocket->psTransport); in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2076 clearSendPending(pLlcpSocket->psTransport); in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2078 pLlcpSocket->pfSocketDisconnect_Cb = NULL; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2079 pLlcpSocket->pDisconnectContext = NULL; in phLibNfc_LlcpTransport_ConnectionOriented_Disconnect()
2090 phFriNfc_LlcpTransport_Socket_t *pLlcpSocket = (phFriNfc_LlcpTransport_Socket_t*)pContext; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB() local
2095 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2096 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2097 pLlcpSocket->pContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2098 pLlcpSocket->pSocketErrCb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2099 pLlcpSocket->socket_sSap = PHFRINFC_LLCP_SAP_DEFAULT; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2100 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_DEFAULT; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2101 pLlcpSocket->bSocketRecvPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2102 pLlcpSocket->bSocketSendPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2103 pLlcpSocket->bSocketListenPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2104 pLlcpSocket->bSocketDiscPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2105 pLlcpSocket->socket_VS = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2106 pLlcpSocket->socket_VSA = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2107 pLlcpSocket->socket_VR = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2108 pLlcpSocket->socket_VRA = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2110 pLlcpSocket->indexRwRead = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2111 pLlcpSocket->indexRwWrite = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2113 phFriNfc_LlcpTransport_ConnectionOriented_Abort(pLlcpSocket); in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2115 memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t)); in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2117 if (pLlcpSocket->sServiceName.buffer != NULL) { in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2118 phOsalNfc_FreeMemory(pLlcpSocket->sServiceName.buffer); in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2120 pLlcpSocket->sServiceName.buffer = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2121 pLlcpSocket->sServiceName.length = 0; in phFriNfc_LlcpTransport_ConnectionOriented_DisconnectClose_CB()
2143 …TUS phFriNfc_LlcpTransport_ConnectionOriented_Close(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket) in phFriNfc_LlcpTransport_ConnectionOriented_Close() argument
2147 if(pLlcpSocket->eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected) in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2149 status = phLibNfc_LlcpTransport_ConnectionOriented_Disconnect(pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2151 pLlcpSocket); in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2157 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2158 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2159 pLlcpSocket->pContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2160 pLlcpSocket->pSocketErrCb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2161 pLlcpSocket->socket_sSap = PHFRINFC_LLCP_SAP_DEFAULT; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2162 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_DEFAULT; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2163 pLlcpSocket->bSocketRecvPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2164 pLlcpSocket->bSocketSendPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2165 pLlcpSocket->bSocketListenPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2166 pLlcpSocket->bSocketDiscPending = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2167 pLlcpSocket->RemoteBusyConditionInfo = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2168 pLlcpSocket->ReceiverBusyCondition = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2169 pLlcpSocket->socket_VS = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2170 pLlcpSocket->socket_VSA = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2171 pLlcpSocket->socket_VR = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2172 pLlcpSocket->socket_VRA = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2174 pLlcpSocket->indexRwRead = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2175 pLlcpSocket->indexRwWrite = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2177 phFriNfc_LlcpTransport_ConnectionOriented_Abort(pLlcpSocket); in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2179 memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t)); in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2181 if (pLlcpSocket->sServiceName.buffer != NULL) { in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2182 phOsalNfc_FreeMemory(pLlcpSocket->sServiceName.buffer); in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2184 pLlcpSocket->sServiceName.buffer = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2185 pLlcpSocket->sServiceName.length = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Close()
2216 …Nfc_LlcpTransport_ConnectionOriented_Send(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_Send() argument
2225 if(!CHECK_SEND_RW(pLlcpSocket)) in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2228 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2229 pLlcpSocket->pSendContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2232 pLlcpSocket->bSocketSendPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2235 pLlcpSocket->sSocketSendBuffer = *psBuffer; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2243 pLlcpSocket->sSocketSendBuffer = *psBuffer; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2246 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2247 pLlcpSocket->pSendContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2250 if(testAndSetSendPending(pLlcpSocket->psTransport)) in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2253 pLlcpSocket->bSocketSendPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2261 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2262 pLlcpSocket->pSendContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2264 status = static_performSendInfo(pLlcpSocket); in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2268 clearSendPending(pLlcpSocket->psTransport); in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2270 pLlcpSocket->pfSocketSend_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2271 pLlcpSocket->pSendContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Send()
2307 …fc_LlcpTransport_ConnectionOriented_Recv( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket, in phFriNfc_LlcpTransport_ConnectionOriented_Recv() argument
2320 if(pLlcpSocket->bufferLinearLength == 0) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2322 if (pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2328 if(pLlcpSocket->indexRwRead != pLlcpSocket->indexRwWrite) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2330 … if(pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length != 0) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2333 …pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].buffer,pLlcpSoc… in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2334 …psBuffer->length = pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localR… in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2339 pLlcpSocket->socket_VR = (pLlcpSocket->socket_VR+1)%16; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2342 … pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2345 pLlcpSocket->indexRwRead++; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2354 if(pLlcpSocket->ReceiverBusyCondition == TRUE) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2357 pLlcpSocket->ReceiverBusyCondition = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2360 phFriNfc_Llcp_Send_ReceiveReady_Frame(pLlcpSocket); in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2366 pLlcpSocket->bSocketRecvPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2369 pLlcpSocket->sSocketRecvBuffer = psBuffer; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2372 pLlcpSocket->pfSocketRecv_Cb = pRecv_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2373 pLlcpSocket->pRecvContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2382 dataLengthStored = phFriNfc_Llcp_CyclicFifoUsage(&pLlcpSocket->sCyclicFifoBuffer); in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2392 dataLengthRead = phFriNfc_Llcp_CyclicFifoFifoRead(&pLlcpSocket->sCyclicFifoBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2399 while(pLlcpSocket->indexRwRead != pLlcpSocket->indexRwWrite) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2402 … dataLengthAvailable = phFriNfc_Llcp_CyclicFifoAvailable(&pLlcpSocket->sCyclicFifoBuffer); in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2405 …if(dataLengthAvailable < pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->… in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2411 dataLengthWrite = phFriNfc_Llcp_CyclicFifoWrite(&pLlcpSocket->sCyclicFifoBuffer, in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2412 … pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].buffer, in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2413 … pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length); in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2415 pLlcpSocket->socket_VR = (pLlcpSocket->socket_VR+1)%16; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2421 … pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length = 0; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2424 pLlcpSocket->indexRwRead++; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2431 … dataLengthAvailable = phFriNfc_Llcp_CyclicFifoAvailable(&pLlcpSocket->sCyclicFifoBuffer); in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2432 …if((dataLengthAvailable >= pLlcpSocket->sSocketOption.miu) && (pLlcpSocket->ReceiverBusyCondition … in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2435 pLlcpSocket->ReceiverBusyCondition = FALSE; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2438 phFriNfc_Llcp_Send_ReceiveReady_Frame(pLlcpSocket); in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2453 if (pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected) in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2460 pLlcpSocket->bSocketRecvPending = TRUE; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2463 pLlcpSocket->sSocketRecvBuffer = psBuffer; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2466 pLlcpSocket->pfSocketRecv_Cb = pRecv_RspCb; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2467 pLlcpSocket->pRecvContext = pContext; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2479 pLlcpSocket->pfSocketRecv_Cb = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()
2480 pLlcpSocket->pRecvContext = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_Recv()