• Home
  • Raw
  • Download

Lines Matching refs:hd

97   if (!stream || frame->hd.type != NGHTTP2_HEADERS) {  in session_trailer_headers()
311 switch (iframe->frame.hd.type) { in session_inbound_frame_reset()
348 iframe->frame.hd.type)) { in session_inbound_frame_reset()
351 switch (iframe->frame.hd.type) { in session_inbound_frame_reset()
1132 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_add_item()
1134 switch (frame->hd.type) { in nghttp2_session_add_item()
1213 } else if (frame->hd.stream_id == 0) { in nghttp2_session_add_item()
1260 assert(headers_frame->hd.type == NGHTTP2_HEADERS); in nghttp2_session_add_rst_stream()
1262 if (headers_frame->hd.stream_id <= stream_id) { in nghttp2_session_add_rst_stream()
1267 if (item->frame.hd.stream_id < stream_id) { in nghttp2_session_add_rst_stream()
1273 if (item->frame.hd.stream_id > stream_id || aux_data->canceled) { in nghttp2_session_add_rst_stream()
2217 if (frame->hd.length >= max_payloadlen) { in session_call_select_padding()
2218 return (ssize_t)frame->hd.length; in session_call_select_padding()
2225 nghttp2_min(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen); in session_call_select_padding()
2229 if (rv < (ssize_t)frame->hd.length || rv > (ssize_t)max_paddedlen) { in session_call_select_padding()
2234 return (ssize_t)frame->hd.length; in session_call_select_padding()
2253 frame->hd.length + NGHTTP2_MAX_PADLEN); in session_headers_add_pad()
2262 padlen = (size_t)padded_payloadlen - frame->hd.length; in session_headers_add_pad()
2267 rv = nghttp2_frame_add_pad(framebufs, &frame->hd, padlen, 0); in session_headers_add_pad()
2310 frame->hd.length = framelen; in session_pack_extension()
2316 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd); in session_pack_extension()
2336 switch (frame->hd.type) { in session_prep_frame()
2341 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_prep_frame()
2352 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in session_prep_frame()
2412 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id, in session_prep_frame()
2443 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE, in session_prep_frame()
2465 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_prep_frame()
2519 assert(session->last_sent_stream_id < frame->hd.stream_id); in session_prep_frame()
2520 session->last_sent_stream_id = frame->hd.stream_id; in session_prep_frame()
2546 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in session_prep_frame()
2570 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_prep_frame()
2604 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in session_prep_frame()
2624 rv = session_predicate_window_update_send(session, frame->hd.stream_id); in session_prep_frame()
2650 switch (frame->hd.type) { in session_prep_frame()
2652 rv = session_predicate_altsvc_send(session, frame->hd.stream_id); in session_prep_frame()
2868 stream->last_writelen = stream->item->frame.hd.length; in session_reschedule_stream()
2913 if (frame->hd.type == NGHTTP2_DATA) { in session_after_frame_sent1()
2918 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent1()
2922 session->remote_window_size -= (int32_t)frame->hd.length; in session_after_frame_sent1()
2924 stream->remote_window_size -= (int32_t)frame->hd.length; in session_after_frame_sent1()
2943 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in session_after_frame_sent1()
2975 if (frame->hd.type == NGHTTP2_HEADERS || in session_after_frame_sent1()
2976 frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_frame_sent1()
2986 switch (frame->hd.type) { in session_after_frame_sent1()
2990 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent1()
2998 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in session_after_frame_sent1()
3010 frame->hd.stream_id, &aux_data->data_prd); in session_after_frame_sent1()
3027 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in session_after_frame_sent1()
3038 frame->hd.stream_id, &aux_data->data_prd); in session_after_frame_sent1()
3057 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in session_after_frame_sent1()
3060 if (!session_detect_idle_stream(session, frame->hd.stream_id)) { in session_after_frame_sent1()
3065 session, frame->hd.stream_id, NGHTTP2_FLAG_NONE, in session_after_frame_sent1()
3086 rv = nghttp2_session_close_stream(session, frame->hd.stream_id, in session_after_frame_sent1()
3116 if (frame->hd.stream_id == 0) { in session_after_frame_sent1()
3131 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent1()
3186 if (frame->hd.type != NGHTTP2_DATA) { in session_after_frame_sent2()
3188 if (frame->hd.type == NGHTTP2_HEADERS || in session_after_frame_sent2()
3189 frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_frame_sent2()
3223 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_frame_sent2()
3258 length = frame->hd.length - frame->data.padlen; in session_call_send_data()
3322 if (item->frame.hd.type != NGHTTP2_DATA && in nghttp2_session_mem_send_internal()
3328 if (frame->hd.type != NGHTTP2_WINDOW_UPDATE && in nghttp2_session_mem_send_internal()
3340 switch (item->frame.hd.type) { in nghttp2_session_mem_send_internal()
3343 opened_stream_id = item->frame.hd.stream_id; in nghttp2_session_mem_send_internal()
3388 if (item->frame.hd.type != NGHTTP2_DATA) { in nghttp2_session_mem_send_internal()
3395 frame->hd.length, frame->hd.type, frame->hd.flags, in nghttp2_session_mem_send_internal()
3396 frame->hd.stream_id); in nghttp2_session_mem_send_internal()
3416 switch (item->frame.hd.type) { in nghttp2_session_mem_send_internal()
3419 opened_stream_id = item->frame.hd.stream_id; in nghttp2_session_mem_send_internal()
3512 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_mem_send_internal()
3533 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id, in nghttp2_session_mem_send_internal()
3664 const nghttp2_frame_hd *hd) { in session_call_on_begin_frame() argument
3669 rv = session->callbacks.on_begin_frame_callback(session, hd, in session_call_on_begin_frame()
3697 frame->hd.stream_id); in session_call_on_begin_headers()
3768 session, &frame->hd, data, len, session->user_data); in session_call_on_extension_chunk_recv_callback()
3787 session, &payload, &frame->hd, session->user_data); in session_call_unpack_extension_callback()
3879 return session_handle_invalid_stream2(session, frame->hd.stream_id, frame, in session_handle_invalid_stream()
3963 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in inflate_header_block()
3965 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { in inflate_header_block()
4030 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
4037 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
4048 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
4055 frame->hd.type, frame->hd.stream_id, (int)nv.name->len, in inflate_header_block()
4108 assert(frame->hd.type == NGHTTP2_HEADERS); in session_end_stream_headers_received()
4122 if ((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) { in session_end_stream_headers_received()
4142 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_after_header_block_received()
4148 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_header_block_received()
4157 assert(frame->hd.type == NGHTTP2_HEADERS); in session_after_header_block_received()
4177 if (rv == 0 && (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) { in session_after_header_block_received()
4184 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) { in session_after_header_block_received()
4187 stream_id = frame->hd.stream_id; in session_after_header_block_received()
4196 if (frame->hd.type == NGHTTP2_HEADERS && in session_after_header_block_received()
4197 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) { in session_after_header_block_received()
4211 if (frame->hd.type != NGHTTP2_HEADERS) { in session_after_header_block_received()
4222 if (frame->hd.stream_id == 0) { in nghttp2_session_on_request_headers_received()
4231 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_request_headers_received()
4242 if (!session_is_new_peer_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_request_headers_received()
4243 if (frame->hd.stream_id == 0 || in nghttp2_session_on_request_headers_received()
4244 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_request_headers_received()
4270 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in nghttp2_session_on_request_headers_received()
4278 session->last_recv_stream_id = frame->hd.stream_id; in nghttp2_session_on_request_headers_received()
4291 if (frame->headers.pri_spec.stream_id == frame->hd.stream_id) { in nghttp2_session_on_request_headers_received()
4302 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE, in nghttp2_session_on_request_headers_received()
4329 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)); in nghttp2_session_on_response_headers_received()
4330 if (frame->hd.stream_id == 0) { in nghttp2_session_on_response_headers_received()
4359 if (frame->hd.stream_id == 0) { in nghttp2_session_on_push_response_headers_received()
4403 if (frame->hd.stream_id == 0) { in nghttp2_session_on_headers_received()
4419 if (nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_headers_received()
4456 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_process_headers_frame()
4469 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in session_process_headers_frame()
4485 if (frame->hd.stream_id == 0) { in nghttp2_session_on_priority_received()
4490 if (frame->priority.pri_spec.stream_id == frame->hd.stream_id) { in nghttp2_session_on_priority_received()
4500 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id); in nghttp2_session_on_priority_received()
4505 if (!session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_priority_received()
4510 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE, in nghttp2_session_on_priority_received()
4570 if (frame->hd.stream_id == 0) { in nghttp2_session_on_rst_stream_received()
4575 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_rst_stream_received()
4580 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_rst_stream_received()
4590 rv = nghttp2_session_close_stream(session, frame->hd.stream_id, in nghttp2_session_on_rst_stream_received()
4821 if (frame->hd.stream_id != 0) { in nghttp2_session_on_settings_received()
4825 if (frame->hd.flags & NGHTTP2_FLAG_ACK) { in nghttp2_session_on_settings_received()
5056 if (frame->hd.stream_id == 0) { in nghttp2_session_on_push_promise_received()
5065 if (!nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) { in nghttp2_session_on_push_promise_received()
5085 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in nghttp2_session_on_push_promise_received()
5091 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_push_promise_received()
5154 if (frame->hd.stream_id != 0) { in nghttp2_session_on_ping_received()
5159 (frame->hd.flags & NGHTTP2_FLAG_ACK) == 0 && in nghttp2_session_on_ping_received()
5184 if (frame->hd.stream_id != 0) { in nghttp2_session_on_goaway_received()
5250 if (session_detect_idle_stream(session, frame->hd.stream_id)) { in session_on_stream_window_update_received()
5255 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in session_on_stream_window_update_received()
5290 if (frame->hd.stream_id == 0) { in nghttp2_session_on_window_update_received()
5316 if (frame->hd.stream_id == 0) { in nghttp2_session_on_altsvc_received()
5327 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_altsvc_received()
5362 if (frame->hd.stream_id != 0) { in nghttp2_session_on_priority_update_received()
5493 stream = nghttp2_session_get_stream(session, frame->hd.stream_id); in nghttp2_session_on_data_received()
5502 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) { in nghttp2_session_on_data_received()
5522 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in nghttp2_session_on_data_received()
5701 stream_id = iframe->frame.hd.stream_id; in session_on_data_received_fail_fast()
5842 nghttp2_frame_hd *hd) { in inbound_frame_handle_pad() argument
5843 if (hd->flags & NGHTTP2_FLAG_PADDED) { in inbound_frame_handle_pad()
5844 if (hd->length < 1) { in inbound_frame_handle_pad()
6006 nghttp2_frame_unpack_frame_hd(&iframe->frame.hd, iframe->sbuf.pos); in nghttp2_session_mem_recv()
6007 iframe->payloadleft = iframe->frame.hd.length; in nghttp2_session_mem_recv()
6010 iframe->frame.hd.length, iframe->frame.hd.type, in nghttp2_session_mem_recv()
6011 iframe->frame.hd.flags, iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
6013 if (iframe->frame.hd.length > session->local_settings.max_frame_size) { in nghttp2_session_mem_recv()
6014 DEBUGF("recv: length is too large %zu > %u\n", iframe->frame.hd.length, in nghttp2_session_mem_recv()
6027 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
6031 iframe->frame.hd.flags &= in nghttp2_session_mem_recv()
6043 iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
6052 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); in nghttp2_session_mem_recv()
6076 iframe->frame.hd.flags &= in nghttp2_session_mem_recv()
6080 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); in nghttp2_session_mem_recv()
6096 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags); in nghttp2_session_mem_recv()
6115 rv = session_call_on_begin_frame(session, &iframe->frame.hd); in nghttp2_session_mem_recv()
6136 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR); in nghttp2_session_mem_recv()
6155 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
6173 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
6183 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
6199 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK; in nghttp2_session_mem_recv()
6201 if ((iframe->frame.hd.length % NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) || in nghttp2_session_mem_recv()
6202 ((iframe->frame.hd.flags & NGHTTP2_FLAG_ACK) && in nghttp2_session_mem_recv()
6211 !(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) { in nghttp2_session_mem_recv()
6223 iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1; in nghttp2_session_mem_recv()
6259 iframe->frame.hd.flags &= in nghttp2_session_mem_recv()
6262 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd); in nghttp2_session_mem_recv()
6292 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK; in nghttp2_session_mem_recv()
6307 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
6335 iframe->frame.hd.type)) { in nghttp2_session_mem_recv()
6352 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
6363 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
6395 if (session->server || iframe->frame.hd.stream_id || in nghttp2_session_mem_recv()
6396 (iframe->frame.hd.flags & 0xf0)) { in nghttp2_session_mem_recv()
6402 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
6430 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_mem_recv()
6482 rv = session_call_on_begin_frame(session, &iframe->frame.hd); in nghttp2_session_mem_recv()
6506 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
6509 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) { in nghttp2_session_mem_recv()
6510 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags); in nghttp2_session_mem_recv()
6551 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR); in nghttp2_session_mem_recv()
6598 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) { in nghttp2_session_mem_recv()
6673 debuglen = iframe->frame.hd.length - 8; in nghttp2_session_mem_recv()
6717 if (iframe->frame.hd.length > 2) { in nghttp2_session_mem_recv()
6719 nghttp2_mem_malloc(mem, iframe->frame.hd.length - 2); in nghttp2_session_mem_recv()
6726 iframe->frame.hd.length); in nghttp2_session_mem_recv()
6782 final = (iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) && in nghttp2_session_mem_recv()
6820 iframe->frame.hd.type == NGHTTP2_PUSH_PROMISE in nghttp2_session_mem_recv()
6822 : iframe->frame.hd.stream_id, in nghttp2_session_mem_recv()
6854 if ((iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) == 0) { in nghttp2_session_mem_recv()
6892 switch (iframe->frame.hd.type) { in nghttp2_session_mem_recv()
7014 cont_hd.stream_id != iframe->frame.hd.stream_id) { in nghttp2_session_mem_recv()
7017 iframe->frame.hd.stream_id, NGHTTP2_CONTINUATION, in nghttp2_session_mem_recv()
7031 iframe->frame.hd.flags = in nghttp2_session_mem_recv()
7032 (uint8_t)(iframe->frame.hd.flags | in nghttp2_session_mem_recv()
7034 iframe->frame.hd.length += cont_hd.length; in nghttp2_session_mem_recv()
7077 nghttp2_session_consume(session, iframe->frame.hd.stream_id, readlen); in nghttp2_session_mem_recv()
7087 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
7092 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0); in nghttp2_session_mem_recv()
7116 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id); in nghttp2_session_mem_recv()
7149 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0); in nghttp2_session_mem_recv()
7166 rv = nghttp2_session_consume(session, iframe->frame.hd.stream_id, in nghttp2_session_mem_recv()
7198 session, iframe->frame.hd.stream_id, NGHTTP2_PROTOCOL_ERROR); in nghttp2_session_mem_recv()
7209 session, iframe->frame.hd.flags, iframe->frame.hd.stream_id, in nghttp2_session_mem_recv()
7755 session, frame->hd.type, stream->stream_id, session->remote_window_size, in nghttp2_session_pack_data()
7797 session, frame->hd.stream_id, buf->pos, datamax, &data_flags, in nghttp2_session_pack_data()
7819 frame->hd.flags = NGHTTP2_FLAG_NONE; in nghttp2_session_pack_data()
7827 frame->hd.flags |= NGHTTP2_FLAG_END_STREAM; in nghttp2_session_pack_data()
7840 frame->hd.length = (size_t)payloadlen; in nghttp2_session_pack_data()
7843 max_payloadlen = nghttp2_min(datamax, frame->hd.length + NGHTTP2_MAX_PADLEN); in nghttp2_session_pack_data()
7854 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd); in nghttp2_session_pack_data()
7856 rv = nghttp2_frame_add_pad(bufs, &frame->hd, frame->data.padlen, in nghttp2_session_pack_data()
7864 if (frame->hd.length == 0 && (data_flags & NGHTTP2_DATA_FLAG_EOF) && in nghttp2_session_pack_data()
7905 assert(frame->hd.type == NGHTTP2_HEADERS); in nghttp2_session_set_stream_user_data()
7907 if (frame->hd.stream_id > stream_id || in nghttp2_session_set_stream_user_data()
7913 if (item->frame.hd.stream_id < stream_id) { in nghttp2_session_set_stream_user_data()
7917 if (item->frame.hd.stream_id > stream_id) { in nghttp2_session_set_stream_user_data()
8110 nghttp2_frame_hd_init(&frame.hd, settings_payloadlen, NGHTTP2_SETTINGS, in nghttp2_session_upgrade_internal()