Lines Matching refs:pLlcpSocket

41 static NFCSTATUS phFriNfc_LlcpTransport_RegisterName(phFriNfc_LlcpTransport_Socket_t*   pLlcpSocket,
982 * \param[out] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
994 NFCSTATUS phFriNfc_LlcpTransport_SocketGetLocalOptions(phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
1000 if (pLlcpSocket == NULL || psLocalOptions == NULL)
1005 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1010 else if(pLlcpSocket->eSocket_State == phFriNfc_LlcpTransportSocket_eSocketDefault)
1016 status = phFriNfc_LlcpTransport_ConnectionOriented_SocketGetLocalOptions(pLlcpSocket,
1032 * \param[out] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1044 NFCSTATUS phFriNfc_LlcpTransport_SocketGetRemoteOptions(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1050 if (pLlcpSocket == NULL || psRemoteOptions == NULL)
1055 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1060 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected)
1066 status = phFriNfc_LlcpTransport_ConnectionOriented_SocketGetRemoteOptions(pLlcpSocket,
1182 * \param[out] pLlcpSocket A pointer on the socket to be filled with a
1200 phFriNfc_LlcpTransport_Socket_t **pLlcpSocket,
1212 || (pLlcpSocket == NULL)
1248 *pLlcpSocket = &pLlcpTransport->pSocketTable[index];
1366 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1373 NFCSTATUS phFriNfc_LlcpTransport_Close(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket)
1378 if( pLlcpSocket == NULL)
1382 else if(pLlcpSocket->eSocket_Type == phFriNfc_LlcpTransport_eConnectionOriented)
1384 status = phFriNfc_LlcpTransport_ConnectionOriented_Close(pLlcpSocket);
1386 else if(pLlcpSocket->eSocket_Type == phFriNfc_LlcpTransport_eConnectionLess)
1388 status = phFriNfc_LlcpTransport_Connectionless_Close(pLlcpSocket);
1404 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1418 NFCSTATUS phFriNfc_LlcpTransport_Bind(phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
1428 if(pLlcpSocket == NULL)
1432 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketCreated)
1455 status = phFriNfc_LlcpTransport_GetFreeSap(pLlcpSocket->psTransport, psServiceName, &nSap);
1473 if(pLlcpSocket->psTransport->pSocketTable[i].socket_sSap == nSap)
1479 status = phFriNfc_LlcpTransport_RegisterName(pLlcpSocket, nSap, psServiceName);
1485 pLlcpSocket->socket_sSap = nSap;
1487 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketBound;
1508 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1521 NFCSTATUS phFriNfc_LlcpTransport_Listen(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1528 if(pLlcpSocket == NULL || pListen_Cb == NULL|| pContext == NULL )
1533 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
1538 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1543 else if(pLlcpSocket->bSocketListenPending)
1549 status = phFriNfc_LlcpTransport_ConnectionOriented_Listen(pLlcpSocket,
1563 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1572 static NFCSTATUS phFriNfc_LlcpTransport_RegisterName(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1576 phFriNfc_LlcpTransport_t * psTransport = pLlcpSocket->psTransport;
1606 if (pLlcpSocket->sServiceName.buffer != NULL)
1608 phOsalNfc_FreeMemory(pLlcpSocket->sServiceName.buffer);
1610 pLlcpSocket->sServiceName.buffer = NULL;
1611 pLlcpSocket->sServiceName.length = 0;
1618 phFriNfc_LlcpTransport_Socket_t* pCurrentSocket = &pLlcpSocket->psTransport->pSocketTable[index];
1638 pLlcpSocket->sServiceName.length = psServiceName->length;
1639 pLlcpSocket->sServiceName.buffer = phOsalNfc_GetMemory(psServiceName->length);
1640 if (pLlcpSocket->sServiceName.buffer == NULL)
1644 memcpy(pLlcpSocket->sServiceName.buffer, psServiceName->buffer, psServiceName->length);
1658 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1672 NFCSTATUS phFriNfc_LlcpTransport_Accept(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1682 if(pLlcpSocket == NULL || psOptions == NULL || psWorkingBuffer == NULL || pErr_Cb == NULL || pContext == NULL)
1687 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
1692 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1704 pLlcpSocket->bufferSendMaxLength = psOptions->miu;
1705 pLlcpSocket->bufferRwMaxLength = psOptions->miu * ((psOptions->rw & PHFRINFC_LLCP_TLV_RW_MASK));
1706 pLlcpSocket->bufferLinearLength = psWorkingBuffer->length - pLlcpSocket->bufferSendMaxLength - pLlcpSocket->bufferRwMaxLength;
1709 if((pLlcpSocket->bufferSendMaxLength + pLlcpSocket->bufferRwMaxLength) > psWorkingBuffer->length
1710 || ((pLlcpSocket->bufferLinearLength < PHFRINFC_LLCP_MIU_DEFAULT) && (pLlcpSocket->bufferLinearLength != 0)))
1716 pLlcpSocket->psTransport->socketIndex = pLlcpSocket->index;
1718 status = phFriNfc_LlcpTransport_ConnectionOriented_Accept(pLlcpSocket,
1737 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1746 NFCSTATUS phFriNfc_LlcpTransport_Reject( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1753 if(pLlcpSocket == NULL)
1758 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
1763 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1769 status = phLibNfc_LlcpTransport_ConnectionOriented_Reject(pLlcpSocket,
1784 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1800 NFCSTATUS phFriNfc_LlcpTransport_Connect( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1810 if(pLlcpSocket == NULL || pConnect_RspCb == NULL || pContext == NULL)
1820 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1825 else if(pLlcpSocket->sServiceName.length != 0)
1830 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketCreated && pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
1837 if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
1840 status = phFriNfc_LlcpTransport_GetFreeSap(pLlcpSocket->psTransport, NULL, &nLocalSap);
1845 pLlcpSocket->socket_sSap = nLocalSap;
1849 if(!IS_BETWEEN(pLlcpSocket->socket_sSap, PHFRINFC_LLCP_SAP_SDP_UNADVERTISED_FIRST, PHFRINFC_LLCP_SAP_NUMBER))
1855 status = phFriNfc_LlcpTransport_ConnectionOriented_Connect(pLlcpSocket,
1873 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1891 NFCSTATUS phFriNfc_LlcpTransport_ConnectByUri(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1901 if(pLlcpSocket == NULL || pConnect_RspCb == NULL || pContext == NULL)
1906 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1911 else if(pLlcpSocket->eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnecting || pLlcpSocket->eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected)
1923 if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
1926 status = phFriNfc_LlcpTransport_GetFreeSap(pLlcpSocket->psTransport, NULL, &nLocalSap);
1931 pLlcpSocket->socket_sSap = nLocalSap;
1935 if(!IS_BETWEEN(pLlcpSocket->socket_sSap, PHFRINFC_LLCP_SAP_SDP_UNADVERTISED_FIRST, PHFRINFC_LLCP_SAP_NUMBER))
1941 status = phFriNfc_LlcpTransport_ConnectionOriented_Connect(pLlcpSocket,
1958 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1975 NFCSTATUS phFriNfc_LlcpTransport_Disconnect(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1982 if(pLlcpSocket == NULL || pDisconnect_RspCb == NULL || pContext == NULL)
1987 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
1992 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected)
1998 status = phLibNfc_LlcpTransport_ConnectionOriented_Disconnect(pLlcpSocket,
2015 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
2031 NFCSTATUS phFriNfc_LlcpTransport_Send(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
2039 if(pLlcpSocket == NULL || psBuffer == NULL || pSend_RspCb == NULL || pContext == NULL)
2044 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
2049 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected)
2054 else if(psBuffer->length > pLlcpSocket->remoteMIU )
2059 else if(pLlcpSocket->pfSocketSend_Cb != NULL)
2065 status = phFriNfc_LlcpTransport_ConnectionOriented_Send(pLlcpSocket,
2085 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
2101 NFCSTATUS phFriNfc_LlcpTransport_Recv( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
2109 if(pLlcpSocket == NULL || psBuffer == NULL || pRecv_RspCb == NULL || pContext == NULL)
2114 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionOriented)
2119 else if(pLlcpSocket->eSocket_State == phFriNfc_LlcpTransportSocket_eSocketDefault)
2124 else if(pLlcpSocket->bSocketRecvPending == TRUE)
2130 status = phFriNfc_LlcpTransport_ConnectionOriented_Recv(pLlcpSocket,
2151 * \param[in] pLlcpSocket A pointer to a LlcpSocket created.
2168 NFCSTATUS phFriNfc_LlcpTransport_SendTo( phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
2177 if(pLlcpSocket == NULL || psBuffer == NULL || pSend_RspCb == NULL || pContext == NULL)
2187 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionLess)
2192 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
2197 else if(pLlcpSocket->pfSocketSend_Cb != NULL)
2204 status = phFriNfc_Llcp_GetRemoteInfo(pLlcpSocket->psTransport->pLlcp,&LlcpRemoteLinkParamInfo);
2215 else if(pLlcpSocket->psTransport->LinkStatusError)
2221 status = phFriNfc_LlcpTransport_Connectionless_SendTo(pLlcpSocket,
2241 * \param[in] pLlcpSocket A pointer to a LlcpSocket created.
2259 NFCSTATUS phFriNfc_LlcpTransport_RecvFrom( phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
2265 if(pLlcpSocket == NULL || psBuffer == NULL || pRecv_Cb == NULL || pContext == NULL)
2270 else if(pLlcpSocket->eSocket_Type != phFriNfc_LlcpTransport_eConnectionLess)
2275 else if(pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketBound)
2281 if(pLlcpSocket->bSocketRecvPending)
2287 status = phLibNfc_LlcpTransport_Connectionless_RecvFrom(pLlcpSocket,