[PATCH] HTTP/2: add debug logging of control frames
# HG changeset patch # User Piotr Sikora# Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 1f1549823fba355a0dd1af49108be4b4898bf331 # Parent d1816a2696de8c2faa1cd913a151e5f62a8620f3 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r d1816a2696de -r 1f1549823fba src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -41,9 +41,11 @@ /* settings fields */ #define NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING0x1 +#define NGX_HTTP_V2_ENABLE_PUSH_SETTING 0x2 #define NGX_HTTP_V2_MAX_STREAMS_SETTING 0x3 #define NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING 0x4 #define NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING 0x5 +#define NGX_HTTP_V2_HEADER_LIST_SIZE_SETTING 0x6 #define NGX_HTTP_V2_FRAME_BUFFER_SIZE24 @@ -1946,6 +1948,9 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ack:1"); + h2c->settings_ack = 1; return ngx_http_v2_state_complete(h2c, pos, end); @@ -1959,6 +1964,10 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame params:%uz", + h2c->state.length / NGX_HTTP_V2_SETTINGS_PARAM_SIZE); + return ngx_http_v2_state_settings_params(h2c, pos, end); } @@ -1986,6 +1995,27 @@ ngx_http_v2_state_settings_params(ngx_ht switch (id) { +case NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param HEADER_TABLE_SIZE:%ui " + "(ignored)", value); +break; + +case NGX_HTTP_V2_ENABLE_PUSH_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param ENABLE_PUSH:%ui " + "(ignored)", value); +break; + +case NGX_HTTP_V2_MAX_STREAMS_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param MAX_CONCURRENT_STREAMS:%ui " + "(ignored)", value); +break; + case NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING: if (value > NGX_HTTP_V2_MAX_WINDOW) { @@ -1997,6 +2027,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_FLOW_CTRL_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param INITIAL_WINDOW_SIZE:%ui", + value); + window_delta = value - h2c->init_window; h2c->init_window = value; @@ -2015,16 +2049,34 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_PROTOCOL_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param MAX_FRAME_SIZE:%ui", + value); + h2c->frame_size = value; break; +case NGX_HTTP_V2_HEADER_LIST_SIZE_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param MAX_HEADER_LIST_SIZE:%ui " + "(ignored)", value); +break; + default: + +ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS param 0x%Xi:%ui " + "(ignored)", id, value); break; } pos += NGX_HTTP_V2_SETTINGS_PARAM_SIZE; } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame ack:1"); + frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_SETTINGS_ACK_SIZE, NGX_HTTP_V2_SETTINGS_FRAME, NGX_HTTP_V2_ACK_FLAG, 0); @@ -2075,12 +2127,16 @@ ngx_http_v2_state_ping(ngx_http_v2_conne } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 PING frame, flags: %ud", h2c->state.flags); + "http2 PING frame ack:%ud", + h2c->state.flags & NGX_HTTP_V2_ACK_FLAG ? 1 : 0); if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) { return ngx_http_v2_state_skip(h2c, pos, end); } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send PING frame ack:1"); + frame =
Re: [PATCH] HTTP/2: add debug logging of control frames
Hey Valentin, > Ok, I've already resigned myself to multiline output, but don't let it > look like an another SETTINGS frame. > > IMHO, something like that will be good enough: > >http2 send SETTINGS frame >http2 SETTINGS param MAX_CONCURRENT_STREAMS: 100 >http2 SETTINGS param INITIAL_WINDOW_SIZE: 65536 >http2 SETTINGS param MAX_FRAME_SIZE: 16777215 Done, with retained "send " prefix to differentiate params that we send and receive. I've also re-added params counter to the "send SETTINGS frame", by setting "len" value a bit sooner, so that the number of params is calculated and cannot be forgotten in subsequent commits. Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: [PATCH] HTTP/2: add debug logging of control frames
Hey Valentin, > What do you suggest instead? All 3 params in the same line? > >http2 send SETTINGS frame MAX_CONCURRENT_STREAMS:%ui > INITIAL_WINDOW_SIZE:%uz MAX_FRAME_SIZE:%ud > > What about receiving part, then? Do you want to put all 6 params in > the same line? > >http2 recv SETTINGS frame HEADER_TABLE_SIZE:%ui (ignored) > ENABLE_PUSH:%ui (ignored) MAX_CONCURRENT_STREAMS:%ui (ignored) > INITIAL_WINDOW_SIZE:%ui MAX_FRAME_SIZE:%ui MAX_HEADER_LIST_SIZE:%ui > (ignored) > > It makes this way less readable, IMHO. Ping. Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: [PATCH] HTTP/2: add debug logging of control frames
Hey Valentin, > I actually agree with that, but let's try to reduce the size of printing. > > http2 send SETTINGS frame MAX_CONCURRENT_STREAMS > http2 send SETTINGS frame INITIAL_WINDOW_SIZE > http2 send SETTINGS frame MAX_FRAME_SIZE > > This looks like too verbose for just one SETTINGS frame. What do you suggest instead? All 3 params in the same line? http2 send SETTINGS frame MAX_CONCURRENT_STREAMS:%ui INITIAL_WINDOW_SIZE:%uz MAX_FRAME_SIZE:%ud What about receiving part, then? Do you want to put all 6 params in the same line? http2 recv SETTINGS frame HEADER_TABLE_SIZE:%ui (ignored) ENABLE_PUSH:%ui (ignored) MAX_CONCURRENT_STREAMS:%ui (ignored) INITIAL_WINDOW_SIZE:%ui MAX_FRAME_SIZE:%ui MAX_HEADER_LIST_SIZE:%ui (ignored) It makes this way less readable, IMHO. > Also, literally > reading these lines can be misinterpreted as sending multiple SETTINGS > frames. That's because you skipped the first line, i.e.: http2 send SETTINGS frame params:3 http2 send SETTINGS frame MAX_CONCURRENT_STREAMS http2 send SETTINGS frame INITIAL_WINDOW_SIZE http2 send SETTINGS frame MAX_FRAME_SIZE Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[PATCH] HTTP/2: add debug logging of control frames
# HG changeset patch # User Piotr Sikora# Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 7414a1467d0684a73d091c508834973b944890cd # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r 22be63bf21ed -r 7414a1467d06 src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -40,9 +40,11 @@ /* settings fields */ #define NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING0x1 +#define NGX_HTTP_V2_ENABLE_PUSH_SETTING 0x2 #define NGX_HTTP_V2_MAX_STREAMS_SETTING 0x3 #define NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING 0x4 #define NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING 0x5 +#define NGX_HTTP_V2_HEADER_LIST_SIZE_SETTING 0x6 #define NGX_HTTP_V2_FRAME_BUFFER_SIZE24 @@ -1955,6 +1957,9 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ack:1"); + h2c->settings_ack = 1; return ngx_http_v2_state_complete(h2c, pos, end); @@ -1968,6 +1973,10 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame params:%uz", + h2c->state.length / NGX_HTTP_V2_SETTINGS_PARAM_SIZE); + ngx_http_v2_send_settings(h2c, 1); return ngx_http_v2_state_settings_params(h2c, pos, end); @@ -1993,6 +2002,27 @@ ngx_http_v2_state_settings_params(ngx_ht switch (id) { +case NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame HEADER_TABLE_SIZE:%ui " + "(ignored)", value); +break; + +case NGX_HTTP_V2_ENABLE_PUSH_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ENABLE_PUSH:%ui " + "(ignored)", value); +break; + +case NGX_HTTP_V2_MAX_STREAMS_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_CONCURRENT_STREAMS:%ui " + "(ignored)", value); +break; + case NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING: if (value > NGX_HTTP_V2_MAX_WINDOW) { @@ -2004,6 +2034,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_FLOW_CTRL_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame INITIAL_WINDOW_SIZE:%ui", + value); + if (ngx_http_v2_adjust_windows(h2c, value - h2c->init_window) != NGX_OK) { @@ -2026,10 +2060,25 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_PROTOCOL_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_FRAME_SIZE:%ui", + value); + h2c->frame_size = value; break; +case NGX_HTTP_V2_HEADER_LIST_SIZE_SETTING: + +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_HEADER_LIST_SIZE:%ui " + "(ignored)", value); +break; + default: + +ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame 0x%Xi:%ui " + "(ignored)", id, value); break; } @@ -2070,12 +2119,16 @@ ngx_http_v2_state_ping(ngx_http_v2_conne } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 PING frame, flags: %ud", h2c->state.flags); + "http2 PING frame ack:%ud", + h2c->state.flags & NGX_HTTP_V2_ACK_FLAG ? 1 : 0); if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) { return ngx_http_v2_state_skip(h2c, pos, end); } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send PING frame ack:1"); + frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_PING_SIZE, NGX_HTTP_V2_PING_FRAME, NGX_HTTP_V2_ACK_FLAG, 0); @@ -2449,8 +2502,18 @@ ngx_http_v2_send_settings(ngx_http_v2_co ngx_http_v2_srv_conf_t *h2scf; ngx_http_v2_out_frame_t *frame; -
Re: [PATCH] HTTP/2: add debug logging of control frames
On Monday 03 April 2017 20:13:40 Piotr Sikora via nginx-devel wrote: > # HG changeset patch > # User Piotr Sikora> # Date 1490516711 25200 > # Sun Mar 26 01:25:11 2017 -0700 > # Node ID 06d6418afe6e73604aea707ef9c5802f5bf27bf4 > # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 > HTTP/2: add debug logging of control frames. > > Signed-off-by: Piotr Sikora > > diff -r 22be63bf21ed -r 06d6418afe6e src/http/v2/ngx_http_v2.c > --- a/src/http/v2/ngx_http_v2.c > +++ b/src/http/v2/ngx_http_v2.c [..] > @@ -2449,8 +2468,18 @@ ngx_http_v2_send_settings(ngx_http_v2_co > ngx_http_v2_srv_conf_t *h2scf; > ngx_http_v2_out_frame_t *frame; > > -ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > - "http2 send SETTINGS frame ack:%ui", ack); > +if (ack) { > +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame ack:1"); > + > +len = 0; > + > +} else { > +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame params:3"); > + > +len = NGX_HTTP_V2_SETTINGS_PARAM_SIZE * 3; > +} > > frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t)); > if (frame == NULL) { > @@ -2462,8 +2491,6 @@ ngx_http_v2_send_settings(ngx_http_v2_co > return NGX_ERROR; > } > > -len = ack ? 0 : (sizeof(uint16_t) + sizeof(uint32_t)) * 3; > - > buf = ngx_create_temp_buf(h2c->pool, NGX_HTTP_V2_FRAME_HEADER_SIZE + > len); > if (buf == NULL) { > return NGX_ERROR; > @@ -2494,15 +2521,27 @@ ngx_http_v2_send_settings(ngx_http_v2_co > h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, > ngx_http_v2_module); > > +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame > MAX_CONCURRENT_STREAMS:%ui", > + h2scf->concurrent_streams); > + > buf->last = ngx_http_v2_write_uint16(buf->last, > > NGX_HTTP_V2_MAX_STREAMS_SETTING); > buf->last = ngx_http_v2_write_uint32(buf->last, > h2scf->concurrent_streams); > > +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame INITIAL_WINDOW_SIZE:%uz", > + h2scf->preread_size); > + > buf->last = ngx_http_v2_write_uint16(buf->last, > > NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING); > buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->preread_size); > > +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, > + "http2 send SETTINGS frame MAX_FRAME_SIZE:%ud", > + NGX_HTTP_V2_MAX_FRAME_SIZE); > + > buf->last = ngx_http_v2_write_uint16(buf->last, > > NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING); > buf->last = ngx_http_v2_write_uint32(buf->last, You can always find these values in configuration, and I can't remember a case where I've ever needed them. On the contrary, there's always a problem with the huge size of typical http/2 debug log. So it's not a good idea to add something just because we can. wbr, Valentin V. Bartenev ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[PATCH] HTTP/2: add debug logging of control frames
# HG changeset patch # User Piotr Sikora# Date 1490516711 25200 # Sun Mar 26 01:25:11 2017 -0700 # Node ID 06d6418afe6e73604aea707ef9c5802f5bf27bf4 # Parent 22be63bf21edaa1b8ea916c7d8cd4e5fe4892061 HTTP/2: add debug logging of control frames. Signed-off-by: Piotr Sikora diff -r 22be63bf21ed -r 06d6418afe6e src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -1955,6 +1955,9 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame ack:1"); + h2c->settings_ack = 1; return ngx_http_v2_state_complete(h2c, pos, end); @@ -1968,6 +1971,10 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame params:%uz", + h2c->state.length / NGX_HTTP_V2_SETTINGS_PARAM_SIZE); + ngx_http_v2_send_settings(h2c, 1); return ngx_http_v2_state_settings_params(h2c, pos, end); @@ -2004,6 +2011,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_FLOW_CTRL_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame INITIAL_WINDOW_SIZE:%ui", + value); + if (ngx_http_v2_adjust_windows(h2c, value - h2c->init_window) != NGX_OK) { @@ -2026,6 +2037,10 @@ ngx_http_v2_state_settings_params(ngx_ht NGX_HTTP_V2_PROTOCOL_ERROR); } +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 SETTINGS frame MAX_FRAME_SIZE:%ui", + value); + h2c->frame_size = value; break; @@ -2070,12 +2085,16 @@ ngx_http_v2_state_ping(ngx_http_v2_conne } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 PING frame, flags: %ud", h2c->state.flags); + "http2 PING frame ack:%ud", + h2c->state.flags & NGX_HTTP_V2_ACK_FLAG ? 1 : 0); if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) { return ngx_http_v2_state_skip(h2c, pos, end); } +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send PING frame ack:1"); + frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_PING_SIZE, NGX_HTTP_V2_PING_FRAME, NGX_HTTP_V2_ACK_FLAG, 0); @@ -2449,8 +2468,18 @@ ngx_http_v2_send_settings(ngx_http_v2_co ngx_http_v2_srv_conf_t *h2scf; ngx_http_v2_out_frame_t *frame; -ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, - "http2 send SETTINGS frame ack:%ui", ack); +if (ack) { +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame ack:1"); + +len = 0; + +} else { +ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame params:3"); + +len = NGX_HTTP_V2_SETTINGS_PARAM_SIZE * 3; +} frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t)); if (frame == NULL) { @@ -2462,8 +2491,6 @@ ngx_http_v2_send_settings(ngx_http_v2_co return NGX_ERROR; } -len = ack ? 0 : (sizeof(uint16_t) + sizeof(uint32_t)) * 3; - buf = ngx_create_temp_buf(h2c->pool, NGX_HTTP_V2_FRAME_HEADER_SIZE + len); if (buf == NULL) { return NGX_ERROR; @@ -2494,15 +2521,27 @@ ngx_http_v2_send_settings(ngx_http_v2_co h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, ngx_http_v2_module); +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame MAX_CONCURRENT_STREAMS:%ui", + h2scf->concurrent_streams); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_MAX_STREAMS_SETTING); buf->last = ngx_http_v2_write_uint32(buf->last, h2scf->concurrent_streams); +ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, + "http2 send SETTINGS frame INITIAL_WINDOW_SIZE:%uz", + h2scf->preread_size); + buf->last = ngx_http_v2_write_uint16(buf->last, NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING); buf->last =