2013-09-09 19:30:30 +00:00
|
|
|
/* follow.h
|
|
|
|
* Common routines for following data streams (qt/gtk)
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
|
|
|
* USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FOLLOW__H__
|
|
|
|
#define __FOLLOW__H__
|
|
|
|
|
|
|
|
#ifdef SSL_PLUGIN
|
|
|
|
#include "packet-ssl-utils.h"
|
|
|
|
#else
|
|
|
|
#include <epan/dissectors/packet-ssl-utils.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
gboolean is_from_server;
|
2013-11-14 17:37:40 +00:00
|
|
|
guint32 packet_num;
|
2013-09-09 19:30:30 +00:00
|
|
|
StringInfo data;
|
|
|
|
} SslDecryptedRecord;
|
|
|
|
|
|
|
|
/* Type of follow we are doing */
|
|
|
|
typedef enum {
|
|
|
|
FOLLOW_TCP,
|
|
|
|
FOLLOW_SSL,
|
|
|
|
FOLLOW_UDP
|
|
|
|
} follow_type_t;
|
|
|
|
|
|
|
|
/* Show Stream */
|
|
|
|
typedef enum {
|
|
|
|
FROM_CLIENT,
|
|
|
|
FROM_SERVER,
|
|
|
|
BOTH_HOSTS
|
|
|
|
} show_stream_t;
|
|
|
|
|
|
|
|
/* Show Type */
|
|
|
|
typedef enum {
|
|
|
|
SHOW_ASCII,
|
|
|
|
SHOW_EBCDIC,
|
|
|
|
SHOW_HEXDUMP,
|
|
|
|
SHOW_CARRAY,
|
2013-11-18 23:39:47 +00:00
|
|
|
SHOW_RAW,
|
2015-10-14 21:33:27 +00:00
|
|
|
SHOW_YAML,
|
|
|
|
SHOW_UTF8
|
2013-09-09 19:30:30 +00:00
|
|
|
} show_type_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
FRS_OK,
|
|
|
|
FRS_OPEN_ERROR,
|
|
|
|
FRS_READ_ERROR,
|
|
|
|
FRS_PRINT_ERROR
|
|
|
|
} frs_return_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
gboolean is_server;
|
2013-11-14 17:37:40 +00:00
|
|
|
guint32 packet_num;
|
2013-09-09 19:30:30 +00:00
|
|
|
GByteArray *data;
|
|
|
|
} follow_record_t;
|
|
|
|
|
2013-09-09 21:04:41 +00:00
|
|
|
#ifdef HAVE_LIBZ
|
2013-09-09 19:30:30 +00:00
|
|
|
gboolean
|
|
|
|
parse_http_header(char *data, size_t len, size_t *content_start);
|
2013-09-09 21:04:41 +00:00
|
|
|
#endif
|
2013-09-09 19:30:30 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|