nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /* export_object.h
2 * Common routines for tracking & saving objects found in streams of data
3 * Copyright 2007, Stephen Fisher (see AUTHORS file)
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
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.
13 *
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.
18 *
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,
22 * USA.
23 */
24  
25 #ifndef __EXPORT_OBJECT_H__
26 #define __EXPORT_OBJECT_H__
27  
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31  
32 /* Common between protocols */
33  
34 struct _export_object_list_t;
35 typedef struct _export_object_list_t export_object_list_t;
36  
37 typedef struct _export_object_entry_t {
38 guint32 pkt_num;
39 gchar *hostname;
40 gchar *content_type;
41 gchar *filename;
42 /* We need to store a 64 bit integer to hold a file length
43 (was guint payload_len;) */
44 gint64 payload_len;
45 guint8 *payload_data;
46 } export_object_entry_t;
47  
48 void object_list_add_entry(export_object_list_t *object_list, export_object_entry_t *entry);
49 export_object_entry_t *object_list_get_entry(export_object_list_t *object_list, int row);
50  
51 gboolean eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry, gboolean show_err);
52 GString *eo_massage_str(const gchar *in_str, gsize maxlen, int dup);
53 const char *ct2ext(const char *content_type);
54 void eo_free_entry(export_object_entry_t *entry);
55  
56  
57 /* Protocol specific */
58 gboolean eo_dicom_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
59 const void *data);
60 gboolean eo_http_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
61 const void *data);
62 gboolean eo_smb_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
63 const void *data);
64 gboolean eo_tftp_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
65 const void *data);
66  
67 void eo_smb_cleanup(void);
68 void eo_tftp_cleanup(void);
69  
70  
71 #ifdef __cplusplus
72 }
73 #endif /* __cplusplus */
74  
75 #endif /* __EXPORT_OBJECT_H__ */
76  
77 /*
78 * Editor modelines
79 *
80 * Local Variables:
81 * c-basic-offset: 4
82 * tab-width: 8
83 * indent-tabs-mode: nil
84 * End:
85 *
86 * ex: set shiftwidth=4 tabstop=8 expandtab:
87 * :indentSize=4:tabSize=8:noTabs=true:
88 */