If we see a file with an unknown network type, report the type in a
[obnox/wireshark/wip.git] / print.h
diff --git a/print.h b/print.h
index 42e4ef41fcfab3eee8c527381654c5a777d0236c..fa5f409ce6d5e466870a32dbdde615520c72664b 100644 (file)
--- a/print.h
+++ b/print.h
@@ -1,9 +1,9 @@
 /* print.h
  * Definitions for printing packet analysis trees.
  *
- * $Id: print.h,v 1.2 1998/09/16 03:22:16 gerald Exp $
+ * $Id: print.h,v 1.18 2000/01/22 06:22:19 guy Exp $
  *
- * Gilbert Ramirez <gram@verdict.uthscsa.edu>
+ * Gilbert Ramirez <gram@xiexie.org>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
 #ifndef __PRINT_H__
 #define __PRINT_H__
 
-typedef struct pr_opts {
-       int             output_format;  /* 0=text, 1=postscript */
-       int             output_dest;    /* 0=cmd, 1=file */
-       char    *file;
-       char    *cmd;
+#define PR_FMT_TEXT 0
+#define PR_FMT_PS   1
 
-       /* for the dialogue box */
-       GtkWidget       *window;
-       GtkWidget       *cmd_te;
-       GtkWidget       *file_te;
-} pr_opts;
+typedef struct {
+  gboolean     to_file;        /* TRUE if we're printing to a file */
+  char         *dest;          /* if printing to file, pathname;
+                                  if not, command string */
+  gint         format;         /* text or PostScript */
+  gboolean     print_summary;  /* TRUE if we should just print summary;
+                                  FALSE if we should print protocol tree. */
+  gboolean     print_hex;      /* TRUE if we should also print hex data;
+                                  FALSE if we should print only if not dissected. */
+  gboolean     expand_all;     /* TRUE if we should expand all levels;
+                                  FALSE if we should expand as displayed. */
+} print_args_t;
 
 /* Functions in print.h */
 
-void printer_opts_cb(GtkWidget *, gpointer);
-void print_tree_text(FILE *fh, const u_char *pd, frame_data *fd, GtkTree *tree);
-void print_tree_ps(FILE *fh, const u_char *pd, frame_data *fd, GtkTree *tree);
+FILE *open_print_dest(int to_file, const char *dest);
+void close_print_dest(int to_file, FILE *fh);
+void print_preamble(FILE *fh, gint format);
+void print_finale(FILE *fh, gint format);
+void proto_tree_print(gboolean print_one_packet, print_args_t *print_args,
+    GNode *protocol_tree, const u_char *pd, frame_data *fd, FILE *fh);
+void print_hex_data(FILE *fh, gint format, register const u_char *cp,
+    register u_int length, char_enc encoding);
+void print_line(FILE *fh, gint format, char *line);
 
 #endif /* print.h */