Lines Matching +full:int +full:- +full:enum

1 /* SPDX-License-Identifier: MIT */
58 * environment (e.g. -DHTTP_MAX_HEADER_SIZE=<value>). To remove
60 * to a very large number (e.g. -DHTTP_MAX_HEADER_SIZE=0x7fffffff)
70 /* Callbacks should return non-zero to indicate an error. The parser will
76 * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding:
88 typedef int (*http_data_cb)(struct http_parser *, const char *at,
90 typedef int (*http_cb)(struct http_parser *);
92 enum http_method {
128 enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH };
131 enum flags {
142 enum http_errno {
179 #define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno)
184 unsigned int type : 2; /* enum http_parser_type */
185 unsigned int flags : 8; /* F_xxx values from 'flags' enum;
186 * semi-public
188 unsigned int state : 7; /* enum state from http_parser.c */
189 unsigned int header_state : 7; /* enum header_state from http_parser.c
191 unsigned int index : 7; /* index into current matcher */
192 unsigned int lenient_http_headers : 1;
195 uint64_t content_length; /* # bytes in body (0 if no Content-Length
198 /** READ-ONLY **/
201 unsigned int status_code : 16; /* responses only */
202 unsigned int method : 8; /* requests only */
203 unsigned int http_errno : 7;
211 unsigned int upgrade : 1;
235 * in parser->content_length.
242 /* Returns the library version. Bits 16-23 contain the major version number,
243 * bits 8-15 the minor version number and bits 0-7 the patch level.
254 void http_parser_init(struct http_parser *parser, enum http_parser_type type);
263 * `parser->http_errno` on error.
276 int http_should_keep_alive(const struct http_parser *parser);
279 const char *http_method_str(enum http_method m);
282 const char *http_errno_name(enum http_errno err);
285 const char *http_errno_description(enum http_errno err);
287 /* Pause or un-pause the parser; a nonzero value pauses */
288 void http_parser_pause(struct http_parser *parser, int paused);
291 int http_body_is_final(const struct http_parser *parser);