• Home
  • Raw
  • Download

Lines Matching refs:hd

95   if (!stream || frame->hd.type != NGHTTP2_HEADERS) {  in session_trailer_headers()
304 switch (iframe->frame.hd.type) { in session_inbound_frame_reset()
341 iframe->frame.hd.type)) { in session_inbound_frame_reset()
344 switch (iframe->frame.hd.type) { in session_inbound_frame_reset()
854 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_add_item()
856 switch (frame->hd.type) { in nghttp2_session_add_item()
935 } else if (frame->hd.stream_id == 0) { in nghttp2_session_add_item()
982 assert(headers_frame->hd.type == NGHTTP2_HEADERS); in nghttp2_session_add_rst_stream()
984 if (headers_frame->hd.stream_id <= stream_id) { in nghttp2_session_add_rst_stream()
989 if (item->frame.hd.stream_id < stream_id) { in nghttp2_session_add_rst_stream()
995 if (item->frame.hd.stream_id > stream_id || aux_data->canceled) { in nghttp2_session_add_rst_stream()
1877 if (frame->hd.length >= max_payloadlen) { in session_call_select_padding()
1878 return (ssize_t)frame->hd.length; in session_call_select_padding()
1885 nghttp2_min(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen); in session_call_select_padding()
1889 if (rv < (ssize_t)frame->hd.length || rv > (ssize_t)max_paddedlen) { in session_call_select_padding()
1894 return (ssize_t)frame->hd.length; in session_call_select_padding()
1913 frame->hd.length + NGHTTP2_MAX_PADLEN); in session_headers_add_pad()
1922 padlen = (size_t)padded_payloadlen - frame->hd.length; in session_headers_add_pad()
1927 rv = nghttp2_frame_add_pad(framebufs, &frame->hd, padlen, 0); in session_headers_add_pad()
1970 frame->hd.length = framelen; in session_pack_extension()
1976 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd); in session_pack_extension()
1996 switch (frame->hd.type) { in session_prep_frame()
2001 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_prep_frame()
2012 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in session_prep_frame()
2071 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id, in session_prep_frame()
2102 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE, in session_prep_frame()
2124 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_prep_frame()
2178 assert(session->last_sent_stream_id < frame->hd.stream_id); in session_prep_frame()
2179 session->last_sent_stream_id = frame->hd.stream_id; in session_prep_frame()
2205 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in session_prep_frame()
2229 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_prep_frame()
2263 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in session_prep_frame()
2283 rv = session_predicate_window_update_send(session, frame->hd.stream_id); in session_prep_frame()
2309 switch (frame->hd.type) { in session_prep_frame()
2311 rv = session_predicate_altsvc_send(session, frame->hd.stream_id); in session_prep_frame()
2502 stream->last_writelen = stream->item->frame.hd.length; in reschedule_stream()
2538 if (frame->hd.type == NGHTTP2_DATA) { in session_after_frame_sent1()
2543 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent1()
2547 session->remote_window_size -= (int32_t)frame->hd.length; in session_after_frame_sent1()
2549 stream->remote_window_size -= (int32_t)frame->hd.length; in session_after_frame_sent1()
2568 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in session_after_frame_sent1()
2600 if (frame->hd.type == NGHTTP2_HEADERS || in session_after_frame_sent1()
2601 frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_frame_sent1()
2611 switch (frame->hd.type) { in session_after_frame_sent1()
2615 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent1()
2623 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in session_after_frame_sent1()
2635 frame->hd.stream_id, &aux_data->data_prd); in session_after_frame_sent1()
2652 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in session_after_frame_sent1()
2663 frame->hd.stream_id, &aux_data->data_prd); in session_after_frame_sent1()
2683 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in session_after_frame_sent1()
2686 if (!session_detect_idle_stream(session, frame->hd.stream_id)) { in session_after_frame_sent1()
2691 session, frame->hd.stream_id, NGHTTP2_FLAG_NONE, in session_after_frame_sent1()
2712 rv = nghttp2_session_close_stream(session, frame->hd.stream_id, in session_after_frame_sent1()
2742 if (frame->hd.stream_id == 0) { in session_after_frame_sent1()
2757 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent1()
2812 if (frame->hd.type != NGHTTP2_DATA) { in session_after_frame_sent2()
2814 if (frame->hd.type == NGHTTP2_HEADERS || in session_after_frame_sent2()
2815 frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_frame_sent2()
2849 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent2()
2884 length = frame->hd.length - frame->data.padlen; in session_call_send_data()
2948 if (item->frame.hd.type != NGHTTP2_DATA && in nghttp2_session_mem_send_internal()
2954 if (frame->hd.type != NGHTTP2_WINDOW_UPDATE && in nghttp2_session_mem_send_internal()
2966 switch (item->frame.hd.type) { in nghttp2_session_mem_send_internal()
2969 opened_stream_id = item->frame.hd.stream_id; in nghttp2_session_mem_send_internal()
3014 if (item->frame.hd.type != NGHTTP2_DATA) { in nghttp2_session_mem_send_internal()
3021 frame->hd.length, frame->hd.type, frame->hd.flags, in nghttp2_session_mem_send_internal()
3022 frame->hd.stream_id); in nghttp2_session_mem_send_internal()
3042 switch (item->frame.hd.type) { in nghttp2_session_mem_send_internal()
3045 opened_stream_id = item->frame.hd.stream_id; in nghttp2_session_mem_send_internal()
3138 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_mem_send_internal()
3159 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id, in nghttp2_session_mem_send_internal()
3290 const nghttp2_frame_hd *hd) { in session_call_on_begin_frame() argument
3295 rv = session->callbacks.on_begin_frame_callback(session, hd, in session_call_on_begin_frame()
3323 frame->hd.stream_id); in session_call_on_begin_headers()
3394 session, &frame->hd, data, len, session->user_data); in session_call_on_extension_chunk_recv_callback()
3413 session, &payload, &frame->hd, session->user_data); in session_call_unpack_extension_callback()
3505 return session_handle_invalid_stream2(session, frame->hd.stream_id, frame, in session_handle_invalid_stream()
3589 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in inflate_header_block()
3591 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { in inflate_header_block()
3656 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
3663 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
3674 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
3681 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
3733 if ((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) { in session_end_stream_headers_received()
3753 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_header_block_received()
3759 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_header_block_received()
3768 assert(frame->hd.type == NGHTTP2_HEADERS); in session_after_header_block_received()
3788 if (rv == 0 && (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) { in session_after_header_block_received()
3795 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_header_block_received()
3798 stream_id = frame->hd.stream_id; in session_after_header_block_received()
3807 if (frame->hd.type == NGHTTP2_HEADERS && in session_after_header_block_received()
3808 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) { in session_after_header_block_received()
3822 if (frame->hd.type != NGHTTP2_HEADERS) { in session_after_header_block_received()
3833 if (frame->hd.stream_id == 0) { in nghttp2_session_on_request_headers_received()
3842 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_request_headers_received()
3853 if (!session_is_new_peer_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_request_headers_received()
3854 if (frame->hd.stream_id == 0 || in nghttp2_session_on_request_headers_received()
3855 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_request_headers_received()
3881 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in nghttp2_session_on_request_headers_received()
3889 session->last_recv_stream_id = frame->hd.stream_id; in nghttp2_session_on_request_headers_received()
3902 if (frame->headers.pri_spec.stream_id == frame->hd.stream_id) { in nghttp2_session_on_request_headers_received()
3913 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE, in nghttp2_session_on_request_headers_received()
3940 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)); in nghttp2_session_on_response_headers_received()
3941 if (frame->hd.stream_id == 0) { in nghttp2_session_on_response_headers_received()
3970 if (frame->hd.stream_id == 0) { in nghttp2_session_on_push_response_headers_received()
4014 if (frame->hd.stream_id == 0) { in nghttp2_session_on_headers_received()
4030 if (nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_headers_received()
4067 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_process_headers_frame()
4080 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in session_process_headers_frame()
4094 if (frame->hd.stream_id == 0) { in nghttp2_session_on_priority_received()
4099 if (frame->priority.pri_spec.stream_id == frame->hd.stream_id) { in nghttp2_session_on_priority_received()
4109 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in nghttp2_session_on_priority_received()
4114 if (!session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_priority_received()
4119 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE, in nghttp2_session_on_priority_received()
4160 if (frame->hd.stream_id == 0) { in nghttp2_session_on_rst_stream_received()
4165 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_rst_stream_received()
4170 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_rst_stream_received()
4180 rv = nghttp2_session_close_stream(session, frame->hd.stream_id, in nghttp2_session_on_rst_stream_received()
4402 if (frame->hd.stream_id != 0) { in nghttp2_session_on_settings_received()
4406 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in nghttp2_session_on_settings_received()
4609 if (frame->hd.stream_id == 0) { in nghttp2_session_on_push_promise_received()
4618 if (!nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_push_promise_received()
4638 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_push_promise_received()
4644 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_push_promise_received()
4707 if (frame->hd.stream_id != 0) { in nghttp2_session_on_ping_received()
4712 (frame->hd.flags & NGHTTP2_FLAG_ACK) == 0 && in nghttp2_session_on_ping_received()
4737 if (frame->hd.stream_id != 0) { in nghttp2_session_on_goaway_received()
4803 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in session_on_stream_window_update_received()
4808 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_on_stream_window_update_received()
4843 if (frame->hd.stream_id == 0) { in nghttp2_session_on_window_update_received()
4869 if (frame->hd.stream_id == 0) { in nghttp2_session_on_altsvc_received()
4880 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_altsvc_received()
4962 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_data_received()
4971 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) { in nghttp2_session_on_data_received()
4991 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in nghttp2_session_on_data_received()
5170 stream_id = iframe->frame.hd.stream_id; in session_on_data_received_fail_fast()
5310 nghttp2_frame_hd *hd) { in inbound_frame_handle_pad() argument
5311 if (hd->flags & NGHTTP2_FLAG_PADDED) { in inbound_frame_handle_pad()
5312 if (hd->length < 1) { in inbound_frame_handle_pad()
5474 nghttp2_frame_unpack_frame_hd(&iframe->frame.hd, iframe->sbuf.pos); in nghttp2_session_mem_recv()
5475 iframe->payloadleft = iframe->frame.hd.length; in nghttp2_session_mem_recv()
5478 iframe->frame.hd.length, iframe->frame.hd.type, in nghttp2_session_mem_recv()
5479 iframe->frame.hd.flags, iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
5481 if (iframe->frame.hd.length > session->local_settings.max_frame_size) { in nghttp2_session_mem_recv()
5482 DEBUGF("recv: length is too large %zu > %u\n", iframe->frame.hd.length, in nghttp2_session_mem_recv()
5495 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
5499 iframe->frame.hd.flags &= in nghttp2_session_mem_recv()
5511 iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
5520 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); in nghttp2_session_mem_recv()
5544 iframe->frame.hd.flags &= in nghttp2_session_mem_recv()
5548 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); in nghttp2_session_mem_recv()
5564 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags); in nghttp2_session_mem_recv()
5583 rv = session_call_on_begin_frame(session, &iframe->frame.hd); in nghttp2_session_mem_recv()
5604 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR); in nghttp2_session_mem_recv()
5623 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
5641 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
5651 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
5667 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK; in nghttp2_session_mem_recv()
5669 if ((iframe->frame.hd.length % NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) || in nghttp2_session_mem_recv()
5670 ((iframe->frame.hd.flags & NGHTTP2_FLAG_ACK) && in nghttp2_session_mem_recv()
5679 !(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) { in nghttp2_session_mem_recv()
5691 iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1; in nghttp2_session_mem_recv()
5727 iframe->frame.hd.flags &= in nghttp2_session_mem_recv()
5730 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); in nghttp2_session_mem_recv()
5760 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK; in nghttp2_session_mem_recv()
5775 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
5803 iframe->frame.hd.type)) { in nghttp2_session_mem_recv()
5820 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
5831 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
5863 if (session->server || iframe->frame.hd.stream_id || in nghttp2_session_mem_recv()
5864 (iframe->frame.hd.flags & 0xf0)) { in nghttp2_session_mem_recv()
5870 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
5907 rv = session_call_on_begin_frame(session, &iframe->frame.hd); in nghttp2_session_mem_recv()
5931 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
5934 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) { in nghttp2_session_mem_recv()
5935 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags); in nghttp2_session_mem_recv()
5976 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR); in nghttp2_session_mem_recv()
6020 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) { in nghttp2_session_mem_recv()
6095 debuglen = iframe->frame.hd.length - 8; in nghttp2_session_mem_recv()
6139 if (iframe->frame.hd.length > 2) { in nghttp2_session_mem_recv()
6141 nghttp2_mem_malloc(mem, iframe->frame.hd.length - 2); in nghttp2_session_mem_recv()
6148 iframe->frame.hd.length); in nghttp2_session_mem_recv()
6192 final = (iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) && in nghttp2_session_mem_recv()
6230 iframe->frame.hd.type == NGHTTP2_PUSH_PROMISE in nghttp2_session_mem_recv()
6232 : iframe->frame.hd.stream_id, in nghttp2_session_mem_recv()
6264 if ((iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) == 0) { in nghttp2_session_mem_recv()
6300 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
6418 cont_hd.stream_id != iframe->frame.hd.stream_id) { in nghttp2_session_mem_recv()
6421 iframe->frame.hd.stream_id, NGHTTP2_CONTINUATION, in nghttp2_session_mem_recv()
6435 iframe->frame.hd.flags = (uint8_t)( in nghttp2_session_mem_recv()
6436 iframe->frame.hd.flags | (cont_hd.flags & NGHTTP2_FLAG_END_HEADERS)); in nghttp2_session_mem_recv()
6437 iframe->frame.hd.length += cont_hd.length; in nghttp2_session_mem_recv()
6480 nghttp2_session_consume(session, iframe->frame.hd.stream_id, readlen); in nghttp2_session_mem_recv()
6490 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
6495 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0); in nghttp2_session_mem_recv()
6519 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
6552 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0); in nghttp2_session_mem_recv()
6569 rv = nghttp2_session_consume(session, iframe->frame.hd.stream_id, in nghttp2_session_mem_recv()
6601 session, iframe->frame.hd.stream_id, NGHTTP2_PROTOCOL_ERROR); in nghttp2_session_mem_recv()
6612 session, iframe->frame.hd.flags, iframe->frame.hd.stream_id, in nghttp2_session_mem_recv()
7132 session, frame->hd.type, stream->stream_id, session->remote_window_size, in nghttp2_session_pack_data()
7174 session, frame->hd.stream_id, buf->pos, datamax, &data_flags, in nghttp2_session_pack_data()
7196 frame->hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_pack_data()
7204 frame->hd.flags |= NGHTTP2_FLAG_END_STREAM; in nghttp2_session_pack_data()
7217 frame->hd.length = (size_t)payloadlen; in nghttp2_session_pack_data()
7220 max_payloadlen = nghttp2_min(datamax, frame->hd.length + NGHTTP2_MAX_PADLEN); in nghttp2_session_pack_data()
7231 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd); in nghttp2_session_pack_data()
7233 rv = nghttp2_frame_add_pad(bufs, &frame->hd, frame->data.padlen, in nghttp2_session_pack_data()
7241 if (frame->hd.length == 0 && (data_flags & NGHTTP2_DATA_FLAG_EOF) && in nghttp2_session_pack_data()
7282 assert(frame->hd.type == NGHTTP2_HEADERS); in nghttp2_session_set_stream_user_data()
7284 if (frame->hd.stream_id > stream_id || in nghttp2_session_set_stream_user_data()
7290 if (item->frame.hd.stream_id < stream_id) { in nghttp2_session_set_stream_user_data()
7294 if (item->frame.hd.stream_id > stream_id) { in nghttp2_session_set_stream_user_data()
7483 nghttp2_frame_hd_init(&frame.hd, settings_payloadlen, NGHTTP2_SETTINGS, in nghttp2_session_upgrade_internal()