2 * Definitions for printing packet analysis trees.
4 * $Id: print.h,v 1.44 2004/05/09 10:03:37 guy 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>
33 /* print output format */
35 PR_FMT_TEXT, /* plain text */
36 PR_FMT_PS, /* postscript */
37 PR_FMT_PSML, /* packet summary markup language */
38 PR_FMT_PDML /* packet data markup language */
41 /* print_range, enum which frames should be printed */
43 print_range_selected_only, /* selected frame(s) only (currently only one) */
44 print_range_marked_only, /* marked frames only */
45 print_range_all_displayed, /* all frames currently displayed */
46 print_range_all_captured /* all frames in capture */
49 /* print_dissections, enum how the dissections should be printed */
51 print_dissections_none, /* no dissections at all */
52 print_dissections_collapsed, /* no dissection details */
53 print_dissections_as_displayed, /* details as displayed */
54 print_dissections_expanded /* all dissection details */
55 } print_dissections_e;
58 print_format_e format; /* plain text, PostScript, PDML, ... */
59 gboolean to_file; /* TRUE if we're printing to a file */
60 char *file; /* file output pathname */
61 char *cmd; /* print command string (not win32) */
64 gboolean print_summary; /* TRUE if we should just print summary;
65 FALSE if we should print protocol tree. */
66 print_dissections_e print_dissections;
67 gboolean print_hex; /* TRUE if we should also print hex data;
68 FALSE if we should print only if not dissected. */
69 gboolean print_formfeed; /* TRUE if a formfeed should be printed
70 before each new packet */
73 /* Functions in print.h */
75 extern FILE *open_print_dest(int to_file, const char *dest);
76 extern gboolean close_print_dest(int to_file, FILE *fh);
77 extern void print_preamble(FILE *fh, print_format_e format, gchar *filename);
78 extern void print_packet_header(FILE *fh, print_format_e format, guint32 number, gchar *summary);
79 extern void print_formfeed(FILE *fh, print_format_e format);
80 extern void print_finale(FILE *fh, print_format_e format);
81 extern void proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
83 extern void print_hex_data(FILE *fh, print_format_e format, epan_dissect_t *edt);
84 extern void print_line(FILE *fh, int indent, print_format_e format, char *line);