GRPC Core 0.10.0.0

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
internal.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright 2015, Google Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following disclaimer
14 * in the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Google Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
34 #ifndef GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H
35 #define GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H
36
37 #include "src/core/iomgr/endpoint.h"
38 #include "src/core/transport/chttp2/frame.h"
39 #include "src/core/transport/chttp2/frame_data.h"
40 #include "src/core/transport/chttp2/frame_goaway.h"
41 #include "src/core/transport/chttp2/frame_ping.h"
42 #include "src/core/transport/chttp2/frame_rst_stream.h"
43 #include "src/core/transport/chttp2/frame_settings.h"
44 #include "src/core/transport/chttp2/frame_window_update.h"
45 #include "src/core/transport/chttp2/hpack_parser.h"
46 #include "src/core/transport/chttp2/incoming_metadata.h"
47 #include "src/core/transport/chttp2/stream_encoder.h"
48 #include "src/core/transport/chttp2/stream_map.h"
49 #include "src/core/transport/connectivity_state.h"
50 #include "src/core/transport/transport_impl.h"
51
52 typedef struct grpc_chttp2_transport grpc_chttp2_transport;
53 typedef struct grpc_chttp2_stream grpc_chttp2_stream;
54
55 /* streams are kept in various linked lists depending on what things need to
56 happen to them... this enum labels each list */
57 typedef enum {
58 GRPC_CHTTP2_LIST_ALL_STREAMS,
59 GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED,
60 GRPC_CHTTP2_LIST_WRITABLE,
61 GRPC_CHTTP2_LIST_WRITING,
62 GRPC_CHTTP2_LIST_WRITTEN,
63 GRPC_CHTTP2_LIST_PARSING_SEEN,
64 GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING,
65 GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_WRITING,
66 GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED,
69 GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY,
70 STREAM_LIST_COUNT /* must be last */
71 } grpc_chttp2_stream_list_id;
72
73 /* deframer state for the overall http2 stream of bytes */
74 typedef enum {
75 /* prefix: one entry per http2 connection prefix byte */
76 GRPC_DTS_CLIENT_PREFIX_0 = 0,
77 GRPC_DTS_CLIENT_PREFIX_1,
78 GRPC_DTS_CLIENT_PREFIX_2,
79 GRPC_DTS_CLIENT_PREFIX_3,
80 GRPC_DTS_CLIENT_PREFIX_4,
81 GRPC_DTS_CLIENT_PREFIX_5,
82 GRPC_DTS_CLIENT_PREFIX_6,
83 GRPC_DTS_CLIENT_PREFIX_7,
84 GRPC_DTS_CLIENT_PREFIX_8,
85 GRPC_DTS_CLIENT_PREFIX_9,
86 GRPC_DTS_CLIENT_PREFIX_10,
87 GRPC_DTS_CLIENT_PREFIX_11,
88 GRPC_DTS_CLIENT_PREFIX_12,
89 GRPC_DTS_CLIENT_PREFIX_13,
90 GRPC_DTS_CLIENT_PREFIX_14,
91 GRPC_DTS_CLIENT_PREFIX_15,
92 GRPC_DTS_CLIENT_PREFIX_16,
93 GRPC_DTS_CLIENT_PREFIX_17,
94 GRPC_DTS_CLIENT_PREFIX_18,
95 GRPC_DTS_CLIENT_PREFIX_19,
96 GRPC_DTS_CLIENT_PREFIX_20,
97 GRPC_DTS_CLIENT_PREFIX_21,
98 GRPC_DTS_CLIENT_PREFIX_22,
99 GRPC_DTS_CLIENT_PREFIX_23,
100 /* frame header byte 0... */
101 /* must follow from the prefix states */
102 GRPC_DTS_FH_0,
103 GRPC_DTS_FH_1,
104 GRPC_DTS_FH_2,
105 GRPC_DTS_FH_3,
106 GRPC_DTS_FH_4,
107 GRPC_DTS_FH_5,
108 GRPC_DTS_FH_6,
109 GRPC_DTS_FH_7,
110 /* ... frame header byte 8 */
111 GRPC_DTS_FH_8,
112 /* inside a http2 frame */
113 GRPC_DTS_FRAME
114 } grpc_chttp2_deframe_transport_state;
115
116 typedef enum {
117 GRPC_WRITE_STATE_OPEN,
118 GRPC_WRITE_STATE_QUEUED_CLOSE,
119 GRPC_WRITE_STATE_SENT_CLOSE
120 } grpc_chttp2_write_state;
121
122 typedef enum {
123 GRPC_DONT_SEND_CLOSED = 0,
124 GRPC_SEND_CLOSED,
125 GRPC_SEND_CLOSED_WITH_RST_STREAM
126 } grpc_chttp2_send_closed;
127
128 typedef struct {
129 grpc_chttp2_stream *head;
130 grpc_chttp2_stream *tail;
131 } grpc_chttp2_stream_list;
132
133 typedef struct {
134 grpc_chttp2_stream *next;
135 grpc_chttp2_stream *prev;
136 } grpc_chttp2_stream_link;
137
138 /* We keep several sets of connection wide parameters */
139 typedef enum {
140 /* The settings our peer has asked for (and we have acked) */
141 GRPC_PEER_SETTINGS = 0,
142 /* The settings we'd like to have */
143 GRPC_LOCAL_SETTINGS,
144 /* The settings we've published to our peer */
145 GRPC_SENT_SETTINGS,
146 /* The settings the peer has acked */
147 GRPC_ACKED_SETTINGS,
148 GRPC_NUM_SETTING_SETS
149 } grpc_chttp2_setting_set;
150
151 /* Outstanding ping request data */
152 typedef struct grpc_chttp2_outstanding_ping {
153 gpr_uint8 id[8];
154 grpc_iomgr_closure *on_recv;
155 struct grpc_chttp2_outstanding_ping *next;
156 struct grpc_chttp2_outstanding_ping *prev;
157 } grpc_chttp2_outstanding_ping;
158
159 typedef struct {
161 gpr_slice_buffer qbuf;
163 grpc_iomgr_closure *pending_closures_head;
164 grpc_iomgr_closure *pending_closures_tail;
165
167 gpr_uint32 outgoing_window;
169 gpr_uint32 incoming_window;
171 gpr_uint32 connection_window_target;
172
174 gpr_uint8 seen_goaway;
176 gpr_uint8 sent_goaway;
177
179 gpr_uint8 is_client;
181 gpr_uint8 dirtied_local_settings;
183 gpr_uint8 sent_local_settings;
185 gpr_uint32 force_send_settings;
187 gpr_uint32 settings[GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS];
188
191 gpr_uint32 next_stream_id;
192
194 gpr_uint32 last_incoming_stream_id;
195
197 grpc_chttp2_outstanding_ping pings;
199 gpr_uint64 ping_counter;
200
203 gpr_uint32 concurrent_stream_count;
204 } grpc_chttp2_transport_global;
205
206 typedef struct {
208 gpr_slice_buffer outbuf;
210 grpc_chttp2_hpack_compressor hpack_compressor;
212 gpr_uint8 is_client;
213 } grpc_chttp2_transport_writing;
214
215 struct grpc_chttp2_transport_parsing {
217 gpr_uint8 is_client;
218
220 gpr_uint8 settings_updated;
222 gpr_uint8 settings_ack_received;
224 gpr_uint8 goaway_received;
225
227 gpr_int64 initial_window_update;
228
230 gpr_slice_buffer qbuf;
231 /* metadata object cache */
232 grpc_mdstr *str_grpc_timeout;
234 grpc_chttp2_hpack_parser hpack_parser;
236 union {
237 grpc_chttp2_window_update_parser window_update;
238 grpc_chttp2_settings_parser settings;
239 grpc_chttp2_ping_parser ping;
240 grpc_chttp2_rst_stream_parser rst_stream;
241 } simple;
243 grpc_chttp2_goaway_parser goaway_parser;
244
246 gpr_uint32 incoming_window;
247 gpr_uint32 incoming_window_delta;
248
250 gpr_uint32 next_stream_id;
251 gpr_uint32 last_incoming_stream_id;
252
253 /* deframing */
254 grpc_chttp2_deframe_transport_state deframe_state;
255 gpr_uint8 incoming_frame_type;
256 gpr_uint8 incoming_frame_flags;
257 gpr_uint8 header_eof;
258 gpr_uint32 expect_continuation_stream_id;
259 gpr_uint32 incoming_frame_size;
260 gpr_uint32 incoming_stream_id;
261
262 /* active parser */
263 void *parser_data;
264 grpc_chttp2_stream_parsing *incoming_stream;
265 grpc_chttp2_parse_error (*parser)(
266 void *parser_user_data, grpc_chttp2_transport_parsing *transport_parsing,
267 grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last);
268
269 /* received settings */
270 gpr_uint32 settings[GRPC_CHTTP2_NUM_SETTINGS];
271
272 /* goaway data */
273 grpc_status_code goaway_error;
274 gpr_uint32 goaway_last_stream_index;
275 gpr_slice goaway_text;
276
277 gpr_uint64 outgoing_window_update;
278
280 grpc_chttp2_outstanding_ping pings;
281 };
282
283 struct grpc_chttp2_transport {
284 grpc_transport base; /* must be first */
285 grpc_endpoint *ep;
286 grpc_mdctx *metadata_context;
287 gpr_refcount refs;
288 char *peer_string;
289
290 gpr_mu mu;
291
293 gpr_uint8 destroying;
295 gpr_uint8 closed;
296
298 gpr_uint8 writing_active;
300 gpr_uint8 parsing_active;
301
303 gpr_uint8 endpoint_reading;
304
306 grpc_chttp2_stream_list lists[STREAM_LIST_COUNT];
307
309 grpc_chttp2_transport_global global;
312 grpc_chttp2_transport_writing writing;
315 grpc_chttp2_transport_parsing parsing;
316
319 grpc_chttp2_stream_map parsing_stream_map;
320
324 grpc_chttp2_stream_map new_stream_map;
325
327 grpc_iomgr_closure writing_action;
329 grpc_iomgr_closure reading_action;
330
334 grpc_chttp2_stream **accepting_stream;
335
336 struct {
337 /* accept stream callback */
338 void (*accept_stream)(void *user_data, grpc_transport *transport,
339 const void *server_data);
340 void *accept_stream_user_data;
341
343 grpc_connectivity_state_tracker state_tracker;
344 } channel_callback;
345 };
346
347 typedef struct {
349 gpr_uint32 id;
350
351 grpc_iomgr_closure *send_done_closure;
352 grpc_iomgr_closure *recv_done_closure;
353
355 gpr_int64 outgoing_window;
359 gpr_uint32 max_recv_bytes;
364 gpr_uint32 unannounced_incoming_window;
369 gpr_uint32 incoming_window;
371 grpc_stream_op_buffer *outgoing_sopb;
375 grpc_chttp2_write_state write_state;
377 gpr_uint8 read_closed;
379 gpr_uint8 cancelled;
380 grpc_status_code cancelled_status;
382 gpr_uint8 published_cancelled;
384 gpr_uint8 in_stream_map;
386 gpr_uint8 writing_now;
387
389 grpc_stream_state published_state;
391 grpc_stream_state *publish_state;
393 grpc_stream_op_buffer *publish_sopb;
394 grpc_stream_op_buffer incoming_sopb;
395
397 grpc_chttp2_incoming_metadata_buffer incoming_metadata;
398 grpc_chttp2_incoming_metadata_live_op_buffer outstanding_metadata;
399 } grpc_chttp2_stream_global;
400
401 typedef struct {
403 gpr_uint32 id;
405 grpc_stream_op_buffer sopb;
407 grpc_chttp2_send_closed send_closed;
409 gpr_uint32 announce_window;
410 } grpc_chttp2_stream_writing;
411
412 struct grpc_chttp2_stream_parsing {
414 gpr_uint32 id;
416 gpr_uint8 received_close;
418 gpr_uint8 saw_rst_stream;
420 gpr_uint32 incoming_window_delta;
422 gpr_uint32 incoming_window;
424 grpc_chttp2_data_parser data_parser;
426 gpr_uint32 rst_stream_reason;
427 /* amount of window given */
428 gpr_uint64 outgoing_window_update;
429
431 grpc_chttp2_incoming_metadata_buffer incoming_metadata;
432 };
433
434 struct grpc_chttp2_stream {
435 grpc_chttp2_stream_global global;
436 grpc_chttp2_stream_writing writing;
437 grpc_chttp2_stream_parsing parsing;
438
439 grpc_chttp2_stream_link links[STREAM_LIST_COUNT];
440 gpr_uint8 included[STREAM_LIST_COUNT];
441 };
442
456 int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global,
457 grpc_chttp2_transport_writing *writing);
458 void grpc_chttp2_perform_writes(
459 grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint);
460 void grpc_chttp2_terminate_writing(
461 grpc_chttp2_transport_writing *transport_writing, int success);
462 void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global,
463 grpc_chttp2_transport_writing *writing);
464
465 void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global,
466 grpc_chttp2_transport_parsing *parsing);
469 int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing,
470 gpr_slice slice);
471 void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global,
472 grpc_chttp2_transport_parsing *parsing);
473
476 void grpc_chttp2_list_add_writable_stream(
477 grpc_chttp2_transport_global *transport_global,
478 grpc_chttp2_stream_global *stream_global);
479 void grpc_chttp2_list_add_first_writable_stream(
480 grpc_chttp2_transport_global *transport_global,
481 grpc_chttp2_stream_global *stream_global);
482 int grpc_chttp2_list_pop_writable_stream(
483 grpc_chttp2_transport_global *transport_global,
484 grpc_chttp2_transport_writing *transport_writing,
485 grpc_chttp2_stream_global **stream_global,
486 grpc_chttp2_stream_writing **stream_writing);
487 void grpc_chttp2_list_remove_writable_stream(
488 grpc_chttp2_transport_global *transport_global,
489 grpc_chttp2_stream_global *stream_global);
490
491 void grpc_chttp2_list_add_incoming_window_updated(
492 grpc_chttp2_transport_global *transport_global,
493 grpc_chttp2_stream_global *stream_global);
494 int grpc_chttp2_list_pop_incoming_window_updated(
495 grpc_chttp2_transport_global *transport_global,
496 grpc_chttp2_transport_parsing *transport_parsing,
497 grpc_chttp2_stream_global **stream_global,
498 grpc_chttp2_stream_parsing **stream_parsing);
499 void grpc_chttp2_list_remove_incoming_window_updated(
500 grpc_chttp2_transport_global *transport_global,
501 grpc_chttp2_stream_global *stream_global);
502
503 void grpc_chttp2_list_add_writing_stream(
504 grpc_chttp2_transport_writing *transport_writing,
505 grpc_chttp2_stream_writing *stream_writing);
506 int grpc_chttp2_list_have_writing_streams(
507 grpc_chttp2_transport_writing *transport_writing);
508 int grpc_chttp2_list_pop_writing_stream(
509 grpc_chttp2_transport_writing *transport_writing,
510 grpc_chttp2_stream_writing **stream_writing);
511
512 void grpc_chttp2_list_add_written_stream(
513 grpc_chttp2_transport_writing *transport_writing,
514 grpc_chttp2_stream_writing *stream_writing);
515 int grpc_chttp2_list_pop_written_stream(
516 grpc_chttp2_transport_global *transport_global,
517 grpc_chttp2_transport_writing *transport_writing,
518 grpc_chttp2_stream_global **stream_global,
519 grpc_chttp2_stream_writing **stream_writing);
520
521 void grpc_chttp2_list_add_parsing_seen_stream(
522 grpc_chttp2_transport_parsing *transport_parsing,
523 grpc_chttp2_stream_parsing *stream_parsing);
524 int grpc_chttp2_list_pop_parsing_seen_stream(
525 grpc_chttp2_transport_global *transport_global,
526 grpc_chttp2_transport_parsing *transport_parsing,
527 grpc_chttp2_stream_global **stream_global,
528 grpc_chttp2_stream_parsing **stream_parsing);
529
530 void grpc_chttp2_list_add_waiting_for_concurrency(
531 grpc_chttp2_transport_global *transport_global,
532 grpc_chttp2_stream_global *stream_global);
533 int grpc_chttp2_list_pop_waiting_for_concurrency(
534 grpc_chttp2_transport_global *transport_global,
535 grpc_chttp2_stream_global **stream_global);
536
537 void grpc_chttp2_list_add_closed_waiting_for_parsing(
538 grpc_chttp2_transport_global *transport_global,
539 grpc_chttp2_stream_global *stream_global);
540 int grpc_chttp2_list_pop_closed_waiting_for_parsing(
541 grpc_chttp2_transport_global *transport_global,
542 grpc_chttp2_stream_global **stream_global);
543
544 void grpc_chttp2_list_add_cancelled_waiting_for_writing(
545 grpc_chttp2_transport_global *transport_global,
546 grpc_chttp2_stream_global *stream_global);
547 int grpc_chttp2_list_pop_cancelled_waiting_for_writing(
548 grpc_chttp2_transport_global *transport_global,
549 grpc_chttp2_stream_global **stream_global);
550
551 void grpc_chttp2_list_add_read_write_state_changed(
552 grpc_chttp2_transport_global *transport_global,
553 grpc_chttp2_stream_global *stream_global);
554 int grpc_chttp2_list_pop_read_write_state_changed(
555 grpc_chttp2_transport_global *transport_global,
556 grpc_chttp2_stream_global **stream_global);
557
559 void grpc_chttp2_schedule_closure(
560 grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure,
561 int success);
562
563 grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream(
564 grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id);
565 grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream(
566 grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id);
567
568 void grpc_chttp2_add_incoming_goaway(
569 grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error,
570 gpr_slice goaway_text);
571
572 void grpc_chttp2_register_stream(grpc_chttp2_transport *t,
573 grpc_chttp2_stream *s);
574 /* returns 1 if this is the last stream, 0 otherwise */
575 int grpc_chttp2_unregister_stream(grpc_chttp2_transport *t,
576 grpc_chttp2_stream *s) GRPC_MUST_USE_RESULT;
577 int grpc_chttp2_has_streams(grpc_chttp2_transport *t);
578 void grpc_chttp2_for_all_streams(
579 grpc_chttp2_transport_global *transport_global, void *user_data,
580 void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data,
581 grpc_chttp2_stream_global *stream_global));
582
583 void grpc_chttp2_parsing_become_skip_parser(
584 grpc_chttp2_transport_parsing *transport_parsing);
585
586 #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
587 #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \
588 (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1)
589
590 extern int grpc_http_trace;
591 extern int grpc_flowctl_trace;
592
593 #define GRPC_CHTTP2_IF_TRACING(stmt) \
594 if (!(grpc_http_trace)) \
595 ; \
596 else \
597 stmt
598
599 #define GRPC_CHTTP2_FLOWCTL_TRACE_STREAM(reason, transport, context, var, \
600 delta) \
601 if (!(grpc_flowctl_trace)) { \
602 } else { \
603 grpc_chttp2_flowctl_trace(__FILE__, __LINE__, reason, #context, #var, \
604 transport->is_client, context->id, context->var, \
605 delta); \
606 }
607
608 #define GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT(reason, context, var, delta) \
609 if (!(grpc_flowctl_trace)) { \
610 } else { \
611 grpc_chttp2_flowctl_trace(__FILE__, __LINE__, reason, #context, #var, \
612 context->is_client, 0, context->var, delta); \
613 }
614
615 void grpc_chttp2_flowctl_trace(const char *file, int line, const char *reason,
616 const char *context, const char *var,
617 int is_client, gpr_uint32 stream_id,
618 gpr_int64 current_value, gpr_int64 delta);
619
620 #endif
grpc_chttp2_list_add_writable_stream
void grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Get a writable stream returns non-zero if there was a stream available.
Definition: stream_lists.c:155
GRPC_DTS_FH_6
Definition: internal.h:108
grpc_http_trace
int grpc_http_trace
Definition: chttp2_transport.c:60
grpc_chttp2_incoming_metadata_live_op_buffer
Definition: incoming_metadata.h:46
GRPC_DTS_CLIENT_PREFIX_19
Definition: internal.h:95
grpc_chttp2_stream_link
Definition: internal.h:133
grpc_chttp2_transport::closed
gpr_uint8 closed
has the upper layer closed the transport?
Definition: internal.h:295
grpc_chttp2_stream_writing::id
gpr_uint32 id
HTTP2 stream id for this stream, or zero if one has not been assigned.
Definition: internal.h:403
GRPC_DTS_CLIENT_PREFIX_22
Definition: internal.h:98
GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_WRITING
Definition: internal.h:65
grpc_chttp2_list_have_writing_streams
int grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport_writing *transport_writing)
Definition: stream_lists.c:204
GRPC_DTS_CLIENT_PREFIX_3
Definition: internal.h:79
grpc_chttp2_transport_parsing::incoming_stream
grpc_chttp2_stream_parsing * incoming_stream
Definition: internal.h:264
grpc_chttp2_transport_global
Definition: internal.h:159
grpc_chttp2_transport_global::ping_counter
gpr_uint64 ping_counter
next payload for an outgoing ping
Definition: internal.h:199
GRPC_DTS_CLIENT_PREFIX_17
Definition: internal.h:93
grpc_chttp2_stream_list_id
grpc_chttp2_stream_list_id
Definition: internal.h:57
grpc_chttp2_unregister_stream
int grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) GRPC_MUST_USE_RESULT
Definition: stream_lists.c:368
grpc_chttp2_transport_parsing::goaway_text
gpr_slice goaway_text
Definition: internal.h:275
gpr_uint8
uint8_t gpr_uint8
Definition: port_platform.h:307
grpc_chttp2_transport_parsing::deframe_state
grpc_chttp2_deframe_transport_state deframe_state
Definition: internal.h:254
grpc_chttp2_transport_global::sent_local_settings
gpr_uint8 sent_local_settings
have local settings been sent?
Definition: internal.h:183
grpc_chttp2_transport_parsing::last_incoming_stream_id
gpr_uint32 last_incoming_stream_id
Definition: internal.h:251
stream_encoder.h
grpc_chttp2_transport::accept_stream
void(* accept_stream)(void *user_data, grpc_transport *transport, const void *server_data)
Definition: internal.h:338
grpc_chttp2_transport_parsing::ping
grpc_chttp2_ping_parser ping
Definition: internal.h:239
gpr_refcount
Definition: sync_generic.h:49
grpc_chttp2_transport_global::qbuf
gpr_slice_buffer qbuf
data to write next write
Definition: internal.h:161
grpc_chttp2_outstanding_ping
struct grpc_chttp2_outstanding_ping grpc_chttp2_outstanding_ping
grpc_chttp2_stream_global::max_recv_bytes
gpr_uint32 max_recv_bytes
The number of bytes the upper layers have offered to receive.
Definition: internal.h:359
grpc_chttp2_cleanup_writing
void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing)
Definition: writing.c:210
grpc_chttp2_stream_global::writing_now
gpr_uint8 writing_now
is this stream actively being written?
Definition: internal.h:386
grpc_chttp2_schedule_closure
void grpc_chttp2_schedule_closure(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success)
schedule a closure to run without the transport lock taken
Definition: chttp2_transport.c:1033
grpc_chttp2_transport_global::last_incoming_stream_id
gpr_uint32 last_incoming_stream_id
last received stream id
Definition: internal.h:194
grpc_chttp2_transport_parsing::window_update
grpc_chttp2_window_update_parser window_update
Definition: internal.h:237
STREAM_LIST_COUNT
Definition: internal.h:70
grpc_chttp2_list_pop_incoming_window_updated
int grpc_chttp2_list_pop_incoming_window_updated(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing)
Definition: stream_lists.c:324
GRPC_DTS_CLIENT_PREFIX_8
Definition: internal.h:84
grpc_chttp2_transport_global::pending_closures_head
grpc_iomgr_closure * pending_closures_head
queued callbacks
Definition: internal.h:163
GRPC_DTS_FRAME
Definition: internal.h:113
grpc_chttp2_list_pop_writable_stream
int grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing)
Definition: stream_lists.c:175
grpc_chttp2_add_incoming_goaway
void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, gpr_slice goaway_text)
Definition: chttp2_transport.c:534
grpc_chttp2_list_add_first_writable_stream
void grpc_chttp2_list_add_first_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:163
grpc_chttp2_transport_global::force_send_settings
gpr_uint32 force_send_settings
bitmask of setting indexes to send out
Definition: internal.h:185
grpc_chttp2_rst_stream_parser
Definition: frame_rst_stream.h:40
grpc_chttp2_transport_writing::outbuf
gpr_slice_buffer outbuf
data to write now
Definition: internal.h:208
grpc_chttp2_stream_map
Definition: stream_map.h:47
frame_data.h
grpc_chttp2_list_add_incoming_window_updated
void grpc_chttp2_list_add_incoming_window_updated(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:316
GRPC_CHTTP2_LIST_ALL_STREAMS
Definition: internal.h:58
grpc_chttp2_stream_parsing::outgoing_window_update
gpr_uint64 outgoing_window_update
Definition: internal.h:428
grpc_chttp2_stream_parsing::saw_rst_stream
gpr_uint8 saw_rst_stream
saw a rst_stream
Definition: internal.h:418
grpc_chttp2_transport_parsing::parser_data
void * parser_data
Definition: internal.h:263
grpc_chttp2_transport_parsing::header_eof
gpr_uint8 header_eof
Definition: internal.h:257
GRPC_CHTTP2_LIST_WRITING
Definition: internal.h:61
GRPC_DTS_CLIENT_PREFIX_16
Definition: internal.h:92
GRPC_DTS_CLIENT_PREFIX_21
Definition: internal.h:97
GRPC_DTS_CLIENT_PREFIX_11
Definition: internal.h:87
grpc_chttp2_transport_global::dirtied_local_settings
gpr_uint8 dirtied_local_settings
are the local settings dirty and need to be sent?
Definition: internal.h:181
grpc_chttp2_transport_parsing::is_client
gpr_uint8 is_client
is this transport a client? (boolean)
Definition: internal.h:217
grpc_chttp2_hpack_compressor
Definition: stream_encoder.h:48
GRPC_MUST_USE_RESULT
#define GRPC_MUST_USE_RESULT
Definition: port_platform.h:327
grpc_chttp2_transport_global::next_stream_id
gpr_uint32 next_stream_id
what is the next stream id to be allocated by this peer? copied to next_stream_id in parsing when par...
Definition: internal.h:191
GRPC_DTS_CLIENT_PREFIX_10
Definition: internal.h:86
grpc_chttp2_perform_writes
void grpc_chttp2_perform_writes(grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint)
Definition: writing.c:152
grpc_chttp2_parse_error
grpc_chttp2_parse_error
Definition: frame.h:42
grpc_chttp2_transport::parsing
grpc_chttp2_transport_parsing parsing
state only accessible by the chain of execution that set parsing_active=1
Definition: internal.h:315
grpc_chttp2_transport_parsing::incoming_window
gpr_uint32 incoming_window
window available for peer to send to us
Definition: internal.h:246
grpc_chttp2_stream_writing::sopb
grpc_stream_op_buffer sopb
sops that have passed flow control to be written
Definition: internal.h:405
grpc_chttp2_hpack_parser
Definition: hpack_parser.h:56
grpc_chttp2_list_pop_writing_stream
int grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing **stream_writing)
Definition: stream_lists.c:210
grpc_mdstr
Definition: metadata.h:70
grpc_chttp2_stream_global::publish_state
grpc_stream_state * publish_state
address to publish next stream state to
Definition: internal.h:391
grpc_chttp2_list_add_writing_stream
void grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing)
Definition: stream_lists.c:196
GRPC_CHTTP2_LIST_WRITTEN
Definition: internal.h:62
GRPC_DTS_CLIENT_PREFIX_18
Definition: internal.h:94
grpc_chttp2_transport::peer_string
char * peer_string
Definition: internal.h:288
GRPC_DTS_FH_7
Definition: internal.h:109
GRPC_DTS_CLIENT_PREFIX_14
Definition: internal.h:90
grpc_chttp2_outstanding_ping
Definition: internal.h:152
gpr_uint32
uint32_t gpr_uint32
Definition: port_platform.h:309
grpc_chttp2_transport
Definition: internal.h:283
grpc_chttp2_stream_global::send_done_closure
grpc_iomgr_closure * send_done_closure
Definition: internal.h:351
GRPC_DTS_CLIENT_PREFIX_15
Definition: internal.h:91
grpc_chttp2_transport_global::connection_window_target
gpr_uint32 connection_window_target
how much window would we like to have for incoming_window
Definition: internal.h:171
grpc_chttp2_unlocking_check_writes
int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing)
Transport writing call flow: chttp2_transport.c calls grpc_chttp2_unlocking_check_writes to see if wr...
Definition: writing.c:42
GRPC_ACKED_SETTINGS
Definition: internal.h:147
grpc_chttp2_transport_parsing::settings_ack_received
gpr_uint8 settings_ack_received
was a settings ack received?
Definition: internal.h:222
GRPC_WRITE_STATE_QUEUED_CLOSE
Definition: internal.h:118
grpc_chttp2_register_stream
void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.c:363
grpc_chttp2_transport_parsing::rst_stream
grpc_chttp2_rst_stream_parser rst_stream
Definition: internal.h:240
grpc_chttp2_transport::metadata_context
grpc_mdctx * metadata_context
Definition: internal.h:286
grpc_chttp2_stream_global::incoming_metadata
grpc_chttp2_incoming_metadata_buffer incoming_metadata
incoming metadata
Definition: internal.h:397
GRPC_DTS_CLIENT_PREFIX_12
Definition: internal.h:88
grpc_chttp2_list_pop_parsing_seen_stream
int grpc_chttp2_list_pop_parsing_seen_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing)
Definition: stream_lists.c:249
grpc_flowctl_trace
int grpc_flowctl_trace
Definition: chttp2_transport.c:61
grpc_chttp2_transport_parsing::expect_continuation_stream_id
gpr_uint32 expect_continuation_stream_id
Definition: internal.h:258
frame_ping.h
grpc_chttp2_prepare_to_read
void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing)
Definition: parsing.c:64
grpc_chttp2_transport_parsing::initial_window_update
gpr_int64 initial_window_update
initial window change
Definition: internal.h:227
gpr_slice_buffer
Definition: slice_buffer.h:48
grpc_chttp2_transport_parsing::goaway_received
gpr_uint8 goaway_received
was a goaway frame received?
Definition: internal.h:224
grpc_chttp2_transport::parsing_stream_map
grpc_chttp2_stream_map parsing_stream_map
maps stream id to grpc_chttp2_stream objects; owned by the parsing thread when parsing ...
Definition: internal.h:319
grpc_chttp2_transport_global::seen_goaway
gpr_uint8 seen_goaway
have we seen a goaway
Definition: internal.h:174
GRPC_DTS_FH_3
Definition: internal.h:105
grpc_chttp2_transport_parsing::goaway_error
grpc_status_code goaway_error
Definition: internal.h:273
grpc_chttp2_stream_global::id
gpr_uint32 id
HTTP2 stream id for this stream, or zero if one has not been assigned.
Definition: internal.h:349
GRPC_DTS_CLIENT_PREFIX_5
Definition: internal.h:81
grpc_chttp2_stream::links
grpc_chttp2_stream_link links[STREAM_LIST_COUNT]
Definition: internal.h:439
grpc_chttp2_flowctl_trace
void grpc_chttp2_flowctl_trace(const char *file, int line, const char *reason, const char *context, const char *var, int is_client, gpr_uint32 stream_id, gpr_int64 current_value, gpr_int64 delta)
Definition: chttp2_transport.c:1069
grpc_chttp2_transport_parsing::goaway_last_stream_index
gpr_uint32 goaway_last_stream_index
Definition: internal.h:274
grpc_chttp2_transport::writing
grpc_chttp2_transport_writing writing
state only accessible by the chain of execution that set writing_active=1
Definition: internal.h:312
grpc_chttp2_list_pop_waiting_for_concurrency
int grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global)
Definition: stream_lists.c:270
grpc_chttp2_stream::writing
grpc_chttp2_stream_writing writing
Definition: internal.h:436
GRPC_DTS_CLIENT_PREFIX_7
Definition: internal.h:83
GRPC_DTS_CLIENT_PREFIX_0
Definition: internal.h:76
grpc_chttp2_stream_global::read_closed
gpr_uint8 read_closed
is this stream closed (boolean)
Definition: internal.h:377
grpc_chttp2_parsing_accept_stream
grpc_chttp2_stream_parsing * grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id)
Definition: chttp2_transport.c:434
grpc_chttp2_stream_parsing::data_parser
grpc_chttp2_data_parser data_parser
parsing state for data frames
Definition: internal.h:424
grpc_chttp2_stream_list
Definition: internal.h:128
GRPC_DTS_FH_1
Definition: internal.h:103
grpc_chttp2_transport_parsing::next_stream_id
gpr_uint32 next_stream_id
next stream id available at the time of beginning parsing
Definition: internal.h:250
GRPC_NUM_SETTING_SETS
Definition: internal.h:148
grpc_chttp2_transport_writing::hpack_compressor
grpc_chttp2_hpack_compressor hpack_compressor
hpack encoding
Definition: internal.h:210
grpc_chttp2_transport_parsing::incoming_frame_flags
gpr_uint8 incoming_frame_flags
Definition: internal.h:256
grpc_chttp2_outstanding_ping::prev
struct grpc_chttp2_outstanding_ping * prev
Definition: internal.h:156
grpc_chttp2_transport::writing_active
gpr_uint8 writing_active
is a thread currently writing
Definition: internal.h:298
incoming_metadata.h
grpc_chttp2_transport_parsing::settings
grpc_chttp2_settings_parser settings
Definition: internal.h:238
frame.h
grpc_chttp2_transport_global::concurrent_stream_count
gpr_uint32 concurrent_stream_count
concurrent stream count: updated when not parsing, so this is a strict over-estimation on the client ...
Definition: internal.h:203
grpc_stream_state
grpc_stream_state
Definition: transport.h:53
grpc_chttp2_transport::accepting_stream
grpc_chttp2_stream ** accepting_stream
address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used b...
Definition: internal.h:334
GRPC_SENT_SETTINGS
Definition: internal.h:145
grpc_chttp2_stream_global::published_state
grpc_stream_state published_state
stream state already published to the upper layer
Definition: internal.h:389
grpc_chttp2_list_pop_closed_waiting_for_parsing
int grpc_chttp2_list_pop_closed_waiting_for_parsing(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global)
Definition: stream_lists.c:288
grpc_chttp2_stream
Definition: internal.h:434
grpc_chttp2_transport::mu
gpr_mu mu
Definition: internal.h:290
grpc_chttp2_transport_parsing::settings_updated
gpr_uint8 settings_updated
were settings updated?
Definition: internal.h:220
grpc_chttp2_stream_writing::send_closed
grpc_chttp2_send_closed send_closed
how strongly should we indicate closure with the next write
Definition: internal.h:407
grpc_chttp2_deframe_transport_state
grpc_chttp2_deframe_transport_state
Definition: internal.h:74
grpc_chttp2_transport_global::incoming_window
gpr_uint32 incoming_window
window available for peer to send to us - updated after parse
Definition: internal.h:169
GRPC_SEND_CLOSED_WITH_RST_STREAM
Definition: internal.h:125
frame_rst_stream.h
GRPC_WRITE_STATE_OPEN
Definition: internal.h:117
grpc_chttp2_transport_parsing::str_grpc_timeout
grpc_mdstr * str_grpc_timeout
Definition: internal.h:232
grpc_chttp2_goaway_parser
Definition: frame_goaway.h:54
grpc_chttp2_outstanding_ping::on_recv
grpc_iomgr_closure * on_recv
Definition: internal.h:154
grpc_chttp2_transport_parsing::outgoing_window_update
gpr_uint64 outgoing_window_update
Definition: internal.h:277
GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING
Definition: internal.h:64
grpc_mdctx
Definition: metadata.c:98
transport_impl.h
grpc_chttp2_transport_parsing::incoming_stream_id
gpr_uint32 incoming_stream_id
Definition: internal.h:260
grpc_chttp2_transport_parsing
Definition: internal.h:215
gpr_mu
Definition: sync_win32.h:39
grpc_chttp2_transport::destroying
gpr_uint8 destroying
is the transport destroying itself?
Definition: internal.h:293
grpc_chttp2_send_closed
grpc_chttp2_send_closed
Definition: internal.h:122
grpc_chttp2_list_add_closed_waiting_for_parsing
void grpc_chttp2_list_add_closed_waiting_for_parsing(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:280
grpc_chttp2_stream_list::head
grpc_chttp2_stream * head
Definition: internal.h:129
grpc_chttp2_stream_global::published_cancelled
gpr_uint8 published_cancelled
have we told the upper layer that this stream is cancelled?
Definition: internal.h:382
grpc_chttp2_list_pop_cancelled_waiting_for_writing
int grpc_chttp2_list_pop_cancelled_waiting_for_writing(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global)
Definition: stream_lists.c:306
grpc_chttp2_stream_global::incoming_window
gpr_uint32 incoming_window
The number of bytes of HTTP2 flow control we have advertised.
Definition: internal.h:369
grpc_chttp2_transport_parsing::incoming_window_delta
gpr_uint32 incoming_window_delta
Definition: internal.h:247
grpc_chttp2_transport::writing_action
grpc_iomgr_closure writing_action
closure to execute writing
Definition: internal.h:327
grpc_chttp2_parsing_become_skip_parser
void grpc_chttp2_parsing_become_skip_parser(grpc_chttp2_transport_parsing *transport_parsing)
Definition: parsing.c:492
gpr_int64
int64_t gpr_int64
Definition: port_platform.h:306
grpc_chttp2_ping_parser
Definition: frame_ping.h:40
GRPC_PEER_SETTINGS
Definition: internal.h:141
GRPC_SEND_CLOSED
Definition: internal.h:124
GRPC_DTS_FH_0
Definition: internal.h:102
grpc_chttp2_transport::ep
grpc_endpoint * ep
Definition: internal.h:285
grpc_chttp2_transport_writing::is_client
gpr_uint8 is_client
is this a client?
Definition: internal.h:212
grpc_iomgr_closure
A closure over a grpc_iomgr_cb_func.
Definition: iomgr.h:45
GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED
Definition: internal.h:66
GRPC_DTS_CLIENT_PREFIX_13
Definition: internal.h:89
grpc_chttp2_list_pop_read_write_state_changed
int grpc_chttp2_list_pop_read_write_state_changed(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global)
Definition: stream_lists.c:353
GRPC_DTS_CLIENT_PREFIX_23
Definition: internal.h:99
grpc_chttp2_transport_parsing::simple
union grpc_chttp2_transport_parsing::@20 simple
simple one shot parsers
grpc_chttp2_stream_global
Definition: internal.h:347
grpc_chttp2_stream_parsing::incoming_metadata
grpc_chttp2_incoming_metadata_buffer incoming_metadata
incoming metadata
Definition: internal.h:431
GRPC_DTS_FH_5
Definition: internal.h:107
GRPC_DTS_FH_2
Definition: internal.h:104
hpack_parser.h
grpc_chttp2_has_streams
int grpc_chttp2_has_streams(grpc_chttp2_transport *t)
Definition: stream_lists.c:374
connectivity_state.h
grpc_chttp2_transport_parsing::parser
grpc_chttp2_parse_error(* parser)(void *parser_user_data, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last)
Definition: internal.h:265
GRPC_DTS_CLIENT_PREFIX_1
Definition: internal.h:77
stream_map.h
grpc_chttp2_transport_parsing::hpack_parser
grpc_chttp2_hpack_parser hpack_parser
parser for headers
Definition: internal.h:234
GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED
Definition: internal.h:59
GRPC_DTS_FH_8
Definition: internal.h:111
grpc_chttp2_transport_global::outgoing_window
gpr_uint32 outgoing_window
window available for us to send to peer
Definition: internal.h:167
grpc_chttp2_stream_writing::announce_window
gpr_uint32 announce_window
how much window should we announce?
Definition: internal.h:409
grpc_chttp2_stream_global::outgoing_window
gpr_int64 outgoing_window
window available for us to send to peer
Definition: internal.h:355
GRPC_CHTTP2_NUM_SETTINGS
Definition: frame_settings.h:58
grpc_chttp2_transport_writing
Definition: internal.h:206
grpc_chttp2_stream_parsing
Definition: internal.h:412
grpc_chttp2_incoming_metadata_buffer
Definition: incoming_metadata.h:39
grpc_chttp2_transport_global::is_client
gpr_uint8 is_client
is this transport a client?
Definition: internal.h:179
grpc_chttp2_settings_parser
Definition: frame_settings.h:61
GRPC_CHTTP2_LIST_PARSING_SEEN
Definition: internal.h:63
grpc_chttp2_window_update_parser
Definition: frame_window_update.h:40
grpc_chttp2_transport::endpoint_reading
gpr_uint8 endpoint_reading
is there a read request to the endpoint outstanding?
Definition: internal.h:303
grpc_chttp2_stream::included
gpr_uint8 included[STREAM_LIST_COUNT]
Definition: internal.h:440
grpc_chttp2_stream_parsing::received_close
gpr_uint8 received_close
has this stream received a close
Definition: internal.h:416
grpc_chttp2_terminate_writing
void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writing, int success)
Definition: chttp2_transport.c:501
grpc_chttp2_transport_global::sent_goaway
gpr_uint8 sent_goaway
have we sent a goaway
Definition: internal.h:176
grpc_chttp2_stream::parsing
grpc_chttp2_stream_parsing parsing
Definition: internal.h:437
GRPC_DTS_CLIENT_PREFIX_9
Definition: internal.h:85
frame_settings.h
grpc_chttp2_stream_parsing::incoming_window
gpr_uint32 incoming_window
window available for peer to send to us
Definition: internal.h:422
GRPC_DTS_FH_4
Definition: internal.h:106
grpc_chttp2_list_add_parsing_seen_stream
void grpc_chttp2_list_add_parsing_seen_stream(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing)
Definition: stream_lists.c:241
grpc_chttp2_stream_link::prev
grpc_chttp2_stream * prev
Definition: internal.h:135
grpc_chttp2_transport_parsing::qbuf
gpr_slice_buffer qbuf
data to write later - after parsing
Definition: internal.h:230
grpc_chttp2_stream_global::cancelled
gpr_uint8 cancelled
has this stream been cancelled? (boolean)
Definition: internal.h:379
grpc_chttp2_transport::new_stream_map
grpc_chttp2_stream_map new_stream_map
streams created by the client (possibly during parsing); merged with parsing_stream_map during unlock...
Definition: internal.h:324
grpc_chttp2_stream_global::outstanding_metadata
grpc_chttp2_incoming_metadata_live_op_buffer outstanding_metadata
Definition: internal.h:398
GRPC_DTS_CLIENT_PREFIX_2
Definition: internal.h:78
grpc_chttp2_data_parser
Definition: frame_data.h:53
grpc_chttp2_stream_global::write_state
grpc_chttp2_write_state write_state
when the application requests writes be closed, the write_closed is 'queued'; when the close is flow ...
Definition: internal.h:375
grpc_chttp2_transport_parsing::incoming_frame_type
gpr_uint8 incoming_frame_type
Definition: internal.h:255
grpc_chttp2_list_add_waiting_for_concurrency
void grpc_chttp2_list_add_waiting_for_concurrency(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:262
grpc_endpoint
Definition: endpoint.h:108
grpc_chttp2_transport::refs
gpr_refcount refs
Definition: internal.h:287
grpc_chttp2_parsing_lookup_stream
grpc_chttp2_stream_parsing * grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id)
Definition: chttp2_transport.c:426
grpc_chttp2_stream::global
grpc_chttp2_stream_global global
Definition: internal.h:435
frame_goaway.h
grpc_chttp2_stream_global::outgoing_sopb
grpc_stream_op_buffer * outgoing_sopb
stream ops the transport user would like to send
Definition: internal.h:371
grpc_chttp2_transport_parsing::goaway_parser
grpc_chttp2_goaway_parser goaway_parser
parser for goaway frames
Definition: internal.h:243
grpc_chttp2_for_all_streams
void grpc_chttp2_for_all_streams(grpc_chttp2_transport_global *transport_global, void *user_data, void(*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global))
Definition: stream_lists.c:378
grpc_chttp2_list_remove_incoming_window_updated
void grpc_chttp2_list_remove_incoming_window_updated(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:337
grpc_chttp2_publish_reads
void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing)
Definition: parsing.c:93
grpc_chttp2_list_remove_writable_stream
void grpc_chttp2_list_remove_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:188
grpc_status_code
grpc_status_code
Definition: status.h:41
grpc_chttp2_stream_global::unannounced_incoming_window
gpr_uint32 unannounced_incoming_window
The number of bytes the upper layer has offered to read but we have not yet announced to HTTP2 flow c...
Definition: internal.h:364
grpc_chttp2_stream_writing
Definition: internal.h:401
grpc_chttp2_setting_set
grpc_chttp2_setting_set
Definition: internal.h:139
GRPC_DTS_CLIENT_PREFIX_4
Definition: internal.h:80
grpc_chttp2_write_state
grpc_chttp2_write_state
Definition: internal.h:116
endpoint.h
gpr_uint64
uint64_t gpr_uint64
Definition: port_platform.h:310
grpc_chttp2_stream_list::tail
grpc_chttp2_stream * tail
Definition: internal.h:130
grpc_chttp2_stream_parsing::id
gpr_uint32 id
HTTP2 stream id for this stream, or zero if one has not been assigned.
Definition: internal.h:414
grpc_chttp2_stream_global::incoming_sopb
grpc_stream_op_buffer incoming_sopb
Definition: internal.h:394
grpc_chttp2_transport::channel_callback
struct grpc_chttp2_transport::@21 channel_callback
grpc_transport
Definition: transport_impl.h:67
grpc_chttp2_stream_parsing::rst_stream_reason
gpr_uint32 rst_stream_reason
reason give to rst_stream
Definition: internal.h:426
frame_window_update.h
grpc_chttp2_list_add_cancelled_waiting_for_writing
void grpc_chttp2_list_add_cancelled_waiting_for_writing(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:298
GRPC_DTS_CLIENT_PREFIX_6
Definition: internal.h:82
grpc_chttp2_transport::global
grpc_chttp2_transport_global global
global state for reading/writing
Definition: internal.h:309
grpc_chttp2_stream_global::publish_sopb
grpc_stream_op_buffer * publish_sopb
pointer to sop buffer to fill in with new stream ops
Definition: internal.h:393
grpc_chttp2_stream_global::cancelled_status
grpc_status_code cancelled_status
Definition: internal.h:380
grpc_stream_op_buffer
A stream op buffer is a wrapper around stream operations that is dynamically extendable.
Definition: stream_op.h:176
GRPC_LOCAL_SETTINGS
Definition: internal.h:143
grpc_chttp2_transport::base
grpc_transport base
Definition: internal.h:284
GRPC_CHTTP2_LIST_WRITABLE
Definition: internal.h:60
grpc_chttp2_transport::state_tracker
grpc_connectivity_state_tracker state_tracker
connectivity tracking
Definition: internal.h:343
grpc_chttp2_transport::reading_action
grpc_iomgr_closure reading_action
closure to start reading from the endpoint
Definition: internal.h:329
grpc_chttp2_outstanding_ping::next
struct grpc_chttp2_outstanding_ping * next
Definition: internal.h:155
grpc_chttp2_list_pop_written_stream
int grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing)
Definition: stream_lists.c:228
GRPC_WRITE_STATE_SENT_CLOSE
Definition: internal.h:119
gpr_slice
Definition: slice.h:79
grpc_chttp2_stream_global::in_stream_map
gpr_uint8 in_stream_map
is this stream in the stream map? (boolean)
Definition: internal.h:384
grpc_chttp2_transport_global::pings
grpc_chttp2_outstanding_ping pings
pings awaiting responses
Definition: internal.h:197
GRPC_DONT_SEND_CLOSED
Definition: internal.h:123
grpc_chttp2_transport_parsing::incoming_frame_size
gpr_uint32 incoming_frame_size
Definition: internal.h:259
GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY
streams that are waiting to start because there are too many concurrent streams on the connection ...
Definition: internal.h:69
grpc_chttp2_transport::accept_stream_user_data
void * accept_stream_user_data
Definition: internal.h:340
grpc_chttp2_stream_link::next
grpc_chttp2_stream * next
Definition: internal.h:134
grpc_chttp2_stream_global::recv_done_closure
grpc_iomgr_closure * recv_done_closure
Definition: internal.h:352
grpc_chttp2_list_add_read_write_state_changed
void grpc_chttp2_list_add_read_write_state_changed(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global)
Definition: stream_lists.c:345
grpc_chttp2_list_add_written_stream
void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing)
Definition: stream_lists.c:220
grpc_chttp2_transport_parsing::pings
grpc_chttp2_outstanding_ping pings
pings awaiting responses
Definition: internal.h:280
grpc_chttp2_perform_read
int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice)
Process one slice of incoming data; return 1 if the connection is still viable after reading...
Definition: parsing.c:236
GRPC_DTS_CLIENT_PREFIX_20
Definition: internal.h:96
grpc_chttp2_stream_parsing::incoming_window_delta
gpr_uint32 incoming_window_delta
incoming_window has been reduced by this much during parsing
Definition: internal.h:420
grpc_chttp2_transport::parsing_active
gpr_uint8 parsing_active
is a thread currently parsing
Definition: internal.h:300
grpc_chttp2_transport_global::pending_closures_tail
grpc_iomgr_closure * pending_closures_tail
Definition: internal.h:164
grpc_connectivity_state_tracker
Definition: connectivity_state.h:49
grpc_chttp2_transport::lists
grpc_chttp2_stream_list lists[STREAM_LIST_COUNT]
various lists of streams
Definition: internal.h:306