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) {
1118 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
1120 switch (frame->hd.type) {
1199 } else if (frame->hd.stream_id == 0) {
1246 assert(headers_frame->hd.type == NGHTTP2_HEADERS);
1248 if (headers_frame->hd.stream_id <= stream_id) {
1253 if (item->frame.hd.stream_id < stream_id) {
1259 if (item->frame.hd.stream_id > stream_id || aux_data->canceled) {
1808 * frame->hd.stream_id.
2199 if (frame->hd.length >= max_payloadlen) {
2200 return (ssize_t)frame->hd.length;
2207 nghttp2_min(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen);
2211 if (rv < (ssize_t)frame->hd.length || rv > (ssize_t)max_paddedlen) {
2216 return (ssize_t)frame->hd.length;
2234 frame->hd.length + NGHTTP2_MAX_PADLEN);
2243 padlen = (size_t)padded_payloadlen - frame->hd.length;
2248 nghttp2_frame_add_pad(framebufs, &frame->hd, padlen, 0);
2287 frame->hd.length = framelen;
2293 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
2313 switch (frame->hd.type) {
2318 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2329 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
2371 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id,
2396 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
2418 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2472 assert(session->last_sent_stream_id < frame->hd.stream_id);
2473 session->last_sent_stream_id = frame->hd.stream_id;
2499 if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
2523 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2557 if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
2577 rv = session_predicate_window_update_send(session, frame->hd.stream_id);
2603 switch (frame->hd.type) {
2605 rv = session_predicate_altsvc_send(session, frame->hd.stream_id);
2821 stream->last_writelen = stream->item->frame.hd.length;
2866 if (frame->hd.type == NGHTTP2_DATA) {
2871 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2875 session->remote_window_size -= (int32_t)frame->hd.length;
2877 stream->remote_window_size -= (int32_t)frame->hd.length;
2893 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
2925 if (frame->hd.type == NGHTTP2_HEADERS ||
2926 frame->hd.type == NGHTTP2_PUSH_PROMISE) {
2936 switch (frame->hd.type) {
2940 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
2948 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
2960 frame->hd.stream_id, &aux_data->data_prd);
2977 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
2988 frame->hd.stream_id, &aux_data->data_prd);
3007 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
3010 if (!session_detect_idle_stream(session, frame->hd.stream_id)) {
3015 session, frame->hd.stream_id, NGHTTP2_FLAG_NONE,
3036 rv = nghttp2_session_close_stream(session, frame->hd.stream_id,
3066 if (frame->hd.stream_id == 0) {
3081 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3127 if (frame->hd.type != NGHTTP2_DATA) {
3129 if (frame->hd.type == NGHTTP2_HEADERS ||
3130 frame->hd.type == NGHTTP2_PUSH_PROMISE) {
3164 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3195 length = frame->hd.length - frame->data.padlen;
3260 if (item->frame.hd.type != NGHTTP2_DATA &&
3266 if (frame->hd.type != NGHTTP2_WINDOW_UPDATE &&
3278 switch (item->frame.hd.type) {
3281 opened_stream_id = item->frame.hd.stream_id;
3325 if (item->frame.hd.type != NGHTTP2_DATA) {
3332 frame->hd.length, frame->hd.type, frame->hd.flags,
3333 frame->hd.stream_id);
3353 switch (item->frame.hd.type) {
3356 opened_stream_id = item->frame.hd.stream_id;
3444 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3461 rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id,
3588 const nghttp2_frame_hd *hd) {
3593 rv = session->callbacks.on_begin_frame_callback(session, hd,
3621 frame->hd.stream_id);
3692 session, &frame->hd, data, len, session->user_data);
3711 session, &payload, &frame->hd, session->user_data);
3803 return session_handle_invalid_stream2(session, frame->hd.stream_id, frame,
3887 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
3889 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
3954 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3961 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3972 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
3979 frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
4032 assert(frame->hd.type == NGHTTP2_HEADERS);
4046 if ((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) {
4066 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
4072 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
4081 assert(frame->hd.type == NGHTTP2_HEADERS);
4101 if (rv == 0 && (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) {
4108 if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
4111 stream_id = frame->hd.stream_id;
4120 if (frame->hd.type == NGHTTP2_HEADERS &&
4121 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) {
4135 if (frame->hd.type != NGHTTP2_HEADERS) {
4146 if (frame->hd.stream_id == 0) {
4155 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
4166 if (!session_is_new_peer_stream_id(session, frame->hd.stream_id)) {
4167 if (frame->hd.stream_id == 0 ||
4168 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4194 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
4202 session->last_recv_stream_id = frame->hd.stream_id;
4215 if (frame->headers.pri_spec.stream_id == frame->hd.stream_id) {
4226 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
4253 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id));
4254 if (frame->hd.stream_id == 0) {
4283 if (frame->hd.stream_id == 0) {
4327 if (frame->hd.stream_id == 0) {
4343 if (nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4375 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
4388 nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
4404 if (frame->hd.stream_id == 0) {
4409 if (frame->priority.pri_spec.stream_id == frame->hd.stream_id) {
4419 stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
4424 if (!session_detect_idle_stream(session, frame->hd.stream_id)) {
4429 session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
4489 if (frame->hd.stream_id == 0) {
4494 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
4499 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
4509 rv = nghttp2_session_close_stream(session, frame->hd.stream_id,
4740 if (frame->hd.stream_id != 0) {
4744 if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
4975 if (frame->hd.stream_id == 0) {
4984 if (!nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
5004 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
5010 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5067 if (frame->hd.stream_id != 0) {
5072 (frame->hd.flags & NGHTTP2_FLAG_ACK) == 0 &&
5097 if (frame->hd.stream_id != 0) {
5163 if (session_detect_idle_stream(session, frame->hd.stream_id)) {
5168 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5203 if (frame->hd.stream_id == 0) {
5229 if (frame->hd.stream_id == 0) {
5240 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5275 if (frame->hd.stream_id != 0) {
5406 stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
5415 (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)) {
5435 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
5590 * indicated by |session->iframe.frame.hd.stream_id|. If it is a
5614 stream_id = iframe->frame.hd.stream_id;
5755 nghttp2_frame_hd *hd) {
5756 if (hd->flags & NGHTTP2_FLAG_PADDED) {
5757 if (hd->length < 1) {
5779 /* We cannot use iframe->frame.hd.length because of CONTINUATION */
5919 nghttp2_frame_unpack_frame_hd(&iframe->frame.hd, iframe->sbuf.pos);
5920 iframe->payloadleft = iframe->frame.hd.length;
5923 iframe->frame.hd.length, iframe->frame.hd.type,
5924 iframe->frame.hd.flags, iframe->frame.hd.stream_id);
5926 if (iframe->frame.hd.length > session->local_settings.max_frame_size) {
5927 DEBUGF("recv: length is too large %zu > %u\n", iframe->frame.hd.length,
5940 switch (iframe->frame.hd.type) {
5944 iframe->frame.hd.flags &=
5956 iframe->frame.hd.stream_id);
5965 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
5989 iframe->frame.hd.flags &=
5993 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
6009 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags);
6028 rv = session_call_on_begin_frame(session, &iframe->frame.hd);
6049 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR);
6068 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6086 switch (iframe->frame.hd.type) {
6096 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6112 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK;
6114 if ((iframe->frame.hd.length % NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) ||
6115 ((iframe->frame.hd.flags & NGHTTP2_FLAG_ACK) &&
6124 !(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) {
6136 iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1;
6172 iframe->frame.hd.flags &=
6175 rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
6205 iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK;
6220 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6248 iframe->frame.hd.type)) {
6265 switch (iframe->frame.hd.type) {
6276 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6308 if (session->server || iframe->frame.hd.stream_id ||
6309 (iframe->frame.hd.flags & 0xf0)) {
6315 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6343 iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
6395 rv = session_call_on_begin_frame(session, &iframe->frame.hd);
6419 switch (iframe->frame.hd.type) {
6422 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) {
6423 pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags);
6464 session, iframe->frame.hd.stream_id, NGHTTP2_INTERNAL_ERROR);
6511 (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) {
6586 debuglen = iframe->frame.hd.length - 8;
6630 if (iframe->frame.hd.length > 2) {
6632 nghttp2_mem_malloc(mem, iframe->frame.hd.length - 2);
6639 iframe->frame.hd.length);
6695 final = (iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) &&
6733 iframe->frame.hd.type == NGHTTP2_PUSH_PROMISE
6735 : iframe->frame.hd.stream_id,
6767 if ((iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) == 0) {
6805 switch (iframe->frame.hd.type) {
6927 cont_hd.stream_id != iframe->frame.hd.stream_id) {
6930 iframe->frame.hd.stream_id, NGHTTP2_CONTINUATION,
6944 iframe->frame.hd.flags =
6945 (uint8_t)(iframe->frame.hd.flags |
6947 iframe->frame.hd.length += cont_hd.length;
6990 nghttp2_session_consume(session, iframe->frame.hd.stream_id, readlen);
7000 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id);
7005 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0);
7029 stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id);
7062 (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0);
7079 rv = nghttp2_session_consume(session, iframe->frame.hd.stream_id,
7111 session, iframe->frame.hd.stream_id, NGHTTP2_PROTOCOL_ERROR);
7122 session, iframe->frame.hd.flags, iframe->frame.hd.stream_id,
7668 session, frame->hd.type, stream->stream_id, session->remote_window_size,
7710 session, frame->hd.stream_id, buf->pos, datamax, &data_flags,
7732 frame->hd.flags = NGHTTP2_FLAG_NONE;
7740 frame->hd.flags |= NGHTTP2_FLAG_END_STREAM;
7753 frame->hd.length = (size_t)payloadlen;
7756 max_payloadlen = nghttp2_min(datamax, frame->hd.length + NGHTTP2_MAX_PADLEN);
7767 nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
7769 nghttp2_frame_add_pad(bufs, &frame->hd, frame->data.padlen,
7774 if (frame->hd.length == 0 && (data_flags & NGHTTP2_DATA_FLAG_EOF) &&
7815 assert(frame->hd.type == NGHTTP2_HEADERS);
7817 if (frame->hd.stream_id > stream_id ||
7823 if (item->frame.hd.stream_id < stream_id) {
7827 if (item->frame.hd.stream_id > stream_id) {
8020 nghttp2_frame_hd_init(&frame.hd, settings_payloadlen, NGHTTP2_SETTINGS,