HTTP message parser.
More...
HTTP message parser.
- Date
- 2022-09-19
- Copyright
- Copyright (c) 2022
◆ http_free_message()
Free the memory allocated for a HTTP message.
- Parameters
-
message | the HTTP message to free |
◆ http_method_to_str()
Converts a HTTP method from enum value to character string.
- Parameters
-
method | the HTTP method in enum value |
- Returns
- the same HTTP method as a character string
◆ http_parse_message()
http_message_t http_parse_message |
( |
uint8_t * |
data, |
|
|
uint16_t |
dst_port |
|
) |
| |
Parse the method and URI of HTTP message.
- Parameters
-
data | pointer to the start of the HTTP message |
dst_port | TCP destination port |
- Returns
- the parsed HTTP message
◆ http_print_message()
Print the method and URI of a HTTP message.
Print an HTTP message.
- Parameters
-
message | the message to print |
◆ is_http()
bool is_http |
( |
uint8_t * |
data | ) |
|
Check if a TCP message is a HTTP message.
- Parameters
-
data | pointer to the start of the TCP payload |
dst_port | TCP destination port |
- Returns
- true if the message is a HTTP message
-
false if the message is not a HTTP message