2007-02-28 23:20:40 +00:00
|
|
|
/* export_object.h
|
2007-03-03 03:14:00 +00:00
|
|
|
* Common routines for tracking & saving objects found in streams of data
|
2009-05-31 05:55:15 +00:00
|
|
|
* Copyright 2007, Stephen Fisher (see AUTHORS file)
|
2007-02-28 23:20:40 +00:00
|
|
|
*
|
|
|
|
* $Id$
|
2012-10-16 22:57:22 +00:00
|
|
|
*
|
2007-02-28 23:20:40 +00:00
|
|
|
* 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 __EXPORT_OBJECT_H__
|
|
|
|
#define __EXPORT_OBJECT_H__
|
|
|
|
|
2012-10-16 22:57:22 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2007-02-28 23:20:40 +00:00
|
|
|
/* Common between protocols */
|
2012-10-16 22:57:22 +00:00
|
|
|
|
|
|
|
struct _export_object_list_t;
|
|
|
|
typedef struct _export_object_list_t export_object_list_t;
|
2007-02-28 23:20:40 +00:00
|
|
|
|
|
|
|
typedef struct _export_object_entry_t {
|
2012-10-24 15:51:59 +00:00
|
|
|
guint32 pkt_num;
|
|
|
|
gchar *hostname;
|
|
|
|
gchar *content_type;
|
|
|
|
gchar *filename;
|
|
|
|
/* We need to store a 64 bit integer to hold a file length
|
|
|
|
(was guint payload_len;) */
|
|
|
|
gint64 payload_len;
|
|
|
|
guint8 *payload_data;
|
2007-02-28 23:20:40 +00:00
|
|
|
} export_object_entry_t;
|
|
|
|
|
2012-10-16 22:57:22 +00:00
|
|
|
void object_list_add_entry(export_object_list_t *object_list, export_object_entry_t *entry);
|
|
|
|
export_object_entry_t *object_list_get_entry(export_object_list_t *object_list, int row);
|
2011-05-03 17:38:26 +00:00
|
|
|
|
2012-10-18 21:14:43 +00:00
|
|
|
gboolean eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry, gboolean show_err);
|
|
|
|
GString *eo_massage_str(const gchar *in_str, gsize maxlen, int dup);
|
|
|
|
const char *ct2ext(const char *content_type);
|
|
|
|
|
|
|
|
|
2012-10-16 22:57:22 +00:00
|
|
|
/* Protocol specific */
|
|
|
|
gboolean eo_dicom_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
2012-10-24 15:51:59 +00:00
|
|
|
const void *data);
|
2012-10-16 22:57:22 +00:00
|
|
|
gboolean eo_http_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
2013-03-09 08:44:14 +00:00
|
|
|
const void *data);
|
2012-10-16 22:57:22 +00:00
|
|
|
gboolean eo_smb_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
2013-03-09 08:44:14 +00:00
|
|
|
const void *data);
|
2011-05-03 17:38:26 +00:00
|
|
|
|
2012-10-16 22:57:22 +00:00
|
|
|
void eo_smb_cleanup(void);
|
2007-02-28 23:20:40 +00:00
|
|
|
|
2012-10-16 22:57:22 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2007-02-28 23:20:40 +00:00
|
|
|
|
|
|
|
#endif /* __EXPORT_OBJECT_H__ */
|
2012-10-24 15:51:59 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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:
|
|
|
|
*/
|