Path: blob/master/Utilities/cmnghttp2/lib/nghttp2_frame.h
3153 views
/*1* nghttp2 - HTTP/2 C Library2*3* Copyright (c) 2012 Tatsuhiro Tsujikawa4*5* Permission is hereby granted, free of charge, to any person obtaining6* a copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sublicense, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice shall be14* included in all copies or substantial portions of the Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,17* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF18* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND19* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE20* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION21* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION22* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.23*/24#ifndef NGHTTP2_FRAME_H25#define NGHTTP2_FRAME_H2627#ifdef HAVE_CONFIG_H28# include <config.h>29#endif /* HAVE_CONFIG_H */3031#include <nghttp2/nghttp2.h>32#include "nghttp2_hd.h"33#include "nghttp2_buf.h"3435#define NGHTTP2_STREAM_ID_MASK ((1u << 31) - 1)36#define NGHTTP2_PRI_GROUP_ID_MASK ((1u << 31) - 1)37#define NGHTTP2_PRIORITY_MASK ((1u << 31) - 1)38#define NGHTTP2_WINDOW_SIZE_INCREMENT_MASK ((1u << 31) - 1)39#define NGHTTP2_SETTINGS_ID_MASK ((1 << 24) - 1)4041/* The number of bytes of frame header. */42#define NGHTTP2_FRAME_HDLEN 94344#define NGHTTP2_MAX_FRAME_SIZE_MAX ((1 << 24) - 1)45#define NGHTTP2_MAX_FRAME_SIZE_MIN (1 << 14)4647#define NGHTTP2_MAX_PAYLOADLEN 1638448/* The one frame buffer length for transmission. We may use several of49them to support CONTINUATION. To account for Pad Length field, we50allocate extra 1 byte, which saves extra large memcopying. */51#define NGHTTP2_FRAMEBUF_CHUNKLEN \52(NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)5354/* The default length of DATA frame payload. */55#define NGHTTP2_DATA_PAYLOADLEN NGHTTP2_MAX_FRAME_SIZE_MIN5657/* Maximum headers block size to send, calculated using58nghttp2_hd_deflate_bound(). This is the default value, and can be59overridden by nghttp2_option_set_max_send_header_block_length(). */60#define NGHTTP2_MAX_HEADERSLEN 655366162/* The number of bytes for each SETTINGS entry */63#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 66465/* Length of priority related fields in HEADERS/PRIORITY frames */66#define NGHTTP2_PRIORITY_SPECLEN 56768/* Maximum length of padding in bytes. */69#define NGHTTP2_MAX_PADLEN 2567071/* Union of extension frame payload */72typedef union {73nghttp2_ext_altsvc altsvc;74nghttp2_ext_origin origin;75nghttp2_ext_priority_update priority_update;76} nghttp2_ext_frame_payload;7778void nghttp2_frame_pack_frame_hd(uint8_t *buf, const nghttp2_frame_hd *hd);7980void nghttp2_frame_unpack_frame_hd(nghttp2_frame_hd *hd, const uint8_t *buf);8182/**83* Initializes frame header |hd| with given parameters. Reserved bit84* is set to 0.85*/86void nghttp2_frame_hd_init(nghttp2_frame_hd *hd, size_t length, uint8_t type,87uint8_t flags, int32_t stream_id);8889/**90* Returns the number of priority field depending on the |flags|. If91* |flags| has neither NGHTTP2_FLAG_PRIORITY_GROUP nor92* NGHTTP2_FLAG_PRIORITY_DEPENDENCY set, return 0.93*/94size_t nghttp2_frame_priority_len(uint8_t flags);9596/**97* Packs the |pri_spec| in |buf|. This function assumes |buf| has98* enough space for serialization.99*/100void nghttp2_frame_pack_priority_spec(uint8_t *buf,101const nghttp2_priority_spec *pri_spec);102103/**104* Unpacks the priority specification from payload |payload| of length105* |payloadlen| to |pri_spec|. The |flags| is used to determine what106* kind of priority specification is in |payload|. This function107* assumes the |payload| contains whole priority specification.108*/109void nghttp2_frame_unpack_priority_spec(nghttp2_priority_spec *pri_spec,110const uint8_t *payload);111112/*113* Returns the offset from the HEADERS frame payload where the114* compressed header block starts. The frame payload does not include115* frame header.116*/117size_t nghttp2_frame_headers_payload_nv_offset(nghttp2_headers *frame);118119/*120* Packs HEADERS frame |frame| in wire format and store it in |bufs|.121* This function expands |bufs| as necessary to store frame.122*123* The caller must make sure that nghttp2_bufs_reset(bufs) is called124* before calling this function.125*126* frame->hd.length is assigned after length is determined during127* packing process. CONTINUATION frames are also serialized in this128* function. This function does not handle padding.129*130* This function returns 0 if it succeeds, or returns one of the131* following negative error codes:132*133* NGHTTP2_ERR_HEADER_COMP134* The deflate operation failed.135* NGHTTP2_ERR_NOMEM136* Out of memory.137*/138int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame,139nghttp2_hd_deflater *deflater);140141/*142* Unpacks HEADERS frame byte sequence into |frame|. This function143* only unapcks bytes that come before name/value header block and144* after possible Pad Length field.145*146* This function always succeeds and returns 0.147*/148int nghttp2_frame_unpack_headers_payload(nghttp2_headers *frame,149const uint8_t *payload);150151/*152* Packs PRIORITY frame |frame| in wire format and store it in153* |bufs|.154*155* The caller must make sure that nghttp2_bufs_reset(bufs) is called156* before calling this function.157*158* This function always succeeds and returns 0.159*/160int nghttp2_frame_pack_priority(nghttp2_bufs *bufs, nghttp2_priority *frame);161162/*163* Unpacks PRIORITY wire format into |frame|.164*/165void nghttp2_frame_unpack_priority_payload(nghttp2_priority *frame,166const uint8_t *payload);167168/*169* Packs RST_STREAM frame |frame| in wire frame format and store it in170* |bufs|.171*172* The caller must make sure that nghttp2_bufs_reset(bufs) is called173* before calling this function.174*175* This function always succeeds and returns 0.176*/177int nghttp2_frame_pack_rst_stream(nghttp2_bufs *bufs,178nghttp2_rst_stream *frame);179180/*181* Unpacks RST_STREAM frame byte sequence into |frame|.182*/183void nghttp2_frame_unpack_rst_stream_payload(nghttp2_rst_stream *frame,184const uint8_t *payload);185186/*187* Packs SETTINGS frame |frame| in wire format and store it in188* |bufs|.189*190* The caller must make sure that nghttp2_bufs_reset(bufs) is called191* before calling this function.192*193* This function returns 0 if it succeeds, or returns one of the194* following negative error codes:195*196* NGHTTP2_ERR_FRAME_SIZE_ERROR197* The length of the frame is too large.198*/199int nghttp2_frame_pack_settings(nghttp2_bufs *bufs, nghttp2_settings *frame);200201/*202* Packs the |iv|, which includes |niv| entries, in the |buf|,203* assuming the |buf| has at least 8 * |niv| bytes.204*205* Returns the number of bytes written into the |buf|.206*/207size_t nghttp2_frame_pack_settings_payload(uint8_t *buf,208const nghttp2_settings_entry *iv,209size_t niv);210211void nghttp2_frame_unpack_settings_entry(nghttp2_settings_entry *iv,212const uint8_t *payload);213214/*215* Initializes payload of frame->settings. The |frame| takes216* ownership of |iv|.217*/218void nghttp2_frame_unpack_settings_payload(nghttp2_settings *frame,219nghttp2_settings_entry *iv,220size_t niv);221222/*223* Unpacks SETTINGS payload into |*iv_ptr|. The number of entries are224* assigned to the |*niv_ptr|. This function allocates enough memory225* to store the result in |*iv_ptr|. The caller is responsible to free226* |*iv_ptr| after its use.227*228* This function returns 0 if it succeeds or one of the following229* negative error codes:230*231* NGHTTP2_ERR_NOMEM232* Out of memory.233*/234int nghttp2_frame_unpack_settings_payload2(nghttp2_settings_entry **iv_ptr,235size_t *niv_ptr,236const uint8_t *payload,237size_t payloadlen, nghttp2_mem *mem);238239/*240* Packs PUSH_PROMISE frame |frame| in wire format and store it in241* |bufs|. This function expands |bufs| as necessary to store242* frame.243*244* The caller must make sure that nghttp2_bufs_reset(bufs) is called245* before calling this function.246*247* frame->hd.length is assigned after length is determined during248* packing process. CONTINUATION frames are also serialized in this249* function. This function does not handle padding.250*251* This function returns 0 if it succeeds, or returns one of the252* following negative error codes:253*254* NGHTTP2_ERR_HEADER_COMP255* The deflate operation failed.256* NGHTTP2_ERR_NOMEM257* Out of memory.258*/259int nghttp2_frame_pack_push_promise(nghttp2_bufs *bufs,260nghttp2_push_promise *frame,261nghttp2_hd_deflater *deflater);262263/*264* Unpacks PUSH_PROMISE frame byte sequence into |frame|. This265* function only unapcks bytes that come before name/value header266* block and after possible Pad Length field.267*268* This function returns 0 if it succeeds or one of the following269* negative error codes:270*271* NGHTTP2_ERR_PROTO272* TODO END_HEADERS flag is not set273*/274int nghttp2_frame_unpack_push_promise_payload(nghttp2_push_promise *frame,275const uint8_t *payload);276277/*278* Packs PING frame |frame| in wire format and store it in279* |bufs|.280*281* The caller must make sure that nghttp2_bufs_reset(bufs) is called282* before calling this function.283*284* This function always succeeds and returns 0.285*/286int nghttp2_frame_pack_ping(nghttp2_bufs *bufs, nghttp2_ping *frame);287288/*289* Unpacks PING wire format into |frame|.290*/291void nghttp2_frame_unpack_ping_payload(nghttp2_ping *frame,292const uint8_t *payload);293294/*295* Packs GOAWAY frame |frame| in wire format and store it in |bufs|.296* This function expands |bufs| as necessary to store frame.297*298* The caller must make sure that nghttp2_bufs_reset(bufs) is called299* before calling this function.300*301* This function returns 0 if it succeeds or one of the following302* negative error codes:303*304* NGHTTP2_ERR_NOMEM305* Out of memory.306* NGHTTP2_ERR_FRAME_SIZE_ERROR307* The length of the frame is too large.308*/309int nghttp2_frame_pack_goaway(nghttp2_bufs *bufs, nghttp2_goaway *frame);310311/*312* Unpacks GOAWAY wire format into |frame|. The |payload| of length313* |payloadlen| contains first 8 bytes of payload. The314* |var_gift_payload| of length |var_gift_payloadlen| contains315* remaining payload and its buffer is gifted to the function and then316* |frame|. The |var_gift_payloadlen| must be freed by317* nghttp2_frame_goaway_free().318*/319void nghttp2_frame_unpack_goaway_payload(nghttp2_goaway *frame,320const uint8_t *payload,321uint8_t *var_gift_payload,322size_t var_gift_payloadlen);323324/*325* Unpacks GOAWAY wire format into |frame|. This function only exists326* for unit test. After allocating buffer for debug data, this327* function internally calls nghttp2_frame_unpack_goaway_payload().328*329* This function returns 0 if it succeeds, or one of the following330* negative error codes:331*332* NGHTTP2_ERR_NOMEM333* Out of memory.334*/335int nghttp2_frame_unpack_goaway_payload2(nghttp2_goaway *frame,336const uint8_t *payload,337size_t payloadlen, nghttp2_mem *mem);338339/*340* Packs WINDOW_UPDATE frame |frame| in wire frame format and store it341* in |bufs|.342*343* The caller must make sure that nghttp2_bufs_reset(bufs) is called344* before calling this function.345*346* This function always succeeds and returns 0.347*/348int nghttp2_frame_pack_window_update(nghttp2_bufs *bufs,349nghttp2_window_update *frame);350351/*352* Unpacks WINDOW_UPDATE frame byte sequence into |frame|.353*/354void nghttp2_frame_unpack_window_update_payload(nghttp2_window_update *frame,355const uint8_t *payload);356357/*358* Packs ALTSVC frame |frame| in wire frame format and store it in359* |bufs|.360*361* The caller must make sure that nghttp2_bufs_reset(bufs) is called362* before calling this function.363*364* This function always succeeds and returns 0.365*/366int nghttp2_frame_pack_altsvc(nghttp2_bufs *bufs, nghttp2_extension *ext);367368/*369* Unpacks ALTSVC wire format into |frame|. The |payload| of370* |payloadlen| bytes contains frame payload. This function assumes371* that frame->payload points to the nghttp2_ext_altsvc object.372*373* This function always succeeds and returns 0.374*/375void nghttp2_frame_unpack_altsvc_payload(nghttp2_extension *frame,376size_t origin_len, uint8_t *payload,377size_t payloadlen);378379/*380* Unpacks ALTSVC wire format into |frame|. This function only exists381* for unit test. After allocating buffer for fields, this function382* internally calls nghttp2_frame_unpack_altsvc_payload().383*384* This function returns 0 if it succeeds, or one of the following385* negative error codes:386*387* NGHTTP2_ERR_NOMEM388* Out of memory.389* NGHTTP2_ERR_FRAME_SIZE_ERROR390* The payload is too small.391*/392int nghttp2_frame_unpack_altsvc_payload2(nghttp2_extension *frame,393const uint8_t *payload,394size_t payloadlen, nghttp2_mem *mem);395396/*397* Packs ORIGIN frame |frame| in wire frame format and store it in398* |bufs|.399*400* The caller must make sure that nghttp2_bufs_reset(bufs) is called401* before calling this function.402*403* This function returns 0 if it succeeds, or one of the following404* negative error codes:405*406* NGHTTP2_ERR_FRAME_SIZE_ERROR407* The length of the frame is too large.408*/409int nghttp2_frame_pack_origin(nghttp2_bufs *bufs, nghttp2_extension *ext);410411/*412* Unpacks ORIGIN wire format into |frame|. The |payload| of length413* |payloadlen| contains the frame payload.414*415* This function returns 0 if it succeeds, or one of the following416* negative error codes:417*418* NGHTTP2_ERR_NOMEM419* Out of memory.420* NGHTTP2_ERR_FRAME_SIZE_ERROR421* The payload is too small.422*/423int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame,424const uint8_t *payload,425size_t payloadlen, nghttp2_mem *mem);426427/*428* Packs PRIORITY_UPDATE frame |frame| in wire frame format and store429* it in |bufs|.430*431* The caller must make sure that nghttp2_bufs_reset(bufs) is called432* before calling this function.433*434* This function always succeeds and returns 0.435*/436int nghttp2_frame_pack_priority_update(nghttp2_bufs *bufs,437nghttp2_extension *ext);438439/*440* Unpacks PRIORITY_UPDATE wire format into |frame|. The |payload| of441* |payloadlen| bytes contains frame payload. This function assumes442* that frame->payload points to the nghttp2_ext_priority_update443* object.444*445* This function always succeeds and returns 0.446*/447void nghttp2_frame_unpack_priority_update_payload(nghttp2_extension *frame,448uint8_t *payload,449size_t payloadlen);450451/*452* Initializes HEADERS frame |frame| with given values. |frame| takes453* ownership of |nva|, so caller must not free it. If |stream_id| is454* not assigned yet, it must be -1.455*/456void nghttp2_frame_headers_init(nghttp2_headers *frame, uint8_t flags,457int32_t stream_id, nghttp2_headers_category cat,458const nghttp2_priority_spec *pri_spec,459nghttp2_nv *nva, size_t nvlen);460461void nghttp2_frame_headers_free(nghttp2_headers *frame, nghttp2_mem *mem);462463void nghttp2_frame_priority_init(nghttp2_priority *frame, int32_t stream_id,464const nghttp2_priority_spec *pri_spec);465466void nghttp2_frame_priority_free(nghttp2_priority *frame);467468void nghttp2_frame_rst_stream_init(nghttp2_rst_stream *frame, int32_t stream_id,469uint32_t error_code);470471void nghttp2_frame_rst_stream_free(nghttp2_rst_stream *frame);472473/*474* Initializes PUSH_PROMISE frame |frame| with given values. |frame|475* takes ownership of |nva|, so caller must not free it.476*/477void nghttp2_frame_push_promise_init(nghttp2_push_promise *frame, uint8_t flags,478int32_t stream_id,479int32_t promised_stream_id,480nghttp2_nv *nva, size_t nvlen);481482void nghttp2_frame_push_promise_free(nghttp2_push_promise *frame,483nghttp2_mem *mem);484485/*486* Initializes SETTINGS frame |frame| with given values. |frame| takes487* ownership of |iv|, so caller must not free it. The |flags| are488* bitwise-OR of one or more of nghttp2_settings_flag.489*/490void nghttp2_frame_settings_init(nghttp2_settings *frame, uint8_t flags,491nghttp2_settings_entry *iv, size_t niv);492493void nghttp2_frame_settings_free(nghttp2_settings *frame, nghttp2_mem *mem);494495/*496* Initializes PING frame |frame| with given values. If the497* |opqeue_data| is not NULL, it must point to 8 bytes memory region498* of data. The data pointed by |opaque_data| is copied. It can be499* NULL. In this case, 8 bytes NULL is used.500*/501void nghttp2_frame_ping_init(nghttp2_ping *frame, uint8_t flags,502const uint8_t *opque_data);503504void nghttp2_frame_ping_free(nghttp2_ping *frame);505506/*507* Initializes GOAWAY frame |frame| with given values. On success,508* this function takes ownership of |opaque_data|, so caller must not509* free it. If the |opaque_data_len| is 0, opaque_data could be NULL.510*/511void nghttp2_frame_goaway_init(nghttp2_goaway *frame, int32_t last_stream_id,512uint32_t error_code, uint8_t *opaque_data,513size_t opaque_data_len);514515void nghttp2_frame_goaway_free(nghttp2_goaway *frame, nghttp2_mem *mem);516517void nghttp2_frame_window_update_init(nghttp2_window_update *frame,518uint8_t flags, int32_t stream_id,519int32_t window_size_increment);520521void nghttp2_frame_window_update_free(nghttp2_window_update *frame);522523void nghttp2_frame_extension_init(nghttp2_extension *frame, uint8_t type,524uint8_t flags, int32_t stream_id,525void *payload);526527void nghttp2_frame_extension_free(nghttp2_extension *frame);528529/*530* Initializes ALTSVC frame |frame| with given values. This function531* assumes that frame->payload points to nghttp2_ext_altsvc object.532* Also |origin| and |field_value| are allocated in single buffer,533* starting |origin|. On success, this function takes ownership of534* |origin|, so caller must not free it.535*/536void nghttp2_frame_altsvc_init(nghttp2_extension *frame, int32_t stream_id,537uint8_t *origin, size_t origin_len,538uint8_t *field_value, size_t field_value_len);539540/*541* Frees up resources under |frame|. This function does not free542* nghttp2_ext_altsvc object pointed by frame->payload. This function543* only frees origin pointed by nghttp2_ext_altsvc.origin. Therefore,544* other fields must be allocated in the same buffer with origin.545*/546void nghttp2_frame_altsvc_free(nghttp2_extension *frame, nghttp2_mem *mem);547548/*549* Initializes ORIGIN frame |frame| with given values. This function550* assumes that frame->payload points to nghttp2_ext_origin object.551* Also |ov| and the memory pointed by the field of its elements are552* allocated in single buffer, starting with |ov|. On success, this553* function takes ownership of |ov|, so caller must not free it.554*/555void nghttp2_frame_origin_init(nghttp2_extension *frame,556nghttp2_origin_entry *ov, size_t nov);557558/*559* Frees up resources under |frame|. This function does not free560* nghttp2_ext_origin object pointed by frame->payload. This function561* only frees nghttp2_ext_origin.ov. Therefore, other fields must be562* allocated in the same buffer with ov.563*/564void nghttp2_frame_origin_free(nghttp2_extension *frame, nghttp2_mem *mem);565566/*567* Initializes PRIORITY_UPDATE frame |frame| with given values. This568* function assumes that frame->payload points to569* nghttp2_ext_priority_update object. On success, this function570* takes ownership of |field_value|, so caller must not free it.571*/572void nghttp2_frame_priority_update_init(nghttp2_extension *frame,573int32_t stream_id, uint8_t *field_value,574size_t field_value_len);575576/*577* Frees up resources under |frame|. This function does not free578* nghttp2_ext_priority_update object pointed by frame->payload. This579* function only frees field_value pointed by580* nghttp2_ext_priority_update.field_value.581*/582void nghttp2_frame_priority_update_free(nghttp2_extension *frame,583nghttp2_mem *mem);584585/*586* Returns the number of padding bytes after payload. The total587* padding length is given in the |padlen|. The returned value does588* not include the Pad Length field. If |padlen| is 0, this function589* returns 0, regardless of frame->hd.flags.590*/591size_t nghttp2_frame_trail_padlen(nghttp2_frame *frame, size_t padlen);592593void nghttp2_frame_data_init(nghttp2_data *frame, uint8_t flags,594int32_t stream_id);595596void nghttp2_frame_data_free(nghttp2_data *frame);597598/*599* Makes copy of |iv| and return the copy. The |niv| is the number of600* entries in |iv|. This function returns the pointer to the copy if601* it succeeds, or NULL.602*/603nghttp2_settings_entry *nghttp2_frame_iv_copy(const nghttp2_settings_entry *iv,604size_t niv, nghttp2_mem *mem);605606/*607* Sorts the |nva| in ascending order of name and value. If names are608* equivalent, sort them by value.609*/610void nghttp2_nv_array_sort(nghttp2_nv *nva, size_t nvlen);611612/*613* Copies name/value pairs from |nva|, which contains |nvlen| pairs,614* to |*nva_ptr|, which is dynamically allocated so that all items can615* be stored. The resultant name and value in nghttp2_nv are616* guaranteed to be NULL-terminated even if the input is not617* null-terminated.618*619* The |*nva_ptr| must be freed using nghttp2_nv_array_del().620*621* This function returns 0 if it succeeds or one of the following622* negative error codes:623*624* NGHTTP2_ERR_NOMEM625* Out of memory.626*/627int nghttp2_nv_array_copy(nghttp2_nv **nva_ptr, const nghttp2_nv *nva,628size_t nvlen, nghttp2_mem *mem);629630/*631* Returns nonzero if the name/value pair |a| equals to |b|. The name632* is compared in case-sensitive, because we ensure that this function633* is called after the name is lower-cased.634*/635int nghttp2_nv_equal(const nghttp2_nv *a, const nghttp2_nv *b);636637/*638* Frees |nva|.639*/640void nghttp2_nv_array_del(nghttp2_nv *nva, nghttp2_mem *mem);641642/*643* Checks that the |iv|, which includes |niv| entries, does not have644* invalid values.645*646* This function returns nonzero if it succeeds, or 0.647*/648int nghttp2_iv_check(const nghttp2_settings_entry *iv, size_t niv);649650/*651* Sets Pad Length field and flags and adjusts frame header position652* of each buffers in |bufs|. The number of padding is given in the653* |padlen| including Pad Length field. The |hd| is the frame header654* for the serialized data. This function fills zeros padding region655* unless framehd_only is nonzero.656*657* This function returns 0 if it succeeds, or one of the following658* negative error codes:659*660* NGHTTP2_ERR_NOMEM661* Out of memory.662* NGHTTP2_ERR_FRAME_SIZE_ERROR663* The length of the resulting frame is too large.664*/665int nghttp2_frame_add_pad(nghttp2_bufs *bufs, nghttp2_frame_hd *hd,666size_t padlen, int framehd_only);667668#endif /* NGHTTP2_FRAME_H */669670671