2 * Definitions for file structures and routines
4 * $Id: file.h,v 1.98 2002/09/06 22:45:40 sahlberg Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 #include "wiretap/wtap.h"
29 #include <epan/dfilter/dfilter.h>
32 #include <epan/epan.h>
36 /* Return values from "read_cap_file()", "continue_tail_cap_file()",
37 and "finish_tail_cap_file()". */
39 READ_SUCCESS, /* read succeeded */
40 READ_ERROR, /* read got an error */
41 READ_ABORTED /* read aborted by user */
44 int open_cap_file(char *, gboolean, capture_file *);
45 void close_cap_file(capture_file *);
46 read_status_t read_cap_file(capture_file *, int *);
47 int start_tail_cap_file(char *, gboolean, capture_file *);
48 read_status_t continue_tail_cap_file(capture_file *, int, int *);
49 read_status_t finish_tail_cap_file(capture_file *, int *);
50 /* size_t read_frame_header(capture_file *); */
51 gboolean save_cap_file(char *, capture_file *, gboolean, gboolean, guint);
53 int filter_packets(capture_file *cf, gchar *dfilter);
54 void colorize_packets(capture_file *);
55 void redissect_packets(capture_file *cf);
56 int print_packets(capture_file *cf, print_args_t *print_args);
57 void change_time_formats(capture_file *);
58 gboolean find_packet(capture_file *cf, dfilter_t *sfcode);
61 FOUND_FRAME, /* found the frame */
62 NO_SUCH_FRAME, /* no frame with that number */
63 FRAME_NOT_DISPLAYED /* frame with that number isn't displayed */
65 goto_result_t goto_frame(capture_file *cf, guint fnumber);
67 void select_packet(capture_file *, int);
68 void unselect_packet(capture_file *);
70 void unselect_field(void);
73 * Mark a particular frame in a particular capture.
75 void mark_frame(capture_file *, frame_data *);
78 * Unmark a particular frame in a particular capture.
80 void unmark_frame(capture_file *, frame_data *);
82 /* Moves or copies a file. Returns 0 on failure, 1 on success */
83 int file_mv(char *from, char *to);
85 /* Copies a file. Returns 0 on failure, 1 on success */
86 int file_cp(char *from, char *to);
88 char *file_open_error_message(int, gboolean, int);
89 char *file_read_error_message(int);
90 char *file_write_error_message(int);