2001-01-11 06:30:54 +00:00
|
|
|
/* packet-http.h
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2001-01-11 06:30:54 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2001-01-11 06:30:54 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-01-11 06:30:54 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-01-11 06:30:54 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-01-11 06:30:54 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2001-01-11 06:30:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PACKET_HTTP_H__
|
|
|
|
#define __PACKET_HTTP_H__
|
2003-09-02 23:09:11 +00:00
|
|
|
|
2003-09-02 22:47:59 +00:00
|
|
|
#include <epan/packet.h>
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
2001-01-11 06:30:54 +00:00
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC
|
2001-12-03 04:00:26 +00:00
|
|
|
void http_dissector_add(guint32 port, dissector_handle_t handle);
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC
|
2013-01-30 21:49:33 +00:00
|
|
|
void http_port_add(guint32 port);
|
2001-01-11 06:30:54 +00:00
|
|
|
|
2007-03-13 20:42:04 +00:00
|
|
|
/* Used for HTTP statistics */
|
|
|
|
typedef struct _http_info_value_t {
|
|
|
|
guint32 framenum;
|
2012-04-20 15:31:15 +00:00
|
|
|
gchar *request_method;
|
2003-09-02 23:09:11 +00:00
|
|
|
guint response_code;
|
2005-02-28 22:27:24 +00:00
|
|
|
gchar *http_host;
|
2012-12-26 05:57:06 +00:00
|
|
|
const gchar *request_uri;
|
2007-03-13 20:42:04 +00:00
|
|
|
} http_info_value_t;
|
|
|
|
|
|
|
|
/* Used for HTTP Export Object feature */
|
|
|
|
typedef struct _http_eo_t {
|
|
|
|
guint32 pkt_num;
|
|
|
|
gchar *hostname;
|
|
|
|
gchar *filename;
|
2007-02-19 22:37:45 +00:00
|
|
|
gchar *content_type;
|
|
|
|
guint32 payload_len;
|
2007-03-13 20:42:04 +00:00
|
|
|
const guint8 *payload_data;
|
|
|
|
} http_eo_t;
|
|
|
|
|
2013-02-16 14:59:00 +00:00
|
|
|
/** information about a request and response on a HTTP conversation. */
|
|
|
|
typedef struct _http_req_res_t {
|
|
|
|
/** the running number on the conversation */
|
|
|
|
guint32 number;
|
|
|
|
/** frame number of the request */
|
|
|
|
guint32 req_framenum;
|
|
|
|
/** frame number of the corresponding response */
|
|
|
|
guint32 res_framenum;
|
|
|
|
/** timestamp of the request */
|
|
|
|
nstime_t req_ts;
|
|
|
|
/** pointer to the next element in the linked list, NULL for the tail node */
|
|
|
|
struct _http_req_res_t *next;
|
|
|
|
/** pointer to the previous element in the linked list, NULL for the head node */
|
|
|
|
struct _http_req_res_t *prev;
|
|
|
|
} http_req_res_t;
|
|
|
|
|
|
|
|
/** Conversation data of a HTTP connection. */
|
2007-03-13 20:42:04 +00:00
|
|
|
typedef struct _http_conv_t {
|
|
|
|
guint response_code;
|
|
|
|
gchar *http_host;
|
|
|
|
gchar *request_method;
|
|
|
|
gchar *request_uri;
|
2012-11-02 20:35:24 +00:00
|
|
|
guint8 upgrade;
|
2007-12-26 18:28:31 +00:00
|
|
|
guint32 startframe; /* First frame of proxied connection */
|
2013-02-16 14:59:00 +00:00
|
|
|
/** the tail node of req_res */
|
|
|
|
http_req_res_t *req_res_tail;
|
|
|
|
/** the number of requests on the conversation. */
|
|
|
|
guint32 req_res_num;
|
2007-03-13 20:42:04 +00:00
|
|
|
} http_conv_t;
|
2003-09-02 23:09:11 +00:00
|
|
|
|
2007-03-13 20:42:04 +00:00
|
|
|
#endif /* __PACKET_HTTP_H__ */
|