HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-http.h
blob899c363c1b8b0f8351a770bd436d0946790283c1
1 /* packet-http.h
3 * $Id$
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef __PACKET_HTTP_H__
25 #define __PACKET_HTTP_H__
27 #include <epan/packet.h>
28 #include "ws_symbol_export.h"
30 WS_DLL_PUBLIC
31 void http_dissector_add(guint32 port, dissector_handle_t handle);
32 WS_DLL_PUBLIC
33 void http_port_add(guint32 port);
35 /* Used for HTTP statistics */
36 typedef struct _http_info_value_t {
37 guint32 framenum;
38 gchar *request_method;
39 guint response_code;
40 gchar *http_host;
41 const gchar *request_uri;
42 } http_info_value_t;
44 /* Used for HTTP Export Object feature */
45 typedef struct _http_eo_t {
46 guint32 pkt_num;
47 gchar *hostname;
48 gchar *filename;
49 gchar *content_type;
50 guint32 payload_len;
51 const guint8 *payload_data;
52 } http_eo_t;
54 /** information about a request and response on a HTTP conversation. */
55 typedef struct _http_req_res_t {
56 /** the running number on the conversation */
57 guint32 number;
58 /** frame number of the request */
59 guint32 req_framenum;
60 /** frame number of the corresponding response */
61 guint32 res_framenum;
62 /** timestamp of the request */
63 nstime_t req_ts;
64 /** pointer to the next element in the linked list, NULL for the tail node */
65 struct _http_req_res_t *next;
66 /** pointer to the previous element in the linked list, NULL for the head node */
67 struct _http_req_res_t *prev;
68 } http_req_res_t;
70 /** Conversation data of a HTTP connection. */
71 typedef struct _http_conv_t {
72 guint response_code;
73 gchar *http_host;
74 gchar *request_method;
75 gchar *request_uri;
76 guint8 upgrade;
77 guint32 startframe; /* First frame of proxied connection */
78 /** the tail node of req_res */
79 http_req_res_t *req_res_tail;
80 /** the number of requests on the conversation. */
81 guint32 req_res_num;
82 } http_conv_t;
84 #endif /* __PACKET_HTTP_H__ */