23#ifndef ZEPHYR_INCLUDE_NET_HTTP_PARSER_H_
24#define ZEPHYR_INCLUDE_NET_HTTP_PARSER_H_
27#define HTTP_PARSER_VERSION_MAJOR 2
28#define HTTP_PARSER_VERSION_MINOR 7
29#define HTTP_PARSER_VERSION_PATCH 1
32#if defined(_WIN32) && !defined(__MINGW32__) && \
33 (!defined(_MSC_VER) || _MSC_VER < 1600) && !defined(__WINE__)
62#ifndef HTTP_MAX_HEADER_SIZE
63# define HTTP_MAX_HEADER_SIZE (80 * 1024)
179#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno)
268 const char *
data,
size_t len);
http_errno
Definition: http_parser.h:142
@ HPE_CB_chunk_complete
Definition: http_parser.h:153
@ HPE_INVALID_CONTENT_LENGTH
Definition: http_parser.h:168
@ HPE_INVALID_CONSTANT
Definition: http_parser.h:171
@ HPE_UNEXPECTED_CONTENT_LENGTH
Definition: http_parser.h:169
@ HPE_INVALID_CHUNK_SIZE
Definition: http_parser.h:170
@ HPE_UNKNOWN
Definition: http_parser.h:175
@ HPE_INVALID_QUERY_STRING
Definition: http_parser.h:164
@ HPE_INVALID_PORT
Definition: http_parser.h:162
@ HPE_INVALID_EOF_STATE
Definition: http_parser.h:154
@ HPE_HEADER_OVERFLOW
Definition: http_parser.h:155
@ HPE_INVALID_VERSION
Definition: http_parser.h:157
@ HPE_CB_message_begin
Definition: http_parser.h:144
@ HPE_CB_headers_complete
Definition: http_parser.h:148
@ HPE_CB_body
Definition: http_parser.h:149
@ HPE_INVALID_HOST
Definition: http_parser.h:161
@ HPE_CB_chunk_header
Definition: http_parser.h:152
@ HPE_INVALID_PATH
Definition: http_parser.h:163
@ HPE_STRICT
Definition: http_parser.h:173
@ HPE_CLOSED_CONNECTION
Definition: http_parser.h:156
@ HPE_CB_status
Definition: http_parser.h:151
@ HPE_INVALID_STATUS
Definition: http_parser.h:158
@ HPE_INVALID_INTERNAL_STATE
Definition: http_parser.h:172
@ HPE_INVALID_METHOD
Definition: http_parser.h:159
@ HPE_INVALID_HEADER_TOKEN
Definition: http_parser.h:167
@ HPE_CB_header_value
Definition: http_parser.h:147
@ HPE_INVALID_URL
Definition: http_parser.h:160
@ HPE_CB_header_field
Definition: http_parser.h:146
@ HPE_OK
Definition: http_parser.h:143
@ HPE_CB_message_complete
Definition: http_parser.h:150
@ HPE_CB_url
Definition: http_parser.h:145
@ HPE_PAUSED
Definition: http_parser.h:174
@ HPE_LF_EXPECTED
Definition: http_parser.h:166
@ HPE_INVALID_FRAGMENT
Definition: http_parser.h:165
int(* http_data_cb)(struct http_parser *, const char *at, size_t length)
Definition: http_parser.h:88
unsigned long http_parser_version(void)
int http_body_is_final(const struct http_parser *parser)
size_t http_parser_execute(struct http_parser *parser, const struct http_parser_settings *settings, const char *data, size_t len)
void http_parser_settings_init(struct http_parser_settings *settings)
const char * http_errno_description(enum http_errno err)
int http_should_keep_alive(const struct http_parser *parser)
int(* http_cb)(struct http_parser *)
Definition: http_parser.h:90
void http_parser_pause(struct http_parser *parser, int paused)
http_method
Definition: http_parser.h:92
@ HTTP_PROPPATCH
Definition: http_parser.h:106
@ HTTP_MSEARCH
Definition: http_parser.h:117
@ HTTP_PUT
Definition: http_parser.h:97
@ HTTP_MKACTIVITY
Definition: http_parser.h:114
@ HTTP_MKCALENDAR
Definition: http_parser.h:123
@ HTTP_BIND
Definition: http_parser.h:109
@ HTTP_PURGE
Definition: http_parser.h:122
@ HTTP_NOTIFY
Definition: http_parser.h:118
@ HTTP_PROPFIND
Definition: http_parser.h:105
@ HTTP_DELETE
Definition: http_parser.h:93
@ HTTP_MERGE
Definition: http_parser.h:116
@ HTTP_GET
Definition: http_parser.h:94
@ HTTP_REPORT
Definition: http_parser.h:113
@ HTTP_SUBSCRIBE
Definition: http_parser.h:119
@ HTTP_UNBIND
Definition: http_parser.h:111
@ HTTP_CONNECT
Definition: http_parser.h:98
@ HTTP_UNLOCK
Definition: http_parser.h:108
@ HTTP_MKCOL
Definition: http_parser.h:103
@ HTTP_OPTIONS
Definition: http_parser.h:99
@ HTTP_LINK
Definition: http_parser.h:124
@ HTTP_UNSUBSCRIBE
Definition: http_parser.h:120
@ HTTP_REBIND
Definition: http_parser.h:110
@ HTTP_LOCK
Definition: http_parser.h:102
@ HTTP_POST
Definition: http_parser.h:96
@ HTTP_HEAD
Definition: http_parser.h:95
@ HTTP_SEARCH
Definition: http_parser.h:107
@ HTTP_UNLINK
Definition: http_parser.h:125
@ HTTP_ACL
Definition: http_parser.h:112
@ HTTP_CHECKOUT
Definition: http_parser.h:115
@ HTTP_MOVE
Definition: http_parser.h:104
@ HTTP_COPY
Definition: http_parser.h:101
@ HTTP_PATCH
Definition: http_parser.h:121
@ HTTP_TRACE
Definition: http_parser.h:100
flags
Definition: http_parser.h:131
@ F_CHUNKED
Definition: http_parser.h:132
@ F_CONNECTION_CLOSE
Definition: http_parser.h:134
@ F_CONNECTION_KEEP_ALIVE
Definition: http_parser.h:133
@ F_UPGRADE
Definition: http_parser.h:137
@ F_CONTENTLENGTH
Definition: http_parser.h:139
@ F_TRAILING
Definition: http_parser.h:136
@ F_SKIPBODY
Definition: http_parser.h:138
@ F_CONNECTION_UPGRADE
Definition: http_parser.h:135
void http_parser_init(struct http_parser *parser, enum http_parser_type type)
const char * http_method_str(enum http_method m)
const char * http_errno_name(enum http_errno err)
http_parser_type
Definition: http_parser.h:128
@ HTTP_RESPONSE
Definition: http_parser.h:128
@ HTTP_REQUEST
Definition: http_parser.h:128
@ HTTP_BOTH
Definition: http_parser.h:128
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__INT32_TYPE__ int32_t
Definition: stdint.h:44
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
__INT64_TYPE__ int64_t
Definition: stdint.h:45
__INT8_TYPE__ int8_t
Definition: stdint.h:42
__INT16_TYPE__ int16_t
Definition: stdint.h:43
Definition: http_parser.h:225
http_data_cb on_header_value
Definition: http_parser.h:230
http_cb on_chunk_header
Definition: http_parser.h:237
http_data_cb on_status
Definition: http_parser.h:228
http_cb on_headers_complete
Definition: http_parser.h:231
http_data_cb on_url
Definition: http_parser.h:227
http_data_cb on_body
Definition: http_parser.h:232
http_cb on_chunk_complete
Definition: http_parser.h:238
http_cb on_message_begin
Definition: http_parser.h:226
http_data_cb on_header_field
Definition: http_parser.h:229
http_cb on_message_complete
Definition: http_parser.h:233
Definition: http_parser.h:182
unsigned int flags
Definition: http_parser.h:185
unsigned int state
Definition: http_parser.h:188
unsigned int index
Definition: http_parser.h:191
unsigned int upgrade
Definition: http_parser.h:211
uint32_t nread
Definition: http_parser.h:194
unsigned int method
Definition: http_parser.h:202
void * data
Definition: http_parser.h:214
uint64_t content_length
Definition: http_parser.h:195
unsigned int status_code
Definition: http_parser.h:201
unsigned int http_errno
Definition: http_parser.h:203
unsigned int header_state
Definition: http_parser.h:189
unsigned int type
Definition: http_parser.h:184
unsigned short http_major
Definition: http_parser.h:199
unsigned int lenient_http_headers
Definition: http_parser.h:192
unsigned short http_minor
Definition: http_parser.h:200
const struct sockaddr * addr
Definition: http_parser.h:221
static fdata_t data[2]
Definition: test_fifo_contexts.c:15