Lines Matching refs:thispkt

347     MEMPACKET *thispkt;
353 if ((thispkt = sk_MEMPACKET_value(ctx->pkts, 0)) == NULL
354 || thispkt->num != ctx->currpkt) {
362 if (outl > thispkt->len)
363 outl = thispkt->len;
365 if (thispkt->type != INJECT_PACKET_IGNORE_REC_SEQ
373 for (rem = thispkt->len, rec = thispkt->data; rem > 0; rem -= len) {
408 memcpy(out, thispkt->data, outl);
409 mempacket_free(thispkt);
420 MEMPACKET *thispkt;
433 thispkt = sk_MEMPACKET_value(ctx->pkts, numpkts - 1);
434 if (thispkt == NULL)
437 for (rem = thispkt->len, rec = thispkt->data; rem > 0; rem -= len, rec += len) {
465 thispkt->len -= prevlen;
466 pktnum = thispkt->num;
472 thispkt = OPENSSL_malloc(sizeof(*thispkt));
473 if (thispkt == NULL) {
477 thispkt->type = INJECT_PACKET;
478 thispkt->data = tmp;
479 thispkt->len = prevlen;
480 thispkt->num = pktnum + 1;
481 if (sk_MEMPACKET_insert(ctx->pkts, thispkt, numpkts) <= 0) {
483 OPENSSL_free(thispkt);
500 MEMPACKET *thispkt;
512 thispkt = sk_MEMPACKET_value(ctx->pkts, s);
513 if (thispkt == NULL)
517 if (sk_MEMPACKET_delete(ctx->pkts, s) != thispkt)
520 thispkt->num -= (s - d);
521 if (sk_MEMPACKET_insert(ctx->pkts, thispkt, d) <= 0)
526 thispkt = sk_MEMPACKET_value(ctx->pkts, i);
527 thispkt->num++;
536 MEMPACKET *thispkt = NULL, *looppkt, *nextpkt, *allpkts[3];
567 if (!TEST_ptr(allpkts[i] = OPENSSL_malloc(sizeof(*thispkt))))
569 thispkt = allpkts[i];
571 if (!TEST_ptr(thispkt->data = OPENSSL_malloc(inl)))
581 memcpy(thispkt->data, in + len, inl - len);
582 thispkt->len = inl - len;
584 memcpy(thispkt->data, in, inl);
585 thispkt->len = inl;
587 thispkt->num = (pktnum >= 0) ? (unsigned int)pktnum : ctx->lastpkt + i;
588 thispkt->type = type;
595 if (looppkt->num > thispkt->num) {
596 if (sk_MEMPACKET_insert(ctx->pkts, thispkt, i) == 0)
615 } else if (looppkt->num == thispkt->num) {
621 thispkt->num++;
629 thispkt = allpkts[i];
630 if (!sk_MEMPACKET_push(ctx->pkts, thispkt))
654 MEMPACKET *thispkt;
670 thispkt = sk_MEMPACKET_value(ctx->pkts, 0);
671 if (thispkt == NULL)
674 ret = thispkt->len;