+++ /dev/null
-
-/*
- * Copyright (C) Nginx, Inc.
- * Copyright (C) Valentin V. Bartenev
- */
-
-
-#include <ngx_config.h>
-#include <ngx_core.h>
-#include <ngx_http.h>
-#include <ngx_http_spdy_module.h>
-
-#include <zlib.h>
-
-
-#if (NGX_HAVE_LITTLE_ENDIAN && NGX_HAVE_NONALIGNED)
-
-#define ngx_str5cmp(m, c0, c1, c2, c3, c4) \
- *(uint32_t *) m == (c3 << 24 | c2 << 16 | c1 << 8 | c0) \
- && m[4] == c4
-
-#else
-
-#define ngx_str5cmp(m, c0, c1, c2, c3, c4) \
- m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 && m[4] == c4
-
-#endif
-
-
-#if (NGX_HAVE_NONALIGNED)
-
-#define ngx_spdy_frame_parse_uint16(p) ntohs(*(uint16_t *) (p))
-#define ngx_spdy_frame_parse_uint32(p) ntohl(*(uint32_t *) (p))
-
-#else
-
-#define ngx_spdy_frame_parse_uint16(p) ((p)[0] << 8 | (p)[1])
-#define ngx_spdy_frame_parse_uint32(p) \
- ((p)[0] << 24 | (p)[1] << 16 | (p)[2] << 8 | (p)[3])
-
-#endif
-
-#define ngx_spdy_frame_parse_sid(p) \
- (ngx_spdy_frame_parse_uint32(p) & 0x7fffffff)
-#define ngx_spdy_frame_parse_delta(p) \
- (ngx_spdy_frame_parse_uint32(p) & 0x7fffffff)
-
-
-#define ngx_spdy_ctl_frame_check(h) \
- (((h) & 0xffff0000) == ngx_spdy_ctl_frame_head(0))
-#define ngx_spdy_data_frame_check(h) \
- (!((h) & (uint32_t) NGX_SPDY_CTL_BIT << 31))
-
-#define ngx_spdy_ctl_frame_type(h) ((h) & 0x0000ffff)
-#define ngx_spdy_frame_flags(p) ((p) >> 24)
-#define ngx_spdy_frame_length(p) ((p) & 0x00ffffff)
-#define ngx_spdy_frame_id(p) ((p) & 0x00ffffff)
-
-
-#define NGX_SPDY_SKIP_HEADERS_BUFFER_SIZE 4096
-#define NGX_SPDY_CTL_FRAME_BUFFER_SIZE 16
-
-#define NGX_SPDY_PROTOCOL_ERROR 1
-#define NGX_SPDY_INVALID_STREAM 2
-#define NGX_SPDY_REFUSED_STREAM 3
-#define NGX_SPDY_UNSUPPORTED_VERSION 4
-#define NGX_SPDY_CANCEL 5
-#define NGX_SPDY_INTERNAL_ERROR 6
-#define NGX_SPDY_FLOW_CONTROL_ERROR 7
-#define NGX_SPDY_STREAM_IN_USE 8
-#define NGX_SPDY_STREAM_ALREADY_CLOSED 9
-/* deprecated 10 */
-#define NGX_SPDY_FRAME_TOO_LARGE 11
-
-#define NGX_SPDY_SETTINGS_MAX_STREAMS 4
-#define NGX_SPDY_SETTINGS_INIT_WINDOW 7
-
-#define NGX_SPDY_SETTINGS_FLAG_PERSIST 0x01
-#define NGX_SPDY_SETTINGS_FLAG_PERSISTED 0x02
-
-#define NGX_SPDY_MAX_WINDOW NGX_MAX_INT32_VALUE
-#define NGX_SPDY_CONNECTION_WINDOW 65536
-#define NGX_SPDY_INIT_STREAM_WINDOW 65536
-#define NGX_SPDY_STREAM_WINDOW NGX_SPDY_MAX_WINDOW
-
-typedef struct {
- ngx_uint_t hash;
- u_char len;
- u_char header[7];
- ngx_int_t (*handler)(ngx_http_request_t *r);
-} ngx_http_spdy_request_header_t;
-
-
-static void ngx_http_spdy_read_handler(ngx_event_t *rev);
-static void ngx_http_spdy_write_handler(ngx_event_t *wev);
-static void ngx_http_spdy_handle_connection(ngx_http_spdy_connection_t *sc);
-
-static u_char *ngx_http_spdy_proxy_protocol(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_head(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_syn_stream(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_headers(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_headers_skip(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_headers_error(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_window_update(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_read_data(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_rst_stream(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_ping(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_skip(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_settings(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_complete(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end);
-static u_char *ngx_http_spdy_state_save(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end, ngx_http_spdy_handler_pt handler);
-
-static u_char *ngx_http_spdy_state_inflate_error(
- ngx_http_spdy_connection_t *sc, int rc);
-static u_char *ngx_http_spdy_state_protocol_error(
- ngx_http_spdy_connection_t *sc);
-static u_char *ngx_http_spdy_state_internal_error(
- ngx_http_spdy_connection_t *sc);
-
-static ngx_int_t ngx_http_spdy_send_window_update(
- ngx_http_spdy_connection_t *sc, ngx_uint_t sid, ngx_uint_t delta);
-static ngx_int_t ngx_http_spdy_send_rst_stream(ngx_http_spdy_connection_t *sc,
- ngx_uint_t sid, ngx_uint_t status, ngx_uint_t priority);
-static ngx_int_t ngx_http_spdy_send_settings(ngx_http_spdy_connection_t *sc);
-static ngx_int_t ngx_http_spdy_settings_frame_handler(
- ngx_http_spdy_connection_t *sc, ngx_http_spdy_out_frame_t *frame);
-static ngx_http_spdy_out_frame_t *ngx_http_spdy_get_ctl_frame(
- ngx_http_spdy_connection_t *sc, size_t size, ngx_uint_t priority);
-static ngx_int_t ngx_http_spdy_ctl_frame_handler(
- ngx_http_spdy_connection_t *sc, ngx_http_spdy_out_frame_t *frame);
-
-static ngx_http_spdy_stream_t *ngx_http_spdy_create_stream(
- ngx_http_spdy_connection_t *sc, ngx_uint_t id, ngx_uint_t priority);
-static ngx_http_spdy_stream_t *ngx_http_spdy_get_stream_by_id(
- ngx_http_spdy_connection_t *sc, ngx_uint_t sid);
-#define ngx_http_spdy_streams_index_size(sscf) (sscf->streams_index_mask + 1)
-#define ngx_http_spdy_stream_index(sscf, sid) \
- ((sid >> 1) & sscf->streams_index_mask)
-
-static ngx_int_t ngx_http_spdy_parse_header(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_alloc_large_header_buffer(ngx_http_request_t *r);
-
-static ngx_int_t ngx_http_spdy_handle_request_header(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_parse_method(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_parse_scheme(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_parse_host(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_parse_path(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_parse_version(ngx_http_request_t *r);
-
-static ngx_int_t ngx_http_spdy_construct_request_line(ngx_http_request_t *r);
-static void ngx_http_spdy_run_request(ngx_http_request_t *r);
-static ngx_int_t ngx_http_spdy_init_request_body(ngx_http_request_t *r);
-
-static ngx_int_t ngx_http_spdy_terminate_stream(ngx_http_spdy_connection_t *sc,
- ngx_http_spdy_stream_t *stream, ngx_uint_t status);
-
-static void ngx_http_spdy_close_stream_handler(ngx_event_t *ev);
-
-static void ngx_http_spdy_handle_connection_handler(ngx_event_t *rev);
-static void ngx_http_spdy_keepalive_handler(ngx_event_t *rev);
-static void ngx_http_spdy_finalize_connection(ngx_http_spdy_connection_t *sc,
- ngx_int_t rc);
-
-static ngx_int_t ngx_http_spdy_adjust_windows(ngx_http_spdy_connection_t *sc,
- ssize_t delta);
-
-static void ngx_http_spdy_pool_cleanup(void *data);
-
-static void *ngx_http_spdy_zalloc(void *opaque, u_int items, u_int size);
-static void ngx_http_spdy_zfree(void *opaque, void *address);
-
-
-static const u_char ngx_http_spdy_dict[] = {
- 0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69, /* - - - - o p t i */
- 0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68, /* o n s - - - - h */
- 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x04, 0x70, /* e a d - - - - p */
- 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x70, /* o s t - - - - p */
- 0x75, 0x74, 0x00, 0x00, 0x00, 0x06, 0x64, 0x65, /* u t - - - - d e */
- 0x6c, 0x65, 0x74, 0x65, 0x00, 0x00, 0x00, 0x05, /* l e t e - - - - */
- 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x00, 0x00, /* t r a c e - - - */
- 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x00, /* - a c c e p t - */
- 0x00, 0x00, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, /* - - - a c c e p */
- 0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, /* t - c h a r s e */
- 0x74, 0x00, 0x00, 0x00, 0x0f, 0x61, 0x63, 0x63, /* t - - - - a c c */
- 0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, /* e p t - e n c o */
- 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f, /* d i n g - - - - */
- 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c, /* a c c e p t - l */
- 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, /* a n g u a g e - */
- 0x00, 0x00, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70, /* - - - a c c e p */
- 0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, /* t - r a n g e s */
- 0x00, 0x00, 0x00, 0x03, 0x61, 0x67, 0x65, 0x00, /* - - - - a g e - */
- 0x00, 0x00, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77, /* - - - a l l o w */
- 0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x68, /* - - - - a u t h */
- 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, /* o r i z a t i o */
- 0x6e, 0x00, 0x00, 0x00, 0x0d, 0x63, 0x61, 0x63, /* n - - - - c a c */
- 0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, /* h e - c o n t r */
- 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x6f, /* o l - - - - c o */
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, /* n n e c t i o n */
- 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, /* - - - - c o n t */
- 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65, /* e n t - b a s e */
- 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, 0x6e, 0x74, /* - - - - c o n t */
- 0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, /* e n t - e n c o */
- 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, /* d i n g - - - - */
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, /* c o n t e n t - */
- 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, /* l a n g u a g e */
- 0x00, 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x74, /* - - - - c o n t */
- 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, /* e n t - l e n g */
- 0x74, 0x68, 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, /* t h - - - - c o */
- 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f, /* n t e n t - l o */
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, /* c a t i o n - - */
- 0x00, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, /* - - c o n t e n */
- 0x74, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00, /* t - m d 5 - - - */
- 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, /* - c o n t e n t */
- 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, /* - r a n g e - - */
- 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, /* - - c o n t e n */
- 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, /* t - t y p e - - */
- 0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x00, 0x00, /* - - d a t e - - */
- 0x00, 0x04, 0x65, 0x74, 0x61, 0x67, 0x00, 0x00, /* - - e t a g - - */
- 0x00, 0x06, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, /* - - e x p e c t */
- 0x00, 0x00, 0x00, 0x07, 0x65, 0x78, 0x70, 0x69, /* - - - - e x p i */
- 0x72, 0x65, 0x73, 0x00, 0x00, 0x00, 0x04, 0x66, /* r e s - - - - f */
- 0x72, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x68, /* r o m - - - - h */
- 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x08, 0x69, /* o s t - - - - i */
- 0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, /* f - m a t c h - */
- 0x00, 0x00, 0x11, 0x69, 0x66, 0x2d, 0x6d, 0x6f, /* - - - i f - m o */
- 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73, /* d i f i e d - s */
- 0x69, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x0d, /* i n c e - - - - */
- 0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d, /* i f - n o n e - */
- 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00, /* m a t c h - - - */
- 0x08, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67, /* - i f - r a n g */
- 0x65, 0x00, 0x00, 0x00, 0x13, 0x69, 0x66, 0x2d, /* e - - - - i f - */
- 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, /* u n m o d i f i */
- 0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65, /* e d - s i n c e */
- 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x61, 0x73, 0x74, /* - - - - l a s t */
- 0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, /* - m o d i f i e */
- 0x64, 0x00, 0x00, 0x00, 0x08, 0x6c, 0x6f, 0x63, /* d - - - - l o c */
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, /* a t i o n - - - */
- 0x0c, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72, /* - m a x - f o r */
- 0x77, 0x61, 0x72, 0x64, 0x73, 0x00, 0x00, 0x00, /* w a r d s - - - */
- 0x06, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x00, /* - p r a g m a - */
- 0x00, 0x00, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, /* - - - p r o x y */
- 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, /* - a u t h e n t */
- 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, /* i c a t e - - - */
- 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, /* - p r o x y - a */
- 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, /* u t h o r i z a */
- 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, /* t i o n - - - - */
- 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, 0x00, /* r a n g e - - - */
- 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, /* - r e f e r e r */
- 0x00, 0x00, 0x00, 0x0b, 0x72, 0x65, 0x74, 0x72, /* - - - - r e t r */
- 0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x00, /* y - a f t e r - */
- 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, /* - - - s e r v e */
- 0x72, 0x00, 0x00, 0x00, 0x02, 0x74, 0x65, 0x00, /* r - - - - t e - */
- 0x00, 0x00, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, /* - - - t r a i l */
- 0x65, 0x72, 0x00, 0x00, 0x00, 0x11, 0x74, 0x72, /* e r - - - - t r */
- 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, /* a n s f e r - e */
- 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x00, /* n c o d i n g - */
- 0x00, 0x00, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, /* - - - u p g r a */
- 0x64, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x75, 0x73, /* d e - - - - u s */
- 0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, /* e r - a g e n t */
- 0x00, 0x00, 0x00, 0x04, 0x76, 0x61, 0x72, 0x79, /* - - - - v a r y */
- 0x00, 0x00, 0x00, 0x03, 0x76, 0x69, 0x61, 0x00, /* - - - - v i a - */
- 0x00, 0x00, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, /* - - - w a r n i */
- 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, 0x77, 0x77, /* n g - - - - w w */
- 0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, /* w - a u t h e n */
- 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, /* t i c a t e - - */
- 0x00, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, /* - - m e t h o d */
- 0x00, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00, /* - - - - g e t - */
- 0x00, 0x00, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, /* - - - s t a t u */
- 0x73, 0x00, 0x00, 0x00, 0x06, 0x32, 0x30, 0x30, /* s - - - - 2 0 0 */
- 0x20, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x76, /* - O K - - - - v */
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, /* e r s i o n - - */
- 0x00, 0x08, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, /* - - H T T P - 1 */
- 0x2e, 0x31, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72, /* - 1 - - - - u r */
- 0x6c, 0x00, 0x00, 0x00, 0x06, 0x70, 0x75, 0x62, /* l - - - - p u b */
- 0x6c, 0x69, 0x63, 0x00, 0x00, 0x00, 0x0a, 0x73, /* l i c - - - - s */
- 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6f, 0x6b, 0x69, /* e t - c o o k i */
- 0x65, 0x00, 0x00, 0x00, 0x0a, 0x6b, 0x65, 0x65, /* e - - - - k e e */
- 0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x00, /* p - a l i v e - */
- 0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, /* - - - o r i g i */
- 0x6e, 0x31, 0x30, 0x30, 0x31, 0x30, 0x31, 0x32, /* n 1 0 0 1 0 1 2 */
- 0x30, 0x31, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35, /* 0 1 2 0 2 2 0 5 */
- 0x32, 0x30, 0x36, 0x33, 0x30, 0x30, 0x33, 0x30, /* 2 0 6 3 0 0 3 0 */
- 0x32, 0x33, 0x30, 0x33, 0x33, 0x30, 0x34, 0x33, /* 2 3 0 3 3 0 4 3 */
- 0x30, 0x35, 0x33, 0x30, 0x36, 0x33, 0x30, 0x37, /* 0 5 3 0 6 3 0 7 */
- 0x34, 0x30, 0x32, 0x34, 0x30, 0x35, 0x34, 0x30, /* 4 0 2 4 0 5 4 0 */
- 0x36, 0x34, 0x30, 0x37, 0x34, 0x30, 0x38, 0x34, /* 6 4 0 7 4 0 8 4 */
- 0x30, 0x39, 0x34, 0x31, 0x30, 0x34, 0x31, 0x31, /* 0 9 4 1 0 4 1 1 */
- 0x34, 0x31, 0x32, 0x34, 0x31, 0x33, 0x34, 0x31, /* 4 1 2 4 1 3 4 1 */
- 0x34, 0x34, 0x31, 0x35, 0x34, 0x31, 0x36, 0x34, /* 4 4 1 5 4 1 6 4 */
- 0x31, 0x37, 0x35, 0x30, 0x32, 0x35, 0x30, 0x34, /* 1 7 5 0 2 5 0 4 */
- 0x35, 0x30, 0x35, 0x32, 0x30, 0x33, 0x20, 0x4e, /* 5 0 5 2 0 3 - N */
- 0x6f, 0x6e, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f, /* o n - A u t h o */
- 0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, /* r i t a t i v e */
- 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, /* - I n f o r m a */
- 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x34, 0x20, /* t i o n 2 0 4 - */
- 0x4e, 0x6f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, /* N o - C o n t e */
- 0x6e, 0x74, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f, /* n t 3 0 1 - M o */
- 0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d, /* v e d - P e r m */
- 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x34, /* a n e n t l y 4 */
- 0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52, /* 0 0 - B a d - R */
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x34, 0x30, /* e q u e s t 4 0 */
- 0x31, 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, /* 1 - U n a u t h */
- 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x34, 0x30, /* o r i z e d 4 0 */
- 0x33, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, /* 3 - F o r b i d */
- 0x64, 0x65, 0x6e, 0x34, 0x30, 0x34, 0x20, 0x4e, /* d e n 4 0 4 - N */
- 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, /* o t - F o u n d */
- 0x35, 0x30, 0x30, 0x20, 0x49, 0x6e, 0x74, 0x65, /* 5 0 0 - I n t e */
- 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, /* r n a l - S e r */
- 0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, /* v e r - E r r o */
- 0x72, 0x35, 0x30, 0x31, 0x20, 0x4e, 0x6f, 0x74, /* r 5 0 1 - N o t */
- 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, /* - I m p l e m e */
- 0x6e, 0x74, 0x65, 0x64, 0x35, 0x30, 0x33, 0x20, /* n t e d 5 0 3 - */
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, /* S e r v i c e - */
- 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, /* U n a v a i l a */
- 0x62, 0x6c, 0x65, 0x4a, 0x61, 0x6e, 0x20, 0x46, /* b l e J a n - F */
- 0x65, 0x62, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x41, /* e b - M a r - A */
- 0x70, 0x72, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x4a, /* p r - M a y - J */
- 0x75, 0x6e, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x41, /* u n - J u l - A */
- 0x75, 0x67, 0x20, 0x53, 0x65, 0x70, 0x74, 0x20, /* u g - S e p t - */
- 0x4f, 0x63, 0x74, 0x20, 0x4e, 0x6f, 0x76, 0x20, /* O c t - N o v - */
- 0x44, 0x65, 0x63, 0x20, 0x30, 0x30, 0x3a, 0x30, /* D e c - 0 0 - 0 */
- 0x30, 0x3a, 0x30, 0x30, 0x20, 0x4d, 0x6f, 0x6e, /* 0 - 0 0 - M o n */
- 0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57, /* - - T u e - - W */
- 0x65, 0x64, 0x2c, 0x20, 0x54, 0x68, 0x75, 0x2c, /* e d - - T h u - */
- 0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61, /* - F r i - - S a */
- 0x74, 0x2c, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, /* t - - S u n - - */
- 0x47, 0x4d, 0x54, 0x63, 0x68, 0x75, 0x6e, 0x6b, /* G M T c h u n k */
- 0x65, 0x64, 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, /* e d - t e x t - */
- 0x68, 0x74, 0x6d, 0x6c, 0x2c, 0x69, 0x6d, 0x61, /* h t m l - i m a */
- 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69, /* g e - p n g - i */
- 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x67, /* m a g e - j p g */
- 0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, /* - i m a g e - g */
- 0x69, 0x66, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, /* i f - a p p l i */
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, /* c a t i o n - x */
- 0x6d, 0x6c, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, /* m l - a p p l i */
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, /* c a t i o n - x */
- 0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, /* h t m l - x m l */
- 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, /* - t e x t - p l */
- 0x61, 0x69, 0x6e, 0x2c, 0x74, 0x65, 0x78, 0x74, /* a i n - t e x t */
- 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, /* - j a v a s c r */
- 0x69, 0x70, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c, /* i p t - p u b l */
- 0x69, 0x63, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, /* i c p r i v a t */
- 0x65, 0x6d, 0x61, 0x78, 0x2d, 0x61, 0x67, 0x65, /* e m a x - a g e */
- 0x3d, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65, /* - g z i p - d e */
- 0x66, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x73, 0x64, /* f l a t e - s d */
- 0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, /* c h c h a r s e */
- 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x63, /* t - u t f - 8 c */
- 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x69, /* h a r s e t - i */
- 0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, /* s o - 8 8 5 9 - */
- 0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x2c, 0x2a, /* 1 - u t f - - - */
- 0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e /* - e n q - 0 - */
-};
-
-
-static ngx_http_spdy_request_header_t ngx_http_spdy_request_headers[] = {
- { 0, 6, "method", ngx_http_spdy_parse_method },
- { 0, 6, "scheme", ngx_http_spdy_parse_scheme },
- { 0, 4, "host", ngx_http_spdy_parse_host },
- { 0, 4, "path", ngx_http_spdy_parse_path },
- { 0, 7, "version", ngx_http_spdy_parse_version },
-};
-
-#define NGX_SPDY_REQUEST_HEADERS \
- (sizeof(ngx_http_spdy_request_headers) \
- / sizeof(ngx_http_spdy_request_header_t))
-
-
-void
-ngx_http_spdy_init(ngx_event_t *rev)
-{
- int rc;
- ngx_connection_t *c;
- ngx_pool_cleanup_t *cln;
- ngx_http_connection_t *hc;
- ngx_http_spdy_srv_conf_t *sscf;
- ngx_http_spdy_main_conf_t *smcf;
- ngx_http_spdy_connection_t *sc;
-
- c = rev->data;
- hc = c->data;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "init spdy request");
-
- c->log->action = "processing SPDY";
-
- smcf = ngx_http_get_module_main_conf(hc->conf_ctx, ngx_http_spdy_module);
-
- if (smcf->recv_buffer == NULL) {
- smcf->recv_buffer = ngx_palloc(ngx_cycle->pool, smcf->recv_buffer_size);
- if (smcf->recv_buffer == NULL) {
- ngx_http_close_connection(c);
- return;
- }
- }
-
- sc = ngx_pcalloc(c->pool, sizeof(ngx_http_spdy_connection_t));
- if (sc == NULL) {
- ngx_http_close_connection(c);
- return;
- }
-
- sc->connection = c;
- sc->http_connection = hc;
-
- sc->send_window = NGX_SPDY_CONNECTION_WINDOW;
- sc->recv_window = NGX_SPDY_CONNECTION_WINDOW;
-
- sc->init_window = NGX_SPDY_INIT_STREAM_WINDOW;
-
- sc->handler = hc->proxy_protocol ? ngx_http_spdy_proxy_protocol
- : ngx_http_spdy_state_head;
-
- sc->zstream_in.zalloc = ngx_http_spdy_zalloc;
- sc->zstream_in.zfree = ngx_http_spdy_zfree;
- sc->zstream_in.opaque = sc;
-
- rc = inflateInit(&sc->zstream_in);
- if (rc != Z_OK) {
- ngx_log_error(NGX_LOG_ALERT, c->log, 0,
- "inflateInit() failed: %d", rc);
- ngx_http_close_connection(c);
- return;
- }
-
- sc->zstream_out.zalloc = ngx_http_spdy_zalloc;
- sc->zstream_out.zfree = ngx_http_spdy_zfree;
- sc->zstream_out.opaque = sc;
-
- sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_spdy_module);
-
- rc = deflateInit2(&sc->zstream_out, (int) sscf->headers_comp,
- Z_DEFLATED, 11, 4, Z_DEFAULT_STRATEGY);
-
- if (rc != Z_OK) {
- ngx_log_error(NGX_LOG_ALERT, c->log, 0,
- "deflateInit2() failed: %d", rc);
- ngx_http_close_connection(c);
- return;
- }
-
- rc = deflateSetDictionary(&sc->zstream_out, ngx_http_spdy_dict,
- sizeof(ngx_http_spdy_dict));
- if (rc != Z_OK) {
- ngx_log_error(NGX_LOG_ALERT, c->log, 0,
- "deflateSetDictionary() failed: %d", rc);
- ngx_http_close_connection(c);
- return;
- }
-
- sc->pool = ngx_create_pool(sscf->pool_size, sc->connection->log);
- if (sc->pool == NULL) {
- ngx_http_close_connection(c);
- return;
- }
-
- cln = ngx_pool_cleanup_add(c->pool, sizeof(ngx_pool_cleanup_file_t));
- if (cln == NULL) {
- ngx_http_close_connection(c);
- return;
- }
-
- cln->handler = ngx_http_spdy_pool_cleanup;
- cln->data = sc;
-
- sc->streams_index = ngx_pcalloc(sc->pool,
- ngx_http_spdy_streams_index_size(sscf)
- * sizeof(ngx_http_spdy_stream_t *));
- if (sc->streams_index == NULL) {
- ngx_http_close_connection(c);
- return;
- }
-
- if (ngx_http_spdy_send_settings(sc) == NGX_ERROR) {
- ngx_http_close_connection(c);
- return;
- }
-
- if (ngx_http_spdy_send_window_update(sc, 0, NGX_SPDY_MAX_WINDOW
- - sc->recv_window)
- == NGX_ERROR)
- {
- ngx_http_close_connection(c);
- return;
- }
-
- sc->recv_window = NGX_SPDY_MAX_WINDOW;
-
- ngx_queue_init(&sc->waiting);
- ngx_queue_init(&sc->posted);
-
- c->data = sc;
-
- rev->handler = ngx_http_spdy_read_handler;
- c->write->handler = ngx_http_spdy_write_handler;
-
- ngx_http_spdy_read_handler(rev);
-}
-
-
-static void
-ngx_http_spdy_read_handler(ngx_event_t *rev)
-{
- u_char *p, *end;
- size_t available;
- ssize_t n;
- ngx_connection_t *c;
- ngx_http_spdy_main_conf_t *smcf;
- ngx_http_spdy_connection_t *sc;
-
- c = rev->data;
- sc = c->data;
-
- if (rev->timedout) {
- ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_REQUEST_TIME_OUT);
- return;
- }
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "spdy read handler");
-
- sc->blocked = 1;
-
- smcf = ngx_http_get_module_main_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- available = smcf->recv_buffer_size - 2 * NGX_SPDY_STATE_BUFFER_SIZE;
-
- do {
- p = smcf->recv_buffer;
-
- ngx_memcpy(p, sc->buffer, NGX_SPDY_STATE_BUFFER_SIZE);
- end = p + sc->buffer_used;
-
- n = c->recv(c, end, available);
-
- if (n == NGX_AGAIN) {
- break;
- }
-
- if (n == 0 && (sc->incomplete || sc->processing)) {
- ngx_log_error(NGX_LOG_INFO, c->log, 0,
- "client prematurely closed connection");
- }
-
- if (n == 0 || n == NGX_ERROR) {
- ngx_http_spdy_finalize_connection(sc,
- NGX_HTTP_CLIENT_CLOSED_REQUEST);
- return;
- }
-
- end += n;
-
- sc->buffer_used = 0;
- sc->incomplete = 0;
-
- do {
- p = sc->handler(sc, p, end);
-
- if (p == NULL) {
- return;
- }
-
- } while (p != end);
-
- } while (rev->ready);
-
- if (ngx_handle_read_event(rev, 0) != NGX_OK) {
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_INTERNAL_SERVER_ERROR);
- return;
- }
-
- if (sc->last_out && ngx_http_spdy_send_output_queue(sc) == NGX_ERROR) {
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_CLIENT_CLOSED_REQUEST);
- return;
- }
-
- sc->blocked = 0;
-
- if (sc->processing) {
- if (rev->timer_set) {
- ngx_del_timer(rev);
- }
- return;
- }
-
- ngx_http_spdy_handle_connection(sc);
-}
-
-
-static void
-ngx_http_spdy_write_handler(ngx_event_t *wev)
-{
- ngx_int_t rc;
- ngx_queue_t *q;
- ngx_connection_t *c;
- ngx_http_spdy_stream_t *stream;
- ngx_http_spdy_connection_t *sc;
-
- c = wev->data;
- sc = c->data;
-
- if (wev->timedout) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
- "spdy write event timed out");
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_CLIENT_CLOSED_REQUEST);
- return;
- }
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "spdy write handler");
-
- sc->blocked = 1;
-
- rc = ngx_http_spdy_send_output_queue(sc);
-
- if (rc == NGX_ERROR) {
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_CLIENT_CLOSED_REQUEST);
- return;
- }
-
- while (!ngx_queue_empty(&sc->posted)) {
- q = ngx_queue_head(&sc->posted);
-
- ngx_queue_remove(q);
-
- stream = ngx_queue_data(q, ngx_http_spdy_stream_t, queue);
-
- stream->handled = 0;
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
- "run spdy stream %ui", stream->id);
-
- wev = stream->request->connection->write;
- wev->handler(wev);
- }
-
- sc->blocked = 0;
-
- if (rc == NGX_AGAIN) {
- return;
- }
-
- ngx_http_spdy_handle_connection(sc);
-}
-
-
-ngx_int_t
-ngx_http_spdy_send_output_queue(ngx_http_spdy_connection_t *sc)
-{
- int tcp_nodelay;
- ngx_chain_t *cl;
- ngx_event_t *wev;
- ngx_connection_t *c;
- ngx_http_core_loc_conf_t *clcf;
- ngx_http_spdy_out_frame_t *out, *frame, *fn;
-
- c = sc->connection;
-
- if (c->error) {
- return NGX_ERROR;
- }
-
- wev = c->write;
-
- if (!wev->ready) {
- return NGX_OK;
- }
-
- cl = NULL;
- out = NULL;
-
- for (frame = sc->last_out; frame; frame = fn) {
- frame->last->next = cl;
- cl = frame->first;
-
- fn = frame->next;
- frame->next = out;
- out = frame;
-
- ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0,
- "spdy frame out: %p sid:%ui prio:%ui bl:%d len:%uz",
- out, out->stream ? out->stream->id : 0, out->priority,
- out->blocked, out->length);
- }
-
- cl = c->send_chain(c, cl, 0);
-
- if (cl == NGX_CHAIN_ERROR) {
- goto error;
- }
-
- clcf = ngx_http_get_module_loc_conf(sc->http_connection->conf_ctx,
- ngx_http_core_module);
-
- if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
- goto error;
- }
-
- if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) {
- if (ngx_tcp_push(c->fd) == -1) {
- ngx_connection_error(c, ngx_socket_errno, ngx_tcp_push_n " failed");
- goto error;
- }
-
- c->tcp_nopush = NGX_TCP_NOPUSH_UNSET;
- tcp_nodelay = ngx_tcp_nodelay_and_tcp_nopush ? 1 : 0;
-
- } else {
- tcp_nodelay = 1;
- }
-
- if (tcp_nodelay
- && clcf->tcp_nodelay
- && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET)
- {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "tcp_nodelay");
-
- if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
- (const void *) &tcp_nodelay, sizeof(int))
- == -1)
- {
-#if (NGX_SOLARIS)
- /* Solaris returns EINVAL if a socket has been shut down */
- c->log_error = NGX_ERROR_IGNORE_EINVAL;
-#endif
-
- ngx_connection_error(c, ngx_socket_errno,
- "setsockopt(TCP_NODELAY) failed");
-
- c->log_error = NGX_ERROR_INFO;
- goto error;
- }
-
- c->tcp_nodelay = NGX_TCP_NODELAY_SET;
- }
-
- if (cl) {
- ngx_add_timer(wev, clcf->send_timeout);
-
- } else {
- if (wev->timer_set) {
- ngx_del_timer(wev);
- }
- }
-
- for ( /* void */ ; out; out = fn) {
- fn = out->next;
-
- if (out->handler(sc, out) != NGX_OK) {
- out->blocked = 1;
- out->priority = NGX_SPDY_HIGHEST_PRIORITY;
- break;
- }
-
- ngx_log_debug4(NGX_LOG_DEBUG_HTTP, c->log, 0,
- "spdy frame sent: %p sid:%ui bl:%d len:%uz",
- out, out->stream ? out->stream->id : 0,
- out->blocked, out->length);
- }
-
- frame = NULL;
-
- for ( /* void */ ; out; out = fn) {
- fn = out->next;
- out->next = frame;
- frame = out;
- }
-
- sc->last_out = frame;
-
- return NGX_OK;
-
-error:
-
- c->error = 1;
-
- if (!sc->blocked) {
- ngx_post_event(wev, &ngx_posted_events);
- }
-
- return NGX_ERROR;
-}
-
-
-static void
-ngx_http_spdy_handle_connection(ngx_http_spdy_connection_t *sc)
-{
- ngx_connection_t *c;
- ngx_http_spdy_srv_conf_t *sscf;
-
- if (sc->last_out || sc->processing) {
- return;
- }
-
- c = sc->connection;
-
- if (c->error) {
- ngx_http_close_connection(c);
- return;
- }
-
- if (c->buffered) {
- return;
- }
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
- if (sc->incomplete) {
- ngx_add_timer(c->read, sscf->recv_timeout);
- return;
- }
-
- if (ngx_terminate || ngx_exiting) {
- ngx_http_close_connection(c);
- return;
- }
-
- ngx_destroy_pool(sc->pool);
-
- sc->pool = NULL;
- sc->free_ctl_frames = NULL;
- sc->free_fake_connections = NULL;
-
-#if (NGX_HTTP_SSL)
- if (c->ssl) {
- ngx_ssl_free_buffer(c);
- }
-#endif
-
- c->destroyed = 1;
- c->idle = 1;
- ngx_reusable_connection(c, 1);
-
- c->write->handler = ngx_http_empty_handler;
- c->read->handler = ngx_http_spdy_keepalive_handler;
-
- if (c->write->timer_set) {
- ngx_del_timer(c->write);
- }
-
- ngx_add_timer(c->read, sscf->keepalive_timeout);
-}
-
-
-static u_char *
-ngx_http_spdy_proxy_protocol(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_log_t *log;
-
- log = sc->connection->log;
- log->action = "reading PROXY protocol";
-
- pos = ngx_proxy_protocol_read(sc->connection, pos, end);
-
- log->action = "processing SPDY";
-
- if (pos == NULL) {
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_head(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- uint32_t head, flen;
- ngx_uint_t type;
-
- if (end - pos < NGX_SPDY_FRAME_HEADER_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_head);
- }
-
- head = ngx_spdy_frame_parse_uint32(pos);
-
- pos += sizeof(uint32_t);
-
- flen = ngx_spdy_frame_parse_uint32(pos);
-
- sc->flags = ngx_spdy_frame_flags(flen);
- sc->length = ngx_spdy_frame_length(flen);
-
- pos += sizeof(uint32_t);
-
- ngx_log_debug3(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "process spdy frame head:%08XD f:%Xd l:%uz",
- head, sc->flags, sc->length);
-
- if (ngx_spdy_ctl_frame_check(head)) {
- type = ngx_spdy_ctl_frame_type(head);
-
- switch (type) {
-
- case NGX_SPDY_SYN_STREAM:
- return ngx_http_spdy_state_syn_stream(sc, pos, end);
-
- case NGX_SPDY_SYN_REPLY:
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent unexpected SYN_REPLY frame");
- return ngx_http_spdy_state_protocol_error(sc);
-
- case NGX_SPDY_RST_STREAM:
- return ngx_http_spdy_state_rst_stream(sc, pos, end);
-
- case NGX_SPDY_SETTINGS:
- return ngx_http_spdy_state_settings(sc, pos, end);
-
- case NGX_SPDY_PING:
- return ngx_http_spdy_state_ping(sc, pos, end);
-
- case NGX_SPDY_GOAWAY:
- return ngx_http_spdy_state_skip(sc, pos, end); /* TODO */
-
- case NGX_SPDY_HEADERS:
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent unexpected HEADERS frame");
- return ngx_http_spdy_state_protocol_error(sc);
-
- case NGX_SPDY_WINDOW_UPDATE:
- return ngx_http_spdy_state_window_update(sc, pos, end);
-
- default:
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy control frame with unknown type %ui", type);
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
- }
-
- if (ngx_spdy_data_frame_check(head)) {
- sc->stream = ngx_http_spdy_get_stream_by_id(sc, head);
- return ngx_http_spdy_state_data(sc, pos, end);
- }
-
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent invalid frame");
-
- return ngx_http_spdy_state_protocol_error(sc);
-}
-
-
-static u_char *
-ngx_http_spdy_state_syn_stream(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_uint_t sid, prio;
- ngx_http_spdy_stream_t *stream;
- ngx_http_spdy_srv_conf_t *sscf;
-
- if (end - pos < NGX_SPDY_SYN_STREAM_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_syn_stream);
- }
-
- if (sc->length <= NGX_SPDY_SYN_STREAM_SIZE) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent SYN_STREAM frame with incorrect length %uz",
- sc->length);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- sc->length -= NGX_SPDY_SYN_STREAM_SIZE;
-
- sid = ngx_spdy_frame_parse_sid(pos);
- prio = pos[8] >> 5;
-
- pos += NGX_SPDY_SYN_STREAM_SIZE;
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy SYN_STREAM frame sid:%ui prio:%ui", sid, prio);
-
- if (sid % 2 == 0 || sid <= sc->last_sid) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent SYN_STREAM frame "
- "with invalid Stream-ID %ui", sid);
-
- stream = ngx_http_spdy_get_stream_by_id(sc, sid);
-
- if (stream) {
- if (ngx_http_spdy_terminate_stream(sc, stream,
- NGX_SPDY_PROTOCOL_ERROR)
- != NGX_OK)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
- }
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- sc->last_sid = sid;
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- if (sc->processing >= sscf->concurrent_streams) {
-
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "concurrent streams exceeded %ui", sc->processing);
-
- if (ngx_http_spdy_send_rst_stream(sc, sid, NGX_SPDY_REFUSED_STREAM,
- prio)
- != NGX_OK)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
-
- stream = ngx_http_spdy_create_stream(sc, sid, prio);
- if (stream == NULL) {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- stream->in_closed = (sc->flags & NGX_SPDY_FLAG_FIN) ? 1 : 0;
-
- stream->request->request_length = NGX_SPDY_FRAME_HEADER_SIZE
- + NGX_SPDY_SYN_STREAM_SIZE
- + sc->length;
-
- sc->stream = stream;
-
- return ngx_http_spdy_state_headers(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_headers(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- int z;
- size_t size;
- ngx_buf_t *buf;
- ngx_int_t rc;
- ngx_http_request_t *r;
-
- size = end - pos;
-
- if (size == 0) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_headers);
- }
-
- if (size > sc->length) {
- size = sc->length;
- }
-
- r = sc->stream->request;
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "process spdy header block %uz of %uz", size, sc->length);
-
- buf = r->header_in;
-
- sc->zstream_in.next_in = pos;
- sc->zstream_in.avail_in = size;
- sc->zstream_in.next_out = buf->last;
-
- /* one byte is reserved for null-termination of the last header value */
- sc->zstream_in.avail_out = buf->end - buf->last - 1;
-
- z = inflate(&sc->zstream_in, Z_NO_FLUSH);
-
- if (z == Z_NEED_DICT) {
- z = inflateSetDictionary(&sc->zstream_in, ngx_http_spdy_dict,
- sizeof(ngx_http_spdy_dict));
-
- if (z != Z_OK) {
- if (z == Z_DATA_ERROR) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent SYN_STREAM frame with header "
- "block encoded using wrong dictionary: %ul",
- (u_long) sc->zstream_in.adler);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
- "inflateSetDictionary() failed: %d", z);
-
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy inflateSetDictionary(): %d", z);
-
- z = sc->zstream_in.avail_in ? inflate(&sc->zstream_in, Z_NO_FLUSH)
- : Z_OK;
- }
-
- ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
- sc->zstream_in.next_in, sc->zstream_in.next_out,
- sc->zstream_in.avail_in, sc->zstream_in.avail_out,
- z);
-
- if (z != Z_OK) {
- return ngx_http_spdy_state_inflate_error(sc, z);
- }
-
- sc->length -= sc->zstream_in.next_in - pos;
- pos = sc->zstream_in.next_in;
-
- buf->last = sc->zstream_in.next_out;
-
- if (r->headers_in.headers.part.elts == NULL) {
-
- if (buf->last - buf->pos < NGX_SPDY_NV_NUM_SIZE) {
-
- if (sc->length == 0) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "premature end of spdy header block");
-
- return ngx_http_spdy_state_headers_error(sc, pos, end);
- }
-
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_headers);
- }
-
- sc->entries = ngx_spdy_frame_parse_uint32(buf->pos);
-
- buf->pos += NGX_SPDY_NV_NUM_SIZE;
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy header block has %ui entries",
- sc->entries);
-
- if (ngx_list_init(&r->headers_in.headers, r->pool, 20,
- sizeof(ngx_table_elt_t))
- != NGX_OK)
- {
- ngx_http_spdy_close_stream(sc->stream,
- NGX_HTTP_INTERNAL_SERVER_ERROR);
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
-
- if (ngx_array_init(&r->headers_in.cookies, r->pool, 2,
- sizeof(ngx_table_elt_t *))
- != NGX_OK)
- {
- ngx_http_spdy_close_stream(sc->stream,
- NGX_HTTP_INTERNAL_SERVER_ERROR);
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
- }
-
- while (sc->entries) {
-
- rc = ngx_http_spdy_parse_header(r);
-
- switch (rc) {
-
- case NGX_DONE:
- sc->entries--;
-
- case NGX_OK:
- break;
-
- case NGX_AGAIN:
-
- if (sc->zstream_in.avail_in) {
-
- rc = ngx_http_spdy_alloc_large_header_buffer(r);
-
- if (rc == NGX_DECLINED) {
- ngx_http_finalize_request(r,
- NGX_HTTP_REQUEST_HEADER_TOO_LARGE);
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
-
- if (rc != NGX_OK) {
- ngx_http_spdy_close_stream(sc->stream,
- NGX_HTTP_INTERNAL_SERVER_ERROR);
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
-
- /* null-terminate the last processed header name or value */
- *buf->pos = '\0';
-
- buf = r->header_in;
-
- sc->zstream_in.next_out = buf->last;
-
- /* one byte is reserved for null-termination */
- sc->zstream_in.avail_out = buf->end - buf->last - 1;
-
- z = inflate(&sc->zstream_in, Z_NO_FLUSH);
-
- ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
- sc->zstream_in.next_in, sc->zstream_in.next_out,
- sc->zstream_in.avail_in, sc->zstream_in.avail_out,
- z);
-
- if (z != Z_OK) {
- return ngx_http_spdy_state_inflate_error(sc, z);
- }
-
- sc->length -= sc->zstream_in.next_in - pos;
- pos = sc->zstream_in.next_in;
-
- buf->last = sc->zstream_in.next_out;
-
- continue;
- }
-
- if (sc->length == 0) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "premature end of spdy header block");
-
- return ngx_http_spdy_state_headers_error(sc, pos, end);
- }
-
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_headers);
-
- case NGX_HTTP_PARSE_INVALID_HEADER:
- ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
-
- default: /* NGX_ERROR */
- return ngx_http_spdy_state_headers_error(sc, pos, end);
- }
-
- /* a header line has been parsed successfully */
-
- rc = ngx_http_spdy_handle_request_header(r);
-
- if (rc != NGX_OK) {
- if (rc == NGX_HTTP_PARSE_INVALID_HEADER) {
- ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
-
- if (rc != NGX_ABORT) {
- ngx_http_spdy_close_stream(sc->stream,
- NGX_HTTP_INTERNAL_SERVER_ERROR);
- }
-
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
- }
- }
-
- if (buf->pos != buf->last || sc->zstream_in.avail_in) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "incorrect number of spdy header block entries");
-
- return ngx_http_spdy_state_headers_error(sc, pos, end);
- }
-
- if (sc->length) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_headers);
- }
-
- /* null-terminate the last header value */
- *buf->pos = '\0';
-
- ngx_http_spdy_run_request(r);
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_headers_skip(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- int n;
- size_t size;
- u_char buffer[NGX_SPDY_SKIP_HEADERS_BUFFER_SIZE];
-
- if (sc->length == 0) {
- return ngx_http_spdy_state_complete(sc, pos, end);
- }
-
- size = end - pos;
-
- if (size == 0) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_headers_skip);
- }
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy header block skip %uz of %uz", size, sc->length);
-
- sc->zstream_in.next_in = pos;
- sc->zstream_in.avail_in = (size < sc->length) ? size : sc->length;
-
- while (sc->zstream_in.avail_in) {
- sc->zstream_in.next_out = buffer;
- sc->zstream_in.avail_out = NGX_SPDY_SKIP_HEADERS_BUFFER_SIZE;
-
- n = inflate(&sc->zstream_in, Z_NO_FLUSH);
-
- ngx_log_debug5(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d",
- sc->zstream_in.next_in, sc->zstream_in.next_out,
- sc->zstream_in.avail_in, sc->zstream_in.avail_out,
- n);
-
- if (n != Z_OK) {
- return ngx_http_spdy_state_inflate_error(sc, n);
- }
- }
-
- pos = sc->zstream_in.next_in;
-
- if (size < sc->length) {
- sc->length -= size;
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_headers_skip);
- }
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_headers_error(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_http_spdy_stream_t *stream;
-
- stream = sc->stream;
-
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent SYN_STREAM frame for stream %ui "
- "with invalid header block", stream->id);
-
- if (ngx_http_spdy_send_rst_stream(sc, stream->id, NGX_SPDY_PROTOCOL_ERROR,
- stream->priority)
- != NGX_OK)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- stream->out_closed = 1;
-
- ngx_http_spdy_close_stream(stream, NGX_HTTP_BAD_REQUEST);
-
- return ngx_http_spdy_state_headers_skip(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_window_update(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- size_t delta;
- ngx_uint_t sid;
- ngx_event_t *wev;
- ngx_queue_t *q;
- ngx_http_spdy_stream_t *stream;
-
- if (end - pos < NGX_SPDY_WINDOW_UPDATE_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_window_update);
- }
-
- if (sc->length != NGX_SPDY_WINDOW_UPDATE_SIZE) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent WINDOW_UPDATE frame "
- "with incorrect length %uz", sc->length);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- sid = ngx_spdy_frame_parse_sid(pos);
-
- pos += NGX_SPDY_SID_SIZE;
-
- delta = ngx_spdy_frame_parse_delta(pos);
-
- pos += NGX_SPDY_DELTA_SIZE;
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy WINDOW_UPDATE sid:%ui delta:%uz", sid, delta);
-
- if (sid) {
- stream = ngx_http_spdy_get_stream_by_id(sc, sid);
-
- if (stream == NULL) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "unknown spdy stream");
-
- return ngx_http_spdy_state_complete(sc, pos, end);
- }
-
- if (stream->send_window > (ssize_t) (NGX_SPDY_MAX_WINDOW - delta)) {
-
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client violated flow control for stream %ui: "
- "received WINDOW_UPDATE frame with delta %uz "
- "not allowed for window %z",
- sid, delta, stream->send_window);
-
- if (ngx_http_spdy_terminate_stream(sc, stream,
- NGX_SPDY_FLOW_CONTROL_ERROR)
- == NGX_ERROR)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- return ngx_http_spdy_state_complete(sc, pos, end);
- }
-
- stream->send_window += delta;
-
- if (stream->exhausted) {
- stream->exhausted = 0;
-
- wev = stream->request->connection->write;
-
- if (!wev->timer_set) {
- wev->delayed = 0;
- wev->handler(wev);
- }
- }
-
- } else {
- sc->send_window += delta;
-
- if (sc->send_window > NGX_SPDY_MAX_WINDOW) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client violated connection flow control: "
- "received WINDOW_UPDATE frame with delta %uz "
- "not allowed for window %uz",
- delta, sc->send_window);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- while (!ngx_queue_empty(&sc->waiting)) {
- q = ngx_queue_head(&sc->waiting);
-
- ngx_queue_remove(q);
-
- stream = ngx_queue_data(q, ngx_http_spdy_stream_t, queue);
-
- stream->handled = 0;
-
- wev = stream->request->connection->write;
-
- if (!wev->timer_set) {
- wev->delayed = 0;
- wev->handler(wev);
-
- if (sc->send_window == 0) {
- break;
- }
- }
- }
- }
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_http_spdy_stream_t *stream;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy DATA frame");
-
- if (sc->length > sc->recv_window) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client violated connection flow control: "
- "received DATA frame length %uz, available window %uz",
- sc->length, sc->recv_window);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- sc->recv_window -= sc->length;
-
- if (sc->recv_window < NGX_SPDY_MAX_WINDOW / 4) {
-
- if (ngx_http_spdy_send_window_update(sc, 0,
- NGX_SPDY_MAX_WINDOW
- - sc->recv_window)
- == NGX_ERROR)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- sc->recv_window = NGX_SPDY_MAX_WINDOW;
- }
-
- stream = sc->stream;
-
- if (stream == NULL) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "unknown spdy stream");
-
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
-
- if (sc->length > stream->recv_window) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client violated flow control for stream %ui: "
- "received DATA frame length %uz, available window %uz",
- stream->id, sc->length, stream->recv_window);
-
- if (ngx_http_spdy_terminate_stream(sc, stream,
- NGX_SPDY_FLOW_CONTROL_ERROR)
- == NGX_ERROR)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
-
- stream->recv_window -= sc->length;
-
- if (stream->recv_window < NGX_SPDY_STREAM_WINDOW / 4) {
-
- if (ngx_http_spdy_send_window_update(sc, stream->id,
- NGX_SPDY_STREAM_WINDOW
- - stream->recv_window)
- == NGX_ERROR)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- stream->recv_window = NGX_SPDY_STREAM_WINDOW;
- }
-
- if (stream->in_closed) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent DATA frame for half-closed stream %ui",
- stream->id);
-
- if (ngx_http_spdy_terminate_stream(sc, stream,
- NGX_SPDY_STREAM_ALREADY_CLOSED)
- == NGX_ERROR)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
-
- return ngx_http_spdy_state_read_data(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_read_data(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- size_t size;
- ssize_t n;
- ngx_buf_t *buf;
- ngx_int_t rc;
- ngx_temp_file_t *tf;
- ngx_http_request_t *r;
- ngx_http_spdy_stream_t *stream;
- ngx_http_request_body_t *rb;
- ngx_http_core_loc_conf_t *clcf;
-
- stream = sc->stream;
-
- if (stream == NULL) {
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
-
- if (stream->skip_data) {
-
- if (sc->flags & NGX_SPDY_FLAG_FIN) {
- stream->in_closed = 1;
- }
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "skipping spdy DATA frame, reason: %d",
- stream->skip_data);
-
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
-
- size = end - pos;
-
- if (size > sc->length) {
- size = sc->length;
- }
-
- r = stream->request;
-
- if (r->request_body == NULL
- && ngx_http_spdy_init_request_body(r) != NGX_OK)
- {
- stream->skip_data = NGX_SPDY_DATA_INTERNAL_ERROR;
- return ngx_http_spdy_state_skip(sc, pos, end);
- }
-
- rb = r->request_body;
- tf = rb->temp_file;
- buf = rb->buf;
-
- if (size) {
- rb->rest += size;
-
- if (r->headers_in.content_length_n != -1
- && r->headers_in.content_length_n < rb->rest)
- {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client intended to send body data "
- "larger than declared");
-
- stream->skip_data = NGX_SPDY_DATA_ERROR;
- goto error;
-
- } else {
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
- if (clcf->client_max_body_size
- && clcf->client_max_body_size < rb->rest)
- {
- ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
- "client intended to send "
- "too large chunked body: %O bytes", rb->rest);
-
- stream->skip_data = NGX_SPDY_DATA_ERROR;
- goto error;
- }
- }
-
- sc->length -= size;
-
- if (tf) {
- buf->start = pos;
- buf->pos = pos;
-
- pos += size;
-
- buf->end = pos;
- buf->last = pos;
-
- n = ngx_write_chain_to_temp_file(tf, rb->bufs);
-
- /* TODO: n == 0 or not complete and level event */
-
- if (n == NGX_ERROR) {
- stream->skip_data = NGX_SPDY_DATA_INTERNAL_ERROR;
- goto error;
- }
-
- tf->offset += n;
-
- } else {
- buf->last = ngx_cpymem(buf->last, pos, size);
- pos += size;
- }
-
- r->request_length += size;
- }
-
- if (sc->length) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_read_data);
- }
-
- if (sc->flags & NGX_SPDY_FLAG_FIN) {
-
- stream->in_closed = 1;
-
- if (r->headers_in.content_length_n < 0) {
- r->headers_in.content_length_n = rb->rest;
-
- } else if (r->headers_in.content_length_n != rb->rest) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client prematurely closed stream: "
- "only %O out of %O bytes of request body received",
- rb->rest, r->headers_in.content_length_n);
-
- stream->skip_data = NGX_SPDY_DATA_ERROR;
- goto error;
- }
-
- if (tf) {
- ngx_memzero(buf, sizeof(ngx_buf_t));
-
- buf->in_file = 1;
- buf->file_last = tf->file.offset;
- buf->file = &tf->file;
-
- rb->buf = NULL;
- }
-
- if (rb->post_handler) {
- r->read_event_handler = ngx_http_block_reading;
- rb->post_handler(r);
- }
- }
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-
-error:
-
- if (rb->post_handler) {
-
- if (stream->skip_data == NGX_SPDY_DATA_ERROR) {
- rc = (r->headers_in.content_length_n == -1)
- ? NGX_HTTP_REQUEST_ENTITY_TOO_LARGE
- : NGX_HTTP_BAD_REQUEST;
-
- } else {
- rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
- }
-
- ngx_http_finalize_request(r, rc);
- }
-
- return ngx_http_spdy_state_skip(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_rst_stream(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_uint_t sid, status;
- ngx_event_t *ev;
- ngx_connection_t *fc;
- ngx_http_spdy_stream_t *stream;
-
- if (end - pos < NGX_SPDY_RST_STREAM_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_rst_stream);
- }
-
- if (sc->length != NGX_SPDY_RST_STREAM_SIZE) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent RST_STREAM frame with incorrect length %uz",
- sc->length);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- sid = ngx_spdy_frame_parse_sid(pos);
-
- pos += NGX_SPDY_SID_SIZE;
-
- status = ngx_spdy_frame_parse_uint32(pos);
-
- pos += sizeof(uint32_t);
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy RST_STREAM sid:%ui st:%ui", sid, status);
-
- stream = ngx_http_spdy_get_stream_by_id(sc, sid);
-
- if (stream == NULL) {
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "unknown spdy stream");
-
- return ngx_http_spdy_state_complete(sc, pos, end);
- }
-
- stream->in_closed = 1;
- stream->out_closed = 1;
-
- fc = stream->request->connection;
- fc->error = 1;
-
- switch (status) {
-
- case NGX_SPDY_CANCEL:
- ngx_log_error(NGX_LOG_INFO, fc->log, 0,
- "client canceled stream %ui", sid);
- break;
-
- case NGX_SPDY_INTERNAL_ERROR:
- ngx_log_error(NGX_LOG_INFO, fc->log, 0,
- "client terminated stream %ui due to internal error",
- sid);
- break;
-
- default:
- ngx_log_error(NGX_LOG_INFO, fc->log, 0,
- "client terminated stream %ui with status %ui",
- sid, status);
- break;
- }
-
- ev = fc->read;
- ev->handler(ev);
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_ping(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- u_char *p;
- ngx_buf_t *buf;
- ngx_http_spdy_out_frame_t *frame;
-
- if (end - pos < NGX_SPDY_PING_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_ping);
- }
-
- if (sc->length != NGX_SPDY_PING_SIZE) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent PING frame with incorrect length %uz",
- sc->length);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy PING frame");
-
- frame = ngx_http_spdy_get_ctl_frame(sc, NGX_SPDY_PING_SIZE,
- NGX_SPDY_HIGHEST_PRIORITY);
- if (frame == NULL) {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- buf = frame->first->buf;
-
- p = buf->pos;
-
- p = ngx_spdy_frame_write_head(p, NGX_SPDY_PING);
- p = ngx_spdy_frame_write_flags_and_len(p, 0, NGX_SPDY_PING_SIZE);
-
- p = ngx_cpymem(p, pos, NGX_SPDY_PING_SIZE);
-
- buf->last = p;
-
- ngx_http_spdy_queue_frame(sc, frame);
-
- pos += NGX_SPDY_PING_SIZE;
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_skip(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- size_t size;
-
- size = end - pos;
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy frame skip %uz of %uz", size, sc->length);
-
- if (size < sc->length) {
- sc->length -= size;
- return ngx_http_spdy_state_save(sc, end, end,
- ngx_http_spdy_state_skip);
- }
-
- return ngx_http_spdy_state_complete(sc, pos + sc->length, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_settings(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_uint_t fid, val;
-
- if (sc->entries == 0) {
-
- if (end - pos < NGX_SPDY_SETTINGS_NUM_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_settings);
- }
-
- sc->entries = ngx_spdy_frame_parse_uint32(pos);
-
- pos += NGX_SPDY_SETTINGS_NUM_SIZE;
- sc->length -= NGX_SPDY_SETTINGS_NUM_SIZE;
-
- if (sc->length < sc->entries * NGX_SPDY_SETTINGS_PAIR_SIZE) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent SETTINGS frame with incorrect "
- "length %uz or number of entries %ui",
- sc->length, sc->entries);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy SETTINGS frame has %ui entries", sc->entries);
- }
-
- while (sc->entries) {
- if (end - pos < NGX_SPDY_SETTINGS_PAIR_SIZE) {
- return ngx_http_spdy_state_save(sc, pos, end,
- ngx_http_spdy_state_settings);
- }
-
- sc->entries--;
- sc->length -= NGX_SPDY_SETTINGS_PAIR_SIZE;
-
- fid = ngx_spdy_frame_parse_uint32(pos);
-
- pos += NGX_SPDY_SETTINGS_FID_SIZE;
-
- val = ngx_spdy_frame_parse_uint32(pos);
-
- pos += NGX_SPDY_SETTINGS_VAL_SIZE;
-
- ngx_log_debug3(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy SETTINGS entry fl:%ui id:%ui val:%ui",
- ngx_spdy_frame_flags(fid), ngx_spdy_frame_id(fid), val);
-
- if (ngx_spdy_frame_flags(fid) == NGX_SPDY_SETTINGS_FLAG_PERSISTED) {
- continue;
- }
-
- switch (ngx_spdy_frame_id(fid)) {
-
- case NGX_SPDY_SETTINGS_INIT_WINDOW:
-
- if (val > NGX_SPDY_MAX_WINDOW) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent SETTINGS frame with "
- "incorrect INIT_WINDOW value: %ui", val);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- if (ngx_http_spdy_adjust_windows(sc, val - sc->init_window)
- != NGX_OK)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- sc->init_window = val;
-
- continue;
- }
- }
-
- return ngx_http_spdy_state_complete(sc, pos, end);
-}
-
-
-static u_char *
-ngx_http_spdy_state_complete(ngx_http_spdy_connection_t *sc, u_char *pos,
- u_char *end)
-{
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy frame complete pos:%p end:%p", pos, end);
-
- if (pos > end) {
- ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
- "receive buffer overrun");
-
- ngx_debug_point();
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- sc->handler = ngx_http_spdy_state_head;
- sc->stream = NULL;
-
- return pos;
-}
-
-
-static u_char *
-ngx_http_spdy_state_save(ngx_http_spdy_connection_t *sc,
- u_char *pos, u_char *end, ngx_http_spdy_handler_pt handler)
-{
- size_t size;
-
- ngx_log_debug3(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy frame state save pos:%p end:%p handler:%p",
- pos, end, handler);
-
- size = end - pos;
-
- if (size > NGX_SPDY_STATE_BUFFER_SIZE) {
- ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
- "state buffer overflow: %uz bytes required", size);
-
- ngx_debug_point();
- return ngx_http_spdy_state_internal_error(sc);
- }
-
- ngx_memcpy(sc->buffer, pos, NGX_SPDY_STATE_BUFFER_SIZE);
-
- sc->buffer_used = size;
- sc->handler = handler;
- sc->incomplete = 1;
-
- return end;
-}
-
-
-static u_char *
-ngx_http_spdy_state_inflate_error(ngx_http_spdy_connection_t *sc, int rc)
-{
- if (rc == Z_DATA_ERROR || rc == Z_STREAM_END) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent SYN_STREAM frame with "
- "corrupted header block, inflate() failed: %d", rc);
-
- return ngx_http_spdy_state_protocol_error(sc);
- }
-
- ngx_log_error(NGX_LOG_ERR, sc->connection->log, 0,
- "inflate() failed: %d", rc);
-
- return ngx_http_spdy_state_internal_error(sc);
-}
-
-
-static u_char *
-ngx_http_spdy_state_protocol_error(ngx_http_spdy_connection_t *sc)
-{
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy state protocol error");
-
- if (sc->stream) {
- sc->stream->out_closed = 1;
- ngx_http_spdy_close_stream(sc->stream, NGX_HTTP_BAD_REQUEST);
- }
-
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_CLIENT_CLOSED_REQUEST);
-
- return NULL;
-}
-
-
-static u_char *
-ngx_http_spdy_state_internal_error(ngx_http_spdy_connection_t *sc)
-{
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy state internal error");
-
- if (sc->stream) {
- sc->stream->out_closed = 1;
- ngx_http_spdy_close_stream(sc->stream, NGX_HTTP_INTERNAL_SERVER_ERROR);
- }
-
- ngx_http_spdy_finalize_connection(sc, NGX_HTTP_INTERNAL_SERVER_ERROR);
-
- return NULL;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_send_window_update(ngx_http_spdy_connection_t *sc, ngx_uint_t sid,
- ngx_uint_t delta)
-{
- u_char *p;
- ngx_buf_t *buf;
- ngx_http_spdy_out_frame_t *frame;
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy send WINDOW_UPDATE sid:%ui delta:%ui", sid, delta);
-
- frame = ngx_http_spdy_get_ctl_frame(sc, NGX_SPDY_WINDOW_UPDATE_SIZE,
- NGX_SPDY_HIGHEST_PRIORITY);
- if (frame == NULL) {
- return NGX_ERROR;
- }
-
- buf = frame->first->buf;
-
- p = buf->pos;
-
- p = ngx_spdy_frame_write_head(p, NGX_SPDY_WINDOW_UPDATE);
- p = ngx_spdy_frame_write_flags_and_len(p, 0, NGX_SPDY_WINDOW_UPDATE_SIZE);
-
- p = ngx_spdy_frame_write_sid(p, sid);
- p = ngx_spdy_frame_aligned_write_uint32(p, delta);
-
- buf->last = p;
-
- ngx_http_spdy_queue_frame(sc, frame);
-
- return NGX_OK;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_send_rst_stream(ngx_http_spdy_connection_t *sc, ngx_uint_t sid,
- ngx_uint_t status, ngx_uint_t priority)
-{
- u_char *p;
- ngx_buf_t *buf;
- ngx_http_spdy_out_frame_t *frame;
-
- if (sc->connection->error) {
- return NGX_OK;
- }
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy send RST_STREAM sid:%ui st:%ui", sid, status);
-
- frame = ngx_http_spdy_get_ctl_frame(sc, NGX_SPDY_RST_STREAM_SIZE,
- priority);
- if (frame == NULL) {
- return NGX_ERROR;
- }
-
- buf = frame->first->buf;
-
- p = buf->pos;
-
- p = ngx_spdy_frame_write_head(p, NGX_SPDY_RST_STREAM);
- p = ngx_spdy_frame_write_flags_and_len(p, 0, NGX_SPDY_RST_STREAM_SIZE);
-
- p = ngx_spdy_frame_write_sid(p, sid);
- p = ngx_spdy_frame_aligned_write_uint32(p, status);
-
- buf->last = p;
-
- ngx_http_spdy_queue_frame(sc, frame);
-
- return NGX_OK;
-}
-
-
-#if 0
-static ngx_int_t
-ngx_http_spdy_send_goaway(ngx_http_spdy_connection_t *sc)
-{
- u_char *p;
- ngx_buf_t *buf;
- ngx_http_spdy_out_frame_t *frame;
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy send GOAWAY sid:%ui", sc->last_sid);
-
- frame = ngx_http_spdy_get_ctl_frame(sc, NGX_SPDY_GOAWAY_SIZE,
- NGX_SPDY_HIGHEST_PRIORITY);
- if (frame == NULL) {
- return NGX_ERROR;
- }
-
- buf = frame->first->buf;
-
- p = buf->pos;
-
- p = ngx_spdy_frame_write_head(p, NGX_SPDY_GOAWAY);
- p = ngx_spdy_frame_write_flags_and_len(p, 0, NGX_SPDY_GOAWAY_SIZE);
-
- p = ngx_spdy_frame_write_sid(p, sc->last_sid);
-
- buf->last = p;
-
- ngx_http_spdy_queue_frame(sc, frame);
-
- return NGX_OK;
-}
-#endif
-
-
-static ngx_int_t
-ngx_http_spdy_send_settings(ngx_http_spdy_connection_t *sc)
-{
- u_char *p;
- ngx_buf_t *buf;
- ngx_chain_t *cl;
- ngx_http_spdy_srv_conf_t *sscf;
- ngx_http_spdy_out_frame_t *frame;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy send SETTINGS frame");
-
- frame = ngx_palloc(sc->pool, sizeof(ngx_http_spdy_out_frame_t));
- if (frame == NULL) {
- return NGX_ERROR;
- }
-
- cl = ngx_alloc_chain_link(sc->pool);
- if (cl == NULL) {
- return NGX_ERROR;
- }
-
- buf = ngx_create_temp_buf(sc->pool, NGX_SPDY_FRAME_HEADER_SIZE
- + NGX_SPDY_SETTINGS_NUM_SIZE
- + 2 * NGX_SPDY_SETTINGS_PAIR_SIZE);
- if (buf == NULL) {
- return NGX_ERROR;
- }
-
- buf->last_buf = 1;
-
- cl->buf = buf;
- cl->next = NULL;
-
- frame->first = cl;
- frame->last = cl;
- frame->handler = ngx_http_spdy_settings_frame_handler;
- frame->stream = NULL;
-#if (NGX_DEBUG)
- frame->length = NGX_SPDY_SETTINGS_NUM_SIZE
- + 2 * NGX_SPDY_SETTINGS_PAIR_SIZE;
-#endif
- frame->priority = NGX_SPDY_HIGHEST_PRIORITY;
- frame->blocked = 0;
-
- p = buf->pos;
-
- p = ngx_spdy_frame_write_head(p, NGX_SPDY_SETTINGS);
- p = ngx_spdy_frame_write_flags_and_len(p, NGX_SPDY_FLAG_CLEAR_SETTINGS,
- NGX_SPDY_SETTINGS_NUM_SIZE
- + 2 * NGX_SPDY_SETTINGS_PAIR_SIZE);
-
- p = ngx_spdy_frame_aligned_write_uint32(p, 2);
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- p = ngx_spdy_frame_write_flags_and_id(p, 0, NGX_SPDY_SETTINGS_MAX_STREAMS);
- p = ngx_spdy_frame_aligned_write_uint32(p, sscf->concurrent_streams);
-
- p = ngx_spdy_frame_write_flags_and_id(p, 0, NGX_SPDY_SETTINGS_INIT_WINDOW);
- p = ngx_spdy_frame_aligned_write_uint32(p, NGX_SPDY_STREAM_WINDOW);
-
- buf->last = p;
-
- ngx_http_spdy_queue_frame(sc, frame);
-
- return NGX_OK;
-}
-
-
-ngx_int_t
-ngx_http_spdy_settings_frame_handler(ngx_http_spdy_connection_t *sc,
- ngx_http_spdy_out_frame_t *frame)
-{
- ngx_buf_t *buf;
-
- buf = frame->first->buf;
-
- if (buf->pos != buf->last) {
- return NGX_AGAIN;
- }
-
- ngx_free_chain(sc->pool, frame->first);
-
- return NGX_OK;
-}
-
-
-static ngx_http_spdy_out_frame_t *
-ngx_http_spdy_get_ctl_frame(ngx_http_spdy_connection_t *sc, size_t length,
- ngx_uint_t priority)
-{
- ngx_chain_t *cl;
- ngx_http_spdy_out_frame_t *frame;
-
- frame = sc->free_ctl_frames;
-
- if (frame) {
- sc->free_ctl_frames = frame->next;
-
- cl = frame->first;
- cl->buf->pos = cl->buf->start;
-
- } else {
- frame = ngx_palloc(sc->pool, sizeof(ngx_http_spdy_out_frame_t));
- if (frame == NULL) {
- return NULL;
- }
-
- cl = ngx_alloc_chain_link(sc->pool);
- if (cl == NULL) {
- return NULL;
- }
-
- cl->buf = ngx_create_temp_buf(sc->pool,
- NGX_SPDY_CTL_FRAME_BUFFER_SIZE);
- if (cl->buf == NULL) {
- return NULL;
- }
-
- cl->buf->last_buf = 1;
-
- frame->first = cl;
- frame->last = cl;
- frame->handler = ngx_http_spdy_ctl_frame_handler;
- frame->stream = NULL;
- }
-
-#if (NGX_DEBUG)
- if (length > NGX_SPDY_CTL_FRAME_BUFFER_SIZE - NGX_SPDY_FRAME_HEADER_SIZE) {
- ngx_log_error(NGX_LOG_ALERT, sc->pool->log, 0,
- "requested control frame is too large: %uz", length);
- return NULL;
- }
-
- frame->length = length;
-#endif
-
- frame->priority = priority;
- frame->blocked = 0;
-
- return frame;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_ctl_frame_handler(ngx_http_spdy_connection_t *sc,
- ngx_http_spdy_out_frame_t *frame)
-{
- ngx_buf_t *buf;
-
- buf = frame->first->buf;
-
- if (buf->pos != buf->last) {
- return NGX_AGAIN;
- }
-
- frame->next = sc->free_ctl_frames;
- sc->free_ctl_frames = frame;
-
- return NGX_OK;
-}
-
-
-static ngx_http_spdy_stream_t *
-ngx_http_spdy_create_stream(ngx_http_spdy_connection_t *sc, ngx_uint_t id,
- ngx_uint_t priority)
-{
- ngx_log_t *log;
- ngx_uint_t index;
- ngx_event_t *rev, *wev;
- ngx_connection_t *fc;
- ngx_http_log_ctx_t *ctx;
- ngx_http_request_t *r;
- ngx_http_spdy_stream_t *stream;
- ngx_http_core_srv_conf_t *cscf;
- ngx_http_spdy_srv_conf_t *sscf;
-
- fc = sc->free_fake_connections;
-
- if (fc) {
- sc->free_fake_connections = fc->data;
-
- rev = fc->read;
- wev = fc->write;
- log = fc->log;
- ctx = log->data;
-
- } else {
- fc = ngx_palloc(sc->pool, sizeof(ngx_connection_t));
- if (fc == NULL) {
- return NULL;
- }
-
- rev = ngx_palloc(sc->pool, sizeof(ngx_event_t));
- if (rev == NULL) {
- return NULL;
- }
-
- wev = ngx_palloc(sc->pool, sizeof(ngx_event_t));
- if (wev == NULL) {
- return NULL;
- }
-
- log = ngx_palloc(sc->pool, sizeof(ngx_log_t));
- if (log == NULL) {
- return NULL;
- }
-
- ctx = ngx_palloc(sc->pool, sizeof(ngx_http_log_ctx_t));
- if (ctx == NULL) {
- return NULL;
- }
-
- ctx->connection = fc;
- ctx->request = NULL;
- }
-
- ngx_memcpy(log, sc->connection->log, sizeof(ngx_log_t));
-
- log->data = ctx;
-
- ngx_memzero(rev, sizeof(ngx_event_t));
-
- rev->data = fc;
- rev->ready = 1;
- rev->handler = ngx_http_spdy_close_stream_handler;
- rev->log = log;
-
- ngx_memcpy(wev, rev, sizeof(ngx_event_t));
-
- wev->write = 1;
-
- ngx_memcpy(fc, sc->connection, sizeof(ngx_connection_t));
-
- fc->data = sc->http_connection;
- fc->read = rev;
- fc->write = wev;
- fc->sent = 0;
- fc->log = log;
- fc->buffered = 0;
- fc->sndlowat = 1;
- fc->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
-
- r = ngx_http_create_request(fc);
- if (r == NULL) {
- return NULL;
- }
-
- r->valid_location = 1;
-
- fc->data = r;
- sc->connection->requests++;
-
- cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
-
- r->header_in = ngx_create_temp_buf(r->pool,
- cscf->client_header_buffer_size);
- if (r->header_in == NULL) {
- ngx_http_free_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
- return NULL;
- }
-
- r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE;
-
- stream = ngx_pcalloc(r->pool, sizeof(ngx_http_spdy_stream_t));
- if (stream == NULL) {
- ngx_http_free_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
- return NULL;
- }
-
- r->spdy_stream = stream;
-
- stream->id = id;
- stream->request = r;
- stream->connection = sc;
-
- stream->send_window = sc->init_window;
- stream->recv_window = NGX_SPDY_STREAM_WINDOW;
-
- stream->priority = priority;
-
- sscf = ngx_http_get_module_srv_conf(r, ngx_http_spdy_module);
-
- index = ngx_http_spdy_stream_index(sscf, id);
-
- stream->index = sc->streams_index[index];
- sc->streams_index[index] = stream;
-
- sc->processing++;
-
- return stream;
-}
-
-
-static ngx_http_spdy_stream_t *
-ngx_http_spdy_get_stream_by_id(ngx_http_spdy_connection_t *sc,
- ngx_uint_t sid)
-{
- ngx_http_spdy_stream_t *stream;
- ngx_http_spdy_srv_conf_t *sscf;
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- stream = sc->streams_index[ngx_http_spdy_stream_index(sscf, sid)];
-
- while (stream) {
- if (stream->id == sid) {
- return stream;
- }
-
- stream = stream->index;
- }
-
- return NULL;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_parse_header(ngx_http_request_t *r)
-{
- u_char *p, *end, ch;
- ngx_uint_t hash;
- ngx_http_core_srv_conf_t *cscf;
-
- enum {
- sw_name_len = 0,
- sw_name,
- sw_value_len,
- sw_value
- } state;
-
- state = r->state;
-
- p = r->header_in->pos;
- end = r->header_in->last;
-
- switch (state) {
-
- case sw_name_len:
-
- if (end - p < NGX_SPDY_NV_NLEN_SIZE) {
- return NGX_AGAIN;
- }
-
- r->lowcase_index = ngx_spdy_frame_parse_uint32(p);
-
- if (r->lowcase_index == 0) {
- return NGX_ERROR;
- }
-
- /* null-terminate the previous header value */
- *p = '\0';
-
- p += NGX_SPDY_NV_NLEN_SIZE;
-
- r->invalid_header = 0;
-
- state = sw_name;
-
- /* fall through */
-
- case sw_name:
-
- if ((ngx_uint_t) (end - p) < r->lowcase_index) {
- break;
- }
-
- cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
-
- r->header_name_start = p;
- r->header_name_end = p + r->lowcase_index;
-
- if (p[0] == ':') {
- p++;
- }
-
- hash = 0;
-
- for ( /* void */ ; p != r->header_name_end; p++) {
-
- ch = *p;
-
- hash = ngx_hash(hash, ch);
-
- if ((ch >= 'a' && ch <= 'z')
- || (ch == '-')
- || (ch >= '0' && ch <= '9')
- || (ch == '_' && cscf->underscores_in_headers))
- {
- continue;
- }
-
- switch (ch) {
- case '\0':
- case LF:
- case CR:
- case ':':
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent invalid header name: \"%*s\"",
- r->lowcase_index, r->header_name_start);
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- if (ch >= 'A' && ch <= 'Z') {
- return NGX_ERROR;
- }
-
- r->invalid_header = 1;
- }
-
- r->header_hash = hash;
-
- state = sw_value_len;
-
- /* fall through */
-
- case sw_value_len:
-
- if (end - p < NGX_SPDY_NV_VLEN_SIZE) {
- break;
- }
-
- r->lowcase_index = ngx_spdy_frame_parse_uint32(p);
-
- /* null-terminate header name */
- *p = '\0';
-
- p += NGX_SPDY_NV_VLEN_SIZE;
-
- state = sw_value;
-
- /* fall through */
-
- case sw_value:
-
- if ((ngx_uint_t) (end - p) < r->lowcase_index) {
- break;
- }
-
- r->header_start = p;
-
- while (r->lowcase_index--) {
- ch = *p;
-
- if (ch == '\0') {
-
- if (p == r->header_start) {
- return NGX_ERROR;
- }
-
- r->header_end = p;
- r->header_in->pos = p + 1;
-
- r->state = sw_value;
-
- return NGX_OK;
- }
-
- if (ch == CR || ch == LF) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent header \"%*s\" with "
- "invalid value: \"%*s\\%c...\"",
- r->header_name_end - r->header_name_start,
- r->header_name_start,
- p - r->header_start,
- r->header_start,
- ch == CR ? 'r' : 'n');
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- p++;
- }
-
- r->header_end = p;
- r->header_in->pos = p;
-
- r->state = 0;
-
- return NGX_DONE;
- }
-
- r->header_in->pos = p;
- r->state = state;
-
- return NGX_AGAIN;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_alloc_large_header_buffer(ngx_http_request_t *r)
-{
- u_char *old, *new, *p;
- size_t rest;
- ngx_buf_t *buf;
- ngx_http_spdy_stream_t *stream;
- ngx_http_core_srv_conf_t *cscf;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy alloc large header buffer");
-
- stream = r->spdy_stream;
-
- cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
-
- if (stream->header_buffers
- == (ngx_uint_t) cscf->large_client_header_buffers.num)
- {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent too large request");
-
- return NGX_DECLINED;
- }
-
- rest = r->header_in->last - r->header_in->pos;
-
- /*
- * One more byte is needed for null-termination
- * and another one for further progress.
- */
- if (rest > cscf->large_client_header_buffers.size - 2) {
- p = r->header_in->pos;
-
- if (rest > NGX_MAX_ERROR_STR - 300) {
- rest = NGX_MAX_ERROR_STR - 300;
- }
-
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent too long header name or value: \"%*s...\"",
- rest, p);
-
- return NGX_DECLINED;
- }
-
- buf = ngx_create_temp_buf(r->pool, cscf->large_client_header_buffers.size);
- if (buf == NULL) {
- return NGX_ERROR;
- }
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy large header alloc: %p %uz",
- buf->pos, buf->end - buf->last);
-
- old = r->header_in->pos;
- new = buf->pos;
-
- if (rest) {
- buf->last = ngx_cpymem(new, old, rest);
- }
-
- r->header_in = buf;
-
- stream->header_buffers++;
-
- return NGX_OK;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_handle_request_header(ngx_http_request_t *r)
-{
- ngx_uint_t i;
- ngx_table_elt_t *h;
- ngx_http_core_srv_conf_t *cscf;
- ngx_http_spdy_request_header_t *sh;
-
- if (r->invalid_header) {
- cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
-
- if (cscf->ignore_invalid_headers) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent invalid header: \"%*s\"",
- r->header_end - r->header_name_start,
- r->header_name_start);
- return NGX_OK;
- }
-
- }
-
- if (r->header_name_start[0] == ':') {
- r->header_name_start++;
-
- for (i = 0; i < NGX_SPDY_REQUEST_HEADERS; i++) {
- sh = &ngx_http_spdy_request_headers[i];
-
- if (sh->hash != r->header_hash
- || sh->len != r->header_name_end - r->header_name_start
- || ngx_strncmp(sh->header, r->header_name_start, sh->len) != 0)
- {
- continue;
- }
-
- return sh->handler(r);
- }
-
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent invalid header name: \":%*s\"",
- r->header_end - r->header_name_start,
- r->header_name_start);
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- h = ngx_list_push(&r->headers_in.headers);
- if (h == NULL) {
- return NGX_ERROR;
- }
-
- h->hash = r->header_hash;
-
- h->key.len = r->header_name_end - r->header_name_start;
- h->key.data = r->header_name_start;
-
- h->value.len = r->header_end - r->header_start;
- h->value.data = r->header_start;
-
- h->lowcase_key = h->key.data;
-
- return NGX_OK;
-}
-
-
-void
-ngx_http_spdy_request_headers_init(void)
-{
- ngx_uint_t i;
- ngx_http_spdy_request_header_t *h;
-
- for (i = 0; i < NGX_SPDY_REQUEST_HEADERS; i++) {
- h = &ngx_http_spdy_request_headers[i];
- h->hash = ngx_hash_key(h->header, h->len);
- }
-}
-
-
-static ngx_int_t
-ngx_http_spdy_parse_method(ngx_http_request_t *r)
-{
- size_t k, len;
- ngx_uint_t n;
- const u_char *p, *m;
-
- /*
- * This array takes less than 256 sequential bytes,
- * and if typical CPU cache line size is 64 bytes,
- * it is prefetched for 4 load operations.
- */
- static const struct {
- u_char len;
- const u_char method[11];
- uint32_t value;
- } tests[] = {
- { 3, "GET", NGX_HTTP_GET },
- { 4, "POST", NGX_HTTP_POST },
- { 4, "HEAD", NGX_HTTP_HEAD },
- { 7, "OPTIONS", NGX_HTTP_OPTIONS },
- { 8, "PROPFIND", NGX_HTTP_PROPFIND },
- { 3, "PUT", NGX_HTTP_PUT },
- { 5, "MKCOL", NGX_HTTP_MKCOL },
- { 6, "DELETE", NGX_HTTP_DELETE },
- { 4, "COPY", NGX_HTTP_COPY },
- { 4, "MOVE", NGX_HTTP_MOVE },
- { 9, "PROPPATCH", NGX_HTTP_PROPPATCH },
- { 4, "LOCK", NGX_HTTP_LOCK },
- { 6, "UNLOCK", NGX_HTTP_UNLOCK },
- { 5, "PATCH", NGX_HTTP_PATCH },
- { 5, "TRACE", NGX_HTTP_TRACE }
- }, *test;
-
- if (r->method_name.len) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent duplicate :method header");
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- len = r->header_end - r->header_start;
-
- r->method_name.len = len;
- r->method_name.data = r->header_start;
-
- test = tests;
- n = sizeof(tests) / sizeof(tests[0]);
-
- do {
- if (len == test->len) {
- p = r->method_name.data;
- m = test->method;
- k = len;
-
- do {
- if (*p++ != *m++) {
- goto next;
- }
- } while (--k);
-
- r->method = test->value;
- return NGX_OK;
- }
-
- next:
- test++;
-
- } while (--n);
-
- p = r->method_name.data;
-
- do {
- if ((*p < 'A' || *p > 'Z') && *p != '_') {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent invalid method: \"%V\"",
- &r->method_name);
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- p++;
-
- } while (--len);
-
- return NGX_OK;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_parse_scheme(ngx_http_request_t *r)
-{
- if (r->schema_start) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent duplicate :schema header");
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- r->schema_start = r->header_start;
- r->schema_end = r->header_end;
-
- return NGX_OK;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_parse_host(ngx_http_request_t *r)
-{
- ngx_table_elt_t *h;
-
- if (r->headers_in.host) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent duplicate :host header");
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- h = ngx_list_push(&r->headers_in.headers);
- if (h == NULL) {
- return NGX_ERROR;
- }
-
- r->headers_in.host = h;
-
- h->hash = r->header_hash;
-
- h->key.len = r->header_name_end - r->header_name_start;
- h->key.data = r->header_name_start;
-
- h->value.len = r->header_end - r->header_start;
- h->value.data = r->header_start;
-
- h->lowcase_key = h->key.data;
-
- return NGX_OK;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_parse_path(ngx_http_request_t *r)
-{
- if (r->unparsed_uri.len) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent duplicate :path header");
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- r->uri_start = r->header_start;
- r->uri_end = r->header_end;
-
- if (ngx_http_parse_uri(r) != NGX_OK) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent invalid URI: \"%*s\"",
- r->uri_end - r->uri_start, r->uri_start);
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- if (ngx_http_process_request_uri(r) != NGX_OK) {
- /*
- * request has been finalized already
- * in ngx_http_process_request_uri()
- */
- return NGX_ABORT;
- }
-
- return NGX_OK;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_parse_version(ngx_http_request_t *r)
-{
- u_char *p, ch;
-
- if (r->http_protocol.len) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent duplicate :version header");
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
- }
-
- p = r->header_start;
-
- if (r->header_end - p < 8 || !(ngx_str5cmp(p, 'H', 'T', 'T', 'P', '/'))) {
- goto invalid;
- }
-
- ch = *(p + 5);
-
- if (ch < '1' || ch > '9') {
- goto invalid;
- }
-
- r->http_major = ch - '0';
-
- for (p += 6; p != r->header_end - 2; p++) {
-
- ch = *p;
-
- if (ch == '.') {
- break;
- }
-
- if (ch < '0' || ch > '9') {
- goto invalid;
- }
-
- r->http_major = r->http_major * 10 + ch - '0';
- }
-
- if (*p != '.') {
- goto invalid;
- }
-
- ch = *(p + 1);
-
- if (ch < '0' || ch > '9') {
- goto invalid;
- }
-
- r->http_minor = ch - '0';
-
- for (p += 2; p != r->header_end; p++) {
-
- ch = *p;
-
- if (ch < '0' || ch > '9') {
- goto invalid;
- }
-
- r->http_minor = r->http_minor * 10 + ch - '0';
- }
-
- r->http_protocol.len = r->header_end - r->header_start;
- r->http_protocol.data = r->header_start;
- r->http_version = r->http_major * 1000 + r->http_minor;
-
- return NGX_OK;
-
-invalid:
-
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client sent invalid http version: \"%*s\"",
- r->header_end - r->header_start, r->header_start);
-
- return NGX_HTTP_PARSE_INVALID_HEADER;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_construct_request_line(ngx_http_request_t *r)
-{
- u_char *p;
-
- if (r->method_name.len == 0
- || r->unparsed_uri.len == 0
- || r->http_protocol.len == 0)
- {
- ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
- return NGX_ERROR;
- }
-
- r->request_line.len = r->method_name.len + 1
- + r->unparsed_uri.len + 1
- + r->http_protocol.len;
-
- p = ngx_pnalloc(r->pool, r->request_line.len + 1);
- if (p == NULL) {
- ngx_http_spdy_close_stream(r->spdy_stream,
- NGX_HTTP_INTERNAL_SERVER_ERROR);
- return NGX_ERROR;
- }
-
- r->request_line.data = p;
-
- p = ngx_cpymem(p, r->method_name.data, r->method_name.len);
-
- *p++ = ' ';
-
- p = ngx_cpymem(p, r->unparsed_uri.data, r->unparsed_uri.len);
-
- *p++ = ' ';
-
- ngx_memcpy(p, r->http_protocol.data, r->http_protocol.len + 1);
-
- /* some modules expect the space character after method name */
- r->method_name.data = r->request_line.data;
-
- return NGX_OK;
-}
-
-
-static void
-ngx_http_spdy_run_request(ngx_http_request_t *r)
-{
- ngx_uint_t i;
- ngx_list_part_t *part;
- ngx_table_elt_t *h;
- ngx_http_header_t *hh;
- ngx_http_core_main_conf_t *cmcf;
-
- if (ngx_http_spdy_construct_request_line(r) != NGX_OK) {
- return;
- }
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy http request line: \"%V\"", &r->request_line);
-
- cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
-
- part = &r->headers_in.headers.part;
- h = part->elts;
-
- for (i = 0 ;; i++) {
-
- if (i >= part->nelts) {
- if (part->next == NULL) {
- break;
- }
-
- part = part->next;
- h = part->elts;
- i = 0;
- }
-
- hh = ngx_hash_find(&cmcf->headers_in_hash, h[i].hash,
- h[i].lowcase_key, h[i].key.len);
-
- if (hh && hh->handler(r, &h[i], hh->offset) != NGX_OK) {
- return;
- }
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy http header: \"%V: %V\"", &h[i].key, &h[i].value);
- }
-
- r->http_state = NGX_HTTP_PROCESS_REQUEST_STATE;
-
- if (ngx_http_process_request_header(r) != NGX_OK) {
- return;
- }
-
- if (r->headers_in.content_length_n > 0 && r->spdy_stream->in_closed) {
- ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
- "client prematurely closed stream");
-
- r->spdy_stream->skip_data = NGX_SPDY_DATA_ERROR;
-
- ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
- return;
- }
-
- ngx_http_process_request(r);
-}
-
-
-static ngx_int_t
-ngx_http_spdy_init_request_body(ngx_http_request_t *r)
-{
- ngx_buf_t *buf;
- ngx_temp_file_t *tf;
- ngx_http_request_body_t *rb;
- ngx_http_core_loc_conf_t *clcf;
-
- rb = ngx_pcalloc(r->pool, sizeof(ngx_http_request_body_t));
- if (rb == NULL) {
- return NGX_ERROR;
- }
-
- r->request_body = rb;
-
- if (r->spdy_stream->in_closed) {
- return NGX_OK;
- }
-
- rb->rest = r->headers_in.content_length_n;
-
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
- if (r->request_body_in_file_only
- || rb->rest > (off_t) clcf->client_body_buffer_size
- || rb->rest < 0)
- {
- tf = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t));
- if (tf == NULL) {
- return NGX_ERROR;
- }
-
- tf->file.fd = NGX_INVALID_FILE;
- tf->file.log = r->connection->log;
- tf->path = clcf->client_body_temp_path;
- tf->pool = r->pool;
- tf->warn = "a client request body is buffered to a temporary file";
- tf->log_level = r->request_body_file_log_level;
- tf->persistent = r->request_body_in_persistent_file;
- tf->clean = r->request_body_in_clean_file;
-
- if (r->request_body_file_group_access) {
- tf->access = 0660;
- }
-
- rb->temp_file = tf;
-
- if (r->spdy_stream->in_closed
- && ngx_create_temp_file(&tf->file, tf->path, tf->pool,
- tf->persistent, tf->clean, tf->access)
- != NGX_OK)
- {
- return NGX_ERROR;
- }
-
- buf = ngx_calloc_buf(r->pool);
- if (buf == NULL) {
- return NGX_ERROR;
- }
-
- } else {
-
- if (rb->rest == 0) {
- return NGX_OK;
- }
-
- buf = ngx_create_temp_buf(r->pool, (size_t) rb->rest);
- if (buf == NULL) {
- return NGX_ERROR;
- }
- }
-
- rb->buf = buf;
-
- rb->bufs = ngx_alloc_chain_link(r->pool);
- if (rb->bufs == NULL) {
- return NGX_ERROR;
- }
-
- rb->bufs->buf = buf;
- rb->bufs->next = NULL;
-
- rb->rest = 0;
-
- return NGX_OK;
-}
-
-
-ngx_int_t
-ngx_http_spdy_read_request_body(ngx_http_request_t *r,
- ngx_http_client_body_handler_pt post_handler)
-{
- ngx_http_spdy_stream_t *stream;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy read request body");
-
- stream = r->spdy_stream;
-
- switch (stream->skip_data) {
-
- case NGX_SPDY_DATA_DISCARD:
- post_handler(r);
- return NGX_OK;
-
- case NGX_SPDY_DATA_ERROR:
- if (r->headers_in.content_length_n == -1) {
- return NGX_HTTP_REQUEST_ENTITY_TOO_LARGE;
- } else {
- return NGX_HTTP_BAD_REQUEST;
- }
-
- case NGX_SPDY_DATA_INTERNAL_ERROR:
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
- }
-
- if (!r->request_body && ngx_http_spdy_init_request_body(r) != NGX_OK) {
- stream->skip_data = NGX_SPDY_DATA_INTERNAL_ERROR;
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
- }
-
- if (stream->in_closed) {
- post_handler(r);
- return NGX_OK;
- }
-
- r->request_body->post_handler = post_handler;
-
- r->read_event_handler = ngx_http_test_reading;
- r->write_event_handler = ngx_http_request_empty_handler;
-
- return NGX_AGAIN;
-}
-
-
-static ngx_int_t
-ngx_http_spdy_terminate_stream(ngx_http_spdy_connection_t *sc,
- ngx_http_spdy_stream_t *stream, ngx_uint_t status)
-{
- ngx_event_t *rev;
- ngx_connection_t *fc;
-
- if (ngx_http_spdy_send_rst_stream(sc, stream->id, status,
- NGX_SPDY_HIGHEST_PRIORITY)
- == NGX_ERROR)
- {
- return NGX_ERROR;
- }
-
- stream->out_closed = 1;
-
- fc = stream->request->connection;
- fc->error = 1;
-
- rev = fc->read;
- rev->handler(rev);
-
- return NGX_OK;
-}
-
-
-static void
-ngx_http_spdy_close_stream_handler(ngx_event_t *ev)
-{
- ngx_connection_t *fc;
- ngx_http_request_t *r;
-
- fc = ev->data;
- r = fc->data;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "spdy close stream handler");
-
- ngx_http_spdy_close_stream(r->spdy_stream, 0);
-}
-
-
-void
-ngx_http_spdy_close_stream(ngx_http_spdy_stream_t *stream, ngx_int_t rc)
-{
- ngx_event_t *ev;
- ngx_connection_t *fc;
- ngx_http_spdy_stream_t **index, *s;
- ngx_http_spdy_srv_conf_t *sscf;
- ngx_http_spdy_connection_t *sc;
-
- sc = stream->connection;
-
- ngx_log_debug3(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy close stream %ui, queued %ui, processing %ui",
- stream->id, stream->queued, sc->processing);
-
- fc = stream->request->connection;
-
- if (stream->queued) {
- fc->write->handler = ngx_http_spdy_close_stream_handler;
- return;
- }
-
- if (!stream->out_closed) {
- if (ngx_http_spdy_send_rst_stream(sc, stream->id,
- NGX_SPDY_INTERNAL_ERROR,
- stream->priority)
- != NGX_OK)
- {
- sc->connection->error = 1;
- }
- }
-
- if (sc->stream == stream) {
- sc->stream = NULL;
- }
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- index = sc->streams_index + ngx_http_spdy_stream_index(sscf, stream->id);
-
- for ( ;; ) {
- s = *index;
-
- if (s == NULL) {
- break;
- }
-
- if (s == stream) {
- *index = s->index;
- break;
- }
-
- index = &s->index;
- }
-
- ngx_http_free_request(stream->request, rc);
-
- ev = fc->read;
-
- if (ev->active || ev->disabled) {
- ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
- "fake read event was activated");
- }
-
- if (ev->timer_set) {
- ngx_del_timer(ev);
- }
-
- if (ev->posted) {
- ngx_delete_posted_event(ev);
- }
-
- ev = fc->write;
-
- if (ev->active || ev->disabled) {
- ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
- "fake write event was activated");
- }
-
- if (ev->timer_set) {
- ngx_del_timer(ev);
- }
-
- if (ev->posted) {
- ngx_delete_posted_event(ev);
- }
-
- fc->data = sc->free_fake_connections;
- sc->free_fake_connections = fc;
-
- sc->processing--;
-
- if (sc->processing || sc->blocked) {
- return;
- }
-
- ev = sc->connection->read;
-
- ev->handler = ngx_http_spdy_handle_connection_handler;
- ngx_post_event(ev, &ngx_posted_events);
-}
-
-
-static void
-ngx_http_spdy_handle_connection_handler(ngx_event_t *rev)
-{
- ngx_connection_t *c;
-
- rev->handler = ngx_http_spdy_read_handler;
-
- if (rev->ready) {
- ngx_http_spdy_read_handler(rev);
- return;
- }
-
- c = rev->data;
-
- ngx_http_spdy_handle_connection(c->data);
-}
-
-
-static void
-ngx_http_spdy_keepalive_handler(ngx_event_t *rev)
-{
- ngx_connection_t *c;
- ngx_http_spdy_srv_conf_t *sscf;
- ngx_http_spdy_connection_t *sc;
-
- c = rev->data;
-
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "spdy keepalive handler");
-
- if (rev->timedout || c->close) {
- ngx_http_close_connection(c);
- return;
- }
-
-#if (NGX_HAVE_KQUEUE)
-
- if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
- if (rev->pending_eof) {
- c->log->handler = NULL;
- ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno,
- "kevent() reported that client %V closed "
- "keepalive connection", &c->addr_text);
-#if (NGX_HTTP_SSL)
- if (c->ssl) {
- c->ssl->no_send_shutdown = 1;
- }
-#endif
- ngx_http_close_connection(c);
- return;
- }
- }
-
-#endif
-
- c->destroyed = 0;
- c->idle = 0;
- ngx_reusable_connection(c, 0);
-
- sc = c->data;
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- sc->pool = ngx_create_pool(sscf->pool_size, sc->connection->log);
- if (sc->pool == NULL) {
- ngx_http_close_connection(c);
- return;
- }
-
- sc->streams_index = ngx_pcalloc(sc->pool,
- ngx_http_spdy_streams_index_size(sscf)
- * sizeof(ngx_http_spdy_stream_t *));
- if (sc->streams_index == NULL) {
- ngx_http_close_connection(c);
- return;
- }
-
- c->write->handler = ngx_http_spdy_write_handler;
-
- rev->handler = ngx_http_spdy_read_handler;
- ngx_http_spdy_read_handler(rev);
-}
-
-
-static void
-ngx_http_spdy_finalize_connection(ngx_http_spdy_connection_t *sc,
- ngx_int_t rc)
-{
- ngx_uint_t i, size;
- ngx_event_t *ev;
- ngx_connection_t *c, *fc;
- ngx_http_request_t *r;
- ngx_http_spdy_stream_t *stream;
- ngx_http_spdy_srv_conf_t *sscf;
-
- c = sc->connection;
-
- if (!sc->processing) {
- ngx_http_close_connection(c);
- return;
- }
-
- c->error = 1;
- c->read->handler = ngx_http_empty_handler;
- c->write->handler = ngx_http_empty_handler;
-
- sc->last_out = NULL;
-
- sc->blocked = 1;
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- size = ngx_http_spdy_streams_index_size(sscf);
-
- for (i = 0; i < size; i++) {
- stream = sc->streams_index[i];
-
- while (stream) {
- stream->handled = 0;
-
- r = stream->request;
- fc = r->connection;
-
- fc->error = 1;
-
- if (stream->queued) {
- stream->queued = 0;
-
- ev = fc->write;
- ev->delayed = 0;
-
- } else {
- ev = fc->read;
- }
-
- stream = stream->index;
-
- ev->eof = 1;
- ev->handler(ev);
- }
- }
-
- sc->blocked = 0;
-
- if (sc->processing) {
- return;
- }
-
- ngx_http_close_connection(c);
-}
-
-
-static ngx_int_t
-ngx_http_spdy_adjust_windows(ngx_http_spdy_connection_t *sc, ssize_t delta)
-{
- ngx_uint_t i, size;
- ngx_event_t *wev;
- ngx_http_spdy_stream_t *stream, *sn;
- ngx_http_spdy_srv_conf_t *sscf;
-
- sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
- ngx_http_spdy_module);
-
- size = ngx_http_spdy_streams_index_size(sscf);
-
- for (i = 0; i < size; i++) {
-
- for (stream = sc->streams_index[i]; stream; stream = sn) {
- sn = stream->index;
-
- if (delta > 0
- && stream->send_window
- > (ssize_t) (NGX_SPDY_MAX_WINDOW - delta))
- {
- if (ngx_http_spdy_terminate_stream(sc, stream,
- NGX_SPDY_FLOW_CONTROL_ERROR)
- == NGX_ERROR)
- {
- return NGX_ERROR;
- }
-
- continue;
- }
-
- stream->send_window += delta;
-
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy:%ui adjust window:%z",
- stream->id, stream->send_window);
-
- if (stream->send_window > 0 && stream->exhausted) {
- stream->exhausted = 0;
-
- wev = stream->request->connection->write;
-
- if (!wev->timer_set) {
- wev->delayed = 0;
- wev->handler(wev);
- }
- }
- }
- }
-
- return NGX_OK;
-}
-
-
-static void
-ngx_http_spdy_pool_cleanup(void *data)
-{
- ngx_http_spdy_connection_t *sc = data;
-
- if (sc->pool) {
- ngx_destroy_pool(sc->pool);
- }
-}
-
-
-static void *
-ngx_http_spdy_zalloc(void *opaque, u_int items, u_int size)
-{
- ngx_http_spdy_connection_t *sc = opaque;
-
- return ngx_palloc(sc->connection->pool, items * size);
-}
-
-
-static void
-ngx_http_spdy_zfree(void *opaque, void *address)
-{
-#if 0
- ngx_http_spdy_connection_t *sc = opaque;
-
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy zfree: %p", address);
-#endif
-}
--- /dev/null
+
+/*
+ * Copyright (C) Nginx, Inc.
+ * Copyright (C) Valentin V. Bartenev
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_http.h>
+#include <ngx_http_v2_module.h>
+
+
+/* errors */
+#define NGX_HTTP_V2_NO_ERROR 0x0
+#define NGX_HTTP_V2_PROTOCOL_ERROR 0x1
+#define NGX_HTTP_V2_INTERNAL_ERROR 0x2
+#define NGX_HTTP_V2_FLOW_CTRL_ERROR 0x3
+#define NGX_HTTP_V2_SETTINGS_TIMEOUT 0x4
+#define NGX_HTTP_V2_STREAM_CLOSED 0x5
+#define NGX_HTTP_V2_SIZE_ERROR 0x6
+#define NGX_HTTP_V2_REFUSED_STREAM 0x7
+#define NGX_HTTP_V2_CANCEL 0x8
+#define NGX_HTTP_V2_COMP_ERROR 0x9
+#define NGX_HTTP_V2_CONNECT_ERROR 0xa
+#define NGX_HTTP_V2_ENHANCE_YOUR_CALM 0xb
+#define NGX_HTTP_V2_INADEQUATE_SECURITY 0xc
+#define NGX_HTTP_V2_HTTP_1_1_REQUIRED 0xd
+
+/* frame sizes */
+#define NGX_HTTP_V2_RST_STREAM_SIZE 4
+#define NGX_HTTP_V2_PRIORITY_SIZE 5
+#define NGX_HTTP_V2_PING_SIZE 8
+#define NGX_HTTP_V2_GOAWAY_SIZE 8
+#define NGX_HTTP_V2_WINDOW_UPDATE_SIZE 4
+
+#define NGX_HTTP_V2_STREAM_ID_SIZE 4
+
+#define NGX_HTTP_V2_SETTINGS_PARAM_SIZE 6
+
+/* settings fields */
+#define NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING 0x1
+#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_FRAME_BUFFER_SIZE 24
+
+#define NGX_HTTP_V2_DEFAULT_FRAME_SIZE (1 << 14)
+
+#define NGX_HTTP_V2_MAX_WINDOW ((1U << 31) - 1)
+#define NGX_HTTP_V2_DEFAULT_WINDOW 65535
+
+#define NGX_HTTP_V2_ROOT (void *) -1
+
+
+static void ngx_http_v2_read_handler(ngx_event_t *rev);
+static void ngx_http_v2_write_handler(ngx_event_t *wev);
+static void ngx_http_v2_handle_connection(ngx_http_v2_connection_t *h2c);
+
+static u_char *ngx_http_v2_state_proxy_protocol(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_preface(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_preface_end(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_head(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_data(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_read_data(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_header_block(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_field_len(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_field_huff(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_field_raw(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_field_skip(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_header_complete(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_priority(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_rst_stream(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_settings(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_settings_params(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_push_promise(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_ping(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_goaway(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_window_update(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_continuation(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_complete(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_skip_padded(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_skip(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_skip_headers(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end);
+static u_char *ngx_http_v2_state_save(ngx_http_v2_connection_t *h2c,
+ u_char *pos, u_char *end, ngx_http_v2_handler_pt handler);
+static u_char *ngx_http_v2_connection_error(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t err);
+
+static ngx_int_t ngx_http_v2_parse_int(ngx_http_v2_connection_t *h2c,
+ u_char **pos, u_char *end, ngx_uint_t prefix);
+
+static ngx_http_v2_stream_t *ngx_http_v2_create_stream(
+ ngx_http_v2_connection_t *h2c);
+static ngx_http_v2_node_t *ngx_http_v2_get_node_by_id(
+ ngx_http_v2_connection_t *h2c, ngx_uint_t sid, ngx_uint_t alloc);
+static ngx_http_v2_node_t *ngx_http_v2_get_closed_node(
+ ngx_http_v2_connection_t *h2c);
+#define ngx_http_v2_index_size(h2scf) (h2scf->streams_index_mask + 1)
+#define ngx_http_v2_index(h2scf, sid) ((sid >> 1) & h2scf->streams_index_mask)
+
+static ngx_int_t ngx_http_v2_send_settings(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t ack);
+static ngx_int_t ngx_http_v2_settings_frame_handler(
+ ngx_http_v2_connection_t *h2c, ngx_http_v2_out_frame_t *frame);
+static ngx_int_t ngx_http_v2_send_window_update(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t sid, size_t window);
+static ngx_int_t ngx_http_v2_send_rst_stream(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t sid, ngx_uint_t status);
+
+static ngx_http_v2_out_frame_t *ngx_http_v2_get_frame(
+ ngx_http_v2_connection_t *h2c, size_t length, ngx_uint_t type,
+ u_char flags, ngx_uint_t sid);
+static ngx_int_t ngx_http_v2_frame_handler(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_out_frame_t *frame);
+
+static ngx_int_t ngx_http_v2_validate_header(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_pseudo_header(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_parse_path(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_parse_method(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_parse_scheme(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_parse_authority(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_construct_request_line(ngx_http_request_t *r);
+static ngx_int_t ngx_http_v2_cookie(ngx_http_request_t *r,
+ ngx_http_v2_header_t *header);
+static ngx_int_t ngx_http_v2_construct_cookie_header(ngx_http_request_t *r);
+static void ngx_http_v2_run_request(ngx_http_request_t *r);
+static ngx_int_t ngx_http_v2_init_request_body(ngx_http_request_t *r);
+
+static ngx_int_t ngx_http_v2_terminate_stream(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_stream_t *stream, ngx_uint_t status);
+static void ngx_http_v2_close_stream_handler(ngx_event_t *ev);
+static void ngx_http_v2_handle_connection_handler(ngx_event_t *rev);
+static void ngx_http_v2_idle_handler(ngx_event_t *rev);
+static void ngx_http_v2_finalize_connection(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t status);
+
+static ngx_int_t ngx_http_v2_adjust_windows(ngx_http_v2_connection_t *h2c,
+ ssize_t delta);
+static void ngx_http_v2_set_dependency(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_node_t *node, ngx_uint_t depend, ngx_uint_t exclusive);
+static void ngx_http_v2_node_children_update(ngx_http_v2_node_t *node);
+
+static void ngx_http_v2_pool_cleanup(void *data);
+
+
+static ngx_http_v2_handler_pt ngx_http_v2_frame_states[] = {
+ ngx_http_v2_state_data,
+ ngx_http_v2_state_headers,
+ ngx_http_v2_state_priority,
+ ngx_http_v2_state_rst_stream,
+ ngx_http_v2_state_settings,
+ ngx_http_v2_state_push_promise,
+ ngx_http_v2_state_ping,
+ ngx_http_v2_state_goaway,
+ ngx_http_v2_state_window_update,
+ ngx_http_v2_state_continuation
+};
+
+#define NGX_HTTP_V2_FRAME_STATES \
+ (sizeof(ngx_http_v2_frame_states) / sizeof(ngx_http_v2_handler_pt))
+
+
+void
+ngx_http_v2_init(ngx_event_t *rev)
+{
+ ngx_connection_t *c;
+ ngx_pool_cleanup_t *cln;
+ ngx_http_connection_t *hc;
+ ngx_http_v2_srv_conf_t *h2scf;
+ ngx_http_v2_main_conf_t *h2mcf;
+ ngx_http_v2_connection_t *h2c;
+
+ c = rev->data;
+ hc = c->data;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "init http2 connection");
+
+ c->log->action = "processing HTTP/2 connection";
+
+ h2mcf = ngx_http_get_module_main_conf(hc->conf_ctx, ngx_http_v2_module);
+
+ if (h2mcf->recv_buffer == NULL) {
+ h2mcf->recv_buffer = ngx_palloc(ngx_cycle->pool,
+ h2mcf->recv_buffer_size);
+ if (h2mcf->recv_buffer == NULL) {
+ ngx_http_close_connection(c);
+ return;
+ }
+ }
+
+ h2c = ngx_pcalloc(c->pool, sizeof(ngx_http_v2_connection_t));
+ if (h2c == NULL) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ h2c->connection = c;
+ h2c->http_connection = hc;
+
+ h2c->send_window = NGX_HTTP_V2_DEFAULT_WINDOW;
+ h2c->recv_window = NGX_HTTP_V2_MAX_WINDOW;
+
+ h2c->init_window = NGX_HTTP_V2_DEFAULT_WINDOW;
+
+ h2c->frame_size = NGX_HTTP_V2_DEFAULT_FRAME_SIZE;
+
+ h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);
+
+ h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
+ if (h2c->pool == NULL) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ cln = ngx_pool_cleanup_add(c->pool, sizeof(ngx_pool_cleanup_file_t));
+ if (cln == NULL) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ cln->handler = ngx_http_v2_pool_cleanup;
+ cln->data = h2c;
+
+ h2c->streams_index = ngx_pcalloc(c->pool, ngx_http_v2_index_size(h2scf)
+ * sizeof(ngx_http_v2_node_t *));
+ if (h2c->streams_index == NULL) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ if (ngx_http_v2_send_settings(h2c, 0) == NGX_ERROR) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ if (ngx_http_v2_send_window_update(h2c, 0, NGX_HTTP_V2_MAX_WINDOW
+ - NGX_HTTP_V2_DEFAULT_WINDOW)
+ == NGX_ERROR)
+ {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ h2c->state.handler = hc->proxy_protocol ? ngx_http_v2_state_proxy_protocol
+ : ngx_http_v2_state_preface;
+
+ ngx_queue_init(&h2c->waiting);
+ ngx_queue_init(&h2c->posted);
+ ngx_queue_init(&h2c->dependencies);
+ ngx_queue_init(&h2c->closed);
+
+ c->data = h2c;
+
+ rev->handler = ngx_http_v2_read_handler;
+ c->write->handler = ngx_http_v2_write_handler;
+
+ ngx_http_v2_read_handler(rev);
+}
+
+
+static void
+ngx_http_v2_read_handler(ngx_event_t *rev)
+{
+ u_char *p, *end;
+ size_t available;
+ ssize_t n;
+ ngx_connection_t *c;
+ ngx_http_v2_main_conf_t *h2mcf;
+ ngx_http_v2_connection_t *h2c;
+
+ c = rev->data;
+ h2c = c->data;
+
+ if (rev->timedout) {
+ ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
+ ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ return;
+ }
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http2 read handler");
+
+ h2c->blocked = 1;
+
+ h2mcf = ngx_http_get_module_main_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ available = h2mcf->recv_buffer_size - 2 * NGX_HTTP_V2_STATE_BUFFER_SIZE;
+
+ do {
+ p = h2mcf->recv_buffer;
+
+ ngx_memcpy(p, h2c->state.buffer, NGX_HTTP_V2_STATE_BUFFER_SIZE);
+ end = p + h2c->state.buffer_used;
+
+ n = c->recv(c, end, available);
+
+ if (n == NGX_AGAIN) {
+ break;
+ }
+
+ if (n == 0 && (h2c->state.incomplete || h2c->processing)) {
+ ngx_log_error(NGX_LOG_INFO, c->log, 0,
+ "client prematurely closed connection");
+ }
+
+ if (n == 0 || n == NGX_ERROR) {
+ c->error = 1;
+ ngx_http_v2_finalize_connection(h2c, 0);
+ return;
+ }
+
+ end += n;
+
+ h2c->state.buffer_used = 0;
+ h2c->state.incomplete = 0;
+
+ do {
+ p = h2c->state.handler(h2c, p, end);
+
+ if (p == NULL) {
+ return;
+ }
+
+ } while (p != end);
+
+ } while (rev->ready);
+
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
+ ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ return;
+ }
+
+ if (h2c->last_out && ngx_http_v2_send_output_queue(h2c) == NGX_ERROR) {
+ ngx_http_v2_finalize_connection(h2c, 0);
+ return;
+ }
+
+ h2c->blocked = 0;
+
+ if (h2c->processing) {
+ if (rev->timer_set) {
+ ngx_del_timer(rev);
+ }
+
+ return;
+ }
+
+ ngx_http_v2_handle_connection(h2c);
+}
+
+
+static void
+ngx_http_v2_write_handler(ngx_event_t *wev)
+{
+ ngx_int_t rc;
+ ngx_queue_t *q;
+ ngx_connection_t *c;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_v2_connection_t *h2c;
+
+ c = wev->data;
+ h2c = c->data;
+
+ if (wev->timedout) {
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
+ "http2 write event timed out");
+ c->error = 1;
+ ngx_http_v2_finalize_connection(h2c, 0);
+ return;
+ }
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http2 write handler");
+
+ h2c->blocked = 1;
+
+ rc = ngx_http_v2_send_output_queue(h2c);
+
+ if (rc == NGX_ERROR) {
+ ngx_http_v2_finalize_connection(h2c, 0);
+ return;
+ }
+
+ while (!ngx_queue_empty(&h2c->posted)) {
+ q = ngx_queue_head(&h2c->posted);
+
+ ngx_queue_remove(q);
+
+ stream = ngx_queue_data(q, ngx_http_v2_stream_t, queue);
+
+ stream->handled = 0;
+
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
+ "run http2 stream %ui", stream->node->id);
+
+ wev = stream->request->connection->write;
+ wev->handler(wev);
+ }
+
+ h2c->blocked = 0;
+
+ if (rc == NGX_AGAIN) {
+ return;
+ }
+
+ ngx_http_v2_handle_connection(h2c);
+}
+
+
+ngx_int_t
+ngx_http_v2_send_output_queue(ngx_http_v2_connection_t *h2c)
+{
+ int tcp_nodelay;
+ ngx_chain_t *cl;
+ ngx_event_t *wev;
+ ngx_connection_t *c;
+ ngx_http_v2_out_frame_t *out, *frame, *fn;
+ ngx_http_core_loc_conf_t *clcf;
+
+ c = h2c->connection;
+
+ if (c->error) {
+ return NGX_ERROR;
+ }
+
+ wev = c->write;
+
+ if (!wev->ready) {
+ return NGX_OK;
+ }
+
+ cl = NULL;
+ out = NULL;
+
+ for (frame = h2c->last_out; frame; frame = fn) {
+ frame->last->next = cl;
+ cl = frame->first;
+
+ fn = frame->next;
+ frame->next = out;
+ out = frame;
+
+ ngx_log_debug4(NGX_LOG_DEBUG_HTTP, c->log, 0,
+ "http2 frame out: %p sid:%ui bl:%d len:%uz",
+ out, out->stream ? out->stream->node->id : 0,
+ out->blocked, out->length);
+ }
+
+ cl = c->send_chain(c, cl, 0);
+
+ if (cl == NGX_CHAIN_ERROR) {
+ goto error;
+ }
+
+ clcf = ngx_http_get_module_loc_conf(h2c->http_connection->conf_ctx,
+ ngx_http_core_module);
+
+ if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
+ goto error;
+ }
+
+ if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) {
+ if (ngx_tcp_push(c->fd) == -1) {
+ ngx_connection_error(c, ngx_socket_errno, ngx_tcp_push_n " failed");
+ goto error;
+ }
+
+ c->tcp_nopush = NGX_TCP_NOPUSH_UNSET;
+ tcp_nodelay = ngx_tcp_nodelay_and_tcp_nopush ? 1 : 0;
+
+ } else {
+ tcp_nodelay = 1;
+ }
+
+ if (tcp_nodelay
+ && clcf->tcp_nodelay
+ && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET)
+ {
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "tcp_nodelay");
+
+ if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
+ (const void *) &tcp_nodelay, sizeof(int))
+ == -1)
+ {
+#if (NGX_SOLARIS)
+ /* Solaris returns EINVAL if a socket has been shut down */
+ c->log_error = NGX_ERROR_IGNORE_EINVAL;
+#endif
+
+ ngx_connection_error(c, ngx_socket_errno,
+ "setsockopt(TCP_NODELAY) failed");
+
+ c->log_error = NGX_ERROR_INFO;
+ goto error;
+ }
+
+ c->tcp_nodelay = NGX_TCP_NODELAY_SET;
+ }
+
+ if (cl) {
+ ngx_add_timer(wev, clcf->send_timeout);
+
+ } else {
+ if (wev->timer_set) {
+ ngx_del_timer(wev);
+ }
+ }
+
+ for ( /* void */ ; out; out = fn) {
+ fn = out->next;
+
+ if (out->handler(h2c, out) != NGX_OK) {
+ out->blocked = 1;
+ break;
+ }
+
+ ngx_log_debug4(NGX_LOG_DEBUG_HTTP, c->log, 0,
+ "http2 frame sent: %p sid:%ui bl:%d len:%uz",
+ out, out->stream ? out->stream->node->id : 0,
+ out->blocked, out->length);
+ }
+
+ frame = NULL;
+
+ for ( /* void */ ; out; out = fn) {
+ fn = out->next;
+ out->next = frame;
+ frame = out;
+ }
+
+ h2c->last_out = frame;
+
+ return NGX_OK;
+
+error:
+
+ c->error = 1;
+
+ if (!h2c->blocked) {
+ ngx_post_event(wev, &ngx_posted_events);
+ }
+
+ return NGX_ERROR;
+}
+
+
+static void
+ngx_http_v2_handle_connection(ngx_http_v2_connection_t *h2c)
+{
+ ngx_connection_t *c;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ if (h2c->last_out || h2c->processing) {
+ return;
+ }
+
+ c = h2c->connection;
+
+ if (c->error) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ if (c->buffered) {
+ return;
+ }
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+ if (h2c->state.incomplete) {
+ ngx_add_timer(c->read, h2scf->recv_timeout);
+ return;
+ }
+
+ if (ngx_terminate || ngx_exiting) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ ngx_destroy_pool(h2c->pool);
+
+ h2c->pool = NULL;
+ h2c->free_frames = NULL;
+ h2c->free_fake_connections = NULL;
+
+#if (NGX_HTTP_SSL)
+ if (c->ssl) {
+ ngx_ssl_free_buffer(c);
+ }
+#endif
+
+ c->destroyed = 1;
+ c->idle = 1;
+ ngx_reusable_connection(c, 1);
+
+ c->write->handler = ngx_http_empty_handler;
+ c->read->handler = ngx_http_v2_idle_handler;
+
+ if (c->write->timer_set) {
+ ngx_del_timer(c->write);
+ }
+
+ ngx_add_timer(c->read, h2scf->idle_timeout);
+}
+
+
+static u_char *
+ngx_http_v2_state_proxy_protocol(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_log_t *log;
+
+ log = h2c->connection->log;
+ log->action = "reading PROXY protocol";
+
+ pos = ngx_proxy_protocol_read(h2c->connection, pos, end);
+
+ log->action = "processing HTTP/2 connection";
+
+ if (pos == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ return ngx_http_v2_state_preface(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_preface(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ static const u_char preface[] = "PRI * HTTP/2.0\r\n";
+
+ if ((size_t) (end - pos) < sizeof(preface) - 1) {
+ return ngx_http_v2_state_save(h2c, pos, end, ngx_http_v2_state_preface);
+ }
+
+ if (ngx_memcmp(pos, preface, sizeof(preface) - 1) != 0) {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "invalid http2 connection preface \"%*s\"",
+ sizeof(preface) - 1, pos);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ return ngx_http_v2_state_preface_end(h2c, pos + sizeof(preface) - 1, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_preface_end(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ static const u_char preface[] = "\r\nSM\r\n\r\n";
+
+ if ((size_t) (end - pos) < sizeof(preface) - 1) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_preface_end);
+ }
+
+ if (ngx_memcmp(pos, preface, sizeof(preface) - 1) != 0) {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "invalid http2 connection preface \"%*s\"",
+ sizeof(preface) - 1, pos);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 preface verified");
+
+ return ngx_http_v2_state_head(h2c, pos + sizeof(preface) - 1, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_head(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
+{
+ uint32_t head;
+ ngx_uint_t type;
+
+ if (end - pos < NGX_HTTP_V2_FRAME_HEADER_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end, ngx_http_v2_state_head);
+ }
+
+ head = ngx_http_v2_parse_uint32(pos);
+
+ h2c->state.length = ngx_http_v2_parse_length(head);
+ h2c->state.flags = pos[4];
+
+ h2c->state.sid = ngx_http_v2_parse_sid(&pos[5]);
+
+ pos += NGX_HTTP_V2_FRAME_HEADER_SIZE;
+
+ type = ngx_http_v2_parse_type(head);
+
+ ngx_log_debug4(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "process http2 frame type:%ui f:%Xd l:%uz sid:%ui",
+ type, h2c->state.flags, h2c->state.length, h2c->state.sid);
+
+ if (type >= NGX_HTTP_V2_FRAME_STATES) {
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 frame with unknown type %ui", type);
+ return ngx_http_v2_state_skip(h2c, pos, end);
+ }
+
+ return ngx_http_v2_frame_states[type](h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_data(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
+{
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+
+ if (h2c->state.flags & NGX_HTTP_V2_PADDED_FLAG) {
+
+ if (h2c->state.length == 0) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent padded DATA frame "
+ "with incorrect length: %uz",
+ h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos == 0) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_data);
+ }
+
+ h2c->state.padding = *pos++;
+ h2c->state.length--;
+
+ if (h2c->state.padding > h2c->state.length) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent padded DATA frame "
+ "with incorrect length: %uz, padding: %uz",
+ h2c->state.length, h2c->state.padding);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ h2c->state.length -= h2c->state.padding;
+ }
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 DATA frame");
+
+ if (h2c->state.length > h2c->recv_window) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client violated connection flow control: "
+ "received DATA frame length %uz, available window %uz",
+ h2c->state.length, h2c->recv_window);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_FLOW_CTRL_ERROR);
+ }
+
+ h2c->recv_window -= h2c->state.length;
+
+ if (h2c->recv_window < NGX_HTTP_V2_MAX_WINDOW / 4) {
+
+ if (ngx_http_v2_send_window_update(h2c, 0, NGX_HTTP_V2_MAX_WINDOW
+ - h2c->recv_window)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ h2c->recv_window = NGX_HTTP_V2_MAX_WINDOW;
+ }
+
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
+
+ if (node == NULL || node->stream == NULL) {
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "unknown http2 stream");
+
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ stream = node->stream;
+
+ if (h2c->state.length > stream->recv_window) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client violated flow control for stream %ui: "
+ "received DATA frame length %uz, available window %uz",
+ node->id, h2c->state.length, stream->recv_window);
+
+ if (ngx_http_v2_terminate_stream(h2c, stream,
+ NGX_HTTP_V2_FLOW_CTRL_ERROR)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ stream->recv_window -= h2c->state.length;
+
+ if (stream->recv_window < NGX_HTTP_V2_MAX_WINDOW / 4) {
+
+ if (ngx_http_v2_send_window_update(h2c, node->id,
+ NGX_HTTP_V2_MAX_WINDOW
+ - stream->recv_window)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ stream->recv_window = NGX_HTTP_V2_MAX_WINDOW;
+ }
+
+ if (stream->in_closed) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent DATA frame for half-closed stream %ui",
+ node->id);
+
+ if (ngx_http_v2_terminate_stream(h2c, stream,
+ NGX_HTTP_V2_STREAM_CLOSED)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ h2c->state.stream = stream;
+
+ return ngx_http_v2_state_read_data(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_read_data(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t size;
+ ssize_t n;
+ ngx_buf_t *buf;
+ ngx_int_t rc;
+ ngx_temp_file_t *tf;
+ ngx_http_request_t *r;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_request_body_t *rb;
+ ngx_http_core_loc_conf_t *clcf;
+
+ stream = h2c->state.stream;
+
+ if (stream == NULL) {
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ if (stream->skip_data) {
+ stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG;
+
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "skipping http2 DATA frame, reason: %d",
+ stream->skip_data);
+
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ size = end - pos;
+
+ if (size > h2c->state.length) {
+ size = h2c->state.length;
+ }
+
+ r = stream->request;
+
+ if (r->request_body == NULL
+ && ngx_http_v2_init_request_body(r) != NGX_OK)
+ {
+ stream->skip_data = NGX_HTTP_V2_DATA_INTERNAL_ERROR;
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ rb = r->request_body;
+ tf = rb->temp_file;
+ buf = rb->buf;
+
+ if (size) {
+ rb->rest += size;
+
+ if (r->headers_in.content_length_n != -1
+ && r->headers_in.content_length_n < rb->rest)
+ {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client intended to send body data "
+ "larger than declared");
+
+ stream->skip_data = NGX_HTTP_V2_DATA_ERROR;
+ goto error;
+
+ } else {
+ clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+
+ if (clcf->client_max_body_size
+ && clcf->client_max_body_size < rb->rest)
+ {
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+ "client intended to send "
+ "too large chunked body: %O bytes", rb->rest);
+
+ stream->skip_data = NGX_HTTP_V2_DATA_ERROR;
+ goto error;
+ }
+ }
+
+ h2c->state.length -= size;
+
+ if (tf) {
+ buf->start = pos;
+ buf->pos = pos;
+
+ pos += size;
+
+ buf->end = pos;
+ buf->last = pos;
+
+ n = ngx_write_chain_to_temp_file(tf, rb->bufs);
+
+ /* TODO: n == 0 or not complete and level event */
+
+ if (n == NGX_ERROR) {
+ stream->skip_data = NGX_HTTP_V2_DATA_INTERNAL_ERROR;
+ goto error;
+ }
+
+ tf->offset += n;
+
+ } else {
+ buf->last = ngx_cpymem(buf->last, pos, size);
+ pos += size;
+ }
+
+ r->request_length += size;
+ }
+
+ if (h2c->state.length) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_read_data);
+ }
+
+ if (h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG) {
+ stream->in_closed = 1;
+
+ if (r->headers_in.content_length_n < 0) {
+ r->headers_in.content_length_n = rb->rest;
+
+ } else if (r->headers_in.content_length_n != rb->rest) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client prematurely closed stream: "
+ "only %O out of %O bytes of request body received",
+ rb->rest, r->headers_in.content_length_n);
+
+ stream->skip_data = NGX_HTTP_V2_DATA_ERROR;
+ goto error;
+ }
+
+ if (tf) {
+ ngx_memzero(buf, sizeof(ngx_buf_t));
+
+ buf->in_file = 1;
+ buf->file_last = tf->file.offset;
+ buf->file = &tf->file;
+
+ rb->buf = NULL;
+ }
+
+ if (rb->post_handler) {
+ r->read_event_handler = ngx_http_block_reading;
+ rb->post_handler(r);
+ }
+ }
+
+ if (h2c->state.padding) {
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+
+error:
+
+ if (rb->post_handler) {
+
+ if (stream->skip_data == NGX_HTTP_V2_DATA_ERROR) {
+ rc = (r->headers_in.content_length_n == -1)
+ ? NGX_HTTP_REQUEST_ENTITY_TOO_LARGE : NGX_HTTP_BAD_REQUEST;
+
+ } else {
+ rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+
+ ngx_http_finalize_request(r, rc);
+ }
+
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t size;
+ ngx_uint_t padded, priority, depend, dependency, excl, weight;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ padded = h2c->state.flags & NGX_HTTP_V2_PADDED_FLAG;
+ priority = h2c->state.flags & NGX_HTTP_V2_PRIORITY_FLAG;
+
+ size = 0;
+
+ if (padded) {
+ size++;
+ }
+
+ if (priority) {
+ size += sizeof(uint32_t) + 1;
+ }
+
+ if (h2c->state.length < size) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent HEADERS frame with incorrect length %uz",
+ h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (h2c->state.length == size) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent HEADERS frame with empty header block");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if ((size_t) (end - pos) < size) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_headers);
+ }
+
+ h2c->state.length -= size;
+
+ if (padded) {
+ h2c->state.padding = *pos++;
+
+ if (h2c->state.padding > h2c->state.length) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent padded HEADERS frame "
+ "with incorrect length: %uz, padding: %uz",
+ h2c->state.length, h2c->state.padding);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ h2c->state.length -= h2c->state.padding;
+ }
+
+ depend = 0;
+ excl = 0;
+ weight = 16;
+
+ if (priority) {
+ dependency = ngx_http_v2_parse_uint32(pos);
+
+ depend = dependency & 0x7fffffff;
+ excl = dependency >> 31;
+ weight = pos[4] + 1;
+
+ pos += sizeof(uint32_t) + 1;
+ }
+
+ ngx_log_debug4(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 HEADERS frame sid:%ui on %ui excl:%ui weight:%ui",
+ h2c->state.sid, depend, excl, weight);
+
+ if (h2c->state.sid % 2 == 0 || h2c->state.sid <= h2c->last_sid) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent HEADERS frame with incorrect identifier "
+ "%ui, the last was %ui", h2c->state.sid, h2c->last_sid);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ h2c->last_sid = h2c->state.sid;
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ h2c->state.header_limit = h2scf->max_header_size;
+
+ if (h2c->processing >= h2scf->concurrent_streams) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "concurrent streams exceeded %ui", h2c->processing);
+
+ if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid,
+ NGX_HTTP_V2_REFUSED_STREAM)
+ != NGX_OK)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ return ngx_http_v2_state_skip_headers(h2c, pos, end);
+ }
+
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 1);
+
+ if (node == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ if (node->parent) {
+ ngx_queue_remove(&node->reuse);
+ h2c->closed_nodes--;
+ }
+
+ stream = ngx_http_v2_create_stream(h2c);
+ if (stream == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG;
+ stream->node = node;
+
+ node->stream = stream;
+
+ h2c->state.stream = stream;
+ h2c->state.pool = stream->request->pool;
+
+ if (priority || node->parent == NULL) {
+ node->weight = weight;
+ ngx_http_v2_set_dependency(h2c, node, depend, excl);
+ }
+
+ return ngx_http_v2_state_header_block(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_header_block(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ u_char ch;
+ ngx_int_t value;
+ ngx_uint_t indexed, size_update, prefix;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ if (end - pos < 1) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_header_block);
+ }
+
+ size_update = 0;
+ indexed = 0;
+
+ ch = *pos;
+
+ if (ch >= (1 << 7)) {
+ /* indexed header field */
+ indexed = 1;
+ prefix = ngx_http_v2_prefix(7);
+
+ } else if (ch >= (1 << 6)) {
+ /* literal header field with incremental indexing */
+ h2c->state.index = 1;
+ prefix = ngx_http_v2_prefix(6);
+
+ } else if (ch >= (1 << 5)) {
+ /* dynamic table size update */
+ size_update = 1;
+ prefix = ngx_http_v2_prefix(5);
+
+ } else if (ch >= (1 << 4)) {
+ /* literal header field never indexed */
+ prefix = ngx_http_v2_prefix(4);
+
+ } else {
+ /* literal header field without indexing */
+ prefix = ngx_http_v2_prefix(3);
+ }
+
+ value = ngx_http_v2_parse_int(h2c, &pos, end, prefix);
+
+ if (value < 0) {
+ if (value == NGX_AGAIN) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_header_block);
+ }
+
+ if (value == NGX_DECLINED) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent header block with too long %s value",
+ size_update ? "size update" : "header index");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR);
+ }
+
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent header block with incorrect length");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (indexed) {
+ if (ngx_http_v2_get_indexed_header(h2c, value, 0) != NGX_OK) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR);
+ }
+
+ return ngx_http_v2_state_process_header(h2c, pos, end);
+ }
+
+ if (size_update) {
+ if (ngx_http_v2_table_size(h2c, value) != NGX_OK) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR);
+ }
+
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+ }
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ h2c->state.field_limit = h2scf->max_field_size;
+
+ if (value == 0) {
+ h2c->state.parse_name = 1;
+
+ } else {
+ if (ngx_http_v2_get_indexed_header(h2c, value, 1) != NGX_OK) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR);
+ }
+
+ h2c->state.field_limit -= h2c->state.header.name.len;
+ }
+
+ h2c->state.parse_value = 1;
+
+ return ngx_http_v2_state_field_len(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_field_len(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t alloc;
+ ngx_int_t len;
+ ngx_uint_t huff;
+
+ if (h2c->state.length < 1) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent header block with incorrect length");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos < 1) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_field_len);
+ }
+
+ huff = *pos >> 7;
+ len = ngx_http_v2_parse_int(h2c, &pos, end, ngx_http_v2_prefix(7));
+
+ if (len < 0) {
+ if (len == NGX_AGAIN) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_field_len);
+ }
+
+ if (len == NGX_DECLINED) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent header field with too long length value");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR);
+ }
+
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent header block with incorrect length");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 hpack %s string length: %i",
+ huff ? "encoded" : "raw", len);
+
+ if ((size_t) len > h2c->state.length) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent header field with incorrect length");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ h2c->state.length -= len;
+
+ if ((size_t) len > h2c->state.field_limit) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client exceeded http2_max_field_size limit");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_ENHANCE_YOUR_CALM);
+ }
+
+ h2c->state.field_limit -= len;
+ h2c->state.field_rest = len;
+
+ if (h2c->state.stream == NULL && !h2c->state.index) {
+ return ngx_http_v2_state_field_skip(h2c, pos, end);
+ }
+
+ alloc = (huff ? len * 8 / 5 : len) + 1;
+
+ h2c->state.field_start = ngx_pnalloc(h2c->state.pool, alloc);
+ if (h2c->state.field_start == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ h2c->state.field_end = h2c->state.field_start;
+
+ if (huff) {
+ return ngx_http_v2_state_field_huff(h2c, pos, end);
+ }
+
+ return ngx_http_v2_state_field_raw(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_field_huff(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t size;
+
+ size = end - pos;
+
+ if (size > h2c->state.field_rest) {
+ size = h2c->state.field_rest;
+ }
+
+ h2c->state.field_rest -= size;
+
+ if (ngx_http_v2_huff_decode(&h2c->state.field_state, pos, size,
+ &h2c->state.field_end,
+ h2c->state.field_rest == 0,
+ h2c->connection->log)
+ != NGX_OK)
+ {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent invalid encoded header field");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR);
+ }
+
+ if (h2c->state.field_rest != 0) {
+ return ngx_http_v2_state_save(h2c, end, end,
+ ngx_http_v2_state_field_huff);
+ }
+
+ *h2c->state.field_end = '\0';
+
+ return ngx_http_v2_state_process_header(h2c, pos + size, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_field_raw(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t size;
+
+ size = end - pos;
+
+ if (size > h2c->state.field_rest) {
+ size = h2c->state.field_rest;
+ }
+
+ h2c->state.field_rest -= size;
+
+ h2c->state.field_end = ngx_cpymem(h2c->state.field_end, pos, size);
+
+ if (h2c->state.field_rest) {
+ return ngx_http_v2_state_save(h2c, end, end,
+ ngx_http_v2_state_field_raw);
+ }
+
+ *h2c->state.field_end = '\0';
+
+ return ngx_http_v2_state_process_header(h2c, pos + size, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_field_skip(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t size;
+
+ size = end - pos;
+
+ if (size > h2c->state.field_rest) {
+ size = h2c->state.field_rest;
+ }
+
+ h2c->state.field_rest -= size;
+
+ return ngx_http_v2_state_process_header(h2c, pos + size, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t len;
+ ngx_int_t rc;
+ ngx_table_elt_t *h;
+ ngx_http_header_t *hh;
+ ngx_http_request_t *r;
+ ngx_http_v2_header_t *header;
+ ngx_http_core_srv_conf_t *cscf;
+ ngx_http_core_main_conf_t *cmcf;
+
+ static ngx_str_t cookie = ngx_string("cookie");
+
+ header = &h2c->state.header;
+
+ if (h2c->state.parse_name) {
+ h2c->state.parse_name = 0;
+
+ header->name.len = h2c->state.field_end - h2c->state.field_start;
+ header->name.data = h2c->state.field_start;
+
+ return ngx_http_v2_state_field_len(h2c, pos, end);
+ }
+
+ if (h2c->state.parse_value) {
+ h2c->state.parse_value = 0;
+
+ header->value.len = h2c->state.field_end - h2c->state.field_start;
+ header->value.data = h2c->state.field_start;
+ }
+
+ len = header->name.len + header->value.len;
+
+ if (len > h2c->state.header_limit) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client exceeded http2_max_header_size limit");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_ENHANCE_YOUR_CALM);
+ }
+
+ h2c->state.header_limit -= len;
+
+ if (h2c->state.index) {
+ if (ngx_http_v2_add_header(h2c, header) != NGX_OK) {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ h2c->state.index = 0;
+ }
+
+ if (h2c->state.stream == NULL) {
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+ }
+
+ r = h2c->state.stream->request;
+
+ /* TODO Optimization: validate headers while parsing. */
+ if (ngx_http_v2_validate_header(r, header) != NGX_OK) {
+ if (ngx_http_v2_terminate_stream(h2c, h2c->state.stream,
+ NGX_HTTP_V2_PROTOCOL_ERROR)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ goto error;
+ }
+
+ if (header->name.data[0] == ':') {
+ rc = ngx_http_v2_pseudo_header(r, header);
+
+ if (rc == NGX_OK) {
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+ }
+
+ if (rc == NGX_ABORT) {
+ goto error;
+ }
+
+ if (rc == NGX_DECLINED) {
+ if (ngx_http_v2_terminate_stream(h2c, h2c->state.stream,
+ NGX_HTTP_V2_PROTOCOL_ERROR)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ goto error;
+ }
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ if (r->invalid_header) {
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+
+ if (cscf->ignore_invalid_headers) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent invalid header: \"%V\"", &header->name);
+
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+ }
+ }
+
+ if (header->name.len == cookie.len
+ && ngx_memcmp(header->name.data, cookie.data, cookie.len) == 0)
+ {
+ if (ngx_http_v2_cookie(r, header) != NGX_OK) {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+ }
+
+ h = ngx_list_push(&r->headers_in.headers);
+ if (h == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ h->key.len = header->name.len;
+ h->key.data = header->name.data;
+
+ /* TODO Optimization: precalculate hash and hadnler for indexed headers. */
+ h->hash = ngx_hash_key(h->key.data, h->key.len);
+
+ h->value.len = header->value.len;
+ h->value.data = header->value.data;
+
+ h->lowcase_key = h->key.data;
+
+ cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
+
+ hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash,
+ h->lowcase_key, h->key.len);
+
+ if (hh && hh->handler(r, h, hh->offset) != NGX_OK) {
+ goto error;
+ }
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http2 http header: \"%V: %V\"", &h->key, &h->value);
+
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+
+error:
+
+ h2c->state.stream = NULL;
+ h2c->state.pool = NULL;
+
+ return ngx_http_v2_state_header_complete(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_header_complete(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_http_v2_stream_t *stream;
+
+ if (h2c->state.length) {
+ h2c->state.handler = h2c->state.pool ? ngx_http_v2_state_header_block
+ : ngx_http_v2_state_skip_headers;
+ return pos;
+ }
+
+ stream = h2c->state.stream;
+
+ if (stream) {
+ if (h2c->state.flags & NGX_HTTP_V2_END_HEADERS_FLAG) {
+ stream->end_headers = 1;
+ ngx_http_v2_run_request(stream->request);
+
+ } else {
+ stream->header_limit = h2c->state.header_limit;
+ }
+
+ } else if (h2c->state.pool) {
+ ngx_destroy_pool(h2c->state.pool);
+ }
+
+ h2c->state.pool = NULL;
+
+ if (h2c->state.padding) {
+ return ngx_http_v2_state_skip_padded(h2c, pos, end);
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_priority(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_uint_t depend, dependency, excl, weight;
+ ngx_http_v2_node_t *node;
+
+ if (h2c->state.length != NGX_HTTP_V2_PRIORITY_SIZE) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent PRIORITY frame with incorrect length %uz",
+ h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos < NGX_HTTP_V2_PRIORITY_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_priority);
+ }
+
+ dependency = ngx_http_v2_parse_uint32(pos);
+
+ depend = dependency & 0x7fffffff;
+ excl = dependency >> 31;
+ weight = pos[4] + 1;
+
+ pos += NGX_HTTP_V2_PRIORITY_SIZE;
+
+ ngx_log_debug4(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 PRIORITY frame sid:%ui on %ui excl:%ui weight:%ui",
+ h2c->state.sid, depend, excl, weight);
+
+ if (h2c->state.sid == 0) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent PRIORITY frame with incorrect identifier");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ if (depend == h2c->state.sid) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent PRIORITY frame for stream %ui "
+ "with incorrect dependancy", h2c->state.sid);
+
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
+
+ if (node && node->stream) {
+ if (ngx_http_v2_terminate_stream(h2c, node->stream,
+ NGX_HTTP_V2_PROTOCOL_ERROR)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ } else {
+ if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid,
+ NGX_HTTP_V2_PROTOCOL_ERROR)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+ }
+
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 1);
+
+ if (node == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ node->weight = weight;
+
+ if (node->stream == NULL) {
+ if (node->parent == NULL) {
+ h2c->closed_nodes++;
+
+ } else {
+ ngx_queue_remove(&node->reuse);
+ }
+
+ ngx_queue_insert_tail(&h2c->closed, &node->reuse);
+ }
+
+ ngx_http_v2_set_dependency(h2c, node, depend, excl);
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_rst_stream(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_uint_t status;
+ ngx_event_t *ev;
+ ngx_connection_t *fc;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+
+ if (h2c->state.length != NGX_HTTP_V2_RST_STREAM_SIZE) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent RST_STREAM frame with incorrect length %uz",
+ h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos < NGX_HTTP_V2_RST_STREAM_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_rst_stream);
+ }
+
+ status = ngx_http_v2_parse_uint32(pos);
+
+ pos += NGX_HTTP_V2_RST_STREAM_SIZE;
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 RST_STREAM frame, sid:%ui status:%ui",
+ h2c->state.sid, status);
+
+ if (h2c->state.sid == 0) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent RST_STREAM frame with incorrect identifier");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
+
+ if (node == NULL || node->stream == NULL) {
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "unknown http2 stream");
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+ }
+
+ stream = node->stream;
+
+ stream->in_closed = 1;
+ stream->out_closed = 1;
+
+ fc = stream->request->connection;
+ fc->error = 1;
+
+ switch (status) {
+
+ case NGX_HTTP_V2_CANCEL:
+ ngx_log_error(NGX_LOG_INFO, fc->log, 0,
+ "client canceled stream %ui", h2c->state.sid);
+ break;
+
+ case NGX_HTTP_V2_INTERNAL_ERROR:
+ ngx_log_error(NGX_LOG_INFO, fc->log, 0,
+ "client terminated stream %ui due to internal error",
+ h2c->state.sid);
+ break;
+
+ default:
+ ngx_log_error(NGX_LOG_INFO, fc->log, 0,
+ "client terminated stream %ui with status %ui",
+ h2c->state.sid, status);
+ break;
+ }
+
+ ev = fc->read;
+ ev->handler(ev);
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_settings(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ if (h2c->state.flags == NGX_HTTP_V2_ACK_FLAG) {
+
+ if (h2c->state.length != 0) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent SETTINGS frame with the ACK flag "
+ "and nonzero length");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ /* TODO settings acknowledged */
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+ }
+
+ if (h2c->state.length % NGX_HTTP_V2_SETTINGS_PARAM_SIZE) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent SETTINGS frame with incorrect length %uz",
+ h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ ngx_http_v2_send_settings(h2c, 1);
+
+ return ngx_http_v2_state_settings_params(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_settings_params(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_uint_t id, value;
+
+ while (h2c->state.length) {
+ if (end - pos < NGX_HTTP_V2_SETTINGS_PARAM_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_settings_params);
+ }
+
+ h2c->state.length -= NGX_HTTP_V2_SETTINGS_PARAM_SIZE;
+
+ id = ngx_http_v2_parse_uint16(pos);
+ value = ngx_http_v2_parse_uint32(&pos[2]);
+
+ switch (id) {
+
+ case NGX_HTTP_V2_INIT_WINDOW_SIZE_SETTING:
+
+ if (value > NGX_HTTP_V2_MAX_WINDOW) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent SETTINGS frame with incorrect "
+ "INITIAL_WINDOW_SIZE value %ui", value);
+
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_FLOW_CTRL_ERROR);
+ }
+
+ if (ngx_http_v2_adjust_windows(h2c, value - h2c->init_window)
+ != NGX_OK)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ h2c->init_window = value;
+ break;
+
+ case NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING:
+ if (value > NGX_HTTP_V2_MAX_FRAME_SIZE
+ || value < NGX_HTTP_V2_DEFAULT_FRAME_SIZE)
+ {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent SETTINGS frame with incorrect "
+ "MAX_FRAME_SIZE value %ui", value);
+
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ h2c->frame_size = value;
+ break;
+
+ default:
+ break;
+ }
+
+ pos += NGX_HTTP_V2_SETTINGS_PARAM_SIZE;
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_push_promise(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent PUSH_PROMISE frame");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+}
+
+
+static u_char *
+ngx_http_v2_state_ping(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
+{
+ ngx_buf_t *buf;
+ ngx_http_v2_out_frame_t *frame;
+
+ if (h2c->state.length != NGX_HTTP_V2_PING_SIZE) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent PING frame with incorrect length %uz",
+ h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos < NGX_HTTP_V2_PING_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end, ngx_http_v2_state_ping);
+ }
+
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 PING frame, flags: %ui", h2c->state.flags);
+
+ if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) {
+ return ngx_http_v2_state_skip(h2c, pos, end);
+ }
+
+ frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_PING_SIZE,
+ NGX_HTTP_V2_PING_FRAME,
+ NGX_HTTP_V2_ACK_FLAG, 0);
+ if (frame == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ buf = frame->first->buf;
+
+ buf->last = ngx_cpymem(buf->last, pos, NGX_HTTP_V2_PING_SIZE);
+
+ ngx_http_v2_queue_blocked_frame(h2c, frame);
+
+ return ngx_http_v2_state_complete(h2c, pos + NGX_HTTP_V2_PING_SIZE, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_goaway(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+#if (NGX_DEBUG)
+ ngx_uint_t last_sid, error;
+#endif
+
+ if (h2c->state.length < NGX_HTTP_V2_GOAWAY_SIZE) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent GOAWAY frame "
+ "with incorrect length %uz", h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos < NGX_HTTP_V2_GOAWAY_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end, ngx_http_v2_state_goaway);
+ }
+
+#if (NGX_DEBUG)
+ h2c->state.length -= NGX_HTTP_V2_GOAWAY_SIZE;
+
+ last_sid = ngx_http_v2_parse_sid(pos);
+ error = ngx_http_v2_parse_uint32(&pos[4]);
+
+ pos += NGX_HTTP_V2_GOAWAY_SIZE;
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 GOAWAY frame: last sid %ui, error %ui",
+ last_sid, error);
+#endif
+
+ return ngx_http_v2_state_skip(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_window_update(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ size_t window;
+ ngx_event_t *wev;
+ ngx_queue_t *q;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+
+ if (h2c->state.length != NGX_HTTP_V2_WINDOW_UPDATE_SIZE) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent WINDOW_UPDATE frame "
+ "with incorrect length %uz", h2c->state.length);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (end - pos < NGX_HTTP_V2_WINDOW_UPDATE_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_window_update);
+ }
+
+ window = ngx_http_v2_parse_window(pos);
+
+ pos += NGX_HTTP_V2_WINDOW_UPDATE_SIZE;
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 WINDOW_UPDATE frame sid:%ui window:%uz",
+ h2c->state.sid, window);
+
+ if (h2c->state.sid) {
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
+
+ if (node == NULL || node->stream == NULL) {
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "unknown http2 stream");
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+ }
+
+ stream = node->stream;
+
+ if (window > (size_t) (NGX_HTTP_V2_MAX_WINDOW - stream->send_window)) {
+
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client violated flow control for stream %ui: "
+ "received WINDOW_UPDATE frame "
+ "with window increment %uz "
+ "not allowed for window %z",
+ h2c->state.sid, window, stream->send_window);
+
+ if (ngx_http_v2_terminate_stream(h2c, stream,
+ NGX_HTTP_V2_FLOW_CTRL_ERROR)
+ == NGX_ERROR)
+ {
+ return ngx_http_v2_connection_error(h2c,
+ NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+ }
+
+ stream->send_window += window;
+
+ if (stream->exhausted) {
+ stream->exhausted = 0;
+
+ wev = stream->request->connection->write;
+
+ if (!wev->timer_set) {
+ wev->delayed = 0;
+ wev->handler(wev);
+ }
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+ }
+
+ if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client violated connection flow control: "
+ "received WINDOW_UPDATE frame "
+ "with window increment %uz "
+ "not allowed for window %uz",
+ window, h2c->send_window);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_FLOW_CTRL_ERROR);
+ }
+
+ h2c->send_window += window;
+
+ while (!ngx_queue_empty(&h2c->waiting)) {
+ q = ngx_queue_head(&h2c->waiting);
+
+ ngx_queue_remove(q);
+
+ stream = ngx_queue_data(q, ngx_http_v2_stream_t, queue);
+
+ stream->handled = 0;
+
+ wev = stream->request->connection->write;
+
+ if (!wev->timer_set) {
+ wev->delayed = 0;
+ wev->handler(wev);
+
+ if (h2c->send_window == 0) {
+ break;
+ }
+ }
+ }
+
+ return ngx_http_v2_state_complete(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_continuation(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ if (h2c->state.length == 0) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent CONTINUATION with empty header block");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
+ if (h2c->state.sid == 0) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent CONTINUATION frame with incorrect identifier");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
+
+ if (node == NULL || node->stream == NULL) {
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ h2c->state.header_limit = h2scf->max_header_size;
+
+ return ngx_http_v2_state_skip_headers(h2c, pos, end);
+ }
+
+ stream = node->stream;
+
+ if (stream->end_headers) {
+ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
+ "client sent unexpected CONTINUATION frame");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
+ }
+
+ h2c->state.stream = stream;
+ h2c->state.header_limit = stream->header_limit;
+ h2c->state.pool = stream->request->pool;
+
+ return ngx_http_v2_state_header_block(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_complete(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 frame complete pos:%p end:%p", pos, end);
+
+ if (pos > end) {
+ ngx_log_error(NGX_LOG_ALERT, h2c->connection->log, 0,
+ "receive buffer overrun");
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ h2c->state.stream = NULL;
+ h2c->state.handler = ngx_http_v2_state_head;
+
+ return pos;
+}
+
+
+static u_char *
+ngx_http_v2_state_skip_padded(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ h2c->state.length += h2c->state.padding;
+ h2c->state.padding = 0;
+
+ return ngx_http_v2_state_skip(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_skip(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
+{
+ size_t size;
+
+ size = end - pos;
+
+ if (size < h2c->state.length) {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 frame skip %uz of %uz", size, h2c->state.length);
+
+ h2c->state.length -= size;
+ return ngx_http_v2_state_save(h2c, end, end, ngx_http_v2_state_skip);
+ }
+
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 frame skip %uz", h2c->state.length);
+
+ return ngx_http_v2_state_complete(h2c, pos + h2c->state.length, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_skip_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
+ u_char *end)
+{
+ h2c->state.pool = ngx_create_pool(1024, h2c->connection->log);
+ if (h2c->state.pool == NULL) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ return ngx_http_v2_state_header_block(h2c, pos, end);
+}
+
+
+static u_char *
+ngx_http_v2_state_save(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end,
+ ngx_http_v2_handler_pt handler)
+{
+ size_t size;
+
+ ngx_log_debug3(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 frame state save pos:%p end:%p handler:%p",
+ pos, end, handler);
+
+ size = end - pos;
+
+ if (size > NGX_HTTP_V2_STATE_BUFFER_SIZE) {
+ ngx_log_error(NGX_LOG_ALERT, h2c->connection->log, 0,
+ "state buffer overflow: %uz bytes required", size);
+
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+
+ ngx_memcpy(h2c->state.buffer, pos, NGX_HTTP_V2_STATE_BUFFER_SIZE);
+
+ h2c->state.buffer_used = size;
+ h2c->state.handler = handler;
+ h2c->state.incomplete = 1;
+
+ return end;
+}
+
+
+static u_char *
+ngx_http_v2_connection_error(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t err)
+{
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 state connection error");
+
+ if (err == NGX_HTTP_V2_INTERNAL_ERROR) {
+ ngx_debug_point();
+ }
+
+ if (h2c->state.stream) {
+ h2c->state.stream->out_closed = 1;
+ h2c->state.pool = NULL;
+ ngx_http_v2_close_stream(h2c->state.stream, NGX_HTTP_BAD_REQUEST);
+ }
+
+ ngx_http_v2_finalize_connection(h2c, err);
+
+ return NULL;
+}
+
+
+static ngx_int_t
+ngx_http_v2_parse_int(ngx_http_v2_connection_t *h2c, u_char **pos, u_char *end,
+ ngx_uint_t prefix)
+{
+ u_char *start, *p;
+ ngx_uint_t value, octet, shift;
+
+ start = *pos;
+ p = start;
+
+ value = *p++ & prefix;
+
+ if (value != prefix) {
+ if (h2c->state.length == 0) {
+ return NGX_ERROR;
+ }
+
+ h2c->state.length--;
+
+ *pos = p;
+ return value;
+ }
+
+ if (end - p > NGX_HTTP_V2_INT_OCTETS - 1) {
+ end = p + NGX_HTTP_V2_INT_OCTETS - 1;
+ }
+
+ for (shift = 0; p != end; shift += 7) {
+ octet = *p++;
+
+ value += (octet & 0x7f) << shift;
+
+ if (octet < 128) {
+ if ((size_t) (p - start) > h2c->state.length) {
+ return NGX_ERROR;
+ }
+
+ h2c->state.length -= p - start;
+
+ *pos = p;
+ return value;
+ }
+ }
+
+ if ((size_t) (end - start) >= NGX_HTTP_V2_INT_OCTETS) {
+ return NGX_DECLINED;
+ }
+
+ if ((size_t) (end - start) >= h2c->state.length) {
+ return NGX_ERROR;
+ }
+
+ return NGX_AGAIN;
+}
+
+
+static ngx_int_t
+ngx_http_v2_send_settings(ngx_http_v2_connection_t *h2c, ngx_uint_t ack)
+{
+ size_t len;
+ ngx_buf_t *buf;
+ ngx_chain_t *cl;
+ ngx_http_v2_srv_conf_t *h2scf;
+ ngx_http_v2_out_frame_t *frame;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 send SETTINGS frame");
+
+ frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t));
+ if (frame == NULL) {
+ return NGX_ERROR;
+ }
+
+ cl = ngx_alloc_chain_link(h2c->pool);
+ if (cl == NULL) {
+ 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;
+ }
+
+ buf->last_buf = 1;
+
+ cl->buf = buf;
+ cl->next = NULL;
+
+ frame->first = cl;
+ frame->last = cl;
+ frame->handler = ngx_http_v2_settings_frame_handler;
+ frame->stream = NULL;
+#if (NGX_DEBUG)
+ frame->length = len;
+#endif
+ frame->blocked = 0;
+
+ buf->last = ngx_http_v2_write_len_and_type(buf->last, len,
+ NGX_HTTP_V2_SETTINGS_FRAME);
+
+ *buf->last++ = ack ? NGX_HTTP_V2_ACK_FLAG : NGX_HTTP_V2_NO_FLAG;
+
+ buf->last = ngx_http_v2_write_sid(buf->last, 0);
+
+ if (!ack) {
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ 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);
+
+ 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,
+ NGX_HTTP_V2_MAX_WINDOW);
+
+ 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,
+ NGX_HTTP_V2_MAX_FRAME_SIZE);
+ }
+
+ ngx_http_v2_queue_blocked_frame(h2c, frame);
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_settings_frame_handler(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_out_frame_t *frame)
+{
+ ngx_buf_t *buf;
+
+ buf = frame->first->buf;
+
+ if (buf->pos != buf->last) {
+ return NGX_AGAIN;
+ }
+
+ ngx_free_chain(h2c->pool, frame->first);
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_send_window_update(ngx_http_v2_connection_t *h2c, ngx_uint_t sid,
+ size_t window)
+{
+ ngx_buf_t *buf;
+ ngx_http_v2_out_frame_t *frame;
+
+ frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_WINDOW_UPDATE_SIZE,
+ NGX_HTTP_V2_WINDOW_UPDATE_FRAME,
+ NGX_HTTP_V2_NO_FLAG, sid);
+ if (frame == NULL) {
+ return NGX_ERROR;
+ }
+
+ buf = frame->first->buf;
+
+ buf->last = ngx_http_v2_write_uint32(buf->last, window);
+
+ ngx_http_v2_queue_blocked_frame(h2c, frame);
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_send_rst_stream(ngx_http_v2_connection_t *h2c, ngx_uint_t sid,
+ ngx_uint_t status)
+{
+ ngx_buf_t *buf;
+ ngx_http_v2_out_frame_t *frame;
+
+ frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_RST_STREAM_SIZE,
+ NGX_HTTP_V2_RST_STREAM_FRAME,
+ NGX_HTTP_V2_NO_FLAG, sid);
+ if (frame == NULL) {
+ return NGX_ERROR;
+ }
+
+ buf = frame->first->buf;
+
+ buf->last = ngx_http_v2_write_uint32(buf->last, status);
+
+ ngx_http_v2_queue_blocked_frame(h2c, frame);
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_send_goaway(ngx_http_v2_connection_t *h2c, ngx_uint_t status)
+{
+ ngx_buf_t *buf;
+ ngx_http_v2_out_frame_t *frame;
+
+ frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_GOAWAY_SIZE,
+ NGX_HTTP_V2_GOAWAY_FRAME,
+ NGX_HTTP_V2_NO_FLAG, 0);
+ if (frame == NULL) {
+ return NGX_ERROR;
+ }
+
+ buf = frame->first->buf;
+
+ buf->last = ngx_http_v2_write_sid(buf->last, h2c->last_sid);
+ buf->last = ngx_http_v2_write_uint32(buf->last, status);
+
+ ngx_http_v2_queue_blocked_frame(h2c, frame);
+
+ return NGX_OK;
+}
+
+
+static ngx_http_v2_out_frame_t *
+ngx_http_v2_get_frame(ngx_http_v2_connection_t *h2c, size_t length,
+ ngx_uint_t type, u_char flags, ngx_uint_t sid)
+{
+ ngx_buf_t *buf;
+ ngx_pool_t *pool;
+ ngx_http_v2_out_frame_t *frame;
+
+ frame = h2c->free_frames;
+
+ if (frame) {
+ h2c->free_frames = frame->next;
+
+ buf = frame->first->buf;
+ buf->pos = buf->start;
+
+ frame->blocked = 0;
+
+ } else {
+ pool = h2c->pool ? h2c->pool : h2c->connection->pool;
+
+ frame = ngx_pcalloc(pool, sizeof(ngx_http_v2_out_frame_t));
+ if (frame == NULL) {
+ return NULL;
+ }
+
+ frame->first = ngx_alloc_chain_link(pool);
+ if (frame->first == NULL) {
+ return NULL;
+ }
+
+ buf = ngx_create_temp_buf(pool, NGX_HTTP_V2_FRAME_BUFFER_SIZE);
+ if (buf == NULL) {
+ return NULL;
+ }
+
+ buf->last_buf = 1;
+
+ frame->first->buf = buf;
+ frame->last = frame->first;
+
+ frame->handler = ngx_http_v2_frame_handler;
+ }
+
+#if (NGX_DEBUG)
+ if (length > NGX_HTTP_V2_FRAME_BUFFER_SIZE - NGX_HTTP_V2_FRAME_HEADER_SIZE)
+ {
+ ngx_log_error(NGX_LOG_ALERT, h2c->connection->log, 0,
+ "requested control frame is too large: %uz", length);
+ return NULL;
+ }
+
+ frame->length = length;
+#endif
+
+ buf->last = ngx_http_v2_write_len_and_type(buf->pos, length, type);
+
+ *buf->last++ = flags;
+
+ buf->last = ngx_http_v2_write_sid(buf->last, sid);
+
+ return frame;
+}
+
+
+static ngx_int_t
+ngx_http_v2_frame_handler(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_out_frame_t *frame)
+{
+ ngx_buf_t *buf;
+
+ buf = frame->first->buf;
+
+ if (buf->pos != buf->last) {
+ return NGX_AGAIN;
+ }
+
+ frame->next = h2c->free_frames;
+ h2c->free_frames = frame;
+
+ return NGX_OK;
+}
+
+
+static ngx_http_v2_stream_t *
+ngx_http_v2_create_stream(ngx_http_v2_connection_t *h2c)
+{
+ ngx_log_t *log;
+ ngx_event_t *rev, *wev;
+ ngx_connection_t *fc;
+ ngx_http_log_ctx_t *ctx;
+ ngx_http_request_t *r;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_core_srv_conf_t *cscf;
+
+ fc = h2c->free_fake_connections;
+
+ if (fc) {
+ h2c->free_fake_connections = fc->data;
+
+ rev = fc->read;
+ wev = fc->write;
+ log = fc->log;
+ ctx = log->data;
+
+ } else {
+ fc = ngx_palloc(h2c->pool, sizeof(ngx_connection_t));
+ if (fc == NULL) {
+ return NULL;
+ }
+
+ rev = ngx_palloc(h2c->pool, sizeof(ngx_event_t));
+ if (rev == NULL) {
+ return NULL;
+ }
+
+ wev = ngx_palloc(h2c->pool, sizeof(ngx_event_t));
+ if (wev == NULL) {
+ return NULL;
+ }
+
+ log = ngx_palloc(h2c->pool, sizeof(ngx_log_t));
+ if (log == NULL) {
+ return NULL;
+ }
+
+ ctx = ngx_palloc(h2c->pool, sizeof(ngx_http_log_ctx_t));
+ if (ctx == NULL) {
+ return NULL;
+ }
+
+ ctx->connection = fc;
+ ctx->request = NULL;
+ ctx->current_request = NULL;
+ }
+
+ ngx_memcpy(log, h2c->connection->log, sizeof(ngx_log_t));
+
+ log->data = ctx;
+
+ ngx_memzero(rev, sizeof(ngx_event_t));
+
+ rev->data = fc;
+ rev->ready = 1;
+ rev->handler = ngx_http_v2_close_stream_handler;
+ rev->log = log;
+
+ ngx_memcpy(wev, rev, sizeof(ngx_event_t));
+
+ wev->write = 1;
+
+ ngx_memcpy(fc, h2c->connection, sizeof(ngx_connection_t));
+
+ fc->data = h2c->http_connection;
+ fc->read = rev;
+ fc->write = wev;
+ fc->sent = 0;
+ fc->log = log;
+ fc->buffered = 0;
+ fc->sndlowat = 1;
+ fc->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
+
+ r = ngx_http_create_request(fc);
+ if (r == NULL) {
+ return NULL;
+ }
+
+ r->http_version = NGX_HTTP_VERSION_20;
+ r->valid_location = 1;
+
+ fc->data = r;
+ h2c->connection->requests++;
+
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+
+ r->header_in = ngx_create_temp_buf(r->pool,
+ cscf->client_header_buffer_size);
+ if (r->header_in == NULL) {
+ ngx_http_free_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NULL;
+ }
+
+ if (ngx_list_init(&r->headers_in.headers, r->pool, 20,
+ sizeof(ngx_table_elt_t))
+ != NGX_OK)
+ {
+ ngx_http_free_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NULL;
+ }
+
+ r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE;
+
+ stream = ngx_pcalloc(r->pool, sizeof(ngx_http_v2_stream_t));
+ if (stream == NULL) {
+ ngx_http_free_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NULL;
+ }
+
+ r->stream = stream;
+
+ stream->request = r;
+ stream->connection = h2c;
+
+ stream->send_window = h2c->init_window;
+ stream->recv_window = NGX_HTTP_V2_MAX_WINDOW;
+
+ h2c->processing++;
+
+ return stream;
+}
+
+
+static ngx_http_v2_node_t *
+ngx_http_v2_get_node_by_id(ngx_http_v2_connection_t *h2c, ngx_uint_t sid,
+ ngx_uint_t alloc)
+{
+ ngx_uint_t index;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ index = ngx_http_v2_index(h2scf, sid);
+
+ for (node = h2c->streams_index[index]; node; node = node->index) {
+
+ if (node->id == sid) {
+ return node;
+ }
+ }
+
+ if (!alloc) {
+ return NULL;
+ }
+
+ if (h2c->closed_nodes < 32) {
+ node = ngx_pcalloc(h2c->connection->pool, sizeof(ngx_http_v2_node_t));
+ if (node == NULL) {
+ return NULL;
+ }
+
+ } else {
+ node = ngx_http_v2_get_closed_node(h2c);
+ }
+
+ node->id = sid;
+
+ ngx_queue_init(&node->children);
+
+ node->index = h2c->streams_index[index];
+ h2c->streams_index[index] = node;
+
+ return node;
+}
+
+
+static ngx_http_v2_node_t *
+ngx_http_v2_get_closed_node(ngx_http_v2_connection_t *h2c)
+{
+ ngx_uint_t weight;
+ ngx_queue_t *q, *children;
+ ngx_http_v2_node_t *node, **next, *n, *parent, *child;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ h2c->closed_nodes--;
+
+ q = ngx_queue_head(&h2c->closed);
+
+ ngx_queue_remove(q);
+
+ node = ngx_queue_data(q, ngx_http_v2_node_t, reuse);
+
+ next = &h2c->streams_index[ngx_http_v2_index(h2scf, node->id)];
+
+ for ( ;; ) {
+ n = *next;
+
+ if (n == node) {
+ *next = n->index;
+ break;
+ }
+
+ next = &n->index;
+ }
+
+ ngx_queue_remove(&node->queue);
+
+ weight = 0;
+
+ for (q = ngx_queue_head(&node->children);
+ q != ngx_queue_sentinel(&node->children);
+ q = ngx_queue_next(q))
+ {
+ child = ngx_queue_data(q, ngx_http_v2_node_t, queue);
+ weight += child->weight;
+ }
+
+ for (q = ngx_queue_head(&node->children);
+ q != ngx_queue_sentinel(&node->children);
+ q = ngx_queue_next(q))
+ {
+ child = ngx_queue_data(q, ngx_http_v2_node_t, queue);
+ child->weight = node->weight * child->weight / weight;
+
+ if (child->weight == 0) {
+ child->weight = 1;
+ }
+ }
+
+ parent = node->parent;
+
+ if (parent == NGX_HTTP_V2_ROOT) {
+ node->rank = 0;
+ node->rel_weight = 1.0;
+
+ children = &h2c->dependencies;
+
+ } else {
+ node->rank = parent->rank;
+ node->rel_weight = parent->rel_weight;
+
+ children = &parent->children;
+ }
+
+ ngx_http_v2_node_children_update(node);
+ ngx_queue_add(children, &node->children);
+
+ ngx_memzero(node, sizeof(ngx_http_v2_node_t));
+
+ return node;
+}
+
+
+static ngx_int_t
+ngx_http_v2_validate_header(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ u_char ch;
+ ngx_uint_t i;
+ ngx_http_core_srv_conf_t *cscf;
+
+ if (header->name.len == 0) {
+ return NGX_ERROR;
+ }
+
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+
+ for (i = (header->name.data[0] == ':'); i != header->name.len; i++) {
+ ch = header->name.data[i];
+
+ if ((ch >= 'a' && ch <= 'z')
+ || (ch == '-')
+ || (ch >= '0' && ch <= '9')
+ || (ch == '_' && cscf->underscores_in_headers))
+ {
+ continue;
+ }
+
+ switch (ch) {
+ case '\0':
+ case LF:
+ case CR:
+ case ':':
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent invalid header name: \"%V\"",
+ &header->name);
+
+ return NGX_ERROR;
+ }
+
+ if (ch >= 'A' && ch <= 'Z') {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent invalid header name: \"%V\"",
+ &header->name);
+
+ return NGX_ERROR;
+ }
+
+ r->invalid_header = 1;
+ }
+
+ for (i = 0; i != header->value.len; i++) {
+ ch = header->value.data[i];
+
+ switch (ch) {
+ case '\0':
+ case LF:
+ case CR:
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent header \"%V\" with "
+ "invalid value: \"%V\"",
+ &header->name, &header->value);
+
+ return NGX_ERROR;
+ }
+ }
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_pseudo_header(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ header->name.len--;
+ header->name.data++;
+
+ switch (header->name.len) {
+ case 4:
+ if (ngx_memcmp(header->name.data, "path", sizeof("path") - 1)
+ == 0)
+ {
+ return ngx_http_v2_parse_path(r, header);
+ }
+
+ break;
+
+ case 6:
+ if (ngx_memcmp(header->name.data, "method", sizeof("method") - 1)
+ == 0)
+ {
+ return ngx_http_v2_parse_method(r, header);
+ }
+
+ if (ngx_memcmp(header->name.data, "scheme", sizeof("scheme") - 1)
+ == 0)
+ {
+ return ngx_http_v2_parse_scheme(r, header);
+ }
+
+ break;
+
+ case 9:
+ if (ngx_memcmp(header->name.data, "authority", sizeof("authority") - 1)
+ == 0)
+ {
+ return ngx_http_v2_parse_authority(r, header);
+ }
+
+ break;
+ }
+
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent unknown pseudo header \"%V\"",
+ &header->name);
+
+ return NGX_DECLINED;
+}
+
+
+static ngx_int_t
+ngx_http_v2_parse_path(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ if (r->unparsed_uri.len) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent duplicate :path header");
+
+ return NGX_DECLINED;
+ }
+
+ if (header->value.len == 0) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent empty :path header");
+
+ return NGX_DECLINED;
+ }
+
+ r->uri_start = header->value.data;
+ r->uri_end = header->value.data + header->value.len;
+
+ if (ngx_http_parse_uri(r) != NGX_OK) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent invalid :path header: \"%V\"",
+ &header->value);
+
+ return NGX_DECLINED;
+ }
+
+ if (ngx_http_process_request_uri(r) != NGX_OK) {
+ /*
+ * request has been finalized already
+ * in ngx_http_process_request_uri()
+ */
+ return NGX_ABORT;
+ }
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_parse_method(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ size_t k, len;
+ ngx_uint_t n;
+ const u_char *p, *m;
+
+ /*
+ * This array takes less than 256 sequential bytes,
+ * and if typical CPU cache line size is 64 bytes,
+ * it is prefetched for 4 load operations.
+ */
+ static const struct {
+ u_char len;
+ const u_char method[11];
+ uint32_t value;
+ } tests[] = {
+ { 3, "GET", NGX_HTTP_GET },
+ { 4, "POST", NGX_HTTP_POST },
+ { 4, "HEAD", NGX_HTTP_HEAD },
+ { 7, "OPTIONS", NGX_HTTP_OPTIONS },
+ { 8, "PROPFIND", NGX_HTTP_PROPFIND },
+ { 3, "PUT", NGX_HTTP_PUT },
+ { 5, "MKCOL", NGX_HTTP_MKCOL },
+ { 6, "DELETE", NGX_HTTP_DELETE },
+ { 4, "COPY", NGX_HTTP_COPY },
+ { 4, "MOVE", NGX_HTTP_MOVE },
+ { 9, "PROPPATCH", NGX_HTTP_PROPPATCH },
+ { 4, "LOCK", NGX_HTTP_LOCK },
+ { 6, "UNLOCK", NGX_HTTP_UNLOCK },
+ { 5, "PATCH", NGX_HTTP_PATCH },
+ { 5, "TRACE", NGX_HTTP_TRACE }
+ }, *test;
+
+ if (r->method_name.len) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent duplicate :method header");
+
+ return NGX_DECLINED;
+ }
+
+ if (header->value.len == 0) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent empty :method header");
+
+ return NGX_DECLINED;
+ }
+
+ r->method_name.len = header->value.len;
+ r->method_name.data = header->value.data;
+
+ len = r->method_name.len;
+ n = sizeof(tests) / sizeof(tests[0]);
+ test = tests;
+
+ do {
+ if (len == test->len) {
+ p = r->method_name.data;
+ m = test->method;
+ k = len;
+
+ do {
+ if (*p++ != *m++) {
+ goto next;
+ }
+ } while (--k);
+
+ r->method = test->value;
+ return NGX_OK;
+ }
+
+ next:
+ test++;
+
+ } while (--n);
+
+ p = r->method_name.data;
+
+ do {
+ if ((*p < 'A' || *p > 'Z') && *p != '_') {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent invalid method: \"%V\"",
+ &r->method_name);
+
+ return NGX_DECLINED;
+ }
+
+ p++;
+
+ } while (--len);
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_parse_scheme(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ if (r->schema_start) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent duplicate :schema header");
+
+ return NGX_DECLINED;
+ }
+
+ if (header->value.len == 0) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client sent empty :schema header");
+
+ return NGX_DECLINED;
+ }
+
+ r->schema_start = header->value.data;
+ r->schema_end = header->value.data + header->value.len;
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_parse_authority(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ ngx_table_elt_t *h;
+ ngx_http_header_t *hh;
+ ngx_http_core_main_conf_t *cmcf;
+
+ static ngx_str_t host = ngx_string("host");
+
+ h = ngx_list_push(&r->headers_in.headers);
+ if (h == NULL) {
+ return NGX_ERROR;
+ }
+
+ h->hash = ngx_hash_key(host.data, host.len);
+
+ h->key.len = host.len;
+ h->key.data = host.data;
+
+ h->value.len = header->value.len;
+ h->value.data = header->value.data;
+
+ h->lowcase_key = host.data;
+
+ cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
+
+ hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash,
+ h->lowcase_key, h->key.len);
+
+ if (hh == NULL) {
+ return NGX_ERROR;
+ }
+
+ if (hh->handler(r, h, hh->offset) != NGX_OK) {
+ /*
+ * request has been finalized already
+ * in ngx_http_process_host()
+ */
+ return NGX_ABORT;
+ }
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_construct_request_line(ngx_http_request_t *r)
+{
+ u_char *p;
+
+ static const u_char ending[] = " HTTP/2.0";
+
+ if (r->method_name.len == 0
+ || r->unparsed_uri.len == 0)
+ {
+ ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
+ return NGX_ERROR;
+ }
+
+ r->request_line.len = r->method_name.len + 1
+ + r->unparsed_uri.len
+ + sizeof(ending) - 1;
+
+ p = ngx_pnalloc(r->pool, r->request_line.len + 1);
+ if (p == NULL) {
+ ngx_http_v2_close_stream(r->stream, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NGX_ERROR;
+ }
+
+ r->request_line.data = p;
+
+ p = ngx_cpymem(p, r->method_name.data, r->method_name.len);
+
+ *p++ = ' ';
+
+ p = ngx_cpymem(p, r->unparsed_uri.data, r->unparsed_uri.len);
+
+ ngx_memcpy(p, ending, sizeof(ending));
+
+ /* some modules expect the space character after method name */
+ r->method_name.data = r->request_line.data;
+
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http2 http request line: \"%V\"", &r->request_line);
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_cookie(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+{
+ ngx_str_t *val;
+ ngx_array_t *cookies;
+
+ cookies = r->stream->cookies;
+
+ if (cookies == NULL) {
+ cookies = ngx_array_create(r->pool, 2, sizeof(ngx_str_t));
+ if (cookies == NULL) {
+ return NGX_ERROR;
+ }
+
+ r->stream->cookies = cookies;
+ }
+
+ val = ngx_array_push(cookies);
+ if (val == NULL) {
+ return NGX_ERROR;
+ }
+
+ val->len = header->value.len;
+ val->data = header->value.data;
+
+ return NGX_OK;
+}
+
+
+static ngx_int_t
+ngx_http_v2_construct_cookie_header(ngx_http_request_t *r)
+{
+ u_char *buf, *p, *end;
+ size_t len;
+ ngx_str_t *vals;
+ ngx_uint_t i;
+ ngx_array_t *cookies;
+ ngx_table_elt_t *h;
+ ngx_http_header_t *hh;
+ ngx_http_core_main_conf_t *cmcf;
+
+ static ngx_str_t cookie = ngx_string("cookie");
+
+ cookies = r->stream->cookies;
+
+ if (cookies == NULL) {
+ return NGX_OK;
+ }
+
+ vals = cookies->elts;
+
+ i = 0;
+ len = 0;
+
+ do {
+ len += vals[i].len + 2;
+ } while (++i != cookies->nelts);
+
+ len -= 2;
+
+ buf = ngx_pnalloc(r->pool, len + 1);
+ if (buf == NULL) {
+ ngx_http_v2_close_stream(r->stream, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NGX_ERROR;
+ }
+
+ p = buf;
+ end = buf + len;
+
+ for (i = 0; /* void */ ; i++) {
+
+ p = ngx_cpymem(p, vals[i].data, vals[i].len);
+
+ if (p == end) {
+ *p = '\0';
+ break;
+ }
+
+ *p++ = ';'; *p++ = ' ';
+ }
+
+ h = ngx_list_push(&r->headers_in.headers);
+ if (h == NULL) {
+ ngx_http_v2_close_stream(r->stream, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NGX_ERROR;
+ }
+
+ h->hash = ngx_hash_key(cookie.data, cookie.len);
+
+ h->key.len = cookie.len;
+ h->key.data = cookie.data;
+
+ h->value.len = len;
+ h->value.data = buf;
+
+ h->lowcase_key = cookie.data;
+
+ cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
+
+ hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash,
+ h->lowcase_key, h->key.len);
+
+ if (hh == NULL) {
+ ngx_http_v2_close_stream(r->stream, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return NGX_ERROR;
+ }
+
+ if (hh->handler(r, h, hh->offset) != NGX_OK) {
+ /*
+ * request has been finalized already
+ * in ngx_http_process_multi_header_lines()
+ */
+ return NGX_ERROR;
+ }
+
+ return NGX_OK;
+}
+
+
+static void
+ngx_http_v2_run_request(ngx_http_request_t *r)
+{
+ if (ngx_http_v2_construct_request_line(r) != NGX_OK) {
+ return;
+ }
+
+ if (ngx_http_v2_construct_cookie_header(r) != NGX_OK) {
+ return;
+ }
+
+ r->http_state = NGX_HTTP_PROCESS_REQUEST_STATE;
+
+ if (ngx_http_process_request_header(r) != NGX_OK) {
+ return;
+ }
+
+ if (r->headers_in.content_length_n > 0 && r->stream->in_closed) {
+ ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+ "client prematurely closed stream");
+
+ r->stream->skip_data = NGX_HTTP_V2_DATA_ERROR;
+
+ ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
+ return;
+ }
+
+ ngx_http_process_request(r);
+}
+
+
+static ngx_int_t
+ngx_http_v2_init_request_body(ngx_http_request_t *r)
+{
+ ngx_buf_t *buf;
+ ngx_temp_file_t *tf;
+ ngx_http_request_body_t *rb;
+ ngx_http_core_loc_conf_t *clcf;
+
+ rb = ngx_pcalloc(r->pool, sizeof(ngx_http_request_body_t));
+ if (rb == NULL) {
+ return NGX_ERROR;
+ }
+
+ r->request_body = rb;
+
+ if (r->stream->in_closed) {
+ return NGX_OK;
+ }
+
+ rb->rest = r->headers_in.content_length_n;
+
+ clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+
+ if (r->request_body_in_file_only
+ || rb->rest > (off_t) clcf->client_body_buffer_size
+ || rb->rest < 0)
+ {
+ tf = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t));
+ if (tf == NULL) {
+ return NGX_ERROR;
+ }
+
+ tf->file.fd = NGX_INVALID_FILE;
+ tf->file.log = r->connection->log;
+ tf->path = clcf->client_body_temp_path;
+ tf->pool = r->pool;
+ tf->warn = "a client request body is buffered to a temporary file";
+ tf->log_level = r->request_body_file_log_level;
+ tf->persistent = r->request_body_in_persistent_file;
+ tf->clean = r->request_body_in_clean_file;
+
+ if (r->request_body_file_group_access) {
+ tf->access = 0660;
+ }
+
+ rb->temp_file = tf;
+
+ if (r->stream->in_closed
+ && ngx_create_temp_file(&tf->file, tf->path, tf->pool,
+ tf->persistent, tf->clean, tf->access)
+ != NGX_OK)
+ {
+ return NGX_ERROR;
+ }
+
+ buf = ngx_calloc_buf(r->pool);
+ if (buf == NULL) {
+ return NGX_ERROR;
+ }
+
+ } else {
+
+ if (rb->rest == 0) {
+ return NGX_OK;
+ }
+
+ buf = ngx_create_temp_buf(r->pool, (size_t) rb->rest);
+ if (buf == NULL) {
+ return NGX_ERROR;
+ }
+ }
+
+ rb->buf = buf;
+
+ rb->bufs = ngx_alloc_chain_link(r->pool);
+ if (rb->bufs == NULL) {
+ return NGX_ERROR;
+ }
+
+ rb->bufs->buf = buf;
+ rb->bufs->next = NULL;
+
+ rb->rest = 0;
+
+ return NGX_OK;
+}
+
+
+ngx_int_t
+ngx_http_v2_read_request_body(ngx_http_request_t *r,
+ ngx_http_client_body_handler_pt post_handler)
+{
+ ngx_http_v2_stream_t *stream;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http2 read request body");
+
+ stream = r->stream;
+
+ switch (stream->skip_data) {
+
+ case NGX_HTTP_V2_DATA_DISCARD:
+ post_handler(r);
+ return NGX_OK;
+
+ case NGX_HTTP_V2_DATA_ERROR:
+ if (r->headers_in.content_length_n == -1) {
+ return NGX_HTTP_REQUEST_ENTITY_TOO_LARGE;
+ } else {
+ return NGX_HTTP_BAD_REQUEST;
+ }
+
+ case NGX_HTTP_V2_DATA_INTERNAL_ERROR:
+ return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+
+ if (!r->request_body && ngx_http_v2_init_request_body(r) != NGX_OK) {
+ stream->skip_data = NGX_HTTP_V2_DATA_INTERNAL_ERROR;
+ return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+
+ if (stream->in_closed) {
+ post_handler(r);
+ return NGX_OK;
+ }
+
+ r->request_body->post_handler = post_handler;
+
+ r->read_event_handler = ngx_http_test_reading;
+ r->write_event_handler = ngx_http_request_empty_handler;
+
+ return NGX_AGAIN;
+}
+
+
+static ngx_int_t
+ngx_http_v2_terminate_stream(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_stream_t *stream, ngx_uint_t status)
+{
+ ngx_event_t *rev;
+ ngx_connection_t *fc;
+
+ if (ngx_http_v2_send_rst_stream(h2c, stream->node->id, status)
+ == NGX_ERROR)
+ {
+ return NGX_ERROR;
+ }
+
+ stream->out_closed = 1;
+
+ fc = stream->request->connection;
+ fc->error = 1;
+
+ rev = fc->read;
+ rev->handler(rev);
+
+ return NGX_OK;
+}
+
+
+void
+ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc)
+{
+ ngx_event_t *ev;
+ ngx_connection_t *fc;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_connection_t *h2c;
+
+ h2c = stream->connection;
+ node = stream->node;
+
+ ngx_log_debug3(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 close stream %ui, queued %ui, processing %ui",
+ node->id, stream->queued, h2c->processing);
+
+ fc = stream->request->connection;
+
+ if (stream->queued) {
+ fc->write->handler = ngx_http_v2_close_stream_handler;
+ return;
+ }
+
+ if (!stream->out_closed) {
+ if (ngx_http_v2_send_rst_stream(h2c, node->id,
+ NGX_HTTP_V2_INTERNAL_ERROR)
+ != NGX_OK)
+ {
+ h2c->connection->error = 1;
+ }
+ }
+
+ node->stream = NULL;
+
+ ngx_queue_insert_tail(&h2c->closed, &node->reuse);
+ h2c->closed_nodes++;
+
+ ngx_http_free_request(stream->request, rc);
+
+ ev = fc->read;
+
+ if (ev->active || ev->disabled) {
+ ngx_log_error(NGX_LOG_ALERT, h2c->connection->log, 0,
+ "fake read event was activated");
+ }
+
+ if (ev->timer_set) {
+ ngx_del_timer(ev);
+ }
+
+ if (ev->posted) {
+ ngx_delete_posted_event(ev);
+ }
+
+ ev = fc->write;
+
+ if (ev->active || ev->disabled) {
+ ngx_log_error(NGX_LOG_ALERT, h2c->connection->log, 0,
+ "fake write event was activated");
+ }
+
+ if (ev->timer_set) {
+ ngx_del_timer(ev);
+ }
+
+ if (ev->posted) {
+ ngx_delete_posted_event(ev);
+ }
+
+ fc->data = h2c->free_fake_connections;
+ h2c->free_fake_connections = fc;
+
+ h2c->processing--;
+
+ if (h2c->processing || h2c->blocked) {
+ return;
+ }
+
+ ev = h2c->connection->read;
+
+ ev->handler = ngx_http_v2_handle_connection_handler;
+ ngx_post_event(ev, &ngx_posted_events);
+}
+
+
+static void
+ngx_http_v2_close_stream_handler(ngx_event_t *ev)
+{
+ ngx_connection_t *fc;
+ ngx_http_request_t *r;
+
+ fc = ev->data;
+ r = fc->data;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http2 close stream handler");
+
+ ngx_http_v2_close_stream(r->stream, 0);
+}
+
+
+static void
+ngx_http_v2_handle_connection_handler(ngx_event_t *rev)
+{
+ ngx_connection_t *c;
+
+ rev->handler = ngx_http_v2_read_handler;
+
+ if (rev->ready) {
+ ngx_http_v2_read_handler(rev);
+ return;
+ }
+
+ c = rev->data;
+
+ ngx_http_v2_handle_connection(c->data);
+}
+
+
+static void
+ngx_http_v2_idle_handler(ngx_event_t *rev)
+{
+ ngx_connection_t *c;
+ ngx_http_v2_srv_conf_t *h2scf;
+ ngx_http_v2_connection_t *h2c;
+
+ c = rev->data;
+ h2c = c->data;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http2 idle handler");
+
+ if (rev->timedout || c->close) {
+ ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_NO_ERROR);
+ return;
+ }
+
+#if (NGX_HAVE_KQUEUE)
+
+ if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
+ if (rev->pending_eof) {
+ c->log->handler = NULL;
+ ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno,
+ "kevent() reported that client %V closed "
+ "idle connection", &c->addr_text);
+#if (NGX_HTTP_SSL)
+ if (c->ssl) {
+ c->ssl->no_send_shutdown = 1;
+ }
+#endif
+ ngx_http_close_connection(c);
+ return;
+ }
+ }
+
+#endif
+
+ c->destroyed = 0;
+ c->idle = 0;
+ ngx_reusable_connection(c, 0);
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
+ if (h2c->pool == NULL) {
+ ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ return;
+ }
+
+ c->write->handler = ngx_http_v2_write_handler;
+
+ rev->handler = ngx_http_v2_read_handler;
+ ngx_http_v2_read_handler(rev);
+}
+
+
+static void
+ngx_http_v2_finalize_connection(ngx_http_v2_connection_t *h2c,
+ ngx_uint_t status)
+{
+ ngx_uint_t i, size;
+ ngx_event_t *ev;
+ ngx_connection_t *c, *fc;
+ ngx_http_request_t *r;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ c = h2c->connection;
+
+ h2c->blocked = 1;
+
+ if (!c->error && ngx_http_v2_send_goaway(h2c, status) != NGX_ERROR) {
+ (void) ngx_http_v2_send_output_queue(h2c);
+ }
+
+ if (!h2c->processing) {
+ ngx_http_close_connection(c);
+ return;
+ }
+
+ c->error = 1;
+ c->read->handler = ngx_http_empty_handler;
+ c->write->handler = ngx_http_empty_handler;
+
+ h2c->last_out = NULL;
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ size = ngx_http_v2_index_size(h2scf);
+
+ for (i = 0; i < size; i++) {
+
+ for (node = h2c->streams_index[i]; node; node = node->index) {
+ stream = node->stream;
+
+ if (stream == NULL) {
+ continue;
+ }
+
+ stream->handled = 0;
+
+ r = stream->request;
+ fc = r->connection;
+
+ fc->error = 1;
+
+ if (stream->queued) {
+ stream->queued = 0;
+
+ ev = fc->write;
+ ev->delayed = 0;
+
+ } else {
+ ev = fc->read;
+ }
+
+ ev->eof = 1;
+ ev->handler(ev);
+ }
+ }
+
+ h2c->blocked = 0;
+
+ if (h2c->processing) {
+ return;
+ }
+
+ ngx_http_close_connection(c);
+}
+
+
+static ngx_int_t
+ngx_http_v2_adjust_windows(ngx_http_v2_connection_t *h2c, ssize_t delta)
+{
+ ngx_uint_t i, size;
+ ngx_event_t *wev;
+ ngx_http_v2_node_t *node;
+ ngx_http_v2_stream_t *stream;
+ ngx_http_v2_srv_conf_t *h2scf;
+
+ h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
+ ngx_http_v2_module);
+
+ size = ngx_http_v2_index_size(h2scf);
+
+ for (i = 0; i < size; i++) {
+
+ for (node = h2c->streams_index[i]; node; node = node->index) {
+ stream = node->stream;
+
+ if (stream == NULL) {
+ continue;
+ }
+
+ if (delta > 0
+ && stream->send_window
+ > (ssize_t) (NGX_HTTP_V2_MAX_WINDOW - delta))
+ {
+ if (ngx_http_v2_terminate_stream(h2c, stream,
+ NGX_HTTP_V2_FLOW_CTRL_ERROR)
+ == NGX_ERROR)
+ {
+ return NGX_ERROR;
+ }
+
+ continue;
+ }
+
+ stream->send_window += delta;
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2:%ui adjusted window: %z",
+ node->id, stream->send_window);
+
+ if (stream->send_window > 0 && stream->exhausted) {
+ stream->exhausted = 0;
+
+ wev = stream->request->connection->write;
+
+ if (!wev->timer_set) {
+ wev->delayed = 0;
+ wev->handler(wev);
+ }
+ }
+ }
+ }
+
+ return NGX_OK;
+}
+
+
+static void
+ngx_http_v2_set_dependency(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_node_t *node, ngx_uint_t depend, ngx_uint_t exclusive)
+{
+ ngx_queue_t *children;
+ ngx_http_v2_node_t *parent, *next;
+
+ parent = depend ? ngx_http_v2_get_node_by_id(h2c, depend, 0) : NULL;
+
+ if (parent == NULL) {
+ parent = NGX_HTTP_V2_ROOT;
+
+ if (depend != 0) {
+ exclusive = 0;
+ }
+
+ node->rank = 1;
+ node->rel_weight = (1.0 / 256) * node->weight;
+
+ children = &h2c->dependencies;
+
+ } else {
+ if (node->parent != NULL) {
+
+ for (next = parent->parent;
+ next != NGX_HTTP_V2_ROOT && next->rank >= node->rank;
+ next = next->parent)
+ {
+ if (next != node) {
+ continue;
+ }
+
+ ngx_queue_remove(&parent->queue);
+ ngx_queue_insert_after(&node->queue, &parent->queue);
+
+ parent->parent = node->parent;
+
+ if (node->parent == NGX_HTTP_V2_ROOT) {
+ parent->rank = 1;
+ parent->rel_weight = (1.0 / 256) * parent->weight;
+
+ } else {
+ parent->rank = node->parent->rank + 1;
+ parent->rel_weight = (node->parent->rel_weight / 256)
+ * parent->weight;
+ }
+
+ if (!exclusive) {
+ ngx_http_v2_node_children_update(parent);
+ }
+
+ break;
+ }
+ }
+
+ node->rank = parent->rank + 1;
+ node->rel_weight = (parent->rel_weight / 256) * node->weight;
+
+ if (parent->stream == NULL) {
+ ngx_queue_remove(&parent->reuse);
+ ngx_queue_insert_tail(&h2c->closed, &parent->reuse);
+ }
+
+ children = &parent->children;
+ }
+
+ if (exclusive) {
+ ngx_queue_add(&node->children, children);
+ ngx_queue_init(children);
+ }
+
+ if (node->parent != NULL) {
+ ngx_queue_remove(&node->queue);
+ }
+
+ ngx_queue_insert_tail(children, &node->queue);
+
+ node->parent = parent;
+
+ ngx_http_v2_node_children_update(node);
+}
+
+
+static void
+ngx_http_v2_node_children_update(ngx_http_v2_node_t *node)
+{
+ ngx_queue_t *q;
+ ngx_http_v2_node_t *child;
+
+ for (q = ngx_queue_head(&node->children);
+ q != ngx_queue_sentinel(&node->children);
+ q = ngx_queue_next(q))
+ {
+ child = ngx_queue_data(q, ngx_http_v2_node_t, queue);
+
+ child->rank = node->rank + 1;
+ child->rel_weight = (node->rel_weight / 256) * child->weight;
+
+ ngx_http_v2_node_children_update(child);
+ }
+}
+
+
+static void
+ngx_http_v2_pool_cleanup(void *data)
+{
+ ngx_http_v2_connection_t *h2c = data;
+
+ if (h2c->state.pool) {
+ ngx_destroy_pool(h2c->state.pool);
+ }
+
+ if (h2c->pool) {
+ ngx_destroy_pool(h2c->pool);
+ }
+}
--- /dev/null
+
+/*
+ * Copyright (C) Nginx, Inc.
+ * Copyright (C) Valentin V. Bartenev
+ */
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+#include <ngx_http.h>
+
+
+typedef struct {
+ u_char next;
+ u_char emit;
+ u_char sym;
+ u_char ending;
+} ngx_http_v2_huff_decode_code_t;
+
+
+static ngx_inline ngx_int_t ngx_http_v2_huff_decode_bits(u_char *state,
+ u_char *ending, ngx_uint_t bits, u_char **dst);
+
+
+static ngx_http_v2_huff_decode_code_t ngx_http_v2_huff_decode_codes[256][16] =
+{
+ /* 0 */
+ {
+ {0x04, 0x00, 0x00, 0x00}, {0x05, 0x00, 0x00, 0x00},
+ {0x07, 0x00, 0x00, 0x00}, {0x08, 0x00, 0x00, 0x00},
+ {0x0b, 0x00, 0x00, 0x00}, {0x0c, 0x00, 0x00, 0x00},
+ {0x10, 0x00, 0x00, 0x00}, {0x13, 0x00, 0x00, 0x00},
+ {0x19, 0x00, 0x00, 0x00}, {0x1c, 0x00, 0x00, 0x00},
+ {0x20, 0x00, 0x00, 0x00}, {0x23, 0x00, 0x00, 0x00},
+ {0x2a, 0x00, 0x00, 0x00}, {0x31, 0x00, 0x00, 0x00},
+ {0x39, 0x00, 0x00, 0x00}, {0x40, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0x30, 0x01}, {0x00, 0x01, 0x31, 0x01},
+ {0x00, 0x01, 0x32, 0x01}, {0x00, 0x01, 0x61, 0x01},
+ {0x00, 0x01, 0x63, 0x01}, {0x00, 0x01, 0x65, 0x01},
+ {0x00, 0x01, 0x69, 0x01}, {0x00, 0x01, 0x6f, 0x01},
+ {0x00, 0x01, 0x73, 0x01}, {0x00, 0x01, 0x74, 0x01},
+ {0x0d, 0x00, 0x00, 0x00}, {0x0e, 0x00, 0x00, 0x00},
+ {0x11, 0x00, 0x00, 0x00}, {0x12, 0x00, 0x00, 0x00},
+ {0x14, 0x00, 0x00, 0x00}, {0x15, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x01, 0x01, 0x30, 0x00}, {0x16, 0x01, 0x30, 0x01},
+ {0x01, 0x01, 0x31, 0x00}, {0x16, 0x01, 0x31, 0x01},
+ {0x01, 0x01, 0x32, 0x00}, {0x16, 0x01, 0x32, 0x01},
+ {0x01, 0x01, 0x61, 0x00}, {0x16, 0x01, 0x61, 0x01},
+ {0x01, 0x01, 0x63, 0x00}, {0x16, 0x01, 0x63, 0x01},
+ {0x01, 0x01, 0x65, 0x00}, {0x16, 0x01, 0x65, 0x01},
+ {0x01, 0x01, 0x69, 0x00}, {0x16, 0x01, 0x69, 0x01},
+ {0x01, 0x01, 0x6f, 0x00}, {0x16, 0x01, 0x6f, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x30, 0x00}, {0x09, 0x01, 0x30, 0x00},
+ {0x17, 0x01, 0x30, 0x00}, {0x28, 0x01, 0x30, 0x01},
+ {0x02, 0x01, 0x31, 0x00}, {0x09, 0x01, 0x31, 0x00},
+ {0x17, 0x01, 0x31, 0x00}, {0x28, 0x01, 0x31, 0x01},
+ {0x02, 0x01, 0x32, 0x00}, {0x09, 0x01, 0x32, 0x00},
+ {0x17, 0x01, 0x32, 0x00}, {0x28, 0x01, 0x32, 0x01},
+ {0x02, 0x01, 0x61, 0x00}, {0x09, 0x01, 0x61, 0x00},
+ {0x17, 0x01, 0x61, 0x00}, {0x28, 0x01, 0x61, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x30, 0x00}, {0x06, 0x01, 0x30, 0x00},
+ {0x0a, 0x01, 0x30, 0x00}, {0x0f, 0x01, 0x30, 0x00},
+ {0x18, 0x01, 0x30, 0x00}, {0x1f, 0x01, 0x30, 0x00},
+ {0x29, 0x01, 0x30, 0x00}, {0x38, 0x01, 0x30, 0x01},
+ {0x03, 0x01, 0x31, 0x00}, {0x06, 0x01, 0x31, 0x00},
+ {0x0a, 0x01, 0x31, 0x00}, {0x0f, 0x01, 0x31, 0x00},
+ {0x18, 0x01, 0x31, 0x00}, {0x1f, 0x01, 0x31, 0x00},
+ {0x29, 0x01, 0x31, 0x00}, {0x38, 0x01, 0x31, 0x01}
+ },
+ /* 5 */
+ {
+ {0x03, 0x01, 0x32, 0x00}, {0x06, 0x01, 0x32, 0x00},
+ {0x0a, 0x01, 0x32, 0x00}, {0x0f, 0x01, 0x32, 0x00},
+ {0x18, 0x01, 0x32, 0x00}, {0x1f, 0x01, 0x32, 0x00},
+ {0x29, 0x01, 0x32, 0x00}, {0x38, 0x01, 0x32, 0x01},
+ {0x03, 0x01, 0x61, 0x00}, {0x06, 0x01, 0x61, 0x00},
+ {0x0a, 0x01, 0x61, 0x00}, {0x0f, 0x01, 0x61, 0x00},
+ {0x18, 0x01, 0x61, 0x00}, {0x1f, 0x01, 0x61, 0x00},
+ {0x29, 0x01, 0x61, 0x00}, {0x38, 0x01, 0x61, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x63, 0x00}, {0x09, 0x01, 0x63, 0x00},
+ {0x17, 0x01, 0x63, 0x00}, {0x28, 0x01, 0x63, 0x01},
+ {0x02, 0x01, 0x65, 0x00}, {0x09, 0x01, 0x65, 0x00},
+ {0x17, 0x01, 0x65, 0x00}, {0x28, 0x01, 0x65, 0x01},
+ {0x02, 0x01, 0x69, 0x00}, {0x09, 0x01, 0x69, 0x00},
+ {0x17, 0x01, 0x69, 0x00}, {0x28, 0x01, 0x69, 0x01},
+ {0x02, 0x01, 0x6f, 0x00}, {0x09, 0x01, 0x6f, 0x00},
+ {0x17, 0x01, 0x6f, 0x00}, {0x28, 0x01, 0x6f, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x63, 0x00}, {0x06, 0x01, 0x63, 0x00},
+ {0x0a, 0x01, 0x63, 0x00}, {0x0f, 0x01, 0x63, 0x00},
+ {0x18, 0x01, 0x63, 0x00}, {0x1f, 0x01, 0x63, 0x00},
+ {0x29, 0x01, 0x63, 0x00}, {0x38, 0x01, 0x63, 0x01},
+ {0x03, 0x01, 0x65, 0x00}, {0x06, 0x01, 0x65, 0x00},
+ {0x0a, 0x01, 0x65, 0x00}, {0x0f, 0x01, 0x65, 0x00},
+ {0x18, 0x01, 0x65, 0x00}, {0x1f, 0x01, 0x65, 0x00},
+ {0x29, 0x01, 0x65, 0x00}, {0x38, 0x01, 0x65, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x69, 0x00}, {0x06, 0x01, 0x69, 0x00},
+ {0x0a, 0x01, 0x69, 0x00}, {0x0f, 0x01, 0x69, 0x00},
+ {0x18, 0x01, 0x69, 0x00}, {0x1f, 0x01, 0x69, 0x00},
+ {0x29, 0x01, 0x69, 0x00}, {0x38, 0x01, 0x69, 0x01},
+ {0x03, 0x01, 0x6f, 0x00}, {0x06, 0x01, 0x6f, 0x00},
+ {0x0a, 0x01, 0x6f, 0x00}, {0x0f, 0x01, 0x6f, 0x00},
+ {0x18, 0x01, 0x6f, 0x00}, {0x1f, 0x01, 0x6f, 0x00},
+ {0x29, 0x01, 0x6f, 0x00}, {0x38, 0x01, 0x6f, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x73, 0x00}, {0x16, 0x01, 0x73, 0x01},
+ {0x01, 0x01, 0x74, 0x00}, {0x16, 0x01, 0x74, 0x01},
+ {0x00, 0x01, 0x20, 0x01}, {0x00, 0x01, 0x25, 0x01},
+ {0x00, 0x01, 0x2d, 0x01}, {0x00, 0x01, 0x2e, 0x01},
+ {0x00, 0x01, 0x2f, 0x01}, {0x00, 0x01, 0x33, 0x01},
+ {0x00, 0x01, 0x34, 0x01}, {0x00, 0x01, 0x35, 0x01},
+ {0x00, 0x01, 0x36, 0x01}, {0x00, 0x01, 0x37, 0x01},
+ {0x00, 0x01, 0x38, 0x01}, {0x00, 0x01, 0x39, 0x01}
+ },
+ /* 10 */
+ {
+ {0x02, 0x01, 0x73, 0x00}, {0x09, 0x01, 0x73, 0x00},
+ {0x17, 0x01, 0x73, 0x00}, {0x28, 0x01, 0x73, 0x01},
+ {0x02, 0x01, 0x74, 0x00}, {0x09, 0x01, 0x74, 0x00},
+ {0x17, 0x01, 0x74, 0x00}, {0x28, 0x01, 0x74, 0x01},
+ {0x01, 0x01, 0x20, 0x00}, {0x16, 0x01, 0x20, 0x01},
+ {0x01, 0x01, 0x25, 0x00}, {0x16, 0x01, 0x25, 0x01},
+ {0x01, 0x01, 0x2d, 0x00}, {0x16, 0x01, 0x2d, 0x01},
+ {0x01, 0x01, 0x2e, 0x00}, {0x16, 0x01, 0x2e, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x73, 0x00}, {0x06, 0x01, 0x73, 0x00},
+ {0x0a, 0x01, 0x73, 0x00}, {0x0f, 0x01, 0x73, 0x00},
+ {0x18, 0x01, 0x73, 0x00}, {0x1f, 0x01, 0x73, 0x00},
+ {0x29, 0x01, 0x73, 0x00}, {0x38, 0x01, 0x73, 0x01},
+ {0x03, 0x01, 0x74, 0x00}, {0x06, 0x01, 0x74, 0x00},
+ {0x0a, 0x01, 0x74, 0x00}, {0x0f, 0x01, 0x74, 0x00},
+ {0x18, 0x01, 0x74, 0x00}, {0x1f, 0x01, 0x74, 0x00},
+ {0x29, 0x01, 0x74, 0x00}, {0x38, 0x01, 0x74, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x20, 0x00}, {0x09, 0x01, 0x20, 0x00},
+ {0x17, 0x01, 0x20, 0x00}, {0x28, 0x01, 0x20, 0x01},
+ {0x02, 0x01, 0x25, 0x00}, {0x09, 0x01, 0x25, 0x00},
+ {0x17, 0x01, 0x25, 0x00}, {0x28, 0x01, 0x25, 0x01},
+ {0x02, 0x01, 0x2d, 0x00}, {0x09, 0x01, 0x2d, 0x00},
+ {0x17, 0x01, 0x2d, 0x00}, {0x28, 0x01, 0x2d, 0x01},
+ {0x02, 0x01, 0x2e, 0x00}, {0x09, 0x01, 0x2e, 0x00},
+ {0x17, 0x01, 0x2e, 0x00}, {0x28, 0x01, 0x2e, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x20, 0x00}, {0x06, 0x01, 0x20, 0x00},
+ {0x0a, 0x01, 0x20, 0x00}, {0x0f, 0x01, 0x20, 0x00},
+ {0x18, 0x01, 0x20, 0x00}, {0x1f, 0x01, 0x20, 0x00},
+ {0x29, 0x01, 0x20, 0x00}, {0x38, 0x01, 0x20, 0x01},
+ {0x03, 0x01, 0x25, 0x00}, {0x06, 0x01, 0x25, 0x00},
+ {0x0a, 0x01, 0x25, 0x00}, {0x0f, 0x01, 0x25, 0x00},
+ {0x18, 0x01, 0x25, 0x00}, {0x1f, 0x01, 0x25, 0x00},
+ {0x29, 0x01, 0x25, 0x00}, {0x38, 0x01, 0x25, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x2d, 0x00}, {0x06, 0x01, 0x2d, 0x00},
+ {0x0a, 0x01, 0x2d, 0x00}, {0x0f, 0x01, 0x2d, 0x00},
+ {0x18, 0x01, 0x2d, 0x00}, {0x1f, 0x01, 0x2d, 0x00},
+ {0x29, 0x01, 0x2d, 0x00}, {0x38, 0x01, 0x2d, 0x01},
+ {0x03, 0x01, 0x2e, 0x00}, {0x06, 0x01, 0x2e, 0x00},
+ {0x0a, 0x01, 0x2e, 0x00}, {0x0f, 0x01, 0x2e, 0x00},
+ {0x18, 0x01, 0x2e, 0x00}, {0x1f, 0x01, 0x2e, 0x00},
+ {0x29, 0x01, 0x2e, 0x00}, {0x38, 0x01, 0x2e, 0x01}
+ },
+ /* 15 */
+ {
+ {0x01, 0x01, 0x2f, 0x00}, {0x16, 0x01, 0x2f, 0x01},
+ {0x01, 0x01, 0x33, 0x00}, {0x16, 0x01, 0x33, 0x01},
+ {0x01, 0x01, 0x34, 0x00}, {0x16, 0x01, 0x34, 0x01},
+ {0x01, 0x01, 0x35, 0x00}, {0x16, 0x01, 0x35, 0x01},
+ {0x01, 0x01, 0x36, 0x00}, {0x16, 0x01, 0x36, 0x01},
+ {0x01, 0x01, 0x37, 0x00}, {0x16, 0x01, 0x37, 0x01},
+ {0x01, 0x01, 0x38, 0x00}, {0x16, 0x01, 0x38, 0x01},
+ {0x01, 0x01, 0x39, 0x00}, {0x16, 0x01, 0x39, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x2f, 0x00}, {0x09, 0x01, 0x2f, 0x00},
+ {0x17, 0x01, 0x2f, 0x00}, {0x28, 0x01, 0x2f, 0x01},
+ {0x02, 0x01, 0x33, 0x00}, {0x09, 0x01, 0x33, 0x00},
+ {0x17, 0x01, 0x33, 0x00}, {0x28, 0x01, 0x33, 0x01},
+ {0x02, 0x01, 0x34, 0x00}, {0x09, 0x01, 0x34, 0x00},
+ {0x17, 0x01, 0x34, 0x00}, {0x28, 0x01, 0x34, 0x01},
+ {0x02, 0x01, 0x35, 0x00}, {0x09, 0x01, 0x35, 0x00},
+ {0x17, 0x01, 0x35, 0x00}, {0x28, 0x01, 0x35, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x2f, 0x00}, {0x06, 0x01, 0x2f, 0x00},
+ {0x0a, 0x01, 0x2f, 0x00}, {0x0f, 0x01, 0x2f, 0x00},
+ {0x18, 0x01, 0x2f, 0x00}, {0x1f, 0x01, 0x2f, 0x00},
+ {0x29, 0x01, 0x2f, 0x00}, {0x38, 0x01, 0x2f, 0x01},
+ {0x03, 0x01, 0x33, 0x00}, {0x06, 0x01, 0x33, 0x00},
+ {0x0a, 0x01, 0x33, 0x00}, {0x0f, 0x01, 0x33, 0x00},
+ {0x18, 0x01, 0x33, 0x00}, {0x1f, 0x01, 0x33, 0x00},
+ {0x29, 0x01, 0x33, 0x00}, {0x38, 0x01, 0x33, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x34, 0x00}, {0x06, 0x01, 0x34, 0x00},
+ {0x0a, 0x01, 0x34, 0x00}, {0x0f, 0x01, 0x34, 0x00},
+ {0x18, 0x01, 0x34, 0x00}, {0x1f, 0x01, 0x34, 0x00},
+ {0x29, 0x01, 0x34, 0x00}, {0x38, 0x01, 0x34, 0x01},
+ {0x03, 0x01, 0x35, 0x00}, {0x06, 0x01, 0x35, 0x00},
+ {0x0a, 0x01, 0x35, 0x00}, {0x0f, 0x01, 0x35, 0x00},
+ {0x18, 0x01, 0x35, 0x00}, {0x1f, 0x01, 0x35, 0x00},
+ {0x29, 0x01, 0x35, 0x00}, {0x38, 0x01, 0x35, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x36, 0x00}, {0x09, 0x01, 0x36, 0x00},
+ {0x17, 0x01, 0x36, 0x00}, {0x28, 0x01, 0x36, 0x01},
+ {0x02, 0x01, 0x37, 0x00}, {0x09, 0x01, 0x37, 0x00},
+ {0x17, 0x01, 0x37, 0x00}, {0x28, 0x01, 0x37, 0x01},
+ {0x02, 0x01, 0x38, 0x00}, {0x09, 0x01, 0x38, 0x00},
+ {0x17, 0x01, 0x38, 0x00}, {0x28, 0x01, 0x38, 0x01},
+ {0x02, 0x01, 0x39, 0x00}, {0x09, 0x01, 0x39, 0x00},
+ {0x17, 0x01, 0x39, 0x00}, {0x28, 0x01, 0x39, 0x01}
+ },
+ /* 20 */
+ {
+ {0x03, 0x01, 0x36, 0x00}, {0x06, 0x01, 0x36, 0x00},
+ {0x0a, 0x01, 0x36, 0x00}, {0x0f, 0x01, 0x36, 0x00},
+ {0x18, 0x01, 0x36, 0x00}, {0x1f, 0x01, 0x36, 0x00},
+ {0x29, 0x01, 0x36, 0x00}, {0x38, 0x01, 0x36, 0x01},
+ {0x03, 0x01, 0x37, 0x00}, {0x06, 0x01, 0x37, 0x00},
+ {0x0a, 0x01, 0x37, 0x00}, {0x0f, 0x01, 0x37, 0x00},
+ {0x18, 0x01, 0x37, 0x00}, {0x1f, 0x01, 0x37, 0x00},
+ {0x29, 0x01, 0x37, 0x00}, {0x38, 0x01, 0x37, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x38, 0x00}, {0x06, 0x01, 0x38, 0x00},
+ {0x0a, 0x01, 0x38, 0x00}, {0x0f, 0x01, 0x38, 0x00},
+ {0x18, 0x01, 0x38, 0x00}, {0x1f, 0x01, 0x38, 0x00},
+ {0x29, 0x01, 0x38, 0x00}, {0x38, 0x01, 0x38, 0x01},
+ {0x03, 0x01, 0x39, 0x00}, {0x06, 0x01, 0x39, 0x00},
+ {0x0a, 0x01, 0x39, 0x00}, {0x0f, 0x01, 0x39, 0x00},
+ {0x18, 0x01, 0x39, 0x00}, {0x1f, 0x01, 0x39, 0x00},
+ {0x29, 0x01, 0x39, 0x00}, {0x38, 0x01, 0x39, 0x01}
+ },
+ {
+ {0x1a, 0x00, 0x00, 0x00}, {0x1b, 0x00, 0x00, 0x00},
+ {0x1d, 0x00, 0x00, 0x00}, {0x1e, 0x00, 0x00, 0x00},
+ {0x21, 0x00, 0x00, 0x00}, {0x22, 0x00, 0x00, 0x00},
+ {0x24, 0x00, 0x00, 0x00}, {0x25, 0x00, 0x00, 0x00},
+ {0x2b, 0x00, 0x00, 0x00}, {0x2e, 0x00, 0x00, 0x00},
+ {0x32, 0x00, 0x00, 0x00}, {0x35, 0x00, 0x00, 0x00},
+ {0x3a, 0x00, 0x00, 0x00}, {0x3d, 0x00, 0x00, 0x00},
+ {0x41, 0x00, 0x00, 0x00}, {0x44, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0x3d, 0x01}, {0x00, 0x01, 0x41, 0x01},
+ {0x00, 0x01, 0x5f, 0x01}, {0x00, 0x01, 0x62, 0x01},
+ {0x00, 0x01, 0x64, 0x01}, {0x00, 0x01, 0x66, 0x01},
+ {0x00, 0x01, 0x67, 0x01}, {0x00, 0x01, 0x68, 0x01},
+ {0x00, 0x01, 0x6c, 0x01}, {0x00, 0x01, 0x6d, 0x01},
+ {0x00, 0x01, 0x6e, 0x01}, {0x00, 0x01, 0x70, 0x01},
+ {0x00, 0x01, 0x72, 0x01}, {0x00, 0x01, 0x75, 0x01},
+ {0x26, 0x00, 0x00, 0x00}, {0x27, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x01, 0x01, 0x3d, 0x00}, {0x16, 0x01, 0x3d, 0x01},
+ {0x01, 0x01, 0x41, 0x00}, {0x16, 0x01, 0x41, 0x01},
+ {0x01, 0x01, 0x5f, 0x00}, {0x16, 0x01, 0x5f, 0x01},
+ {0x01, 0x01, 0x62, 0x00}, {0x16, 0x01, 0x62, 0x01},
+ {0x01, 0x01, 0x64, 0x00}, {0x16, 0x01, 0x64, 0x01},
+ {0x01, 0x01, 0x66, 0x00}, {0x16, 0x01, 0x66, 0x01},
+ {0x01, 0x01, 0x67, 0x00}, {0x16, 0x01, 0x67, 0x01},
+ {0x01, 0x01, 0x68, 0x00}, {0x16, 0x01, 0x68, 0x01}
+ },
+ /* 25 */
+ {
+ {0x02, 0x01, 0x3d, 0x00}, {0x09, 0x01, 0x3d, 0x00},
+ {0x17, 0x01, 0x3d, 0x00}, {0x28, 0x01, 0x3d, 0x01},
+ {0x02, 0x01, 0x41, 0x00}, {0x09, 0x01, 0x41, 0x00},
+ {0x17, 0x01, 0x41, 0x00}, {0x28, 0x01, 0x41, 0x01},
+ {0x02, 0x01, 0x5f, 0x00}, {0x09, 0x01, 0x5f, 0x00},
+ {0x17, 0x01, 0x5f, 0x00}, {0x28, 0x01, 0x5f, 0x01},
+ {0x02, 0x01, 0x62, 0x00}, {0x09, 0x01, 0x62, 0x00},
+ {0x17, 0x01, 0x62, 0x00}, {0x28, 0x01, 0x62, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x3d, 0x00}, {0x06, 0x01, 0x3d, 0x00},
+ {0x0a, 0x01, 0x3d, 0x00}, {0x0f, 0x01, 0x3d, 0x00},
+ {0x18, 0x01, 0x3d, 0x00}, {0x1f, 0x01, 0x3d, 0x00},
+ {0x29, 0x01, 0x3d, 0x00}, {0x38, 0x01, 0x3d, 0x01},
+ {0x03, 0x01, 0x41, 0x00}, {0x06, 0x01, 0x41, 0x00},
+ {0x0a, 0x01, 0x41, 0x00}, {0x0f, 0x01, 0x41, 0x00},
+ {0x18, 0x01, 0x41, 0x00}, {0x1f, 0x01, 0x41, 0x00},
+ {0x29, 0x01, 0x41, 0x00}, {0x38, 0x01, 0x41, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x5f, 0x00}, {0x06, 0x01, 0x5f, 0x00},
+ {0x0a, 0x01, 0x5f, 0x00}, {0x0f, 0x01, 0x5f, 0x00},
+ {0x18, 0x01, 0x5f, 0x00}, {0x1f, 0x01, 0x5f, 0x00},
+ {0x29, 0x01, 0x5f, 0x00}, {0x38, 0x01, 0x5f, 0x01},
+ {0x03, 0x01, 0x62, 0x00}, {0x06, 0x01, 0x62, 0x00},
+ {0x0a, 0x01, 0x62, 0x00}, {0x0f, 0x01, 0x62, 0x00},
+ {0x18, 0x01, 0x62, 0x00}, {0x1f, 0x01, 0x62, 0x00},
+ {0x29, 0x01, 0x62, 0x00}, {0x38, 0x01, 0x62, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x64, 0x00}, {0x09, 0x01, 0x64, 0x00},
+ {0x17, 0x01, 0x64, 0x00}, {0x28, 0x01, 0x64, 0x01},
+ {0x02, 0x01, 0x66, 0x00}, {0x09, 0x01, 0x66, 0x00},
+ {0x17, 0x01, 0x66, 0x00}, {0x28, 0x01, 0x66, 0x01},
+ {0x02, 0x01, 0x67, 0x00}, {0x09, 0x01, 0x67, 0x00},
+ {0x17, 0x01, 0x67, 0x00}, {0x28, 0x01, 0x67, 0x01},
+ {0x02, 0x01, 0x68, 0x00}, {0x09, 0x01, 0x68, 0x00},
+ {0x17, 0x01, 0x68, 0x00}, {0x28, 0x01, 0x68, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x64, 0x00}, {0x06, 0x01, 0x64, 0x00},
+ {0x0a, 0x01, 0x64, 0x00}, {0x0f, 0x01, 0x64, 0x00},
+ {0x18, 0x01, 0x64, 0x00}, {0x1f, 0x01, 0x64, 0x00},
+ {0x29, 0x01, 0x64, 0x00}, {0x38, 0x01, 0x64, 0x01},
+ {0x03, 0x01, 0x66, 0x00}, {0x06, 0x01, 0x66, 0x00},
+ {0x0a, 0x01, 0x66, 0x00}, {0x0f, 0x01, 0x66, 0x00},
+ {0x18, 0x01, 0x66, 0x00}, {0x1f, 0x01, 0x66, 0x00},
+ {0x29, 0x01, 0x66, 0x00}, {0x38, 0x01, 0x66, 0x01}
+ },
+ /* 30 */
+ {
+ {0x03, 0x01, 0x67, 0x00}, {0x06, 0x01, 0x67, 0x00},
+ {0x0a, 0x01, 0x67, 0x00}, {0x0f, 0x01, 0x67, 0x00},
+ {0x18, 0x01, 0x67, 0x00}, {0x1f, 0x01, 0x67, 0x00},
+ {0x29, 0x01, 0x67, 0x00}, {0x38, 0x01, 0x67, 0x01},
+ {0x03, 0x01, 0x68, 0x00}, {0x06, 0x01, 0x68, 0x00},
+ {0x0a, 0x01, 0x68, 0x00}, {0x0f, 0x01, 0x68, 0x00},
+ {0x18, 0x01, 0x68, 0x00}, {0x1f, 0x01, 0x68, 0x00},
+ {0x29, 0x01, 0x68, 0x00}, {0x38, 0x01, 0x68, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x6c, 0x00}, {0x16, 0x01, 0x6c, 0x01},
+ {0x01, 0x01, 0x6d, 0x00}, {0x16, 0x01, 0x6d, 0x01},
+ {0x01, 0x01, 0x6e, 0x00}, {0x16, 0x01, 0x6e, 0x01},
+ {0x01, 0x01, 0x70, 0x00}, {0x16, 0x01, 0x70, 0x01},
+ {0x01, 0x01, 0x72, 0x00}, {0x16, 0x01, 0x72, 0x01},
+ {0x01, 0x01, 0x75, 0x00}, {0x16, 0x01, 0x75, 0x01},
+ {0x00, 0x01, 0x3a, 0x01}, {0x00, 0x01, 0x42, 0x01},
+ {0x00, 0x01, 0x43, 0x01}, {0x00, 0x01, 0x44, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x6c, 0x00}, {0x09, 0x01, 0x6c, 0x00},
+ {0x17, 0x01, 0x6c, 0x00}, {0x28, 0x01, 0x6c, 0x01},
+ {0x02, 0x01, 0x6d, 0x00}, {0x09, 0x01, 0x6d, 0x00},
+ {0x17, 0x01, 0x6d, 0x00}, {0x28, 0x01, 0x6d, 0x01},
+ {0x02, 0x01, 0x6e, 0x00}, {0x09, 0x01, 0x6e, 0x00},
+ {0x17, 0x01, 0x6e, 0x00}, {0x28, 0x01, 0x6e, 0x01},
+ {0x02, 0x01, 0x70, 0x00}, {0x09, 0x01, 0x70, 0x00},
+ {0x17, 0x01, 0x70, 0x00}, {0x28, 0x01, 0x70, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x6c, 0x00}, {0x06, 0x01, 0x6c, 0x00},
+ {0x0a, 0x01, 0x6c, 0x00}, {0x0f, 0x01, 0x6c, 0x00},
+ {0x18, 0x01, 0x6c, 0x00}, {0x1f, 0x01, 0x6c, 0x00},
+ {0x29, 0x01, 0x6c, 0x00}, {0x38, 0x01, 0x6c, 0x01},
+ {0x03, 0x01, 0x6d, 0x00}, {0x06, 0x01, 0x6d, 0x00},
+ {0x0a, 0x01, 0x6d, 0x00}, {0x0f, 0x01, 0x6d, 0x00},
+ {0x18, 0x01, 0x6d, 0x00}, {0x1f, 0x01, 0x6d, 0x00},
+ {0x29, 0x01, 0x6d, 0x00}, {0x38, 0x01, 0x6d, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x6e, 0x00}, {0x06, 0x01, 0x6e, 0x00},
+ {0x0a, 0x01, 0x6e, 0x00}, {0x0f, 0x01, 0x6e, 0x00},
+ {0x18, 0x01, 0x6e, 0x00}, {0x1f, 0x01, 0x6e, 0x00},
+ {0x29, 0x01, 0x6e, 0x00}, {0x38, 0x01, 0x6e, 0x01},
+ {0x03, 0x01, 0x70, 0x00}, {0x06, 0x01, 0x70, 0x00},
+ {0x0a, 0x01, 0x70, 0x00}, {0x0f, 0x01, 0x70, 0x00},
+ {0x18, 0x01, 0x70, 0x00}, {0x1f, 0x01, 0x70, 0x00},
+ {0x29, 0x01, 0x70, 0x00}, {0x38, 0x01, 0x70, 0x01}
+ },
+ /* 35 */
+ {
+ {0x02, 0x01, 0x72, 0x00}, {0x09, 0x01, 0x72, 0x00},
+ {0x17, 0x01, 0x72, 0x00}, {0x28, 0x01, 0x72, 0x01},
+ {0x02, 0x01, 0x75, 0x00}, {0x09, 0x01, 0x75, 0x00},
+ {0x17, 0x01, 0x75, 0x00}, {0x28, 0x01, 0x75, 0x01},
+ {0x01, 0x01, 0x3a, 0x00}, {0x16, 0x01, 0x3a, 0x01},
+ {0x01, 0x01, 0x42, 0x00}, {0x16, 0x01, 0x42, 0x01},
+ {0x01, 0x01, 0x43, 0x00}, {0x16, 0x01, 0x43, 0x01},
+ {0x01, 0x01, 0x44, 0x00}, {0x16, 0x01, 0x44, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x72, 0x00}, {0x06, 0x01, 0x72, 0x00},
+ {0x0a, 0x01, 0x72, 0x00}, {0x0f, 0x01, 0x72, 0x00},
+ {0x18, 0x01, 0x72, 0x00}, {0x1f, 0x01, 0x72, 0x00},
+ {0x29, 0x01, 0x72, 0x00}, {0x38, 0x01, 0x72, 0x01},
+ {0x03, 0x01, 0x75, 0x00}, {0x06, 0x01, 0x75, 0x00},
+ {0x0a, 0x01, 0x75, 0x00}, {0x0f, 0x01, 0x75, 0x00},
+ {0x18, 0x01, 0x75, 0x00}, {0x1f, 0x01, 0x75, 0x00},
+ {0x29, 0x01, 0x75, 0x00}, {0x38, 0x01, 0x75, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x3a, 0x00}, {0x09, 0x01, 0x3a, 0x00},
+ {0x17, 0x01, 0x3a, 0x00}, {0x28, 0x01, 0x3a, 0x01},
+ {0x02, 0x01, 0x42, 0x00}, {0x09, 0x01, 0x42, 0x00},
+ {0x17, 0x01, 0x42, 0x00}, {0x28, 0x01, 0x42, 0x01},
+ {0x02, 0x01, 0x43, 0x00}, {0x09, 0x01, 0x43, 0x00},
+ {0x17, 0x01, 0x43, 0x00}, {0x28, 0x01, 0x43, 0x01},
+ {0x02, 0x01, 0x44, 0x00}, {0x09, 0x01, 0x44, 0x00},
+ {0x17, 0x01, 0x44, 0x00}, {0x28, 0x01, 0x44, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x3a, 0x00}, {0x06, 0x01, 0x3a, 0x00},
+ {0x0a, 0x01, 0x3a, 0x00}, {0x0f, 0x01, 0x3a, 0x00},
+ {0x18, 0x01, 0x3a, 0x00}, {0x1f, 0x01, 0x3a, 0x00},
+ {0x29, 0x01, 0x3a, 0x00}, {0x38, 0x01, 0x3a, 0x01},
+ {0x03, 0x01, 0x42, 0x00}, {0x06, 0x01, 0x42, 0x00},
+ {0x0a, 0x01, 0x42, 0x00}, {0x0f, 0x01, 0x42, 0x00},
+ {0x18, 0x01, 0x42, 0x00}, {0x1f, 0x01, 0x42, 0x00},
+ {0x29, 0x01, 0x42, 0x00}, {0x38, 0x01, 0x42, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x43, 0x00}, {0x06, 0x01, 0x43, 0x00},
+ {0x0a, 0x01, 0x43, 0x00}, {0x0f, 0x01, 0x43, 0x00},
+ {0x18, 0x01, 0x43, 0x00}, {0x1f, 0x01, 0x43, 0x00},
+ {0x29, 0x01, 0x43, 0x00}, {0x38, 0x01, 0x43, 0x01},
+ {0x03, 0x01, 0x44, 0x00}, {0x06, 0x01, 0x44, 0x00},
+ {0x0a, 0x01, 0x44, 0x00}, {0x0f, 0x01, 0x44, 0x00},
+ {0x18, 0x01, 0x44, 0x00}, {0x1f, 0x01, 0x44, 0x00},
+ {0x29, 0x01, 0x44, 0x00}, {0x38, 0x01, 0x44, 0x01}
+ },
+ /* 40 */
+ {
+ {0x2c, 0x00, 0x00, 0x00}, {0x2d, 0x00, 0x00, 0x00},
+ {0x2f, 0x00, 0x00, 0x00}, {0x30, 0x00, 0x00, 0x00},
+ {0x33, 0x00, 0x00, 0x00}, {0x34, 0x00, 0x00, 0x00},
+ {0x36, 0x00, 0x00, 0x00}, {0x37, 0x00, 0x00, 0x00},
+ {0x3b, 0x00, 0x00, 0x00}, {0x3c, 0x00, 0x00, 0x00},
+ {0x3e, 0x00, 0x00, 0x00}, {0x3f, 0x00, 0x00, 0x00},
+ {0x42, 0x00, 0x00, 0x00}, {0x43, 0x00, 0x00, 0x00},
+ {0x45, 0x00, 0x00, 0x00}, {0x48, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0x45, 0x01}, {0x00, 0x01, 0x46, 0x01},
+ {0x00, 0x01, 0x47, 0x01}, {0x00, 0x01, 0x48, 0x01},
+ {0x00, 0x01, 0x49, 0x01}, {0x00, 0x01, 0x4a, 0x01},
+ {0x00, 0x01, 0x4b, 0x01}, {0x00, 0x01, 0x4c, 0x01},
+ {0x00, 0x01, 0x4d, 0x01}, {0x00, 0x01, 0x4e, 0x01},
+ {0x00, 0x01, 0x4f, 0x01}, {0x00, 0x01, 0x50, 0x01},
+ {0x00, 0x01, 0x51, 0x01}, {0x00, 0x01, 0x52, 0x01},
+ {0x00, 0x01, 0x53, 0x01}, {0x00, 0x01, 0x54, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x45, 0x00}, {0x16, 0x01, 0x45, 0x01},
+ {0x01, 0x01, 0x46, 0x00}, {0x16, 0x01, 0x46, 0x01},
+ {0x01, 0x01, 0x47, 0x00}, {0x16, 0x01, 0x47, 0x01},
+ {0x01, 0x01, 0x48, 0x00}, {0x16, 0x01, 0x48, 0x01},
+ {0x01, 0x01, 0x49, 0x00}, {0x16, 0x01, 0x49, 0x01},
+ {0x01, 0x01, 0x4a, 0x00}, {0x16, 0x01, 0x4a, 0x01},
+ {0x01, 0x01, 0x4b, 0x00}, {0x16, 0x01, 0x4b, 0x01},
+ {0x01, 0x01, 0x4c, 0x00}, {0x16, 0x01, 0x4c, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x45, 0x00}, {0x09, 0x01, 0x45, 0x00},
+ {0x17, 0x01, 0x45, 0x00}, {0x28, 0x01, 0x45, 0x01},
+ {0x02, 0x01, 0x46, 0x00}, {0x09, 0x01, 0x46, 0x00},
+ {0x17, 0x01, 0x46, 0x00}, {0x28, 0x01, 0x46, 0x01},
+ {0x02, 0x01, 0x47, 0x00}, {0x09, 0x01, 0x47, 0x00},
+ {0x17, 0x01, 0x47, 0x00}, {0x28, 0x01, 0x47, 0x01},
+ {0x02, 0x01, 0x48, 0x00}, {0x09, 0x01, 0x48, 0x00},
+ {0x17, 0x01, 0x48, 0x00}, {0x28, 0x01, 0x48, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x45, 0x00}, {0x06, 0x01, 0x45, 0x00},
+ {0x0a, 0x01, 0x45, 0x00}, {0x0f, 0x01, 0x45, 0x00},
+ {0x18, 0x01, 0x45, 0x00}, {0x1f, 0x01, 0x45, 0x00},
+ {0x29, 0x01, 0x45, 0x00}, {0x38, 0x01, 0x45, 0x01},
+ {0x03, 0x01, 0x46, 0x00}, {0x06, 0x01, 0x46, 0x00},
+ {0x0a, 0x01, 0x46, 0x00}, {0x0f, 0x01, 0x46, 0x00},
+ {0x18, 0x01, 0x46, 0x00}, {0x1f, 0x01, 0x46, 0x00},
+ {0x29, 0x01, 0x46, 0x00}, {0x38, 0x01, 0x46, 0x01}
+ },
+ /* 45 */
+ {
+ {0x03, 0x01, 0x47, 0x00}, {0x06, 0x01, 0x47, 0x00},
+ {0x0a, 0x01, 0x47, 0x00}, {0x0f, 0x01, 0x47, 0x00},
+ {0x18, 0x01, 0x47, 0x00}, {0x1f, 0x01, 0x47, 0x00},
+ {0x29, 0x01, 0x47, 0x00}, {0x38, 0x01, 0x47, 0x01},
+ {0x03, 0x01, 0x48, 0x00}, {0x06, 0x01, 0x48, 0x00},
+ {0x0a, 0x01, 0x48, 0x00}, {0x0f, 0x01, 0x48, 0x00},
+ {0x18, 0x01, 0x48, 0x00}, {0x1f, 0x01, 0x48, 0x00},
+ {0x29, 0x01, 0x48, 0x00}, {0x38, 0x01, 0x48, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x49, 0x00}, {0x09, 0x01, 0x49, 0x00},
+ {0x17, 0x01, 0x49, 0x00}, {0x28, 0x01, 0x49, 0x01},
+ {0x02, 0x01, 0x4a, 0x00}, {0x09, 0x01, 0x4a, 0x00},
+ {0x17, 0x01, 0x4a, 0x00}, {0x28, 0x01, 0x4a, 0x01},
+ {0x02, 0x01, 0x4b, 0x00}, {0x09, 0x01, 0x4b, 0x00},
+ {0x17, 0x01, 0x4b, 0x00}, {0x28, 0x01, 0x4b, 0x01},
+ {0x02, 0x01, 0x4c, 0x00}, {0x09, 0x01, 0x4c, 0x00},
+ {0x17, 0x01, 0x4c, 0x00}, {0x28, 0x01, 0x4c, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x49, 0x00}, {0x06, 0x01, 0x49, 0x00},
+ {0x0a, 0x01, 0x49, 0x00}, {0x0f, 0x01, 0x49, 0x00},
+ {0x18, 0x01, 0x49, 0x00}, {0x1f, 0x01, 0x49, 0x00},
+ {0x29, 0x01, 0x49, 0x00}, {0x38, 0x01, 0x49, 0x01},
+ {0x03, 0x01, 0x4a, 0x00}, {0x06, 0x01, 0x4a, 0x00},
+ {0x0a, 0x01, 0x4a, 0x00}, {0x0f, 0x01, 0x4a, 0x00},
+ {0x18, 0x01, 0x4a, 0x00}, {0x1f, 0x01, 0x4a, 0x00},
+ {0x29, 0x01, 0x4a, 0x00}, {0x38, 0x01, 0x4a, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x4b, 0x00}, {0x06, 0x01, 0x4b, 0x00},
+ {0x0a, 0x01, 0x4b, 0x00}, {0x0f, 0x01, 0x4b, 0x00},
+ {0x18, 0x01, 0x4b, 0x00}, {0x1f, 0x01, 0x4b, 0x00},
+ {0x29, 0x01, 0x4b, 0x00}, {0x38, 0x01, 0x4b, 0x01},
+ {0x03, 0x01, 0x4c, 0x00}, {0x06, 0x01, 0x4c, 0x00},
+ {0x0a, 0x01, 0x4c, 0x00}, {0x0f, 0x01, 0x4c, 0x00},
+ {0x18, 0x01, 0x4c, 0x00}, {0x1f, 0x01, 0x4c, 0x00},
+ {0x29, 0x01, 0x4c, 0x00}, {0x38, 0x01, 0x4c, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x4d, 0x00}, {0x16, 0x01, 0x4d, 0x01},
+ {0x01, 0x01, 0x4e, 0x00}, {0x16, 0x01, 0x4e, 0x01},
+ {0x01, 0x01, 0x4f, 0x00}, {0x16, 0x01, 0x4f, 0x01},
+ {0x01, 0x01, 0x50, 0x00}, {0x16, 0x01, 0x50, 0x01},
+ {0x01, 0x01, 0x51, 0x00}, {0x16, 0x01, 0x51, 0x01},
+ {0x01, 0x01, 0x52, 0x00}, {0x16, 0x01, 0x52, 0x01},
+ {0x01, 0x01, 0x53, 0x00}, {0x16, 0x01, 0x53, 0x01},
+ {0x01, 0x01, 0x54, 0x00}, {0x16, 0x01, 0x54, 0x01}
+ },
+ /* 50 */
+ {
+ {0x02, 0x01, 0x4d, 0x00}, {0x09, 0x01, 0x4d, 0x00},
+ {0x17, 0x01, 0x4d, 0x00}, {0x28, 0x01, 0x4d, 0x01},
+ {0x02, 0x01, 0x4e, 0x00}, {0x09, 0x01, 0x4e, 0x00},
+ {0x17, 0x01, 0x4e, 0x00}, {0x28, 0x01, 0x4e, 0x01},
+ {0x02, 0x01, 0x4f, 0x00}, {0x09, 0x01, 0x4f, 0x00},
+ {0x17, 0x01, 0x4f, 0x00}, {0x28, 0x01, 0x4f, 0x01},
+ {0x02, 0x01, 0x50, 0x00}, {0x09, 0x01, 0x50, 0x00},
+ {0x17, 0x01, 0x50, 0x00}, {0x28, 0x01, 0x50, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x4d, 0x00}, {0x06, 0x01, 0x4d, 0x00},
+ {0x0a, 0x01, 0x4d, 0x00}, {0x0f, 0x01, 0x4d, 0x00},
+ {0x18, 0x01, 0x4d, 0x00}, {0x1f, 0x01, 0x4d, 0x00},
+ {0x29, 0x01, 0x4d, 0x00}, {0x38, 0x01, 0x4d, 0x01},
+ {0x03, 0x01, 0x4e, 0x00}, {0x06, 0x01, 0x4e, 0x00},
+ {0x0a, 0x01, 0x4e, 0x00}, {0x0f, 0x01, 0x4e, 0x00},
+ {0x18, 0x01, 0x4e, 0x00}, {0x1f, 0x01, 0x4e, 0x00},
+ {0x29, 0x01, 0x4e, 0x00}, {0x38, 0x01, 0x4e, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x4f, 0x00}, {0x06, 0x01, 0x4f, 0x00},
+ {0x0a, 0x01, 0x4f, 0x00}, {0x0f, 0x01, 0x4f, 0x00},
+ {0x18, 0x01, 0x4f, 0x00}, {0x1f, 0x01, 0x4f, 0x00},
+ {0x29, 0x01, 0x4f, 0x00}, {0x38, 0x01, 0x4f, 0x01},
+ {0x03, 0x01, 0x50, 0x00}, {0x06, 0x01, 0x50, 0x00},
+ {0x0a, 0x01, 0x50, 0x00}, {0x0f, 0x01, 0x50, 0x00},
+ {0x18, 0x01, 0x50, 0x00}, {0x1f, 0x01, 0x50, 0x00},
+ {0x29, 0x01, 0x50, 0x00}, {0x38, 0x01, 0x50, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x51, 0x00}, {0x09, 0x01, 0x51, 0x00},
+ {0x17, 0x01, 0x51, 0x00}, {0x28, 0x01, 0x51, 0x01},
+ {0x02, 0x01, 0x52, 0x00}, {0x09, 0x01, 0x52, 0x00},
+ {0x17, 0x01, 0x52, 0x00}, {0x28, 0x01, 0x52, 0x01},
+ {0x02, 0x01, 0x53, 0x00}, {0x09, 0x01, 0x53, 0x00},
+ {0x17, 0x01, 0x53, 0x00}, {0x28, 0x01, 0x53, 0x01},
+ {0x02, 0x01, 0x54, 0x00}, {0x09, 0x01, 0x54, 0x00},
+ {0x17, 0x01, 0x54, 0x00}, {0x28, 0x01, 0x54, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x51, 0x00}, {0x06, 0x01, 0x51, 0x00},
+ {0x0a, 0x01, 0x51, 0x00}, {0x0f, 0x01, 0x51, 0x00},
+ {0x18, 0x01, 0x51, 0x00}, {0x1f, 0x01, 0x51, 0x00},
+ {0x29, 0x01, 0x51, 0x00}, {0x38, 0x01, 0x51, 0x01},
+ {0x03, 0x01, 0x52, 0x00}, {0x06, 0x01, 0x52, 0x00},
+ {0x0a, 0x01, 0x52, 0x00}, {0x0f, 0x01, 0x52, 0x00},
+ {0x18, 0x01, 0x52, 0x00}, {0x1f, 0x01, 0x52, 0x00},
+ {0x29, 0x01, 0x52, 0x00}, {0x38, 0x01, 0x52, 0x01}
+ },
+ /* 55 */
+ {
+ {0x03, 0x01, 0x53, 0x00}, {0x06, 0x01, 0x53, 0x00},
+ {0x0a, 0x01, 0x53, 0x00}, {0x0f, 0x01, 0x53, 0x00},
+ {0x18, 0x01, 0x53, 0x00}, {0x1f, 0x01, 0x53, 0x00},
+ {0x29, 0x01, 0x53, 0x00}, {0x38, 0x01, 0x53, 0x01},
+ {0x03, 0x01, 0x54, 0x00}, {0x06, 0x01, 0x54, 0x00},
+ {0x0a, 0x01, 0x54, 0x00}, {0x0f, 0x01, 0x54, 0x00},
+ {0x18, 0x01, 0x54, 0x00}, {0x1f, 0x01, 0x54, 0x00},
+ {0x29, 0x01, 0x54, 0x00}, {0x38, 0x01, 0x54, 0x01}
+ },
+ {
+ {0x00, 0x01, 0x55, 0x01}, {0x00, 0x01, 0x56, 0x01},
+ {0x00, 0x01, 0x57, 0x01}, {0x00, 0x01, 0x59, 0x01},
+ {0x00, 0x01, 0x6a, 0x01}, {0x00, 0x01, 0x6b, 0x01},
+ {0x00, 0x01, 0x71, 0x01}, {0x00, 0x01, 0x76, 0x01},
+ {0x00, 0x01, 0x77, 0x01}, {0x00, 0x01, 0x78, 0x01},
+ {0x00, 0x01, 0x79, 0x01}, {0x00, 0x01, 0x7a, 0x01},
+ {0x46, 0x00, 0x00, 0x00}, {0x47, 0x00, 0x00, 0x00},
+ {0x49, 0x00, 0x00, 0x00}, {0x4a, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x55, 0x00}, {0x16, 0x01, 0x55, 0x01},
+ {0x01, 0x01, 0x56, 0x00}, {0x16, 0x01, 0x56, 0x01},
+ {0x01, 0x01, 0x57, 0x00}, {0x16, 0x01, 0x57, 0x01},
+ {0x01, 0x01, 0x59, 0x00}, {0x16, 0x01, 0x59, 0x01},
+ {0x01, 0x01, 0x6a, 0x00}, {0x16, 0x01, 0x6a, 0x01},
+ {0x01, 0x01, 0x6b, 0x00}, {0x16, 0x01, 0x6b, 0x01},
+ {0x01, 0x01, 0x71, 0x00}, {0x16, 0x01, 0x71, 0x01},
+ {0x01, 0x01, 0x76, 0x00}, {0x16, 0x01, 0x76, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x55, 0x00}, {0x09, 0x01, 0x55, 0x00},
+ {0x17, 0x01, 0x55, 0x00}, {0x28, 0x01, 0x55, 0x01},
+ {0x02, 0x01, 0x56, 0x00}, {0x09, 0x01, 0x56, 0x00},
+ {0x17, 0x01, 0x56, 0x00}, {0x28, 0x01, 0x56, 0x01},
+ {0x02, 0x01, 0x57, 0x00}, {0x09, 0x01, 0x57, 0x00},
+ {0x17, 0x01, 0x57, 0x00}, {0x28, 0x01, 0x57, 0x01},
+ {0x02, 0x01, 0x59, 0x00}, {0x09, 0x01, 0x59, 0x00},
+ {0x17, 0x01, 0x59, 0x00}, {0x28, 0x01, 0x59, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x55, 0x00}, {0x06, 0x01, 0x55, 0x00},
+ {0x0a, 0x01, 0x55, 0x00}, {0x0f, 0x01, 0x55, 0x00},
+ {0x18, 0x01, 0x55, 0x00}, {0x1f, 0x01, 0x55, 0x00},
+ {0x29, 0x01, 0x55, 0x00}, {0x38, 0x01, 0x55, 0x01},
+ {0x03, 0x01, 0x56, 0x00}, {0x06, 0x01, 0x56, 0x00},
+ {0x0a, 0x01, 0x56, 0x00}, {0x0f, 0x01, 0x56, 0x00},
+ {0x18, 0x01, 0x56, 0x00}, {0x1f, 0x01, 0x56, 0x00},
+ {0x29, 0x01, 0x56, 0x00}, {0x38, 0x01, 0x56, 0x01}
+ },
+ /* 60 */
+ {
+ {0x03, 0x01, 0x57, 0x00}, {0x06, 0x01, 0x57, 0x00},
+ {0x0a, 0x01, 0x57, 0x00}, {0x0f, 0x01, 0x57, 0x00},
+ {0x18, 0x01, 0x57, 0x00}, {0x1f, 0x01, 0x57, 0x00},
+ {0x29, 0x01, 0x57, 0x00}, {0x38, 0x01, 0x57, 0x01},
+ {0x03, 0x01, 0x59, 0x00}, {0x06, 0x01, 0x59, 0x00},
+ {0x0a, 0x01, 0x59, 0x00}, {0x0f, 0x01, 0x59, 0x00},
+ {0x18, 0x01, 0x59, 0x00}, {0x1f, 0x01, 0x59, 0x00},
+ {0x29, 0x01, 0x59, 0x00}, {0x38, 0x01, 0x59, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x6a, 0x00}, {0x09, 0x01, 0x6a, 0x00},
+ {0x17, 0x01, 0x6a, 0x00}, {0x28, 0x01, 0x6a, 0x01},
+ {0x02, 0x01, 0x6b, 0x00}, {0x09, 0x01, 0x6b, 0x00},
+ {0x17, 0x01, 0x6b, 0x00}, {0x28, 0x01, 0x6b, 0x01},
+ {0x02, 0x01, 0x71, 0x00}, {0x09, 0x01, 0x71, 0x00},
+ {0x17, 0x01, 0x71, 0x00}, {0x28, 0x01, 0x71, 0x01},
+ {0x02, 0x01, 0x76, 0x00}, {0x09, 0x01, 0x76, 0x00},
+ {0x17, 0x01, 0x76, 0x00}, {0x28, 0x01, 0x76, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x6a, 0x00}, {0x06, 0x01, 0x6a, 0x00},
+ {0x0a, 0x01, 0x6a, 0x00}, {0x0f, 0x01, 0x6a, 0x00},
+ {0x18, 0x01, 0x6a, 0x00}, {0x1f, 0x01, 0x6a, 0x00},
+ {0x29, 0x01, 0x6a, 0x00}, {0x38, 0x01, 0x6a, 0x01},
+ {0x03, 0x01, 0x6b, 0x00}, {0x06, 0x01, 0x6b, 0x00},
+ {0x0a, 0x01, 0x6b, 0x00}, {0x0f, 0x01, 0x6b, 0x00},
+ {0x18, 0x01, 0x6b, 0x00}, {0x1f, 0x01, 0x6b, 0x00},
+ {0x29, 0x01, 0x6b, 0x00}, {0x38, 0x01, 0x6b, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x71, 0x00}, {0x06, 0x01, 0x71, 0x00},
+ {0x0a, 0x01, 0x71, 0x00}, {0x0f, 0x01, 0x71, 0x00},
+ {0x18, 0x01, 0x71, 0x00}, {0x1f, 0x01, 0x71, 0x00},
+ {0x29, 0x01, 0x71, 0x00}, {0x38, 0x01, 0x71, 0x01},
+ {0x03, 0x01, 0x76, 0x00}, {0x06, 0x01, 0x76, 0x00},
+ {0x0a, 0x01, 0x76, 0x00}, {0x0f, 0x01, 0x76, 0x00},
+ {0x18, 0x01, 0x76, 0x00}, {0x1f, 0x01, 0x76, 0x00},
+ {0x29, 0x01, 0x76, 0x00}, {0x38, 0x01, 0x76, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x77, 0x00}, {0x16, 0x01, 0x77, 0x01},
+ {0x01, 0x01, 0x78, 0x00}, {0x16, 0x01, 0x78, 0x01},
+ {0x01, 0x01, 0x79, 0x00}, {0x16, 0x01, 0x79, 0x01},
+ {0x01, 0x01, 0x7a, 0x00}, {0x16, 0x01, 0x7a, 0x01},
+ {0x00, 0x01, 0x26, 0x01}, {0x00, 0x01, 0x2a, 0x01},
+ {0x00, 0x01, 0x2c, 0x01}, {0x00, 0x01, 0x3b, 0x01},
+ {0x00, 0x01, 0x58, 0x01}, {0x00, 0x01, 0x5a, 0x01},
+ {0x4b, 0x00, 0x00, 0x00}, {0x4e, 0x00, 0x00, 0x01}
+ },
+ /* 65 */
+ {
+ {0x02, 0x01, 0x77, 0x00}, {0x09, 0x01, 0x77, 0x00},
+ {0x17, 0x01, 0x77, 0x00}, {0x28, 0x01, 0x77, 0x01},
+ {0x02, 0x01, 0x78, 0x00}, {0x09, 0x01, 0x78, 0x00},
+ {0x17, 0x01, 0x78, 0x00}, {0x28, 0x01, 0x78, 0x01},
+ {0x02, 0x01, 0x79, 0x00}, {0x09, 0x01, 0x79, 0x00},
+ {0x17, 0x01, 0x79, 0x00}, {0x28, 0x01, 0x79, 0x01},
+ {0x02, 0x01, 0x7a, 0x00}, {0x09, 0x01, 0x7a, 0x00},
+ {0x17, 0x01, 0x7a, 0x00}, {0x28, 0x01, 0x7a, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x77, 0x00}, {0x06, 0x01, 0x77, 0x00},
+ {0x0a, 0x01, 0x77, 0x00}, {0x0f, 0x01, 0x77, 0x00},
+ {0x18, 0x01, 0x77, 0x00}, {0x1f, 0x01, 0x77, 0x00},
+ {0x29, 0x01, 0x77, 0x00}, {0x38, 0x01, 0x77, 0x01},
+ {0x03, 0x01, 0x78, 0x00}, {0x06, 0x01, 0x78, 0x00},
+ {0x0a, 0x01, 0x78, 0x00}, {0x0f, 0x01, 0x78, 0x00},
+ {0x18, 0x01, 0x78, 0x00}, {0x1f, 0x01, 0x78, 0x00},
+ {0x29, 0x01, 0x78, 0x00}, {0x38, 0x01, 0x78, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x79, 0x00}, {0x06, 0x01, 0x79, 0x00},
+ {0x0a, 0x01, 0x79, 0x00}, {0x0f, 0x01, 0x79, 0x00},
+ {0x18, 0x01, 0x79, 0x00}, {0x1f, 0x01, 0x79, 0x00},
+ {0x29, 0x01, 0x79, 0x00}, {0x38, 0x01, 0x79, 0x01},
+ {0x03, 0x01, 0x7a, 0x00}, {0x06, 0x01, 0x7a, 0x00},
+ {0x0a, 0x01, 0x7a, 0x00}, {0x0f, 0x01, 0x7a, 0x00},
+ {0x18, 0x01, 0x7a, 0x00}, {0x1f, 0x01, 0x7a, 0x00},
+ {0x29, 0x01, 0x7a, 0x00}, {0x38, 0x01, 0x7a, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x26, 0x00}, {0x16, 0x01, 0x26, 0x01},
+ {0x01, 0x01, 0x2a, 0x00}, {0x16, 0x01, 0x2a, 0x01},
+ {0x01, 0x01, 0x2c, 0x00}, {0x16, 0x01, 0x2c, 0x01},
+ {0x01, 0x01, 0x3b, 0x00}, {0x16, 0x01, 0x3b, 0x01},
+ {0x01, 0x01, 0x58, 0x00}, {0x16, 0x01, 0x58, 0x01},
+ {0x01, 0x01, 0x5a, 0x00}, {0x16, 0x01, 0x5a, 0x01},
+ {0x4c, 0x00, 0x00, 0x00}, {0x4d, 0x00, 0x00, 0x00},
+ {0x4f, 0x00, 0x00, 0x00}, {0x51, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x26, 0x00}, {0x09, 0x01, 0x26, 0x00},
+ {0x17, 0x01, 0x26, 0x00}, {0x28, 0x01, 0x26, 0x01},
+ {0x02, 0x01, 0x2a, 0x00}, {0x09, 0x01, 0x2a, 0x00},
+ {0x17, 0x01, 0x2a, 0x00}, {0x28, 0x01, 0x2a, 0x01},
+ {0x02, 0x01, 0x2c, 0x00}, {0x09, 0x01, 0x2c, 0x00},
+ {0x17, 0x01, 0x2c, 0x00}, {0x28, 0x01, 0x2c, 0x01},
+ {0x02, 0x01, 0x3b, 0x00}, {0x09, 0x01, 0x3b, 0x00},
+ {0x17, 0x01, 0x3b, 0x00}, {0x28, 0x01, 0x3b, 0x01}
+ },
+ /* 70 */
+ {
+ {0x03, 0x01, 0x26, 0x00}, {0x06, 0x01, 0x26, 0x00},
+ {0x0a, 0x01, 0x26, 0x00}, {0x0f, 0x01, 0x26, 0x00},
+ {0x18, 0x01, 0x26, 0x00}, {0x1f, 0x01, 0x26, 0x00},
+ {0x29, 0x01, 0x26, 0x00}, {0x38, 0x01, 0x26, 0x01},
+ {0x03, 0x01, 0x2a, 0x00}, {0x06, 0x01, 0x2a, 0x00},
+ {0x0a, 0x01, 0x2a, 0x00}, {0x0f, 0x01, 0x2a, 0x00},
+ {0x18, 0x01, 0x2a, 0x00}, {0x1f, 0x01, 0x2a, 0x00},
+ {0x29, 0x01, 0x2a, 0x00}, {0x38, 0x01, 0x2a, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x2c, 0x00}, {0x06, 0x01, 0x2c, 0x00},
+ {0x0a, 0x01, 0x2c, 0x00}, {0x0f, 0x01, 0x2c, 0x00},
+ {0x18, 0x01, 0x2c, 0x00}, {0x1f, 0x01, 0x2c, 0x00},
+ {0x29, 0x01, 0x2c, 0x00}, {0x38, 0x01, 0x2c, 0x01},
+ {0x03, 0x01, 0x3b, 0x00}, {0x06, 0x01, 0x3b, 0x00},
+ {0x0a, 0x01, 0x3b, 0x00}, {0x0f, 0x01, 0x3b, 0x00},
+ {0x18, 0x01, 0x3b, 0x00}, {0x1f, 0x01, 0x3b, 0x00},
+ {0x29, 0x01, 0x3b, 0x00}, {0x38, 0x01, 0x3b, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x58, 0x00}, {0x09, 0x01, 0x58, 0x00},
+ {0x17, 0x01, 0x58, 0x00}, {0x28, 0x01, 0x58, 0x01},
+ {0x02, 0x01, 0x5a, 0x00}, {0x09, 0x01, 0x5a, 0x00},
+ {0x17, 0x01, 0x5a, 0x00}, {0x28, 0x01, 0x5a, 0x01},
+ {0x00, 0x01, 0x21, 0x01}, {0x00, 0x01, 0x22, 0x01},
+ {0x00, 0x01, 0x28, 0x01}, {0x00, 0x01, 0x29, 0x01},
+ {0x00, 0x01, 0x3f, 0x01}, {0x50, 0x00, 0x00, 0x00},
+ {0x52, 0x00, 0x00, 0x00}, {0x54, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x58, 0x00}, {0x06, 0x01, 0x58, 0x00},
+ {0x0a, 0x01, 0x58, 0x00}, {0x0f, 0x01, 0x58, 0x00},
+ {0x18, 0x01, 0x58, 0x00}, {0x1f, 0x01, 0x58, 0x00},
+ {0x29, 0x01, 0x58, 0x00}, {0x38, 0x01, 0x58, 0x01},
+ {0x03, 0x01, 0x5a, 0x00}, {0x06, 0x01, 0x5a, 0x00},
+ {0x0a, 0x01, 0x5a, 0x00}, {0x0f, 0x01, 0x5a, 0x00},
+ {0x18, 0x01, 0x5a, 0x00}, {0x1f, 0x01, 0x5a, 0x00},
+ {0x29, 0x01, 0x5a, 0x00}, {0x38, 0x01, 0x5a, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x21, 0x00}, {0x16, 0x01, 0x21, 0x01},
+ {0x01, 0x01, 0x22, 0x00}, {0x16, 0x01, 0x22, 0x01},
+ {0x01, 0x01, 0x28, 0x00}, {0x16, 0x01, 0x28, 0x01},
+ {0x01, 0x01, 0x29, 0x00}, {0x16, 0x01, 0x29, 0x01},
+ {0x01, 0x01, 0x3f, 0x00}, {0x16, 0x01, 0x3f, 0x01},
+ {0x00, 0x01, 0x27, 0x01}, {0x00, 0x01, 0x2b, 0x01},
+ {0x00, 0x01, 0x7c, 0x01}, {0x53, 0x00, 0x00, 0x00},
+ {0x55, 0x00, 0x00, 0x00}, {0x58, 0x00, 0x00, 0x01}
+ },
+ /* 75 */
+ {
+ {0x02, 0x01, 0x21, 0x00}, {0x09, 0x01, 0x21, 0x00},
+ {0x17, 0x01, 0x21, 0x00}, {0x28, 0x01, 0x21, 0x01},
+ {0x02, 0x01, 0x22, 0x00}, {0x09, 0x01, 0x22, 0x00},
+ {0x17, 0x01, 0x22, 0x00}, {0x28, 0x01, 0x22, 0x01},
+ {0x02, 0x01, 0x28, 0x00}, {0x09, 0x01, 0x28, 0x00},
+ {0x17, 0x01, 0x28, 0x00}, {0x28, 0x01, 0x28, 0x01},
+ {0x02, 0x01, 0x29, 0x00}, {0x09, 0x01, 0x29, 0x00},
+ {0x17, 0x01, 0x29, 0x00}, {0x28, 0x01, 0x29, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x21, 0x00}, {0x06, 0x01, 0x21, 0x00},
+ {0x0a, 0x01, 0x21, 0x00}, {0x0f, 0x01, 0x21, 0x00},
+ {0x18, 0x01, 0x21, 0x00}, {0x1f, 0x01, 0x21, 0x00},
+ {0x29, 0x01, 0x21, 0x00}, {0x38, 0x01, 0x21, 0x01},
+ {0x03, 0x01, 0x22, 0x00}, {0x06, 0x01, 0x22, 0x00},
+ {0x0a, 0x01, 0x22, 0x00}, {0x0f, 0x01, 0x22, 0x00},
+ {0x18, 0x01, 0x22, 0x00}, {0x1f, 0x01, 0x22, 0x00},
+ {0x29, 0x01, 0x22, 0x00}, {0x38, 0x01, 0x22, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x28, 0x00}, {0x06, 0x01, 0x28, 0x00},
+ {0x0a, 0x01, 0x28, 0x00}, {0x0f, 0x01, 0x28, 0x00},
+ {0x18, 0x01, 0x28, 0x00}, {0x1f, 0x01, 0x28, 0x00},
+ {0x29, 0x01, 0x28, 0x00}, {0x38, 0x01, 0x28, 0x01},
+ {0x03, 0x01, 0x29, 0x00}, {0x06, 0x01, 0x29, 0x00},
+ {0x0a, 0x01, 0x29, 0x00}, {0x0f, 0x01, 0x29, 0x00},
+ {0x18, 0x01, 0x29, 0x00}, {0x1f, 0x01, 0x29, 0x00},
+ {0x29, 0x01, 0x29, 0x00}, {0x38, 0x01, 0x29, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x3f, 0x00}, {0x09, 0x01, 0x3f, 0x00},
+ {0x17, 0x01, 0x3f, 0x00}, {0x28, 0x01, 0x3f, 0x01},
+ {0x01, 0x01, 0x27, 0x00}, {0x16, 0x01, 0x27, 0x01},
+ {0x01, 0x01, 0x2b, 0x00}, {0x16, 0x01, 0x2b, 0x01},
+ {0x01, 0x01, 0x7c, 0x00}, {0x16, 0x01, 0x7c, 0x01},
+ {0x00, 0x01, 0x23, 0x01}, {0x00, 0x01, 0x3e, 0x01},
+ {0x56, 0x00, 0x00, 0x00}, {0x57, 0x00, 0x00, 0x00},
+ {0x59, 0x00, 0x00, 0x00}, {0x5a, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x3f, 0x00}, {0x06, 0x01, 0x3f, 0x00},
+ {0x0a, 0x01, 0x3f, 0x00}, {0x0f, 0x01, 0x3f, 0x00},
+ {0x18, 0x01, 0x3f, 0x00}, {0x1f, 0x01, 0x3f, 0x00},
+ {0x29, 0x01, 0x3f, 0x00}, {0x38, 0x01, 0x3f, 0x01},
+ {0x02, 0x01, 0x27, 0x00}, {0x09, 0x01, 0x27, 0x00},
+ {0x17, 0x01, 0x27, 0x00}, {0x28, 0x01, 0x27, 0x01},
+ {0x02, 0x01, 0x2b, 0x00}, {0x09, 0x01, 0x2b, 0x00},
+ {0x17, 0x01, 0x2b, 0x00}, {0x28, 0x01, 0x2b, 0x01}
+ },
+ /* 80 */
+ {
+ {0x03, 0x01, 0x27, 0x00}, {0x06, 0x01, 0x27, 0x00},
+ {0x0a, 0x01, 0x27, 0x00}, {0x0f, 0x01, 0x27, 0x00},
+ {0x18, 0x01, 0x27, 0x00}, {0x1f, 0x01, 0x27, 0x00},
+ {0x29, 0x01, 0x27, 0x00}, {0x38, 0x01, 0x27, 0x01},
+ {0x03, 0x01, 0x2b, 0x00}, {0x06, 0x01, 0x2b, 0x00},
+ {0x0a, 0x01, 0x2b, 0x00}, {0x0f, 0x01, 0x2b, 0x00},
+ {0x18, 0x01, 0x2b, 0x00}, {0x1f, 0x01, 0x2b, 0x00},
+ {0x29, 0x01, 0x2b, 0x00}, {0x38, 0x01, 0x2b, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x7c, 0x00}, {0x09, 0x01, 0x7c, 0x00},
+ {0x17, 0x01, 0x7c, 0x00}, {0x28, 0x01, 0x7c, 0x01},
+ {0x01, 0x01, 0x23, 0x00}, {0x16, 0x01, 0x23, 0x01},
+ {0x01, 0x01, 0x3e, 0x00}, {0x16, 0x01, 0x3e, 0x01},
+ {0x00, 0x01, 0x00, 0x01}, {0x00, 0x01, 0x24, 0x01},
+ {0x00, 0x01, 0x40, 0x01}, {0x00, 0x01, 0x5b, 0x01},
+ {0x00, 0x01, 0x5d, 0x01}, {0x00, 0x01, 0x7e, 0x01},
+ {0x5b, 0x00, 0x00, 0x00}, {0x5c, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x7c, 0x00}, {0x06, 0x01, 0x7c, 0x00},
+ {0x0a, 0x01, 0x7c, 0x00}, {0x0f, 0x01, 0x7c, 0x00},
+ {0x18, 0x01, 0x7c, 0x00}, {0x1f, 0x01, 0x7c, 0x00},
+ {0x29, 0x01, 0x7c, 0x00}, {0x38, 0x01, 0x7c, 0x01},
+ {0x02, 0x01, 0x23, 0x00}, {0x09, 0x01, 0x23, 0x00},
+ {0x17, 0x01, 0x23, 0x00}, {0x28, 0x01, 0x23, 0x01},
+ {0x02, 0x01, 0x3e, 0x00}, {0x09, 0x01, 0x3e, 0x00},
+ {0x17, 0x01, 0x3e, 0x00}, {0x28, 0x01, 0x3e, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x23, 0x00}, {0x06, 0x01, 0x23, 0x00},
+ {0x0a, 0x01, 0x23, 0x00}, {0x0f, 0x01, 0x23, 0x00},
+ {0x18, 0x01, 0x23, 0x00}, {0x1f, 0x01, 0x23, 0x00},
+ {0x29, 0x01, 0x23, 0x00}, {0x38, 0x01, 0x23, 0x01},
+ {0x03, 0x01, 0x3e, 0x00}, {0x06, 0x01, 0x3e, 0x00},
+ {0x0a, 0x01, 0x3e, 0x00}, {0x0f, 0x01, 0x3e, 0x00},
+ {0x18, 0x01, 0x3e, 0x00}, {0x1f, 0x01, 0x3e, 0x00},
+ {0x29, 0x01, 0x3e, 0x00}, {0x38, 0x01, 0x3e, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x00, 0x00}, {0x16, 0x01, 0x00, 0x01},
+ {0x01, 0x01, 0x24, 0x00}, {0x16, 0x01, 0x24, 0x01},
+ {0x01, 0x01, 0x40, 0x00}, {0x16, 0x01, 0x40, 0x01},
+ {0x01, 0x01, 0x5b, 0x00}, {0x16, 0x01, 0x5b, 0x01},
+ {0x01, 0x01, 0x5d, 0x00}, {0x16, 0x01, 0x5d, 0x01},
+ {0x01, 0x01, 0x7e, 0x00}, {0x16, 0x01, 0x7e, 0x01},
+ {0x00, 0x01, 0x5e, 0x01}, {0x00, 0x01, 0x7d, 0x01},
+ {0x5d, 0x00, 0x00, 0x00}, {0x5e, 0x00, 0x00, 0x01}
+ },
+ /* 85 */
+ {
+ {0x02, 0x01, 0x00, 0x00}, {0x09, 0x01, 0x00, 0x00},
+ {0x17, 0x01, 0x00, 0x00}, {0x28, 0x01, 0x00, 0x01},
+ {0x02, 0x01, 0x24, 0x00}, {0x09, 0x01, 0x24, 0x00},
+ {0x17, 0x01, 0x24, 0x00}, {0x28, 0x01, 0x24, 0x01},
+ {0x02, 0x01, 0x40, 0x00}, {0x09, 0x01, 0x40, 0x00},
+ {0x17, 0x01, 0x40, 0x00}, {0x28, 0x01, 0x40, 0x01},
+ {0x02, 0x01, 0x5b, 0x00}, {0x09, 0x01, 0x5b, 0x00},
+ {0x17, 0x01, 0x5b, 0x00}, {0x28, 0x01, 0x5b, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x00, 0x00}, {0x06, 0x01, 0x00, 0x00},
+ {0x0a, 0x01, 0x00, 0x00}, {0x0f, 0x01, 0x00, 0x00},
+ {0x18, 0x01, 0x00, 0x00}, {0x1f, 0x01, 0x00, 0x00},
+ {0x29, 0x01, 0x00, 0x00}, {0x38, 0x01, 0x00, 0x01},
+ {0x03, 0x01, 0x24, 0x00}, {0x06, 0x01, 0x24, 0x00},
+ {0x0a, 0x01, 0x24, 0x00}, {0x0f, 0x01, 0x24, 0x00},
+ {0x18, 0x01, 0x24, 0x00}, {0x1f, 0x01, 0x24, 0x00},
+ {0x29, 0x01, 0x24, 0x00}, {0x38, 0x01, 0x24, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x40, 0x00}, {0x06, 0x01, 0x40, 0x00},
+ {0x0a, 0x01, 0x40, 0x00}, {0x0f, 0x01, 0x40, 0x00},
+ {0x18, 0x01, 0x40, 0x00}, {0x1f, 0x01, 0x40, 0x00},
+ {0x29, 0x01, 0x40, 0x00}, {0x38, 0x01, 0x40, 0x01},
+ {0x03, 0x01, 0x5b, 0x00}, {0x06, 0x01, 0x5b, 0x00},
+ {0x0a, 0x01, 0x5b, 0x00}, {0x0f, 0x01, 0x5b, 0x00},
+ {0x18, 0x01, 0x5b, 0x00}, {0x1f, 0x01, 0x5b, 0x00},
+ {0x29, 0x01, 0x5b, 0x00}, {0x38, 0x01, 0x5b, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x5d, 0x00}, {0x09, 0x01, 0x5d, 0x00},
+ {0x17, 0x01, 0x5d, 0x00}, {0x28, 0x01, 0x5d, 0x01},
+ {0x02, 0x01, 0x7e, 0x00}, {0x09, 0x01, 0x7e, 0x00},
+ {0x17, 0x01, 0x7e, 0x00}, {0x28, 0x01, 0x7e, 0x01},
+ {0x01, 0x01, 0x5e, 0x00}, {0x16, 0x01, 0x5e, 0x01},
+ {0x01, 0x01, 0x7d, 0x00}, {0x16, 0x01, 0x7d, 0x01},
+ {0x00, 0x01, 0x3c, 0x01}, {0x00, 0x01, 0x60, 0x01},
+ {0x00, 0x01, 0x7b, 0x01}, {0x5f, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x5d, 0x00}, {0x06, 0x01, 0x5d, 0x00},
+ {0x0a, 0x01, 0x5d, 0x00}, {0x0f, 0x01, 0x5d, 0x00},
+ {0x18, 0x01, 0x5d, 0x00}, {0x1f, 0x01, 0x5d, 0x00},
+ {0x29, 0x01, 0x5d, 0x00}, {0x38, 0x01, 0x5d, 0x01},
+ {0x03, 0x01, 0x7e, 0x00}, {0x06, 0x01, 0x7e, 0x00},
+ {0x0a, 0x01, 0x7e, 0x00}, {0x0f, 0x01, 0x7e, 0x00},
+ {0x18, 0x01, 0x7e, 0x00}, {0x1f, 0x01, 0x7e, 0x00},
+ {0x29, 0x01, 0x7e, 0x00}, {0x38, 0x01, 0x7e, 0x01}
+ },
+ /* 90 */
+ {
+ {0x02, 0x01, 0x5e, 0x00}, {0x09, 0x01, 0x5e, 0x00},
+ {0x17, 0x01, 0x5e, 0x00}, {0x28, 0x01, 0x5e, 0x01},
+ {0x02, 0x01, 0x7d, 0x00}, {0x09, 0x01, 0x7d, 0x00},
+ {0x17, 0x01, 0x7d, 0x00}, {0x28, 0x01, 0x7d, 0x01},
+ {0x01, 0x01, 0x3c, 0x00}, {0x16, 0x01, 0x3c, 0x01},
+ {0x01, 0x01, 0x60, 0x00}, {0x16, 0x01, 0x60, 0x01},
+ {0x01, 0x01, 0x7b, 0x00}, {0x16, 0x01, 0x7b, 0x01},
+ {0x60, 0x00, 0x00, 0x00}, {0x6e, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x5e, 0x00}, {0x06, 0x01, 0x5e, 0x00},
+ {0x0a, 0x01, 0x5e, 0x00}, {0x0f, 0x01, 0x5e, 0x00},
+ {0x18, 0x01, 0x5e, 0x00}, {0x1f, 0x01, 0x5e, 0x00},
+ {0x29, 0x01, 0x5e, 0x00}, {0x38, 0x01, 0x5e, 0x01},
+ {0x03, 0x01, 0x7d, 0x00}, {0x06, 0x01, 0x7d, 0x00},
+ {0x0a, 0x01, 0x7d, 0x00}, {0x0f, 0x01, 0x7d, 0x00},
+ {0x18, 0x01, 0x7d, 0x00}, {0x1f, 0x01, 0x7d, 0x00},
+ {0x29, 0x01, 0x7d, 0x00}, {0x38, 0x01, 0x7d, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x3c, 0x00}, {0x09, 0x01, 0x3c, 0x00},
+ {0x17, 0x01, 0x3c, 0x00}, {0x28, 0x01, 0x3c, 0x01},
+ {0x02, 0x01, 0x60, 0x00}, {0x09, 0x01, 0x60, 0x00},
+ {0x17, 0x01, 0x60, 0x00}, {0x28, 0x01, 0x60, 0x01},
+ {0x02, 0x01, 0x7b, 0x00}, {0x09, 0x01, 0x7b, 0x00},
+ {0x17, 0x01, 0x7b, 0x00}, {0x28, 0x01, 0x7b, 0x01},
+ {0x61, 0x00, 0x00, 0x00}, {0x65, 0x00, 0x00, 0x00},
+ {0x6f, 0x00, 0x00, 0x00}, {0x85, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x3c, 0x00}, {0x06, 0x01, 0x3c, 0x00},
+ {0x0a, 0x01, 0x3c, 0x00}, {0x0f, 0x01, 0x3c, 0x00},
+ {0x18, 0x01, 0x3c, 0x00}, {0x1f, 0x01, 0x3c, 0x00},
+ {0x29, 0x01, 0x3c, 0x00}, {0x38, 0x01, 0x3c, 0x01},
+ {0x03, 0x01, 0x60, 0x00}, {0x06, 0x01, 0x60, 0x00},
+ {0x0a, 0x01, 0x60, 0x00}, {0x0f, 0x01, 0x60, 0x00},
+ {0x18, 0x01, 0x60, 0x00}, {0x1f, 0x01, 0x60, 0x00},
+ {0x29, 0x01, 0x60, 0x00}, {0x38, 0x01, 0x60, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x7b, 0x00}, {0x06, 0x01, 0x7b, 0x00},
+ {0x0a, 0x01, 0x7b, 0x00}, {0x0f, 0x01, 0x7b, 0x00},
+ {0x18, 0x01, 0x7b, 0x00}, {0x1f, 0x01, 0x7b, 0x00},
+ {0x29, 0x01, 0x7b, 0x00}, {0x38, 0x01, 0x7b, 0x01},
+ {0x62, 0x00, 0x00, 0x00}, {0x63, 0x00, 0x00, 0x00},
+ {0x66, 0x00, 0x00, 0x00}, {0x69, 0x00, 0x00, 0x00},
+ {0x70, 0x00, 0x00, 0x00}, {0x77, 0x00, 0x00, 0x00},
+ {0x86, 0x00, 0x00, 0x00}, {0x99, 0x00, 0x00, 0x01}
+ },
+ /* 95 */
+ {
+ {0x00, 0x01, 0x5c, 0x01}, {0x00, 0x01, 0xc3, 0x01},
+ {0x00, 0x01, 0xd0, 0x01}, {0x64, 0x00, 0x00, 0x00},
+ {0x67, 0x00, 0x00, 0x00}, {0x68, 0x00, 0x00, 0x00},
+ {0x6a, 0x00, 0x00, 0x00}, {0x6b, 0x00, 0x00, 0x00},
+ {0x71, 0x00, 0x00, 0x00}, {0x74, 0x00, 0x00, 0x00},
+ {0x78, 0x00, 0x00, 0x00}, {0x7e, 0x00, 0x00, 0x00},
+ {0x87, 0x00, 0x00, 0x00}, {0x8e, 0x00, 0x00, 0x00},
+ {0x9a, 0x00, 0x00, 0x00}, {0xa9, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x5c, 0x00}, {0x16, 0x01, 0x5c, 0x01},
+ {0x01, 0x01, 0xc3, 0x00}, {0x16, 0x01, 0xc3, 0x01},
+ {0x01, 0x01, 0xd0, 0x00}, {0x16, 0x01, 0xd0, 0x01},
+ {0x00, 0x01, 0x80, 0x01}, {0x00, 0x01, 0x82, 0x01},
+ {0x00, 0x01, 0x83, 0x01}, {0x00, 0x01, 0xa2, 0x01},
+ {0x00, 0x01, 0xb8, 0x01}, {0x00, 0x01, 0xc2, 0x01},
+ {0x00, 0x01, 0xe0, 0x01}, {0x00, 0x01, 0xe2, 0x01},
+ {0x6c, 0x00, 0x00, 0x00}, {0x6d, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x02, 0x01, 0x5c, 0x00}, {0x09, 0x01, 0x5c, 0x00},
+ {0x17, 0x01, 0x5c, 0x00}, {0x28, 0x01, 0x5c, 0x01},
+ {0x02, 0x01, 0xc3, 0x00}, {0x09, 0x01, 0xc3, 0x00},
+ {0x17, 0x01, 0xc3, 0x00}, {0x28, 0x01, 0xc3, 0x01},
+ {0x02, 0x01, 0xd0, 0x00}, {0x09, 0x01, 0xd0, 0x00},
+ {0x17, 0x01, 0xd0, 0x00}, {0x28, 0x01, 0xd0, 0x01},
+ {0x01, 0x01, 0x80, 0x00}, {0x16, 0x01, 0x80, 0x01},
+ {0x01, 0x01, 0x82, 0x00}, {0x16, 0x01, 0x82, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x5c, 0x00}, {0x06, 0x01, 0x5c, 0x00},
+ {0x0a, 0x01, 0x5c, 0x00}, {0x0f, 0x01, 0x5c, 0x00},
+ {0x18, 0x01, 0x5c, 0x00}, {0x1f, 0x01, 0x5c, 0x00},
+ {0x29, 0x01, 0x5c, 0x00}, {0x38, 0x01, 0x5c, 0x01},
+ {0x03, 0x01, 0xc3, 0x00}, {0x06, 0x01, 0xc3, 0x00},
+ {0x0a, 0x01, 0xc3, 0x00}, {0x0f, 0x01, 0xc3, 0x00},
+ {0x18, 0x01, 0xc3, 0x00}, {0x1f, 0x01, 0xc3, 0x00},
+ {0x29, 0x01, 0xc3, 0x00}, {0x38, 0x01, 0xc3, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xd0, 0x00}, {0x06, 0x01, 0xd0, 0x00},
+ {0x0a, 0x01, 0xd0, 0x00}, {0x0f, 0x01, 0xd0, 0x00},
+ {0x18, 0x01, 0xd0, 0x00}, {0x1f, 0x01, 0xd0, 0x00},
+ {0x29, 0x01, 0xd0, 0x00}, {0x38, 0x01, 0xd0, 0x01},
+ {0x02, 0x01, 0x80, 0x00}, {0x09, 0x01, 0x80, 0x00},
+ {0x17, 0x01, 0x80, 0x00}, {0x28, 0x01, 0x80, 0x01},
+ {0x02, 0x01, 0x82, 0x00}, {0x09, 0x01, 0x82, 0x00},
+ {0x17, 0x01, 0x82, 0x00}, {0x28, 0x01, 0x82, 0x01}
+ },
+ /* 100 */
+ {
+ {0x03, 0x01, 0x80, 0x00}, {0x06, 0x01, 0x80, 0x00},
+ {0x0a, 0x01, 0x80, 0x00}, {0x0f, 0x01, 0x80, 0x00},
+ {0x18, 0x01, 0x80, 0x00}, {0x1f, 0x01, 0x80, 0x00},
+ {0x29, 0x01, 0x80, 0x00}, {0x38, 0x01, 0x80, 0x01},
+ {0x03, 0x01, 0x82, 0x00}, {0x06, 0x01, 0x82, 0x00},
+ {0x0a, 0x01, 0x82, 0x00}, {0x0f, 0x01, 0x82, 0x00},
+ {0x18, 0x01, 0x82, 0x00}, {0x1f, 0x01, 0x82, 0x00},
+ {0x29, 0x01, 0x82, 0x00}, {0x38, 0x01, 0x82, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x83, 0x00}, {0x16, 0x01, 0x83, 0x01},
+ {0x01, 0x01, 0xa2, 0x00}, {0x16, 0x01, 0xa2, 0x01},
+ {0x01, 0x01, 0xb8, 0x00}, {0x16, 0x01, 0xb8, 0x01},
+ {0x01, 0x01, 0xc2, 0x00}, {0x16, 0x01, 0xc2, 0x01},
+ {0x01, 0x01, 0xe0, 0x00}, {0x16, 0x01, 0xe0, 0x01},
+ {0x01, 0x01, 0xe2, 0x00}, {0x16, 0x01, 0xe2, 0x01},
+ {0x00, 0x01, 0x99, 0x01}, {0x00, 0x01, 0xa1, 0x01},
+ {0x00, 0x01, 0xa7, 0x01}, {0x00, 0x01, 0xac, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x83, 0x00}, {0x09, 0x01, 0x83, 0x00},
+ {0x17, 0x01, 0x83, 0x00}, {0x28, 0x01, 0x83, 0x01},
+ {0x02, 0x01, 0xa2, 0x00}, {0x09, 0x01, 0xa2, 0x00},
+ {0x17, 0x01, 0xa2, 0x00}, {0x28, 0x01, 0xa2, 0x01},
+ {0x02, 0x01, 0xb8, 0x00}, {0x09, 0x01, 0xb8, 0x00},
+ {0x17, 0x01, 0xb8, 0x00}, {0x28, 0x01, 0xb8, 0x01},
+ {0x02, 0x01, 0xc2, 0x00}, {0x09, 0x01, 0xc2, 0x00},
+ {0x17, 0x01, 0xc2, 0x00}, {0x28, 0x01, 0xc2, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x83, 0x00}, {0x06, 0x01, 0x83, 0x00},
+ {0x0a, 0x01, 0x83, 0x00}, {0x0f, 0x01, 0x83, 0x00},
+ {0x18, 0x01, 0x83, 0x00}, {0x1f, 0x01, 0x83, 0x00},
+ {0x29, 0x01, 0x83, 0x00}, {0x38, 0x01, 0x83, 0x01},
+ {0x03, 0x01, 0xa2, 0x00}, {0x06, 0x01, 0xa2, 0x00},
+ {0x0a, 0x01, 0xa2, 0x00}, {0x0f, 0x01, 0xa2, 0x00},
+ {0x18, 0x01, 0xa2, 0x00}, {0x1f, 0x01, 0xa2, 0x00},
+ {0x29, 0x01, 0xa2, 0x00}, {0x38, 0x01, 0xa2, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xb8, 0x00}, {0x06, 0x01, 0xb8, 0x00},
+ {0x0a, 0x01, 0xb8, 0x00}, {0x0f, 0x01, 0xb8, 0x00},
+ {0x18, 0x01, 0xb8, 0x00}, {0x1f, 0x01, 0xb8, 0x00},
+ {0x29, 0x01, 0xb8, 0x00}, {0x38, 0x01, 0xb8, 0x01},
+ {0x03, 0x01, 0xc2, 0x00}, {0x06, 0x01, 0xc2, 0x00},
+ {0x0a, 0x01, 0xc2, 0x00}, {0x0f, 0x01, 0xc2, 0x00},
+ {0x18, 0x01, 0xc2, 0x00}, {0x1f, 0x01, 0xc2, 0x00},
+ {0x29, 0x01, 0xc2, 0x00}, {0x38, 0x01, 0xc2, 0x01}
+ },
+ /* 105 */
+ {
+ {0x02, 0x01, 0xe0, 0x00}, {0x09, 0x01, 0xe0, 0x00},
+ {0x17, 0x01, 0xe0, 0x00}, {0x28, 0x01, 0xe0, 0x01},
+ {0x02, 0x01, 0xe2, 0x00}, {0x09, 0x01, 0xe2, 0x00},
+ {0x17, 0x01, 0xe2, 0x00}, {0x28, 0x01, 0xe2, 0x01},
+ {0x01, 0x01, 0x99, 0x00}, {0x16, 0x01, 0x99, 0x01},
+ {0x01, 0x01, 0xa1, 0x00}, {0x16, 0x01, 0xa1, 0x01},
+ {0x01, 0x01, 0xa7, 0x00}, {0x16, 0x01, 0xa7, 0x01},
+ {0x01, 0x01, 0xac, 0x00}, {0x16, 0x01, 0xac, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xe0, 0x00}, {0x06, 0x01, 0xe0, 0x00},
+ {0x0a, 0x01, 0xe0, 0x00}, {0x0f, 0x01, 0xe0, 0x00},
+ {0x18, 0x01, 0xe0, 0x00}, {0x1f, 0x01, 0xe0, 0x00},
+ {0x29, 0x01, 0xe0, 0x00}, {0x38, 0x01, 0xe0, 0x01},
+ {0x03, 0x01, 0xe2, 0x00}, {0x06, 0x01, 0xe2, 0x00},
+ {0x0a, 0x01, 0xe2, 0x00}, {0x0f, 0x01, 0xe2, 0x00},
+ {0x18, 0x01, 0xe2, 0x00}, {0x1f, 0x01, 0xe2, 0x00},
+ {0x29, 0x01, 0xe2, 0x00}, {0x38, 0x01, 0xe2, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x99, 0x00}, {0x09, 0x01, 0x99, 0x00},
+ {0x17, 0x01, 0x99, 0x00}, {0x28, 0x01, 0x99, 0x01},
+ {0x02, 0x01, 0xa1, 0x00}, {0x09, 0x01, 0xa1, 0x00},
+ {0x17, 0x01, 0xa1, 0x00}, {0x28, 0x01, 0xa1, 0x01},
+ {0x02, 0x01, 0xa7, 0x00}, {0x09, 0x01, 0xa7, 0x00},
+ {0x17, 0x01, 0xa7, 0x00}, {0x28, 0x01, 0xa7, 0x01},
+ {0x02, 0x01, 0xac, 0x00}, {0x09, 0x01, 0xac, 0x00},
+ {0x17, 0x01, 0xac, 0x00}, {0x28, 0x01, 0xac, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x99, 0x00}, {0x06, 0x01, 0x99, 0x00},
+ {0x0a, 0x01, 0x99, 0x00}, {0x0f, 0x01, 0x99, 0x00},
+ {0x18, 0x01, 0x99, 0x00}, {0x1f, 0x01, 0x99, 0x00},
+ {0x29, 0x01, 0x99, 0x00}, {0x38, 0x01, 0x99, 0x01},
+ {0x03, 0x01, 0xa1, 0x00}, {0x06, 0x01, 0xa1, 0x00},
+ {0x0a, 0x01, 0xa1, 0x00}, {0x0f, 0x01, 0xa1, 0x00},
+ {0x18, 0x01, 0xa1, 0x00}, {0x1f, 0x01, 0xa1, 0x00},
+ {0x29, 0x01, 0xa1, 0x00}, {0x38, 0x01, 0xa1, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xa7, 0x00}, {0x06, 0x01, 0xa7, 0x00},
+ {0x0a, 0x01, 0xa7, 0x00}, {0x0f, 0x01, 0xa7, 0x00},
+ {0x18, 0x01, 0xa7, 0x00}, {0x1f, 0x01, 0xa7, 0x00},
+ {0x29, 0x01, 0xa7, 0x00}, {0x38, 0x01, 0xa7, 0x01},
+ {0x03, 0x01, 0xac, 0x00}, {0x06, 0x01, 0xac, 0x00},
+ {0x0a, 0x01, 0xac, 0x00}, {0x0f, 0x01, 0xac, 0x00},
+ {0x18, 0x01, 0xac, 0x00}, {0x1f, 0x01, 0xac, 0x00},
+ {0x29, 0x01, 0xac, 0x00}, {0x38, 0x01, 0xac, 0x01}
+ },
+ /* 110 */
+ {
+ {0x72, 0x00, 0x00, 0x00}, {0x73, 0x00, 0x00, 0x00},
+ {0x75, 0x00, 0x00, 0x00}, {0x76, 0x00, 0x00, 0x00},
+ {0x79, 0x00, 0x00, 0x00}, {0x7b, 0x00, 0x00, 0x00},
+ {0x7f, 0x00, 0x00, 0x00}, {0x82, 0x00, 0x00, 0x00},
+ {0x88, 0x00, 0x00, 0x00}, {0x8b, 0x00, 0x00, 0x00},
+ {0x8f, 0x00, 0x00, 0x00}, {0x92, 0x00, 0x00, 0x00},
+ {0x9b, 0x00, 0x00, 0x00}, {0xa2, 0x00, 0x00, 0x00},
+ {0xaa, 0x00, 0x00, 0x00}, {0xb4, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0xb0, 0x01}, {0x00, 0x01, 0xb1, 0x01},
+ {0x00, 0x01, 0xb3, 0x01}, {0x00, 0x01, 0xd1, 0x01},
+ {0x00, 0x01, 0xd8, 0x01}, {0x00, 0x01, 0xd9, 0x01},
+ {0x00, 0x01, 0xe3, 0x01}, {0x00, 0x01, 0xe5, 0x01},
+ {0x00, 0x01, 0xe6, 0x01}, {0x7a, 0x00, 0x00, 0x00},
+ {0x7c, 0x00, 0x00, 0x00}, {0x7d, 0x00, 0x00, 0x00},
+ {0x80, 0x00, 0x00, 0x00}, {0x81, 0x00, 0x00, 0x00},
+ {0x83, 0x00, 0x00, 0x00}, {0x84, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x01, 0x01, 0xb0, 0x00}, {0x16, 0x01, 0xb0, 0x01},
+ {0x01, 0x01, 0xb1, 0x00}, {0x16, 0x01, 0xb1, 0x01},
+ {0x01, 0x01, 0xb3, 0x00}, {0x16, 0x01, 0xb3, 0x01},
+ {0x01, 0x01, 0xd1, 0x00}, {0x16, 0x01, 0xd1, 0x01},
+ {0x01, 0x01, 0xd8, 0x00}, {0x16, 0x01, 0xd8, 0x01},
+ {0x01, 0x01, 0xd9, 0x00}, {0x16, 0x01, 0xd9, 0x01},
+ {0x01, 0x01, 0xe3, 0x00}, {0x16, 0x01, 0xe3, 0x01},
+ {0x01, 0x01, 0xe5, 0x00}, {0x16, 0x01, 0xe5, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xb0, 0x00}, {0x09, 0x01, 0xb0, 0x00},
+ {0x17, 0x01, 0xb0, 0x00}, {0x28, 0x01, 0xb0, 0x01},
+ {0x02, 0x01, 0xb1, 0x00}, {0x09, 0x01, 0xb1, 0x00},
+ {0x17, 0x01, 0xb1, 0x00}, {0x28, 0x01, 0xb1, 0x01},
+ {0x02, 0x01, 0xb3, 0x00}, {0x09, 0x01, 0xb3, 0x00},
+ {0x17, 0x01, 0xb3, 0x00}, {0x28, 0x01, 0xb3, 0x01},
+ {0x02, 0x01, 0xd1, 0x00}, {0x09, 0x01, 0xd1, 0x00},
+ {0x17, 0x01, 0xd1, 0x00}, {0x28, 0x01, 0xd1, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xb0, 0x00}, {0x06, 0x01, 0xb0, 0x00},
+ {0x0a, 0x01, 0xb0, 0x00}, {0x0f, 0x01, 0xb0, 0x00},
+ {0x18, 0x01, 0xb0, 0x00}, {0x1f, 0x01, 0xb0, 0x00},
+ {0x29, 0x01, 0xb0, 0x00}, {0x38, 0x01, 0xb0, 0x01},
+ {0x03, 0x01, 0xb1, 0x00}, {0x06, 0x01, 0xb1, 0x00},
+ {0x0a, 0x01, 0xb1, 0x00}, {0x0f, 0x01, 0xb1, 0x00},
+ {0x18, 0x01, 0xb1, 0x00}, {0x1f, 0x01, 0xb1, 0x00},
+ {0x29, 0x01, 0xb1, 0x00}, {0x38, 0x01, 0xb1, 0x01}
+ },
+ /* 115 */
+ {
+ {0x03, 0x01, 0xb3, 0x00}, {0x06, 0x01, 0xb3, 0x00},
+ {0x0a, 0x01, 0xb3, 0x00}, {0x0f, 0x01, 0xb3, 0x00},
+ {0x18, 0x01, 0xb3, 0x00}, {0x1f, 0x01, 0xb3, 0x00},
+ {0x29, 0x01, 0xb3, 0x00}, {0x38, 0x01, 0xb3, 0x01},
+ {0x03, 0x01, 0xd1, 0x00}, {0x06, 0x01, 0xd1, 0x00},
+ {0x0a, 0x01, 0xd1, 0x00}, {0x0f, 0x01, 0xd1, 0x00},
+ {0x18, 0x01, 0xd1, 0x00}, {0x1f, 0x01, 0xd1, 0x00},
+ {0x29, 0x01, 0xd1, 0x00}, {0x38, 0x01, 0xd1, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xd8, 0x00}, {0x09, 0x01, 0xd8, 0x00},
+ {0x17, 0x01, 0xd8, 0x00}, {0x28, 0x01, 0xd8, 0x01},
+ {0x02, 0x01, 0xd9, 0x00}, {0x09, 0x01, 0xd9, 0x00},
+ {0x17, 0x01, 0xd9, 0x00}, {0x28, 0x01, 0xd9, 0x01},
+ {0x02, 0x01, 0xe3, 0x00}, {0x09, 0x01, 0xe3, 0x00},
+ {0x17, 0x01, 0xe3, 0x00}, {0x28, 0x01, 0xe3, 0x01},
+ {0x02, 0x01, 0xe5, 0x00}, {0x09, 0x01, 0xe5, 0x00},
+ {0x17, 0x01, 0xe5, 0x00}, {0x28, 0x01, 0xe5, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xd8, 0x00}, {0x06, 0x01, 0xd8, 0x00},
+ {0x0a, 0x01, 0xd8, 0x00}, {0x0f, 0x01, 0xd8, 0x00},
+ {0x18, 0x01, 0xd8, 0x00}, {0x1f, 0x01, 0xd8, 0x00},
+ {0x29, 0x01, 0xd8, 0x00}, {0x38, 0x01, 0xd8, 0x01},
+ {0x03, 0x01, 0xd9, 0x00}, {0x06, 0x01, 0xd9, 0x00},
+ {0x0a, 0x01, 0xd9, 0x00}, {0x0f, 0x01, 0xd9, 0x00},
+ {0x18, 0x01, 0xd9, 0x00}, {0x1f, 0x01, 0xd9, 0x00},
+ {0x29, 0x01, 0xd9, 0x00}, {0x38, 0x01, 0xd9, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xe3, 0x00}, {0x06, 0x01, 0xe3, 0x00},
+ {0x0a, 0x01, 0xe3, 0x00}, {0x0f, 0x01, 0xe3, 0x00},
+ {0x18, 0x01, 0xe3, 0x00}, {0x1f, 0x01, 0xe3, 0x00},
+ {0x29, 0x01, 0xe3, 0x00}, {0x38, 0x01, 0xe3, 0x01},
+ {0x03, 0x01, 0xe5, 0x00}, {0x06, 0x01, 0xe5, 0x00},
+ {0x0a, 0x01, 0xe5, 0x00}, {0x0f, 0x01, 0xe5, 0x00},
+ {0x18, 0x01, 0xe5, 0x00}, {0x1f, 0x01, 0xe5, 0x00},
+ {0x29, 0x01, 0xe5, 0x00}, {0x38, 0x01, 0xe5, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xe6, 0x00}, {0x16, 0x01, 0xe6, 0x01},
+ {0x00, 0x01, 0x81, 0x01}, {0x00, 0x01, 0x84, 0x01},
+ {0x00, 0x01, 0x85, 0x01}, {0x00, 0x01, 0x86, 0x01},
+ {0x00, 0x01, 0x88, 0x01}, {0x00, 0x01, 0x92, 0x01},
+ {0x00, 0x01, 0x9a, 0x01}, {0x00, 0x01, 0x9c, 0x01},
+ {0x00, 0x01, 0xa0, 0x01}, {0x00, 0x01, 0xa3, 0x01},
+ {0x00, 0x01, 0xa4, 0x01}, {0x00, 0x01, 0xa9, 0x01},
+ {0x00, 0x01, 0xaa, 0x01}, {0x00, 0x01, 0xad, 0x01}
+ },
+ /* 120 */
+ {
+ {0x02, 0x01, 0xe6, 0x00}, {0x09, 0x01, 0xe6, 0x00},
+ {0x17, 0x01, 0xe6, 0x00}, {0x28, 0x01, 0xe6, 0x01},
+ {0x01, 0x01, 0x81, 0x00}, {0x16, 0x01, 0x81, 0x01},
+ {0x01, 0x01, 0x84, 0x00}, {0x16, 0x01, 0x84, 0x01},
+ {0x01, 0x01, 0x85, 0x00}, {0x16, 0x01, 0x85, 0x01},
+ {0x01, 0x01, 0x86, 0x00}, {0x16, 0x01, 0x86, 0x01},
+ {0x01, 0x01, 0x88, 0x00}, {0x16, 0x01, 0x88, 0x01},
+ {0x01, 0x01, 0x92, 0x00}, {0x16, 0x01, 0x92, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xe6, 0x00}, {0x06, 0x01, 0xe6, 0x00},
+ {0x0a, 0x01, 0xe6, 0x00}, {0x0f, 0x01, 0xe6, 0x00},
+ {0x18, 0x01, 0xe6, 0x00}, {0x1f, 0x01, 0xe6, 0x00},
+ {0x29, 0x01, 0xe6, 0x00}, {0x38, 0x01, 0xe6, 0x01},
+ {0x02, 0x01, 0x81, 0x00}, {0x09, 0x01, 0x81, 0x00},
+ {0x17, 0x01, 0x81, 0x00}, {0x28, 0x01, 0x81, 0x01},
+ {0x02, 0x01, 0x84, 0x00}, {0x09, 0x01, 0x84, 0x00},
+ {0x17, 0x01, 0x84, 0x00}, {0x28, 0x01, 0x84, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x81, 0x00}, {0x06, 0x01, 0x81, 0x00},
+ {0x0a, 0x01, 0x81, 0x00}, {0x0f, 0x01, 0x81, 0x00},
+ {0x18, 0x01, 0x81, 0x00}, {0x1f, 0x01, 0x81, 0x00},
+ {0x29, 0x01, 0x81, 0x00}, {0x38, 0x01, 0x81, 0x01},
+ {0x03, 0x01, 0x84, 0x00}, {0x06, 0x01, 0x84, 0x00},
+ {0x0a, 0x01, 0x84, 0x00}, {0x0f, 0x01, 0x84, 0x00},
+ {0x18, 0x01, 0x84, 0x00}, {0x1f, 0x01, 0x84, 0x00},
+ {0x29, 0x01, 0x84, 0x00}, {0x38, 0x01, 0x84, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x85, 0x00}, {0x09, 0x01, 0x85, 0x00},
+ {0x17, 0x01, 0x85, 0x00}, {0x28, 0x01, 0x85, 0x01},
+ {0x02, 0x01, 0x86, 0x00}, {0x09, 0x01, 0x86, 0x00},
+ {0x17, 0x01, 0x86, 0x00}, {0x28, 0x01, 0x86, 0x01},
+ {0x02, 0x01, 0x88, 0x00}, {0x09, 0x01, 0x88, 0x00},
+ {0x17, 0x01, 0x88, 0x00}, {0x28, 0x01, 0x88, 0x01},
+ {0x02, 0x01, 0x92, 0x00}, {0x09, 0x01, 0x92, 0x00},
+ {0x17, 0x01, 0x92, 0x00}, {0x28, 0x01, 0x92, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x85, 0x00}, {0x06, 0x01, 0x85, 0x00},
+ {0x0a, 0x01, 0x85, 0x00}, {0x0f, 0x01, 0x85, 0x00},
+ {0x18, 0x01, 0x85, 0x00}, {0x1f, 0x01, 0x85, 0x00},
+ {0x29, 0x01, 0x85, 0x00}, {0x38, 0x01, 0x85, 0x01},
+ {0x03, 0x01, 0x86, 0x00}, {0x06, 0x01, 0x86, 0x00},
+ {0x0a, 0x01, 0x86, 0x00}, {0x0f, 0x01, 0x86, 0x00},
+ {0x18, 0x01, 0x86, 0x00}, {0x1f, 0x01, 0x86, 0x00},
+ {0x29, 0x01, 0x86, 0x00}, {0x38, 0x01, 0x86, 0x01}
+ },
+ /* 125 */
+ {
+ {0x03, 0x01, 0x88, 0x00}, {0x06, 0x01, 0x88, 0x00},
+ {0x0a, 0x01, 0x88, 0x00}, {0x0f, 0x01, 0x88, 0x00},
+ {0x18, 0x01, 0x88, 0x00}, {0x1f, 0x01, 0x88, 0x00},
+ {0x29, 0x01, 0x88, 0x00}, {0x38, 0x01, 0x88, 0x01},
+ {0x03, 0x01, 0x92, 0x00}, {0x06, 0x01, 0x92, 0x00},
+ {0x0a, 0x01, 0x92, 0x00}, {0x0f, 0x01, 0x92, 0x00},
+ {0x18, 0x01, 0x92, 0x00}, {0x1f, 0x01, 0x92, 0x00},
+ {0x29, 0x01, 0x92, 0x00}, {0x38, 0x01, 0x92, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x9a, 0x00}, {0x16, 0x01, 0x9a, 0x01},
+ {0x01, 0x01, 0x9c, 0x00}, {0x16, 0x01, 0x9c, 0x01},
+ {0x01, 0x01, 0xa0, 0x00}, {0x16, 0x01, 0xa0, 0x01},
+ {0x01, 0x01, 0xa3, 0x00}, {0x16, 0x01, 0xa3, 0x01},
+ {0x01, 0x01, 0xa4, 0x00}, {0x16, 0x01, 0xa4, 0x01},
+ {0x01, 0x01, 0xa9, 0x00}, {0x16, 0x01, 0xa9, 0x01},
+ {0x01, 0x01, 0xaa, 0x00}, {0x16, 0x01, 0xaa, 0x01},
+ {0x01, 0x01, 0xad, 0x00}, {0x16, 0x01, 0xad, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x9a, 0x00}, {0x09, 0x01, 0x9a, 0x00},
+ {0x17, 0x01, 0x9a, 0x00}, {0x28, 0x01, 0x9a, 0x01},
+ {0x02, 0x01, 0x9c, 0x00}, {0x09, 0x01, 0x9c, 0x00},
+ {0x17, 0x01, 0x9c, 0x00}, {0x28, 0x01, 0x9c, 0x01},
+ {0x02, 0x01, 0xa0, 0x00}, {0x09, 0x01, 0xa0, 0x00},
+ {0x17, 0x01, 0xa0, 0x00}, {0x28, 0x01, 0xa0, 0x01},
+ {0x02, 0x01, 0xa3, 0x00}, {0x09, 0x01, 0xa3, 0x00},
+ {0x17, 0x01, 0xa3, 0x00}, {0x28, 0x01, 0xa3, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x9a, 0x00}, {0x06, 0x01, 0x9a, 0x00},
+ {0x0a, 0x01, 0x9a, 0x00}, {0x0f, 0x01, 0x9a, 0x00},
+ {0x18, 0x01, 0x9a, 0x00}, {0x1f, 0x01, 0x9a, 0x00},
+ {0x29, 0x01, 0x9a, 0x00}, {0x38, 0x01, 0x9a, 0x01},
+ {0x03, 0x01, 0x9c, 0x00}, {0x06, 0x01, 0x9c, 0x00},
+ {0x0a, 0x01, 0x9c, 0x00}, {0x0f, 0x01, 0x9c, 0x00},
+ {0x18, 0x01, 0x9c, 0x00}, {0x1f, 0x01, 0x9c, 0x00},
+ {0x29, 0x01, 0x9c, 0x00}, {0x38, 0x01, 0x9c, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xa0, 0x00}, {0x06, 0x01, 0xa0, 0x00},
+ {0x0a, 0x01, 0xa0, 0x00}, {0x0f, 0x01, 0xa0, 0x00},
+ {0x18, 0x01, 0xa0, 0x00}, {0x1f, 0x01, 0xa0, 0x00},
+ {0x29, 0x01, 0xa0, 0x00}, {0x38, 0x01, 0xa0, 0x01},
+ {0x03, 0x01, 0xa3, 0x00}, {0x06, 0x01, 0xa3, 0x00},
+ {0x0a, 0x01, 0xa3, 0x00}, {0x0f, 0x01, 0xa3, 0x00},
+ {0x18, 0x01, 0xa3, 0x00}, {0x1f, 0x01, 0xa3, 0x00},
+ {0x29, 0x01, 0xa3, 0x00}, {0x38, 0x01, 0xa3, 0x01}
+ },
+ /* 130 */
+ {
+ {0x02, 0x01, 0xa4, 0x00}, {0x09, 0x01, 0xa4, 0x00},
+ {0x17, 0x01, 0xa4, 0x00}, {0x28, 0x01, 0xa4, 0x01},
+ {0x02, 0x01, 0xa9, 0x00}, {0x09, 0x01, 0xa9, 0x00},
+ {0x17, 0x01, 0xa9, 0x00}, {0x28, 0x01, 0xa9, 0x01},
+ {0x02, 0x01, 0xaa, 0x00}, {0x09, 0x01, 0xaa, 0x00},
+ {0x17, 0x01, 0xaa, 0x00}, {0x28, 0x01, 0xaa, 0x01},
+ {0x02, 0x01, 0xad, 0x00}, {0x09, 0x01, 0xad, 0x00},
+ {0x17, 0x01, 0xad, 0x00}, {0x28, 0x01, 0xad, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xa4, 0x00}, {0x06, 0x01, 0xa4, 0x00},
+ {0x0a, 0x01, 0xa4, 0x00}, {0x0f, 0x01, 0xa4, 0x00},
+ {0x18, 0x01, 0xa4, 0x00}, {0x1f, 0x01, 0xa4, 0x00},
+ {0x29, 0x01, 0xa4, 0x00}, {0x38, 0x01, 0xa4, 0x01},
+ {0x03, 0x01, 0xa9, 0x00}, {0x06, 0x01, 0xa9, 0x00},
+ {0x0a, 0x01, 0xa9, 0x00}, {0x0f, 0x01, 0xa9, 0x00},
+ {0x18, 0x01, 0xa9, 0x00}, {0x1f, 0x01, 0xa9, 0x00},
+ {0x29, 0x01, 0xa9, 0x00}, {0x38, 0x01, 0xa9, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xaa, 0x00}, {0x06, 0x01, 0xaa, 0x00},
+ {0x0a, 0x01, 0xaa, 0x00}, {0x0f, 0x01, 0xaa, 0x00},
+ {0x18, 0x01, 0xaa, 0x00}, {0x1f, 0x01, 0xaa, 0x00},
+ {0x29, 0x01, 0xaa, 0x00}, {0x38, 0x01, 0xaa, 0x01},
+ {0x03, 0x01, 0xad, 0x00}, {0x06, 0x01, 0xad, 0x00},
+ {0x0a, 0x01, 0xad, 0x00}, {0x0f, 0x01, 0xad, 0x00},
+ {0x18, 0x01, 0xad, 0x00}, {0x1f, 0x01, 0xad, 0x00},
+ {0x29, 0x01, 0xad, 0x00}, {0x38, 0x01, 0xad, 0x01}
+ },
+ {
+ {0x89, 0x00, 0x00, 0x00}, {0x8a, 0x00, 0x00, 0x00},
+ {0x8c, 0x00, 0x00, 0x00}, {0x8d, 0x00, 0x00, 0x00},
+ {0x90, 0x00, 0x00, 0x00}, {0x91, 0x00, 0x00, 0x00},
+ {0x93, 0x00, 0x00, 0x00}, {0x96, 0x00, 0x00, 0x00},
+ {0x9c, 0x00, 0x00, 0x00}, {0x9f, 0x00, 0x00, 0x00},
+ {0xa3, 0x00, 0x00, 0x00}, {0xa6, 0x00, 0x00, 0x00},
+ {0xab, 0x00, 0x00, 0x00}, {0xae, 0x00, 0x00, 0x00},
+ {0xb5, 0x00, 0x00, 0x00}, {0xbe, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0xb2, 0x01}, {0x00, 0x01, 0xb5, 0x01},
+ {0x00, 0x01, 0xb9, 0x01}, {0x00, 0x01, 0xba, 0x01},
+ {0x00, 0x01, 0xbb, 0x01}, {0x00, 0x01, 0xbd, 0x01},
+ {0x00, 0x01, 0xbe, 0x01}, {0x00, 0x01, 0xc4, 0x01},
+ {0x00, 0x01, 0xc6, 0x01}, {0x00, 0x01, 0xe4, 0x01},
+ {0x00, 0x01, 0xe8, 0x01}, {0x00, 0x01, 0xe9, 0x01},
+ {0x94, 0x00, 0x00, 0x00}, {0x95, 0x00, 0x00, 0x00},
+ {0x97, 0x00, 0x00, 0x00}, {0x98, 0x00, 0x00, 0x00}
+ },
+ /* 135 */
+ {
+ {0x01, 0x01, 0xb2, 0x00}, {0x16, 0x01, 0xb2, 0x01},
+ {0x01, 0x01, 0xb5, 0x00}, {0x16, 0x01, 0xb5, 0x01},
+ {0x01, 0x01, 0xb9, 0x00}, {0x16, 0x01, 0xb9, 0x01},
+ {0x01, 0x01, 0xba, 0x00}, {0x16, 0x01, 0xba, 0x01},
+ {0x01, 0x01, 0xbb, 0x00}, {0x16, 0x01, 0xbb, 0x01},
+ {0x01, 0x01, 0xbd, 0x00}, {0x16, 0x01, 0xbd, 0x01},
+ {0x01, 0x01, 0xbe, 0x00}, {0x16, 0x01, 0xbe, 0x01},
+ {0x01, 0x01, 0xc4, 0x00}, {0x16, 0x01, 0xc4, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xb2, 0x00}, {0x09, 0x01, 0xb2, 0x00},
+ {0x17, 0x01, 0xb2, 0x00}, {0x28, 0x01, 0xb2, 0x01},
+ {0x02, 0x01, 0xb5, 0x00}, {0x09, 0x01, 0xb5, 0x00},
+ {0x17, 0x01, 0xb5, 0x00}, {0x28, 0x01, 0xb5, 0x01},
+ {0x02, 0x01, 0xb9, 0x00}, {0x09, 0x01, 0xb9, 0x00},
+ {0x17, 0x01, 0xb9, 0x00}, {0x28, 0x01, 0xb9, 0x01},
+ {0x02, 0x01, 0xba, 0x00}, {0x09, 0x01, 0xba, 0x00},
+ {0x17, 0x01, 0xba, 0x00}, {0x28, 0x01, 0xba, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xb2, 0x00}, {0x06, 0x01, 0xb2, 0x00},
+ {0x0a, 0x01, 0xb2, 0x00}, {0x0f, 0x01, 0xb2, 0x00},
+ {0x18, 0x01, 0xb2, 0x00}, {0x1f, 0x01, 0xb2, 0x00},
+ {0x29, 0x01, 0xb2, 0x00}, {0x38, 0x01, 0xb2, 0x01},
+ {0x03, 0x01, 0xb5, 0x00}, {0x06, 0x01, 0xb5, 0x00},
+ {0x0a, 0x01, 0xb5, 0x00}, {0x0f, 0x01, 0xb5, 0x00},
+ {0x18, 0x01, 0xb5, 0x00}, {0x1f, 0x01, 0xb5, 0x00},
+ {0x29, 0x01, 0xb5, 0x00}, {0x38, 0x01, 0xb5, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xb9, 0x00}, {0x06, 0x01, 0xb9, 0x00},
+ {0x0a, 0x01, 0xb9, 0x00}, {0x0f, 0x01, 0xb9, 0x00},
+ {0x18, 0x01, 0xb9, 0x00}, {0x1f, 0x01, 0xb9, 0x00},
+ {0x29, 0x01, 0xb9, 0x00}, {0x38, 0x01, 0xb9, 0x01},
+ {0x03, 0x01, 0xba, 0x00}, {0x06, 0x01, 0xba, 0x00},
+ {0x0a, 0x01, 0xba, 0x00}, {0x0f, 0x01, 0xba, 0x00},
+ {0x18, 0x01, 0xba, 0x00}, {0x1f, 0x01, 0xba, 0x00},
+ {0x29, 0x01, 0xba, 0x00}, {0x38, 0x01, 0xba, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xbb, 0x00}, {0x09, 0x01, 0xbb, 0x00},
+ {0x17, 0x01, 0xbb, 0x00}, {0x28, 0x01, 0xbb, 0x01},
+ {0x02, 0x01, 0xbd, 0x00}, {0x09, 0x01, 0xbd, 0x00},
+ {0x17, 0x01, 0xbd, 0x00}, {0x28, 0x01, 0xbd, 0x01},
+ {0x02, 0x01, 0xbe, 0x00}, {0x09, 0x01, 0xbe, 0x00},
+ {0x17, 0x01, 0xbe, 0x00}, {0x28, 0x01, 0xbe, 0x01},
+ {0x02, 0x01, 0xc4, 0x00}, {0x09, 0x01, 0xc4, 0x00},
+ {0x17, 0x01, 0xc4, 0x00}, {0x28, 0x01, 0xc4, 0x01}
+ },
+ /* 140 */
+ {
+ {0x03, 0x01, 0xbb, 0x00}, {0x06, 0x01, 0xbb, 0x00},
+ {0x0a, 0x01, 0xbb, 0x00}, {0x0f, 0x01, 0xbb, 0x00},
+ {0x18, 0x01, 0xbb, 0x00}, {0x1f, 0x01, 0xbb, 0x00},
+ {0x29, 0x01, 0xbb, 0x00}, {0x38, 0x01, 0xbb, 0x01},
+ {0x03, 0x01, 0xbd, 0x00}, {0x06, 0x01, 0xbd, 0x00},
+ {0x0a, 0x01, 0xbd, 0x00}, {0x0f, 0x01, 0xbd, 0x00},
+ {0x18, 0x01, 0xbd, 0x00}, {0x1f, 0x01, 0xbd, 0x00},
+ {0x29, 0x01, 0xbd, 0x00}, {0x38, 0x01, 0xbd, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xbe, 0x00}, {0x06, 0x01, 0xbe, 0x00},
+ {0x0a, 0x01, 0xbe, 0x00}, {0x0f, 0x01, 0xbe, 0x00},
+ {0x18, 0x01, 0xbe, 0x00}, {0x1f, 0x01, 0xbe, 0x00},
+ {0x29, 0x01, 0xbe, 0x00}, {0x38, 0x01, 0xbe, 0x01},
+ {0x03, 0x01, 0xc4, 0x00}, {0x06, 0x01, 0xc4, 0x00},
+ {0x0a, 0x01, 0xc4, 0x00}, {0x0f, 0x01, 0xc4, 0x00},
+ {0x18, 0x01, 0xc4, 0x00}, {0x1f, 0x01, 0xc4, 0x00},
+ {0x29, 0x01, 0xc4, 0x00}, {0x38, 0x01, 0xc4, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xc6, 0x00}, {0x16, 0x01, 0xc6, 0x01},
+ {0x01, 0x01, 0xe4, 0x00}, {0x16, 0x01, 0xe4, 0x01},
+ {0x01, 0x01, 0xe8, 0x00}, {0x16, 0x01, 0xe8, 0x01},
+ {0x01, 0x01, 0xe9, 0x00}, {0x16, 0x01, 0xe9, 0x01},
+ {0x00, 0x01, 0x01, 0x01}, {0x00, 0x01, 0x87, 0x01},
+ {0x00, 0x01, 0x89, 0x01}, {0x00, 0x01, 0x8a, 0x01},
+ {0x00, 0x01, 0x8b, 0x01}, {0x00, 0x01, 0x8c, 0x01},
+ {0x00, 0x01, 0x8d, 0x01}, {0x00, 0x01, 0x8f, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xc6, 0x00}, {0x09, 0x01, 0xc6, 0x00},
+ {0x17, 0x01, 0xc6, 0x00}, {0x28, 0x01, 0xc6, 0x01},
+ {0x02, 0x01, 0xe4, 0x00}, {0x09, 0x01, 0xe4, 0x00},
+ {0x17, 0x01, 0xe4, 0x00}, {0x28, 0x01, 0xe4, 0x01},
+ {0x02, 0x01, 0xe8, 0x00}, {0x09, 0x01, 0xe8, 0x00},
+ {0x17, 0x01, 0xe8, 0x00}, {0x28, 0x01, 0xe8, 0x01},
+ {0x02, 0x01, 0xe9, 0x00}, {0x09, 0x01, 0xe9, 0x00},
+ {0x17, 0x01, 0xe9, 0x00}, {0x28, 0x01, 0xe9, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xc6, 0x00}, {0x06, 0x01, 0xc6, 0x00},
+ {0x0a, 0x01, 0xc6, 0x00}, {0x0f, 0x01, 0xc6, 0x00},
+ {0x18, 0x01, 0xc6, 0x00}, {0x1f, 0x01, 0xc6, 0x00},
+ {0x29, 0x01, 0xc6, 0x00}, {0x38, 0x01, 0xc6, 0x01},
+ {0x03, 0x01, 0xe4, 0x00}, {0x06, 0x01, 0xe4, 0x00},
+ {0x0a, 0x01, 0xe4, 0x00}, {0x0f, 0x01, 0xe4, 0x00},
+ {0x18, 0x01, 0xe4, 0x00}, {0x1f, 0x01, 0xe4, 0x00},
+ {0x29, 0x01, 0xe4, 0x00}, {0x38, 0x01, 0xe4, 0x01}
+ },
+ /* 145 */
+ {
+ {0x03, 0x01, 0xe8, 0x00}, {0x06, 0x01, 0xe8, 0x00},
+ {0x0a, 0x01, 0xe8, 0x00}, {0x0f, 0x01, 0xe8, 0x00},
+ {0x18, 0x01, 0xe8, 0x00}, {0x1f, 0x01, 0xe8, 0x00},
+ {0x29, 0x01, 0xe8, 0x00}, {0x38, 0x01, 0xe8, 0x01},
+ {0x03, 0x01, 0xe9, 0x00}, {0x06, 0x01, 0xe9, 0x00},
+ {0x0a, 0x01, 0xe9, 0x00}, {0x0f, 0x01, 0xe9, 0x00},
+ {0x18, 0x01, 0xe9, 0x00}, {0x1f, 0x01, 0xe9, 0x00},
+ {0x29, 0x01, 0xe9, 0x00}, {0x38, 0x01, 0xe9, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x01, 0x00}, {0x16, 0x01, 0x01, 0x01},
+ {0x01, 0x01, 0x87, 0x00}, {0x16, 0x01, 0x87, 0x01},
+ {0x01, 0x01, 0x89, 0x00}, {0x16, 0x01, 0x89, 0x01},
+ {0x01, 0x01, 0x8a, 0x00}, {0x16, 0x01, 0x8a, 0x01},
+ {0x01, 0x01, 0x8b, 0x00}, {0x16, 0x01, 0x8b, 0x01},
+ {0x01, 0x01, 0x8c, 0x00}, {0x16, 0x01, 0x8c, 0x01},
+ {0x01, 0x01, 0x8d, 0x00}, {0x16, 0x01, 0x8d, 0x01},
+ {0x01, 0x01, 0x8f, 0x00}, {0x16, 0x01, 0x8f, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x01, 0x00}, {0x09, 0x01, 0x01, 0x00},
+ {0x17, 0x01, 0x01, 0x00}, {0x28, 0x01, 0x01, 0x01},
+ {0x02, 0x01, 0x87, 0x00}, {0x09, 0x01, 0x87, 0x00},
+ {0x17, 0x01, 0x87, 0x00}, {0x28, 0x01, 0x87, 0x01},
+ {0x02, 0x01, 0x89, 0x00}, {0x09, 0x01, 0x89, 0x00},
+ {0x17, 0x01, 0x89, 0x00}, {0x28, 0x01, 0x89, 0x01},
+ {0x02, 0x01, 0x8a, 0x00}, {0x09, 0x01, 0x8a, 0x00},
+ {0x17, 0x01, 0x8a, 0x00}, {0x28, 0x01, 0x8a, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x01, 0x00}, {0x06, 0x01, 0x01, 0x00},
+ {0x0a, 0x01, 0x01, 0x00}, {0x0f, 0x01, 0x01, 0x00},
+ {0x18, 0x01, 0x01, 0x00}, {0x1f, 0x01, 0x01, 0x00},
+ {0x29, 0x01, 0x01, 0x00}, {0x38, 0x01, 0x01, 0x01},
+ {0x03, 0x01, 0x87, 0x00}, {0x06, 0x01, 0x87, 0x00},
+ {0x0a, 0x01, 0x87, 0x00}, {0x0f, 0x01, 0x87, 0x00},
+ {0x18, 0x01, 0x87, 0x00}, {0x1f, 0x01, 0x87, 0x00},
+ {0x29, 0x01, 0x87, 0x00}, {0x38, 0x01, 0x87, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x89, 0x00}, {0x06, 0x01, 0x89, 0x00},
+ {0x0a, 0x01, 0x89, 0x00}, {0x0f, 0x01, 0x89, 0x00},
+ {0x18, 0x01, 0x89, 0x00}, {0x1f, 0x01, 0x89, 0x00},
+ {0x29, 0x01, 0x89, 0x00}, {0x38, 0x01, 0x89, 0x01},
+ {0x03, 0x01, 0x8a, 0x00}, {0x06, 0x01, 0x8a, 0x00},
+ {0x0a, 0x01, 0x8a, 0x00}, {0x0f, 0x01, 0x8a, 0x00},
+ {0x18, 0x01, 0x8a, 0x00}, {0x1f, 0x01, 0x8a, 0x00},
+ {0x29, 0x01, 0x8a, 0x00}, {0x38, 0x01, 0x8a, 0x01}
+ },
+ /* 150 */
+ {
+ {0x02, 0x01, 0x8b, 0x00}, {0x09, 0x01, 0x8b, 0x00},
+ {0x17, 0x01, 0x8b, 0x00}, {0x28, 0x01, 0x8b, 0x01},
+ {0x02, 0x01, 0x8c, 0x00}, {0x09, 0x01, 0x8c, 0x00},
+ {0x17, 0x01, 0x8c, 0x00}, {0x28, 0x01, 0x8c, 0x01},
+ {0x02, 0x01, 0x8d, 0x00}, {0x09, 0x01, 0x8d, 0x00},
+ {0x17, 0x01, 0x8d, 0x00}, {0x28, 0x01, 0x8d, 0x01},
+ {0x02, 0x01, 0x8f, 0x00}, {0x09, 0x01, 0x8f, 0x00},
+ {0x17, 0x01, 0x8f, 0x00}, {0x28, 0x01, 0x8f, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x8b, 0x00}, {0x06, 0x01, 0x8b, 0x00},
+ {0x0a, 0x01, 0x8b, 0x00}, {0x0f, 0x01, 0x8b, 0x00},
+ {0x18, 0x01, 0x8b, 0x00}, {0x1f, 0x01, 0x8b, 0x00},
+ {0x29, 0x01, 0x8b, 0x00}, {0x38, 0x01, 0x8b, 0x01},
+ {0x03, 0x01, 0x8c, 0x00}, {0x06, 0x01, 0x8c, 0x00},
+ {0x0a, 0x01, 0x8c, 0x00}, {0x0f, 0x01, 0x8c, 0x00},
+ {0x18, 0x01, 0x8c, 0x00}, {0x1f, 0x01, 0x8c, 0x00},
+ {0x29, 0x01, 0x8c, 0x00}, {0x38, 0x01, 0x8c, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x8d, 0x00}, {0x06, 0x01, 0x8d, 0x00},
+ {0x0a, 0x01, 0x8d, 0x00}, {0x0f, 0x01, 0x8d, 0x00},
+ {0x18, 0x01, 0x8d, 0x00}, {0x1f, 0x01, 0x8d, 0x00},
+ {0x29, 0x01, 0x8d, 0x00}, {0x38, 0x01, 0x8d, 0x01},
+ {0x03, 0x01, 0x8f, 0x00}, {0x06, 0x01, 0x8f, 0x00},
+ {0x0a, 0x01, 0x8f, 0x00}, {0x0f, 0x01, 0x8f, 0x00},
+ {0x18, 0x01, 0x8f, 0x00}, {0x1f, 0x01, 0x8f, 0x00},
+ {0x29, 0x01, 0x8f, 0x00}, {0x38, 0x01, 0x8f, 0x01}
+ },
+ {
+ {0x9d, 0x00, 0x00, 0x00}, {0x9e, 0x00, 0x00, 0x00},
+ {0xa0, 0x00, 0x00, 0x00}, {0xa1, 0x00, 0x00, 0x00},
+ {0xa4, 0x00, 0x00, 0x00}, {0xa5, 0x00, 0x00, 0x00},
+ {0xa7, 0x00, 0x00, 0x00}, {0xa8, 0x00, 0x00, 0x00},
+ {0xac, 0x00, 0x00, 0x00}, {0xad, 0x00, 0x00, 0x00},
+ {0xaf, 0x00, 0x00, 0x00}, {0xb1, 0x00, 0x00, 0x00},
+ {0xb6, 0x00, 0x00, 0x00}, {0xb9, 0x00, 0x00, 0x00},
+ {0xbf, 0x00, 0x00, 0x00}, {0xcf, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0x93, 0x01}, {0x00, 0x01, 0x95, 0x01},
+ {0x00, 0x01, 0x96, 0x01}, {0x00, 0x01, 0x97, 0x01},
+ {0x00, 0x01, 0x98, 0x01}, {0x00, 0x01, 0x9b, 0x01},
+ {0x00, 0x01, 0x9d, 0x01}, {0x00, 0x01, 0x9e, 0x01},
+ {0x00, 0x01, 0xa5, 0x01}, {0x00, 0x01, 0xa6, 0x01},
+ {0x00, 0x01, 0xa8, 0x01}, {0x00, 0x01, 0xae, 0x01},
+ {0x00, 0x01, 0xaf, 0x01}, {0x00, 0x01, 0xb4, 0x01},
+ {0x00, 0x01, 0xb6, 0x01}, {0x00, 0x01, 0xb7, 0x01}
+ },
+ /* 155 */
+ {
+ {0x01, 0x01, 0x93, 0x00}, {0x16, 0x01, 0x93, 0x01},
+ {0x01, 0x01, 0x95, 0x00}, {0x16, 0x01, 0x95, 0x01},
+ {0x01, 0x01, 0x96, 0x00}, {0x16, 0x01, 0x96, 0x01},
+ {0x01, 0x01, 0x97, 0x00}, {0x16, 0x01, 0x97, 0x01},
+ {0x01, 0x01, 0x98, 0x00}, {0x16, 0x01, 0x98, 0x01},
+ {0x01, 0x01, 0x9b, 0x00}, {0x16, 0x01, 0x9b, 0x01},
+ {0x01, 0x01, 0x9d, 0x00}, {0x16, 0x01, 0x9d, 0x01},
+ {0x01, 0x01, 0x9e, 0x00}, {0x16, 0x01, 0x9e, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x93, 0x00}, {0x09, 0x01, 0x93, 0x00},
+ {0x17, 0x01, 0x93, 0x00}, {0x28, 0x01, 0x93, 0x01},
+ {0x02, 0x01, 0x95, 0x00}, {0x09, 0x01, 0x95, 0x00},
+ {0x17, 0x01, 0x95, 0x00}, {0x28, 0x01, 0x95, 0x01},
+ {0x02, 0x01, 0x96, 0x00}, {0x09, 0x01, 0x96, 0x00},
+ {0x17, 0x01, 0x96, 0x00}, {0x28, 0x01, 0x96, 0x01},
+ {0x02, 0x01, 0x97, 0x00}, {0x09, 0x01, 0x97, 0x00},
+ {0x17, 0x01, 0x97, 0x00}, {0x28, 0x01, 0x97, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x93, 0x00}, {0x06, 0x01, 0x93, 0x00},
+ {0x0a, 0x01, 0x93, 0x00}, {0x0f, 0x01, 0x93, 0x00},
+ {0x18, 0x01, 0x93, 0x00}, {0x1f, 0x01, 0x93, 0x00},
+ {0x29, 0x01, 0x93, 0x00}, {0x38, 0x01, 0x93, 0x01},
+ {0x03, 0x01, 0x95, 0x00}, {0x06, 0x01, 0x95, 0x00},
+ {0x0a, 0x01, 0x95, 0x00}, {0x0f, 0x01, 0x95, 0x00},
+ {0x18, 0x01, 0x95, 0x00}, {0x1f, 0x01, 0x95, 0x00},
+ {0x29, 0x01, 0x95, 0x00}, {0x38, 0x01, 0x95, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x96, 0x00}, {0x06, 0x01, 0x96, 0x00},
+ {0x0a, 0x01, 0x96, 0x00}, {0x0f, 0x01, 0x96, 0x00},
+ {0x18, 0x01, 0x96, 0x00}, {0x1f, 0x01, 0x96, 0x00},
+ {0x29, 0x01, 0x96, 0x00}, {0x38, 0x01, 0x96, 0x01},
+ {0x03, 0x01, 0x97, 0x00}, {0x06, 0x01, 0x97, 0x00},
+ {0x0a, 0x01, 0x97, 0x00}, {0x0f, 0x01, 0x97, 0x00},
+ {0x18, 0x01, 0x97, 0x00}, {0x1f, 0x01, 0x97, 0x00},
+ {0x29, 0x01, 0x97, 0x00}, {0x38, 0x01, 0x97, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x98, 0x00}, {0x09, 0x01, 0x98, 0x00},
+ {0x17, 0x01, 0x98, 0x00}, {0x28, 0x01, 0x98, 0x01},
+ {0x02, 0x01, 0x9b, 0x00}, {0x09, 0x01, 0x9b, 0x00},
+ {0x17, 0x01, 0x9b, 0x00}, {0x28, 0x01, 0x9b, 0x01},
+ {0x02, 0x01, 0x9d, 0x00}, {0x09, 0x01, 0x9d, 0x00},
+ {0x17, 0x01, 0x9d, 0x00}, {0x28, 0x01, 0x9d, 0x01},
+ {0x02, 0x01, 0x9e, 0x00}, {0x09, 0x01, 0x9e, 0x00},
+ {0x17, 0x01, 0x9e, 0x00}, {0x28, 0x01, 0x9e, 0x01}
+ },
+ /* 160 */
+ {
+ {0x03, 0x01, 0x98, 0x00}, {0x06, 0x01, 0x98, 0x00},
+ {0x0a, 0x01, 0x98, 0x00}, {0x0f, 0x01, 0x98, 0x00},
+ {0x18, 0x01, 0x98, 0x00}, {0x1f, 0x01, 0x98, 0x00},
+ {0x29, 0x01, 0x98, 0x00}, {0x38, 0x01, 0x98, 0x01},
+ {0x03, 0x01, 0x9b, 0x00}, {0x06, 0x01, 0x9b, 0x00},
+ {0x0a, 0x01, 0x9b, 0x00}, {0x0f, 0x01, 0x9b, 0x00},
+ {0x18, 0x01, 0x9b, 0x00}, {0x1f, 0x01, 0x9b, 0x00},
+ {0x29, 0x01, 0x9b, 0x00}, {0x38, 0x01, 0x9b, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x9d, 0x00}, {0x06, 0x01, 0x9d, 0x00},
+ {0x0a, 0x01, 0x9d, 0x00}, {0x0f, 0x01, 0x9d, 0x00},
+ {0x18, 0x01, 0x9d, 0x00}, {0x1f, 0x01, 0x9d, 0x00},
+ {0x29, 0x01, 0x9d, 0x00}, {0x38, 0x01, 0x9d, 0x01},
+ {0x03, 0x01, 0x9e, 0x00}, {0x06, 0x01, 0x9e, 0x00},
+ {0x0a, 0x01, 0x9e, 0x00}, {0x0f, 0x01, 0x9e, 0x00},
+ {0x18, 0x01, 0x9e, 0x00}, {0x1f, 0x01, 0x9e, 0x00},
+ {0x29, 0x01, 0x9e, 0x00}, {0x38, 0x01, 0x9e, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xa5, 0x00}, {0x16, 0x01, 0xa5, 0x01},
+ {0x01, 0x01, 0xa6, 0x00}, {0x16, 0x01, 0xa6, 0x01},
+ {0x01, 0x01, 0xa8, 0x00}, {0x16, 0x01, 0xa8, 0x01},
+ {0x01, 0x01, 0xae, 0x00}, {0x16, 0x01, 0xae, 0x01},
+ {0x01, 0x01, 0xaf, 0x00}, {0x16, 0x01, 0xaf, 0x01},
+ {0x01, 0x01, 0xb4, 0x00}, {0x16, 0x01, 0xb4, 0x01},
+ {0x01, 0x01, 0xb6, 0x00}, {0x16, 0x01, 0xb6, 0x01},
+ {0x01, 0x01, 0xb7, 0x00}, {0x16, 0x01, 0xb7, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xa5, 0x00}, {0x09, 0x01, 0xa5, 0x00},
+ {0x17, 0x01, 0xa5, 0x00}, {0x28, 0x01, 0xa5, 0x01},
+ {0x02, 0x01, 0xa6, 0x00}, {0x09, 0x01, 0xa6, 0x00},
+ {0x17, 0x01, 0xa6, 0x00}, {0x28, 0x01, 0xa6, 0x01},
+ {0x02, 0x01, 0xa8, 0x00}, {0x09, 0x01, 0xa8, 0x00},
+ {0x17, 0x01, 0xa8, 0x00}, {0x28, 0x01, 0xa8, 0x01},
+ {0x02, 0x01, 0xae, 0x00}, {0x09, 0x01, 0xae, 0x00},
+ {0x17, 0x01, 0xae, 0x00}, {0x28, 0x01, 0xae, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xa5, 0x00}, {0x06, 0x01, 0xa5, 0x00},
+ {0x0a, 0x01, 0xa5, 0x00}, {0x0f, 0x01, 0xa5, 0x00},
+ {0x18, 0x01, 0xa5, 0x00}, {0x1f, 0x01, 0xa5, 0x00},
+ {0x29, 0x01, 0xa5, 0x00}, {0x38, 0x01, 0xa5, 0x01},
+ {0x03, 0x01, 0xa6, 0x00}, {0x06, 0x01, 0xa6, 0x00},
+ {0x0a, 0x01, 0xa6, 0x00}, {0x0f, 0x01, 0xa6, 0x00},
+ {0x18, 0x01, 0xa6, 0x00}, {0x1f, 0x01, 0xa6, 0x00},
+ {0x29, 0x01, 0xa6, 0x00}, {0x38, 0x01, 0xa6, 0x01}
+ },
+ /* 165 */
+ {
+ {0x03, 0x01, 0xa8, 0x00}, {0x06, 0x01, 0xa8, 0x00},
+ {0x0a, 0x01, 0xa8, 0x00}, {0x0f, 0x01, 0xa8, 0x00},
+ {0x18, 0x01, 0xa8, 0x00}, {0x1f, 0x01, 0xa8, 0x00},
+ {0x29, 0x01, 0xa8, 0x00}, {0x38, 0x01, 0xa8, 0x01},
+ {0x03, 0x01, 0xae, 0x00}, {0x06, 0x01, 0xae, 0x00},
+ {0x0a, 0x01, 0xae, 0x00}, {0x0f, 0x01, 0xae, 0x00},
+ {0x18, 0x01, 0xae, 0x00}, {0x1f, 0x01, 0xae, 0x00},
+ {0x29, 0x01, 0xae, 0x00}, {0x38, 0x01, 0xae, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xaf, 0x00}, {0x09, 0x01, 0xaf, 0x00},
+ {0x17, 0x01, 0xaf, 0x00}, {0x28, 0x01, 0xaf, 0x01},
+ {0x02, 0x01, 0xb4, 0x00}, {0x09, 0x01, 0xb4, 0x00},
+ {0x17, 0x01, 0xb4, 0x00}, {0x28, 0x01, 0xb4, 0x01},
+ {0x02, 0x01, 0xb6, 0x00}, {0x09, 0x01, 0xb6, 0x00},
+ {0x17, 0x01, 0xb6, 0x00}, {0x28, 0x01, 0xb6, 0x01},
+ {0x02, 0x01, 0xb7, 0x00}, {0x09, 0x01, 0xb7, 0x00},
+ {0x17, 0x01, 0xb7, 0x00}, {0x28, 0x01, 0xb7, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xaf, 0x00}, {0x06, 0x01, 0xaf, 0x00},
+ {0x0a, 0x01, 0xaf, 0x00}, {0x0f, 0x01, 0xaf, 0x00},
+ {0x18, 0x01, 0xaf, 0x00}, {0x1f, 0x01, 0xaf, 0x00},
+ {0x29, 0x01, 0xaf, 0x00}, {0x38, 0x01, 0xaf, 0x01},
+ {0x03, 0x01, 0xb4, 0x00}, {0x06, 0x01, 0xb4, 0x00},
+ {0x0a, 0x01, 0xb4, 0x00}, {0x0f, 0x01, 0xb4, 0x00},
+ {0x18, 0x01, 0xb4, 0x00}, {0x1f, 0x01, 0xb4, 0x00},
+ {0x29, 0x01, 0xb4, 0x00}, {0x38, 0x01, 0xb4, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xb6, 0x00}, {0x06, 0x01, 0xb6, 0x00},
+ {0x0a, 0x01, 0xb6, 0x00}, {0x0f, 0x01, 0xb6, 0x00},
+ {0x18, 0x01, 0xb6, 0x00}, {0x1f, 0x01, 0xb6, 0x00},
+ {0x29, 0x01, 0xb6, 0x00}, {0x38, 0x01, 0xb6, 0x01},
+ {0x03, 0x01, 0xb7, 0x00}, {0x06, 0x01, 0xb7, 0x00},
+ {0x0a, 0x01, 0xb7, 0x00}, {0x0f, 0x01, 0xb7, 0x00},
+ {0x18, 0x01, 0xb7, 0x00}, {0x1f, 0x01, 0xb7, 0x00},
+ {0x29, 0x01, 0xb7, 0x00}, {0x38, 0x01, 0xb7, 0x01}
+ },
+ {
+ {0x00, 0x01, 0xbc, 0x01}, {0x00, 0x01, 0xbf, 0x01},
+ {0x00, 0x01, 0xc5, 0x01}, {0x00, 0x01, 0xe7, 0x01},
+ {0x00, 0x01, 0xef, 0x01}, {0xb0, 0x00, 0x00, 0x00},
+ {0xb2, 0x00, 0x00, 0x00}, {0xb3, 0x00, 0x00, 0x00},
+ {0xb7, 0x00, 0x00, 0x00}, {0xb8, 0x00, 0x00, 0x00},
+ {0xba, 0x00, 0x00, 0x00}, {0xbb, 0x00, 0x00, 0x00},
+ {0xc0, 0x00, 0x00, 0x00}, {0xc7, 0x00, 0x00, 0x00},
+ {0xd0, 0x00, 0x00, 0x00}, {0xdf, 0x00, 0x00, 0x01}
+ },
+ /* 170 */
+ {
+ {0x01, 0x01, 0xbc, 0x00}, {0x16, 0x01, 0xbc, 0x01},
+ {0x01, 0x01, 0xbf, 0x00}, {0x16, 0x01, 0xbf, 0x01},
+ {0x01, 0x01, 0xc5, 0x00}, {0x16, 0x01, 0xc5, 0x01},
+ {0x01, 0x01, 0xe7, 0x00}, {0x16, 0x01, 0xe7, 0x01},
+ {0x01, 0x01, 0xef, 0x00}, {0x16, 0x01, 0xef, 0x01},
+ {0x00, 0x01, 0x09, 0x01}, {0x00, 0x01, 0x8e, 0x01},
+ {0x00, 0x01, 0x90, 0x01}, {0x00, 0x01, 0x91, 0x01},
+ {0x00, 0x01, 0x94, 0x01}, {0x00, 0x01, 0x9f, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xbc, 0x00}, {0x09, 0x01, 0xbc, 0x00},
+ {0x17, 0x01, 0xbc, 0x00}, {0x28, 0x01, 0xbc, 0x01},
+ {0x02, 0x01, 0xbf, 0x00}, {0x09, 0x01, 0xbf, 0x00},
+ {0x17, 0x01, 0xbf, 0x00}, {0x28, 0x01, 0xbf, 0x01},
+ {0x02, 0x01, 0xc5, 0x00}, {0x09, 0x01, 0xc5, 0x00},
+ {0x17, 0x01, 0xc5, 0x00}, {0x28, 0x01, 0xc5, 0x01},
+ {0x02, 0x01, 0xe7, 0x00}, {0x09, 0x01, 0xe7, 0x00},
+ {0x17, 0x01, 0xe7, 0x00}, {0x28, 0x01, 0xe7, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xbc, 0x00}, {0x06, 0x01, 0xbc, 0x00},
+ {0x0a, 0x01, 0xbc, 0x00}, {0x0f, 0x01, 0xbc, 0x00},
+ {0x18, 0x01, 0xbc, 0x00}, {0x1f, 0x01, 0xbc, 0x00},
+ {0x29, 0x01, 0xbc, 0x00}, {0x38, 0x01, 0xbc, 0x01},
+ {0x03, 0x01, 0xbf, 0x00}, {0x06, 0x01, 0xbf, 0x00},
+ {0x0a, 0x01, 0xbf, 0x00}, {0x0f, 0x01, 0xbf, 0x00},
+ {0x18, 0x01, 0xbf, 0x00}, {0x1f, 0x01, 0xbf, 0x00},
+ {0x29, 0x01, 0xbf, 0x00}, {0x38, 0x01, 0xbf, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xc5, 0x00}, {0x06, 0x01, 0xc5, 0x00},
+ {0x0a, 0x01, 0xc5, 0x00}, {0x0f, 0x01, 0xc5, 0x00},
+ {0x18, 0x01, 0xc5, 0x00}, {0x1f, 0x01, 0xc5, 0x00},
+ {0x29, 0x01, 0xc5, 0x00}, {0x38, 0x01, 0xc5, 0x01},
+ {0x03, 0x01, 0xe7, 0x00}, {0x06, 0x01, 0xe7, 0x00},
+ {0x0a, 0x01, 0xe7, 0x00}, {0x0f, 0x01, 0xe7, 0x00},
+ {0x18, 0x01, 0xe7, 0x00}, {0x1f, 0x01, 0xe7, 0x00},
+ {0x29, 0x01, 0xe7, 0x00}, {0x38, 0x01, 0xe7, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xef, 0x00}, {0x09, 0x01, 0xef, 0x00},
+ {0x17, 0x01, 0xef, 0x00}, {0x28, 0x01, 0xef, 0x01},
+ {0x01, 0x01, 0x09, 0x00}, {0x16, 0x01, 0x09, 0x01},
+ {0x01, 0x01, 0x8e, 0x00}, {0x16, 0x01, 0x8e, 0x01},
+ {0x01, 0x01, 0x90, 0x00}, {0x16, 0x01, 0x90, 0x01},
+ {0x01, 0x01, 0x91, 0x00}, {0x16, 0x01, 0x91, 0x01},
+ {0x01, 0x01, 0x94, 0x00}, {0x16, 0x01, 0x94, 0x01},
+ {0x01, 0x01, 0x9f, 0x00}, {0x16, 0x01, 0x9f, 0x01}
+ },
+ /* 175 */
+ {
+ {0x03, 0x01, 0xef, 0x00}, {0x06, 0x01, 0xef, 0x00},
+ {0x0a, 0x01, 0xef, 0x00}, {0x0f, 0x01, 0xef, 0x00},
+ {0x18, 0x01, 0xef, 0x00}, {0x1f, 0x01, 0xef, 0x00},
+ {0x29, 0x01, 0xef, 0x00}, {0x38, 0x01, 0xef, 0x01},
+ {0x02, 0x01, 0x09, 0x00}, {0x09, 0x01, 0x09, 0x00},
+ {0x17, 0x01, 0x09, 0x00}, {0x28, 0x01, 0x09, 0x01},
+ {0x02, 0x01, 0x8e, 0x00}, {0x09, 0x01, 0x8e, 0x00},
+ {0x17, 0x01, 0x8e, 0x00}, {0x28, 0x01, 0x8e, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x09, 0x00}, {0x06, 0x01, 0x09, 0x00},
+ {0x0a, 0x01, 0x09, 0x00}, {0x0f, 0x01, 0x09, 0x00},
+ {0x18, 0x01, 0x09, 0x00}, {0x1f, 0x01, 0x09, 0x00},
+ {0x29, 0x01, 0x09, 0x00}, {0x38, 0x01, 0x09, 0x01},
+ {0x03, 0x01, 0x8e, 0x00}, {0x06, 0x01, 0x8e, 0x00},
+ {0x0a, 0x01, 0x8e, 0x00}, {0x0f, 0x01, 0x8e, 0x00},
+ {0x18, 0x01, 0x8e, 0x00}, {0x1f, 0x01, 0x8e, 0x00},
+ {0x29, 0x01, 0x8e, 0x00}, {0x38, 0x01, 0x8e, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x90, 0x00}, {0x09, 0x01, 0x90, 0x00},
+ {0x17, 0x01, 0x90, 0x00}, {0x28, 0x01, 0x90, 0x01},
+ {0x02, 0x01, 0x91, 0x00}, {0x09, 0x01, 0x91, 0x00},
+ {0x17, 0x01, 0x91, 0x00}, {0x28, 0x01, 0x91, 0x01},
+ {0x02, 0x01, 0x94, 0x00}, {0x09, 0x01, 0x94, 0x00},
+ {0x17, 0x01, 0x94, 0x00}, {0x28, 0x01, 0x94, 0x01},
+ {0x02, 0x01, 0x9f, 0x00}, {0x09, 0x01, 0x9f, 0x00},
+ {0x17, 0x01, 0x9f, 0x00}, {0x28, 0x01, 0x9f, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x90, 0x00}, {0x06, 0x01, 0x90, 0x00},
+ {0x0a, 0x01, 0x90, 0x00}, {0x0f, 0x01, 0x90, 0x00},
+ {0x18, 0x01, 0x90, 0x00}, {0x1f, 0x01, 0x90, 0x00},
+ {0x29, 0x01, 0x90, 0x00}, {0x38, 0x01, 0x90, 0x01},
+ {0x03, 0x01, 0x91, 0x00}, {0x06, 0x01, 0x91, 0x00},
+ {0x0a, 0x01, 0x91, 0x00}, {0x0f, 0x01, 0x91, 0x00},
+ {0x18, 0x01, 0x91, 0x00}, {0x1f, 0x01, 0x91, 0x00},
+ {0x29, 0x01, 0x91, 0x00}, {0x38, 0x01, 0x91, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x94, 0x00}, {0x06, 0x01, 0x94, 0x00},
+ {0x0a, 0x01, 0x94, 0x00}, {0x0f, 0x01, 0x94, 0x00},
+ {0x18, 0x01, 0x94, 0x00}, {0x1f, 0x01, 0x94, 0x00},
+ {0x29, 0x01, 0x94, 0x00}, {0x38, 0x01, 0x94, 0x01},
+ {0x03, 0x01, 0x9f, 0x00}, {0x06, 0x01, 0x9f, 0x00},
+ {0x0a, 0x01, 0x9f, 0x00}, {0x0f, 0x01, 0x9f, 0x00},
+ {0x18, 0x01, 0x9f, 0x00}, {0x1f, 0x01, 0x9f, 0x00},
+ {0x29, 0x01, 0x9f, 0x00}, {0x38, 0x01, 0x9f, 0x01}
+ },
+ /* 180 */
+ {
+ {0x00, 0x01, 0xab, 0x01}, {0x00, 0x01, 0xce, 0x01},
+ {0x00, 0x01, 0xd7, 0x01}, {0x00, 0x01, 0xe1, 0x01},
+ {0x00, 0x01, 0xec, 0x01}, {0x00, 0x01, 0xed, 0x01},
+ {0xbc, 0x00, 0x00, 0x00}, {0xbd, 0x00, 0x00, 0x00},
+ {0xc1, 0x00, 0x00, 0x00}, {0xc4, 0x00, 0x00, 0x00},
+ {0xc8, 0x00, 0x00, 0x00}, {0xcb, 0x00, 0x00, 0x00},
+ {0xd1, 0x00, 0x00, 0x00}, {0xd8, 0x00, 0x00, 0x00},
+ {0xe0, 0x00, 0x00, 0x00}, {0xee, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xab, 0x00}, {0x16, 0x01, 0xab, 0x01},
+ {0x01, 0x01, 0xce, 0x00}, {0x16, 0x01, 0xce, 0x01},
+ {0x01, 0x01, 0xd7, 0x00}, {0x16, 0x01, 0xd7, 0x01},
+ {0x01, 0x01, 0xe1, 0x00}, {0x16, 0x01, 0xe1, 0x01},
+ {0x01, 0x01, 0xec, 0x00}, {0x16, 0x01, 0xec, 0x01},
+ {0x01, 0x01, 0xed, 0x00}, {0x16, 0x01, 0xed, 0x01},
+ {0x00, 0x01, 0xc7, 0x01}, {0x00, 0x01, 0xcf, 0x01},
+ {0x00, 0x01, 0xea, 0x01}, {0x00, 0x01, 0xeb, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xab, 0x00}, {0x09, 0x01, 0xab, 0x00},
+ {0x17, 0x01, 0xab, 0x00}, {0x28, 0x01, 0xab, 0x01},
+ {0x02, 0x01, 0xce, 0x00}, {0x09, 0x01, 0xce, 0x00},
+ {0x17, 0x01, 0xce, 0x00}, {0x28, 0x01, 0xce, 0x01},
+ {0x02, 0x01, 0xd7, 0x00}, {0x09, 0x01, 0xd7, 0x00},
+ {0x17, 0x01, 0xd7, 0x00}, {0x28, 0x01, 0xd7, 0x01},
+ {0x02, 0x01, 0xe1, 0x00}, {0x09, 0x01, 0xe1, 0x00},
+ {0x17, 0x01, 0xe1, 0x00}, {0x28, 0x01, 0xe1, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xab, 0x00}, {0x06, 0x01, 0xab, 0x00},
+ {0x0a, 0x01, 0xab, 0x00}, {0x0f, 0x01, 0xab, 0x00},
+ {0x18, 0x01, 0xab, 0x00}, {0x1f, 0x01, 0xab, 0x00},
+ {0x29, 0x01, 0xab, 0x00}, {0x38, 0x01, 0xab, 0x01},
+ {0x03, 0x01, 0xce, 0x00}, {0x06, 0x01, 0xce, 0x00},
+ {0x0a, 0x01, 0xce, 0x00}, {0x0f, 0x01, 0xce, 0x00},
+ {0x18, 0x01, 0xce, 0x00}, {0x1f, 0x01, 0xce, 0x00},
+ {0x29, 0x01, 0xce, 0x00}, {0x38, 0x01, 0xce, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xd7, 0x00}, {0x06, 0x01, 0xd7, 0x00},
+ {0x0a, 0x01, 0xd7, 0x00}, {0x0f, 0x01, 0xd7, 0x00},
+ {0x18, 0x01, 0xd7, 0x00}, {0x1f, 0x01, 0xd7, 0x00},
+ {0x29, 0x01, 0xd7, 0x00}, {0x38, 0x01, 0xd7, 0x01},
+ {0x03, 0x01, 0xe1, 0x00}, {0x06, 0x01, 0xe1, 0x00},
+ {0x0a, 0x01, 0xe1, 0x00}, {0x0f, 0x01, 0xe1, 0x00},
+ {0x18, 0x01, 0xe1, 0x00}, {0x1f, 0x01, 0xe1, 0x00},
+ {0x29, 0x01, 0xe1, 0x00}, {0x38, 0x01, 0xe1, 0x01}
+ },
+ /* 185 */
+ {
+ {0x02, 0x01, 0xec, 0x00}, {0x09, 0x01, 0xec, 0x00},
+ {0x17, 0x01, 0xec, 0x00}, {0x28, 0x01, 0xec, 0x01},
+ {0x02, 0x01, 0xed, 0x00}, {0x09, 0x01, 0xed, 0x00},
+ {0x17, 0x01, 0xed, 0x00}, {0x28, 0x01, 0xed, 0x01},
+ {0x01, 0x01, 0xc7, 0x00}, {0x16, 0x01, 0xc7, 0x01},
+ {0x01, 0x01, 0xcf, 0x00}, {0x16, 0x01, 0xcf, 0x01},
+ {0x01, 0x01, 0xea, 0x00}, {0x16, 0x01, 0xea, 0x01},
+ {0x01, 0x01, 0xeb, 0x00}, {0x16, 0x01, 0xeb, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xec, 0x00}, {0x06, 0x01, 0xec, 0x00},
+ {0x0a, 0x01, 0xec, 0x00}, {0x0f, 0x01, 0xec, 0x00},
+ {0x18, 0x01, 0xec, 0x00}, {0x1f, 0x01, 0xec, 0x00},
+ {0x29, 0x01, 0xec, 0x00}, {0x38, 0x01, 0xec, 0x01},
+ {0x03, 0x01, 0xed, 0x00}, {0x06, 0x01, 0xed, 0x00},
+ {0x0a, 0x01, 0xed, 0x00}, {0x0f, 0x01, 0xed, 0x00},
+ {0x18, 0x01, 0xed, 0x00}, {0x1f, 0x01, 0xed, 0x00},
+ {0x29, 0x01, 0xed, 0x00}, {0x38, 0x01, 0xed, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xc7, 0x00}, {0x09, 0x01, 0xc7, 0x00},
+ {0x17, 0x01, 0xc7, 0x00}, {0x28, 0x01, 0xc7, 0x01},
+ {0x02, 0x01, 0xcf, 0x00}, {0x09, 0x01, 0xcf, 0x00},
+ {0x17, 0x01, 0xcf, 0x00}, {0x28, 0x01, 0xcf, 0x01},
+ {0x02, 0x01, 0xea, 0x00}, {0x09, 0x01, 0xea, 0x00},
+ {0x17, 0x01, 0xea, 0x00}, {0x28, 0x01, 0xea, 0x01},
+ {0x02, 0x01, 0xeb, 0x00}, {0x09, 0x01, 0xeb, 0x00},
+ {0x17, 0x01, 0xeb, 0x00}, {0x28, 0x01, 0xeb, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xc7, 0x00}, {0x06, 0x01, 0xc7, 0x00},
+ {0x0a, 0x01, 0xc7, 0x00}, {0x0f, 0x01, 0xc7, 0x00},
+ {0x18, 0x01, 0xc7, 0x00}, {0x1f, 0x01, 0xc7, 0x00},
+ {0x29, 0x01, 0xc7, 0x00}, {0x38, 0x01, 0xc7, 0x01},
+ {0x03, 0x01, 0xcf, 0x00}, {0x06, 0x01, 0xcf, 0x00},
+ {0x0a, 0x01, 0xcf, 0x00}, {0x0f, 0x01, 0xcf, 0x00},
+ {0x18, 0x01, 0xcf, 0x00}, {0x1f, 0x01, 0xcf, 0x00},
+ {0x29, 0x01, 0xcf, 0x00}, {0x38, 0x01, 0xcf, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xea, 0x00}, {0x06, 0x01, 0xea, 0x00},
+ {0x0a, 0x01, 0xea, 0x00}, {0x0f, 0x01, 0xea, 0x00},
+ {0x18, 0x01, 0xea, 0x00}, {0x1f, 0x01, 0xea, 0x00},
+ {0x29, 0x01, 0xea, 0x00}, {0x38, 0x01, 0xea, 0x01},
+ {0x03, 0x01, 0xeb, 0x00}, {0x06, 0x01, 0xeb, 0x00},
+ {0x0a, 0x01, 0xeb, 0x00}, {0x0f, 0x01, 0xeb, 0x00},
+ {0x18, 0x01, 0xeb, 0x00}, {0x1f, 0x01, 0xeb, 0x00},
+ {0x29, 0x01, 0xeb, 0x00}, {0x38, 0x01, 0xeb, 0x01}
+ },
+ /* 190 */
+ {
+ {0xc2, 0x00, 0x00, 0x00}, {0xc3, 0x00, 0x00, 0x00},
+ {0xc5, 0x00, 0x00, 0x00}, {0xc6, 0x00, 0x00, 0x00},
+ {0xc9, 0x00, 0x00, 0x00}, {0xca, 0x00, 0x00, 0x00},
+ {0xcc, 0x00, 0x00, 0x00}, {0xcd, 0x00, 0x00, 0x00},
+ {0xd2, 0x00, 0x00, 0x00}, {0xd5, 0x00, 0x00, 0x00},
+ {0xd9, 0x00, 0x00, 0x00}, {0xdc, 0x00, 0x00, 0x00},
+ {0xe1, 0x00, 0x00, 0x00}, {0xe7, 0x00, 0x00, 0x00},
+ {0xef, 0x00, 0x00, 0x00}, {0xf6, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0xc0, 0x01}, {0x00, 0x01, 0xc1, 0x01},
+ {0x00, 0x01, 0xc8, 0x01}, {0x00, 0x01, 0xc9, 0x01},
+ {0x00, 0x01, 0xca, 0x01}, {0x00, 0x01, 0xcd, 0x01},
+ {0x00, 0x01, 0xd2, 0x01}, {0x00, 0x01, 0xd5, 0x01},
+ {0x00, 0x01, 0xda, 0x01}, {0x00, 0x01, 0xdb, 0x01},
+ {0x00, 0x01, 0xee, 0x01}, {0x00, 0x01, 0xf0, 0x01},
+ {0x00, 0x01, 0xf2, 0x01}, {0x00, 0x01, 0xf3, 0x01},
+ {0x00, 0x01, 0xff, 0x01}, {0xce, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x01, 0x01, 0xc0, 0x00}, {0x16, 0x01, 0xc0, 0x01},
+ {0x01, 0x01, 0xc1, 0x00}, {0x16, 0x01, 0xc1, 0x01},
+ {0x01, 0x01, 0xc8, 0x00}, {0x16, 0x01, 0xc8, 0x01},
+ {0x01, 0x01, 0xc9, 0x00}, {0x16, 0x01, 0xc9, 0x01},
+ {0x01, 0x01, 0xca, 0x00}, {0x16, 0x01, 0xca, 0x01},
+ {0x01, 0x01, 0xcd, 0x00}, {0x16, 0x01, 0xcd, 0x01},
+ {0x01, 0x01, 0xd2, 0x00}, {0x16, 0x01, 0xd2, 0x01},
+ {0x01, 0x01, 0xd5, 0x00}, {0x16, 0x01, 0xd5, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xc0, 0x00}, {0x09, 0x01, 0xc0, 0x00},
+ {0x17, 0x01, 0xc0, 0x00}, {0x28, 0x01, 0xc0, 0x01},
+ {0x02, 0x01, 0xc1, 0x00}, {0x09, 0x01, 0xc1, 0x00},
+ {0x17, 0x01, 0xc1, 0x00}, {0x28, 0x01, 0xc1, 0x01},
+ {0x02, 0x01, 0xc8, 0x00}, {0x09, 0x01, 0xc8, 0x00},
+ {0x17, 0x01, 0xc8, 0x00}, {0x28, 0x01, 0xc8, 0x01},
+ {0x02, 0x01, 0xc9, 0x00}, {0x09, 0x01, 0xc9, 0x00},
+ {0x17, 0x01, 0xc9, 0x00}, {0x28, 0x01, 0xc9, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xc0, 0x00}, {0x06, 0x01, 0xc0, 0x00},
+ {0x0a, 0x01, 0xc0, 0x00}, {0x0f, 0x01, 0xc0, 0x00},
+ {0x18, 0x01, 0xc0, 0x00}, {0x1f, 0x01, 0xc0, 0x00},
+ {0x29, 0x01, 0xc0, 0x00}, {0x38, 0x01, 0xc0, 0x01},
+ {0x03, 0x01, 0xc1, 0x00}, {0x06, 0x01, 0xc1, 0x00},
+ {0x0a, 0x01, 0xc1, 0x00}, {0x0f, 0x01, 0xc1, 0x00},
+ {0x18, 0x01, 0xc1, 0x00}, {0x1f, 0x01, 0xc1, 0x00},
+ {0x29, 0x01, 0xc1, 0x00}, {0x38, 0x01, 0xc1, 0x01}
+ },
+ /* 195 */
+ {
+ {0x03, 0x01, 0xc8, 0x00}, {0x06, 0x01, 0xc8, 0x00},
+ {0x0a, 0x01, 0xc8, 0x00}, {0x0f, 0x01, 0xc8, 0x00},
+ {0x18, 0x01, 0xc8, 0x00}, {0x1f, 0x01, 0xc8, 0x00},
+ {0x29, 0x01, 0xc8, 0x00}, {0x38, 0x01, 0xc8, 0x01},
+ {0x03, 0x01, 0xc9, 0x00}, {0x06, 0x01, 0xc9, 0x00},
+ {0x0a, 0x01, 0xc9, 0x00}, {0x0f, 0x01, 0xc9, 0x00},
+ {0x18, 0x01, 0xc9, 0x00}, {0x1f, 0x01, 0xc9, 0x00},
+ {0x29, 0x01, 0xc9, 0x00}, {0x38, 0x01, 0xc9, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xca, 0x00}, {0x09, 0x01, 0xca, 0x00},
+ {0x17, 0x01, 0xca, 0x00}, {0x28, 0x01, 0xca, 0x01},
+ {0x02, 0x01, 0xcd, 0x00}, {0x09, 0x01, 0xcd, 0x00},
+ {0x17, 0x01, 0xcd, 0x00}, {0x28, 0x01, 0xcd, 0x01},
+ {0x02, 0x01, 0xd2, 0x00}, {0x09, 0x01, 0xd2, 0x00},
+ {0x17, 0x01, 0xd2, 0x00}, {0x28, 0x01, 0xd2, 0x01},
+ {0x02, 0x01, 0xd5, 0x00}, {0x09, 0x01, 0xd5, 0x00},
+ {0x17, 0x01, 0xd5, 0x00}, {0x28, 0x01, 0xd5, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xca, 0x00}, {0x06, 0x01, 0xca, 0x00},
+ {0x0a, 0x01, 0xca, 0x00}, {0x0f, 0x01, 0xca, 0x00},
+ {0x18, 0x01, 0xca, 0x00}, {0x1f, 0x01, 0xca, 0x00},
+ {0x29, 0x01, 0xca, 0x00}, {0x38, 0x01, 0xca, 0x01},
+ {0x03, 0x01, 0xcd, 0x00}, {0x06, 0x01, 0xcd, 0x00},
+ {0x0a, 0x01, 0xcd, 0x00}, {0x0f, 0x01, 0xcd, 0x00},
+ {0x18, 0x01, 0xcd, 0x00}, {0x1f, 0x01, 0xcd, 0x00},
+ {0x29, 0x01, 0xcd, 0x00}, {0x38, 0x01, 0xcd, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xd2, 0x00}, {0x06, 0x01, 0xd2, 0x00},
+ {0x0a, 0x01, 0xd2, 0x00}, {0x0f, 0x01, 0xd2, 0x00},
+ {0x18, 0x01, 0xd2, 0x00}, {0x1f, 0x01, 0xd2, 0x00},
+ {0x29, 0x01, 0xd2, 0x00}, {0x38, 0x01, 0xd2, 0x01},
+ {0x03, 0x01, 0xd5, 0x00}, {0x06, 0x01, 0xd5, 0x00},
+ {0x0a, 0x01, 0xd5, 0x00}, {0x0f, 0x01, 0xd5, 0x00},
+ {0x18, 0x01, 0xd5, 0x00}, {0x1f, 0x01, 0xd5, 0x00},
+ {0x29, 0x01, 0xd5, 0x00}, {0x38, 0x01, 0xd5, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xda, 0x00}, {0x16, 0x01, 0xda, 0x01},
+ {0x01, 0x01, 0xdb, 0x00}, {0x16, 0x01, 0xdb, 0x01},
+ {0x01, 0x01, 0xee, 0x00}, {0x16, 0x01, 0xee, 0x01},
+ {0x01, 0x01, 0xf0, 0x00}, {0x16, 0x01, 0xf0, 0x01},
+ {0x01, 0x01, 0xf2, 0x00}, {0x16, 0x01, 0xf2, 0x01},
+ {0x01, 0x01, 0xf3, 0x00}, {0x16, 0x01, 0xf3, 0x01},
+ {0x01, 0x01, 0xff, 0x00}, {0x16, 0x01, 0xff, 0x01},
+ {0x00, 0x01, 0xcb, 0x01}, {0x00, 0x01, 0xcc, 0x01}
+ },
+ /* 200 */
+ {
+ {0x02, 0x01, 0xda, 0x00}, {0x09, 0x01, 0xda, 0x00},
+ {0x17, 0x01, 0xda, 0x00}, {0x28, 0x01, 0xda, 0x01},
+ {0x02, 0x01, 0xdb, 0x00}, {0x09, 0x01, 0xdb, 0x00},
+ {0x17, 0x01, 0xdb, 0x00}, {0x28, 0x01, 0xdb, 0x01},
+ {0x02, 0x01, 0xee, 0x00}, {0x09, 0x01, 0xee, 0x00},
+ {0x17, 0x01, 0xee, 0x00}, {0x28, 0x01, 0xee, 0x01},
+ {0x02, 0x01, 0xf0, 0x00}, {0x09, 0x01, 0xf0, 0x00},
+ {0x17, 0x01, 0xf0, 0x00}, {0x28, 0x01, 0xf0, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xda, 0x00}, {0x06, 0x01, 0xda, 0x00},
+ {0x0a, 0x01, 0xda, 0x00}, {0x0f, 0x01, 0xda, 0x00},
+ {0x18, 0x01, 0xda, 0x00}, {0x1f, 0x01, 0xda, 0x00},
+ {0x29, 0x01, 0xda, 0x00}, {0x38, 0x01, 0xda, 0x01},
+ {0x03, 0x01, 0xdb, 0x00}, {0x06, 0x01, 0xdb, 0x00},
+ {0x0a, 0x01, 0xdb, 0x00}, {0x0f, 0x01, 0xdb, 0x00},
+ {0x18, 0x01, 0xdb, 0x00}, {0x1f, 0x01, 0xdb, 0x00},
+ {0x29, 0x01, 0xdb, 0x00}, {0x38, 0x01, 0xdb, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xee, 0x00}, {0x06, 0x01, 0xee, 0x00},
+ {0x0a, 0x01, 0xee, 0x00}, {0x0f, 0x01, 0xee, 0x00},
+ {0x18, 0x01, 0xee, 0x00}, {0x1f, 0x01, 0xee, 0x00},
+ {0x29, 0x01, 0xee, 0x00}, {0x38, 0x01, 0xee, 0x01},
+ {0x03, 0x01, 0xf0, 0x00}, {0x06, 0x01, 0xf0, 0x00},
+ {0x0a, 0x01, 0xf0, 0x00}, {0x0f, 0x01, 0xf0, 0x00},
+ {0x18, 0x01, 0xf0, 0x00}, {0x1f, 0x01, 0xf0, 0x00},
+ {0x29, 0x01, 0xf0, 0x00}, {0x38, 0x01, 0xf0, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xf2, 0x00}, {0x09, 0x01, 0xf2, 0x00},
+ {0x17, 0x01, 0xf2, 0x00}, {0x28, 0x01, 0xf2, 0x01},
+ {0x02, 0x01, 0xf3, 0x00}, {0x09, 0x01, 0xf3, 0x00},
+ {0x17, 0x01, 0xf3, 0x00}, {0x28, 0x01, 0xf3, 0x01},
+ {0x02, 0x01, 0xff, 0x00}, {0x09, 0x01, 0xff, 0x00},
+ {0x17, 0x01, 0xff, 0x00}, {0x28, 0x01, 0xff, 0x01},
+ {0x01, 0x01, 0xcb, 0x00}, {0x16, 0x01, 0xcb, 0x01},
+ {0x01, 0x01, 0xcc, 0x00}, {0x16, 0x01, 0xcc, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xf2, 0x00}, {0x06, 0x01, 0xf2, 0x00},
+ {0x0a, 0x01, 0xf2, 0x00}, {0x0f, 0x01, 0xf2, 0x00},
+ {0x18, 0x01, 0xf2, 0x00}, {0x1f, 0x01, 0xf2, 0x00},
+ {0x29, 0x01, 0xf2, 0x00}, {0x38, 0x01, 0xf2, 0x01},
+ {0x03, 0x01, 0xf3, 0x00}, {0x06, 0x01, 0xf3, 0x00},
+ {0x0a, 0x01, 0xf3, 0x00}, {0x0f, 0x01, 0xf3, 0x00},
+ {0x18, 0x01, 0xf3, 0x00}, {0x1f, 0x01, 0xf3, 0x00},
+ {0x29, 0x01, 0xf3, 0x00}, {0x38, 0x01, 0xf3, 0x01}
+ },
+ /* 205 */
+ {
+ {0x03, 0x01, 0xff, 0x00}, {0x06, 0x01, 0xff, 0x00},
+ {0x0a, 0x01, 0xff, 0x00}, {0x0f, 0x01, 0xff, 0x00},
+ {0x18, 0x01, 0xff, 0x00}, {0x1f, 0x01, 0xff, 0x00},
+ {0x29, 0x01, 0xff, 0x00}, {0x38, 0x01, 0xff, 0x01},
+ {0x02, 0x01, 0xcb, 0x00}, {0x09, 0x01, 0xcb, 0x00},
+ {0x17, 0x01, 0xcb, 0x00}, {0x28, 0x01, 0xcb, 0x01},
+ {0x02, 0x01, 0xcc, 0x00}, {0x09, 0x01, 0xcc, 0x00},
+ {0x17, 0x01, 0xcc, 0x00}, {0x28, 0x01, 0xcc, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xcb, 0x00}, {0x06, 0x01, 0xcb, 0x00},
+ {0x0a, 0x01, 0xcb, 0x00}, {0x0f, 0x01, 0xcb, 0x00},
+ {0x18, 0x01, 0xcb, 0x00}, {0x1f, 0x01, 0xcb, 0x00},
+ {0x29, 0x01, 0xcb, 0x00}, {0x38, 0x01, 0xcb, 0x01},
+ {0x03, 0x01, 0xcc, 0x00}, {0x06, 0x01, 0xcc, 0x00},
+ {0x0a, 0x01, 0xcc, 0x00}, {0x0f, 0x01, 0xcc, 0x00},
+ {0x18, 0x01, 0xcc, 0x00}, {0x1f, 0x01, 0xcc, 0x00},
+ {0x29, 0x01, 0xcc, 0x00}, {0x38, 0x01, 0xcc, 0x01}
+ },
+ {
+ {0xd3, 0x00, 0x00, 0x00}, {0xd4, 0x00, 0x00, 0x00},
+ {0xd6, 0x00, 0x00, 0x00}, {0xd7, 0x00, 0x00, 0x00},
+ {0xda, 0x00, 0x00, 0x00}, {0xdb, 0x00, 0x00, 0x00},
+ {0xdd, 0x00, 0x00, 0x00}, {0xde, 0x00, 0x00, 0x00},
+ {0xe2, 0x00, 0x00, 0x00}, {0xe4, 0x00, 0x00, 0x00},
+ {0xe8, 0x00, 0x00, 0x00}, {0xeb, 0x00, 0x00, 0x00},
+ {0xf0, 0x00, 0x00, 0x00}, {0xf3, 0x00, 0x00, 0x00},
+ {0xf7, 0x00, 0x00, 0x00}, {0xfa, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x00, 0x01, 0xd3, 0x01}, {0x00, 0x01, 0xd4, 0x01},
+ {0x00, 0x01, 0xd6, 0x01}, {0x00, 0x01, 0xdd, 0x01},
+ {0x00, 0x01, 0xde, 0x01}, {0x00, 0x01, 0xdf, 0x01},
+ {0x00, 0x01, 0xf1, 0x01}, {0x00, 0x01, 0xf4, 0x01},
+ {0x00, 0x01, 0xf5, 0x01}, {0x00, 0x01, 0xf6, 0x01},
+ {0x00, 0x01, 0xf7, 0x01}, {0x00, 0x01, 0xf8, 0x01},
+ {0x00, 0x01, 0xfa, 0x01}, {0x00, 0x01, 0xfb, 0x01},
+ {0x00, 0x01, 0xfc, 0x01}, {0x00, 0x01, 0xfd, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xd3, 0x00}, {0x16, 0x01, 0xd3, 0x01},
+ {0x01, 0x01, 0xd4, 0x00}, {0x16, 0x01, 0xd4, 0x01},
+ {0x01, 0x01, 0xd6, 0x00}, {0x16, 0x01, 0xd6, 0x01},
+ {0x01, 0x01, 0xdd, 0x00}, {0x16, 0x01, 0xdd, 0x01},
+ {0x01, 0x01, 0xde, 0x00}, {0x16, 0x01, 0xde, 0x01},
+ {0x01, 0x01, 0xdf, 0x00}, {0x16, 0x01, 0xdf, 0x01},
+ {0x01, 0x01, 0xf1, 0x00}, {0x16, 0x01, 0xf1, 0x01},
+ {0x01, 0x01, 0xf4, 0x00}, {0x16, 0x01, 0xf4, 0x01}
+ },
+ /* 210 */
+ {
+ {0x02, 0x01, 0xd3, 0x00}, {0x09, 0x01, 0xd3, 0x00},
+ {0x17, 0x01, 0xd3, 0x00}, {0x28, 0x01, 0xd3, 0x01},
+ {0x02, 0x01, 0xd4, 0x00}, {0x09, 0x01, 0xd4, 0x00},
+ {0x17, 0x01, 0xd4, 0x00}, {0x28, 0x01, 0xd4, 0x01},
+ {0x02, 0x01, 0xd6, 0x00}, {0x09, 0x01, 0xd6, 0x00},
+ {0x17, 0x01, 0xd6, 0x00}, {0x28, 0x01, 0xd6, 0x01},
+ {0x02, 0x01, 0xdd, 0x00}, {0x09, 0x01, 0xdd, 0x00},
+ {0x17, 0x01, 0xdd, 0x00}, {0x28, 0x01, 0xdd, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xd3, 0x00}, {0x06, 0x01, 0xd3, 0x00},
+ {0x0a, 0x01, 0xd3, 0x00}, {0x0f, 0x01, 0xd3, 0x00},
+ {0x18, 0x01, 0xd3, 0x00}, {0x1f, 0x01, 0xd3, 0x00},
+ {0x29, 0x01, 0xd3, 0x00}, {0x38, 0x01, 0xd3, 0x01},
+ {0x03, 0x01, 0xd4, 0x00}, {0x06, 0x01, 0xd4, 0x00},
+ {0x0a, 0x01, 0xd4, 0x00}, {0x0f, 0x01, 0xd4, 0x00},
+ {0x18, 0x01, 0xd4, 0x00}, {0x1f, 0x01, 0xd4, 0x00},
+ {0x29, 0x01, 0xd4, 0x00}, {0x38, 0x01, 0xd4, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xd6, 0x00}, {0x06, 0x01, 0xd6, 0x00},
+ {0x0a, 0x01, 0xd6, 0x00}, {0x0f, 0x01, 0xd6, 0x00},
+ {0x18, 0x01, 0xd6, 0x00}, {0x1f, 0x01, 0xd6, 0x00},
+ {0x29, 0x01, 0xd6, 0x00}, {0x38, 0x01, 0xd6, 0x01},
+ {0x03, 0x01, 0xdd, 0x00}, {0x06, 0x01, 0xdd, 0x00},
+ {0x0a, 0x01, 0xdd, 0x00}, {0x0f, 0x01, 0xdd, 0x00},
+ {0x18, 0x01, 0xdd, 0x00}, {0x1f, 0x01, 0xdd, 0x00},
+ {0x29, 0x01, 0xdd, 0x00}, {0x38, 0x01, 0xdd, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xde, 0x00}, {0x09, 0x01, 0xde, 0x00},
+ {0x17, 0x01, 0xde, 0x00}, {0x28, 0x01, 0xde, 0x01},
+ {0x02, 0x01, 0xdf, 0x00}, {0x09, 0x01, 0xdf, 0x00},
+ {0x17, 0x01, 0xdf, 0x00}, {0x28, 0x01, 0xdf, 0x01},
+ {0x02, 0x01, 0xf1, 0x00}, {0x09, 0x01, 0xf1, 0x00},
+ {0x17, 0x01, 0xf1, 0x00}, {0x28, 0x01, 0xf1, 0x01},
+ {0x02, 0x01, 0xf4, 0x00}, {0x09, 0x01, 0xf4, 0x00},
+ {0x17, 0x01, 0xf4, 0x00}, {0x28, 0x01, 0xf4, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xde, 0x00}, {0x06, 0x01, 0xde, 0x00},
+ {0x0a, 0x01, 0xde, 0x00}, {0x0f, 0x01, 0xde, 0x00},
+ {0x18, 0x01, 0xde, 0x00}, {0x1f, 0x01, 0xde, 0x00},
+ {0x29, 0x01, 0xde, 0x00}, {0x38, 0x01, 0xde, 0x01},
+ {0x03, 0x01, 0xdf, 0x00}, {0x06, 0x01, 0xdf, 0x00},
+ {0x0a, 0x01, 0xdf, 0x00}, {0x0f, 0x01, 0xdf, 0x00},
+ {0x18, 0x01, 0xdf, 0x00}, {0x1f, 0x01, 0xdf, 0x00},
+ {0x29, 0x01, 0xdf, 0x00}, {0x38, 0x01, 0xdf, 0x01}
+ },
+ /* 215 */
+ {
+ {0x03, 0x01, 0xf1, 0x00}, {0x06, 0x01, 0xf1, 0x00},
+ {0x0a, 0x01, 0xf1, 0x00}, {0x0f, 0x01, 0xf1, 0x00},
+ {0x18, 0x01, 0xf1, 0x00}, {0x1f, 0x01, 0xf1, 0x00},
+ {0x29, 0x01, 0xf1, 0x00}, {0x38, 0x01, 0xf1, 0x01},
+ {0x03, 0x01, 0xf4, 0x00}, {0x06, 0x01, 0xf4, 0x00},
+ {0x0a, 0x01, 0xf4, 0x00}, {0x0f, 0x01, 0xf4, 0x00},
+ {0x18, 0x01, 0xf4, 0x00}, {0x1f, 0x01, 0xf4, 0x00},
+ {0x29, 0x01, 0xf4, 0x00}, {0x38, 0x01, 0xf4, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xf5, 0x00}, {0x16, 0x01, 0xf5, 0x01},
+ {0x01, 0x01, 0xf6, 0x00}, {0x16, 0x01, 0xf6, 0x01},
+ {0x01, 0x01, 0xf7, 0x00}, {0x16, 0x01, 0xf7, 0x01},
+ {0x01, 0x01, 0xf8, 0x00}, {0x16, 0x01, 0xf8, 0x01},
+ {0x01, 0x01, 0xfa, 0x00}, {0x16, 0x01, 0xfa, 0x01},
+ {0x01, 0x01, 0xfb, 0x00}, {0x16, 0x01, 0xfb, 0x01},
+ {0x01, 0x01, 0xfc, 0x00}, {0x16, 0x01, 0xfc, 0x01},
+ {0x01, 0x01, 0xfd, 0x00}, {0x16, 0x01, 0xfd, 0x01}
+ },
+ {
+ {0x02, 0x01, 0xf5, 0x00}, {0x09, 0x01, 0xf5, 0x00},
+ {0x17, 0x01, 0xf5, 0x00}, {0x28, 0x01, 0xf5, 0x01},
+ {0x02, 0x01, 0xf6, 0x00}, {0x09, 0x01, 0xf6, 0x00},
+ {0x17, 0x01, 0xf6, 0x00}, {0x28, 0x01, 0xf6, 0x01},
+ {0x02, 0x01, 0xf7, 0x00}, {0x09, 0x01, 0xf7, 0x00},
+ {0x17, 0x01, 0xf7, 0x00}, {0x28, 0x01, 0xf7, 0x01},
+ {0x02, 0x01, 0xf8, 0x00}, {0x09, 0x01, 0xf8, 0x00},
+ {0x17, 0x01, 0xf8, 0x00}, {0x28, 0x01, 0xf8, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xf5, 0x00}, {0x06, 0x01, 0xf5, 0x00},
+ {0x0a, 0x01, 0xf5, 0x00}, {0x0f, 0x01, 0xf5, 0x00},
+ {0x18, 0x01, 0xf5, 0x00}, {0x1f, 0x01, 0xf5, 0x00},
+ {0x29, 0x01, 0xf5, 0x00}, {0x38, 0x01, 0xf5, 0x01},
+ {0x03, 0x01, 0xf6, 0x00}, {0x06, 0x01, 0xf6, 0x00},
+ {0x0a, 0x01, 0xf6, 0x00}, {0x0f, 0x01, 0xf6, 0x00},
+ {0x18, 0x01, 0xf6, 0x00}, {0x1f, 0x01, 0xf6, 0x00},
+ {0x29, 0x01, 0xf6, 0x00}, {0x38, 0x01, 0xf6, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xf7, 0x00}, {0x06, 0x01, 0xf7, 0x00},
+ {0x0a, 0x01, 0xf7, 0x00}, {0x0f, 0x01, 0xf7, 0x00},
+ {0x18, 0x01, 0xf7, 0x00}, {0x1f, 0x01, 0xf7, 0x00},
+ {0x29, 0x01, 0xf7, 0x00}, {0x38, 0x01, 0xf7, 0x01},
+ {0x03, 0x01, 0xf8, 0x00}, {0x06, 0x01, 0xf8, 0x00},
+ {0x0a, 0x01, 0xf8, 0x00}, {0x0f, 0x01, 0xf8, 0x00},
+ {0x18, 0x01, 0xf8, 0x00}, {0x1f, 0x01, 0xf8, 0x00},
+ {0x29, 0x01, 0xf8, 0x00}, {0x38, 0x01, 0xf8, 0x01}
+ },
+ /* 220 */
+ {
+ {0x02, 0x01, 0xfa, 0x00}, {0x09, 0x01, 0xfa, 0x00},
+ {0x17, 0x01, 0xfa, 0x00}, {0x28, 0x01, 0xfa, 0x01},
+ {0x02, 0x01, 0xfb, 0x00}, {0x09, 0x01, 0xfb, 0x00},
+ {0x17, 0x01, 0xfb, 0x00}, {0x28, 0x01, 0xfb, 0x01},
+ {0x02, 0x01, 0xfc, 0x00}, {0x09, 0x01, 0xfc, 0x00},
+ {0x17, 0x01, 0xfc, 0x00}, {0x28, 0x01, 0xfc, 0x01},
+ {0x02, 0x01, 0xfd, 0x00}, {0x09, 0x01, 0xfd, 0x00},
+ {0x17, 0x01, 0xfd, 0x00}, {0x28, 0x01, 0xfd, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xfa, 0x00}, {0x06, 0x01, 0xfa, 0x00},
+ {0x0a, 0x01, 0xfa, 0x00}, {0x0f, 0x01, 0xfa, 0x00},
+ {0x18, 0x01, 0xfa, 0x00}, {0x1f, 0x01, 0xfa, 0x00},
+ {0x29, 0x01, 0xfa, 0x00}, {0x38, 0x01, 0xfa, 0x01},
+ {0x03, 0x01, 0xfb, 0x00}, {0x06, 0x01, 0xfb, 0x00},
+ {0x0a, 0x01, 0xfb, 0x00}, {0x0f, 0x01, 0xfb, 0x00},
+ {0x18, 0x01, 0xfb, 0x00}, {0x1f, 0x01, 0xfb, 0x00},
+ {0x29, 0x01, 0xfb, 0x00}, {0x38, 0x01, 0xfb, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xfc, 0x00}, {0x06, 0x01, 0xfc, 0x00},
+ {0x0a, 0x01, 0xfc, 0x00}, {0x0f, 0x01, 0xfc, 0x00},
+ {0x18, 0x01, 0xfc, 0x00}, {0x1f, 0x01, 0xfc, 0x00},
+ {0x29, 0x01, 0xfc, 0x00}, {0x38, 0x01, 0xfc, 0x01},
+ {0x03, 0x01, 0xfd, 0x00}, {0x06, 0x01, 0xfd, 0x00},
+ {0x0a, 0x01, 0xfd, 0x00}, {0x0f, 0x01, 0xfd, 0x00},
+ {0x18, 0x01, 0xfd, 0x00}, {0x1f, 0x01, 0xfd, 0x00},
+ {0x29, 0x01, 0xfd, 0x00}, {0x38, 0x01, 0xfd, 0x01}
+ },
+ {
+ {0x00, 0x01, 0xfe, 0x01}, {0xe3, 0x00, 0x00, 0x00},
+ {0xe5, 0x00, 0x00, 0x00}, {0xe6, 0x00, 0x00, 0x00},
+ {0xe9, 0x00, 0x00, 0x00}, {0xea, 0x00, 0x00, 0x00},
+ {0xec, 0x00, 0x00, 0x00}, {0xed, 0x00, 0x00, 0x00},
+ {0xf1, 0x00, 0x00, 0x00}, {0xf2, 0x00, 0x00, 0x00},
+ {0xf4, 0x00, 0x00, 0x00}, {0xf5, 0x00, 0x00, 0x00},
+ {0xf8, 0x00, 0x00, 0x00}, {0xf9, 0x00, 0x00, 0x00},
+ {0xfb, 0x00, 0x00, 0x00}, {0xfc, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x01, 0x01, 0xfe, 0x00}, {0x16, 0x01, 0xfe, 0x01},
+ {0x00, 0x01, 0x02, 0x01}, {0x00, 0x01, 0x03, 0x01},
+ {0x00, 0x01, 0x04, 0x01}, {0x00, 0x01, 0x05, 0x01},
+ {0x00, 0x01, 0x06, 0x01}, {0x00, 0x01, 0x07, 0x01},
+ {0x00, 0x01, 0x08, 0x01}, {0x00, 0x01, 0x0b, 0x01},
+ {0x00, 0x01, 0x0c, 0x01}, {0x00, 0x01, 0x0e, 0x01},
+ {0x00, 0x01, 0x0f, 0x01}, {0x00, 0x01, 0x10, 0x01},
+ {0x00, 0x01, 0x11, 0x01}, {0x00, 0x01, 0x12, 0x01}
+ },
+ /* 225 */
+ {
+ {0x02, 0x01, 0xfe, 0x00}, {0x09, 0x01, 0xfe, 0x00},
+ {0x17, 0x01, 0xfe, 0x00}, {0x28, 0x01, 0xfe, 0x01},
+ {0x01, 0x01, 0x02, 0x00}, {0x16, 0x01, 0x02, 0x01},
+ {0x01, 0x01, 0x03, 0x00}, {0x16, 0x01, 0x03, 0x01},
+ {0x01, 0x01, 0x04, 0x00}, {0x16, 0x01, 0x04, 0x01},
+ {0x01, 0x01, 0x05, 0x00}, {0x16, 0x01, 0x05, 0x01},
+ {0x01, 0x01, 0x06, 0x00}, {0x16, 0x01, 0x06, 0x01},
+ {0x01, 0x01, 0x07, 0x00}, {0x16, 0x01, 0x07, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xfe, 0x00}, {0x06, 0x01, 0xfe, 0x00},
+ {0x0a, 0x01, 0xfe, 0x00}, {0x0f, 0x01, 0xfe, 0x00},
+ {0x18, 0x01, 0xfe, 0x00}, {0x1f, 0x01, 0xfe, 0x00},
+ {0x29, 0x01, 0xfe, 0x00}, {0x38, 0x01, 0xfe, 0x01},
+ {0x02, 0x01, 0x02, 0x00}, {0x09, 0x01, 0x02, 0x00},
+ {0x17, 0x01, 0x02, 0x00}, {0x28, 0x01, 0x02, 0x01},
+ {0x02, 0x01, 0x03, 0x00}, {0x09, 0x01, 0x03, 0x00},
+ {0x17, 0x01, 0x03, 0x00}, {0x28, 0x01, 0x03, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x02, 0x00}, {0x06, 0x01, 0x02, 0x00},
+ {0x0a, 0x01, 0x02, 0x00}, {0x0f, 0x01, 0x02, 0x00},
+ {0x18, 0x01, 0x02, 0x00}, {0x1f, 0x01, 0x02, 0x00},
+ {0x29, 0x01, 0x02, 0x00}, {0x38, 0x01, 0x02, 0x01},
+ {0x03, 0x01, 0x03, 0x00}, {0x06, 0x01, 0x03, 0x00},
+ {0x0a, 0x01, 0x03, 0x00}, {0x0f, 0x01, 0x03, 0x00},
+ {0x18, 0x01, 0x03, 0x00}, {0x1f, 0x01, 0x03, 0x00},
+ {0x29, 0x01, 0x03, 0x00}, {0x38, 0x01, 0x03, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x04, 0x00}, {0x09, 0x01, 0x04, 0x00},
+ {0x17, 0x01, 0x04, 0x00}, {0x28, 0x01, 0x04, 0x01},
+ {0x02, 0x01, 0x05, 0x00}, {0x09, 0x01, 0x05, 0x00},
+ {0x17, 0x01, 0x05, 0x00}, {0x28, 0x01, 0x05, 0x01},
+ {0x02, 0x01, 0x06, 0x00}, {0x09, 0x01, 0x06, 0x00},
+ {0x17, 0x01, 0x06, 0x00}, {0x28, 0x01, 0x06, 0x01},
+ {0x02, 0x01, 0x07, 0x00}, {0x09, 0x01, 0x07, 0x00},
+ {0x17, 0x01, 0x07, 0x00}, {0x28, 0x01, 0x07, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x04, 0x00}, {0x06, 0x01, 0x04, 0x00},
+ {0x0a, 0x01, 0x04, 0x00}, {0x0f, 0x01, 0x04, 0x00},
+ {0x18, 0x01, 0x04, 0x00}, {0x1f, 0x01, 0x04, 0x00},
+ {0x29, 0x01, 0x04, 0x00}, {0x38, 0x01, 0x04, 0x01},
+ {0x03, 0x01, 0x05, 0x00}, {0x06, 0x01, 0x05, 0x00},
+ {0x0a, 0x01, 0x05, 0x00}, {0x0f, 0x01, 0x05, 0x00},
+ {0x18, 0x01, 0x05, 0x00}, {0x1f, 0x01, 0x05, 0x00},
+ {0x29, 0x01, 0x05, 0x00}, {0x38, 0x01, 0x05, 0x01}
+ },
+ /* 230 */
+ {
+ {0x03, 0x01, 0x06, 0x00}, {0x06, 0x01, 0x06, 0x00},
+ {0x0a, 0x01, 0x06, 0x00}, {0x0f, 0x01, 0x06, 0x00},
+ {0x18, 0x01, 0x06, 0x00}, {0x1f, 0x01, 0x06, 0x00},
+ {0x29, 0x01, 0x06, 0x00}, {0x38, 0x01, 0x06, 0x01},
+ {0x03, 0x01, 0x07, 0x00}, {0x06, 0x01, 0x07, 0x00},
+ {0x0a, 0x01, 0x07, 0x00}, {0x0f, 0x01, 0x07, 0x00},
+ {0x18, 0x01, 0x07, 0x00}, {0x1f, 0x01, 0x07, 0x00},
+ {0x29, 0x01, 0x07, 0x00}, {0x38, 0x01, 0x07, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x08, 0x00}, {0x16, 0x01, 0x08, 0x01},
+ {0x01, 0x01, 0x0b, 0x00}, {0x16, 0x01, 0x0b, 0x01},
+ {0x01, 0x01, 0x0c, 0x00}, {0x16, 0x01, 0x0c, 0x01},
+ {0x01, 0x01, 0x0e, 0x00}, {0x16, 0x01, 0x0e, 0x01},
+ {0x01, 0x01, 0x0f, 0x00}, {0x16, 0x01, 0x0f, 0x01},
+ {0x01, 0x01, 0x10, 0x00}, {0x16, 0x01, 0x10, 0x01},
+ {0x01, 0x01, 0x11, 0x00}, {0x16, 0x01, 0x11, 0x01},
+ {0x01, 0x01, 0x12, 0x00}, {0x16, 0x01, 0x12, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x08, 0x00}, {0x09, 0x01, 0x08, 0x00},
+ {0x17, 0x01, 0x08, 0x00}, {0x28, 0x01, 0x08, 0x01},
+ {0x02, 0x01, 0x0b, 0x00}, {0x09, 0x01, 0x0b, 0x00},
+ {0x17, 0x01, 0x0b, 0x00}, {0x28, 0x01, 0x0b, 0x01},
+ {0x02, 0x01, 0x0c, 0x00}, {0x09, 0x01, 0x0c, 0x00},
+ {0x17, 0x01, 0x0c, 0x00}, {0x28, 0x01, 0x0c, 0x01},
+ {0x02, 0x01, 0x0e, 0x00}, {0x09, 0x01, 0x0e, 0x00},
+ {0x17, 0x01, 0x0e, 0x00}, {0x28, 0x01, 0x0e, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x08, 0x00}, {0x06, 0x01, 0x08, 0x00},
+ {0x0a, 0x01, 0x08, 0x00}, {0x0f, 0x01, 0x08, 0x00},
+ {0x18, 0x01, 0x08, 0x00}, {0x1f, 0x01, 0x08, 0x00},
+ {0x29, 0x01, 0x08, 0x00}, {0x38, 0x01, 0x08, 0x01},
+ {0x03, 0x01, 0x0b, 0x00}, {0x06, 0x01, 0x0b, 0x00},
+ {0x0a, 0x01, 0x0b, 0x00}, {0x0f, 0x01, 0x0b, 0x00},
+ {0x18, 0x01, 0x0b, 0x00}, {0x1f, 0x01, 0x0b, 0x00},
+ {0x29, 0x01, 0x0b, 0x00}, {0x38, 0x01, 0x0b, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x0c, 0x00}, {0x06, 0x01, 0x0c, 0x00},
+ {0x0a, 0x01, 0x0c, 0x00}, {0x0f, 0x01, 0x0c, 0x00},
+ {0x18, 0x01, 0x0c, 0x00}, {0x1f, 0x01, 0x0c, 0x00},
+ {0x29, 0x01, 0x0c, 0x00}, {0x38, 0x01, 0x0c, 0x01},
+ {0x03, 0x01, 0x0e, 0x00}, {0x06, 0x01, 0x0e, 0x00},
+ {0x0a, 0x01, 0x0e, 0x00}, {0x0f, 0x01, 0x0e, 0x00},
+ {0x18, 0x01, 0x0e, 0x00}, {0x1f, 0x01, 0x0e, 0x00},
+ {0x29, 0x01, 0x0e, 0x00}, {0x38, 0x01, 0x0e, 0x01}
+ },
+ /* 235 */
+ {
+ {0x02, 0x01, 0x0f, 0x00}, {0x09, 0x01, 0x0f, 0x00},
+ {0x17, 0x01, 0x0f, 0x00}, {0x28, 0x01, 0x0f, 0x01},
+ {0x02, 0x01, 0x10, 0x00}, {0x09, 0x01, 0x10, 0x00},
+ {0x17, 0x01, 0x10, 0x00}, {0x28, 0x01, 0x10, 0x01},
+ {0x02, 0x01, 0x11, 0x00}, {0x09, 0x01, 0x11, 0x00},
+ {0x17, 0x01, 0x11, 0x00}, {0x28, 0x01, 0x11, 0x01},
+ {0x02, 0x01, 0x12, 0x00}, {0x09, 0x01, 0x12, 0x00},
+ {0x17, 0x01, 0x12, 0x00}, {0x28, 0x01, 0x12, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x0f, 0x00}, {0x06, 0x01, 0x0f, 0x00},
+ {0x0a, 0x01, 0x0f, 0x00}, {0x0f, 0x01, 0x0f, 0x00},
+ {0x18, 0x01, 0x0f, 0x00}, {0x1f, 0x01, 0x0f, 0x00},
+ {0x29, 0x01, 0x0f, 0x00}, {0x38, 0x01, 0x0f, 0x01},
+ {0x03, 0x01, 0x10, 0x00}, {0x06, 0x01, 0x10, 0x00},
+ {0x0a, 0x01, 0x10, 0x00}, {0x0f, 0x01, 0x10, 0x00},
+ {0x18, 0x01, 0x10, 0x00}, {0x1f, 0x01, 0x10, 0x00},
+ {0x29, 0x01, 0x10, 0x00}, {0x38, 0x01, 0x10, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x11, 0x00}, {0x06, 0x01, 0x11, 0x00},
+ {0x0a, 0x01, 0x11, 0x00}, {0x0f, 0x01, 0x11, 0x00},
+ {0x18, 0x01, 0x11, 0x00}, {0x1f, 0x01, 0x11, 0x00},
+ {0x29, 0x01, 0x11, 0x00}, {0x38, 0x01, 0x11, 0x01},
+ {0x03, 0x01, 0x12, 0x00}, {0x06, 0x01, 0x12, 0x00},
+ {0x0a, 0x01, 0x12, 0x00}, {0x0f, 0x01, 0x12, 0x00},
+ {0x18, 0x01, 0x12, 0x00}, {0x1f, 0x01, 0x12, 0x00},
+ {0x29, 0x01, 0x12, 0x00}, {0x38, 0x01, 0x12, 0x01}
+ },
+ {
+ {0x00, 0x01, 0x13, 0x01}, {0x00, 0x01, 0x14, 0x01},
+ {0x00, 0x01, 0x15, 0x01}, {0x00, 0x01, 0x17, 0x01},
+ {0x00, 0x01, 0x18, 0x01}, {0x00, 0x01, 0x19, 0x01},
+ {0x00, 0x01, 0x1a, 0x01}, {0x00, 0x01, 0x1b, 0x01},
+ {0x00, 0x01, 0x1c, 0x01}, {0x00, 0x01, 0x1d, 0x01},
+ {0x00, 0x01, 0x1e, 0x01}, {0x00, 0x01, 0x1f, 0x01},
+ {0x00, 0x01, 0x7f, 0x01}, {0x00, 0x01, 0xdc, 0x01},
+ {0x00, 0x01, 0xf9, 0x01}, {0xfd, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x13, 0x00}, {0x16, 0x01, 0x13, 0x01},
+ {0x01, 0x01, 0x14, 0x00}, {0x16, 0x01, 0x14, 0x01},
+ {0x01, 0x01, 0x15, 0x00}, {0x16, 0x01, 0x15, 0x01},
+ {0x01, 0x01, 0x17, 0x00}, {0x16, 0x01, 0x17, 0x01},
+ {0x01, 0x01, 0x18, 0x00}, {0x16, 0x01, 0x18, 0x01},
+ {0x01, 0x01, 0x19, 0x00}, {0x16, 0x01, 0x19, 0x01},
+ {0x01, 0x01, 0x1a, 0x00}, {0x16, 0x01, 0x1a, 0x01},
+ {0x01, 0x01, 0x1b, 0x00}, {0x16, 0x01, 0x1b, 0x01}
+ },
+ /* 240 */
+ {
+ {0x02, 0x01, 0x13, 0x00}, {0x09, 0x01, 0x13, 0x00},
+ {0x17, 0x01, 0x13, 0x00}, {0x28, 0x01, 0x13, 0x01},
+ {0x02, 0x01, 0x14, 0x00}, {0x09, 0x01, 0x14, 0x00},
+ {0x17, 0x01, 0x14, 0x00}, {0x28, 0x01, 0x14, 0x01},
+ {0x02, 0x01, 0x15, 0x00}, {0x09, 0x01, 0x15, 0x00},
+ {0x17, 0x01, 0x15, 0x00}, {0x28, 0x01, 0x15, 0x01},
+ {0x02, 0x01, 0x17, 0x00}, {0x09, 0x01, 0x17, 0x00},
+ {0x17, 0x01, 0x17, 0x00}, {0x28, 0x01, 0x17, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x13, 0x00}, {0x06, 0x01, 0x13, 0x00},
+ {0x0a, 0x01, 0x13, 0x00}, {0x0f, 0x01, 0x13, 0x00},
+ {0x18, 0x01, 0x13, 0x00}, {0x1f, 0x01, 0x13, 0x00},
+ {0x29, 0x01, 0x13, 0x00}, {0x38, 0x01, 0x13, 0x01},
+ {0x03, 0x01, 0x14, 0x00}, {0x06, 0x01, 0x14, 0x00},
+ {0x0a, 0x01, 0x14, 0x00}, {0x0f, 0x01, 0x14, 0x00},
+ {0x18, 0x01, 0x14, 0x00}, {0x1f, 0x01, 0x14, 0x00},
+ {0x29, 0x01, 0x14, 0x00}, {0x38, 0x01, 0x14, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x15, 0x00}, {0x06, 0x01, 0x15, 0x00},
+ {0x0a, 0x01, 0x15, 0x00}, {0x0f, 0x01, 0x15, 0x00},
+ {0x18, 0x01, 0x15, 0x00}, {0x1f, 0x01, 0x15, 0x00},
+ {0x29, 0x01, 0x15, 0x00}, {0x38, 0x01, 0x15, 0x01},
+ {0x03, 0x01, 0x17, 0x00}, {0x06, 0x01, 0x17, 0x00},
+ {0x0a, 0x01, 0x17, 0x00}, {0x0f, 0x01, 0x17, 0x00},
+ {0x18, 0x01, 0x17, 0x00}, {0x1f, 0x01, 0x17, 0x00},
+ {0x29, 0x01, 0x17, 0x00}, {0x38, 0x01, 0x17, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x18, 0x00}, {0x09, 0x01, 0x18, 0x00},
+ {0x17, 0x01, 0x18, 0x00}, {0x28, 0x01, 0x18, 0x01},
+ {0x02, 0x01, 0x19, 0x00}, {0x09, 0x01, 0x19, 0x00},
+ {0x17, 0x01, 0x19, 0x00}, {0x28, 0x01, 0x19, 0x01},
+ {0x02, 0x01, 0x1a, 0x00}, {0x09, 0x01, 0x1a, 0x00},
+ {0x17, 0x01, 0x1a, 0x00}, {0x28, 0x01, 0x1a, 0x01},
+ {0x02, 0x01, 0x1b, 0x00}, {0x09, 0x01, 0x1b, 0x00},
+ {0x17, 0x01, 0x1b, 0x00}, {0x28, 0x01, 0x1b, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x18, 0x00}, {0x06, 0x01, 0x18, 0x00},
+ {0x0a, 0x01, 0x18, 0x00}, {0x0f, 0x01, 0x18, 0x00},
+ {0x18, 0x01, 0x18, 0x00}, {0x1f, 0x01, 0x18, 0x00},
+ {0x29, 0x01, 0x18, 0x00}, {0x38, 0x01, 0x18, 0x01},
+ {0x03, 0x01, 0x19, 0x00}, {0x06, 0x01, 0x19, 0x00},
+ {0x0a, 0x01, 0x19, 0x00}, {0x0f, 0x01, 0x19, 0x00},
+ {0x18, 0x01, 0x19, 0x00}, {0x1f, 0x01, 0x19, 0x00},
+ {0x29, 0x01, 0x19, 0x00}, {0x38, 0x01, 0x19, 0x01}
+ },
+ /* 245 */
+ {
+ {0x03, 0x01, 0x1a, 0x00}, {0x06, 0x01, 0x1a, 0x00},
+ {0x0a, 0x01, 0x1a, 0x00}, {0x0f, 0x01, 0x1a, 0x00},
+ {0x18, 0x01, 0x1a, 0x00}, {0x1f, 0x01, 0x1a, 0x00},
+ {0x29, 0x01, 0x1a, 0x00}, {0x38, 0x01, 0x1a, 0x01},
+ {0x03, 0x01, 0x1b, 0x00}, {0x06, 0x01, 0x1b, 0x00},
+ {0x0a, 0x01, 0x1b, 0x00}, {0x0f, 0x01, 0x1b, 0x00},
+ {0x18, 0x01, 0x1b, 0x00}, {0x1f, 0x01, 0x1b, 0x00},
+ {0x29, 0x01, 0x1b, 0x00}, {0x38, 0x01, 0x1b, 0x01}
+ },
+ {
+ {0x01, 0x01, 0x1c, 0x00}, {0x16, 0x01, 0x1c, 0x01},
+ {0x01, 0x01, 0x1d, 0x00}, {0x16, 0x01, 0x1d, 0x01},
+ {0x01, 0x01, 0x1e, 0x00}, {0x16, 0x01, 0x1e, 0x01},
+ {0x01, 0x01, 0x1f, 0x00}, {0x16, 0x01, 0x1f, 0x01},
+ {0x01, 0x01, 0x7f, 0x00}, {0x16, 0x01, 0x7f, 0x01},
+ {0x01, 0x01, 0xdc, 0x00}, {0x16, 0x01, 0xdc, 0x01},
+ {0x01, 0x01, 0xf9, 0x00}, {0x16, 0x01, 0xf9, 0x01},
+ {0xfe, 0x00, 0x00, 0x00}, {0xff, 0x00, 0x00, 0x01}
+ },
+ {
+ {0x02, 0x01, 0x1c, 0x00}, {0x09, 0x01, 0x1c, 0x00},
+ {0x17, 0x01, 0x1c, 0x00}, {0x28, 0x01, 0x1c, 0x01},
+ {0x02, 0x01, 0x1d, 0x00}, {0x09, 0x01, 0x1d, 0x00},
+ {0x17, 0x01, 0x1d, 0x00}, {0x28, 0x01, 0x1d, 0x01},
+ {0x02, 0x01, 0x1e, 0x00}, {0x09, 0x01, 0x1e, 0x00},
+ {0x17, 0x01, 0x1e, 0x00}, {0x28, 0x01, 0x1e, 0x01},
+ {0x02, 0x01, 0x1f, 0x00}, {0x09, 0x01, 0x1f, 0x00},
+ {0x17, 0x01, 0x1f, 0x00}, {0x28, 0x01, 0x1f, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x1c, 0x00}, {0x06, 0x01, 0x1c, 0x00},
+ {0x0a, 0x01, 0x1c, 0x00}, {0x0f, 0x01, 0x1c, 0x00},
+ {0x18, 0x01, 0x1c, 0x00}, {0x1f, 0x01, 0x1c, 0x00},
+ {0x29, 0x01, 0x1c, 0x00}, {0x38, 0x01, 0x1c, 0x01},
+ {0x03, 0x01, 0x1d, 0x00}, {0x06, 0x01, 0x1d, 0x00},
+ {0x0a, 0x01, 0x1d, 0x00}, {0x0f, 0x01, 0x1d, 0x00},
+ {0x18, 0x01, 0x1d, 0x00}, {0x1f, 0x01, 0x1d, 0x00},
+ {0x29, 0x01, 0x1d, 0x00}, {0x38, 0x01, 0x1d, 0x01}
+ },
+ {
+ {0x03, 0x01, 0x1e, 0x00}, {0x06, 0x01, 0x1e, 0x00},
+ {0x0a, 0x01, 0x1e, 0x00}, {0x0f, 0x01, 0x1e, 0x00},
+ {0x18, 0x01, 0x1e, 0x00}, {0x1f, 0x01, 0x1e, 0x00},
+ {0x29, 0x01, 0x1e, 0x00}, {0x38, 0x01, 0x1e, 0x01},
+ {0x03, 0x01, 0x1f, 0x00}, {0x06, 0x01, 0x1f, 0x00},
+ {0x0a, 0x01, 0x1f, 0x00}, {0x0f, 0x01, 0x1f, 0x00},
+ {0x18, 0x01, 0x1f, 0x00}, {0x1f, 0x01, 0x1f, 0x00},
+ {0x29, 0x01, 0x1f, 0x00}, {0x38, 0x01, 0x1f, 0x01}
+ },
+ /* 250 */
+ {
+ {0x02, 0x01, 0x7f, 0x00}, {0x09, 0x01, 0x7f, 0x00},
+ {0x17, 0x01, 0x7f, 0x00}, {0x28, 0x01, 0x7f, 0x01},
+ {0x02, 0x01, 0xdc, 0x00}, {0x09, 0x01, 0xdc, 0x00},
+ {0x17, 0x01, 0xdc, 0x00}, {0x28, 0x01, 0xdc, 0x01},
+ {0x02, 0x01, 0xf9, 0x00}, {0x09, 0x01, 0xf9, 0x00},
+ {0x17, 0x01, 0xf9, 0x00}, {0x28, 0x01, 0xf9, 0x01},
+ {0x00, 0x01, 0x0a, 0x01}, {0x00, 0x01, 0x0d, 0x01},
+ {0x00, 0x01, 0x16, 0x01}, {0xfa, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x03, 0x01, 0x7f, 0x00}, {0x06, 0x01, 0x7f, 0x00},
+ {0x0a, 0x01, 0x7f, 0x00}, {0x0f, 0x01, 0x7f, 0x00},
+ {0x18, 0x01, 0x7f, 0x00}, {0x1f, 0x01, 0x7f, 0x00},
+ {0x29, 0x01, 0x7f, 0x00}, {0x38, 0x01, 0x7f, 0x01},
+ {0x03, 0x01, 0xdc, 0x00}, {0x06, 0x01, 0xdc, 0x00},
+ {0x0a, 0x01, 0xdc, 0x00}, {0x0f, 0x01, 0xdc, 0x00},
+ {0x18, 0x01, 0xdc, 0x00}, {0x1f, 0x01, 0xdc, 0x00},
+ {0x29, 0x01, 0xdc, 0x00}, {0x38, 0x01, 0xdc, 0x01}
+ },
+ {
+ {0x03, 0x01, 0xf9, 0x00}, {0x06, 0x01, 0xf9, 0x00},
+ {0x0a, 0x01, 0xf9, 0x00}, {0x0f, 0x01, 0xf9, 0x00},
+ {0x18, 0x01, 0xf9, 0x00}, {0x1f, 0x01, 0xf9, 0x00},
+ {0x29, 0x01, 0xf9, 0x00}, {0x38, 0x01, 0xf9, 0x01},
+ {0x01, 0x01, 0x0a, 0x00}, {0x16, 0x01, 0x0a, 0x01},
+ {0x01, 0x01, 0x0d, 0x00}, {0x16, 0x01, 0x0d, 0x01},
+ {0x01, 0x01, 0x16, 0x00}, {0x16, 0x01, 0x16, 0x01},
+ {0xfc, 0x00, 0x00, 0x00}, {0xfc, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x02, 0x01, 0x0a, 0x00}, {0x09, 0x01, 0x0a, 0x00},
+ {0x17, 0x01, 0x0a, 0x00}, {0x28, 0x01, 0x0a, 0x01},
+ {0x02, 0x01, 0x0d, 0x00}, {0x09, 0x01, 0x0d, 0x00},
+ {0x17, 0x01, 0x0d, 0x00}, {0x28, 0x01, 0x0d, 0x01},
+ {0x02, 0x01, 0x16, 0x00}, {0x09, 0x01, 0x16, 0x00},
+ {0x17, 0x01, 0x16, 0x00}, {0x28, 0x01, 0x16, 0x01},
+ {0xfd, 0x00, 0x00, 0x00}, {0xfd, 0x00, 0x00, 0x00},
+ {0xfd, 0x00, 0x00, 0x00}, {0xfd, 0x00, 0x00, 0x00}
+ },
+ {
+ {0x03, 0x01, 0x0a, 0x00}, {0x06, 0x01, 0x0a, 0x00},
+ {0x0a, 0x01, 0x0a, 0x00}, {0x0f, 0x01, 0x0a, 0x00},
+ {0x18, 0x01, 0x0a, 0x00}, {0x1f, 0x01, 0x0a, 0x00},
+ {0x29, 0x01, 0x0a, 0x00}, {0x38, 0x01, 0x0a, 0x01},
+ {0x03, 0x01, 0x0d, 0x00}, {0x06, 0x01, 0x0d, 0x00},
+ {0x0a, 0x01, 0x0d, 0x00}, {0x0f, 0x01, 0x0d, 0x00},
+ {0x18, 0x01, 0x0d, 0x00}, {0x1f, 0x01, 0x0d, 0x00},
+ {0x29, 0x01, 0x0d, 0x00}, {0x38, 0x01, 0x0d, 0x01}
+ },
+ /* 255 */
+ {
+ {0x03, 0x01, 0x16, 0x00}, {0x06, 0x01, 0x16, 0x00},
+ {0x0a, 0x01, 0x16, 0x00}, {0x0f, 0x01, 0x16, 0x00},
+ {0x18, 0x01, 0x16, 0x00}, {0x1f, 0x01, 0x16, 0x00},
+ {0x29, 0x01, 0x16, 0x00}, {0x38, 0x01, 0x16, 0x01},
+ {0xff, 0x00, 0x00, 0x00}, {0xff, 0x00, 0x00, 0x00},
+ {0xff, 0x00, 0x00, 0x00}, {0xff, 0x00, 0x00, 0x00},
+ {0xff, 0x00, 0x00, 0x00}, {0xff, 0x00, 0x00, 0x00},
+ {0xff, 0x00, 0x00, 0x00}, {0xff, 0x00, 0x00, 0x00}
+ }
+};
+
+
+ngx_int_t
+ngx_http_v2_huff_decode(u_char *state, u_char *src, size_t len, u_char **dst,
+ ngx_uint_t last, ngx_log_t *log)
+{
+ u_char *end, ch, ending;
+
+ ch = 0;
+ ending = 1;
+
+ end = src + len;
+
+ while (src != end) {
+ ch = *src++;
+
+ if (ngx_http_v2_huff_decode_bits(state, &ending, ch >> 4, dst)
+ != NGX_OK)
+ {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0,
+ "http2 huffman decoding error at state %d: "
+ "bad code 0x%Xd", *state, ch >> 4);
+
+ return NGX_ERROR;
+ }
+
+ if (ngx_http_v2_huff_decode_bits(state, &ending, ch & 0xf, dst)
+ != NGX_OK)
+ {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0,
+ "http2 huffman decoding error at state %d: "
+ "bad code 0x%Xd", *state, ch & 0xf);
+
+ return NGX_ERROR;
+ }
+ }
+
+ if (last) {
+ if (!ending) {
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
+ "http2 huffman decoding error: "
+ "incomplete code 0x%Xd", ch);
+
+ return NGX_ERROR;
+ }
+
+ *state = 0;
+ }
+
+ return NGX_OK;
+}
+
+
+
+static ngx_inline ngx_int_t
+ngx_http_v2_huff_decode_bits(u_char *state, u_char *ending, ngx_uint_t bits,
+ u_char **dst)
+{
+ ngx_http_v2_huff_decode_code_t code;
+
+ code = ngx_http_v2_huff_decode_codes[*state][bits];
+
+ if (code.next == *state) {
+ return NGX_ERROR;
+ }
+
+ if (code.emit) {
+ *(*dst)++ = code.sym;
+ }
+
+ *ending = code.ending;
+ *state = code.next;
+
+ return NGX_OK;
+}