Lines Matching refs:sub
250 static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose) in wpacket_intern_close() argument
252 size_t packlen = pkt->written - sub->pwritten; in wpacket_intern_close()
255 && (sub->flags & WPACKET_FLAGS_NON_ZERO_LENGTH) != 0) in wpacket_intern_close()
259 && sub->flags & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) { in wpacket_intern_close()
265 if ((pkt->curr - sub->lenbytes) == sub->packet_len) { in wpacket_intern_close()
266 pkt->written -= sub->lenbytes; in wpacket_intern_close()
267 pkt->curr -= sub->lenbytes; in wpacket_intern_close()
271 sub->packet_len = 0; in wpacket_intern_close()
272 sub->lenbytes = 0; in wpacket_intern_close()
276 if (sub->lenbytes > 0) { in wpacket_intern_close()
281 if ((sub->flags & WPACKET_FLAGS_QUIC_VLINT) == 0) { in wpacket_intern_close()
282 if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes)) in wpacket_intern_close()
285 if (!put_quic_value(&buf[sub->packet_len], packlen, sub->lenbytes)) in wpacket_intern_close()
289 if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes)) in wpacket_intern_close()
293 } else if (pkt->endfirst && sub->parent != NULL in wpacket_intern_close()
295 || (sub->flags in wpacket_intern_close()
312 pkt->subs = sub->parent; in wpacket_intern_close()
313 OPENSSL_free(sub); in wpacket_intern_close()
321 WPACKET_SUB *sub; in WPACKET_fill_lengths() local
326 for (sub = pkt->subs; sub != NULL; sub = sub->parent) { in WPACKET_fill_lengths()
327 if (!wpacket_intern_close(pkt, sub, 0)) in WPACKET_fill_lengths()
368 WPACKET_SUB *sub; in WPACKET_start_sub_packet_len__() local
379 if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL) in WPACKET_start_sub_packet_len__()
382 sub->parent = pkt->subs; in WPACKET_start_sub_packet_len__()
383 pkt->subs = sub; in WPACKET_start_sub_packet_len__()
384 sub->pwritten = pkt->written + lenbytes; in WPACKET_start_sub_packet_len__()
385 sub->lenbytes = lenbytes; in WPACKET_start_sub_packet_len__()
388 sub->packet_len = 0; in WPACKET_start_sub_packet_len__()
392 sub->packet_len = pkt->written; in WPACKET_start_sub_packet_len__()
420 WPACKET_SUB *sub; in WPACKET_set_max_size() local
428 for (sub = pkt->subs; sub->parent != NULL; sub = sub->parent) in WPACKET_set_max_size()
431 lenbytes = sub->lenbytes; in WPACKET_set_max_size()
528 WPACKET_SUB *sub, *parent; in WPACKET_cleanup() local
530 for (sub = pkt->subs; sub != NULL; sub = parent) { in WPACKET_cleanup()
531 parent = sub->parent; in WPACKET_cleanup()
532 OPENSSL_free(sub); in WPACKET_cleanup()