Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-http.h
1/* packet-http.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <[email protected]>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef __PACKET_HTTP_H__
11#define __PACKET_HTTP_H__
12
13#include <epan/packet.h>
14#include "ws_symbol_export.h"
15
16WS_DLL_PUBLIC const value_string vals_http_status_code[];
17
18WS_DLL_PUBLIC
19void http_tcp_dissector_add(uint32_t port, dissector_handle_t handle);
20WS_DLL_PUBLIC
21void http_tcp_dissector_delete(uint32_t port);
22WS_DLL_PUBLIC
23void http_tcp_port_add(uint32_t port);
24
25WS_DLL_PUBLIC
26void http_add_path_components_to_tree(tvbuff_t* tvb, packet_info* pinfo _U_, proto_item* item, int offset, int length);
27
28/* Used for HTTP statistics */
29typedef struct _http_info_value_t {
30 uint32_t framenum;
31 char *request_method;
32 unsigned response_code;
33 char *http_host;
34 const char *request_uri;
35 const char *referer_uri;
36 const char *full_uri;
37 const char *location_base_uri;
38 const char *location_target;
40
41#define HTTP_PROTO_DATA_REQRES 0
42#define HTTP_PROTO_DATA_INFO 1
43
45typedef struct _http_req_res_t {
47 uint32_t number;
49 uint32_t req_framenum;
51 uint32_t res_framenum;
54 unsigned response_code;
55 char *request_method;
56 char *http_host;
57 char *request_uri;
58 char *full_uri;
59 bool req_has_range;
60 bool resp_has_range;
61
65
67typedef struct _http_conv_t {
68
69 /* Used to speed up desegmenting of chunked Transfer-Encoding. */
70 wmem_map_t *chunk_offsets_fwd;
71 wmem_map_t *chunk_offsets_rev;
72
73 /* Fields related to proxied/tunneled/Upgraded connections. */
74 uint32_t startframe; /* First frame of proxied connection */
75 int startoffset; /* Offset within the frame where the new protocol begins. */
76 dissector_handle_t next_handle; /* New protocol */
77
78 char *websocket_protocol; /* Negotiated WebSocket protocol */
79 char *websocket_extensions; /* Negotiated WebSocket extensions */
80 /* Server address and port, known after first server response */
81 uint16_t server_port;
82 address server_addr;
91 /* true means current message is chunked streaming, and not ended yet.
92 * This is only meaningful during the first scan.
93 */
95
96 /* Used for req/res matching */
97 GSList *req_list;
98 wmem_map_t *matches_table;
99
101
102/* Used for HTTP Export Object feature */
103typedef struct _http_eo_t {
104 char *hostname;
105 char *filename;
106 char *content_type;
107 tvbuff_t *payload;
108} http_eo_t;
109
110#endif /* __PACKET_HTTP_H__ */
Definition address.h:56
Definition packet-http.h:67
http_req_res_t * req_res_tail
Definition packet-http.h:84
bool message_ended
Definition packet-http.h:94
Definition packet-http.h:103
Definition packet-http.h:29
Definition packet-http.h:45
nstime_t req_ts
Definition packet-http.h:53
uint32_t number
Definition packet-http.h:47
void * private_data
Definition packet-http.h:63
uint32_t req_framenum
Definition packet-http.h:49
uint32_t res_framenum
Definition packet-http.h:51
Definition packet_info.h:43
Definition proto.h:903
Definition value_string.h:25
Definition wmem_map.c:44
Definition packet.c:787
Definition nstime.h:26
Definition tvbuff-int.h:35