aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/color_dlg.c6
-rw-r--r--gtk/colors.c6
-rw-r--r--gtk/decode_as_dlg.c6
-rw-r--r--gtk/dfilter_expr_dlg.c6
-rw-r--r--gtk/display_opts.c6
-rw-r--r--gtk/follow_dlg.c6
-rw-r--r--gtk/help_dlg.c6
-rw-r--r--gtk/main.c12
-rw-r--r--gtk/menu.c6
-rw-r--r--gtk/plugins_dlg.c6
-rw-r--r--gtk/prefs_dlg.c6
-rw-r--r--gtk/proto_dlg.c6
-rw-r--r--gtk/proto_draw.c6
-rw-r--r--gtk/tcp_graph.c58
14 files changed, 39 insertions, 103 deletions
diff --git a/gtk/color_dlg.c b/gtk/color_dlg.c
index eea6afe14a..e9c103e4e7 100644
--- a/gtk/color_dlg.c
+++ b/gtk/color_dlg.c
@@ -1,7 +1,7 @@
/* color_dlg.c
* Definitions for dialog boxes for color filters
*
- * $Id: color_dlg.c,v 1.14 2002/05/27 22:00:37 guy Exp $
+ * $Id: color_dlg.c,v 1.15 2002/08/02 22:34:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,10 +33,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "gtk/main.h"
#include <epan/packet.h>
#include "colors.h"
diff --git a/gtk/colors.c b/gtk/colors.c
index 03e270f1c4..cad130077d 100644
--- a/gtk/colors.c
+++ b/gtk/colors.c
@@ -1,7 +1,7 @@
/* colors.c
* Definitions for color structures and routines
*
- * $Id: colors.c,v 1.21 2002/07/29 06:30:01 guy Exp $
+ * $Id: colors.c,v 1.22 2002/08/02 22:34:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,10 +36,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <epan/filesystem.h>
#include "gtk/main.h"
diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c
index 599f8e0245..5be198efa7 100644
--- a/gtk/decode_as_dlg.c
+++ b/gtk/decode_as_dlg.c
@@ -1,6 +1,6 @@
/* decode_as_dlg.c
*
- * $Id: decode_as_dlg.c,v 1.23 2002/03/05 11:55:58 guy Exp $
+ * $Id: decode_as_dlg.c,v 1.24 2002/08/02 22:34:53 jmayer Exp $
*
* Routines to modify dissector tables on the fly.
*
@@ -34,10 +34,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "decode_as_dlg.h"
#include "dlg_utils.h"
#include "globals.h"
diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c
index 5693bfaed6..ab0727f33d 100644
--- a/gtk/dfilter_expr_dlg.c
+++ b/gtk/dfilter_expr_dlg.c
@@ -7,7 +7,7 @@
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> and
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: dfilter_expr_dlg.c,v 1.25 2002/03/05 11:55:58 guy Exp $
+ * $Id: dfilter_expr_dlg.c,v 1.26 2002/08/02 22:34:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -49,10 +49,6 @@
#include <string.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/gtk/display_opts.c b/gtk/display_opts.c
index 2a129cdde5..7e6b1f6500 100644
--- a/gtk/display_opts.c
+++ b/gtk/display_opts.c
@@ -1,7 +1,7 @@
/* display_opts.c
* Routines for packet display windows
*
- * $Id: display_opts.c,v 1.27 2002/07/17 00:42:56 guy Exp $
+ * $Id: display_opts.c,v 1.28 2002/08/02 22:34:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,10 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <gtk/gtk.h>
#include <stdlib.h>
diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c
index 80f4f8ae2f..1db5c579eb 100644
--- a/gtk/follow_dlg.c
+++ b/gtk/follow_dlg.c
@@ -1,6 +1,6 @@
/* follow_dlg.c
*
- * $Id: follow_dlg.c,v 1.23 2002/05/03 03:24:47 guy Exp $
+ * $Id: follow_dlg.c,v 1.24 2002/08/02 22:34:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,10 +33,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c
index 9a2e6a7a53..f44886e7ce 100644
--- a/gtk/help_dlg.c
+++ b/gtk/help_dlg.c
@@ -1,6 +1,6 @@
/* help_dlg.c
*
- * $Id: help_dlg.c,v 1.22 2002/03/05 11:55:59 guy Exp $
+ * $Id: help_dlg.c,v 1.23 2002/08/02 22:34:53 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@@ -32,10 +32,6 @@
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/gtk/main.c b/gtk/main.c
index fdebf8a4ca..e1388ad673 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.256 2002/08/01 03:15:29 jmayer Exp $
+ * $Id: main.c,v 1.257 2002/08/02 22:34:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,10 +52,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
@@ -68,10 +64,6 @@
#include <direct.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <signal.h>
#ifdef HAVE_LIBPCAP
@@ -1151,7 +1143,7 @@ get_positive_int(const char *string, const char *name)
static gboolean
set_autostop_criterion(const char *autostoparg)
{
- u_char *p, *colonp;
+ guchar *p, *colonp;
colonp = strchr(autostoparg, ':');
if (colonp == NULL)
diff --git a/gtk/menu.c b/gtk/menu.c
index bcc6a10308..46d97b5a4a 100644
--- a/gtk/menu.c
+++ b/gtk/menu.c
@@ -1,7 +1,7 @@
/* menu.c
* Menu routines
*
- * $Id: menu.c,v 1.63 2002/05/03 21:55:15 guy Exp $
+ * $Id: menu.c,v 1.64 2002/08/02 22:34:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,10 +32,6 @@
#include <string.h>
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include "../menu.h"
#include "main.h"
diff --git a/gtk/plugins_dlg.c b/gtk/plugins_dlg.c
index ad5e58c05e..92725c71d9 100644
--- a/gtk/plugins_dlg.c
+++ b/gtk/plugins_dlg.c
@@ -1,7 +1,7 @@
/* plugins_dlg.c
* Dialog boxes for plugins
*
- * $Id: plugins_dlg.c,v 1.24 2002/03/05 11:55:59 guy Exp $
+ * $Id: plugins_dlg.c,v 1.25 2002/08/02 22:34:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c
index 90b9b76067..b44c8c12a6 100644
--- a/gtk/prefs_dlg.c
+++ b/gtk/prefs_dlg.c
@@ -1,7 +1,7 @@
/* prefs_dlg.c
* Routines for handling preferences
*
- * $Id: prefs_dlg.c,v 1.50 2002/08/01 03:15:29 jmayer Exp $
+ * $Id: prefs_dlg.c,v 1.51 2002/08/02 22:34:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,10 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <gtk/gtk.h>
#include <stdlib.h>
diff --git a/gtk/proto_dlg.c b/gtk/proto_dlg.c
index 6f3f98b618..94c2ee996d 100644
--- a/gtk/proto_dlg.c
+++ b/gtk/proto_dlg.c
@@ -1,6 +1,6 @@
/* proto_dlg.c
*
- * $Id: proto_dlg.c,v 1.11 2002/03/31 22:58:27 guy Exp $
+ * $Id: proto_dlg.c,v 1.12 2002/08/02 22:34:54 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@@ -32,10 +32,6 @@
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "prefs.h"
#include "globals.h"
#include "main.h"
diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c
index e817484086..7d7ffeae83 100644
--- a/gtk/proto_draw.c
+++ b/gtk/proto_draw.c
@@ -1,7 +1,7 @@
/* proto_draw.c
* Routines for GTK+ packet display
*
- * $Id: proto_draw.c,v 1.55 2002/07/17 00:42:56 guy Exp $
+ * $Id: proto_draw.c,v 1.56 2002/08/02 22:34:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <ctype.h>
#include <stdarg.h>
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c
index ffb201e4c2..2fc7c5ab9f 100644
--- a/gtk/tcp_graph.c
+++ b/gtk/tcp_graph.c
@@ -3,7 +3,7 @@
* By Pavel Mores <pvl@uh.cz>
* Win32 port: rwh@unifiedtech.com
*
- * $Id: tcp_graph.c,v 1.18 2002/04/29 08:20:18 guy Exp $
+ * $Id: tcp_graph.c,v 1.19 2002/08/02 22:34:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,19 +34,11 @@
#include <string.h>
#include <math.h> /* rint() */
-#include <sys/types.h> /* freebsd requires this */
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
-#ifndef WIN32
-# include <netinet/in.h> /* ntohs(), IPPROTO_TCP */
-# include <arpa/inet.h> /* inet_ntoa() */
-#else /* WIN32 */
-# include <stdlib.h>
-#endif /* WIN32 */
-
+#include "ipproto.h"
#include "globals.h" /* cfile */
#include <epan/packet.h> /* frame_data */
#include "gtkglobals.h" /* packet_list */
@@ -106,11 +98,11 @@ struct tcphdr {
guint16 urg_ptr;
};
-#define TCP_SYN(tcphdr) ( ntohs ((tcphdr).flags) & TH_SYN )
-#define TCP_ACK(tcphdr) ( ntohs ((tcphdr).flags) & TH_ACK )
+#define TCP_SYN(tcphdr) ( g_ntohs ((tcphdr).flags) & TH_SYN )
+#define TCP_ACK(tcphdr) ( g_ntohs ((tcphdr).flags) & TH_ACK )
#define TCP_DOFF_SHIFT 12
#define TCP_DOFF_MASK (0xf << TCP_DOFF_SHIFT)
-#define DOFF(tcphdr) ( ( ntohs ((tcphdr).flags) & TCP_DOFF_MASK) >> TCP_DOFF_SHIFT )
+#define DOFF(tcphdr) ( ( g_ntohs ((tcphdr).flags) & TCP_DOFF_MASK) >> TCP_DOFF_SHIFT )
#define TXT_WIDTH 850
#define TXT_HEIGHT 550
@@ -626,13 +618,13 @@ static void display_text (struct graph *g)
/* we have to find Initial Sequence Number for both ends of connection */
for (ptr=g->segments; ptr; ptr=ptr->next) {
if (compare_headers (g->current, ptr, COMPARE_CURR_DIR)) {
- isn_this = ntohl (ptr->tcphdr.seq);
+ isn_this = g_ntohl (ptr->tcphdr.seq);
break;
}
}
for (ptr=g->segments; ptr; ptr=ptr->next) {
if (!compare_headers (g->current, ptr, COMPARE_CURR_DIR)) {
- isn_opposite = ntohl (ptr->tcphdr.seq);
+ isn_opposite = g_ntohl (ptr->tcphdr.seq);
break;
}
}
@@ -640,7 +632,7 @@ static void display_text (struct graph *g)
seq_opposite_prev = isn_opposite;
for (ptr=g->segments; ptr; ptr=ptr->next) {
double time=ptr->rel_secs + ptr->rel_usecs/1000000.0;
- unsigned int seq = ntohl (ptr->tcphdr.seq);
+ unsigned int seq = g_ntohl (ptr->tcphdr.seq);
int seq_delta_isn, seq_delta_prev;
if (compare_headers (g->current, ptr, COMPARE_CURR_DIR)) {
@@ -657,7 +649,7 @@ static void display_text (struct graph *g)
snprintf ((char *)line, 256, "%10d%15.6f%15.6f%15.6f%15u%15d%15d%10u\n",
ptr->num, time, time-first_time, time-prev_time,
seq, seq_delta_isn, seq_delta_prev,
- ntohs (ptr->iphdr.tot_len) - 4*IHL(&(ptr->iphdr)) -
+ g_ntohs (ptr->iphdr.tot_len) - 4*IHL(&(ptr->iphdr)) -
4*DOFF(ptr->tcphdr));
gtk_text_insert (GTK_TEXT (g->text), g->font, c, NULL,
(const char * )line, -1);
@@ -1770,7 +1762,7 @@ static void graph_segment_list_get (struct graph *g)
segment->rel_usecs = ptr->rel_usecs;
segment->abs_secs = ptr->abs_secs;
segment->abs_usecs = ptr->abs_usecs;
- segment->data = ntohs (segment->iphdr.tot_len) -
+ segment->data = g_ntohs (segment->iphdr.tot_len) -
4*IHL(&(segment->iphdr)) - 4*DOFF(segment->tcphdr);
if (g->segments) {
last->next = segment;
@@ -1830,7 +1822,7 @@ static int get_headers (frame_data *fd, char *pd, struct segment *hdrs)
/* Those are the only encapsulation types we handle */
return FALSE;
}
- if (((struct iphdr *)ip)->protocol != IPPROTO_TCP) {
+ if (((struct iphdr *)ip)->protocol != IP_PROTO_TCP) {
/* printf ("transport protocol not TCP: %#1x\n", ip->protocol); */
return FALSE;
}
@@ -3166,9 +3158,9 @@ static void tseq_stevens_get_bounds (struct graph *g)
unsigned int highest_byte_num;
last = tmp;
if (compare_headers (g->current, tmp, COMPARE_CURR_DIR))
- highest_byte_num = ntohl (tmp->tcphdr.seq) + tmp->data;
+ highest_byte_num = g_ntohl (tmp->tcphdr.seq) + tmp->data;
else
- highest_byte_num = ntohl (tmp->tcphdr.ack_seq);
+ highest_byte_num = g_ntohl (tmp->tcphdr.ack_seq);
if (highest_byte_num > ymax)
ymax = highest_byte_num;
}
@@ -3179,7 +3171,7 @@ static void tseq_stevens_get_bounds (struct graph *g)
t0 = g->segments->rel_secs + g->segments->rel_usecs / 1000000.0;
tmax = last->rel_secs + last->rel_usecs / 1000000.0;
- y0 = ntohl (first->tcphdr.seq);
+ y0 = g_ntohl (first->tcphdr.seq);
g->bounds.x0 = t0;
g->bounds.y0 = y0;
@@ -3209,7 +3201,7 @@ static void tseq_stevens_make_elmtlist (struct graph *g)
continue;
secs = g->zoom.x * (tmp->rel_secs + tmp->rel_usecs / 1000000.0 - x0);
- seqno = g->zoom.y * (ntohl (tmp->tcphdr.seq) - y0);
+ seqno = g->zoom.y * (g_ntohl (tmp->tcphdr.seq) - y0);
e->type = ELMT_ARC;
e->parent = tmp;
@@ -3319,10 +3311,10 @@ static void tseq_tcptrace_make_elmtlist (struct graph *g)
if (!compare_headers (g->current, tmp, COMPARE_CURR_DIR))
break;
/*
- p_ackno = (unsigned int )(g->zoom.y * (ntohl (tmp->tcphdr.ack_seq) - y0));
+ p_ackno = (unsigned int )(g->zoom.y * (g_ntohl (tmp->tcphdr.ack_seq) - y0));
*/
p_ackno = 0;
- p_win = g->zoom.y * ntohs (tmp->tcphdr.window);
+ p_win = g->zoom.y * g_ntohs (tmp->tcphdr.window);
p_t = g->segments->rel_secs + g->segments->rel_usecs/1000000.0 - x0;
for (tmp=g->segments; tmp; tmp=tmp->next) {
double secs, seqno, data;
@@ -3335,7 +3327,7 @@ static void tseq_tcptrace_make_elmtlist (struct graph *g)
/* forward direction -> we need seqno and amount of data */
double y1, y2;
- seqno = ntohl (tmp->tcphdr.seq);
+ seqno = g_ntohl (tmp->tcphdr.seq);
if (TCP_SYN (tmp->tcphdr))
data = 1;
else
@@ -3370,8 +3362,8 @@ static void tseq_tcptrace_make_elmtlist (struct graph *g)
/* SYN's have ACK==0 and are useless here */
continue;
/* backward direction -> we need ackno and window */
- ackno = (ntohl (tmp->tcphdr.ack_seq) - y0) * g->zoom.y;
- win = ntohs (tmp->tcphdr.window) * g->zoom.y;
+ ackno = (g_ntohl (tmp->tcphdr.ack_seq) - y0) * g->zoom.y;
+ win = g_ntohs (tmp->tcphdr.window) * g->zoom.y;
/* ack line */
e0->type = ELMT_LINE;
@@ -3590,7 +3582,7 @@ static void rtt_initialize (struct graph *g)
for (tmp=g->segments; tmp; tmp=tmp->next) {
if (compare_headers (g->current, tmp, COMPARE_CURR_DIR)) {
- unsigned int seqno = ntohl (tmp->tcphdr.seq);
+ unsigned int seqno = g_ntohl (tmp->tcphdr.seq);
if (!first)
first= tmp;
@@ -3605,7 +3597,7 @@ static void rtt_initialize (struct graph *g)
if (seqno + tmp->data > xmax)
xmax = seqno + tmp->data;
} else {
- unsigned int ackno = ntohl (tmp->tcphdr.ack_seq);
+ unsigned int ackno = g_ntohl (tmp->tcphdr.ack_seq);
double time = tmp->rel_secs + tmp->rel_usecs / 1000000.0;
struct unack *v;
@@ -3621,7 +3613,7 @@ static void rtt_initialize (struct graph *g)
}
}
- x0 = ntohl (first->tcphdr.seq);
+ x0 = g_ntohl (first->tcphdr.seq);
y0 = 0;
ymax = rttmax;
@@ -3706,7 +3698,7 @@ static void rtt_make_elmtlist (struct graph *g)
for (tmp=g->segments; tmp; tmp=tmp->next) {
if (compare_headers (g->current, tmp, COMPARE_CURR_DIR)) {
- unsigned int seqno = ntohl (tmp->tcphdr.seq);
+ unsigned int seqno = g_ntohl (tmp->tcphdr.seq);
if (tmp->data && !rtt_is_retrans (unack, seqno)) {
double time = tmp->rel_secs + tmp->rel_usecs / 1000000.0;
@@ -3715,7 +3707,7 @@ static void rtt_make_elmtlist (struct graph *g)
rtt_put_unack_on_list (&unack, u);
}
} else {
- unsigned int ackno = ntohl (tmp->tcphdr.ack_seq);
+ unsigned int ackno = g_ntohl (tmp->tcphdr.ack_seq);
double time = tmp->rel_secs + tmp->rel_usecs / 1000000.0;
struct unack *v;