Lines Matching refs:rxHeader
184 memcpy(((uint8_t *)&context->rxHeader) + context->rxStatus.locInState, buf, in chppConsumeHeader()
199 } else if (context->rxHeader.length == 0) { in chppConsumeHeader()
209 tempPayload = chppMalloc(context->rxHeader.length); in chppConsumeHeader()
214 context->rxDatagram.length + context->rxHeader.length, in chppConsumeHeader()
224 context->rxDatagram.length += context->rxHeader.length; in chppConsumeHeader()
246 CHPP_ASSERT(context->rxStatus.locInState < context->rxHeader.length); in chppConsumePayload()
248 MIN(len, (context->rxHeader.length - context->rxStatus.locInState)); in chppConsumePayload()
254 if (context->rxStatus.locInState == context->rxHeader.length) { in chppConsumePayload()
286 if (CHPP_TRANSPORT_GET_ERROR(context->rxHeader.packetCode) != in chppConsumeFooter()
290 context->rxHeader.length, context->rxHeader.seq, in chppConsumeFooter()
291 context->rxHeader.ackSeq, in chppConsumeFooter()
292 (uint8_t)CHPP_TRANSPORT_GET_ATTR(context->rxHeader.packetCode), in chppConsumeFooter()
293 (uint8_t)CHPP_TRANSPORT_GET_ERROR(context->rxHeader.packetCode), in chppConsumeFooter()
294 context->rxHeader.flags); in chppConsumeFooter()
298 context->rxHeader.length, context->rxHeader.seq, in chppConsumeFooter()
299 context->rxHeader.ackSeq, in chppConsumeFooter()
300 (uint8_t)CHPP_TRANSPORT_GET_ATTR(context->rxHeader.packetCode), in chppConsumeFooter()
301 (uint8_t)CHPP_TRANSPORT_GET_ERROR(context->rxHeader.packetCode), in chppConsumeFooter()
302 context->rxHeader.flags); in chppConsumeFooter()
305 if (CHPP_TRANSPORT_GET_ATTR(context->rxHeader.packetCode) == in chppConsumeFooter()
311 } else if (CHPP_TRANSPORT_GET_ATTR(context->rxHeader.packetCode) == in chppConsumeFooter()
319 context->rxHeader.seq, context->rxHeader.length); in chppConsumeFooter()
323 } else if (CHPP_TRANSPORT_GET_ATTR(context->rxHeader.packetCode) == in chppConsumeFooter()
326 context->rxHeader.seq, in chppConsumeFooter()
327 CHPP_TRANSPORT_GET_ERROR(context->rxHeader.packetCode)); in chppConsumeFooter()
336 context->rxHeader.seq, context->rxHeader.length); in chppConsumeFooter()
339 } else if (CHPP_TRANSPORT_GET_ATTR(context->rxHeader.packetCode) == in chppConsumeFooter()
341 CHPP_LOGI("RX RESET-ACK packet. seq=%" PRIu8, context->rxHeader.seq); in chppConsumeFooter()
346 context->rxHeader.seq, context->rxHeader.length); in chppConsumeFooter()
377 undoLen = context->rxHeader.length; in chppAbortRxPacket()
383 undoLen = context->rxHeader.length; in chppAbortRxPacket()
384 undoLoc = context->rxHeader.length; in chppAbortRxPacket()
444 *txHeader = context->rxHeader; in chppProcessTransportLoopbackRequest()
525 context->rxHeader.seq, context->rxHeader.packetCode); in chppProcessResetAck()
542 context->rxStatus.receivedPacketCode = context->rxHeader.packetCode; in chppProcessResetAck()
543 context->rxStatus.expectedSeq = context->rxHeader.seq + 1; in chppProcessResetAck()
577 context->rxStatus.receivedPacketCode = context->rxHeader.packetCode; in chppProcessRxPacket()
581 if (context->rxHeader.length > 0 && in chppProcessRxPacket()
582 context->rxHeader.seq != context->rxStatus.expectedSeq) { in chppProcessRxPacket()
599 context->rxHeader.seq, context->rxStatus.expectedSeq, in chppProcessRxPacket()
600 context->rxHeader.length); in chppProcessRxPacket()
603 } else if (context->rxHeader.length > 0) { in chppProcessRxPacket()
621 if (context->rxHeader.flags & CHPP_TRANSPORT_FLAG_UNFINISHED_DATAGRAM) { in chppProcessRxPayload()
625 context->rxHeader.seq, context->rxHeader.length, in chppProcessRxPayload()
642 context->rxDatagram.length, context->rxHeader.seq, in chppProcessRxPayload()
643 context->rxHeader.length, context->rxStatus.expectedSeq, in chppProcessRxPayload()
675 uint32_t crc = chppCrc32(0, (const uint8_t *)&context->rxHeader, in chppRxChecksumIsOk()
676 sizeof(context->rxHeader)); in chppRxChecksumIsOk()
680 .payload[context->rxStatus.locInDatagram - context->rxHeader.length], in chppRxChecksumIsOk()
681 context->rxHeader.length); in chppRxChecksumIsOk()
693 (size_t)(context->rxHeader.length + in chppRxChecksumIsOk()
712 if (context->rxHeader.length > CHPP_TRANSPORT_RX_MTU_BYTES) { in chppRxHeaderCheck()
719 context->rxHeader.seq, context->rxStatus.expectedSeq, in chppRxHeaderCheck()
720 context->rxHeader.length, result); in chppRxHeaderCheck()
733 uint8_t rxAckSeq = context->rxHeader.ackSeq; in chppRegisterRxAck()
755 context->rxHeader.seq, context->txStatus.txAttempts - 1); in chppRegisterRxAck()
1249 transportContext->rxHeader.packetCode; in chppReset()
1250 transportContext->rxStatus.expectedSeq = transportContext->rxHeader.seq + 1; in chppReset()
1452 context->rxStatus.state, context->rxHeader.seq, in chppRxPacketCompleteCb()
1453 context->rxHeader.length); in chppRxPacketCompleteCb()