Home | History | Annotate | Download | only in src

Lines Matching defs:pSocketTable

55    phFriNfc_LlcpTransport_Socket_t* pSocketTable = psTransport->pSocketTable;
89 if((pSocketTable[i].eSocket_State >= phFriNfc_LlcpTransportSocket_eSocketBound) &&
90 (pSocketTable[i].socket_sSap == sap))
201 pSocket = &psTransport->pSocketTable[index];
629 pCurrentSocket = &psTransport->pSocketTable[index];
682 pLlcpTransport->pSocketTable[i].eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault;
683 pLlcpTransport->pSocketTable[i].eSocket_Type = phFriNfc_LlcpTransport_eDefaultType;
684 pLlcpTransport->pSocketTable[i].index = i;
685 pLlcpTransport->pSocketTable[i].pContext = NULL;
686 pLlcpTransport->pSocketTable[i].pListenContext = NULL;
687 pLlcpTransport->pSocketTable[i].pAcceptContext = NULL;
688 pLlcpTransport->pSocketTable[i].pRejectContext = NULL;
689 pLlcpTransport->pSocketTable[i].pConnectContext = NULL;
690 pLlcpTransport->pSocketTable[i].pDisconnectContext = NULL;
691 pLlcpTransport->pSocketTable[i].pSendContext = NULL;
692 pLlcpTransport->pSocketTable[i].pRecvContext = NULL;
693 pLlcpTransport->pSocketTable[i].pSocketErrCb = NULL;
694 pLlcpTransport->pSocketTable[i].bufferLinearLength = 0;
695 pLlcpTransport->pSocketTable[i].bufferSendMaxLength = 0;
696 pLlcpTransport->pSocketTable[i].bufferRwMaxLength = 0;
697 pLlcpTransport->pSocketTable[i].ReceiverBusyCondition = FALSE;
698 pLlcpTransport->pSocketTable[i].RemoteBusyConditionInfo = FALSE;
699 pLlcpTransport->pSocketTable[i].socket_sSap = PHFRINFC_LLCP_SAP_DEFAULT;
700 pLlcpTransport->pSocketTable[i].socket_dSap = PHFRINFC_LLCP_SAP_DEFAULT;
701 pLlcpTransport->pSocketTable[i].bSocketRecvPending = FALSE;
702 pLlcpTransport->pSocketTable[i].bSocketSendPending = FALSE;
703 pLlcpTransport->pSocketTable[i].bSocketListenPending = FALSE;
704 pLlcpTransport->pSocketTable[i].bSocketDiscPending = FALSE;
705 pLlcpTransport->pSocketTable[i].bSocketConnectPending = FALSE;
706 pLlcpTransport->pSocketTable[i].bSocketAcceptPending = FALSE;
707 pLlcpTransport->pSocketTable[i].bSocketRRPending = FALSE;
708 pLlcpTransport->pSocketTable[i].bSocketRNRPending = FALSE;
709 pLlcpTransport->pSocketTable[i].psTransport = pLlcpTransport;
710 pLlcpTransport->pSocketTable[i].pfSocketSend_Cb = NULL;
711 pLlcpTransport->pSocketTable[i].pfSocketRecv_Cb = NULL;
712 pLlcpTransport->pSocketTable[i].pfSocketRecvFrom_Cb = NULL;
713 pLlcpTransport->pSocketTable[i].pfSocketListen_Cb = NULL;
714 pLlcpTransport->pSocketTable[i].pfSocketConnect_Cb = NULL;
715 pLlcpTransport->pSocketTable[i].pfSocketDisconnect_Cb = NULL;
716 pLlcpTransport->pSocketTable[i].socket_VS = 0;
717 pLlcpTransport->pSocketTable[i].socket_VSA = 0;
718 pLlcpTransport->pSocketTable[i].socket_VR = 0;
719 pLlcpTransport->pSocketTable[i].socket_VRA = 0;
720 pLlcpTransport->pSocketTable[i].remoteRW = 0;
721 pLlcpTransport->pSocketTable[i].localRW = 0;
722 pLlcpTransport->pSocketTable[i].remoteMIU = 0;
723 pLlcpTransport->pSocketTable[i].localMIUX = 0;
724 pLlcpTransport->pSocketTable[i].index = 0;
725 pLlcpTransport->pSocketTable[i].indexRwRead = 0;
726 pLlcpTransport->pSocketTable[i].indexRwWrite = 0;
728 memset(&pLlcpTransport->pSocketTable[i].sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
730 if (pLlcpTransport->pSocketTable[i].sServiceName.buffer != NULL) {
731 phOsalNfc_FreeMemory(pLlcpTransport->pSocketTable[i].sServiceName.buffer);
733 pLlcpTransport->pSocketTable[i].sServiceName.buffer = NULL;
734 pLlcpTransport->pSocketTable[i].sServiceName.length = 0;
761 if(pLlcpTransport->pSocketTable[i].eSocket_Type == phFriNfc_LlcpTransport_eConnectionOriented)
763 switch(pLlcpTransport->pSocketTable[i].eSocket_State)
771 phFriNfc_LlcpTransport_Close(&pLlcpTransport->pSocketTable[i]);
780 phFriNfc_LlcpTransport_Close(&pLlcpTransport->pSocketTable[i]);
859 if(psTransport->pSocketTable[index].socket_sSap == dsap
860 && psTransport->pSocketTable[index].socket_dSap == ssap)
872 psTransport->pSocketTable[index].eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault;
875 psTransport->pSocketTable[index].pSocketErrCb( psTransport->pSocketTable[index].pContext,PHFRINFC_LLCP_ERR_FRAME_REJECTED);
878 status = phFriNfc_LlcpTransport_ConnectionOriented_Close(&psTransport->pSocketTable[index]);
1245 pSocketTable[index].eSocket_State == phFriNfc_LlcpTransportSocket_eSocketDefault)
1248 *pLlcpSocket = &pLlcpTransport->pSocketTable[index];
1251 pLlcpTransport->pSocketTable[index].eSocket_Type = eType;
1252 pLlcpTransport->pSocketTable[index].pSocketErrCb = pErr_Cb;
1255 pLlcpTransport->pSocketTable[index].pContext = pContext;
1268 memcpy(&pLlcpTransport->pSocketTable[index].sSocketOption, psOptions, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
1271 pLlcpTransport->pSocketTable[index].localMIUX = (pLlcpTransport->pSocketTable[index].sSocketOption.miu - PHFRINFC_LLCP_MIU_DEFAULT) & PHFRINFC_LLCP_TLV_MIUX_MASK;
1272 pLlcpTransport->pSocketTable[index].localRW = pLlcpTransport->pSocketTable[index].sSocketOption.rw & PHFRINFC_LLCP_TLV_RW_MASK;
1275 pLlcpTransport->pSocketTable[index].bufferSendMaxLength = pLlcpTransport->pSocketTable[index].sSocketOption.miu;
1276 pLlcpTransport->pSocketTable[index].bufferRwMaxLength = pLlcpTransport->pSocketTable[index].sSocketOption.miu * ((pLlcpTransport->pSocketTable[index].sSocketOption.rw & PHFRINFC_LLCP_TLV_RW_MASK));
1277 pLlcpTransport->pSocketTable[index].bufferLinearLength = psWorkingBuffer->length - pLlcpTransport->pSocketTable[index].bufferSendMaxLength - pLlcpTransport->pSocketTable[index].bufferRwMaxLength;
1280 if((pLlcpTransport->pSocketTable[index].bufferSendMaxLength + pLlcpTransport->pSocketTable[index].bufferRwMaxLength) > psWorkingBuffer->length
1281 || ((pLlcpTransport->pSocketTable[index].bufferLinearLength < PHFRINFC_LLCP_MIU_DEFAULT) && (pLlcpTransport->pSocketTable[index].bufferLinearLength != 0)))
1288 for(cpt=0;cpt<pLlcpTransport->pSocketTable[index].localRW;cpt++)
1290 pLlcpTransport->pSocketTable[index].sSocketRwBufferTable[cpt].buffer = psWorkingBuffer->buffer + (cpt*pLlcpTransport->pSocketTable[index].sSocketOption.miu);
1291 pLlcpTransport->pSocketTable[index].sSocketRwBufferTable[cpt].length = 0;
1295 pLlcpTransport->pSocketTable[index].sSocketSendBuffer.buffer = psWorkingBuffer->buffer + pLlcpTransport->pSocketTable[index].bufferRwMaxLength;
1296 pLlcpTransport->pSocketTable[index].sSocketSendBuffer.length = pLlcpTransport->pSocketTable[index].bufferSendMaxLength;
1299 pLlcpTransport->pSocketTable[index].sSocketLinearBuffer.buffer = psWorkingBuffer->buffer + pLlcpTransport->pSocketTable[index].bufferRwMaxLength + pLlcpTransport->pSocketTable[index].bufferSendMaxLength;
1300 pLlcpTransport->pSocketTable[index].sSocketLinearBuffer.length = pLlcpTransport->pSocketTable[index].bufferLinearLength;
1302 if(pLlcpTransport->pSocketTable[index].sSocketLinearBuffer.length != 0)
1305 phFriNfc_Llcp_CyclicFifoInit(&pLlcpTransport->pSocketTable[index].sCyclicFifoBuffer,
1306 pLlcpTransport->pSocketTable[index].sSocketLinearBuffer.buffer,
1307 pLlcpTransport->pSocketTable[index].sSocketLinearBuffer.length);
1317 pLlcpTransport->pSocketTable[index].localRW = psWorkingBuffer->length / (pLlcpTransport->pLlcp->sLocalParams.miu + 1);
1321 pLlcpTransport->pSocketTable[index].localRW = 0;
1324 if (pLlcpTransport->pSocketTable[index].localRW > PHFRINFC_LLCP_RW_MAX)
1326 pLlcpTransport->pSocketTable[index].localRW = PHFRINFC_LLCP_RW_MAX;
1330 for(cpt=0 ; cpt<pLlcpTransport->pSocketTable[index].localRW ; cpt++)
1332 pLlcpTransport->pSocketTable[index].sSocketRwBufferTable[cpt].buffer = psWorkingBuffer->buffer + (cpt*(pLlcpTransport->pLlcp->sLocalParams.miu + 1));
1333 pLlcpTransport->pSocketTable[index].sSocketRwBufferTable[cpt].length = 0;
1337 pLlcpTransport->pSocketTable[index].indexRwRead = 0;
1338 pLlcpTransport->pSocketTable[index].indexRwWrite = 0;
1342 pLlcpTransport->pSocketTable[index].index = index;
1345 pLlcpTransport->pSocketTable[index].eSocket_State = phFriNfc_LlcpTransportSocket_eSocketCreated;
1473 if(pLlcpSocket->psTransport->pSocketTable[i].socket_sSap == nSap)
1618 phFriNfc_LlcpTransport_Socket_t* pCurrentSocket = &pLlcpSocket->psTransport->pSocketTable[index];