12#include "ws_symbol_export.h"
30 int64_t *content_length);
60 tvbuff_t *tvb,
const int offset,
packet_info *pinfo,
61 const bool desegment_headers,
const bool desegment_body,
62 bool desegment_until_fin,
bool allow_content_length_list,
63 int *last_chunk_offset, dissector_table_t streaming_subdissector_table,
64 dissector_handle_t *streaming_chunk_handle);
75starts_with_chunk_size(tvbuff_t *tvb,
const int offset,
packet_info *pinfo) {
76 unsigned chunk_size = 0;
82 char *chunk_string = (
char *)
tvb_get_string_enc(pinfo->pool, tvb, offset, linelen, ENC_ASCII);
83 char *c = chunk_string;
88 if ((c = strpbrk(c,
"; \t"))) {
92 if (!ws_hexstrtou32(chunk_string, NULL, &chunk_size)) {
94 }
else if (chunk_size > (1U << 31)) {
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
uint8_t * tvb_get_string_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding)
Extract and convert a string from a tvbuff to UTF-8 using the specified encoding.
Definition tvbuff.c:3902
bool tvb_find_line_end_remaining(tvbuff_t *tvb, const unsigned offset, unsigned *linelen, unsigned *next_offset)
Locate the end of a line in a tvbuff.
Definition tvbuff.c:4865
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.
Definition req_resp_hdrs.c:94
WS_DLL_PUBLIC bool req_resp_hdrs_parse_content_length(const char *value, int64_t *content_length)
Parse a Content-Length header field value.
Definition req_resp_hdrs.c:44