|
Wireshark 5.1.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Functions | |
| WS_DLL_PUBLIC bool | req_resp_hdrs_parse_content_length (const char *value, int64_t *content_length) |
| Parse a Content-Length header field value. | |
| WS_DLL_PUBLIC bool | req_resp_hdrs_do_reassembly (tvbuff_t *tvb, const int offset, packet_info *pinfo, const bool desegment_headers, const bool desegment_body, bool desegment_until_fin, bool allow_content_length_list, int *last_chunk_offset, dissector_table_t streaming_subdissector_table, dissector_handle_t *streaming_chunk_handle) |
| Optionally do reassembly of the request/response line, headers, and body. | |
Declarations of routines handling protocols with a request/response line, headers, a blank line, and an optional body.
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| WS_DLL_PUBLIC bool req_resp_hdrs_do_reassembly | ( | tvbuff_t * | tvb, |
| const int | offset, | ||
| packet_info * | pinfo, | ||
| const bool | desegment_headers, | ||
| const bool | desegment_body, | ||
| bool | desegment_until_fin, | ||
| bool | allow_content_length_list, | ||
| int * | last_chunk_offset, | ||
| dissector_table_t | streaming_subdissector_table, | ||
| dissector_handle_t * | streaming_chunk_handle ) |
Optionally do reassembly of the request/response line, headers, and body.
| tvb | The buffer. | |
| offset | The offset in the buffer to begin inspection. | |
| pinfo | Packet info from the parent protocol. | |
| desegment_headers | Do desegmentation on headers. | |
| desegment_body | Do desegmentation on body. | |
| desegment_until_fin | When desegment_body is enabled and no Content-Length header is found, assume that all data following the headers are part of the body. | |
| allow_content_length_list | Accept an HTTP comma-separated list of identical Content-Length values. | |
| [in,out] | last_chunk_offset | For the chunked Transfer-Encoding, the offset (relative to the initial tvb offset) of the last chunk size found. The result can be fed back into a future call in order to skip to a later chunk and reduce processing from O(N^2) to O(N). Use 0 for the initial call. Only set when chunked TE is found. May be NULL. |
| streaming_subdissector_table | For searching a streaming reassembly mode supported subdissector on it by the content-type header value. | |
| [out] | streaming_chunk_handle | Only set when this is the beginning of a chunk stream. (There is 'Transfer-Encoding: chunked' header and a streaming reassembly mode supported subdissector is found according to Content-Type header) |
| WS_DLL_PUBLIC bool req_resp_hdrs_parse_content_length | ( | const char * | value, |
| int64_t * | content_length ) |
Parse a Content-Length header field value.
Validates the value against the grammar in RFC 9110 Section 8.6 (Content-Length = 1*DIGIT) and RFC 9112 Section 6.3, rule 5, which also permits a comma-separated list of identical values. HTTP values above INT32_MAX are rejected because the current reassembly APIs use 32-bit lengths.
| value | The field value, without the leading "Content-Length:". | |
| [out] | content_length | The parsed (possibly normalized) value. |