4 * $Id: globals.h,v 1.4 1999/09/12 14:34:18 deniel Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
45 #ifndef __TIMESTAMP_H__
46 #include "timestamp.h"
49 #define MIN_PACKET_SIZE 68 /* minimum amount of packet data we can read */
51 /* Byte swapping routines */
53 ( (((x) & 0x00ff) << 8) | \
54 (((x) & 0xff00) >> 8) )
56 ( (((x) & 0x000000ff) << 24) | \
57 (((x) & 0x0000ff00) << 8) | \
58 (((x) & 0x00ff0000) >> 8) | \
59 (((x) & 0xff000000) >> 24) )
63 # define LITTLE_ENDIAN 4321
64 # define BIG_ENDIAN 1234
65 # ifdef WORDS_BIGENDIAN
66 # define BYTE_ORDER BIG_ENDIAN
68 # define BYTE_ORDER LITTLE_ENDIAN
72 /* From the K&R book, p. 89 */
74 # define MAX(x, y) ((x) > (y) ? (x) : (y))
78 # define MIN(x, y) ((x) < (y) ? (x) : (y))
81 extern FILE *data_out_file;
82 extern packet_info pi;
83 extern capture_file cf;
84 extern GtkWidget *file_sel, *packet_list, *tree_view, *byte_view, *prog_bar,
86 extern GdkFont *m_r_font, *m_b_font;
87 extern guint main_ctx, file_ctx;
88 extern gint start_capture;
89 extern gchar comp_info_str[256];
90 extern gchar *ethereal_path;
91 extern gchar *medium_font;
92 extern gchar *bold_font;
93 extern gchar *last_open_dir;
95 extern ts_type timestamp_type;
97 extern GtkStyle *item_style;
100 extern int sync_mode; /* allow sync */
101 extern int sync_pipe[2]; /* used to sync father */
102 extern int fork_mode; /* fork a child to do the capture */
103 extern int sigusr2_received;
104 extern int quit_after_cap; /* Makes a "capture only mode". Implies -k */
107 #define PF_DIR ".ethereal"