Start of a PCNFSD dissector as the RPC dissector 150001.
[obnox/wireshark/wip.git] / print.h
1 /* print.h
2  * Definitions for printing packet analysis trees.
3  *
4  * $Id: print.h,v 1.23 2001/07/17 05:32:43 hagbard Exp $
5  *
6  * Gilbert Ramirez <gram@xiexie.org>
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 "packet.h"
31
32 #define PR_FMT_TEXT 0
33 #define PR_FMT_PS   1
34
35 typedef struct {
36   gboolean      to_file;        /* TRUE if we're printing to a file */
37   char          *dest;          /* if printing to file, pathname;
38                                    if not, command string */
39   gint          format;         /* text or PostScript */
40   gboolean      print_summary;  /* TRUE if we should just print summary;
41                                    FALSE if we should print protocol tree. */
42   gboolean      print_hex;      /* TRUE if we should also print hex data;
43                                    FALSE if we should print only if not dissected. */
44   gboolean      expand_all;     /* TRUE if we should expand all levels;
45                                    FALSE if we should expand as displayed. */
46   gboolean      suppress_unmarked; /* TRUE if we should suppress unmarked 
47                                      frames FALSE if we should allow 
48                                      both marked and unmarked frames to be 
49                                      printed.
50                                   */
51 } print_args_t;
52
53 /* Functions in print.h */
54
55 FILE *open_print_dest(int to_file, const char *dest);
56 void close_print_dest(int to_file, FILE *fh);
57 void print_preamble(FILE *fh, gint format);
58 void print_finale(FILE *fh, gint format);
59 void proto_tree_print(gboolean print_one_packet, print_args_t *print_args,
60     GNode *protocol_tree, frame_data *fd, FILE *fh);
61 void print_hex_data(FILE *fh, gint format, frame_data *fd);
62 void print_line(FILE *fh, gint format, char *line);
63
64 #endif /* print.h */