Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
packet-http.h
1 /* packet-http.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
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 
16 extern const value_string vals_http_status_code[];
17 
18 WS_DLL_PUBLIC
19 void http_tcp_dissector_add(guint32 port, dissector_handle_t handle);
20 WS_DLL_PUBLIC
21 void http_tcp_dissector_delete(guint32 port);
22 WS_DLL_PUBLIC
23 void http_tcp_port_add(guint32 port);
24 
25 /* Used for HTTP statistics */
26 typedef struct _http_info_value_t {
27  guint32 framenum;
28  gchar *request_method;
29  guint response_code;
30  gchar *http_host;
31  const gchar *request_uri;
32  const gchar *referer_uri;
33  const gchar *full_uri;
34  const gchar *location_base_uri;
35  const gchar *location_target;
37 
39 typedef struct _http_req_res_t {
41  guint32 number;
43  guint32 req_framenum;
45  guint32 res_framenum;
53 
55 typedef struct _http_conv_t {
56  guint response_code;
57  guint32 startframe; /* First frame of proxied connection */
58  gchar *http_host;
59  gchar *request_method;
60  gchar *request_uri;
61  gchar *full_uri;
63  guint32 req_res_num;
64  guint8 upgrade;
65  gchar *websocket_protocol; /* Negotiated WebSocket protocol */
66  gchar *websocket_extensions; /* Negotiated WebSocket extensions */
67  /* Server address and port, known after first server response */
68  guint16 server_port;
69  address server_addr;
72 } http_conv_t;
73 
74 typedef enum _http_type {
75  HTTP_REQUEST,
76  HTTP_RESPONSE,
77  HTTP_NOTIFICATION,
78  HTTP_OTHERS
79 } http_type_t;
80 
82 typedef struct _http_message_info_t {
83  http_type_t type; /* Message type; may be HTTP_OTHERS if not called by HTTP */
84  const char *media_str; /* Content-Type parameters */
86 
87 #endif /* __PACKET_HTTP_H__ */
struct _http_req_res_t * next
Definition: packet-http.h:49
guint32 req_res_num
Definition: packet-http.h:63
nstime_t req_ts
Definition: packet-http.h:47
struct _http_req_res_t * prev
Definition: packet-http.h:51
Definition: packet.c:659
Definition: nstime.h:27
http_req_res_t * req_res_tail
Definition: packet-http.h:71
Definition: packet-http.h:82
Definition: packet-http.h:55
guint32 res_framenum
Definition: packet-http.h:45
Definition: value_string.h:24
guint32 req_framenum
Definition: packet-http.h:43
Definition: packet-http.h:39
guint32 number
Definition: packet-http.h:41
Definition: packet-http.h:26
Definition: address.h:47