aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2002-08-02 23:36:07 +0000
committerJörg Mayer <jmayer@loplof.de>2002-08-02 23:36:07 +0000
commit173fe5aef4167b9ad35fe514d05ef25fb66c076f (patch)
tree21967e4c27ac5e02aa39319022dd2858682fc5f4
parentff72b97ee01caee4dff97d07195d802086c65f38 (diff)
Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
-rw-r--r--asn1.c10
-rw-r--r--asn1.h6
-rw-r--r--capture-wpcap.c10
-rw-r--r--capture.c28
-rw-r--r--column.c6
-rw-r--r--editcap.c10
-rw-r--r--ethereal_gen.py10
-rw-r--r--file.c14
-rw-r--r--file.h6
-rw-r--r--follow.c26
-rw-r--r--follow.h14
-rw-r--r--in_cksum.c16
-rw-r--r--ipproto.c6
-rw-r--r--mergecap.c14
-rw-r--r--packet-aarp.c6
-rw-r--r--packet-afp.c10
-rw-r--r--packet-afs.c10
-rw-r--r--packet-aim.c16
-rw-r--r--packet-ajp13.c10
-rw-r--r--packet-aodv.c10
-rw-r--r--packet-aodv6.c6
-rw-r--r--packet-arp.c8
-rw-r--r--packet-ascend.c6
-rw-r--r--packet-atalk.c24
-rw-r--r--packet-atm.c10
-rw-r--r--packet-atm.h4
-rw-r--r--packet-auto_rp.c10
-rw-r--r--packet-bacapp.c10
-rw-r--r--packet-bacnet.c10
-rw-r--r--packet-beep.c10
-rw-r--r--packet-bgp.c26
-rw-r--r--packet-bootp.c16
-rw-r--r--packet-bootparams.c12
-rw-r--r--packet-bpdu.c10
-rw-r--r--packet-bvlc.c10
-rw-r--r--packet-cdp.c6
-rw-r--r--packet-cgmp.c6
-rw-r--r--packet-chdlc.c8
-rw-r--r--packet-chdlc.h4
-rw-r--r--packet-clip.c8
-rw-r--r--packet-clip.h4
-rw-r--r--packet-clnp.c48
-rw-r--r--packet-cosine.c6
-rw-r--r--packet-cups.c6
-rw-r--r--packet-data.c6
-rw-r--r--packet-dccp.c10
-rw-r--r--packet-dcerpc-conv.c6
-rw-r--r--packet-dcerpc-epm.c6
-rw-r--r--packet-dcerpc-mgmt.c6
-rw-r--r--packet-dcerpc-ndr.c6
-rw-r--r--packet-dcerpc-nspi.c6
-rw-r--r--packet-dcerpc-oxid.c6
-rw-r--r--packet-dcerpc-remact.c6
-rw-r--r--packet-dcerpc.c6
-rw-r--r--packet-ddtp.c9
-rw-r--r--packet-dec-bpdu.c10
-rw-r--r--packet-dhcpv6.c6
-rw-r--r--packet-diameter.c26
-rw-r--r--packet-dlsw.c10
-rw-r--r--packet-dns.c18
-rw-r--r--packet-dns.h4
-rw-r--r--packet-dsi.c10
-rw-r--r--packet-dvmrp.c6
-rw-r--r--packet-eap.c10
-rw-r--r--packet-eapol.c10
-rw-r--r--packet-eigrp.c10
-rw-r--r--packet-esis.c20
-rw-r--r--packet-eth.c8
-rw-r--r--packet-eth.h4
-rw-r--r--packet-ethertype.c8
-rw-r--r--packet-fddi.c26
-rw-r--r--packet-fddi.h4
-rw-r--r--packet-ftp.c18
-rw-r--r--packet-giop.c20
-rw-r--r--packet-gmrp.c10
-rw-r--r--packet-gnutella.c10
-rw-r--r--packet-gre.c9
-rw-r--r--packet-gtp.c18
-rw-r--r--packet-gvrp.c10
-rw-r--r--packet-h1.c6
-rw-r--r--packet-h261.c10
-rw-r--r--packet-hclnfsd.c6
-rw-r--r--packet-hsrp.c10
-rw-r--r--packet-http.c18
-rw-r--r--packet-iapp.c10
-rw-r--r--packet-icap.c16
-rw-r--r--packet-icmpv6.c24
-rw-r--r--packet-icp.c10
-rw-r--r--packet-icq.c30
-rw-r--r--packet-ieee80211.c16
-rw-r--r--packet-ieee80211.h6
-rw-r--r--packet-ieee8023.c6
-rw-r--r--packet-igmp.c16
-rw-r--r--packet-imap.c14
-rw-r--r--packet-ip.c14
-rw-r--r--packet-ip.h4
-rw-r--r--packet-ipp.c6
-rw-r--r--packet-ipsec.c28
-rw-r--r--packet-ipv6.c20
-rw-r--r--packet-ipv6.h6
-rw-r--r--packet-ipx.c6
-rw-r--r--packet-irc.c12
-rw-r--r--packet-isakmp.c10
-rw-r--r--packet-iscsi.c10
-rw-r--r--packet-isis-clv.c8
-rw-r--r--packet-isis-hello.c6
-rw-r--r--packet-isis-lsp.c6
-rw-r--r--packet-isis-snp.c6
-rw-r--r--packet-isis.c6
-rw-r--r--packet-isl.c12
-rw-r--r--packet-isl.h4
-rw-r--r--packet-isup.c10
-rw-r--r--packet-kerberos.c6
-rw-r--r--packet-klm.c6
-rw-r--r--packet-l2tp.c10
-rw-r--r--packet-lapb.c6
-rw-r--r--packet-lapbether.c6
-rw-r--r--packet-lapd.c6
-rw-r--r--packet-ldap.c10
-rw-r--r--packet-ldp.c10
-rw-r--r--packet-llc.c8
-rw-r--r--packet-llc.h4
-rw-r--r--packet-lmi.c6
-rw-r--r--packet-lmp.c10
-rw-r--r--packet-lpd.c6
-rw-r--r--packet-m3ua.c10
-rw-r--r--packet-mbtcp.c22
-rw-r--r--packet-mip.c10
-rw-r--r--packet-mmse.c10
-rw-r--r--packet-mount.c6
-rw-r--r--packet-mpeg1.c10
-rw-r--r--packet-mpls.c6
-rw-r--r--packet-mrdisc.c6
-rw-r--r--packet-msdp.c9
-rw-r--r--packet-msnip.c6
-rw-r--r--packet-msproxy.c12
-rw-r--r--packet-nbipx.c6
-rw-r--r--packet-nbns.c22
-rw-r--r--packet-ncp.c10
-rw-r--r--packet-ndmp.c6
-rw-r--r--packet-netbios.c12
-rw-r--r--packet-netbios.h4
-rw-r--r--packet-nfs.c6
-rw-r--r--packet-nfsacl.c6
-rw-r--r--packet-nfsauth.c6
-rw-r--r--packet-nisplus.c6
-rw-r--r--packet-nlm.c6
-rw-r--r--packet-nntp.c10
-rw-r--r--packet-ntlmssp.c6
-rw-r--r--packet-ntp.c10
-rw-r--r--packet-null.c8
-rw-r--r--packet-null.h4
-rw-r--r--packet-osi-options.c38
-rw-r--r--packet-osi-options.h4
-rw-r--r--packet-osi.c12
-rw-r--r--packet-osi.h4
-rw-r--r--packet-ospf.c14
-rw-r--r--packet-pcnfsd.c6
-rw-r--r--packet-pflog.c8
-rw-r--r--packet-pgm.c80
-rw-r--r--packet-pim.c14
-rw-r--r--packet-pop.c18
-rw-r--r--packet-portmap.c6
-rw-r--r--packet-ppp.c8
-rw-r--r--packet-ppp.h4
-rw-r--r--packet-pppoe.c6
-rw-r--r--packet-pptp.c10
-rw-r--r--packet-prism.c8
-rw-r--r--packet-prism.h4
-rw-r--r--packet-q2931.c6
-rw-r--r--packet-q931.c6
-rw-r--r--packet-qllc.c6
-rw-r--r--packet-quake.c10
-rw-r--r--packet-quake2.c6
-rw-r--r--packet-quake3.c6
-rw-r--r--packet-quakeworld.c6
-rw-r--r--packet-radius.c12
-rw-r--r--packet-ranap.c10
-rw-r--r--packet-raw.c8
-rw-r--r--packet-raw.h4
-rw-r--r--packet-rip.c10
-rw-r--r--packet-ripng.c14
-rw-r--r--packet-ripng.h14
-rw-r--r--packet-rlogin.c10
-rw-r--r--packet-rmi.c14
-rw-r--r--packet-rmi.h4
-rw-r--r--packet-rpc.c6
-rw-r--r--packet-rquota.c6
-rw-r--r--packet-rsh.c6
-rw-r--r--packet-rstat.c6
-rw-r--r--packet-rsvp.c10
-rw-r--r--packet-rtcp.c10
-rw-r--r--packet-rtp.c10
-rw-r--r--packet-rtsp.c58
-rw-r--r--packet-rwall.c6
-rw-r--r--packet-rx.c10
-rw-r--r--packet-sadmind.c6
-rw-r--r--packet-sap.c10
-rw-r--r--packet-sccp.c10
-rw-r--r--packet-scsi.c6
-rw-r--r--packet-sdp.c12
-rw-r--r--packet-slimp3.c10
-rw-r--r--packet-sll.c8
-rw-r--r--packet-sll.h4
-rw-r--r--packet-slowprotocols.c10
-rw-r--r--packet-smb-browse.c10
-rw-r--r--packet-smb-common.h10
-rw-r--r--packet-smb-pipe.c10
-rw-r--r--packet-smb.c10
-rw-r--r--packet-smpp.c10
-rw-r--r--packet-smtp.c12
-rw-r--r--packet-sna.c6
-rw-r--r--packet-snaeth.c6
-rw-r--r--packet-snmp.c20
-rw-r--r--packet-socks.c14
-rw-r--r--packet-spray.c6
-rw-r--r--packet-srvloc.c12
-rw-r--r--packet-sscop.c6
-rw-r--r--packet-stat-notify.c6
-rw-r--r--packet-stat.c6
-rw-r--r--packet-sua.c10
-rw-r--r--packet-tacacs.c10
-rw-r--r--packet-tcp.c16
-rw-r--r--packet-telnet.c14
-rw-r--r--packet-tftp.c12
-rw-r--r--packet-tns.c10
-rw-r--r--packet-tpkt.c10
-rw-r--r--packet-tr.c10
-rw-r--r--packet-tr.h4
-rw-r--r--packet-trmac.c8
-rw-r--r--packet-tsp.c10
-rw-r--r--packet-ucp.c10
-rw-r--r--packet-udp.c24
-rw-r--r--packet-v120.c6
-rw-r--r--packet-vines.c30
-rw-r--r--packet-vj.c28
-rw-r--r--packet-vlan.c12
-rw-r--r--packet-vlan.h4
-rw-r--r--packet-vrrp.c14
-rw-r--r--packet-vtp.c6
-rw-r--r--packet-wap.c6
-rw-r--r--packet-wccp.c10
-rw-r--r--packet-wcp.c6
-rw-r--r--packet-who.c6
-rw-r--r--packet-wsp.c10
-rw-r--r--packet-wtls.c10
-rw-r--r--packet-wtp.c10
-rw-r--r--packet-x11.c10
-rw-r--r--packet-x25.c6
-rw-r--r--packet-xdmcp.c4
-rw-r--r--packet-yhoo.c10
-rw-r--r--packet-ypbind.c6
-rw-r--r--packet-yppasswd.c6
-rw-r--r--packet-ypserv.c6
-rw-r--r--packet-ypxfr.c6
-rw-r--r--packet-zebra.c6
-rw-r--r--pcap-util.c6
-rw-r--r--prefs.c8
-rw-r--r--print.c22
-rw-r--r--ringbuffer.c6
-rw-r--r--snprintf.h6
-rw-r--r--tethereal.c42
-rw-r--r--text2pcap.c48
-rw-r--r--util.c6
-rw-r--r--xdlc.c8
-rw-r--r--xdlc.h4
266 files changed, 712 insertions, 2113 deletions
diff --git a/asn1.c b/asn1.c
index fae948743c..3ff4d4a77e 100644
--- a/asn1.c
+++ b/asn1.c
@@ -1,7 +1,7 @@
/* asn1.c
* Routines for ASN.1 BER dissection
*
- * $Id: asn1.c,v 1.15 2002/06/23 10:32:07 guy Exp $
+ * $Id: asn1.c,v 1.16 2002/08/02 23:35:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -62,14 +62,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <limits.h>
#include <glib.h>
diff --git a/asn1.h b/asn1.h
index 949611e4b6..0dca046820 100644
--- a/asn1.h
+++ b/asn1.h
@@ -1,7 +1,7 @@
/* asn1.h
* Definitions for ASN.1 BER dissection
*
- * $Id: asn1.h,v 1.8 2002/06/16 00:53:17 guy Exp $
+ * $Id: asn1.h,v 1.9 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -91,9 +91,9 @@
* typedef "subid_t".
*/
#if defined(HAVE_UCD_SNMP)
-typedef u_long subid_t; /* UCD SNMP */
+typedef gulong subid_t; /* UCD SNMP */
#else
-typedef u_int subid_t; /* CMU SNMP, libsmi, or nothing */
+typedef guint subid_t; /* CMU SNMP, libsmi, or nothing */
#endif
#define ASN1_ERR_NOERROR 0 /* no error */
diff --git a/capture-wpcap.c b/capture-wpcap.c
index 843a63fc4c..746c77de98 100644
--- a/capture-wpcap.c
+++ b/capture-wpcap.c
@@ -1,7 +1,7 @@
/* capture-wpcap.c
* Try to load WinPcap DLL at run-time.
*
- * $Id: capture-wpcap.c,v 1.1 2001/04/03 05:26:26 gram Exp $
+ * $Id: capture-wpcap.c,v 1.2 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -45,7 +45,7 @@ gboolean has_wpcap = FALSE;
static char* (*p_pcap_lookupdev) (char *);
static void (*p_pcap_close) (pcap_t *);
static int (*p_pcap_stats) (pcap_t *, struct pcap_stat *);
-static int (*p_pcap_dispatch) (pcap_t *, int, pcap_handler, u_char *);
+static int (*p_pcap_dispatch) (pcap_t *, int, pcap_handler, guchar *);
static int (*p_pcap_snapshot) (pcap_t *);
static int (*p_pcap_datalink) (pcap_t *);
static int (*p_pcap_setfilter) (pcap_t *, struct bpf_program *);
@@ -55,7 +55,7 @@ static int (*p_pcap_compile) (pcap_t *, struct bpf_program *, char *, int,
static int (*p_pcap_lookupnet) (char *, bpf_u_int32 *, bpf_u_int32 *,
char *);
static pcap_t* (*p_pcap_open_live) (char *, int, int, int, char *);
-static int (*p_pcap_loop) (pcap_t *, int, pcap_handler, u_char *);
+static int (*p_pcap_loop) (pcap_t *, int, pcap_handler, guchar *);
typedef struct {
const char *name;
@@ -128,7 +128,7 @@ pcap_stats(pcap_t *a, struct pcap_stat *b)
}
int
-pcap_dispatch(pcap_t *a, int b, pcap_handler c, u_char *d)
+pcap_dispatch(pcap_t *a, int b, pcap_handler c, guchar *d)
{
g_assert(has_wpcap);
return p_pcap_dispatch(a, b, c, d);
@@ -187,7 +187,7 @@ pcap_open_live(char *a, int b, int c, int d, char *e)
}
int
-pcap_loop(pcap_t *a, int b, pcap_handler c, u_char *d)
+pcap_loop(pcap_t *a, int b, pcap_handler c, guchar *d)
{
g_assert(has_wpcap);
return p_pcap_loop(a, b, c, d);
diff --git a/capture.c b/capture.c
index 0640727713..6578ceddc7 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.186 2002/07/16 07:15:04 guy Exp $
+ * $Id: capture.c,v 1.187 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#ifdef HAVE_LIBPCAP
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
@@ -203,8 +199,8 @@ static char *signame(int);
#endif
static void capture_delete_cb(GtkWidget *, GdkEvent *, gpointer);
static void capture_stop_cb(GtkWidget *, gpointer);
-static void capture_pcap_cb(u_char *, const struct pcap_pkthdr *,
- const u_char *);
+static void capture_pcap_cb(guchar *, const struct pcap_pkthdr *,
+ const guchar *);
static void get_capture_file_io_error(char *, int, const char *, int, gboolean);
static void popup_errmsg(const char *);
static void send_errmsg_to_parent(const char *);
@@ -238,7 +234,7 @@ typedef struct _loop_data {
static void adjust_header(loop_data *, struct pcap_hdr *, struct pcaprec_hdr *);
static int pipe_open_live(char *, struct pcap_hdr *, loop_data *, char *, int);
static int pipe_dispatch(int, loop_data *, struct pcap_hdr *, \
- struct pcaprec_modified_hdr *, u_char *, char *, int);
+ struct pcaprec_modified_hdr *, guchar *, char *, int);
#endif
/* Win32 needs the O_BINARY flag for open() */
@@ -297,7 +293,7 @@ do_capture(char *capfile_name)
{
char tmpname[128+1];
gboolean is_tempfile;
- u_char c;
+ guchar c;
int i;
guint byte_count;
char *msg;
@@ -1231,7 +1227,7 @@ error:
static int
pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr,
- struct pcaprec_modified_hdr *rechdr, u_char *data,
+ struct pcaprec_modified_hdr *rechdr, guchar *data,
char *errmsg, int errmsgl)
{
struct pcap_pkthdr phdr;
@@ -1311,7 +1307,7 @@ pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr,
phdr.caplen = rechdr->hdr.incl_len;
phdr.len = rechdr->hdr.orig_len;
- capture_pcap_cb((u_char *)ld, &phdr, data);
+ capture_pcap_cb((guchar *)ld, &phdr, data);
ld->pipe_state = STATE_EXPECT_REC_HDR;
return 1;
@@ -1394,7 +1390,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
int pipe_fd = -1;
struct pcap_hdr hdr;
struct pcaprec_modified_hdr rechdr;
- u_char pcap_data[WTAP_MAX_PACKET_SIZE];
+ guchar pcap_data[WTAP_MAX_PACKET_SIZE];
#endif
#ifdef MUST_DO_SELECT
int pcap_fd = 0;
@@ -1789,7 +1785,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
* "select()" says we can read from it without blocking; go for
* it.
*/
- inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (u_char *) &ld);
+ inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (guchar *) &ld);
if (inpkts < 0) {
ld.pcap_err = TRUE;
ld.go = FALSE;
@@ -1804,7 +1800,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
}
}
#else
- inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (u_char *) &ld);
+ inpkts = pcap_dispatch(pch, 1, capture_pcap_cb, (guchar *) &ld);
if (inpkts < 0) {
ld.pcap_err = TRUE;
ld.go = FALSE;
@@ -2129,8 +2125,8 @@ kill_capture_child(void)
}
static void
-capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
- const u_char *pd)
+capture_pcap_cb(guchar *user, const struct pcap_pkthdr *phdr,
+ const guchar *pd)
{
struct wtap_pkthdr whdr;
union wtap_pseudo_header pseudo_header;
diff --git a/column.c b/column.c
index d014bc218c..300ff727ba 100644
--- a/column.c
+++ b/column.c
@@ -1,7 +1,7 @@
/* column.c
* Routines for handling column preferences
*
- * $Id: column.c,v 1.35 2002/01/21 07:36:31 guy Exp $
+ * $Id: column.c,v 1.36 2002/08/02 23:35:46 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 <stdio.h>
#include <string.h>
#include <ctype.h>
diff --git a/editcap.c b/editcap.c
index 4b3b620328..e04f57d608 100644
--- a/editcap.c
+++ b/editcap.c
@@ -1,7 +1,7 @@
/* Edit capture files. We can delete records, adjust timestamps, or
* simply convert from one format to another format.
*
- * $Id: editcap.c,v 1.24 2002/06/30 20:28:54 guy Exp $
+ * $Id: editcap.c,v 1.25 2002/08/02 23:35:46 jmayer Exp $
*
* Originally written by Richard Sharpe.
* Improved by Guy Harris.
@@ -24,10 +24,6 @@
#include <sys/time.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <string.h>
#include "wtap.h"
@@ -137,8 +133,8 @@ typedef struct {
*/
static void
-edit_callback(u_char *user, const struct wtap_pkthdr *phdr, long offset _U_,
- union wtap_pseudo_header *pseudo_header, const u_char *buf)
+edit_callback(guchar *user, const struct wtap_pkthdr *phdr, long offset _U_,
+ union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
callback_arg *argp = (callback_arg *)user;
int err;
diff --git a/ethereal_gen.py b/ethereal_gen.py
index dd98fc4bd5..ef2d946bb6 100644
--- a/ethereal_gen.py
+++ b/ethereal_gen.py
@@ -1,6 +1,6 @@
# -*- python -*-
#
-# $Id: ethereal_gen.py,v 1.27 2002/07/17 00:42:40 guy Exp $
+# $Id: ethereal_gen.py,v 1.28 2002/08/02 23:35:46 jmayer Exp $
#
# ethereal_gen.py (part of idl2eth)
#
@@ -2179,14 +2179,6 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) {
#include <stdlib.h>
#include <gmodule.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/file.c b/file.c
index b50c929ef0..88c0bce1ef 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.284 2002/07/30 10:13:14 guy Exp $
+ * $Id: file.c,v 1.285 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -60,14 +60,6 @@
#include "strerror.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <epan/epan.h>
#include <epan/filesystem.h>
@@ -647,7 +639,7 @@ apply_color_filter(gpointer filter_arg, gpointer argp)
static int
add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
- union wtap_pseudo_header *pseudo_header, const u_char *buf,
+ union wtap_pseudo_header *pseudo_header, const guchar *buf,
gboolean refilter)
{
apply_color_filter_args args;
@@ -797,7 +789,7 @@ read_packet(capture_file *cf, long offset)
{
const struct wtap_pkthdr *phdr = wtap_phdr(cf->wth);
union wtap_pseudo_header *pseudo_header = wtap_pseudoheader(cf->wth);
- const u_char *buf = wtap_buf_ptr(cf->wth);
+ const guchar *buf = wtap_buf_ptr(cf->wth);
frame_data *fdata;
int passed;
frame_data *plist_end;
diff --git a/file.h b/file.h
index 615c57f7c9..9c7443b65c 100644
--- a/file.h
+++ b/file.h
@@ -1,7 +1,7 @@
/* file.h
* Definitions for file structures and routines
*
- * $Id: file.h,v 1.95 2002/07/16 07:15:04 guy Exp $
+ * $Id: file.h,v 1.96 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -25,10 +25,6 @@
#ifndef __FILE_H__
#define __FILE_H__
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "wiretap/wtap.h"
#include <epan/dfilter/dfilter.h>
#include "print.h"
diff --git a/follow.c b/follow.c
index c3b5ad0f3f..fc385bdd90 100644
--- a/follow.c
+++ b/follow.c
@@ -1,6 +1,6 @@
/* follow.c
*
- * $Id: follow.c,v 1.29 2002/02/28 19:35:08 gram Exp $
+ * $Id: follow.c,v 1.30 2002/08/02 23:35:46 jmayer Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@@ -35,10 +35,6 @@
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "follow.h"
@@ -48,8 +44,8 @@ FILE* data_out_file = NULL;
gboolean incomplete_tcp_stream = FALSE;
static guint8 ip_address[2][MAX_IPADDR_LEN];
-static u_int tcp_port[2];
-static u_int bytes_written[2];
+static guint tcp_port[2];
+static guint bytes_written[2];
static gboolean is_ipv6 = FALSE;
static int check_fragments( int, tcp_stream_chunk * );
@@ -114,17 +110,17 @@ build_follow_filter( packet_info *pi ) {
of order packets in a smart way. */
static tcp_frag *frags[2] = { 0, 0 };
-static u_long seq[2];
+static gulong seq[2];
static guint8 src_addr[2][MAX_IPADDR_LEN];
-static u_int src_port[2] = { 0, 0 };
+static guint src_port[2] = { 0, 0 };
void
-reassemble_tcp( u_long sequence, u_long length, const char* data,
- u_long data_length, int synflag, address *net_src,
- address *net_dst, u_int srcport, u_int dstport) {
+reassemble_tcp( gulong sequence, gulong length, const char* data,
+ gulong data_length, int synflag, address *net_src,
+ address *net_dst, guint srcport, guint dstport) {
guint8 srcx[MAX_IPADDR_LEN], dstx[MAX_IPADDR_LEN];
int src_index, j, first = 0, len;
- u_long newseq;
+ gulong newseq;
tcp_frag *tmp_frag;
tcp_stream_chunk sc;
@@ -207,7 +203,7 @@ reassemble_tcp( u_long sequence, u_long length, const char* data,
info than we have already seen */
newseq = sequence + length;
if( newseq > seq[src_index] ) {
- u_long new_len;
+ gulong new_len;
/* this one has more than we have seen. let's get the
payload that we have not seen. */
@@ -244,7 +240,7 @@ reassemble_tcp( u_long sequence, u_long length, const char* data,
/* out of order packet */
if(data_length > 0 && sequence > seq[src_index] ) {
tmp_frag = (tcp_frag *)malloc( sizeof( tcp_frag ) );
- tmp_frag->data = (u_char *)malloc( data_length );
+ tmp_frag->data = (guchar *)malloc( data_length );
tmp_frag->seq = sequence;
tmp_frag->len = length;
tmp_frag->data_len = data_length;
diff --git a/follow.h b/follow.h
index 6ba6d77161..9d2fc5e957 100644
--- a/follow.h
+++ b/follow.h
@@ -1,6 +1,6 @@
/* follow.h
*
- * $Id: follow.h,v 1.11 2002/01/21 07:36:31 guy Exp $
+ * $Id: follow.h,v 1.12 2002/08/02 23:35:46 jmayer Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@@ -34,10 +34,10 @@
extern gboolean incomplete_tcp_stream;
typedef struct _tcp_frag {
- u_long seq;
- u_long len;
- u_long data_len;
- u_char *data;
+ gulong seq;
+ gulong len;
+ gulong data_len;
+ guchar *data;
struct _tcp_frag *next;
} tcp_frag;
@@ -48,8 +48,8 @@ typedef struct _tcp_stream_chunk {
} tcp_stream_chunk;
char* build_follow_filter( packet_info * );
-void reassemble_tcp( u_long, u_long, const char*, u_long, int,
- address *, address *, u_int, u_int );
+void reassemble_tcp( gulong, gulong, const char*, gulong, int,
+ address *, address *, guint, guint );
void reset_tcp_reassembly( void );
typedef struct {
diff --git a/in_cksum.c b/in_cksum.c
index ff07a0ad2c..66ee16a843 100644
--- a/in_cksum.c
+++ b/in_cksum.c
@@ -2,7 +2,7 @@
* 4.4-Lite-2 Internet checksum routine, modified to take a vector of
* pointers/lengths giving the pieces to be checksummed.
*
- * $Id: in_cksum.c,v 1.6 2002/07/21 20:31:21 guy Exp $
+ * $Id: in_cksum.c,v 1.7 2002/08/02 23:35:46 jmayer Exp $
*/
/*
@@ -40,22 +40,10 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <glib.h>
#include "in_cksum.h"
@@ -210,7 +198,7 @@ in_cksum_shouldbe(guint16 sum, guint16 computed_sum)
* will be in host byte order, which is what we'll return.
*/
shouldbe = sum;
- shouldbe += ntohs(computed_sum);
+ shouldbe += g_ntohs(computed_sum);
shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
return shouldbe;
diff --git a/ipproto.c b/ipproto.c
index cfc4f531fd..a6af7740e7 100644
--- a/ipproto.c
+++ b/ipproto.c
@@ -1,7 +1,7 @@
/* ipproto.c
* Routines for converting IPv4 protocol/v6 nxthdr field into string
*
- * $Id: ipproto.c,v 1.17 2002/01/21 07:36:31 guy Exp $
+ * $Id: ipproto.c,v 1.18 2002/08/02 23:35:46 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
-
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
diff --git a/mergecap.c b/mergecap.c
index e51ffc4869..f8bff1f103 100644
--- a/mergecap.c
+++ b/mergecap.c
@@ -1,6 +1,6 @@
/* Combine two dump files, either by appending or by merging by timestamp
*
- * $Id: mergecap.c,v 1.9 2002/06/23 10:32:16 guy Exp $
+ * $Id: mergecap.c,v 1.10 2002/08/02 23:35:46 jmayer Exp $
*
* Written by Scott Renfro <scott@renfro.org> based on
* editcap by Richard Sharpe and Guy Harris
@@ -23,10 +23,6 @@
#include <sys/time.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <string.h>
#include "wtap.h"
@@ -65,8 +61,8 @@ static out_file_t out_file;
* Routine to write frame to output file
*/
static void
-write_frame(u_char *user, const struct wtap_pkthdr *phdr, long offset _U_,
- union wtap_pseudo_header *pseudo_header, const u_char *buf)
+write_frame(guchar *user, const struct wtap_pkthdr *phdr, long offset _U_,
+ union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
wtap_dumper *pdh = (wtap_dumper*)user;
int err;
@@ -102,7 +98,7 @@ append(int count, in_file_t in_files[], out_file_t *out_file)
for (i = 0; i < count; i++) {
if (!wtap_loop(in_files[i].wth, 0, write_frame,
- (u_char*)out_file->pdh, &err)) {
+ (guchar*)out_file->pdh, &err)) {
fprintf(stderr, "mergecap: Error appending from %s to %s: %s\n",
in_files[i].filename, out_file->filename, wtap_strerror(err));
}
@@ -170,7 +166,7 @@ merge(int count, in_file_t in_files[], out_file_t *out_file)
/* write out earliest frame, and fetch another from its
* input file
*/
- write_frame((u_char*)out_file->pdh,
+ write_frame((guchar*)out_file->pdh,
wtap_phdr(in_files[i].wth),
in_files[i].data_offset,
wtap_pseudoheader(in_files[i].wth),
diff --git a/packet-aarp.c b/packet-aarp.c
index 385f8fe8c0..da74bd58e6 100644
--- a/packet-aarp.c
+++ b/packet-aarp.c
@@ -1,7 +1,7 @@
/* packet-aarp.c
* Routines for Appletalk ARP packet disassembly
*
- * $Id: packet-aarp.c,v 1.35 2002/02/10 23:48:14 guy Exp $
+ * $Id: packet-aarp.c,v 1.36 2002/08/02 23:35:46 jmayer Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-afp.c b/packet-afp.c
index 60ae11bbe5..66ffdecb5a 100644
--- a/packet-afp.c
+++ b/packet-afp.c
@@ -2,7 +2,7 @@
* Routines for afp packet dissection
* Copyright 2002, Didier Gautheron <dgautheron@magic.fr>
*
- * $Id: packet-afp.c,v 1.19 2002/07/29 06:35:12 guy Exp $
+ * $Id: packet-afp.c,v 1.20 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,14 +32,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/packet-afs.c b/packet-afs.c
index 7b62228ed0..d19ad71d04 100644
--- a/packet-afs.c
+++ b/packet-afs.c
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs.c,v 1.47 2002/06/13 06:43:44 guy Exp $
+ * $Id: packet-afs.c,v 1.48 2002/08/02 23:35:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,14 +37,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-aim.c b/packet-aim.c
index 141b64dd58..83991ba44c 100644
--- a/packet-aim.c
+++ b/packet-aim.c
@@ -2,7 +2,7 @@
* Routines for AIM Instant Messenger (OSCAR) dissection
* Copyright 2000, Ralf Hoelzer <ralf@well.com>
*
- * $Id: packet-aim.c,v 1.15 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-aim.c,v 1.16 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,14 +32,6 @@
#include <string.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -79,7 +71,7 @@
static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-static void get_message( u_char *msg, tvbuff_t *tvb, int msg_offset, int msg_length);
+static void get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length);
static int get_buddyname( char *name, tvbuff_t *tvb, int len_offset, int name_offset);
/* Initialize the protocol and registered fields */
@@ -107,7 +99,7 @@ static void dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 subtype;
guint8 buddyname_length = 0;
char buddyname[MAX_BUDDYNAME_LENGTH];
- u_char msg[1000];
+ guchar msg[1000];
/* Set up structures we will need to add the protocol subtree and manage it */
proto_item *ti;
@@ -486,7 +478,7 @@ static int get_buddyname( char *name, tvbuff_t *tvb, int len_offset, int name_of
}
-static void get_message( u_char *msg, tvbuff_t *tvb, int msg_offset, int msg_length)
+static void get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length)
{
int i,j,c;
int bracket = FALSE;
diff --git a/packet-ajp13.c b/packet-ajp13.c
index e0e0e43450..b35ff852f5 100644
--- a/packet-ajp13.c
+++ b/packet-ajp13.c
@@ -2,7 +2,7 @@
* Routines for AJP13 dissection
* Copyright 2002, Christopher K. St. John <cks@distributopia.com>
*
- * $Id: packet-ajp13.c,v 1.6 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-ajp13.c,v 1.7 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-aodv.c b/packet-aodv.c
index 5b04123353..01123b4237 100644
--- a/packet-aodv.c
+++ b/packet-aodv.c
@@ -2,7 +2,7 @@
* Routines for AODV dissection
* Copyright 2000, Erik Nordstrm <erik.nordstrom@it.uu.se>
*
- * $Id: packet-aodv.c,v 1.2 2002/04/28 20:49:51 guy Exp $
+ * $Id: packet-aodv.c,v 1.3 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-aodv6.c b/packet-aodv6.c
index eafccb8c62..d11a85f6d3 100644
--- a/packet-aodv6.c
+++ b/packet-aodv6.c
@@ -3,7 +3,7 @@
* Copyright 2002, Antti J. Tuominen <ajtuomin@tml.hut.fi>
* Loosely based on packet-aodv.c.
*
- * $Id: packet-aodv6.c,v 1.1 2002/05/29 21:32:10 guy Exp $
+ * $Id: packet-aodv6.c,v 1.2 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/int-64bit.h>
diff --git a/packet-arp.c b/packet-arp.c
index 3fd6bf47b2..20139cb9f2 100644
--- a/packet-arp.c
+++ b/packet-arp.c
@@ -1,7 +1,7 @@
/* packet-arp.c
* Routines for ARP packet disassembly
*
- * $Id: packet-arp.c,v 1.51 2002/03/10 00:05:20 guy Exp $
+ * $Id: packet-arp.c,v 1.52 2002/08/02 23:35:47 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 <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -769,7 +765,7 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* inform resolv.c module of the new discovered addresses */
- u_int ip;
+ guint ip;
const guint8 *mac;
/* add sender address in all cases */
diff --git a/packet-ascend.c b/packet-ascend.c
index 5e196ff92a..700ba9025b 100644
--- a/packet-ascend.c
+++ b/packet-ascend.c
@@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
- * $Id: packet-ascend.c,v 1.30 2002/01/21 07:36:32 guy Exp $
+ * $Id: packet-ascend.c,v 1.31 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -25,10 +25,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
diff --git a/packet-atalk.c b/packet-atalk.c
index 857284cd52..0410572dcb 100644
--- a/packet-atalk.c
+++ b/packet-atalk.c
@@ -2,7 +2,7 @@
* Routines for AppleTalk packet disassembly: LLAP, DDP, NBP, ATP, ASP,
* RTMP.
*
- * $Id: packet-atalk.c,v 1.79 2002/06/29 22:15:41 guy Exp $
+ * $Id: packet-atalk.c,v 1.80 2002/08/02 23:35:47 jmayer Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@@ -29,14 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <string.h>
@@ -116,15 +108,15 @@ static int hf_ddp_type = -1;
static dissector_handle_t asp_handle;
static int proto_atp = -1;
-static int hf_atp_ctrlinfo = -1; /* u_int8_t control information */
+static int hf_atp_ctrlinfo = -1; /* guint8_t control information */
static int hf_atp_function = -1; /* bits 7,6 function */
static int hf_atp_xo = -1; /* bit 5 exactly-once */
static int hf_atp_eom = -1; /* bit 4 end-of-message */
static int hf_atp_sts = -1; /* bit 3 send transaction status */
static int hf_atp_treltimer = -1; /* bits 2,1,0 TRel timeout indicator */
-static int hf_atp_bitmap = -1; /* u_int8_t bitmap or sequence number */
-static int hf_atp_tid = -1; /* u_int16_t transaction id. */
+static int hf_atp_bitmap = -1; /* guint8_t bitmap or sequence number */
+static int hf_atp_tid = -1; /* guint16_t transaction id. */
static int hf_atp_user_bytes = -1;
static int hf_atp_segments = -1;
@@ -1571,10 +1563,10 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
tvb_memcpy(tvb, (guint8 *)&ddp, 0, sizeof(e_ddp));
- ddp.dnet=ntohs(ddp.dnet);
- ddp.snet=ntohs(ddp.snet);
- ddp.sum=ntohs(ddp.sum);
- ddp.hops_len=ntohs(ddp.hops_len);
+ ddp.dnet=g_ntohs(ddp.dnet);
+ ddp.snet=g_ntohs(ddp.snet);
+ ddp.sum=g_ntohs(ddp.sum);
+ ddp.hops_len=g_ntohs(ddp.hops_len);
src.net = ddp.snet;
src.node = ddp.snode;
diff --git a/packet-atm.c b/packet-atm.c
index 889264aa2f..88cd16095b 100644
--- a/packet-atm.c
+++ b/packet-atm.c
@@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
- * $Id: packet-atm.c,v 1.47 2002/06/07 21:11:22 guy Exp $
+ * $Id: packet-atm.c,v 1.48 2002/08/02 23:35:47 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 <stdio.h>
#include <glib.h>
#include <epan/packet.h>
@@ -617,7 +613,7 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
static void
-capture_lane(const union wtap_pseudo_header *pseudo_header, const u_char *pd,
+capture_lane(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
int len, packet_counts *ld)
{
/* Is it LE Control, 802.3, 802.5, or "none of the above"? */
@@ -760,7 +756,7 @@ static const value_string ipsilon_type_vals[] = {
};
void
-capture_atm(const union wtap_pseudo_header *pseudo_header, const u_char *pd,
+capture_atm(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
int len, packet_counts *ld)
{
if (pseudo_header->atm.aal == AAL_5) {
diff --git a/packet-atm.h b/packet-atm.h
index 3c6be61920..27c69b3935 100644
--- a/packet-atm.h
+++ b/packet-atm.h
@@ -1,6 +1,6 @@
/* packet-atm.h
*
- * $Id: packet-atm.h,v 1.7 2002/06/07 21:11:22 guy Exp $
+ * $Id: packet-atm.h,v 1.8 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,7 +24,7 @@
#ifndef __PACKET_ATM_H__
#define __PACKET_ATM_H__
-void capture_atm(const union wtap_pseudo_header *, const u_char *, int,
+void capture_atm(const union wtap_pseudo_header *, const guchar *, int,
packet_counts *);
#endif
diff --git a/packet-auto_rp.c b/packet-auto_rp.c
index 9d9647270f..3a38c86bf7 100644
--- a/packet-auto_rp.c
+++ b/packet-auto_rp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-auto_rp.c,v 1.20 2002/02/01 12:05:59 guy Exp $
+ * $Id: packet-auto_rp.c,v 1.21 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,14 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-bacapp.c b/packet-bacapp.c
index 8c4dc433f7..6eb2e5bab3 100644
--- a/packet-bacapp.c
+++ b/packet-bacapp.c
@@ -2,7 +2,7 @@
* Routines for BACnet (APDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
- * $Id: packet-bacapp.c,v 1.11 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-bacapp.c,v 1.12 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-bacnet.c b/packet-bacnet.c
index 7e7788c981..80f7c6c65a 100644
--- a/packet-bacnet.c
+++ b/packet-bacnet.c
@@ -2,7 +2,7 @@
* Routines for BACnet (NPDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
- * $Id: packet-bacnet.c,v 1.12 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-bacnet.c,v 1.13 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-beep.c b/packet-beep.c
index 7693cb9e3b..1cf841b4a0 100644
--- a/packet-beep.c
+++ b/packet-beep.c
@@ -1,7 +1,7 @@
/* packet-beep.c
* Routines for BEEP packet disassembly
*
- * $Id: packet-beep.c,v 1.9 2002/06/13 07:32:32 guy Exp $
+ * $Id: packet-beep.c,v 1.10 2002/08/02 23:35:47 jmayer Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
* Modified 2001 Darren New <dnew@invisible.net> for BEEP.
@@ -32,14 +32,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/packet-bgp.c b/packet-bgp.c
index 6c98783a73..3a98850eb8 100644
--- a/packet-bgp.c
+++ b/packet-bgp.c
@@ -2,7 +2,7 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-bgp.c,v 1.59 2002/05/21 21:55:46 guy Exp $
+ * $Id: packet-bgp.c,v 1.60 2002/08/02 23:35:47 jmayer Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
@@ -46,14 +46,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -549,7 +541,7 @@ dissect_bgp_open(tvbuff_t *tvb, int offset, proto_tree *tree)
{
struct bgp_open bgpo; /* BGP OPEN message */
int hlen; /* message length */
- u_int i; /* tmp */
+ guint i; /* tmp */
int ptype; /* parameter type */
int plen; /* parameter length */
int ctype; /* capability type */
@@ -569,17 +561,17 @@ dissect_bgp_open(tvbuff_t *tvb, int offset, proto_tree *tree)
/* snarf OPEN message */
tvb_memcpy(tvb, bgpo.bgpo_marker, offset, BGP_MIN_OPEN_MSG_SIZE);
- hlen = ntohs(bgpo.bgpo_len);
+ hlen = g_ntohs(bgpo.bgpo_len);
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_version), 1,
"Version: %u", bgpo.bgpo_version);
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_myas), 2,
- "My AS: %u", ntohs(bgpo.bgpo_myas));
+ "My AS: %u", g_ntohs(bgpo.bgpo_myas));
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_holdtime), 2,
- "Hold time: %u", ntohs(bgpo.bgpo_holdtime));
+ "Hold time: %u", g_ntohs(bgpo.bgpo_holdtime));
proto_tree_add_text(tree, tvb,
offset + offsetof(struct bgp_open, bgpo_id), 4,
"BGP identifier: %s", ip_to_str((guint8 *)&bgpo.bgpo_id));
@@ -1633,7 +1625,7 @@ dissect_bgp_notification(tvbuff_t *tvb, int offset, proto_tree *tree)
/* snarf message */
tvb_memcpy(tvb, bgpn.bgpn_marker, offset, BGP_MIN_NOTIFICATION_MSG_SIZE);
- hlen = ntohs(bgpn.bgpn_len);
+ hlen = g_ntohs(bgpn.bgpn_len);
/* print error code */
proto_tree_add_text(tree, tvb,
@@ -1668,7 +1660,7 @@ dissect_bgp_notification(tvbuff_t *tvb, int offset, proto_tree *tree)
static void
dissect_bgp_route_refresh(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- u_int i; /* tmp */
+ guint i; /* tmp */
/* AFI */
i = tvb_get_ntohs(tvb, offset + BGP_HEADER_SIZE);
@@ -1700,7 +1692,7 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *bgp1_tree; /* BGP message tree */
int l, i; /* tmp */
int found; /* number of BGP messages in packet */
- static u_char marker[] = { /* BGP message marker */
+ static guchar marker[] = { /* BGP message marker */
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};
@@ -1727,7 +1719,7 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
found++;
- hlen = ntohs(bgp.bgp_len);
+ hlen = g_ntohs(bgp.bgp_len);
/*
* Desegmentation check.
diff --git a/packet-bootp.c b/packet-bootp.c
index 24fc623b5b..4382305e1b 100644
--- a/packet-bootp.c
+++ b/packet-bootp.c
@@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-bootp.c,v 1.68 2002/06/29 19:45:01 guy Exp $
+ * $Id: packet-bootp.c,v 1.69 2002/08/02 23:35:47 jmayer Exp $
*
* The information used comes from:
* RFC 951: Bootstrap Protocol
@@ -39,10 +39,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/int-64bit.h>
@@ -146,11 +142,11 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff,
{
char *text;
enum field_type ftype;
- u_char code = tvb_get_guint8(tvb, voff);
+ guchar code = tvb_get_guint8(tvb, voff);
int vlen;
- u_char byte;
+ guchar byte;
int i,optp, consumed;
- u_long time_secs;
+ gulong time_secs;
proto_tree *v_tree;
proto_item *vti;
guint8 protocol;
@@ -767,12 +763,12 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff,
case val_u_short:
if (vlen == 2) {
- /* one u_short */
+ /* one gushort */
proto_tree_add_text(bp_tree, tvb, voff, consumed,
"Option %d: %s = %d", code, text,
tvb_get_ntohs(tvb, voff+2));
} else {
- /* > 1 u_short */
+ /* > 1 gushort */
vti = proto_tree_add_text(bp_tree, tvb, voff,
consumed, "Option %d: %s", code, text);
v_tree = proto_item_add_subtree(vti, ett_bootp_option);
diff --git a/packet-bootparams.c b/packet-bootparams.c
index 1a18b586ac..387762b849 100644
--- a/packet-bootparams.c
+++ b/packet-bootparams.c
@@ -1,7 +1,7 @@
/* packet-bootparams.c
* Routines for bootparams dissection
*
- * $Id: packet-bootparams.c,v 1.20 2002/04/03 13:24:12 girlich Exp $
+ * $Id: packet-bootparams.c,v 1.21 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,14 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
@@ -78,7 +70,7 @@ dissect_bp_address(tvbuff_t *tvb, int offset, proto_tree *tree, int hfindex)
|((tvb_get_guint8(tvb, offset+11)&0xff)<<8 )
|((tvb_get_guint8(tvb, offset+15)&0xff) );
proto_tree_add_ipv4(tree, hfindex, tvb,
- offset, 16, ntohl(ipaddr));
+ offset, 16, g_ntohl(ipaddr));
offset += 16;
break;
diff --git a/packet-bpdu.c b/packet-bpdu.c
index fd339d9972..6275a28406 100644
--- a/packet-bpdu.c
+++ b/packet-bpdu.c
@@ -1,7 +1,7 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
- * $Id: packet-bpdu.c,v 1.36 2002/05/30 01:56:54 guy Exp $
+ * $Id: packet-bpdu.c,v 1.37 2002/08/02 23:35:47 jmayer Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
@@ -28,14 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-bvlc.c b/packet-bvlc.c
index 232a60fca2..8e5ffa90cd 100644
--- a/packet-bvlc.c
+++ b/packet-bvlc.c
@@ -2,7 +2,7 @@
* Routines for BACnet/IP (BVLL, BVLC) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
- * $Id: packet-bvlc.c,v 1.11 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-bvlc.c,v 1.12 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,14 +35,6 @@
#include "prefs.h"
#include <epan/strutil.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-cdp.c b/packet-cdp.c
index e98ad8480c..593800ff17 100644
--- a/packet-cdp.c
+++ b/packet-cdp.c
@@ -2,7 +2,7 @@
* Routines for the disassembly of the "Cisco Discovery Protocol"
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-cdp.c,v 1.46 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-cdp.c,v 1.47 2002/08/02 23:35:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -25,10 +25,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
diff --git a/packet-cgmp.c b/packet-cgmp.c
index a3484ac2f5..df648f3fcf 100644
--- a/packet-cgmp.c
+++ b/packet-cgmp.c
@@ -1,7 +1,7 @@
/* packet-cgmp.c
* Routines for the disassembly of the Cisco Group Management Protocol
*
- * $Id: packet-cgmp.c,v 1.15 2002/03/23 22:02:20 guy Exp $
+ * $Id: packet-cgmp.c,v 1.16 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,10 +24,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
diff --git a/packet-chdlc.c b/packet-chdlc.c
index 1ba74eaaec..493907e5c7 100644
--- a/packet-chdlc.c
+++ b/packet-chdlc.c
@@ -1,7 +1,7 @@
/* packet-chdlc.c
* Routines for Cisco HDLC packet disassembly
*
- * $Id: packet-chdlc.c,v 1.13 2002/05/30 01:56:54 guy Exp $
+ * $Id: packet-chdlc.c,v 1.14 2002/08/02 23:35:48 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 <glib.h>
#include <epan/packet.h>
#include "etypes.h"
@@ -102,7 +98,7 @@ const value_string chdlc_vals[] = {
};
void
-capture_chdlc( const u_char *pd, int offset, int len, packet_counts *ld ) {
+capture_chdlc( const guchar *pd, int offset, int len, packet_counts *ld ) {
if (!BYTES_ARE_IN_FRAME(offset, len, 2)) {
ld->other++;
return;
diff --git a/packet-chdlc.h b/packet-chdlc.h
index 166cde0843..a722e0b449 100644
--- a/packet-chdlc.h
+++ b/packet-chdlc.h
@@ -1,6 +1,6 @@
/* packet-chdlc.h
*
- * $Id: packet-chdlc.h,v 1.3 2001/11/20 21:59:12 guy Exp $
+ * $Id: packet-chdlc.h,v 1.4 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,7 +33,7 @@
#define CHDLC_ADDR_UNICAST 0x0f
#define CHDLC_ADDR_MULTICAST 0x8f
-void capture_chdlc(const u_char *, int, int, packet_counts *);
+void capture_chdlc(const guchar *, int, int, packet_counts *);
extern const value_string chdlc_vals[];
diff --git a/packet-clip.c b/packet-clip.c
index 114c191dc0..b7d469d062 100644
--- a/packet-clip.c
+++ b/packet-clip.c
@@ -1,7 +1,7 @@
/* packet-clip.c
* Routines for clip packet disassembly
*
- * $Id: packet-clip.c,v 1.19 2002/01/21 07:36:32 guy Exp $
+ * $Id: packet-clip.c,v 1.20 2002/08/02 23:35:48 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 <glib.h>
#include <epan/packet.h>
#include "packet-clip.h"
@@ -43,7 +39,7 @@ static gint ett_clip = -1;
static dissector_handle_t ip_handle;
void
-capture_clip( const u_char *pd, int len, packet_counts *ld ) {
+capture_clip( const guchar *pd, int len, packet_counts *ld ) {
capture_ip(pd, 0, len, ld);
}
diff --git a/packet-clip.h b/packet-clip.h
index 3887756cb1..a9bd33810a 100644
--- a/packet-clip.h
+++ b/packet-clip.h
@@ -1,6 +1,6 @@
/* packet-clip.h
*
- * $Id: packet-clip.h,v 1.5 2001/11/20 21:59:12 guy Exp $
+ * $Id: packet-clip.h,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_CLIP_H__
#define __PACKET_CLIP_H__
-void capture_clip(const u_char *, int, packet_counts *);
+void capture_clip(const guchar *, int, packet_counts *);
#endif
diff --git a/packet-clnp.c b/packet-clnp.c
index 7a4f5724b0..7b3d253ca7 100644
--- a/packet-clnp.c
+++ b/packet-clnp.c
@@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
- * $Id: packet-clnp.c,v 1.57 2002/06/07 10:11:38 guy Exp $
+ * $Id: packet-clnp.c,v 1.58 2002/08/02 23:35:48 jmayer Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -155,9 +151,9 @@ static const value_string npdu_type_vals[] = {
/* Segmentation part */
struct clnp_segment {
- u_short cng_id; /* data unit identifier */
- u_short cng_off; /* segment offset */
- u_short cng_tot_len; /* total length */
+ gushort cng_id; /* data unit identifier */
+ gushort cng_off; /* segment offset */
+ gushort cng_tot_len; /* total length */
};
/* NSAP selector */
@@ -276,8 +272,8 @@ static const value_string tp_vpart_type_vals[] = {
/* global variables */
-static u_char li, tpdu, cdt; /* common fields */
-static u_short dst_ref;
+static guchar li, tpdu, cdt; /* common fields */
+static gushort dst_ref;
/* List of dissectors to call for COTP packets put atop the Inactive
Subset of CLNP. */
@@ -296,7 +292,7 @@ static gboolean clnp_reassemble = FALSE;
/* function definitions */
#define MAX_TSAP_LEN 32
-static gchar *print_tsap(const u_char *tsap, int length)
+static gchar *print_tsap(const guchar *tsap, int length)
{
static gchar str[3][MAX_TSAP_LEN * 2 + 1];
@@ -677,8 +673,8 @@ static int osi_decode_DR(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree;
proto_item *ti;
- u_short src_ref;
- u_char reason;
+ gushort src_ref;
+ guchar reason;
char *str;
if (li < LI_MIN_DR)
@@ -746,8 +742,8 @@ static int osi_decode_DT(tvbuff_t *tvb, int offset,
proto_item *ti;
gboolean is_extended;
gboolean is_class_234;
- u_int tpdu_nr ;
- u_int fragment = 0;
+ guint tpdu_nr ;
+ guint fragment = 0;
tvbuff_t *next_tvb;
/* VP_CHECKSUM is the only parameter allowed in the variable part.
@@ -880,7 +876,7 @@ static int osi_decode_ED(tvbuff_t *tvb, int offset,
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
- u_int tpdu_nr ;
+ guint tpdu_nr ;
tvbuff_t *next_tvb;
/* ED TPDUs are never fragmented */
@@ -985,8 +981,8 @@ static int osi_decode_RJ(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree;
proto_item *ti;
- u_int tpdu_nr ;
- u_short credit = 0;
+ guint tpdu_nr ;
+ gushort credit = 0;
switch(li) {
case LI_NORMAL_RJ :
@@ -1043,8 +1039,8 @@ static int osi_decode_CC(tvbuff_t *tvb, int offset,
proto_tree *cotp_tree = NULL;
proto_item *ti;
- u_short src_ref;
- u_char class_option;
+ gushort src_ref;
+ guchar class_option;
src_ref = tvb_get_ntohs(tvb, offset + P_SRC_REF);
class_option = (tvb_get_guint8(tvb, offset + P_CLASS_OPTION) >> 4 ) & 0x0F;
@@ -1113,7 +1109,7 @@ static int osi_decode_DC(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
- u_short src_ref;
+ gushort src_ref;
if (li > LI_MAX_DC)
return -1;
@@ -1168,8 +1164,8 @@ static int osi_decode_AK(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
- u_int tpdu_nr;
- u_short cdt_in_ak;
+ guint tpdu_nr;
+ gushort cdt_in_ak;
if (li > LI_MAX_AK)
return -1;
@@ -1278,7 +1274,7 @@ static int osi_decode_EA(tvbuff_t *tvb, int offset,
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
- u_int tpdu_nr ;
+ guint tpdu_nr ;
if (li > LI_MAX_EA)
return -1;
@@ -1371,7 +1367,7 @@ static int osi_decode_ER(tvbuff_t *tvb, int offset,
{
proto_tree *cotp_tree;
proto_item *ti;
- u_char *str;
+ guchar *str;
if (li > LI_MAX_ER)
return -1;
@@ -1595,7 +1591,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 cnf_cksum;
cksum_status_t cksum_status;
int offset;
- u_char src_len, dst_len, nsel, opt_len = 0;
+ guchar src_len, dst_len, nsel, opt_len = 0;
const guint8 *dst_addr, *src_addr;
gint len;
guint next_length;
diff --git a/packet-cosine.c b/packet-cosine.c
index f1ef69a2fc..ba2234c2b7 100644
--- a/packet-cosine.c
+++ b/packet-cosine.c
@@ -1,7 +1,7 @@
/* packet-cosine.c
* Routines for decoding CoSine IPNOS L2 debug output
*
- * $Id: packet-cosine.c,v 1.1 2002/07/31 19:27:39 guy Exp $
+ * $Id: packet-cosine.c,v 1.2 2002/08/02 23:35:48 jmayer Exp $
*
* Motonori Shindo <mshindo@mshindo.net>
*
@@ -33,10 +33,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
diff --git a/packet-cups.c b/packet-cups.c
index 20f1c4f067..d52a2d8aea 100644
--- a/packet-cups.c
+++ b/packet-cups.c
@@ -5,7 +5,7 @@
* Charles Levert <charles@comm.polymtl.ca>
* Copyright 2001 Charles Levert
*
-* $Id: packet-cups.c,v 1.10 2002/01/24 09:20:47 guy Exp $
+* $Id: packet-cups.c,v 1.11 2002/08/02 23:35:48 jmayer Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -27,10 +27,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
diff --git a/packet-data.c b/packet-data.c
index 85cd590b5e..3406dc9648 100644
--- a/packet-data.c
+++ b/packet-data.c
@@ -2,7 +2,7 @@
* Routines for raw data (default case)
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-data.c,v 1.29 2002/05/10 23:20:38 guy Exp $
+ * $Id: packet-data.c,v 1.30 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-data.h"
diff --git a/packet-dccp.c b/packet-dccp.c
index 435166b1a2..1ac7db1172 100644
--- a/packet-dccp.c
+++ b/packet-dccp.c
@@ -4,7 +4,7 @@
*
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-dccp.c,v 1.6 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-dccp.c,v 1.7 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-dcerpc-conv.c b/packet-dcerpc-conv.c
index 24e0e5a817..e94dd1ee19 100644
--- a/packet-dcerpc-conv.c
+++ b/packet-dcerpc-conv.c
@@ -2,7 +2,7 @@
* Routines for dcerpc conv dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-conv.c,v 1.4 2002/06/24 00:03:16 tpot Exp $
+ * $Id: packet-dcerpc-conv.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-dcerpc-epm.c b/packet-dcerpc-epm.c
index 22fe50acbc..0121816860 100644
--- a/packet-dcerpc-epm.c
+++ b/packet-dcerpc-epm.c
@@ -2,7 +2,7 @@
* Routines for dcerpc endpoint mapper dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-epm.c,v 1.11 2002/06/24 00:03:17 tpot Exp $
+ * $Id: packet-dcerpc-epm.c,v 1.12 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-dcerpc-mgmt.c b/packet-dcerpc-mgmt.c
index 58ad9d009e..372001c9c8 100644
--- a/packet-dcerpc-mgmt.c
+++ b/packet-dcerpc-mgmt.c
@@ -2,7 +2,7 @@
* Routines for dcerpc mgmt dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-mgmt.c,v 1.4 2002/06/24 00:03:17 tpot Exp $
+ * $Id: packet-dcerpc-mgmt.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-dcerpc-ndr.c b/packet-dcerpc-ndr.c
index b490c7d802..26fa720c7a 100644
--- a/packet-dcerpc-ndr.c
+++ b/packet-dcerpc-ndr.c
@@ -2,7 +2,7 @@
* Routines for DCERPC NDR dissection
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-ndr.c,v 1.6 2002/05/27 09:50:57 sahlberg Exp $
+ * $Id: packet-dcerpc-ndr.c,v 1.7 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
diff --git a/packet-dcerpc-nspi.c b/packet-dcerpc-nspi.c
index 38f6fa9118..1ce17b5288 100644
--- a/packet-dcerpc-nspi.c
+++ b/packet-dcerpc-nspi.c
@@ -2,7 +2,7 @@
* Routines for dcerpc nspi dissection
* Copyright 2001, Todd Sabin <tsabin@optonline.net>
*
- * $Id: packet-dcerpc-nspi.c,v 1.3 2002/06/24 00:03:17 tpot Exp $
+ * $Id: packet-dcerpc-nspi.c,v 1.4 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-dcerpc-oxid.c b/packet-dcerpc-oxid.c
index da0f4a823f..f36609da10 100644
--- a/packet-dcerpc-oxid.c
+++ b/packet-dcerpc-oxid.c
@@ -2,7 +2,7 @@
* Routines for DCOM OXID Resolver
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-oxid.c,v 1.4 2002/06/24 00:03:17 tpot Exp $
+ * $Id: packet-dcerpc-oxid.c,v 1.5 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-dcerpc-remact.c b/packet-dcerpc-remact.c
index d8a2133e58..b7ae1c94df 100644
--- a/packet-dcerpc-remact.c
+++ b/packet-dcerpc-remact.c
@@ -2,7 +2,7 @@
* Routines for DCOM Remote Activation
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc-remact.c,v 1.5 2002/06/24 00:03:17 tpot Exp $
+ * $Id: packet-dcerpc-remact.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-dcerpc.c b/packet-dcerpc.c
index 1f6af042d3..82cb0ce26a 100644
--- a/packet-dcerpc.c
+++ b/packet-dcerpc.c
@@ -2,7 +2,7 @@
* Routines for DCERPC packet disassembly
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc.c,v 1.69 2002/07/25 21:30:58 guy Exp $
+ * $Id: packet-dcerpc.c,v 1.70 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
diff --git a/packet-ddtp.c b/packet-ddtp.c
index 2b9bc81316..ad565d360b 100644
--- a/packet-ddtp.c
+++ b/packet-ddtp.c
@@ -3,7 +3,7 @@
* see http://ddt.sourceforge.net/
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-ddtp.c,v 1.20 2002/01/24 09:20:47 guy Exp $
+ * $Id: packet-ddtp.c,v 1.21 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,18 +29,11 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
/*#include <string.h>
#include <ctype.h>
#include <time.h>*/
#include <glib.h>
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
#include <epan/packet.h>
#include "packet-ddtp.h"
diff --git a/packet-dec-bpdu.c b/packet-dec-bpdu.c
index 04848763bf..b482a1f353 100644
--- a/packet-dec-bpdu.c
+++ b/packet-dec-bpdu.c
@@ -1,7 +1,7 @@
/* packet-dec-bpdu.c
* Routines for DEC BPDU (DEC Spanning Tree Protocol) disassembly
*
- * $Id: packet-dec-bpdu.c,v 1.13 2002/03/19 09:02:01 guy Exp $
+ * $Id: packet-dec-bpdu.c,v 1.14 2002/08/02 23:35:48 jmayer Exp $
*
* Copyright 2001 Paul Ionescu <paul@acorp.ro>
*
@@ -28,14 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-dhcpv6.c b/packet-dhcpv6.c
index a6648e10e2..effb37cb7a 100644
--- a/packet-dhcpv6.c
+++ b/packet-dhcpv6.c
@@ -4,7 +4,7 @@
* IItom Tsutomu MIENO <iitom@utouto.com>
* SHIRASAKI Yasuhiro <yasuhiro@gnome.gr.jp>
*
- * $Id: packet-dhcpv6.c,v 1.5 2002/06/26 01:24:42 guy Exp $
+ * $Id: packet-dhcpv6.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* The information used comes from:
* draft-ietf-dhc-dhcpv6-26.txt
@@ -37,10 +37,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/int-64bit.h>
diff --git a/packet-diameter.c b/packet-diameter.c
index 5ac5e62ce0..2b1707d8ad 100644
--- a/packet-diameter.c
+++ b/packet-diameter.c
@@ -1,7 +1,7 @@
/* packet-diameter.c
* Routines for Diameter packet disassembly
*
- * $Id: packet-diameter.c,v 1.48 2002/05/10 23:20:38 guy Exp $
+ * $Id: packet-diameter.c,v 1.49 2002/08/02 23:35:48 jmayer Exp $
*
* Copyright (c) 2001 by David Frascone <dave@frascone.com>
*
@@ -28,14 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1053,11 +1045,11 @@ static guint32 dissect_diameter_common(tvbuff_t *tvb, size_t start, packet_info
tvb_memcpy(tvb, (guint8*) &dh, offset, sizeof(dh));
/* Fix byte ordering in our static structure */
- dh.versionLength = ntohl(dh.versionLength);
- dh.flagsCmdCode = ntohl(dh.flagsCmdCode);
- dh.vendorId = ntohl(dh.vendorId);
- dh.hopByHopId = ntohl(dh.hopByHopId);
- dh.endToEndId = ntohl(dh.endToEndId);
+ dh.versionLength = g_ntohl(dh.versionLength);
+ dh.flagsCmdCode = g_ntohl(dh.flagsCmdCode);
+ dh.vendorId = g_ntohl(dh.vendorId);
+ dh.hopByHopId = g_ntohl(dh.hopByHopId);
+ dh.endToEndId = g_ntohl(dh.endToEndId);
if (dh.vendorId) {
strcpy(vendorName,
@@ -1383,8 +1375,8 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
tvb_memcpy(tvb, (guint8*) &avph, offset, MIN((long)sizeof(avph),packetLength));
/* Fix the byte ordering */
- avph.avp_code = ntohl(avph.avp_code);
- avph.avp_flagsLength = ntohl(avph.avp_flagsLength);
+ avph.avp_code = g_ntohl(avph.avp_code);
+ avph.avp_flagsLength = g_ntohl(avph.avp_flagsLength);
flags = (avph.avp_flagsLength & 0xff000000) >> 24;
avpLength = avph.avp_flagsLength & 0x00ffffff;
@@ -1408,7 +1400,7 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
/* Dissect our vendor id if it exists and set hdr length */
if (flags & AVP_FLAGS_V) {
- vendorId = ntohl(avph.avp_vendorId);
+ vendorId = g_ntohl(avph.avp_vendorId);
/* Vendor id */
hdrLength = sizeof(e_avphdr);
} else {
diff --git a/packet-dlsw.c b/packet-dlsw.c
index c9acca141f..4a3e3677f9 100644
--- a/packet-dlsw.c
+++ b/packet-dlsw.c
@@ -2,7 +2,7 @@
* Routines for DLSw packet dissection (Data Link Switching)
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-dlsw.c,v 1.5 2002/04/07 21:47:50 guy Exp $
+ * $Id: packet-dlsw.c,v 1.6 2002/08/02 23:35:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-dns.c b/packet-dns.c
index e763fc2634..df25723a2d 100644
--- a/packet-dns.c
+++ b/packet-dns.c
@@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
- * $Id: packet-dns.c,v 1.89 2002/07/16 22:50:45 guy Exp $
+ * $Id: packet-dns.c,v 1.90 2002/08/02 23:35:48 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
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
@@ -270,7 +266,7 @@ http://www.microsoft.com/windows2000/library/resources/reskit/samplechapters/cnc
which discuss them to some extent. */
static char *
-dns_type_name (u_int type)
+dns_type_name (guint type)
{
char *type_names[] = {
"unused",
@@ -362,7 +358,7 @@ dns_type_name (u_int type)
static char *
-dns_long_type_name (u_int type)
+dns_long_type_name (guint type)
{
char *type_names[] = {
"unused",
@@ -773,7 +769,7 @@ dissect_dns_query(tvbuff_t *tvb, int offset, int dns_data_offset,
proto_tree *
add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
const char *name, int namelen, const char *type_name, const char *class_name,
- u_int ttl, u_short data_len)
+ guint ttl, gushort data_len)
{
proto_tree *rr_tree;
@@ -794,7 +790,7 @@ add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
static proto_tree *
add_opt_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
const char *name, int namelen, const char *type_name, int class,
- u_int ttl, u_short data_len)
+ guint ttl, gushort data_len)
{
proto_tree *rr_tree;
@@ -870,8 +866,8 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset,
int data_offset;
int cur_offset;
int data_start;
- u_int ttl;
- u_short data_len;
+ guint ttl;
+ gushort data_len;
proto_tree *rr_tree = NULL;
proto_item *trr = NULL;
diff --git a/packet-dns.h b/packet-dns.h
index 9fefd80edb..e62555a72c 100644
--- a/packet-dns.h
+++ b/packet-dns.h
@@ -2,7 +2,7 @@
* Definitions for packet disassembly structures and routines used both by
* DNS and NBNS.
*
- * $Id: packet-dns.h,v 1.11 2001/07/02 07:17:29 guy Exp $
+ * $Id: packet-dns.h,v 1.12 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,6 +35,6 @@ int get_dns_name(tvbuff_t *, int, int, char *, int);
proto_tree *
add_rr_to_tree(proto_item *, int, tvbuff_t *, int, const char *,
- int, const char *, const char *, u_int, u_short);
+ int, const char *, const char *, guint, gushort);
#endif /* packet-dns.h */
diff --git a/packet-dsi.c b/packet-dsi.c
index c39499925f..2f2be1e304 100644
--- a/packet-dsi.c
+++ b/packet-dsi.c
@@ -2,7 +2,7 @@
* Routines for dsi packet dissection
* Copyright 2001, Randy McEoin <rmceoin@pe.com>
*
- * $Id: packet-dsi.c,v 1.22 2002/05/30 01:56:54 guy Exp $
+ * $Id: packet-dsi.c,v 1.23 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-dvmrp.c b/packet-dvmrp.c
index 6d35c32e5b..1cd3c351d4 100644
--- a/packet-dvmrp.c
+++ b/packet-dvmrp.c
@@ -1,7 +1,7 @@
/* packet-dvmrp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP/DVMRP packet disassembly
*
- * $Id: packet-dvmrp.c,v 1.11 2002/05/10 23:20:38 guy Exp $
+ * $Id: packet-dvmrp.c,v 1.12 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -55,10 +55,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-eap.c b/packet-eap.c
index 0b382f464d..21944279f0 100644
--- a/packet-eap.c
+++ b/packet-eap.c
@@ -2,7 +2,7 @@
* Routines for EAP Extensible Authentication Protocol dissection
* RFC 2284
*
- * $Id: packet-eap.c,v 1.26 2002/06/07 10:11:39 guy Exp $
+ * $Id: packet-eap.c,v 1.27 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,14 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
diff --git a/packet-eapol.c b/packet-eapol.c
index 04fb53040d..7c045d0d2a 100644
--- a/packet-eapol.c
+++ b/packet-eapol.c
@@ -3,7 +3,7 @@
* (From IEEE Draft P802.1X/D11; is there a later draft, or a
* final standard? If so, check it.)
*
- * $Id: packet-eapol.c,v 1.10 2002/04/29 08:20:07 guy Exp $
+ * $Id: packet-eapol.c,v 1.11 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,14 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-ieee8023.h"
diff --git a/packet-eigrp.c b/packet-eigrp.c
index 8492c145f8..fb75e82a71 100644
--- a/packet-eigrp.c
+++ b/packet-eigrp.c
@@ -2,7 +2,7 @@
* Routines for EIGRP dissection
* Copyright 2000, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-eigrp.c,v 1.23 2002/05/02 09:28:43 guy Exp $
+ * $Id: packet-eigrp.c,v 1.24 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,14 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/resolv.h>
diff --git a/packet-esis.c b/packet-esis.c
index 56664a72bb..f1d2c9133f 100644
--- a/packet-esis.c
+++ b/packet-esis.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI End System to Intermediate System
* Routing Exchange Protocol ISO 9542.
*
- * $Id: packet-esis.c,v 1.25 2002/04/30 23:56:58 guy Exp $
+ * $Id: packet-esis.c,v 1.26 2002/08/02 23:35:49 jmayer Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -64,11 +60,11 @@ static const value_string esis_vals[] = {
/* internal prototypes */
-static void esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb,
+static void esis_dissect_esh_pdu( guchar len, tvbuff_t *tvb,
proto_tree *treepd);
-static void esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb,
+static void esis_dissect_ish_pdu( guchar len, tvbuff_t *tvb,
proto_tree *tree);
-static void esis_dissect_redirect_pdu( u_char len, tvbuff_t *tvb,
+static void esis_dissect_redirect_pdu( guchar len, tvbuff_t *tvb,
proto_tree *tree);
/* ################## Descriptions ###########################################*/
@@ -153,7 +149,7 @@ esis_dissect_unknown( tvbuff_t *tvb, proto_tree *tree, char *fmat, ...){
static void
-esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
+esis_dissect_esh_pdu( guchar len, tvbuff_t *tvb, proto_tree *tree) {
proto_tree *esis_area_tree;
int offset = 0;
int no_sa = 0;
@@ -187,7 +183,7 @@ esis_dissect_esh_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
} /* esis_dissect_esh_pdu */ ;
static void
-esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
+esis_dissect_ish_pdu( guchar len, tvbuff_t *tvb, proto_tree *tree) {
int offset = 0;
int netl = 0;
@@ -210,7 +206,7 @@ esis_dissect_ish_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
};
static void
-esis_dissect_redirect_pdu( u_char len, tvbuff_t *tvb, proto_tree *tree) {
+esis_dissect_redirect_pdu( guchar len, tvbuff_t *tvb, proto_tree *tree) {
int offset = 0;
int tmpl = 0;
@@ -283,7 +279,7 @@ dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_item *ti;
proto_tree *esis_tree = NULL;
int variable_len = 0;
- u_int tmp_uint = 0;
+ guint tmp_uint = 0;
char *cksum_status;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
diff --git a/packet-eth.c b/packet-eth.c
index 87e9749c9f..2686c4cfb7 100644
--- a/packet-eth.c
+++ b/packet-eth.c
@@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
- * $Id: packet-eth.c,v 1.73 2002/04/24 06:03:33 guy Exp $
+ * $Id: packet-eth.c,v 1.74 2002/08/02 23:35:49 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 <glib.h>
#include <epan/packet.h>
#include "etypes.h"
@@ -71,7 +67,7 @@ static dissector_handle_t isl_handle;
#define ETHERNET_SNAP 3
void
-capture_eth(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_eth(const guchar *pd, int offset, int len, packet_counts *ld)
{
guint16 etype, length;
int ethhdr_type; /* the type of ethernet frame */
diff --git a/packet-eth.h b/packet-eth.h
index 48ea485bef..d4632dd002 100644
--- a/packet-eth.h
+++ b/packet-eth.h
@@ -1,6 +1,6 @@
/* packet-eth.h
*
- * $Id: packet-eth.h,v 1.6 2001/11/20 21:59:12 guy Exp $
+ * $Id: packet-eth.h,v 1.7 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_ETH_H__
#define __PACKET_ETH_H__
-void capture_eth(const u_char *, int, int, packet_counts *);
+void capture_eth(const guchar *, int, int, packet_counts *);
#endif
diff --git a/packet-ethertype.c b/packet-ethertype.c
index 2ee8b8a10c..9c783f799e 100644
--- a/packet-ethertype.c
+++ b/packet-ethertype.c
@@ -1,7 +1,7 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
- * $Id: packet-ethertype.c,v 1.29 2002/06/13 07:18:47 guy Exp $
+ * $Id: packet-ethertype.c,v 1.30 2002/08/02 23:35:49 jmayer Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-ip.h"
@@ -104,7 +100,7 @@ static void add_trailer(proto_tree *fh_tree, int trailer_id, tvbuff_t *tvb,
tvbuff_t *next_tvb, int offset_after_etype, guint length_before);
void
-capture_ethertype(guint16 etype, const u_char *pd, int offset, int len,
+capture_ethertype(guint16 etype, const guchar *pd, int offset, int len,
packet_counts *ld)
{
switch (etype) {
diff --git a/packet-fddi.c b/packet-fddi.c
index a17803baeb..e3ec6a5d9e 100644
--- a/packet-fddi.c
+++ b/packet-fddi.c
@@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
- * $Id: packet-fddi.c,v 1.56 2002/01/21 07:36:34 guy Exp $
+ * $Id: packet-fddi.c,v 1.57 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -129,7 +125,7 @@ static dissector_handle_t llc_handle;
static dissector_handle_t data_handle;
static void
-swap_mac_addr(u_char *swapped_addr, const u_char *orig_addr)
+swap_mac_addr(guchar *swapped_addr, const guchar *orig_addr)
{
int i;
@@ -140,7 +136,7 @@ swap_mac_addr(u_char *swapped_addr, const u_char *orig_addr)
void
-capture_fddi(const u_char *pd, int len, packet_counts *ld)
+capture_fddi(const guchar *pd, int len, packet_counts *ld)
{
int offset = 0, fc;
@@ -263,8 +259,8 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *ti;
gchar *fc_str;
proto_tree *fc_tree;
- static u_char src[6], dst[6];
- u_char src_swapped[6], dst_swapped[6];
+ static guchar src[6], dst[6];
+ guchar src_swapped[6], dst_swapped[6];
tvbuff_t *next_tvb;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
@@ -304,10 +300,10 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Extract the destination address, possibly bit-swapping it. */
if (bitswapped)
- swap_mac_addr(dst, (u_char *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
+ swap_mac_addr(dst, (guchar *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
else
- memcpy(dst, (u_char *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6), sizeof dst);
- swap_mac_addr(dst_swapped, (u_char*) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
+ memcpy(dst, (guchar *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6), sizeof dst);
+ swap_mac_addr(dst_swapped, (guchar*) tvb_get_ptr(tvb, FDDI_P_DHOST, 6));
/* XXX - copy them to some buffer associated with "pi", rather than
just making "dst" static? */
@@ -325,10 +321,10 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Extract the source address, possibly bit-swapping it. */
if (bitswapped)
- swap_mac_addr(src, (u_char *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
+ swap_mac_addr(src, (guchar *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
else
- memcpy(src, (u_char *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6), sizeof src);
- swap_mac_addr(src_swapped, (u_char*) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
+ memcpy(src, (guchar *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6), sizeof src);
+ swap_mac_addr(src_swapped, (guchar*) tvb_get_ptr(tvb, FDDI_P_SHOST, 6));
/* XXX - copy them to some buffer associated with "pi", rather than
just making "src" static? */
diff --git a/packet-fddi.h b/packet-fddi.h
index fdeabd0df0..e886c43f15 100644
--- a/packet-fddi.h
+++ b/packet-fddi.h
@@ -1,6 +1,6 @@
/* packet-fddi.h
*
- * $Id: packet-fddi.h,v 1.5 2001/11/20 21:59:12 guy Exp $
+ * $Id: packet-fddi.h,v 1.6 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_FDDI_H__
#define __PACKET_FDDI_H__
-void capture_fddi(const u_char *, int, packet_counts *);
+void capture_fddi(const guchar *, int, packet_counts *);
#endif
diff --git a/packet-ftp.c b/packet-ftp.c
index 4c3d3d5fe8..c49a6d6745 100644
--- a/packet-ftp.c
+++ b/packet-ftp.c
@@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* Copyright 2001, Juan Toledo <toledo@users.sourceforge.net> (Passive FTP)
*
- * $Id: packet-ftp.c,v 1.47 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-ftp.c,v 1.48 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,14 +34,6 @@
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -118,11 +110,11 @@ dissect_ftpdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
* the address and port number.
*/
static void
-handle_pasv_response(const u_char *line, int linelen, packet_info *pinfo)
+handle_pasv_response(const guchar *line, int linelen, packet_info *pinfo)
{
char *args;
char *p;
- u_char c;
+ guchar c;
int i;
int address[4], port[2];
guint16 server_port;
@@ -213,13 +205,13 @@ dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ftp_tree = NULL;
proto_item *ti;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
guint32 code;
gboolean is_pasv_response = FALSE;
gint next_offset;
int linelen;
int tokenlen;
- const u_char *next_token;
+ const guchar *next_token;
if (pinfo->match_port == pinfo->destport)
is_request = TRUE;
diff --git a/packet-giop.c b/packet-giop.c
index 09959b6853..6709c9afdd 100644
--- a/packet-giop.c
+++ b/packet-giop.c
@@ -9,7 +9,7 @@
* Frank Singleton <frank.singleton@ericsson.com>
* Trevor Shepherd <eustrsd@am1.ericsson.se>
*
- * $Id: packet-giop.c,v 1.61 2002/05/13 01:24:45 guy Exp $
+ * $Id: packet-giop.c,v 1.62 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -282,10 +282,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <stdio.h>
#include <errno.h>
@@ -2825,11 +2821,11 @@ dissect_target_address(tvbuff_t * tvb, packet_info *pinfo, int *offset, proto_tr
}
static void
-dissect_reply_body (tvbuff_t *tvb, u_int offset, packet_info *pinfo,
+dissect_reply_body (tvbuff_t *tvb, guint offset, packet_info *pinfo,
proto_tree *tree, gboolean stream_is_big_endian,
guint32 reply_status, MessageHeader *header, proto_tree *clnp_tree) {
- u_int sequence_length;
+ guint sequence_length;
gboolean exres = FALSE; /* result of trying explicit dissectors */
gchar * repoid = NULL; /* Repositor ID looked up from objkey */
@@ -3078,7 +3074,7 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
MessageHeader * header,
gboolean stream_is_big_endian) {
- u_int offset = 0;
+ guint offset = 0;
guint32 request_id;
guint32 reply_status;
proto_tree *reply_tree = NULL;
@@ -3158,7 +3154,7 @@ static void dissect_giop_cancel_request (tvbuff_t * tvb, packet_info * pinfo,
proto_tree * tree,
gboolean stream_is_big_endian) {
- u_int offset = 0;
+ guint offset = 0;
guint32 request_id;
proto_tree *cancel_request_tree = NULL;
proto_item *tf;
@@ -3742,15 +3738,15 @@ dissect_giop_fragment( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* Main entry point */
gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
- u_int offset = 0;
+ guint offset = 0;
MessageHeader header;
tvbuff_t *giop_header_tvb;
tvbuff_t *payload_tvb;
proto_tree *clnp_tree = NULL;
proto_item *ti;
- u_int message_size;
- u_int minor_version;
+ guint message_size;
+ guint minor_version;
gboolean stream_is_big_endian;
diff --git a/packet-gmrp.c b/packet-gmrp.c
index 69987436be..7e76bfa789 100644
--- a/packet-gmrp.c
+++ b/packet-gmrp.c
@@ -5,7 +5,7 @@
* Based on the code from packet-gvrp.c (GVRP) from
* Kevin Shi <techishi@ms22.hinet.net> Copyright 2000
*
- * $Id: packet-gmrp.c,v 1.8 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-gmrp.c,v 1.9 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,14 +34,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-gnutella.c b/packet-gnutella.c
index 757324fa96..ecd2696d2a 100644
--- a/packet-gnutella.c
+++ b/packet-gnutella.c
@@ -2,7 +2,7 @@
* Routines for gnutella dissection
* Copyright 2001, B. Johannessen <bob@havoq.com>
*
- * $Id: packet-gnutella.c,v 1.13 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-gnutella.c,v 1.14 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <glib.h>
diff --git a/packet-gre.c b/packet-gre.c
index 6d32b48eab..b82aa03ff4 100644
--- a/packet-gre.c
+++ b/packet-gre.c
@@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-gre.c,v 1.50 2002/01/21 07:36:34 guy Exp $
+ * $Id: packet-gre.c,v 1.51 2002/08/02 23:35:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,13 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
#include <glib.h>
#include <epan/packet.h>
#include "packet-wccp.h"
diff --git a/packet-gtp.c b/packet-gtp.c
index 7a55426ddc..e7fc418987 100644
--- a/packet-gtp.c
+++ b/packet-gtp.c
@@ -4,7 +4,7 @@
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
* Nicolas Balkota <balkota@mac.com>
*
- * $Id: packet-gtp.c,v 1.31 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-gtp.c,v 1.32 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -4794,8 +4786,8 @@ dissect_gtpv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(flags_tree, hf_gtpv0_flags_spare, tvb, 0, 1, gtpv0_hdr.flags);
proto_tree_add_boolean(flags_tree, hf_gtpv0_flags_snn, tvb, 0, 1, gtpv0_hdr.flags);
- gtpv0_hdr.length = ntohs(gtpv0_hdr.length);
- gtpv0_hdr.seq_no = ntohs(gtpv0_hdr.seq_no);
+ gtpv0_hdr.length = g_ntohs(gtpv0_hdr.length);
+ gtpv0_hdr.seq_no = g_ntohs(gtpv0_hdr.seq_no);
proto_tree_add_uint(gtpv0_tree, hf_gtpv0_message_type, tvb, 1, 1, gtpv0_hdr.message);
proto_tree_add_uint(gtpv0_tree, hf_gtpv0_length, tvb, 2, 2, gtpv0_hdr.length);
proto_tree_add_uint(gtpv0_tree, hf_gtpv0_seq_number, tvb, 4, 2, gtpv0_hdr.seq_no);
@@ -4893,7 +4885,7 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_uint(gtpv1_tree, hf_gtpv1_message_type, tvb, 1, 1, gtpv1_hdr.message);
- gtpv1_hdr.length = ntohs(gtpv1_hdr.length);
+ gtpv1_hdr.length = g_ntohs(gtpv1_hdr.length);
proto_tree_add_uint(gtpv1_tree, hf_gtpv1_length, tvb, 2, 2, gtpv1_hdr.length);
gtp_prime = (gtpv1_hdr.flags & 0x01) >> 4;
@@ -4902,7 +4894,7 @@ dissect_gtpv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
if (!gtp_prime) {
- gtpv1_hdr.teid = ntohl(gtpv1_hdr.teid);
+ gtpv1_hdr.teid = g_ntohl(gtpv1_hdr.teid);
proto_tree_add_uint(gtpv1_tree, hf_gtpv1_teid, tvb, 4, 4, gtpv1_hdr.teid);
if (gtpv1_hdr.flags & 0x07) {
diff --git a/packet-gvrp.c b/packet-gvrp.c
index 0a3958bde8..ce83ad94db 100644
--- a/packet-gvrp.c
+++ b/packet-gvrp.c
@@ -2,7 +2,7 @@
* Routines for GVRP (GARP VLAN Registration Protocol) dissection
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
*
- * $Id: packet-gvrp.c,v 1.12 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-gvrp.c,v 1.13 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-h1.c b/packet-h1.c
index 764476dcc8..28a6efa023 100644
--- a/packet-h1.c
+++ b/packet-h1.c
@@ -2,7 +2,7 @@
* Routines for Sinec H1 packet disassembly
* Gerrit Gehnen <G.Gehnen@atrie.de>
*
- * $Id: packet-h1.c,v 1.23 2002/01/21 07:36:34 guy Exp $
+ * $Id: packet-h1.c,v 1.24 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-h261.c b/packet-h261.c
index 51652a2aeb..4755a5ca1f 100644
--- a/packet-h261.c
+++ b/packet-h261.c
@@ -2,7 +2,7 @@
*
* Routines for ITU-T Recommendation H.261 dissection
*
- * $Id: packet-h261.c,v 1.15 2002/02/01 07:37:20 guy Exp $
+ * $Id: packet-h261.c,v 1.16 2002/08/02 23:35:50 jmayer Exp $
*
* Copyright 2000, Philips Electronics N.V.
* Andreas Sikkema <andreas.sikkema@philips.com>
@@ -41,14 +41,6 @@
#include <glib.h>
#include <epan/packet.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
diff --git a/packet-hclnfsd.c b/packet-hclnfsd.c
index d7bc743586..e66788d901 100644
--- a/packet-hclnfsd.c
+++ b/packet-hclnfsd.c
@@ -2,7 +2,7 @@
* Routines for hclnfsd (Hummingbird NFS Daemon) dissection
* Copyright 2001, Mike Frisch <frisch@hummingbird.com>
*
- * $Id: packet-hclnfsd.c,v 1.15 2002/07/31 19:58:28 guy Exp $
+ * $Id: packet-hclnfsd.c,v 1.16 2002/08/02 23:35:50 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 <string.h>
#include "packet-rpc.h"
diff --git a/packet-hsrp.c b/packet-hsrp.c
index 6b6976cdc8..b40299f7a4 100644
--- a/packet-hsrp.c
+++ b/packet-hsrp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-hsrp.c,v 1.22 2002/01/24 09:20:48 guy Exp $
+ * $Id: packet-hsrp.c,v 1.23 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-http.c b/packet-http.c
index 466a469f00..4a91f8d1c0 100644
--- a/packet-http.c
+++ b/packet-http.c
@@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-http.c,v 1.49 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-http.c,v 1.50 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
@@ -77,7 +73,7 @@ typedef enum {
PROTO_SSDP /* Simple Service Discovery Protocol */
} http_proto_t;
-static int is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type);
+static int is_http_request_or_reply(const guchar *data, int linelen, http_type_t *type);
static dissector_table_t subdissector_table;
static heur_dissector_list_t heur_subdissector_list;
@@ -90,11 +86,11 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *http_tree = NULL;
proto_item *ti = NULL;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
gint next_offset;
- const u_char *linep, *lineend;
+ const guchar *linep, *lineend;
int linelen;
- u_char c;
+ guchar c;
http_type_t http_type;
int datalen;
@@ -295,7 +291,7 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* anyway.
*/
static int
-is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type)
+is_http_request_or_reply(const guchar *data, int linelen, http_type_t *type)
{
int isHttpRequestOrReply = FALSE;
@@ -321,7 +317,7 @@ is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type)
*type = HTTP_RESPONSE;
isHttpRequestOrReply = TRUE; /* response */
} else {
- u_char * ptr = (u_char *)data;
+ guchar * ptr = (guchar *)data;
int index = 0;
/* Look for the space following the Method */
diff --git a/packet-iapp.c b/packet-iapp.c
index 8ce7e6bad6..f78660c576 100644
--- a/packet-iapp.c
+++ b/packet-iapp.c
@@ -2,7 +2,7 @@
* Routines for IAPP dissection
* Copyright 2002, Alfred Arnold <aarnold@elsa.de>
*
- * $Id: packet-iapp.c,v 1.4 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-iapp.c,v 1.5 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,14 +37,6 @@
#include <string.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-icap.c b/packet-icap.c
index e3817f38c1..bbbf367cae 100644
--- a/packet-icap.c
+++ b/packet-icap.c
@@ -3,7 +3,7 @@
*
* Srishylam Simharajan simha@netapp.com
*
- * $Id: packet-icap.c,v 1.10 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-icap.c,v 1.11 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
@@ -59,18 +55,18 @@ static gint ett_icap = -1;
static dissector_handle_t data_handle;
#define TCP_PORT_ICAP 1344
-static int is_icap_message(const u_char *data, int linelen, icap_type_t *type);
+static int is_icap_message(const guchar *data, int linelen, icap_type_t *type);
static void
dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *icap_tree = NULL;
proto_item *ti = NULL;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
gint next_offset;
- const u_char *linep, *lineend;
+ const guchar *linep, *lineend;
int linelen;
- u_char c;
+ guchar c;
icap_type_t icap_type;
int datalen;
@@ -235,7 +231,7 @@ is_icap_header:
static int
-is_icap_message(const u_char *data, int linelen, icap_type_t *type)
+is_icap_message(const guchar *data, int linelen, icap_type_t *type)
{
#define ICAP_COMPARE(string, length, msgtype) { \
if (strncmp(data, string, length) == 0) { \
diff --git a/packet-icmpv6.c b/packet-icmpv6.c
index f694ffa5a6..7474dad982 100644
--- a/packet-icmpv6.c
+++ b/packet-icmpv6.c
@@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
- * $Id: packet-icmpv6.c,v 1.65 2002/01/30 22:58:54 guy Exp $
+ * $Id: packet-icmpv6.c,v 1.66 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -39,14 +39,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#ifdef NEED_SNPRINTF_H
@@ -1192,7 +1184,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dp->icmp6_code,
"Code: %u", dp->icmp6_code);
}
- cksum = (guint16)htons(dp->icmp6_cksum);
+ cksum = (guint16)g_htons(dp->icmp6_cksum);
length = tvb_length(tvb);
reported_length = tvb_reported_length(tvb);
if (!pinfo->fragmented && length >= reported_length) {
@@ -1205,8 +1197,8 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(tvb_reported_length(tvb));
- phdr[1] = htonl(IP_PROTO_ICMPV6);
+ phdr[0] = g_htonl(tvb_reported_length(tvb));
+ phdr[1] = g_htonl(IP_PROTO_ICMPV6);
cksum_vec[2].len = 8;
cksum_vec[3].len = tvb_reported_length(tvb);
cksum_vec[3].ptr = tvb_get_ptr(tvb, offset, cksum_vec[3].len);
@@ -1260,10 +1252,10 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case ICMP6_ECHO_REPLY:
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct icmp6_hdr, icmp6_id), 2,
- "ID: 0x%04x", (guint16)ntohs(dp->icmp6_id));
+ "ID: 0x%04x", (guint16)g_ntohs(dp->icmp6_id));
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct icmp6_hdr, icmp6_seq), 2,
- "Sequence: 0x%04x", (guint16)ntohs(dp->icmp6_seq));
+ "Sequence: 0x%04x", (guint16)g_ntohs(dp->icmp6_seq));
next_tvb = tvb_new_subset(tvb, offset + sizeof(*dp), -1, -1);
call_dissector(data_handle,next_tvb, pinfo, icmp6_tree);
break;
@@ -1273,7 +1265,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct icmp6_hdr, icmp6_maxdelay), 2,
"Maximum response delay: %u",
- (guint16)ntohs(dp->icmp6_maxdelay));
+ (guint16)g_ntohs(dp->icmp6_maxdelay));
proto_tree_add_text(icmp6_tree, tvb, offset + sizeof(*dp), 16,
"Multicast Address: %s",
ip6_to_str((struct e_in6_addr *)(tvb_get_ptr(tvb, offset + sizeof *dp, sizeof (struct e_in6_addr)))));
@@ -1313,7 +1305,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct nd_router_advert, nd_ra_router_lifetime),
2, "Router lifetime: %u",
- (guint16)ntohs(ra->nd_ra_router_lifetime));
+ (guint16)g_ntohs(ra->nd_ra_router_lifetime));
proto_tree_add_text(icmp6_tree, tvb,
offset + offsetof(struct nd_router_advert, nd_ra_reachable), 4,
"Reachable time: %u", pntohl(&ra->nd_ra_reachable));
diff --git a/packet-icp.c b/packet-icp.c
index b7a055fe68..835d59f090 100644
--- a/packet-icp.c
+++ b/packet-icp.c
@@ -4,7 +4,7 @@
* By Peter Torvals
* Copyright 1999 Peter Torvals
*
- * $Id: packet-icp.c,v 1.21 2002/01/21 07:36:35 guy Exp $
+ * $Id: packet-icp.c,v 1.22 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,14 +30,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/packet-icq.c b/packet-icq.c
index 7124b15461..50493cd8a7 100644
--- a/packet-icq.c
+++ b/packet-icq.c
@@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
- * $Id: packet-icq.c,v 1.45 2002/07/17 00:42:40 guy Exp $
+ * $Id: packet-icq.c,v 1.46 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
@@ -360,7 +352,7 @@ static const value_string clientCmdCode[] = {
/*
* All ICQv5 decryption code thanx to Sebastien Dault (daus01@gel.usherb.ca)
*/
-static const u_char
+static const guchar
table_v5 [] = {
0x59, 0x60, 0x37, 0x6B, 0x65, 0x62, 0x46, 0x48, 0x53, 0x61, 0x4C, 0x59, 0x60, 0x57, 0x5B, 0x3D,
0x5E, 0x34, 0x6D, 0x36, 0x50, 0x3F, 0x6F, 0x67, 0x53, 0x61, 0x4C, 0x59, 0x40, 0x47, 0x63, 0x39,
@@ -436,7 +428,7 @@ get_v5key(tvbuff_t *tvb, int len)
}
static void
-decrypt_v5(u_char *bfr, guint32 size,guint32 key)
+decrypt_v5(guchar *bfr, guint32 size,guint32 key)
{
guint32 i;
guint32 k;
@@ -444,12 +436,12 @@ decrypt_v5(u_char *bfr, guint32 size,guint32 key)
for (i=ICQ5_CL_SESSIONID; i < size; i+=4 ) {
k = key+table_v5[i&0xff];
if ( i != 0x16 ) {
- bfr[i] ^= (u_char)(k & 0xff);
- bfr[i+1] ^= (u_char)((k & 0xff00)>>8);
+ bfr[i] ^= (guchar)(k & 0xff);
+ bfr[i+1] ^= (guchar)((k & 0xff00)>>8);
}
if ( i != 0x12 ) {
- bfr[i+2] ^= (u_char)((k & 0xff0000)>>16);
- bfr[i+3] ^= (u_char)((k & 0xff000000)>>24);
+ bfr[i+2] ^= (guchar)((k & 0xff0000)>>16);
+ bfr[i+3] ^= (guchar)((k & 0xff000000)>>24);
}
}
}
@@ -1113,7 +1105,7 @@ icqv5_cmd_login(proto_tree* tree,
char *aTime;
guint32 port;
guint32 passwdLen;
- const u_char *ipAddrp;
+ const guchar *ipAddrp;
guint32 status;
if (tree) {
@@ -1256,7 +1248,7 @@ icqv5_srv_login_reply(proto_tree* tree,/* Tree to put the data in */
{
proto_tree* subtree;
proto_item* ti;
- const u_char *ipAddrp;
+ const guchar *ipAddrp;
if (tree) {
if (size < SRV_LOGIN_REPLY_IP + 8) {
@@ -1290,8 +1282,8 @@ icqv5_srv_user_online(proto_tree* tree,/* Tree to put the data in */
{
proto_tree* subtree;
proto_item* ti;
- const u_char *ipAddrp;
- const u_char *realipAddrp;
+ const guchar *ipAddrp;
+ const guchar *realipAddrp;
guint32 status;
if (tree) {
diff --git a/packet-ieee80211.c b/packet-ieee80211.c
index a73d0186fe..49a6be410d 100644
--- a/packet-ieee80211.c
+++ b/packet-ieee80211.c
@@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
- * $Id: packet-ieee80211.c,v 1.72 2002/07/31 09:00:02 guy Exp $
+ * $Id: packet-ieee80211.c,v 1.73 2002/08/02 23:35:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -41,14 +41,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
@@ -449,7 +441,7 @@ find_header_length (guint16 fcf)
/* This is the capture function used to update packet counts */
/* ************************************************************************* */
static void
-capture_ieee80211_common (const u_char * pd, int offset, int len,
+capture_ieee80211_common (const guchar * pd, int offset, int len,
packet_counts * ld, gboolean fixed_length_header)
{
guint16 fcf, hdr_length;
@@ -511,7 +503,7 @@ capture_ieee80211_common (const u_char * pd, int offset, int len,
* Handle 802.11 with a variable-length link-layer header.
*/
void
-capture_ieee80211 (const u_char * pd, int offset, int len, packet_counts * ld)
+capture_ieee80211 (const guchar * pd, int offset, int len, packet_counts * ld)
{
capture_ieee80211_common (pd, offset, len, ld, FALSE);
}
@@ -521,7 +513,7 @@ capture_ieee80211 (const u_char * pd, int offset, int len, packet_counts * ld)
* maximum length).
*/
void
-capture_ieee80211_fixed (const u_char * pd, int offset, int len, packet_counts * ld)
+capture_ieee80211_fixed (const guchar * pd, int offset, int len, packet_counts * ld)
{
capture_ieee80211_common (pd, offset, len, ld, TRUE);
}
diff --git a/packet-ieee80211.h b/packet-ieee80211.h
index d07bb2b239..639438af24 100644
--- a/packet-ieee80211.h
+++ b/packet-ieee80211.h
@@ -4,7 +4,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
- * $Id: packet-ieee80211.h,v 1.5 2002/01/28 01:13:48 guy Exp $
+ * $Id: packet-ieee80211.h,v 1.6 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,5 +27,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-void capture_ieee80211 (const u_char *, int, int, packet_counts *);
-void capture_ieee80211_fixed (const u_char *, int, int, packet_counts *);
+void capture_ieee80211 (const guchar *, int, int, packet_counts *);
+void capture_ieee80211_fixed (const guchar *, int, int, packet_counts *);
diff --git a/packet-ieee8023.c b/packet-ieee8023.c
index d7197b61e9..dce8f4c7b1 100644
--- a/packet-ieee8023.c
+++ b/packet-ieee8023.c
@@ -1,7 +1,7 @@
/* packet-ieee8023.c
* Routine for dissecting 802.3 (as opposed to D/I/X Ethernet) packets.
*
- * $Id: packet-ieee8023.c,v 1.2 2002/01/21 07:36:35 guy Exp $
+ * $Id: packet-ieee8023.c,v 1.3 2002/08/02 23:35:51 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 <glib.h>
#include <epan/packet.h>
#include "packet-ieee8023.h"
diff --git a/packet-igmp.c b/packet-igmp.c
index 397cc16063..d289312241 100644
--- a/packet-igmp.c
+++ b/packet-igmp.c
@@ -1,7 +1,7 @@
/* packet-igmp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP packet disassembly
*
- * $Id: packet-igmp.c,v 1.19 2002/05/02 07:54:41 guy Exp $
+ * $Id: packet-igmp.c,v 1.20 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -92,10 +92,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -853,18 +849,18 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case IGMP_TYPE_0x23:
- dst = htonl(MC_ALL_IGMPV3_ROUTERS);
+ dst = g_htonl(MC_ALL_IGMPV3_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
}
break;
case IGMP_TYPE_0x24:
- dst = htonl(MC_ALL_ROUTERS);
+ dst = g_htonl(MC_ALL_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_mrdisc(tvb, pinfo, parent_tree, offset);
}
- dst = htonl(MC_ALL_IGMPV3_ROUTERS);
+ dst = g_htonl(MC_ALL_IGMPV3_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
}
@@ -876,7 +872,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
} else {
/* ok its not MSNIP, check if it might be MRDISC */
- dst = htonl(MC_ALL_ROUTERS);
+ dst = g_htonl(MC_ALL_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_mrdisc(tvb, pinfo, parent_tree, offset);
}
@@ -884,7 +880,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case IGMP_TYPE_0x26:
- dst = htonl(MC_ALL_ROUTERS);
+ dst = g_htonl(MC_ALL_ROUTERS);
if (!memcmp(pinfo->dst.data, &dst, 4)) {
offset = dissect_mrdisc(tvb, pinfo, parent_tree, offset);
}
diff --git a/packet-imap.c b/packet-imap.c
index 3538b840cb..91510033db 100644
--- a/packet-imap.c
+++ b/packet-imap.c
@@ -2,7 +2,7 @@
* Routines for imap packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-imap.c,v 1.20 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-imap.c,v 1.21 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -58,11 +50,11 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean is_request;
proto_tree *imap_tree, *ti;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
gint next_offset;
int linelen;
int tokenlen;
- const u_char *next_token;
+ const guchar *next_token;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IMAP");
diff --git a/packet-ip.c b/packet-ip.c
index 2e44e2e8bc..62146c9d3f 100644
--- a/packet-ip.c
+++ b/packet-ip.c
@@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
- * $Id: packet-ip.c,v 1.171 2002/07/15 20:54:45 guy Exp $
+ * $Id: packet-ip.c,v 1.172 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,14 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -347,7 +339,7 @@ ip_defragment_init(void)
}
void
-capture_ip(const u_char *pd, int offset, int len, packet_counts *ld) {
+capture_ip(const guchar *pd, int offset, int len, packet_counts *ld) {
if (!BYTES_ARE_IN_FRAME(offset, len, IPH_MIN_LEN)) {
ld->other++;
return;
@@ -658,7 +650,7 @@ dissect_ip_tcp_options(tvbuff_t *tvb, int offset, guint length,
const ip_tcp_opt *opttab, int nopts, int eol,
packet_info *pinfo, proto_tree *opt_tree)
{
- u_char opt;
+ guchar opt;
const ip_tcp_opt *optp;
opt_len_type len_type;
unsigned int optlen;
diff --git a/packet-ip.h b/packet-ip.h
index 907e16cea9..8779b11033 100644
--- a/packet-ip.h
+++ b/packet-ip.h
@@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
- * $Id: packet-ip.h,v 1.23 2001/12/29 22:01:11 guy Exp $
+ * $Id: packet-ip.h,v 1.24 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,7 +26,7 @@
#ifndef __PACKET_IP_H__
#define __PACKET_IP_H__
-void capture_ip(const u_char *, int, int, packet_counts *);
+void capture_ip(const guchar *, int, int, packet_counts *);
typedef enum {
NO_LENGTH, /* option has no data, hence no length */
diff --git a/packet-ipp.c b/packet-ipp.c
index 1d775143fb..c075bc6feb 100644
--- a/packet-ipp.c
+++ b/packet-ipp.c
@@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-ipp.c,v 1.31 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-ipp.c,v 1.32 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
diff --git a/packet-ipsec.c b/packet-ipsec.c
index 1e1e6fcafb..f919bb334d 100644
--- a/packet-ipsec.c
+++ b/packet-ipsec.c
@@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
- * $Id: packet-ipsec.c,v 1.40 2002/05/30 05:26:05 guy Exp $
+ * $Id: packet-ipsec.c,v 1.41 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,14 +28,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -147,7 +139,7 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "AH (SPI=0x%08x)",
- (guint32)ntohl(ah.ah_spi));
+ (guint32)g_ntohl(ah.ah_spi));
}
if (tree) {
@@ -164,10 +156,10 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
"Length: %u", (ah.ah_len + 2) << 2);
proto_tree_add_uint(ah_tree, hf_ah_spi, tvb,
offsetof(struct newah, ah_spi), 4,
- (guint32)ntohl(ah.ah_spi));
+ (guint32)g_ntohl(ah.ah_spi));
proto_tree_add_uint(ah_tree, hf_ah_sequence, tvb,
offsetof(struct newah, ah_seq), 4,
- (guint32)ntohl(ah.ah_seq));
+ (guint32)g_ntohl(ah.ah_seq));
proto_tree_add_text(ah_tree, tvb,
sizeof(ah), (ah.ah_len - 1) << 2,
"ICV");
@@ -213,7 +205,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "ESP (SPI=0x%08x)",
- (guint32)ntohl(esp.esp_spi));
+ (guint32)g_ntohl(esp.esp_spi));
}
/*
@@ -225,10 +217,10 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
esp_tree = proto_item_add_subtree(ti, ett_esp);
proto_tree_add_uint(esp_tree, hf_esp_spi, tvb,
offsetof(struct newesp, esp_spi), 4,
- (guint32)ntohl(esp.esp_spi));
+ (guint32)g_ntohl(esp.esp_spi));
proto_tree_add_uint(esp_tree, hf_esp_sequence, tvb,
offsetof(struct newesp, esp_seq), 4,
- (guint32)ntohl(esp.esp_seq));
+ (guint32)g_ntohl(esp.esp_seq));
call_dissector(data_handle,
tvb_new_subset(tvb, sizeof(struct newesp), -1, -1),
pinfo, esp_tree);
@@ -255,10 +247,10 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_memcpy(tvb, (guint8 *)&ipcomp, 0, sizeof(ipcomp));
if (check_col(pinfo->cinfo, COL_INFO)) {
- p = match_strval(ntohs(ipcomp.comp_cpi), cpi2val);
+ p = match_strval(g_ntohs(ipcomp.comp_cpi), cpi2val);
if (p == NULL) {
col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=0x%04x)",
- ntohs(ipcomp.comp_cpi));
+ g_ntohs(ipcomp.comp_cpi));
} else
col_add_fstr(pinfo->cinfo, COL_INFO, "IPComp (CPI=%s)", p);
}
@@ -280,7 +272,7 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ipcomp.comp_flags);
proto_tree_add_uint(ipcomp_tree, hf_ipcomp_cpi, tvb,
offsetof(struct ipcomp, comp_cpi), 2,
- ntohs(ipcomp.comp_cpi));
+ g_ntohs(ipcomp.comp_cpi));
call_dissector(data_handle,
tvb_new_subset(tvb, sizeof(struct ipcomp), -1, -1), pinfo,
ipcomp_tree);
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 353a993c47..d058158417 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.84 2002/07/30 07:25:29 guy Exp $
+ * $Id: packet-ipv6.c,v 1.85 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,18 +28,10 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_h
#include <sys/socket.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <stdio.h>
#include <glib.h>
@@ -208,7 +200,7 @@ dissect_frag6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
tvb_memcpy(tvb, (guint8 *)&frag, offset, sizeof(frag));
len = sizeof(frag);
- frag.ip6f_offlg = ntohs(frag.ip6f_offlg);
+ frag.ip6f_offlg = g_ntohs(frag.ip6f_offlg);
*offlg = frag.ip6f_offlg;
*ident = frag.ip6f_ident;
if (check_col(pinfo->cinfo, COL_INFO)) {
@@ -685,7 +677,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->ipproto = ipv6.ip6_nxt; /* XXX make work TCP follow (ipproto = 6) */
/* Get the payload length */
- plen = ntohs(ipv6.ip6_plen);
+ plen = g_ntohs(ipv6.ip6_plen);
/* Adjust the length of this tvbuff to include only the IPv6 datagram. */
set_actual_length(tvb, plen + sizeof (struct ip6_hdr));
@@ -707,7 +699,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(ipv6_tree, hf_ipv6_class, tvb,
offset + offsetof(struct ip6_hdr, ip6_flow), 4,
- (guint8)((ntohl(ipv6.ip6_flow) >> 20) & 0xff));
+ (guint8)((g_ntohl(ipv6.ip6_flow) >> 20) & 0xff));
/*
* there should be no alignment problems for ip6_flow, since it's the first
@@ -715,9 +707,9 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
proto_tree_add_uint_format(ipv6_tree, hf_ipv6_flow, tvb,
offset + offsetof(struct ip6_hdr, ip6_flow), 4,
- (unsigned long)(ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK),
+ (unsigned long)(g_ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK),
"Flowlabel: 0x%05lx",
- (unsigned long)(ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK));
+ (unsigned long)(g_ntohl(ipv6.ip6_flow) & IPV6_FLOWLABEL_MASK));
proto_tree_add_uint(ipv6_tree, hf_ipv6_plen, tvb,
offset + offsetof(struct ip6_hdr, ip6_plen), 2,
diff --git a/packet-ipv6.h b/packet-ipv6.h
index 899dafb1ed..0638123fb8 100644
--- a/packet-ipv6.h
+++ b/packet-ipv6.h
@@ -1,7 +1,7 @@
/* packet-ipv6.h
* Definitions for IPv6 packet disassembly
*
- * $Id: packet-ipv6.h,v 1.26 2002/01/21 07:36:35 guy Exp $
+ * $Id: packet-ipv6.h,v 1.27 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -77,8 +77,8 @@ struct ip6_hdr {
*/
struct ip6_ext {
- u_char ip6e_nxt;
- u_char ip6e_len;
+ guchar ip6e_nxt;
+ guchar ip6e_len;
};
/* Hop-by-Hop options header */
diff --git a/packet-ipx.c b/packet-ipx.c
index c1b6e46e92..437ac0dcdf 100644
--- a/packet-ipx.c
+++ b/packet-ipx.c
@@ -2,7 +2,7 @@
* Routines for NetWare's IPX
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-ipx.c,v 1.107 2002/07/04 20:47:28 guy Exp $
+ * $Id: packet-ipx.c,v 1.108 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-irc.c b/packet-irc.c
index e2e6eb593f..cc1c476a1f 100644
--- a/packet-irc.c
+++ b/packet-irc.c
@@ -1,7 +1,7 @@
/* packet-irc.c
* Routines for IRC packet dissection
*
- * $Id: packet-irc.c,v 1.19 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-irc.c,v 1.20 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,14 +30,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -77,7 +69,7 @@ dissect_irc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *irc_tree, *ti;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
gint next_offset;
int linelen;
diff --git a/packet-isakmp.c b/packet-isakmp.c
index 84244a0e0a..4e99984e64 100644
--- a/packet-isakmp.c
+++ b/packet-isakmp.c
@@ -4,7 +4,7 @@
* for ISAKMP (RFC 2407)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-isakmp.c,v 1.55 2002/05/20 01:29:07 guy Exp $
+ * $Id: packet-isakmp.c,v 1.56 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,17 +29,9 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <glib.h>
#ifdef NEED_SNPRINTF_H
diff --git a/packet-iscsi.c b/packet-iscsi.c
index 5b6b40228d..8e321f184c 100644
--- a/packet-iscsi.c
+++ b/packet-iscsi.c
@@ -2,7 +2,7 @@
* Routines for iSCSI dissection
* Copyright 2001, Eurologic and Mark Burton <markb@ordern.com>
*
- * $Id: packet-iscsi.c,v 1.35 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-iscsi.c,v 1.36 2002/08/02 23:35:51 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-isis-clv.c b/packet-isis-clv.c
index 0c3e9f70f9..973fed8353 100644
--- a/packet-isis-clv.c
+++ b/packet-isis-clv.c
@@ -1,7 +1,7 @@
/* packet-isis-clv.c
* Common CLV decode routines.
*
- * $Id: packet-isis-clv.c,v 1.21 2002/06/29 23:03:24 guy Exp $
+ * $Id: packet-isis-clv.c,v 1.22 2002/08/02 23:35:51 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -157,7 +153,7 @@ void
isis_dissect_authentication_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
int length, char *meaning)
{
- u_char pw_type;
+ guchar pw_type;
char sbuf[300]; /* 255 + header info area */
char *s = sbuf;
int auth_unsupported;
diff --git a/packet-isis-hello.c b/packet-isis-hello.c
index 8351104d34..cd9b0d3335 100644
--- a/packet-isis-hello.c
+++ b/packet-isis-hello.c
@@ -1,7 +1,7 @@
/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
- * $Id: packet-isis-hello.c,v 1.30 2002/05/02 10:13:56 guy Exp $
+ * $Id: packet-isis-hello.c,v 1.31 2002/08/02 23:35:51 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-isis-lsp.c b/packet-isis-lsp.c
index 5951d4a611..2e4097da83 100644
--- a/packet-isis-lsp.c
+++ b/packet-isis-lsp.c
@@ -1,7 +1,7 @@
/* packet-isis-lsp.c
* Routines for decoding isis lsp packets and their CLVs
*
- * $Id: packet-isis-lsp.c,v 1.31 2002/05/07 18:52:26 guy Exp $
+ * $Id: packet-isis-lsp.c,v 1.32 2002/08/02 23:35:51 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-isis-snp.c b/packet-isis-snp.c
index 0c76821786..4c22b36214 100644
--- a/packet-isis-snp.c
+++ b/packet-isis-snp.c
@@ -1,7 +1,7 @@
/* packet-isis-snp.c
* Routines for decoding isis complete & partial SNP and their payload
*
- * $Id: packet-isis-snp.c,v 1.16 2002/05/02 10:13:56 guy Exp $
+ * $Id: packet-isis-snp.c,v 1.17 2002/08/02 23:35:52 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-isis.c b/packet-isis.c
index 1c2caf6e05..fed99e7fe9 100644
--- a/packet-isis.c
+++ b/packet-isis.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly, core
* bits.
*
- * $Id: packet-isis.c,v 1.31 2002/04/07 22:36:55 guy Exp $
+ * $Id: packet-isis.c,v 1.32 2002/08/02 23:35:52 jmayer Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-isl.c b/packet-isl.c
index 5c7e0c6374..d53551c2c6 100644
--- a/packet-isl.c
+++ b/packet-isl.c
@@ -1,7 +1,7 @@
/* packet-isl.c
* Routines for Cisco ISL Ethernet header disassembly
*
- * $Id: packet-isl.c,v 1.30 2002/01/21 07:36:36 guy Exp $
+ * $Id: packet-isl.c,v 1.31 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,14 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-isl.h"
@@ -86,7 +78,7 @@ static dissector_handle_t tr_handle;
static dissector_handle_t data_handle;
void
-capture_isl(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_isl(const guchar *pd, int offset, int len, packet_counts *ld)
{
guint8 type;
diff --git a/packet-isl.h b/packet-isl.h
index 98554572be..2d81c3835a 100644
--- a/packet-isl.h
+++ b/packet-isl.h
@@ -1,6 +1,6 @@
/* packet-isl.h
*
- * $Id: packet-isl.h,v 1.4 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-isl.h,v 1.5 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_ISL_H__
#define __PACKET_ISL_H__
-void capture_isl(const u_char *, int, int, packet_counts *);
+void capture_isl(const guchar *, int, int, packet_counts *);
#endif
diff --git a/packet-isup.c b/packet-isup.c
index 15230a60a0..c27c4cab4d 100644
--- a/packet-isup.c
+++ b/packet-isup.c
@@ -2,7 +2,7 @@
* Routines for ISUP dissection
* Copyright 2001, Martina Obermeier <martina.obermeier@icn.siemens.de>
*
- * $Id: packet-isup.c,v 1.13 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-isup.c,v 1.14 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-kerberos.c b/packet-kerberos.c
index 38a10d0011..0b5308c4c5 100644
--- a/packet-kerberos.c
+++ b/packet-kerberos.c
@@ -3,7 +3,7 @@
* Wes Hardaker (c) 2000
* wjhardaker@ucdavis.edu
*
- * $Id: packet-kerberos.c,v 1.22 2002/07/29 02:03:54 sharpe Exp $
+ * $Id: packet-kerberos.c,v 1.23 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,10 +32,6 @@
#include <string.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-klm.c b/packet-klm.c
index 47d93df760..0bc653aa69 100644
--- a/packet-klm.c
+++ b/packet-klm.c
@@ -1,7 +1,7 @@
/* packet-klm.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for klm dissection
*
- * $Id: packet-klm.c,v 1.8 2002/04/03 13:24:12 girlich Exp $
+ * $Id: packet-klm.c,v 1.9 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-nfs.h"
diff --git a/packet-l2tp.c b/packet-l2tp.c
index 5630d9b477..ea3b4646b6 100644
--- a/packet-l2tp.c
+++ b/packet-l2tp.c
@@ -7,7 +7,7 @@
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
- * $Id: packet-l2tp.c,v 1.33 2002/07/10 20:55:45 guy Exp $
+ * $Id: packet-l2tp.c,v 1.34 2002/08/02 23:35:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,14 +52,6 @@ static int hf_l2tp_tie_breaker = -1;
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/packet-lapb.c b/packet-lapb.c
index f781a0c78b..ab6855f81f 100644
--- a/packet-lapb.c
+++ b/packet-lapb.c
@@ -2,7 +2,7 @@
* Routines for lapb frame disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapb.c,v 1.35 2002/04/09 08:15:02 guy Exp $
+ * $Id: packet-lapb.c,v 1.36 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-lapbether.c b/packet-lapbether.c
index 2b8cf59f48..e3623da372 100644
--- a/packet-lapbether.c
+++ b/packet-lapbether.c
@@ -3,7 +3,7 @@
* Richard Sharpe <rsharpe@ns.aus.com> based on the lapb module by
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-lapbether.c,v 1.9 2002/01/21 07:36:36 guy Exp $
+ * $Id: packet-lapbether.c,v 1.10 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-lapd.c b/packet-lapd.c
index e5a013756e..9ce4035585 100644
--- a/packet-lapd.c
+++ b/packet-lapd.c
@@ -2,7 +2,7 @@
* Routines for LAPD frame disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-lapd.c,v 1.29 2002/02/22 08:54:54 guy Exp $
+ * $Id: packet-lapd.c,v 1.30 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-ldap.c b/packet-ldap.c
index e4146a2441..88ffb1e0b7 100644
--- a/packet-ldap.c
+++ b/packet-ldap.c
@@ -1,7 +1,7 @@
/* packet-ldap.c
* Routines for ldap packet dissection
*
- * $Id: packet-ldap.c,v 1.42 2002/05/06 02:12:36 guy Exp $
+ * $Id: packet-ldap.c,v 1.43 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -44,14 +44,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-ldp.c b/packet-ldp.c
index 3bcbc19c95..ae2eb886f1 100644
--- a/packet-ldp.c
+++ b/packet-ldp.c
@@ -1,7 +1,7 @@
/* packet-ldp.c
* Routines for LDP (RFC 3036) packet disassembly
*
- * $Id: packet-ldp.c,v 1.39 2002/05/01 08:26:57 guy Exp $
+ * $Id: packet-ldp.c,v 1.40 2002/08/02 23:35:53 jmayer Exp $
*
* Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -31,14 +31,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/packet-llc.c b/packet-llc.c
index 2557214cb9..a8dcd82f08 100644
--- a/packet-llc.c
+++ b/packet-llc.c
@@ -2,7 +2,7 @@
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-llc.c,v 1.98 2002/05/29 03:08:01 guy Exp $
+ * $Id: packet-llc.c,v 1.99 2002/08/02 23:35:53 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "oui.h"
@@ -164,7 +160,7 @@ http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/ibm_r
};
void
-capture_llc(const u_char *pd, int offset, int len, packet_counts *ld) {
+capture_llc(const guchar *pd, int offset, int len, packet_counts *ld) {
int is_snap;
guint16 control;
diff --git a/packet-llc.h b/packet-llc.h
index f6e9bcca22..45b55f3afc 100644
--- a/packet-llc.h
+++ b/packet-llc.h
@@ -1,6 +1,6 @@
/* packet-llc.h
*
- * $Id: packet-llc.h,v 1.6 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-llc.h,v 1.7 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,7 +24,7 @@
#ifndef __PACKET_LLC_H__
#define __PACKET_LLC_H__
-void capture_llc(const u_char *, int, int, packet_counts *);
+void capture_llc(const guchar *, int, int, packet_counts *);
void dissect_snap(tvbuff_t *, int, packet_info *, proto_tree *,
proto_tree *, int, int, int, int, int);
diff --git a/packet-lmi.c b/packet-lmi.c
index 460c788119..5b7b125a0f 100644
--- a/packet-lmi.c
+++ b/packet-lmi.c
@@ -2,7 +2,7 @@
* Routines for Frame Relay Local Management Interface (LMI) disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-lmi.c,v 1.9 2002/01/21 07:36:37 guy Exp $
+ * $Id: packet-lmi.c,v 1.10 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -38,10 +38,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-lmp.c b/packet-lmp.c
index 0fa0d42513..88b20b2f9e 100644
--- a/packet-lmp.c
+++ b/packet-lmp.c
@@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-lmp.c,v 1.10 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-lmp.c,v 1.11 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -45,14 +45,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/tvbuff.h>
diff --git a/packet-lpd.c b/packet-lpd.c
index 9ac551a037..fbd0cba566 100644
--- a/packet-lpd.c
+++ b/packet-lpd.c
@@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-lpd.c,v 1.35 2002/01/24 09:20:49 guy Exp $
+ * $Id: packet-lpd.c,v 1.36 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-m3ua.c b/packet-m3ua.c
index f59168730b..607e85527d 100644
--- a/packet-m3ua.c
+++ b/packet-m3ua.c
@@ -9,7 +9,7 @@
*
* Copyright 2000, 2001, 2002, Michael Tuexen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-m3ua.c,v 1.19 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-m3ua.c,v 1.20 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -40,14 +40,6 @@
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-mbtcp.c b/packet-mbtcp.c
index 3987bb1107..4ef65e54f5 100644
--- a/packet-mbtcp.c
+++ b/packet-mbtcp.c
@@ -10,7 +10,7 @@
*
* for information on Modbus/TCP.
*
- * $Id: packet-mbtcp.c,v 1.9 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-mbtcp.c,v 1.10 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -46,14 +46,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -234,9 +226,9 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Make entries in Info column on summary display (updated after building proto tree) */
tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr));
- mh.transaction_id = ntohs(mh.transaction_id);
- mh.protocol_id = ntohs(mh.protocol_id);
- mh.len = ntohs(mh.len);
+ mh.transaction_id = g_ntohs(mh.transaction_id);
+ mh.protocol_id = g_ntohs(mh.protocol_id);
+ mh.len = g_ntohs(mh.len);
if ( mh.mdbs_hdr.function_code & 0x80 ) {
mh.mdbs_hdr.function_code ^= 0x80;
exception_returned = 1;
@@ -268,9 +260,9 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
do {
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr));
- mh.transaction_id = ntohs(mh.transaction_id);
- mh.protocol_id = ntohs(mh.protocol_id);
- mh.len = ntohs(mh.len);
+ mh.transaction_id = g_ntohs(mh.transaction_id);
+ mh.protocol_id = g_ntohs(mh.protocol_id);
+ mh.len = g_ntohs(mh.len);
if ( mh.mdbs_hdr.function_code & 0x80 ) {
tvb_memcpy(tvb, (guint8 *)&exception_code, offset + sizeof(mbtcp_hdr), 1);
diff --git a/packet-mip.c b/packet-mip.c
index a3940d58db..eb9ea4da85 100644
--- a/packet-mip.c
+++ b/packet-mip.c
@@ -2,7 +2,7 @@
* Routines for Mobile IP dissection
* Copyright 2000, Stefan Raab <sraab@cisco.com>
*
- * $Id: packet-mip.c,v 1.31 2002/07/17 00:42:41 guy Exp $
+ * $Id: packet-mip.c,v 1.32 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,14 +30,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <time.h>
diff --git a/packet-mmse.c b/packet-mmse.c
index c474ad5285..b2fa2b62e7 100644
--- a/packet-mmse.c
+++ b/packet-mmse.c
@@ -2,7 +2,7 @@
* Routines for MMS Message Encapsulation dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-mmse.c,v 1.13 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-mmse.c,v 1.14 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,14 +35,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-mount.c b/packet-mount.c
index 56644c8491..ba9ebbc350 100644
--- a/packet-mount.c
+++ b/packet-mount.c
@@ -1,7 +1,7 @@
/* packet-mount.c
* Routines for mount dissection
*
- * $Id: packet-mount.c,v 1.31 2002/04/15 08:55:03 girlich Exp $
+ * $Id: packet-mount.c,v 1.32 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include "packet-rpc.h"
diff --git a/packet-mpeg1.c b/packet-mpeg1.c
index ba5a14dfe1..1f3901592d 100644
--- a/packet-mpeg1.c
+++ b/packet-mpeg1.c
@@ -2,7 +2,7 @@
*
* Routines for RFC 2250 MPEG-1 dissection
*
- * $Id: packet-mpeg1.c,v 1.7 2002/02/01 04:34:15 gram Exp $
+ * $Id: packet-mpeg1.c,v 1.8 2002/08/02 23:35:54 jmayer Exp $
*
* Copyright 2001,
* Francisco Javier Cabello Torres, <fjcabello@vtools.es>
@@ -40,14 +40,6 @@
#include <glib.h>
#include <epan/packet.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
diff --git a/packet-mpls.c b/packet-mpls.c
index a036cefdbb..051c510acb 100644
--- a/packet-mpls.c
+++ b/packet-mpls.c
@@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-mpls.c,v 1.26 2002/03/18 18:56:53 guy Exp $
+ * $Id: packet-mpls.c,v 1.27 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,10 +37,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "ppptypes.h"
diff --git a/packet-mrdisc.c b/packet-mrdisc.c
index e5a42e3be4..c360059201 100644
--- a/packet-mrdisc.c
+++ b/packet-mrdisc.c
@@ -1,7 +1,7 @@
/* packet-mrdisc.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP/MRDISC packet disassembly
*
- * $Id: packet-mrdisc.c,v 1.7 2002/02/01 11:01:57 guy Exp $
+ * $Id: packet-mrdisc.c,v 1.8 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -40,10 +40,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-msdp.c b/packet-msdp.c
index e38e5cdb18..c97f2c1d27 100644
--- a/packet-msdp.c
+++ b/packet-msdp.c
@@ -4,7 +4,7 @@
*
* Copyright 2001, Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-msdp.c,v 1.6 2002/01/24 09:20:49 guy Exp $
+ * $Id: packet-msdp.c,v 1.7 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,13 +33,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-msnip.c b/packet-msnip.c
index 4d2862eafc..0f08292554 100644
--- a/packet-msnip.c
+++ b/packet-msnip.c
@@ -1,7 +1,7 @@
/* packet-msnip.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP/MSNIP packet disassembly
*
- * $Id: packet-msnip.c,v 1.6 2002/02/01 11:01:57 guy Exp $
+ * $Id: packet-msnip.c,v 1.7 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -39,10 +39,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-msproxy.c b/packet-msproxy.c
index 6db109a584..958c3c1fdf 100644
--- a/packet-msproxy.c
+++ b/packet-msproxy.c
@@ -2,7 +2,7 @@
* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-msproxy.c,v 1.30 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-msproxy.c,v 1.31 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -45,14 +45,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -66,7 +58,7 @@
#include "packet-udp.h"
extern void udp_hash_add(guint16 proto,
- void (*dissect)(const u_char *, int, frame_data *, proto_tree *));
+ void (*dissect)(const guchar *, int, frame_data *, proto_tree *));
static int proto_msproxy = -1;
diff --git a/packet-nbipx.c b/packet-nbipx.c
index 26c87869b6..59607a38cd 100644
--- a/packet-nbipx.c
+++ b/packet-nbipx.c
@@ -2,7 +2,7 @@
* Routines for NetBIOS over IPX packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-nbipx.c,v 1.46 2002/01/21 07:36:37 guy Exp $
+ * $Id: packet-nbipx.c,v 1.47 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-nbns.c b/packet-nbns.c
index bf8406554b..717e26346e 100644
--- a/packet-nbns.c
+++ b/packet-nbns.c
@@ -3,7 +3,7 @@
* to when it had only NBNS)
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nbns.c,v 1.76 2002/05/15 07:24:20 guy Exp $
+ * $Id: packet-nbns.c,v 1.77 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -429,7 +425,7 @@ dissect_nbns_query(tvbuff_t *tvb, int offset, int nbns_data_offset,
static void
nbns_add_nbns_flags(proto_tree *nbns_tree, tvbuff_t *tvb, int offset,
- u_short flags, int is_wack)
+ gushort flags, int is_wack)
{
char buf[128+1];
guint16 opcode;
@@ -472,7 +468,7 @@ nbns_add_nbns_flags(proto_tree *nbns_tree, tvbuff_t *tvb, int offset,
}
static void
-nbns_add_nb_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset, u_short flags)
+nbns_add_nb_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset, gushort flags)
{
char buf[128+1];
proto_tree *field_tree;
@@ -507,7 +503,7 @@ nbns_add_nb_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset, u_short flags)
static void
nbns_add_name_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset,
- u_short flags)
+ gushort flags)
{
char buf[128+1];
proto_item *field_tree;
@@ -582,15 +578,15 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
int data_offset;
int cur_offset;
int data_start;
- u_int ttl;
- u_short data_len;
- u_short flags;
+ guint ttl;
+ gushort data_len;
+ gushort flags;
proto_tree *rr_tree;
proto_item *trr;
char name_str[(NETBIOS_NAME_LEN - 1)*4 + 1];
- u_int num_names;
+ guint num_names;
char nbname[16+4+1]; /* 4 for [<last char>] */
- u_short name_flags;
+ gushort name_flags;
data_start = data_offset = offset;
cur_offset = offset;
diff --git a/packet-ncp.c b/packet-ncp.c
index 2283d02393..856fd78a10 100644
--- a/packet-ncp.c
+++ b/packet-ncp.c
@@ -3,7 +3,7 @@
* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net>
*
- * $Id: packet-ncp.c,v 1.64 2002/05/25 12:44:06 guy Exp $
+ * $Id: packet-ncp.c,v 1.65 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,14 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-ndmp.c b/packet-ndmp.c
index 955616dcbd..b81ad7020a 100644
--- a/packet-ndmp.c
+++ b/packet-ndmp.c
@@ -2,7 +2,7 @@
* Routines for NDMP dissection
* 2001 Ronnie Sahlberg (see AUTHORS for email)
*
- * $Id: packet-ndmp.c,v 1.20 2002/06/05 11:32:14 sahlberg Exp $
+ * $Id: packet-ndmp.c,v 1.21 2002/08/02 23:35:54 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,10 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-netbios.c b/packet-netbios.c
index 22b6ee9024..bf39a48fe4 100644
--- a/packet-netbios.c
+++ b/packet-netbios.c
@@ -5,7 +5,7 @@
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.c,v 1.49 2002/07/22 20:52:21 tpot Exp $
+ * $Id: packet-netbios.c,v 1.50 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,10 +30,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -254,11 +250,11 @@ void capture_netbios(packet_counts *ld)
int
-process_netbios_name(const u_char *name_ptr, char *name_ret)
+process_netbios_name(const guchar *name_ptr, char *name_ret)
{
int i;
int name_type = *(name_ptr + NETBIOS_NAME_LEN - 1);
- u_char name_char;
+ guchar name_char;
static const char hex_digits[16] = "0123456789abcdef";
for (i = 0; i < NETBIOS_NAME_LEN - 1; i++) {
@@ -627,7 +623,7 @@ static void dissect_netb_terminate_trace( tvbuff_t *tvb _U_, int offset _U_,
}
-static u_char zeroes[10];
+static guchar zeroes[10];
static void dissect_netb_datagram( tvbuff_t *tvb, int offset, proto_tree *tree)
diff --git a/packet-netbios.h b/packet-netbios.h
index 69f0303ae3..40ecbcc7f1 100644
--- a/packet-netbios.h
+++ b/packet-netbios.h
@@ -5,7 +5,7 @@
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.h,v 1.13 2002/04/24 06:03:34 guy Exp $
+ * $Id: packet-netbios.h,v 1.14 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,7 +34,7 @@
void capture_netbios(packet_counts *);
-extern int process_netbios_name(const u_char *name_ptr, char *name_ret);
+extern int process_netbios_name(const guchar *name_ptr, char *name_ret);
extern int get_netbios_name(tvbuff_t *tvb, int offset,
char *name_ret);
extern char *netbios_name_type_descr(int name_type);
diff --git a/packet-nfs.c b/packet-nfs.c
index 364095b2a7..33c58cf88e 100644
--- a/packet-nfs.c
+++ b/packet-nfs.c
@@ -2,7 +2,7 @@
* Routines for nfs dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
* Copyright 2000-2002, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
- * $Id: packet-nfs.c,v 1.73 2002/06/20 20:55:49 guy Exp $
+ * $Id: packet-nfs.c,v 1.74 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,10 +30,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
diff --git a/packet-nfsacl.c b/packet-nfsacl.c
index 12dc6d04f0..aa98d4d737 100644
--- a/packet-nfsacl.c
+++ b/packet-nfsacl.c
@@ -4,7 +4,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-nfsacl.c,v 1.2 2002/05/16 08:57:12 sahlberg Exp $
+ * $Id: packet-nfsacl.c,v 1.3 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,10 +30,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
diff --git a/packet-nfsauth.c b/packet-nfsauth.c
index bcd07676d5..2b0b4b7774 100644
--- a/packet-nfsauth.c
+++ b/packet-nfsauth.c
@@ -3,7 +3,7 @@
*
* Ronnie Sahlberg
*
- * $Id: packet-nfsauth.c,v 1.1 2002/05/16 08:51:17 sahlberg Exp $
+ * $Id: packet-nfsauth.c,v 1.2 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
diff --git a/packet-nisplus.c b/packet-nisplus.c
index bb0f28799d..033246bcaf 100644
--- a/packet-nisplus.c
+++ b/packet-nisplus.c
@@ -1,7 +1,7 @@
/* packet-nisplus.c
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
- * $Id: packet-nisplus.c,v 1.11 2002/04/03 13:24:12 girlich Exp $
+ * $Id: packet-nisplus.c,v 1.12 2002/08/02 23:35:55 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 <time.h>
#include "packet-rpc.h"
diff --git a/packet-nlm.c b/packet-nlm.c
index afb5a5186e..17154de517 100644
--- a/packet-nlm.c
+++ b/packet-nlm.c
@@ -1,7 +1,7 @@
/* packet-nlm.c
* Routines for nlm dissection
*
- * $Id: packet-nlm.c,v 1.27 2002/05/21 10:17:27 sahlberg Exp $
+ * $Id: packet-nlm.c,v 1.28 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,10 +36,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-nfs.h"
diff --git a/packet-nntp.c b/packet-nntp.c
index 7f78efd2d9..f492f5791f 100644
--- a/packet-nntp.c
+++ b/packet-nntp.c
@@ -2,7 +2,7 @@
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-nntp.c,v 1.25 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-nntp.c,v 1.26 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,14 +29,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-ntlmssp.c b/packet-ntlmssp.c
index 01e090a5c5..366ca3f944 100644
--- a/packet-ntlmssp.c
+++ b/packet-ntlmssp.c
@@ -2,7 +2,7 @@
* Routines for NTLM Secure Service Provider
* Devin Heitmueller <dheitmueller@netilla.com>
*
- * $Id: packet-ntlmssp.c,v 1.3 2002/07/10 06:17:55 guy Exp $
+ * $Id: packet-ntlmssp.c,v 1.4 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-ntp.c b/packet-ntp.c
index a01f30227e..4ca885e1f2 100644
--- a/packet-ntp.c
+++ b/packet-ntp.c
@@ -2,7 +2,7 @@
* Routines for NTP packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-ntp.c,v 1.35 2002/04/02 01:32:46 guy Exp $
+ * $Id: packet-ntp.c,v 1.36 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <time.h>
#include <math.h>
diff --git a/packet-null.c b/packet-null.c
index 8d0974592a..75c2146d44 100644
--- a/packet-null.c
+++ b/packet-null.c
@@ -1,7 +1,7 @@
/* packet-null.c
* Routines for null packet disassembly
*
- * $Id: packet-null.c,v 1.53 2002/07/30 07:25:29 guy Exp $
+ * $Id: packet-null.c,v 1.54 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <glib.h>
#ifdef HAVE_SYS_SOCKET_H
@@ -75,7 +71,7 @@ static const value_string family_vals[] = {
static dissector_handle_t ppp_hdlc_handle;
static dissector_handle_t data_handle;
void
-capture_null( const u_char *pd, int len, packet_counts *ld )
+capture_null( const guchar *pd, int len, packet_counts *ld )
{
guint32 null_header;
diff --git a/packet-null.h b/packet-null.h
index a1b387e380..ebfbacdb26 100644
--- a/packet-null.h
+++ b/packet-null.h
@@ -1,6 +1,6 @@
/* packet-null.h
*
- * $Id: packet-null.h,v 1.5 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-null.h,v 1.6 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_NULL_H__
#define __PACKET_NULL_H__
-void capture_null(const u_char *, int, packet_counts *);
+void capture_null(const guchar *, int, packet_counts *);
#endif
diff --git a/packet-osi-options.c b/packet-osi-options.c
index 0f950a9e32..46bba99d42 100644
--- a/packet-osi-options.c
+++ b/packet-osi-options.c
@@ -5,7 +5,7 @@
* ISO 10589 ISIS (Intradomain Routing Information Exchange Protocol)
* ISO 9542 ESIS (End System To Intermediate System Routing Exchange Protocol)
*
- * $Id: packet-osi-options.c,v 1.12 2002/04/30 23:56:58 guy Exp $
+ * $Id: packet-osi-options.c,v 1.13 2002/08/02 23:35:55 jmayer Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@@ -31,10 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -166,10 +162,10 @@ static const value_string osi_opt_rfd_reassembly[] = {
static void
-dissect_option_qos( const u_char type, const u_char sub_type, int offset,
- u_char len, tvbuff_t *tvb, proto_tree *tree ) {
+dissect_option_qos( const guchar type, const guchar sub_type, int offset,
+ guchar len, tvbuff_t *tvb, proto_tree *tree ) {
- u_char tmp_type = 0;
+ guchar tmp_type = 0;
proto_item *ti;
proto_tree *osi_qos_tree = NULL;
@@ -217,14 +213,14 @@ dissect_option_qos( const u_char type, const u_char sub_type, int offset,
}
static void
-dissect_option_route( u_char parm_type, u_char offset, u_char parm_len,
+dissect_option_route( guchar parm_type, guchar offset, guchar parm_len,
tvbuff_t *tvb, proto_tree *tree ) {
- u_char next_hop = 0;
- u_char this_hop = 0;
- u_char netl = 0;
- u_char last_hop = 0;
- u_char cnt_hops = 0;
+ guchar next_hop = 0;
+ guchar this_hop = 0;
+ guchar netl = 0;
+ guchar last_hop = 0;
+ guchar cnt_hops = 0;
proto_item *ti;
proto_tree *osi_route_tree = NULL;
@@ -278,9 +274,9 @@ dissect_option_route( u_char parm_type, u_char offset, u_char parm_len,
static void
-dissect_option_rfd( const u_char error, const u_char field, u_char offset,
- u_char len, tvbuff_t *tvb, proto_tree *tree ) {
- u_char error_class = 0;
+dissect_option_rfd( const guchar error, const guchar field, guchar offset,
+ guchar len, tvbuff_t *tvb, proto_tree *tree ) {
+ guchar error_class = 0;
char *format_string[] =
{ "Reason for discard {General} : %s, in field %u",
"Reason for discard {Address} : %s, in field %u",
@@ -338,7 +334,7 @@ dissect_option_rfd( const u_char error, const u_char field, u_char offset,
* main esis tree data and call the sub-protocols as needed.
*
* Input:
- * u_char : length of option section
+ * guchar : length of option section
* tvbuff_t * : tvbuff containing packet data
* int : offset into packet where we are (packet_data[offset]== start
* of what we care about)
@@ -348,12 +344,12 @@ dissect_option_rfd( const u_char error, const u_char field, u_char offset,
* void, but we will add to the proto_tree if it is not NULL.
*/
void
-dissect_osi_options( u_char opt_len, tvbuff_t *tvb,
+dissect_osi_options( guchar opt_len, tvbuff_t *tvb,
int offset, proto_tree *tree) {
proto_item *ti;
proto_tree *osi_option_tree = NULL;
- u_char parm_len = 0;
- u_char parm_type = 0;
+ guchar parm_len = 0;
+ guchar parm_type = 0;
guint8 octet;
if (tree) {
diff --git a/packet-osi-options.h b/packet-osi-options.h
index ec58117d8a..afe5ef7850 100644
--- a/packet-osi-options.h
+++ b/packet-osi-options.h
@@ -1,7 +1,7 @@
/* packet-osi-options.h
* Defines for OSI options part decode
*
- * $Id: packet-osi-options.h,v 1.4 2002/04/30 23:56:58 guy Exp $
+ * $Id: packet-osi-options.h,v 1.5 2002/08/02 23:35:55 jmayer Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@@ -29,7 +29,7 @@
/*
* published API functions
*/
-extern void dissect_osi_options( u_char, tvbuff_t *, int,
+extern void dissect_osi_options( guchar, tvbuff_t *, int,
proto_tree *);
extern void proto_register_osi_options(void);
diff --git a/packet-osi.c b/packet-osi.c
index 9f74a75309..643bba0a41 100644
--- a/packet-osi.c
+++ b/packet-osi.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: packet-osi.c,v 1.53 2002/01/21 07:36:38 guy Exp $
+ * $Id: packet-osi.c,v 1.54 2002/08/02 23:35:55 jmayer Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -29,10 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -48,13 +44,13 @@
cksum_status_t
-calc_checksum( tvbuff_t *tvb, int offset, u_int len, u_int checksum) {
+calc_checksum( tvbuff_t *tvb, int offset, guint len, guint checksum) {
const gchar *buffer;
guint available_len;
const guint8 *p;
guint32 c0, c1;
- u_int seglen;
- u_int i;
+ guint seglen;
+ guint i;
if ( 0 == checksum )
return( NO_CKSUM );
diff --git a/packet-osi.h b/packet-osi.h
index fa13284552..b929e02cfc 100644
--- a/packet-osi.h
+++ b/packet-osi.h
@@ -1,6 +1,6 @@
/* packet-osi.h
*
- * $Id: packet-osi.h,v 1.10 2002/02/28 19:24:24 gram Exp $
+ * $Id: packet-osi.h,v 1.11 2002/08/02 23:35:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -91,6 +91,6 @@ typedef enum {
CKSUM_NOT_OK /* checksum is not OK */
} cksum_status_t;
-extern cksum_status_t calc_checksum(tvbuff_t *, int, u_int, u_int);
+extern cksum_status_t calc_checksum(tvbuff_t *, int, guint, guint);
#endif /* _PACKET_OSI_H */
diff --git a/packet-ospf.c b/packet-ospf.c
index 9844fffe62..5059a01d79 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.68 2002/05/30 05:26:05 guy Exp $
+ * $Id: packet-ospf.c,v 1.69 2002/08/02 23:35:55 jmayer Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -36,14 +36,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
@@ -523,8 +515,8 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(ospflen);
- phdr[1] = htonl(IP_PROTO_OSPF);
+ phdr[0] = g_htonl(ospflen);
+ phdr[1] = g_htonl(IP_PROTO_OSPF);
cksum_vec[2].len = 8;
cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, reported_length);
diff --git a/packet-pcnfsd.c b/packet-pcnfsd.c
index 93e36681c2..ce79d28ac9 100644
--- a/packet-pcnfsd.c
+++ b/packet-pcnfsd.c
@@ -1,7 +1,7 @@
/* packet-pcnfsd.c
* Routines for PCNFSD dissection
*
- * $Id: packet-pcnfsd.c,v 1.8 2002/05/14 21:22:39 guy Exp $
+ * $Id: packet-pcnfsd.c,v 1.9 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,10 +35,6 @@ Protocol information comes from the book
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include "packet-rpc.h"
diff --git a/packet-pflog.c b/packet-pflog.c
index ee7ccfb46e..4a4bd60fa7 100644
--- a/packet-pflog.c
+++ b/packet-pflog.c
@@ -1,7 +1,7 @@
/* packet-pflog.c
* Routines for pflog (OpenBSD Firewall Logging) packet disassembly
*
- * $Id: packet-pflog.c,v 1.5 2002/07/15 20:55:51 guy Exp $
+ * $Id: packet-pflog.c,v 1.6 2002/08/02 23:35:56 jmayer Exp $
*
* Copyright 2001 Mike Frantzen
* All rights reserved.
@@ -32,10 +32,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -64,7 +60,7 @@ static int hf_pflog_dir = -1;
static gint ett_pflog = -1;
void
-capture_pflog(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_pflog(const guchar *pd, int offset, int len, packet_counts *ld)
{
struct pfloghdr pflogh;
diff --git a/packet-pgm.c b/packet-pgm.c
index b41fdb4064..5756209b02 100644
--- a/packet-pgm.c
+++ b/packet-pgm.c
@@ -1,7 +1,7 @@
/* packet-pgm.c
* Routines for pgm packet disassembly
*
- * $Id: packet-pgm.c,v 1.16 2002/04/29 08:20:09 guy Exp $
+ * $Id: packet-pgm.c,v 1.17 2002/08/02 23:35:56 jmayer Exp $
*
* Copyright (c) 2000 by Talarian Corp
*
@@ -28,18 +28,10 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -73,12 +65,12 @@ typedef struct {
nshort_t tsdulen; /* TSDU length */
} pgm_type;
#define pgmhdr_ntoh(_p) \
- (_p)->sport = ntohs((_p)->sport); \
- (_p)->dport = ntohs((_p)->dport); \
- (_p)->type = ntohs((_p)->type); \
- (_p)->opts = ntohs((_p)->opts); \
- (_p)->cksum = ntohs((_p)->cksum); \
- (_p)->tsdulen = ntohs((_p)->tsdulen)
+ (_p)->sport = g_ntohs((_p)->sport); \
+ (_p)->dport = g_ntohs((_p)->dport); \
+ (_p)->type = g_ntohs((_p)->type); \
+ (_p)->opts = g_ntohs((_p)->opts); \
+ (_p)->cksum = g_ntohs((_p)->cksum); \
+ (_p)->tsdulen = g_ntohs((_p)->tsdulen)
/* The PGM SPM header */
typedef struct {
@@ -91,11 +83,11 @@ typedef struct {
} pgm_spm_t;
static const size_t PGM_SPM_SZ = sizeof(pgm_type)+sizeof(pgm_spm_t);
#define spm_ntoh(_p) \
- (_p)->sqn = ntohl((_p)->sqn); \
- (_p)->trail = ntohl((_p)->trail); \
- (_p)->lead = ntohl((_p)->lead); \
- (_p)->path_afi = ntohs((_p)->path_afi); \
- (_p)->res = ntohs((_p)->res);
+ (_p)->sqn = g_ntohl((_p)->sqn); \
+ (_p)->trail = g_ntohl((_p)->trail); \
+ (_p)->lead = g_ntohl((_p)->lead); \
+ (_p)->path_afi = g_ntohs((_p)->path_afi); \
+ (_p)->res = g_ntohs((_p)->res);
/* The PGM Data (ODATA/RDATA) header */
typedef struct {
@@ -103,8 +95,8 @@ typedef struct {
nlong_t trail; /* Trailing edge sequence number */
} pgm_data_t;
#define data_ntoh(_p) \
- (_p)->sqn = ntohl((_p)->sqn); \
- (_p)->trail = ntohl((_p)->trail)
+ (_p)->sqn = g_ntohl((_p)->sqn); \
+ (_p)->trail = g_ntohl((_p)->trail)
static const size_t PGM_DATA_HDR_SZ = sizeof(pgm_type)+sizeof(pgm_data_t);
/* The PGM NAK (NAK/N-NAK/NCF) header */
@@ -119,11 +111,11 @@ typedef struct {
} pgm_nak_t;
static const size_t PGM_NAK_SZ = sizeof(pgm_type)+sizeof(pgm_nak_t);
#define nak_ntoh(_p) \
- (_p)->sqn = ntohl((_p)->sqn); \
- (_p)->src_afi = ntohs((_p)->src_afi); \
- (_p)->src_res = ntohs((_p)->src_res); \
- (_p)->grp_afi = ntohs((_p)->grp_afi); \
- (_p)->grp_res = ntohs((_p)->grp_res)
+ (_p)->sqn = g_ntohl((_p)->sqn); \
+ (_p)->src_afi = g_ntohs((_p)->src_afi); \
+ (_p)->src_res = g_ntohs((_p)->src_res); \
+ (_p)->grp_afi = g_ntohs((_p)->grp_afi); \
+ (_p)->grp_res = g_ntohs((_p)->grp_res)
/* The PGM ACK header (PGMCC) */
typedef struct {
@@ -132,8 +124,8 @@ typedef struct {
} pgm_ack_t;
static const size_t PGM_ACK_SZ = sizeof(pgm_type)+sizeof(pgm_ack_t);
#define ack_ntoh(_p) \
- (_p)->rx_max_sqn = ntohl((_p)->rx_max_sqn); \
- (_p)->bitmap = ntohl((_p)->bitmap)
+ (_p)->rx_max_sqn = g_ntohl((_p)->rx_max_sqn); \
+ (_p)->bitmap = g_ntohl((_p)->bitmap)
/* constants for hdr types */
#if defined(PGM_SPEC_01_PCKTS)
@@ -484,7 +476,7 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
int theend = 0, firsttime = 1;
tvb_memcpy(tvb, (guint8 *)&opts, offset, sizeof(opts));
- opts.total_len = ntohs(opts.total_len);
+ opts.total_len = g_ntohs(opts.total_len);
tf = proto_tree_add_text(tree, tvb, offset,
opts.total_len,
@@ -531,7 +523,7 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
offset+3, 1, optdata.res);
proto_tree_add_uint(opt_tree, hf_pgm_opt_join_minjoin, tvb,
- offset+4, 4, ntohl(optdata.opt_join_min));
+ offset+4, 4, g_ntohl(optdata.opt_join_min));
break;
}
@@ -555,7 +547,7 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
paritystr(optdata.po), optdata.po);
proto_tree_add_uint(opt_tree, hf_pgm_opt_parity_prm_prmtgsz,
- tvb, offset+4, 4, ntohl(optdata.prm_tgsz));
+ tvb, offset+4, 4, g_ntohl(optdata.prm_tgsz));
break;
}
@@ -578,7 +570,7 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
offset+3, 1, optdata.res);
proto_tree_add_uint(opt_tree, hf_pgm_opt_parity_grp_prmgrp,
- tvb, offset+4, 4, ntohl(optdata.prm_grp));
+ tvb, offset+4, 4, g_ntohl(optdata.prm_grp));
break;
}
@@ -613,7 +605,7 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
*/
for (i=0; i < naks; i++) {
sprintf(nakbuf+soffset, "0x%lx ",
- (unsigned long)ntohl(naklist[i]));
+ (unsigned long)g_ntohl(naklist[i]));
soffset = strlen(nakbuf);
if ((++j % 8) == 0) {
if (firsttime) {
@@ -667,12 +659,12 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
offset+4, 4, optdata.tsp);
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccdata_afi, tvb,
- offset+8, 2, ntohs(optdata.acker_afi));
+ offset+8, 2, g_ntohs(optdata.acker_afi));
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccdata_res2, tvb,
- offset+10, 2, ntohs(optdata.res2));
+ offset+10, 2, g_ntohs(optdata.res2));
- switch (ntohs(optdata.acker_afi)) {
+ switch (g_ntohs(optdata.acker_afi)) {
case AFNUM_INET:
proto_tree_add_ipv4(opt_tree, hf_pgm_opt_ccdata_acker,
@@ -716,12 +708,12 @@ dissect_pgmopts(tvbuff_t *tvb, int offset, proto_tree *tree,
offset+4, 4, optdata.tsp);
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccfeedbk_afi, tvb,
- offset+8, 2, ntohs(optdata.acker_afi));
+ offset+8, 2, g_ntohs(optdata.acker_afi));
proto_tree_add_uint(opt_tree, hf_pgm_opt_ccfeedbk_lossrate, tvb,
- offset+10, 2, ntohs(optdata.loss_rate));
+ offset+10, 2, g_ntohs(optdata.loss_rate));
- switch (ntohs(optdata.acker_afi)) {
+ switch (g_ntohs(optdata.acker_afi)) {
case AFNUM_INET:
proto_tree_add_ipv4(opt_tree, hf_pgm_opt_ccfeedbk_acker,
@@ -820,7 +812,7 @@ total_size(tvbuff_t *tvb, pgm_type *hdr)
}
if ((hdr->opts & PGM_OPT)) {
tvb_memcpy(tvb, (guint8 *)&opts, bytes, sizeof(opts));
- bytes += ntohs(opts.total_len);
+ bytes += g_ntohs(opts.total_len);
}
return(bytes);
}
@@ -855,9 +847,9 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_memcpy(tvb, (guint8 *)&pgmhdr, offset, sizeof(pgm_type));
hlen = sizeof(pgm_type);
- pgmhdr.sport = ntohs(pgmhdr.sport);
- pgmhdr.dport = ntohs(pgmhdr.dport);
- pgmhdr.tsdulen = ntohs(pgmhdr.tsdulen);
+ pgmhdr.sport = g_ntohs(pgmhdr.sport);
+ pgmhdr.dport = g_ntohs(pgmhdr.dport);
+ pgmhdr.tsdulen = g_ntohs(pgmhdr.tsdulen);
pktname = val_to_str(pgmhdr.type, type_vals, "Unknown (0x%02x)");
diff --git a/packet-pim.c b/packet-pim.c
index 480410dd7b..3639856758 100644
--- a/packet-pim.c
+++ b/packet-pim.c
@@ -2,7 +2,7 @@
* Routines for PIM disassembly
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-pim.c,v 1.40 2002/04/22 07:41:32 guy Exp $
+ * $Id: packet-pim.c,v 1.41 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,14 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stddef.h> /* For offsetof */
#include <string.h>
#include <glib.h>
@@ -702,8 +694,8 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(pim_length);
- phdr[1] = htonl(IP_PROTO_PIM);
+ phdr[0] = g_htonl(pim_length);
+ phdr[1] = g_htonl(IP_PROTO_PIM);
cksum_vec[2].len = 8;
cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, pim_length);
cksum_vec[3].len = pim_length;
diff --git a/packet-pop.c b/packet-pop.c
index 4bfb96a775..5b7227249a 100644
--- a/packet-pop.c
+++ b/packet-pop.c
@@ -2,7 +2,7 @@
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-pop.c,v 1.31 2002/07/17 06:55:19 guy Exp $
+ * $Id: packet-pop.c,v 1.32 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -54,7 +46,7 @@ static dissector_handle_t data_handle;
#define TCP_PORT_POP 110
-static gboolean response_is_continuation(const u_char *data);
+static gboolean response_is_continuation(const guchar *data);
static void
dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -64,11 +56,11 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *pop_tree;
proto_item *ti;
gint offset = 0;
- const u_char *line;
+ const guchar *line;
gint next_offset;
int linelen;
int tokenlen;
- const u_char *next_token;
+ const guchar *next_token;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "POP");
@@ -186,7 +178,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
-static gboolean response_is_continuation(const u_char *data)
+static gboolean response_is_continuation(const guchar *data)
{
if (strncmp(data, "+OK", strlen("+OK")) == 0)
return FALSE;
diff --git a/packet-portmap.c b/packet-portmap.c
index f5ce917ed4..b245d7641a 100644
--- a/packet-portmap.c
+++ b/packet-portmap.c
@@ -1,7 +1,7 @@
/* packet-portmap.c
* Routines for portmap dissection
*
- * $Id: packet-portmap.c,v 1.37 2002/05/11 18:52:55 guy Exp $
+ * $Id: packet-portmap.c,v 1.38 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-portmap.h"
diff --git a/packet-ppp.c b/packet-ppp.c
index a3688b10ea..f28a173e2f 100644
--- a/packet-ppp.c
+++ b/packet-ppp.c
@@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
- * $Id: packet-ppp.c,v 1.93 2002/05/22 09:52:14 guy Exp $
+ * $Id: packet-ppp.c,v 1.94 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include "prefs.h"
@@ -1334,7 +1330,7 @@ fcs32(guint32 fcs, tvbuff_t * tvbuff)
}
void
-capture_ppp_hdlc( const u_char *pd, int offset, int len, packet_counts *ld ) {
+capture_ppp_hdlc( const guchar *pd, int offset, int len, packet_counts *ld ) {
if (!BYTES_ARE_IN_FRAME(offset, len, 2)) {
ld->other++;
return;
diff --git a/packet-ppp.h b/packet-ppp.h
index a0451e8b08..8640ecd83d 100644
--- a/packet-ppp.h
+++ b/packet-ppp.h
@@ -1,6 +1,6 @@
/* packet-ppp.h
*
- * $Id: packet-ppp.h,v 1.9 2001/12/19 21:14:49 guy Exp $
+ * $Id: packet-ppp.h,v 1.10 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,6 +27,6 @@
/* PPP options */
extern gboolean ppp_vj_decomp;/* FALSE = No VJ header decompression,
TRUE = Decompress VJ */
-void capture_ppp_hdlc(const u_char *, int, int, packet_counts *);
+void capture_ppp_hdlc(const guchar *, int, int, packet_counts *);
#endif
diff --git a/packet-pppoe.c b/packet-pppoe.c
index 3e69fc3bd0..6209e84926 100644
--- a/packet-pppoe.c
+++ b/packet-pppoe.c
@@ -1,7 +1,7 @@
/* packet-pppoe.c
* Routines for PPP Over Ethernet (PPPoE) packet disassembly (RFC2516)
*
- * $Id: packet-pppoe.c,v 1.22 2002/05/01 07:54:08 guy Exp $
+ * $Id: packet-pppoe.c,v 1.23 2002/08/02 23:35:56 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 <glib.h>
#include <epan/packet.h>
#include <epan/strutil.h>
diff --git a/packet-pptp.c b/packet-pptp.c
index 1f8bb7c3c0..a1b9eb1fc7 100644
--- a/packet-pptp.c
+++ b/packet-pptp.c
@@ -2,7 +2,7 @@
* Routines for the Point-to-Point Tunnelling Protocol (PPTP) (RFC 2637)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-pptp.c,v 1.24 2002/05/01 08:08:01 guy Exp $
+ * $Id: packet-pptp.c,v 1.25 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,16 +27,8 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-prism.c b/packet-prism.c
index 0de8b4e8ca..ece8002dd8 100644
--- a/packet-prism.c
+++ b/packet-prism.c
@@ -9,7 +9,7 @@
*
* By Tim Newsham
*
- * $Id: packet-prism.c,v 1.6 2002/01/21 07:36:38 guy Exp $
+ * $Id: packet-prism.c,v 1.7 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,10 +36,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -86,7 +82,7 @@ static gint ett_prism = -1;
static dissector_handle_t ieee80211_handle;
void
-capture_prism(const u_char *pd, int offset, int len, packet_counts *ld)
+capture_prism(const guchar *pd, int offset, int len, packet_counts *ld)
{
if(!BYTES_ARE_IN_FRAME(offset, len, (int)sizeof(struct prism_hdr))) {
ld->other ++;
diff --git a/packet-prism.h b/packet-prism.h
index f17cd190ff..eeadc0e614 100644
--- a/packet-prism.h
+++ b/packet-prism.h
@@ -9,7 +9,7 @@
*
* By Tim Newsham
*
- * $Id: packet-prism.h,v 1.1 2001/11/28 07:11:07 guy Exp $
+ * $Id: packet-prism.h,v 1.2 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,6 +32,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-void capture_prism(const u_char *pd, int offset, int len, packet_counts *ld);
+void capture_prism(const guchar *pd, int offset, int len, packet_counts *ld);
void proto_register_prism(void);
void proto_reg_handoff_prism(void);
diff --git a/packet-q2931.c b/packet-q2931.c
index 4a0c49fb21..1c423878cf 100644
--- a/packet-q2931.c
+++ b/packet-q2931.c
@@ -2,7 +2,7 @@
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q2931.c,v 1.27 2002/05/28 23:29:25 guy Exp $
+ * $Id: packet-q2931.c,v 1.28 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-q931.c b/packet-q931.c
index 7dcafd271d..f0833764e9 100644
--- a/packet-q931.c
+++ b/packet-q931.c
@@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q931.c,v 1.44 2002/05/14 09:24:26 guy Exp $
+ * $Id: packet-q931.c,v 1.45 2002/08/02 23:35:56 jmayer Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
@@ -29,10 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-qllc.c b/packet-qllc.c
index b202b4b1b3..c36bfc39e7 100644
--- a/packet-qllc.c
+++ b/packet-qllc.c
@@ -2,7 +2,7 @@
* Routines for QLLC protocol - Qualified? LLC
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-qllc.c,v 1.5 2002/01/24 09:20:50 guy Exp $
+ * $Id: packet-qllc.c,v 1.6 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-quake.c b/packet-quake.c
index 44d6060075..f18a0c5a60 100644
--- a/packet-quake.c
+++ b/packet-quake.c
@@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quake.c,v 1.26 2002/04/02 06:28:16 girlich Exp $
+ * $Id: packet-quake.c,v 1.27 2002/08/02 23:35:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
diff --git a/packet-quake2.c b/packet-quake2.c
index 636f1d7617..7fc3206469 100644
--- a/packet-quake2.c
+++ b/packet-quake2.c
@@ -7,7 +7,7 @@
* http://www.dgs.monash.edu.au/~timf/bottim/
* http://www.opt-sci.Arizona.EDU/Pandora/default.asp
*
- * $Id: packet-quake2.c,v 1.11 2002/07/29 09:28:28 girlich Exp $
+ * $Id: packet-quake2.c,v 1.12 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,10 +34,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "prefs.h"
diff --git a/packet-quake3.c b/packet-quake3.c
index e8d2a0c578..fd39ebb1b1 100644
--- a/packet-quake3.c
+++ b/packet-quake3.c
@@ -3,7 +3,7 @@
*
* Uwe Girlich <uwe@planetquake.com>
*
- * $Id: packet-quake3.c,v 1.12 2002/04/02 06:28:16 girlich Exp $
+ * $Id: packet-quake3.c,v 1.13 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -41,10 +41,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-quakeworld.c b/packet-quakeworld.c
index 3ec2730fc9..88cc93278b 100644
--- a/packet-quakeworld.c
+++ b/packet-quakeworld.c
@@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quakeworld.c,v 1.14 2002/06/09 21:25:47 guy Exp $
+ * $Id: packet-quakeworld.c,v 1.15 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,10 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
diff --git a/packet-radius.c b/packet-radius.c
index d5c22de035..847e2d0ed0 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -4,7 +4,7 @@
*
* RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
*
- * $Id: packet-radius.c,v 1.65 2002/07/17 01:02:45 guy Exp $
+ * $Id: packet-radius.c,v 1.66 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,14 +29,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -2829,7 +2821,7 @@ static void dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
rhcode= (int)rh.rh_code;
rhident= (int)rh.rh_ident;
- rhlength= (int)ntohs(rh.rh_pktlength);
+ rhlength= (int)g_ntohs(rh.rh_pktlength);
codestrval= match_strval(rhcode,radius_vals);
if (codestrval==NULL)
{
diff --git a/packet-ranap.c b/packet-ranap.c
index 8a6f93c183..d5d8f46786 100644
--- a/packet-ranap.c
+++ b/packet-ranap.c
@@ -3,7 +3,7 @@
* Based on 3GPP TS 25.413 V3.4.0
* Copyright 2001, Martin Held <Martin.Held@icn.siemens.de>
*
- * $Id: packet-ranap.c,v 1.13 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-ranap.c,v 1.14 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,14 +34,6 @@
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-raw.c b/packet-raw.c
index 8eaa66a1f1..8931192511 100644
--- a/packet-raw.c
+++ b/packet-raw.c
@@ -1,7 +1,7 @@
/* packet-raw.c
* Routines for raw packet disassembly
*
- * $Id: packet-raw.c,v 1.33 2002/02/05 00:09:45 guy Exp $
+ * $Id: packet-raw.c,v 1.34 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -50,7 +46,7 @@ static dissector_handle_t data_handle;
static dissector_handle_t ppp_hdlc_handle;
void
-capture_raw(const u_char *pd, int len, packet_counts *ld)
+capture_raw(const guchar *pd, int len, packet_counts *ld)
{
/* So far, the only time we get raw connection types are with Linux and
* Irix PPP connections. We can't tell what type of data is coming down
diff --git a/packet-raw.h b/packet-raw.h
index 1fcfb878bf..4246132036 100644
--- a/packet-raw.h
+++ b/packet-raw.h
@@ -1,6 +1,6 @@
/* packet-raw.h
*
- * $Id: packet-raw.h,v 1.5 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-raw.h,v 1.6 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_RAW_H__
#define __PACKET_RAW_H__
-void capture_raw(const u_char *, int, packet_counts *);
+void capture_raw(const guchar *, int, packet_counts *);
#endif
diff --git a/packet-rip.c b/packet-rip.c
index 1e536147df..ee268ada9a 100644
--- a/packet-rip.c
+++ b/packet-rip.c
@@ -3,7 +3,7 @@
* RFC1058, RFC2453
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-rip.c,v 1.31 2002/04/04 23:20:33 guy Exp $
+ * $Id: packet-rip.c,v 1.32 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,14 +26,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-ripng.c b/packet-ripng.c
index 0e136e1ba0..51af46f4cc 100644
--- a/packet-ripng.c
+++ b/packet-ripng.c
@@ -3,7 +3,7 @@
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
- * $Id: packet-ripng.c,v 1.25 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-ripng.c,v 1.26 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,14 +26,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -99,7 +91,7 @@ dissect_ripng(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
ip6_to_str(&ni6.rip6_dest),
ni6.rip6_plen,
ni6.rip6_metric,
- ntohs(ni6.rip6_tag));
+ g_ntohs(ni6.rip6_tag));
} else {
ti = proto_tree_add_text(ripng_tree, tvb, offset,
sizeof(ni6), "IP Address: %s/%u, Metric: %u",
@@ -115,7 +107,7 @@ dissect_ripng(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_text(subtree, tvb,
offset + offsetof(struct netinfo6, rip6_tag),
sizeof(ni6.rip6_tag), "Tag: 0x%04x",
- ntohs(ni6.rip6_tag));
+ g_ntohs(ni6.rip6_tag));
proto_tree_add_text(subtree, tvb,
offset + offsetof(struct netinfo6, rip6_plen),
sizeof(ni6.rip6_plen), "Prefix length: %u",
diff --git a/packet-ripng.h b/packet-ripng.h
index 518a147825..91ecfa0588 100644
--- a/packet-ripng.h
+++ b/packet-ripng.h
@@ -2,7 +2,7 @@
* RIPng definition
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-ripng.h,v 1.4 2000/08/11 13:34:28 deniel Exp $
+ * $Id: packet-ripng.h,v 1.5 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -70,15 +70,15 @@
struct netinfo6 {
struct e_in6_addr rip6_dest;
- u_short rip6_tag;
- u_char rip6_plen;
- u_char rip6_metric;
+ gushort rip6_tag;
+ guchar rip6_plen;
+ guchar rip6_metric;
};
struct rip6 {
- u_char rip6_cmd;
- u_char rip6_vers;
- u_char rip6_res1[2];
+ guchar rip6_cmd;
+ guchar rip6_vers;
+ guchar rip6_res1[2];
union {
struct netinfo6 ru6_nets[1];
char ru6_tracefile[1];
diff --git a/packet-rlogin.c b/packet-rlogin.c
index 1b36be4d72..e49fbcc582 100644
--- a/packet-rlogin.c
+++ b/packet-rlogin.c
@@ -2,7 +2,7 @@
* Routines for unix rlogin packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-rlogin.c,v 1.26 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-rlogin.c,v 1.27 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,14 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-rmi.c b/packet-rmi.c
index 3a630bcfc7..34ed1a3793 100644
--- a/packet-rmi.c
+++ b/packet-rmi.c
@@ -2,7 +2,7 @@
* Routines for java rmiregistry dissection
* Copyright 2002, Michael Stiller <ms@2scale.net>
*
- * $Id: packet-rmi.c,v 1.3 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-rmi.c,v 1.4 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -89,7 +81,7 @@ dissect_rmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint offset;
gint next_offset;
int datalen;
- const u_char *data;
+ const guchar *data;
guint16 version, len, port;
guint8 message, proto;
@@ -251,7 +243,7 @@ dissect_ser(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
static rmi_type
-get_rmi_type(const u_char *data, int datalen)
+get_rmi_type(const guchar *data, int datalen)
{
guint16 ser_magic;
diff --git a/packet-rmi.h b/packet-rmi.h
index 0b404712cb..f62cd90f85 100644
--- a/packet-rmi.h
+++ b/packet-rmi.h
@@ -2,7 +2,7 @@
* header file for java rmiregistry dissection
* Copyright 2002, Michael Stiller <ms@2scale.net>
*
- * $Id: packet-rmi.h,v 1.1 2002/05/29 18:52:26 guy Exp $
+ * $Id: packet-rmi.h,v 1.2 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -95,6 +95,6 @@ static void
dissect_ser(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static rmi_type
-get_rmi_type(const u_char *data, int datalen);
+get_rmi_type(const guchar *data, int datalen);
#endif
diff --git a/packet-rpc.c b/packet-rpc.c
index 107836cd3d..8431d02dc4 100644
--- a/packet-rpc.c
+++ b/packet-rpc.c
@@ -2,7 +2,7 @@
* Routines for rpc dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
- * $Id: packet-rpc.c,v 1.97 2002/06/07 10:11:39 guy Exp $
+ * $Id: packet-rpc.c,v 1.98 2002/08/02 23:35:57 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 <glib.h>
#include <stdio.h>
#include <string.h>
diff --git a/packet-rquota.c b/packet-rquota.c
index 6616711a7f..43acbe8b82 100644
--- a/packet-rquota.c
+++ b/packet-rquota.c
@@ -2,7 +2,7 @@
* Routines for rquota dissection
* Copyright 2001, Mike Frisch <frisch@hummingbird.com>
*
- * $Id: packet-rquota.c,v 1.7 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-rquota.c,v 1.8 2002/08/02 23:35:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,10 +30,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-rquota.h"
diff --git a/packet-rsh.c b/packet-rsh.c
index 1e760c8d16..93de7a561a 100644
--- a/packet-rsh.c
+++ b/packet-rsh.c
@@ -4,7 +4,7 @@
* Robert Tsai <rtsai@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rsh.c,v 1.18 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-rsh.c,v 1.19 2002/08/02 23:35:58 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 <glib.h>
#include <epan/packet.h>
#include <epan/strutil.h>
diff --git a/packet-rstat.c b/packet-rstat.c
index 29d733df2a..92ddd24d35 100644
--- a/packet-rstat.c
+++ b/packet-rstat.c
@@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rstat.c,v 1.1 2002/05/15 07:21:41 guy Exp $
+ * $Id: packet-rstat.c,v 1.2 2002/08/02 23:35:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
diff --git a/packet-rsvp.c b/packet-rsvp.c
index c1f76a4a82..86c884083e 100644
--- a/packet-rsvp.c
+++ b/packet-rsvp.c
@@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: packet-rsvp.c,v 1.71 2002/07/31 10:10:44 guy Exp $
+ * $Id: packet-rsvp.c,v 1.72 2002/08/02 23:35:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,14 +52,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#ifdef NEED_SNPRINTF_H
diff --git a/packet-rtcp.c b/packet-rtcp.c
index 351f2ebed0..b1efa55c49 100644
--- a/packet-rtcp.c
+++ b/packet-rtcp.c
@@ -1,6 +1,6 @@
/* packet-rtcp.c
*
- * $Id: packet-rtcp.c,v 1.33 2002/07/17 10:37:31 guy Exp $
+ * $Id: packet-rtcp.c,v 1.34 2002/08/02 23:35:59 jmayer Exp $
*
* Routines for RTCP dissection
* RTCP = Real-time Transport Control Protocol
@@ -46,14 +46,6 @@
#include <glib.h>
#include <epan/packet.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
diff --git a/packet-rtp.c b/packet-rtp.c
index be37628d79..6e353836b6 100644
--- a/packet-rtp.c
+++ b/packet-rtp.c
@@ -6,7 +6,7 @@
* Copyright 2000, Philips Electronics N.V.
* Written by Andreas Sikkema <andreas.sikkema@philips.com>
*
- * $Id: packet-rtp.c,v 1.34 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-rtp.c,v 1.35 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -58,14 +58,6 @@
#include <glib.h>
#include <epan/packet.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
diff --git a/packet-rtsp.c b/packet-rtsp.c
index 4b11d986ed..6b8c57797e 100644
--- a/packet-rtsp.c
+++ b/packet-rtsp.c
@@ -4,7 +4,7 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rtsp.c,v 1.48 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-rtsp.c,v 1.49 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
@@ -171,10 +167,10 @@ dissect_rtspinterleaved(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset - orig_offset;
}
-static void process_rtsp_request(tvbuff_t *tvb, int offset, const u_char *data,
+static void process_rtsp_request(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree);
-static void process_rtsp_reply(tvbuff_t *tvb, int offset, const u_char *data,
+static void process_rtsp_reply(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree);
typedef enum {
@@ -192,7 +188,7 @@ static const char *rtsp_methods[] = {
#define RTSP_NMETHODS (sizeof rtsp_methods / sizeof rtsp_methods[0])
static rtsp_type_t
-is_rtsp_request_or_reply(const u_char *line, size_t linelen)
+is_rtsp_request_or_reply(const guchar *line, size_t linelen)
{
unsigned ii;
@@ -221,7 +217,7 @@ is_rtsp_request_or_reply(const u_char *line, size_t linelen)
static const char rtsp_content_type[] = "Content-Type:";
static int
-is_content_sdp(const u_char *line, size_t linelen)
+is_content_sdp(const guchar *line, size_t linelen)
{
static const char type[] = "application/sdp";
size_t typelen = STRLEN_CONST(type);
@@ -251,14 +247,14 @@ static const char rtsp_rtp[] = "rtp/";
static const char rtsp_inter[] = "interleaved=";
static void
-rtsp_create_conversation(packet_info *pinfo, const u_char *line_begin,
+rtsp_create_conversation(packet_info *pinfo, const guchar *line_begin,
size_t line_len)
{
conversation_t *conv;
- u_char buf[256];
- u_char *tmp;
- u_int c_data_port, c_mon_port;
- u_int s_data_port, s_mon_port;
+ guchar buf[256];
+ guchar *tmp;
+ guint c_data_port, c_mon_port;
+ guint s_data_port, s_mon_port;
address null_addr;
if (line_len > sizeof(buf) - 1) {
@@ -298,7 +294,7 @@ rtsp_create_conversation(packet_info *pinfo, const u_char *line_begin,
}
if (!c_data_port) {
rtsp_conversation_data_t *data;
- u_int s_data_chan, s_mon_chan;
+ guint s_data_chan, s_mon_chan;
int i;
/*
@@ -365,13 +361,13 @@ rtsp_create_conversation(packet_info *pinfo, const u_char *line_begin,
static const char rtsp_content_length[] = "Content-Length:";
static int
-rtsp_get_content_length(const u_char *line_begin, size_t line_len)
+rtsp_get_content_length(const guchar *line_begin, size_t line_len)
{
- u_char buf[256];
- u_char *tmp;
+ guchar buf[256];
+ guchar *tmp;
long content_length;
char *p;
- u_char *up;
+ guchar *up;
if (line_len > sizeof(buf) - 1) {
/*
@@ -398,12 +394,12 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
proto_tree *rtsp_tree;
proto_item *ti = NULL;
- const u_char *line;
+ const guchar *line;
gint next_offset;
- const u_char *linep, *lineend;
+ const guchar *linep, *lineend;
int orig_offset;
size_t linelen;
- u_char c;
+ guchar c;
gboolean is_mime_header;
int is_sdp = FALSE;
int datalen;
@@ -692,14 +688,14 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static void
-process_rtsp_request(tvbuff_t *tvb, int offset, const u_char *data,
+process_rtsp_request(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree)
{
- const u_char *lineend = data + linelen;
+ const guchar *lineend = data + linelen;
unsigned ii;
- const u_char *url;
- const u_char *url_start;
- u_char *tmp_url;
+ const guchar *url;
+ const guchar *url_start;
+ guchar *tmp_url;
/* Request Methods */
for (ii = 0; ii < RTSP_NMETHODS; ii++) {
@@ -738,12 +734,12 @@ process_rtsp_request(tvbuff_t *tvb, int offset, const u_char *data,
}
static void
-process_rtsp_reply(tvbuff_t *tvb, int offset, const u_char *data,
+process_rtsp_reply(tvbuff_t *tvb, int offset, const guchar *data,
size_t linelen, proto_tree *tree)
{
- const u_char *lineend = data + linelen;
- const u_char *status = data;
- const u_char *status_start;
+ const guchar *lineend = data + linelen;
+ const guchar *status = data;
+ const guchar *status_start;
unsigned int status_i;
/* status code */
diff --git a/packet-rwall.c b/packet-rwall.c
index 7567cc18dc..ad63a4d21e 100644
--- a/packet-rwall.c
+++ b/packet-rwall.c
@@ -1,6 +1,6 @@
/* packet-rwall.c
*
- * $Id: packet-rwall.c,v 1.5 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-rwall.c,v 1.6 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,10 +26,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-rwall.h"
diff --git a/packet-rx.c b/packet-rx.c
index fcd0377d49..c5eb401a9e 100644
--- a/packet-rx.c
+++ b/packet-rx.c
@@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
- * $Id: packet-rx.c,v 1.35 2002/04/14 23:22:21 guy Exp $
+ * $Id: packet-rx.c,v 1.36 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,14 +33,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-sadmind.c b/packet-sadmind.c
index 7ec7a7dcbb..9d35260695 100644
--- a/packet-sadmind.c
+++ b/packet-sadmind.c
@@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sadmind.c,v 1.1 2002/05/15 07:21:41 guy Exp $
+ * $Id: packet-sadmind.c,v 1.2 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
diff --git a/packet-sap.c b/packet-sap.c
index ed434cdea2..85574f6def 100644
--- a/packet-sap.c
+++ b/packet-sap.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-sap.c,v 1.27 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-sap.c,v 1.28 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-sccp.c b/packet-sccp.c
index bf83bb92bf..239470c0cd 100644
--- a/packet-sccp.c
+++ b/packet-sccp.c
@@ -6,7 +6,7 @@
*
* Copyright 2002, Jeff Morriss <jeff.morriss[AT]ulticom.com>
*
- * $Id: packet-sccp.c,v 1.5 2002/04/13 22:34:17 guy Exp $
+ * $Id: packet-sccp.c,v 1.6 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,14 +36,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include "epan/packet.h"
diff --git a/packet-scsi.c b/packet-scsi.c
index 9a78a4e895..076238d2b2 100644
--- a/packet-scsi.c
+++ b/packet-scsi.c
@@ -2,7 +2,7 @@
* Routines for decoding SCSI CDBs and responses
* Author: Dinesh G Dutt (ddutt@cisco.com)
*
- * $Id: packet-scsi.c,v 1.10 2002/06/13 07:36:52 guy Exp $
+ * $Id: packet-scsi.c,v 1.11 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -79,10 +79,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/strutil.h>
diff --git a/packet-sdp.c b/packet-sdp.c
index ce731d5e9a..f2344094e2 100644
--- a/packet-sdp.c
+++ b/packet-sdp.c
@@ -4,7 +4,7 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sdp.c,v 1.30 2002/04/14 23:22:22 guy Exp $
+ * $Id: packet-sdp.c,v 1.31 2002/08/02 23:36:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
@@ -150,9 +146,9 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint offset = 0;
gint next_offset;
int linelen;
- u_char section;
- u_char type;
- u_char delim;
+ guchar section;
+ guchar type;
+ guchar delim;
int datalen;
int tokenoffset;
int hf = -1;
diff --git a/packet-slimp3.c b/packet-slimp3.c
index 90d12634b1..56f3971f6a 100644
--- a/packet-slimp3.c
+++ b/packet-slimp3.c
@@ -6,7 +6,7 @@
* Adds support for the data packet protocol for the SliMP3
* See www.slimdevices.com for details.
*
- * $Id: packet-slimp3.c,v 1.6 2002/05/06 01:45:58 guy Exp $
+ * $Id: packet-slimp3.c,v 1.7 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-sll.c b/packet-sll.c
index 0569d34d9d..8d3d31e083 100644
--- a/packet-sll.c
+++ b/packet-sll.c
@@ -1,7 +1,7 @@
/* packet-sll.c
* Routines for disassembly of packets from Linux "cooked mode" captures
*
- * $Id: packet-sll.c,v 1.17 2002/04/24 06:03:34 guy Exp $
+ * $Id: packet-sll.c,v 1.18 2002/08/02 23:36:01 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 <stdio.h>
#include <string.h>
#include <glib.h>
@@ -93,7 +89,7 @@ static dissector_handle_t llc_handle;
static dissector_handle_t data_handle;
void
-capture_sll(const u_char *pd, int len, packet_counts *ld)
+capture_sll(const guchar *pd, int len, packet_counts *ld)
{
guint16 protocol;
diff --git a/packet-sll.h b/packet-sll.h
index c65fc34f12..1fbb52b869 100644
--- a/packet-sll.h
+++ b/packet-sll.h
@@ -1,6 +1,6 @@
/* packet-sll.h
*
- * $Id: packet-sll.h,v 1.2 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-sll.h,v 1.3 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_SLL_H__
#define __PACKET_SLL_H__
-void capture_sll(const u_char *, int, packet_counts *);
+void capture_sll(const guchar *, int, packet_counts *);
#endif
diff --git a/packet-slowprotocols.c b/packet-slowprotocols.c
index 1799a7142b..c58f7fd00a 100644
--- a/packet-slowprotocols.c
+++ b/packet-slowprotocols.c
@@ -1,7 +1,7 @@
/* packet-slowprotocols.c
* Routines for EtherType (0x8809) Slow Protocols disassembly.
*
- * $Id: packet-slowprotocols.c,v 1.2 2002/06/13 21:20:24 guy Exp $
+ * $Id: packet-slowprotocols.c,v 1.3 2002/08/02 23:36:01 jmayer Exp $
*
* Copyright 2002 Steve Housley <steve_housley@3com.com>
*
@@ -32,14 +32,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-smb-browse.c b/packet-smb-browse.c
index 588aec31b5..728b480720 100644
--- a/packet-smb-browse.c
+++ b/packet-smb-browse.c
@@ -2,7 +2,7 @@
* Routines for SMB Browser packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-browse.c,v 1.22 2002/04/30 11:03:08 guy Exp $
+ * $Id: packet-smb-browse.c,v 1.23 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-smb-common.h b/packet-smb-common.h
index 023d8b699f..dc4658d945 100644
--- a/packet-smb-common.h
+++ b/packet-smb-common.h
@@ -2,7 +2,7 @@
* Routines for SMB packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-common.h,v 1.12 2002/05/24 10:57:38 guy Exp $
+ * $Id: packet-smb-common.h,v 1.13 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,14 +34,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c
index fc5cf59c12..301dec19c4 100644
--- a/packet-smb-pipe.c
+++ b/packet-smb-pipe.c
@@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
* Guy Harris 2001
*
- * $Id: packet-smb-pipe.c,v 1.80 2002/07/03 18:17:30 guy Exp $
+ * $Id: packet-smb-pipe.c,v 1.81 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,14 +37,6 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-smb.c b/packet-smb.c
index 806a6b5ac4..a0e852f45b 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* 2001 Rewrite by Ronnie Sahlberg and Guy Harris
*
- * $Id: packet-smb.c,v 1.274 2002/07/27 05:03:53 sahlberg Exp $
+ * $Id: packet-smb.c,v 1.275 2002/08/02 23:36:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,14 +32,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <time.h>
#include <string.h>
#include <glib.h>
diff --git a/packet-smpp.c b/packet-smpp.c
index 0ea9cb7b9a..847f905f4a 100644
--- a/packet-smpp.c
+++ b/packet-smpp.c
@@ -2,7 +2,7 @@
* Routines for Short Message Peer to Peer dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-smpp.c,v 1.7 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-smpp.c,v 1.8 2002/08/02 23:36:02 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,14 +37,6 @@
#include <string.h>
#include <time.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-smtp.c b/packet-smtp.c
index bca97cb453..5a1da4476a 100644
--- a/packet-smtp.c
+++ b/packet-smtp.c
@@ -1,7 +1,7 @@
/* packet-smtp.c
* Routines for SMTP packet disassembly
*
- * $Id: packet-smtp.c,v 1.30 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-smtp.c,v 1.31 2002/08/02 23:36:02 jmayer Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -28,14 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -121,7 +113,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int request = 0;
conversation_t *conversation;
struct smtp_request_val *request_val;
- const u_char *line;
+ const guchar *line;
guint32 code;
int linelen;
gboolean eom_seen = FALSE;
diff --git a/packet-sna.c b/packet-sna.c
index 704ec55200..429eb99569 100644
--- a/packet-sna.c
+++ b/packet-sna.c
@@ -2,7 +2,7 @@
* Routines for SNA
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-sna.c,v 1.40 2002/05/29 08:55:28 guy Exp $
+ * $Id: packet-sna.c,v 1.41 2002/08/02 23:36:02 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "llcsaps.h"
diff --git a/packet-snaeth.c b/packet-snaeth.c
index 9a0c2786bf..e82e567c81 100644
--- a/packet-snaeth.c
+++ b/packet-snaeth.c
@@ -1,7 +1,7 @@
/* packet-snaeth.c
* Routines for SNA-over-Ethernet (Ethernet type 80d5)
*
- * $Id: packet-snaeth.c,v 1.2 2002/02/17 00:51:19 guy Exp $
+ * $Id: packet-snaeth.c,v 1.3 2002/08/02 23:36:03 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 <glib.h>
#include <epan/packet.h>
#include "etypes.h"
diff --git a/packet-snmp.c b/packet-snmp.c
index 052642af9f..e5bab4bab9 100644
--- a/packet-snmp.c
+++ b/packet-snmp.c
@@ -8,7 +8,7 @@
*
* See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u.
*
- * $Id: packet-snmp.c,v 1.93 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-snmp.c,v 1.94 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -43,14 +43,6 @@
#include <string.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -455,7 +447,7 @@ format_oid(subid_t *oid, guint oid_length)
unsigned int i;
char *buf;
#ifdef HAVE_UCD_SNMP
- u_char *oid_string;
+ guchar *oid_string;
size_t oid_string_len;
size_t oid_out_len;
#endif
@@ -499,10 +491,10 @@ format_oid(subid_t *oid, guint oid_length)
}
#ifdef HAVE_UCD_SNMP
-static u_char *
+static guchar *
check_var_length(guint vb_length, guint required_length)
{
- u_char *buf;
+ guchar *buf;
static const char badlen_fmt[] = "Length is %u, should be %u";
if (vb_length != required_length) {
@@ -516,11 +508,11 @@ check_var_length(guint vb_length, guint required_length)
return NULL; /* length is OK */
}
-static u_char *
+static guchar *
format_var(struct variable_list *variable, subid_t *variable_oid,
guint variable_oid_length, gushort vb_type, guint val_len)
{
- u_char *buf;
+ guchar *buf;
size_t buf_len;
size_t out_len;
diff --git a/packet-socks.c b/packet-socks.c
index f8e6099488..a623c06b1a 100644
--- a/packet-socks.c
+++ b/packet-socks.c
@@ -2,7 +2,7 @@
* Routines for socks versions 4 &5 packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-socks.c,v 1.41 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-socks.c,v 1.42 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -55,14 +55,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -882,8 +874,8 @@ display_ping_and_tracert(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
/* Display the ping/trace_route conversation */
- const u_char *data, *dataend;
- const u_char *lineend, *eol;
+ const guchar *data, *dataend;
+ const guchar *lineend, *eol;
int linelen;
/* handle the end command */
diff --git a/packet-spray.c b/packet-spray.c
index 52671dafd1..12ec46208b 100644
--- a/packet-spray.c
+++ b/packet-spray.c
@@ -1,7 +1,7 @@
/* packet-spray.c
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
- * $Id: packet-spray.c,v 1.8 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-spray.c,v 1.9 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-spray.h"
diff --git a/packet-srvloc.c b/packet-srvloc.c
index feea3b73e9..293d0bbe77 100644
--- a/packet-srvloc.c
+++ b/packet-srvloc.c
@@ -6,7 +6,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.31 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-srvloc.c,v 1.32 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,14 +36,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <time.h>
#include <glib.h>
@@ -84,7 +76,7 @@ struct srvloc_hdr {
guint16 length;
guint8 flags;
guint8 dialect;
- u_char language[2];
+ guchar language[2];
guint16 encoding;
guint16 xid;
};
diff --git a/packet-sscop.c b/packet-sscop.c
index f9658922d4..e54a2251bd 100644
--- a/packet-sscop.c
+++ b/packet-sscop.c
@@ -2,7 +2,7 @@
* Routines for SSCOP (Q.2110, Q.SAAL) frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-sscop.c,v 1.18 2002/01/21 07:36:43 guy Exp $
+ * $Id: packet-sscop.c,v 1.19 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-stat-notify.c b/packet-stat-notify.c
index 065ecf7a4a..f8375409f2 100644
--- a/packet-stat-notify.c
+++ b/packet-stat-notify.c
@@ -2,7 +2,7 @@
* Routines for async NSM stat callback dissection
* 2001 Ronnie Sahlberg <See AUTHORS for email>
*
- * $Id: packet-stat-notify.c,v 1.9 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-stat-notify.c,v 1.10 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-stat-notify.h"
diff --git a/packet-stat.c b/packet-stat.c
index b659018d30..ae6c6ce890 100644
--- a/packet-stat.c
+++ b/packet-stat.c
@@ -1,7 +1,7 @@
/* packet-stat.c
* Routines for stat dissection
*
- * $Id: packet-stat.c,v 1.15 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-stat.c,v 1.16 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,10 +32,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-stat.h"
diff --git a/packet-sua.c b/packet-sua.c
index ddaa5788f4..0d7c8c7361 100644
--- a/packet-sua.c
+++ b/packet-sua.c
@@ -6,7 +6,7 @@
*
* Copyright 2000, Michael Txen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-sua.c,v 1.8 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-sua.c,v 1.9 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,14 +37,6 @@
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
diff --git a/packet-tacacs.c b/packet-tacacs.c
index 4932883dfd..4f399ac682 100644
--- a/packet-tacacs.c
+++ b/packet-tacacs.c
@@ -2,7 +2,7 @@
* Routines for cisco tacacs/xtacacs/tacacs+ packet dissection
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-tacacs.c,v 1.21 2002/01/24 09:20:52 guy Exp $
+ * $Id: packet-tacacs.c,v 1.22 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,14 +36,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-tcp.c b/packet-tcp.c
index 3bf46c6323..8f775f216e 100644
--- a/packet-tcp.c
+++ b/packet-tcp.c
@@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.147 2002/08/02 22:41:56 sahlberg Exp $
+ * $Id: packet-tcp.c,v 1.148 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,14 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
@@ -1802,13 +1794,13 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (pinfo->src.type) {
case AT_IPv4:
- phdr[0] = htonl((IP_PROTO_TCP<<16) + reported_len);
+ phdr[0] = g_htonl((IP_PROTO_TCP<<16) + reported_len);
cksum_vec[2].len = 4;
break;
case AT_IPv6:
- phdr[0] = htonl(reported_len);
- phdr[1] = htonl(IP_PROTO_TCP);
+ phdr[0] = g_htonl(reported_len);
+ phdr[1] = g_htonl(IP_PROTO_TCP);
cksum_vec[2].len = 8;
break;
diff --git a/packet-telnet.c b/packet-telnet.c
index 41bc328e4b..9fed183de3 100644
--- a/packet-telnet.c
+++ b/packet-telnet.c
@@ -2,7 +2,7 @@
* Routines for telnet packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-telnet.c,v 1.30 2002/07/17 06:55:20 guy Exp $
+ * $Id: packet-telnet.c,v 1.31 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -127,7 +119,7 @@ telnet_sub_option(proto_tree *telnet_tree, tvbuff_t *tvb, int start_offset)
int offset = start_offset;
guint8 opt_byte;
int subneg_len, req;
- const u_char *opt;
+ const guchar *opt;
guint len;
offset += 2; /* skip IAC and SB */
@@ -194,7 +186,7 @@ static int
telnet_command(proto_tree *telnet_tree, tvbuff_t *tvb, int start_offset)
{
int offset = start_offset;
- u_char optcode;
+ guchar optcode;
offset += 1; /* skip IAC */
optcode = tvb_get_guint8(tvb, offset);
diff --git a/packet-tftp.c b/packet-tftp.c
index 38296ef4c2..659541db41 100644
--- a/packet-tftp.c
+++ b/packet-tftp.c
@@ -5,7 +5,7 @@
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TFTP Option Extension
*
- * $Id: packet-tftp.c,v 1.38 2002/06/13 08:48:43 guy Exp $
+ * $Id: packet-tftp.c,v 1.39 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,14 +32,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
@@ -101,7 +93,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 opcode;
guint16 bytes;
guint16 blocknum;
- u_int i1;
+ guint i1;
guint16 error;
/*
diff --git a/packet-tns.c b/packet-tns.c
index 66a10e8293..fff00bff11 100644
--- a/packet-tns.c
+++ b/packet-tns.c
@@ -1,7 +1,7 @@
/* packet-tns.c
* Routines for Oracle TNS packet dissection
*
- * $Id: packet-tns.c,v 1.34 2002/07/09 20:02:54 guy Exp $
+ * $Id: packet-tns.c,v 1.35 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,14 +30,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-tpkt.c b/packet-tpkt.c
index 4993ddaf0d..991d876fa4 100644
--- a/packet-tpkt.c
+++ b/packet-tpkt.c
@@ -7,7 +7,7 @@
* Routine to dissect RFC 1006 TPKT packet containing OSI TP PDU
* Copyright 2001, Martin Thomas <Martin_A_Thomas@yahoo.com>
*
- * $Id: packet-tpkt.c,v 1.20 2002/07/31 18:45:50 guy Exp $
+ * $Id: packet-tpkt.c,v 1.21 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,14 +35,6 @@
#include <glib.h>
#include <epan/packet.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <string.h>
diff --git a/packet-tr.c b/packet-tr.c
index b5f2d40f09..7eaff89c8b 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-tr.c,v 1.71 2002/07/02 08:23:53 guy Exp $
+ * $Id: packet-tr.c,v 1.72 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <stdio.h>
#include <glib.h>
@@ -164,7 +160,7 @@ int check_for_old_linux_tvb(tvbuff_t *tvb)
}
static
-int check_for_old_linux(const u_char * pd)
+int check_for_old_linux(const guchar * pd)
{
int x;
for(x=1;x<=18;x++)
@@ -182,7 +178,7 @@ static void
add_ring_bridge_pairs(int rcf_len, tvbuff_t*, proto_tree *tree);
void
-capture_tr(const u_char *pd, int offset, int len, packet_counts *ld) {
+capture_tr(const guchar *pd, int offset, int len, packet_counts *ld) {
int source_routed = 0;
int frame_type;
diff --git a/packet-tr.h b/packet-tr.h
index df543c40da..280db644cd 100644
--- a/packet-tr.h
+++ b/packet-tr.h
@@ -1,6 +1,6 @@
/* packet-tr.h
*
- * $Id: packet-tr.h,v 1.5 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-tr.h,v 1.6 2002/08/02 23:36:03 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_TR_H__
#define __PACKET_TR_H__
-void capture_tr(const u_char *, int, int, packet_counts *);
+void capture_tr(const guchar *, int, int, packet_counts *);
#endif
diff --git a/packet-trmac.c b/packet-trmac.c
index a400762a12..1e20bef190 100644
--- a/packet-trmac.c
+++ b/packet-trmac.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring Media Access Control
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-trmac.c,v 1.36 2002/06/02 17:51:00 gerald Exp $
+ * $Id: packet-trmac.c,v 1.37 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -114,7 +110,7 @@ sv_text(tvbuff_t *tvb, int svoff, proto_tree *tree)
proto_tree *sv_tree;
proto_item *ti;
- u_char errors[6]; /* isolating or non-isolating */
+ guchar errors[6]; /* isolating or non-isolating */
/* Check the SV length.
XXX - Should we do this in each case statement below, e.g. to force
diff --git a/packet-tsp.c b/packet-tsp.c
index 2e04dce395..2f798565f7 100644
--- a/packet-tsp.c
+++ b/packet-tsp.c
@@ -3,7 +3,7 @@
*
* Uwe Girlich <Uwe.Girlich@philosys.de>
*
- * $Id: packet-tsp.c,v 1.1 2002/01/31 07:50:29 girlich Exp $
+ * $Id: packet-tsp.c,v 1.2 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,14 +30,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-ucp.c b/packet-ucp.c
index 6c9b4bb461..c373012065 100644
--- a/packet-ucp.c
+++ b/packet-ucp.c
@@ -2,7 +2,7 @@
* Routines for Universal Computer Protocol dissection
* Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl>
*
- * $Id: packet-ucp.c,v 1.17 2002/07/17 00:42:42 guy Exp $
+ * $Id: packet-ucp.c,v 1.18 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -40,14 +40,6 @@
#include <ctype.h>
#include <time.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-udp.c b/packet-udp.c
index 32d8ce4ed4..e695bddc25 100644
--- a/packet-udp.c
+++ b/packet-udp.c
@@ -1,7 +1,7 @@
/* packet-udp.c
* Routines for UDP packet disassembly
*
- * $Id: packet-udp.c,v 1.103 2002/06/08 21:54:51 guy Exp $
+ * $Id: packet-udp.c,v 1.104 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,14 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -158,10 +150,10 @@ dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&uh, offset, sizeof(e_udphdr));
- uh_sport = ntohs(uh.uh_sport);
- uh_dport = ntohs(uh.uh_dport);
- uh_ulen = ntohs(uh.uh_ulen);
- uh_sum = ntohs(uh.uh_sum);
+ uh_sport = g_ntohs(uh.uh_sport);
+ uh_dport = g_ntohs(uh.uh_dport);
+ uh_ulen = g_ntohs(uh.uh_ulen);
+ uh_sum = g_ntohs(uh.uh_sum);
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Source port: %s Destination port: %s",
@@ -207,13 +199,13 @@ dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (pinfo->src.type) {
case AT_IPv4:
- phdr[0] = htonl((IP_PROTO_UDP<<16) + reported_len);
+ phdr[0] = g_htonl((IP_PROTO_UDP<<16) + reported_len);
cksum_vec[2].len = 4;
break;
case AT_IPv6:
- phdr[0] = htonl(reported_len);
- phdr[1] = htonl(IP_PROTO_UDP);
+ phdr[0] = g_htonl(reported_len);
+ phdr[1] = g_htonl(IP_PROTO_UDP);
cksum_vec[2].len = 8;
break;
diff --git a/packet-v120.c b/packet-v120.c
index 45f483f507..00af379193 100644
--- a/packet-v120.c
+++ b/packet-v120.c
@@ -2,7 +2,7 @@
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
- * $Id: packet-v120.c,v 1.26 2002/04/11 09:38:03 guy Exp $
+ * $Id: packet-v120.c,v 1.27 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-vines.c b/packet-vines.c
index e27a5b72aa..a53418522a 100644
--- a/packet-vines.c
+++ b/packet-vines.c
@@ -1,7 +1,7 @@
/* packet-vines.c
* Routines for Banyan VINES protocol packet disassembly
*
- * $Id: packet-vines.c,v 1.41 2002/05/30 01:56:55 guy Exp $
+ * $Id: packet-vines.c,v 1.42 2002/08/02 23:36:04 jmayer Exp $
*
* Don Lafontaine <lafont02@cn.ca>
*
@@ -29,14 +29,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -198,12 +190,12 @@ dissect_vines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vip));
- viph.vip_chksum = ntohs(viph.vip_chksum);
- viph.vip_pktlen = ntohs(viph.vip_pktlen);
- viph.vip_dnet = ntohl(viph.vip_dnet);
- viph.vip_dsub = ntohs(viph.vip_dsub);
- viph.vip_snet = ntohl(viph.vip_snet);
- viph.vip_ssub = ntohs(viph.vip_ssub);
+ viph.vip_chksum = g_ntohs(viph.vip_chksum);
+ viph.vip_pktlen = g_ntohs(viph.vip_pktlen);
+ viph.vip_dnet = g_ntohl(viph.vip_dnet);
+ viph.vip_dsub = g_ntohs(viph.vip_dsub);
+ viph.vip_snet = g_ntohl(viph.vip_snet);
+ viph.vip_ssub = g_ntohs(viph.vip_ssub);
switch (viph.vip_proto) {
case VIP_PROTO_IPC:
@@ -369,10 +361,10 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vspp));
- viph.vspp_sport = ntohs(viph.vspp_sport);
- viph.vspp_dport = ntohs(viph.vspp_dport);
- viph.vspp_lclid = ntohs(viph.vspp_lclid);
- viph.vspp_rmtid = ntohs(viph.vspp_rmtid);
+ viph.vspp_sport = g_ntohs(viph.vspp_sport);
+ viph.vspp_dport = g_ntohs(viph.vspp_dport);
+ viph.vspp_lclid = g_ntohs(viph.vspp_lclid);
+ viph.vspp_rmtid = g_ntohs(viph.vspp_rmtid);
switch (viph.vspp_pkttype) {
case VSPP_PKTTYPE_DATA:
diff --git a/packet-vj.c b/packet-vj.c
index 80224041f0..cb598b02dd 100644
--- a/packet-vj.c
+++ b/packet-vj.c
@@ -1,7 +1,7 @@
/* packet-vj.c
* Routines for Van Jacobson header decompression.
*
- * $Id: packet-vj.c,v 1.14 2002/07/15 09:56:04 guy Exp $
+ * $Id: packet-vj.c,v 1.15 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -63,10 +63,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
@@ -606,7 +602,7 @@ vjc_tvb_setup(tvbuff_t *src_tvb,
pbuf = g_malloc(buf_len);
memcpy(pbuf, data_ptr, hdr_len);
tvb_memcpy(src_tvb, pbuf + hdr_len, offset, buf_len - hdr_len);
- *dst_tvb = tvb_new_real_data(pbuf, buf_len, ntohs(ip->tot_len));
+ *dst_tvb = tvb_new_real_data(pbuf, buf_len, g_ntohs(ip->tot_len));
tvb_set_child_real_data_tvbuff(src_tvb, *dst_tvb);
add_new_data_source(pinfo, *dst_tvb, "VJ Decompressed");
return VJ_OK;
@@ -733,7 +729,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(tree, hf_vj_tcp_cksum, src_tvb, offset, 2, tcp_cksum);
if(cs != NULL) {
hdrlen = lo_nibble(ip->ihl_version) * 4 + TCP_OFFSET(thp) * 4;
- thp->cksum = htons(tcp_cksum);
+ thp->cksum = g_htons(tcp_cksum);
}
offset += 2;
if(cs != NULL) {
@@ -747,14 +743,14 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree,
switch(changes & SPECIALS_MASK){
case SPECIAL_I: /* Echoed terminal traffic */
if(cs != NULL) {
- word = ntohs(ip->tot_len) - hdrlen;
- thp->ack_seq = htonl(ntohl(thp->ack_seq) + word);
- thp->seq = htonl(ntohl(thp->seq) + word);
+ word = g_ntohs(ip->tot_len) - hdrlen;
+ thp->ack_seq = g_htonl(g_ntohl(thp->ack_seq) + word);
+ thp->seq = g_htonl(g_ntohl(thp->seq) + word);
}
break;
case SPECIAL_D: /* Unidirectional data */
if(cs != NULL)
- thp->seq = htonl(ntohl(thp->seq) + ntohs(ip->tot_len) - hdrlen);
+ thp->seq = g_htonl(g_ntohl(thp->seq) + g_ntohs(ip->tot_len) - hdrlen);
break;
default:
if(changes & NEW_U){
@@ -770,17 +766,17 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree,
if(changes & NEW_W) {
delta = get_signed_delta(src_tvb, &offset, hf_vj_win_delta, tree);
if(cs != NULL)
- thp->window = htons(ntohs(thp->window) + delta);
+ thp->window = g_htons(g_ntohs(thp->window) + delta);
}
if(changes & NEW_A) {
delta = get_unsigned_delta(src_tvb, &offset, hf_vj_ack_delta, tree);
if(cs != NULL)
- thp->ack_seq = htonl(ntohl(thp->ack_seq) + delta);
+ thp->ack_seq = g_htonl(g_ntohl(thp->ack_seq) + delta);
}
if(changes & NEW_S) {
delta = get_unsigned_delta(src_tvb, &offset, hf_vj_seq_delta, tree);
if(cs != NULL)
- thp->seq = htonl(ntohl(thp->seq) + delta);
+ thp->seq = g_htonl(g_ntohl(thp->seq) + delta);
}
break;
}
@@ -789,7 +785,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree,
else
delta = 1;
if(cs != NULL)
- ip->id = htons(ntohs(ip->id) + delta);
+ ip->id = g_htons(g_ntohs(ip->id) + delta);
/* Compute IP packet length and the buffer length needed */
len = tvb_reported_length_remaining(src_tvb, offset);
@@ -819,7 +815,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree,
if(cs != NULL) {
len += hdrlen;
- ip->tot_len = htons(len);
+ ip->tot_len = g_htons(len);
/* Compute IP check sum */
ip->cksum = ZERO;
ip->cksum = ip_csum((guint8 *)ip, lo_nibble(ip->ihl_version) * 4);
diff --git a/packet-vlan.c b/packet-vlan.c
index bd22cd5a8d..992bd27bd9 100644
--- a/packet-vlan.c
+++ b/packet-vlan.c
@@ -1,7 +1,7 @@
/* packet-vlan.c
* Routines for VLAN 802.1Q ethernet header disassembly
*
- * $Id: packet-vlan.c,v 1.39 2002/04/24 06:03:34 guy Exp $
+ * $Id: packet-vlan.c,v 1.40 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,14 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-ieee8023.h"
@@ -53,7 +45,7 @@ static int hf_vlan_trailer = -1;
static gint ett_vlan = -1;
void
-capture_vlan(const u_char *pd, int offset, int len, packet_counts *ld ) {
+capture_vlan(const guchar *pd, int offset, int len, packet_counts *ld ) {
guint16 encap_proto;
if ( !BYTES_ARE_IN_FRAME(offset,len,5) ) {
ld->other++;
diff --git a/packet-vlan.h b/packet-vlan.h
index c0295d1f93..df41bb6ae7 100644
--- a/packet-vlan.h
+++ b/packet-vlan.h
@@ -1,6 +1,6 @@
/* packet-vlan.h
*
- * $Id: packet-vlan.h,v 1.4 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-vlan.h,v 1.5 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,6 @@
#ifndef __PACKET_VLAN_H__
#define __PACKET_VLAN_H__
-void capture_vlan(const u_char *, int, int, packet_counts *);
+void capture_vlan(const guchar *, int, int, packet_counts *);
#endif
diff --git a/packet-vrrp.c b/packet-vrrp.c
index e57c131b60..1b500dca04 100644
--- a/packet-vrrp.c
+++ b/packet-vrrp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-vrrp.c,v 1.23 2002/03/28 07:40:54 itojun Exp $
+ * $Id: packet-vrrp.c,v 1.24 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,14 +29,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -175,8 +167,8 @@ dissect_vrrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cksum_vec[1].ptr = pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
- phdr[0] = htonl(vrrp_len);
- phdr[1] = htonl(IP_PROTO_VRRP);
+ phdr[0] = g_htonl(vrrp_len);
+ phdr[1] = g_htonl(IP_PROTO_VRRP);
cksum_vec[2].len = 8;
cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, vrrp_len);
cksum_vec[3].len = vrrp_len;
diff --git a/packet-vtp.c b/packet-vtp.c
index 5c555c05f8..45e8811595 100644
--- a/packet-vtp.c
+++ b/packet-vtp.c
@@ -1,7 +1,7 @@
/* packet-vtp.c
* Routines for the disassembly of Cisco's Virtual Trunking Protocol
*
- * $Id: packet-vtp.c,v 1.19 2002/01/24 09:20:52 guy Exp $
+ * $Id: packet-vtp.c,v 1.20 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,10 +24,6 @@
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <stdlib.h>
#include <string.h>
diff --git a/packet-wap.c b/packet-wap.c
index 0c0fd08403..76b524d5d4 100644
--- a/packet-wap.c
+++ b/packet-wap.c
@@ -2,7 +2,7 @@
*
* Utility routines for WAP dissectors
*
- * $Id: packet-wap.c,v 1.5 2002/01/21 07:36:44 guy Exp $
+ * $Id: packet-wap.c,v 1.6 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,10 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include "packet-wap.h"
diff --git a/packet-wccp.c b/packet-wccp.c
index 518bf73276..bed94a3f22 100644
--- a/packet-wccp.c
+++ b/packet-wccp.c
@@ -2,7 +2,7 @@
* Routines for Web Cache Coordination Protocol dissection
* Jerry Talkington <jerryt@netapp.com>
*
- * $Id: packet-wccp.c,v 1.31 2002/04/15 21:12:56 guy Exp $
+ * $Id: packet-wccp.c,v 1.32 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,14 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-wcp.c b/packet-wcp.c
index d8f73b27fc..8527b2b293 100644
--- a/packet-wcp.c
+++ b/packet-wcp.c
@@ -2,7 +2,7 @@
* Routines for Wellfleet Compression frame disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-wcp.c,v 1.26 2002/07/31 19:27:39 guy Exp $
+ * $Id: packet-wcp.c,v 1.27 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -100,10 +100,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <string.h>
diff --git a/packet-who.c b/packet-who.c
index 5f926ed7f3..66d76b7398 100644
--- a/packet-who.c
+++ b/packet-who.c
@@ -2,7 +2,7 @@
* Routines for who protocol (see man rwhod)
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-who.c,v 1.23 2002/01/24 09:20:52 guy Exp $
+ * $Id: packet-who.c,v 1.24 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <time.h>
#include <glib.h>
diff --git a/packet-wsp.c b/packet-wsp.c
index 87948d07e5..45c89d1365 100644
--- a/packet-wsp.c
+++ b/packet-wsp.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WSP component of WAP traffic.
*
- * $Id: packet-wsp.c,v 1.59 2002/07/30 07:36:22 guy Exp $
+ * $Id: packet-wsp.c,v 1.60 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,14 +35,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/packet-wtls.c b/packet-wtls.c
index e9d6e9b8cb..7aa6f850aa 100644
--- a/packet-wtls.c
+++ b/packet-wtls.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WTLS component of WAP traffic.
*
- * $Id: packet-wtls.c,v 1.20 2002/07/17 00:42:43 guy Exp $
+ * $Id: packet-wtls.c,v 1.21 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,14 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/packet-wtp.c b/packet-wtp.c
index 5546e84483..c65cd5f6f0 100644
--- a/packet-wtp.c
+++ b/packet-wtp.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WTP component of WAP traffic.
*
- * $Id: packet-wtp.c,v 1.36 2002/07/17 00:42:43 guy Exp $
+ * $Id: packet-wtp.c,v 1.37 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -34,14 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/packet-x11.c b/packet-x11.c
index 7890fadb2b..f4503eaba3 100644
--- a/packet-x11.c
+++ b/packet-x11.c
@@ -2,7 +2,7 @@
* Routines for X11 dissection
* Copyright 2000, Christophe Tronche <ch.tronche@computer.org>
*
- * $Id: packet-x11.c,v 1.44 2002/05/16 19:29:03 guy Exp $
+ * $Id: packet-x11.c,v 1.45 2002/08/02 23:36:04 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -58,10 +58,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
@@ -981,7 +977,7 @@ static void listOfKeycode(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
int i;
for(i = 8, m = modifiers; i; i--, m++) {
- u_char c = tvb_get_guint8(tvb, *offsetp);
+ guchar c = tvb_get_guint8(tvb, *offsetp);
*offsetp += 1;
if (c)
bp += sprintf(bp, " %s=%d", *m, c);
@@ -1100,7 +1096,7 @@ static void listOfSegment(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
Note that "non-printable characters" may depend on your locale.... */
static void stringCopy(char *dest, const char *source, int length)
{
- u_char c;
+ guchar c;
while(length--) {
c = *source++;
if (!isgraph(c) && c != ' ') c = '.';
diff --git a/packet-x25.c b/packet-x25.c
index 65430ef4ed..f2171016dc 100644
--- a/packet-x25.c
+++ b/packet-x25.c
@@ -2,7 +2,7 @@
* Routines for x25 packet disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-x25.c,v 1.67 2002/05/09 11:18:47 guy Exp $
+ * $Id: packet-x25.c,v 1.68 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
#include <stdlib.h>
diff --git a/packet-xdmcp.c b/packet-xdmcp.c
index 83965faebc..9b21daa59f 100644
--- a/packet-xdmcp.c
+++ b/packet-xdmcp.c
@@ -2,7 +2,7 @@
* Routines for XDMCP message dissection
* Copyright 2002, Pasi Eronen <pasi.eronen@nixu.com>
*
- * $Id: packet-xdmcp.c,v 1.1 2002/03/16 02:25:48 guy Exp $
+ * $Id: packet-xdmcp.c,v 1.2 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -99,7 +99,7 @@ static gint ett_xdmcp_connection = -1;
/* Copied from packet-x11.c */
static void stringCopy(char *dest, const char *source, int length)
{
- u_char c;
+ guchar c;
while(length--) {
c = *source++;
if (!isgraph(c) && c != ' ') c = '.';
diff --git a/packet-yhoo.c b/packet-yhoo.c
index 73c122bb40..dd405ac7dc 100644
--- a/packet-yhoo.c
+++ b/packet-yhoo.c
@@ -2,7 +2,7 @@
* Routines for yahoo messenger packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-yhoo.c,v 1.23 2002/02/01 07:12:53 guy Exp $
+ * $Id: packet-yhoo.c,v 1.24 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,14 +31,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
diff --git a/packet-ypbind.c b/packet-ypbind.c
index c80859f464..9feecfa1a8 100644
--- a/packet-ypbind.c
+++ b/packet-ypbind.c
@@ -1,7 +1,7 @@
/* packet-ypbind.c
* Routines for ypbind dissection
*
- * $Id: packet-ypbind.c,v 1.11 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-ypbind.c,v 1.12 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,10 +31,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-ypbind.h"
diff --git a/packet-yppasswd.c b/packet-yppasswd.c
index d3826953e1..064d5b1f97 100644
--- a/packet-yppasswd.c
+++ b/packet-yppasswd.c
@@ -1,7 +1,7 @@
/* packet-yppasswd.c
* Routines for yppasswd dissection
*
- * $Id: packet-yppasswd.c,v 1.6 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-yppasswd.c,v 1.7 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-yppasswd.h"
diff --git a/packet-ypserv.c b/packet-ypserv.c
index 34b6cd52bd..a3b0261c13 100644
--- a/packet-ypserv.c
+++ b/packet-ypserv.c
@@ -1,7 +1,7 @@
/* packet-ypserv.c
* Routines for ypserv dissection
*
- * $Id: packet-ypserv.c,v 1.22 2002/04/03 13:24:13 girlich Exp $
+ * $Id: packet-ypserv.c,v 1.23 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,10 +32,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-ypserv.h"
diff --git a/packet-ypxfr.c b/packet-ypxfr.c
index 13f7f01ba8..e0af251f86 100644
--- a/packet-ypxfr.c
+++ b/packet-ypxfr.c
@@ -1,7 +1,7 @@
/* packet-ypxfr.c
* Routines for ypxfr dissection
*
- * $Id: packet-ypxfr.c,v 1.6 2001/01/18 09:55:10 guy Exp $
+ * $Id: packet-ypxfr.c,v 1.7 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -29,10 +29,6 @@
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include "packet-rpc.h"
#include "packet-ypxfr.h"
diff --git a/packet-zebra.c b/packet-zebra.c
index b47cfbe3ca..c53d769365 100644
--- a/packet-zebra.c
+++ b/packet-zebra.c
@@ -3,7 +3,7 @@
*
* Jochen Friedrich <jochen@scram.de>
*
- * $Id: packet-zebra.c,v 1.21 2002/04/02 01:32:11 guy Exp $
+ * $Id: packet-zebra.c,v 1.22 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,10 +28,6 @@
#include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#include <string.h>
#include <ctype.h>
diff --git a/pcap-util.c b/pcap-util.c
index 2fad29f087..d2a04cf3a5 100644
--- a/pcap-util.c
+++ b/pcap-util.c
@@ -1,7 +1,7 @@
/* pcap-util.c
* Utility routines for packet capture
*
- * $Id: pcap-util.c,v 1.8 2002/06/27 22:39:16 gerald Exp $
+ * $Id: pcap-util.c,v 1.9 2002/08/02 23:36:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -39,10 +39,6 @@
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/prefs.c b/prefs.c
index 78b594518f..8d2eadd563 100644
--- a/prefs.c
+++ b/prefs.c
@@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
- * $Id: prefs.c,v 1.87 2002/08/01 03:15:25 jmayer Exp $
+ * $Id: prefs.c,v 1.88 2002/08/02 23:36:06 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 <stdlib.h>
#include <string.h>
#include <ctype.h>
@@ -1033,7 +1029,7 @@ read_prefs_file(const char *pf_path, FILE *pf)
int
prefs_set_pref(char *prefarg)
{
- u_char *p, *colonp;
+ guchar *p, *colonp;
int ret;
/*
diff --git a/print.c b/print.c
index 89e6ff0780..d6880d2a00 100644
--- a/print.c
+++ b/print.c
@@ -1,7 +1,7 @@
/* print.c
* Routines for printing packet analysis trees.
*
- * $Id: print.c,v 1.55 2002/06/29 09:45:06 guy Exp $
+ * $Id: print.c,v 1.56 2002/08/02 23:36:06 jmayer Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -31,10 +31,6 @@
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <epan/epan.h>
#include <epan/epan_dissect.h>
#include <epan/tvbuff.h>
@@ -46,8 +42,8 @@
#include "packet-data.h"
static void proto_tree_print_node(GNode *node, gpointer data);
-static void print_hex_data_buffer(FILE *fh, register const u_char *cp,
- register u_int length, char_enc encoding, gint format);
+static void print_hex_data_buffer(FILE *fh, register const guchar *cp,
+ register guint length, char_enc encoding, gint format);
static void ps_clean_string(unsigned char *out, const unsigned char *in,
int outbuf_size);
@@ -191,7 +187,7 @@ void print_hex_data(FILE *fh, gint format, epan_dissect_t *edt)
tvbuff_t *tvb;
char *name;
char *line;
- const u_char *cp;
+ const guchar *cp;
guint length;
/*
@@ -245,14 +241,14 @@ void print_hex_data(FILE *fh, gint format, epan_dissect_t *edt)
from data dump, data dump */
static void
-print_hex_data_buffer(FILE *fh, register const u_char *cp,
- register u_int length, char_enc encoding, gint format)
+print_hex_data_buffer(FILE *fh, register const guchar *cp,
+ register guint length, char_enc encoding, gint format)
{
register unsigned int ad, i, j, k, l;
- u_char c;
- u_char line[MAX_LINE_LEN + 1];
+ guchar c;
+ guchar line[MAX_LINE_LEN + 1];
unsigned int use_digits;
- static u_char binhex[16] = {
+ static guchar binhex[16] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
diff --git a/ringbuffer.c b/ringbuffer.c
index d9740bf47a..bfc34ee914 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -1,7 +1,7 @@
/* ringbuffer.c
* Routines for packet capture windows
*
- * $Id: ringbuffer.c,v 1.3 2002/06/23 20:30:01 guy Exp $
+ * $Id: ringbuffer.c,v 1.4 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,10 +36,6 @@
#include <fcntl.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/snprintf.h b/snprintf.h
index 1b1f7fb087..bea1a4f75f 100644
--- a/snprintf.h
+++ b/snprintf.h
@@ -1,5 +1,5 @@
/*
- * $Id: snprintf.h,v 1.7 2002/07/19 12:59:21 girlich Exp $
+ * $Id: snprintf.h,v 1.8 2002/08/02 23:36:07 jmayer Exp $
*/
#ifndef __ETHEREAL_SNPRINTF_H__
@@ -12,10 +12,6 @@
#endif
/* for size_t */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
extern int vsnprintf(char *string, size_t length, const char * format,
va_list args);
diff --git a/tethereal.c b/tethereal.c
index df53d4dfe5..4eabb41f10 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.150 2002/08/01 03:15:26 jmayer Exp $
+ * $Id: tethereal.c,v 1.151 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -41,10 +41,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -130,8 +126,8 @@ typedef struct _loop_data {
static loop_data ld;
static int capture(int);
-static void capture_pcap_cb(u_char *, const struct pcap_pkthdr *,
- const u_char *);
+static void capture_pcap_cb(guchar *, const struct pcap_pkthdr *,
+ const guchar *);
#ifdef _WIN32
static BOOL WINAPI capture_cleanup(DWORD);
#else /* _WIN32 */
@@ -145,11 +141,11 @@ typedef struct {
} cb_args_t;
static int load_cap_file(capture_file *, int);
-static void wtap_dispatch_cb_write(u_char *, const struct wtap_pkthdr *, long,
- union wtap_pseudo_header *, const u_char *);
+static void wtap_dispatch_cb_write(guchar *, const struct wtap_pkthdr *, long,
+ union wtap_pseudo_header *, const guchar *);
static void show_capture_file_io_error(const char *, int, gboolean);
-static void wtap_dispatch_cb_print(u_char *, const struct wtap_pkthdr *, long,
- union wtap_pseudo_header *, const u_char *);
+static void wtap_dispatch_cb_print(guchar *, const struct wtap_pkthdr *, long,
+ union wtap_pseudo_header *, const guchar *);
capture_file cfile;
ts_type timestamp_type = RELATIVE;
@@ -257,7 +253,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)
@@ -1125,7 +1121,7 @@ capture(int out_file_type)
each packet. */
pcap_cnt = 1;
}
- inpkts = pcap_dispatch(ld.pch, pcap_cnt, capture_pcap_cb, (u_char *) &ld);
+ inpkts = pcap_dispatch(ld.pch, pcap_cnt, capture_pcap_cb, (guchar *) &ld);
if (inpkts < 0) {
/* Error from "pcap_dispatch()". */
ld.go = FALSE;
@@ -1244,8 +1240,8 @@ error:
}
static void
-capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
- const u_char *pd)
+capture_pcap_cb(guchar *user, const struct pcap_pkthdr *phdr,
+ const guchar *pd)
{
struct wtap_pkthdr whdr;
union wtap_pseudo_header pseudo_header;
@@ -1265,7 +1261,7 @@ capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
args.cf = &cfile;
args.pdh = ld->pdh;
if (ld->pdh) {
- wtap_dispatch_cb_write((u_char *)&args, &whdr, 0, &pseudo_header, pd);
+ wtap_dispatch_cb_write((guchar *)&args, &whdr, 0, &pseudo_header, pd);
/* Report packet capture count if not quiet */
if (!quiet) {
if (ld->packet_count != 0) {
@@ -1275,7 +1271,7 @@ capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
}
}
} else {
- wtap_dispatch_cb_print((u_char *)&args, &whdr, 0, &pseudo_header, pd);
+ wtap_dispatch_cb_print((guchar *)&args, &whdr, 0, &pseudo_header, pd);
}
}
@@ -1382,7 +1378,7 @@ load_cap_file(capture_file *cf, int out_file_type)
}
args.cf = cf;
args.pdh = pdh;
- success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_write, (u_char *) &args,
+ success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_write, (guchar *) &args,
&err);
/* Now close the capture file. */
@@ -1391,7 +1387,7 @@ load_cap_file(capture_file *cf, int out_file_type)
} else {
args.cf = cf;
args.pdh = NULL;
- success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_print, (u_char *) &args,
+ success = wtap_loop(cf->wth, 0, wtap_dispatch_cb_print, (guchar *) &args,
&err);
}
if (!success) {
@@ -1504,8 +1500,8 @@ clear_fdata(frame_data *fdata)
}
static void
-wtap_dispatch_cb_write(u_char *user, const struct wtap_pkthdr *phdr,
- long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf)
+wtap_dispatch_cb_write(guchar *user, const struct wtap_pkthdr *phdr,
+ long offset, union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
cb_args_t *args = (cb_args_t *) user;
capture_file *cf = args->cf;
@@ -1605,8 +1601,8 @@ show_capture_file_io_error(const char *fname, int err, gboolean is_close)
}
static void
-wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr,
- long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf)
+wtap_dispatch_cb_print(guchar *user, const struct wtap_pkthdr *phdr,
+ long offset, union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
cb_args_t *args = (cb_args_t *) user;
capture_file *cf = args->cf;
diff --git a/text2pcap.c b/text2pcap.c
index 23ca641004..5c2fafe809 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -6,7 +6,7 @@
*
* (c) Copyright 2001 Ashok Narayanan <ashokn@cisco.com>
*
- * $Id: text2pcap.c,v 1.20 2002/07/21 20:27:30 guy Exp $
+ * $Id: text2pcap.c,v 1.21 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -95,22 +95,10 @@
#include <time.h>
#include <glib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-
#include <errno.h>
#include <assert.h>
@@ -360,7 +348,7 @@ in_checksum (void *buf, unsigned long count)
while( count > 1 ) {
/* This is the inner loop */
- sum += ntohs(* (unsigned short *) addr++);
+ sum += g_ntohs(* (unsigned short *) addr++);
count -= 2;
}
@@ -372,7 +360,7 @@ in_checksum (void *buf, unsigned long count)
while (sum>>16)
sum = (sum & 0xffff) + (sum >> 16);
- return htons(~sum);
+ return g_htons(~sum);
}
/* The CRC32C code is taken from draft-ietf-tsvwg-sctpcsum-01.txt.
@@ -529,13 +517,13 @@ write_current_packet (void)
/* Write Ethernet header */
if (hdr_ethernet) {
- HDR_ETHERNET.l3pid = htons(hdr_ethernet_proto);
+ HDR_ETHERNET.l3pid = g_htons(hdr_ethernet_proto);
fwrite(&HDR_ETHERNET, sizeof(HDR_ETHERNET), 1, output_file);
}
/* Write IP header */
if (hdr_ip) {
- HDR_IP.packet_length = htons(ip_length);
+ HDR_IP.packet_length = g_htons(ip_length);
HDR_IP.protocol = hdr_ip_proto;
HDR_IP.hdr_checksum = 0;
HDR_IP.hdr_checksum = in_checksum(&HDR_IP, sizeof(HDR_IP));
@@ -544,9 +532,9 @@ write_current_packet (void)
/* Write UDP header */
if (hdr_udp) {
- HDR_UDP.source_port = htons(hdr_udp_src);
- HDR_UDP.dest_port = htons(hdr_udp_dest);
- HDR_UDP.length = htons(udp_length);
+ HDR_UDP.source_port = g_htons(hdr_udp_src);
+ HDR_UDP.dest_port = g_htons(hdr_udp_dest);
+ HDR_UDP.length = g_htons(udp_length);
fwrite(&HDR_UDP, sizeof(HDR_UDP), 1, output_file);
}
@@ -555,11 +543,11 @@ write_current_packet (void)
if (hdr_data_chunk) {
HDR_DATA_CHUNK.type = hdr_data_chunk_type;
HDR_DATA_CHUNK.bits = hdr_data_chunk_bits;
- HDR_DATA_CHUNK.length = htons(curr_offset + sizeof(HDR_DATA_CHUNK));
- HDR_DATA_CHUNK.tsn = htonl(hdr_data_chunk_tsn);
- HDR_DATA_CHUNK.sid = htons(hdr_data_chunk_sid);
- HDR_DATA_CHUNK.ssn = htons(hdr_data_chunk_ssn);
- HDR_DATA_CHUNK.ppid = htonl(hdr_data_chunk_ppid);
+ HDR_DATA_CHUNK.length = g_htons(curr_offset + sizeof(HDR_DATA_CHUNK));
+ HDR_DATA_CHUNK.tsn = g_htonl(hdr_data_chunk_tsn);
+ HDR_DATA_CHUNK.sid = g_htons(hdr_data_chunk_sid);
+ HDR_DATA_CHUNK.ssn = g_htons(hdr_data_chunk_ssn);
+ HDR_DATA_CHUNK.ppid = g_htonl(hdr_data_chunk_ppid);
padding_length = number_of_padding_bytes(curr_offset);
for (i=0; i<padding_length; i++)
@@ -568,14 +556,14 @@ write_current_packet (void)
/* Write SCTP header */
if (hdr_sctp) {
- HDR_SCTP.src_port = htons(hdr_sctp_src);
- HDR_SCTP.dest_port = htons(hdr_sctp_dest);
- HDR_SCTP.tag = htonl(hdr_sctp_tag);
- HDR_SCTP.checksum = htonl(0);
+ HDR_SCTP.src_port = g_htons(hdr_sctp_src);
+ HDR_SCTP.dest_port = g_htons(hdr_sctp_dest);
+ HDR_SCTP.tag = g_htonl(hdr_sctp_tag);
+ HDR_SCTP.checksum = g_htonl(0);
HDR_SCTP.checksum = crc32c((unsigned char *)&HDR_SCTP, sizeof(HDR_SCTP), ~0L);
if (hdr_data_chunk)
HDR_SCTP.checksum = crc32c((unsigned char *)&HDR_DATA_CHUNK, sizeof(HDR_DATA_CHUNK), HDR_SCTP.checksum);
- HDR_SCTP.checksum = htonl(finalize_crc32c(crc32c(packet_buf, curr_offset, HDR_SCTP.checksum)));
+ HDR_SCTP.checksum = g_htonl(finalize_crc32c(crc32c(packet_buf, curr_offset, HDR_SCTP.checksum)));
fwrite(&HDR_SCTP, sizeof(HDR_SCTP), 1, output_file);
}
diff --git a/util.c b/util.c
index 07a454f243..6e6015a701 100644
--- a/util.c
+++ b/util.c
@@ -1,7 +1,7 @@
/* util.c
* Utility routines
*
- * $Id: util.c,v 1.55 2002/04/08 20:23:55 gram Exp $
+ * $Id: util.c,v 1.56 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,10 +37,6 @@
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/xdlc.c b/xdlc.c
index 46152833b6..00383ad05a 100644
--- a/xdlc.c
+++ b/xdlc.c
@@ -2,7 +2,7 @@
* Routines for use by various SDLC-derived protocols, such as HDLC
* and its derivatives LAPB, IEEE 802.2 LLC, etc..
*
- * $Id: xdlc.c,v 1.18 2002/03/31 21:09:00 guy Exp $
+ * $Id: xdlc.c,v 1.19 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
@@ -159,7 +155,7 @@ static const value_string modifier_vals_resp[] = {
};
int
-get_xdlc_control(const u_char *pd, int offset, int is_extended)
+get_xdlc_control(const guchar *pd, int offset, int is_extended)
{
guint16 control;
diff --git a/xdlc.h b/xdlc.h
index 8d17ce4d0f..33b16f861a 100644
--- a/xdlc.h
+++ b/xdlc.h
@@ -2,7 +2,7 @@
* Define *DLC frame types, and routine to dissect the control field of
* a *DLC frame.
*
- * $Id: xdlc.h,v 1.15 2002/03/31 21:09:00 guy Exp $
+ * $Id: xdlc.h,v 1.16 2002/08/02 23:36:07 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -79,7 +79,7 @@
#define XDLC_CONTROL_LEN(control, is_extended) \
((((control) & 0x3) == XDLC_U || !(is_extended)) ? 1 : 2)
-int get_xdlc_control(const u_char *pd, int offset,
+int get_xdlc_control(const guchar *pd, int offset,
int extended);
int dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo,