Lines Matching defs:thispkt

357     MEMPACKET *thispkt;
363 if ((thispkt = sk_MEMPACKET_value(ctx->pkts, 0)) == NULL
364 || thispkt->num != ctx->currpkt) {
372 if (outl > thispkt->len)
373 outl = thispkt->len;
375 if (thispkt->type != INJECT_PACKET_IGNORE_REC_SEQ
383 for (rem = thispkt->len, rec = thispkt->data; rem > 0; rem -= len) {
418 memcpy(out, thispkt->data, outl);
419 mempacket_free(thispkt);
430 MEMPACKET *thispkt;
443 thispkt = sk_MEMPACKET_value(ctx->pkts, numpkts - 1);
444 if (thispkt == NULL)
447 for (rem = thispkt->len, rec = thispkt->data; rem > 0; rem -= len, rec += len) {
475 thispkt->len -= prevlen;
476 pktnum = thispkt->num;
482 thispkt = OPENSSL_malloc(sizeof(*thispkt));
483 if (thispkt == NULL) {
487 thispkt->type = INJECT_PACKET;
488 thispkt->data = tmp;
489 thispkt->len = prevlen;
490 thispkt->num = pktnum + 1;
491 if (sk_MEMPACKET_insert(ctx->pkts, thispkt, numpkts) <= 0) {
493 OPENSSL_free(thispkt);
510 MEMPACKET *thispkt;
522 thispkt = sk_MEMPACKET_value(ctx->pkts, s);
523 if (thispkt == NULL)
527 if (sk_MEMPACKET_delete(ctx->pkts, s) != thispkt)
530 thispkt->num -= (s - d);
531 if (sk_MEMPACKET_insert(ctx->pkts, thispkt, d) <= 0)
536 thispkt = sk_MEMPACKET_value(ctx->pkts, i);
537 thispkt->num++;
546 MEMPACKET *thispkt = NULL, *looppkt, *nextpkt, *allpkts[3];
577 if (!TEST_ptr(allpkts[i] = OPENSSL_malloc(sizeof(*thispkt))))
579 thispkt = allpkts[i];
581 if (!TEST_ptr(thispkt->data = OPENSSL_malloc(inl)))
591 memcpy(thispkt->data, in + len, inl - len);
592 thispkt->len = inl - len;
594 memcpy(thispkt->data, in, inl);
595 thispkt->len = inl;
597 thispkt->num = (pktnum >= 0) ? (unsigned int)pktnum : ctx->lastpkt + i;
598 thispkt->type = type;
605 if (looppkt->num > thispkt->num) {
606 if (sk_MEMPACKET_insert(ctx->pkts, thispkt, i) == 0)
625 } else if (looppkt->num == thispkt->num) {
631 thispkt->num++;
639 thispkt = allpkts[i];
640 if (!sk_MEMPACKET_push(ctx->pkts, thispkt))
664 MEMPACKET *thispkt;
680 thispkt = sk_MEMPACKET_value(ctx->pkts, 0);
681 if (thispkt == NULL)
684 ret = thispkt->len;