2 * Definitions for printing packet analysis trees.
4 * $Id: print.h,v 1.37 2004/02/20 17:27:16 ulfl Exp $
6 * Gilbert Ramirez <gram@alumni.rice.edu>
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@ethereal.com>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 #include <epan/packet.h>
36 /* print_range, enum which frames should be printed */
38 print_range_selected_only, /* selected frame(s) only (currently only one) */
39 print_range_marked_only, /* marked frames only */
40 print_range_all_displayed, /* all frames currently displayed */
41 print_range_all_captured /* all frames in capture */
44 /* print_dissections, enum how the dissections should be printed */
46 print_dissections_collapsed, /* no dissection details */
47 print_dissections_as_displayed, /* details as displayed */
48 print_dissections_expanded /* all dissection details */
49 } print_dissections_e;
52 gint format; /* plain text, PostScript or PDML */
53 gboolean to_file; /* TRUE if we're printing to a file */
54 char *dest; /* if printing to file, pathname;
55 if not, command string */
58 gboolean print_summary; /* TRUE if we should just print summary;
59 FALSE if we should print protocol tree. */
60 print_dissections_e print_dissections;
61 gboolean print_hex; /* TRUE if we should also print hex data;
62 FALSE if we should print only if not dissected. */
65 /* Functions in print.h */
67 FILE *open_print_dest(int to_file, const char *dest);
68 gboolean close_print_dest(int to_file, FILE *fh);
69 void print_preamble(FILE *fh, gint format);
70 void print_finale(FILE *fh, gint format);
71 void proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
73 void print_hex_data(FILE *fh, gint format, epan_dissect_t *edt);
74 void print_line(FILE *fh, int indent, gint format, char *line);