Lines Matching refs:hd

97   if (!stream || frame->hd.type != NGHTTP2_HEADERS) {
310 iframe->frame.hd.type is 0, so that no free is performed. */
311 switch (iframe->frame.hd.type) {
348 iframe->frame.hd.type)) {
351 switch (iframe->frame.hd.type) {
1113 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
1115 switch (frame->hd.type) {
1194 } else if (frame->hd.stream_id == 0) {
1241 assert(headers_frame->hd.type == NGHTTP2_HEADERS);
1243 if (headers_frame->hd.stream_id <= stream_id) {
1248 if (item->frame.hd.stream_id < stream_id) {
1254 if (item->frame.hd.stream_id > stream_id || aux_data->canceled) {
1803 * frame->hd.stream_id.
2194 if (frame->hd.length >= max_payloadlen) {
2195 return (ssize_t)frame->hd.length;
2202 nghttp2_min(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen);
2206 if (rv < (ssize_t)frame->hd.length || rv > (ssize_t)max_paddedlen) {
2211 return (ssize_t)frame->hd.length;
2229 frame->hd.length + NGHTTP2_MAX_PADLEN);
2238 padlen = (size_t)padded_payloadlen - frame->hd.length;
2243 nghttp2_frame_add_pad(framebufs, &frame->hd, padlen, 0);
2282 frame->hd.length = framelen;
2288 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
2308 switch (frame->hd.type) {
2313 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2324 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
2366 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id,
2391 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
2413 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2467 assert(session->last_sent_stream_id < frame->hd.stream_id);
2468 session->last_sent_stream_id = frame->hd.stream_id;
2494 if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
2518 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2552 if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
2572 rv = session_predicate_window_update_send(session, frame->hd.stream_id);
2598 switch (frame->hd.type) {
2600 rv = session_predicate_altsvc_send(session, frame->hd.stream_id);
2816 stream->last_writelen = stream->item->frame.hd.length;
2861 if (frame->hd.type == NGHTTP2_DATA) {
2866 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2870 session->remote_window_size -= (int32_t)frame->hd.length;
2872 stream->remote_window_size -= (int32_t)frame->hd.length;
2888 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
2920 if (frame->hd.type == NGHTTP2_HEADERS ||
2921 frame->hd.type == NGHTTP2_PUSH_PROMISE) {
2931 switch (frame->hd.type) {
2935 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2943 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
2955 frame->hd.stream_id, &aux_data->data_prd);
2972 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
2983 frame->hd.stream_id, &aux_data->data_prd);
3002 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
3005 if (!session_detect_idle_stream(session, frame->hd.stream_id)) {
3010 session, frame->hd.stream_id, NGHTTP2_FLAG_NONE,
3031 rv = nghttp2_session_close_stream(session, frame->hd.stream_id,
3061 if (frame->hd.stream_id == 0) {
3076 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3122 if (frame->hd.type != NGHTTP2_DATA) {
3124 if (frame->hd.type == NGHTTP2_HEADERS ||
3125 frame->hd.type == NGHTTP2_PUSH_PROMISE) {
3159 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3190 length = frame->hd.length - frame->data.padlen;
3255 if (item->frame.hd.type != NGHTTP2_DATA &&
3261 if (frame->hd.type != NGHTTP2_WINDOW_UPDATE &&
3273 switch (item->frame.hd.type) {
3276 opened_stream_id = item->frame.hd.stream_id;
3320 if (item->frame.hd.type != NGHTTP2_DATA) {
3327 frame->hd.length, frame->hd.type, frame->hd.flags,
3328 frame->hd.stream_id);
3348 switch (item->frame.hd.type) {
3351 opened_stream_id = item->frame.hd.stream_id;
3439 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3456 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id,
3583 const nghttp2_frame_hd *hd) {
3588 rv = session->callbacks.on_begin_frame_callback(session, hd,
3616 frame->hd.stream_id);
3687 session, &frame->hd, data, len, session->user_data);
3706 session, &payload, &frame->hd, session->user_data);
3798 return session_handle_invalid_stream2(session, frame->hd.stream_id, frame,
3882 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3884 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
3949 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3956 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3967 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3974 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
4027 assert(frame->hd.type == NGHTTP2_HEADERS);
4041 if ((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) {
4061 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
4067 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
4076 assert(frame->hd.type == NGHTTP2_HEADERS);
4096 if (rv == 0 && (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) {
4103 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
4106 stream_id = frame->hd.stream_id;
4115 if (frame->hd.type == NGHTTP2_HEADERS &&
4116 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) {
4130 if (frame->hd.type != NGHTTP2_HEADERS) {
4141 if (frame->hd.stream_id == 0) {
4150 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
4161 if (!session_is_new_peer_stream_id(session, frame->hd.stream_id)) {
4162 if (frame->hd.stream_id == 0 ||
4163 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4189 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
4197 session->last_recv_stream_id = frame->hd.stream_id;
4210 if (frame->headers.pri_spec.stream_id == frame->hd.stream_id) {
4221 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
4248 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id));
4249 if (frame->hd.stream_id == 0) {
4278 if (frame->hd.stream_id == 0) {
4322 if (frame->hd.stream_id == 0) {
4338 if (nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4370 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
4383 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4399 if (frame->hd.stream_id == 0) {
4404 if (frame->priority.pri_spec.stream_id == frame->hd.stream_id) {
4414 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
4419 if (!session_detect_idle_stream(session, frame->hd.stream_id)) {
4424 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
4484 if (frame->hd.stream_id == 0) {
4489 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
4494 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
4504 rv = nghttp2_session_close_stream(session, frame->hd.stream_id,
4735 if (frame->hd.stream_id != 0) {
4739 if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
4970 if (frame->hd.stream_id == 0) {
4979 if (!nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4999 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
5005 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5062 if (frame->hd.stream_id != 0) {
5067 (frame->hd.flags & NGHTTP2_FLAG_ACK) == 0 &&
5092 if (frame->hd.stream_id != 0) {
5158 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
5163 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5198 if (frame->hd.stream_id == 0) {
5224 if (frame->hd.stream_id == 0) {
5235 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5270 if (frame->hd.stream_id != 0) {
5401 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5410 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) {
5430 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
5585 * indicated by |session->iframe.frame.hd.stream_id|. If it is a
5609 stream_id = iframe->frame.hd.stream_id;
5750 nghttp2_frame_hd *hd) {
5751 if (hd->flags & NGHTTP2_FLAG_PADDED) {
5752 if (hd->length < 1) {
5774 /* We cannot use iframe->frame.hd.length because of CONTINUATION */
5914 nghttp2_frame_unpack_frame_hd(&iframe->frame.hd, iframe->sbuf.pos);
5915 iframe->payloadleft = iframe->frame.hd.length;
5918 iframe->frame.hd.length, iframe->frame.hd.type,
5919 iframe->frame.hd.flags, iframe->frame.hd.stream_id);
5921 if (iframe->frame.hd.length > session->local_settings.max_frame_size) {
5922 DEBUGF("recv: length is too large %zu > %u\n", iframe->frame.hd.length,
5935 switch (iframe->frame.hd.type) {
5939 iframe->frame.hd.flags &=
5951 iframe->frame.hd.stream_id);
5960 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
5984 iframe->frame.hd.flags &=
5988 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
6004 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags);
6023 rv = session_call_on_begin_frame(session, &iframe->frame.hd);
6044 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR);
6063 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6081 switch (iframe->frame.hd.type) {
6091 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6107 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK;
6109 if ((iframe->frame.hd.length % NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) ||
6110 ((iframe->frame.hd.flags & NGHTTP2_FLAG_ACK) &&
6119 !(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) {
6131 iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1;
6167 iframe->frame.hd.flags &=
6170 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
6200 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK;
6215 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6243 iframe->frame.hd.type)) {
6260 switch (iframe->frame.hd.type) {
6271 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6303 if (session->server || iframe->frame.hd.stream_id ||
6304 (iframe->frame.hd.flags & 0xf0)) {
6310 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6338 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6390 rv = session_call_on_begin_frame(session, &iframe->frame.hd);
6414 switch (iframe->frame.hd.type) {
6417 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) {
6418 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags);
6459 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR);
6506 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) {
6581 debuglen = iframe->frame.hd.length - 8;
6625 if (iframe->frame.hd.length > 2) {
6627 nghttp2_mem_malloc(mem, iframe->frame.hd.length - 2);
6634 iframe->frame.hd.length);
6690 final = (iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) &&
6728 iframe->frame.hd.type == NGHTTP2_PUSH_PROMISE
6730 : iframe->frame.hd.stream_id,
6762 if ((iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) == 0) {
6798 switch (iframe->frame.hd.type) {
6916 cont_hd.stream_id != iframe->frame.hd.stream_id) {
6919 iframe->frame.hd.stream_id, NGHTTP2_CONTINUATION,
6933 iframe->frame.hd.flags =
6934 (uint8_t)(iframe->frame.hd.flags |
6936 iframe->frame.hd.length += cont_hd.length;
6979 nghttp2_session_consume(session, iframe->frame.hd.stream_id, readlen);
6989 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id);
6994 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0);
7018 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id);
7051 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0);
7068 rv = nghttp2_session_consume(session, iframe->frame.hd.stream_id,
7100 session, iframe->frame.hd.stream_id, NGHTTP2_PROTOCOL_ERROR);
7111 session, iframe->frame.hd.flags, iframe->frame.hd.stream_id,
7657 session, frame->hd.type, stream->stream_id, session->remote_window_size,
7699 session, frame->hd.stream_id, buf->pos, datamax, &data_flags,
7721 frame->hd.flags = NGHTTP2_FLAG_NONE;
7729 frame->hd.flags |= NGHTTP2_FLAG_END_STREAM;
7742 frame->hd.length = (size_t)payloadlen;
7745 max_payloadlen = nghttp2_min(datamax, frame->hd.length + NGHTTP2_MAX_PADLEN);
7756 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
7758 nghttp2_frame_add_pad(bufs, &frame->hd, frame->data.padlen,
7763 if (frame->hd.length == 0 && (data_flags & NGHTTP2_DATA_FLAG_EOF) &&
7804 assert(frame->hd.type == NGHTTP2_HEADERS);
7806 if (frame->hd.stream_id > stream_id ||
7812 if (item->frame.hd.stream_id < stream_id) {
7816 if (item->frame.hd.stream_id > stream_id) {
8009 nghttp2_frame_hd_init(&frame.hd, settings_payloadlen, NGHTTP2_SETTINGS,