From Michael Lum: support an AT_SS7PC address type for SS7 point codes,
[metze/wireshark/wip.git] / print.h
1 /* print.h
2  * Definitions for printing packet analysis trees.
3  *
4  * $Id: print.h,v 1.31 2003/12/06 06:09:10 gram Exp $
5  *
6  * Gilbert Ramirez <gram@alumni.rice.edu>
7  *
8  * Ethereal - Network traffic analyzer
9  * By Gerald Combs <gerald@ethereal.com>
10  * Copyright 1998 Gerald Combs
11  *
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.
16  *
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.
21  *
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.
25  */
26
27 #ifndef __PRINT_H__
28 #define __PRINT_H__
29
30 #include <epan/packet.h>
31
32 #define PR_FMT_TEXT 0
33 #define PR_FMT_PS   1
34 #define PR_FMT_PDML 2
35
36 typedef struct {
37   gboolean      to_file;        /* TRUE if we're printing to a file */
38   char          *dest;          /* if printing to file, pathname;
39                                    if not, command string */
40   gint          format;         /* text or PostScript */
41   gboolean      print_summary;  /* TRUE if we should just print summary;
42                                    FALSE if we should print protocol tree. */
43   gboolean      print_hex;      /* TRUE if we should also print hex data;
44                                    FALSE if we should print only if not dissected. */
45   gboolean      expand_all;     /* TRUE if we should expand all levels;
46                                    FALSE if we should expand as displayed. */
47   gboolean      print_only_marked; /* TRUE if we should print only marked
48                                       frames; FALSE if we should print
49                                       all frames. */
50 } print_args_t;
51
52 /* Functions in print.h */
53
54 FILE *open_print_dest(int to_file, const char *dest);
55 void close_print_dest(int to_file, FILE *fh);
56 void print_preamble(FILE *fh, gint format);
57 void print_finale(FILE *fh, gint format);
58 void proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
59     FILE *fh);
60 void print_hex_data(FILE *fh, gint format, epan_dissect_t *edt);
61 void print_line(FILE *fh, int indent, gint format, char *line);
62
63 #endif /* print.h */