]> git.samba.org - obnox/wireshark/wip.git/commitdiff
Replace the types from sys/types.h and netinet/in.h by their glib.h
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 2 Aug 2002 23:36:07 +0000 (23:36 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 2 Aug 2002 23:36:07 +0000 (23:36 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7

266 files changed:
asn1.c
asn1.h
capture-wpcap.c
capture.c
column.c
editcap.c
ethereal_gen.py
file.c
file.h
follow.c
follow.h
in_cksum.c
ipproto.c
mergecap.c
packet-aarp.c
packet-afp.c
packet-afs.c
packet-aim.c
packet-ajp13.c
packet-aodv.c
packet-aodv6.c
packet-arp.c
packet-ascend.c
packet-atalk.c
packet-atm.c
packet-atm.h
packet-auto_rp.c
packet-bacapp.c
packet-bacnet.c
packet-beep.c
packet-bgp.c
packet-bootp.c
packet-bootparams.c
packet-bpdu.c
packet-bvlc.c
packet-cdp.c
packet-cgmp.c
packet-chdlc.c
packet-chdlc.h
packet-clip.c
packet-clip.h
packet-clnp.c
packet-cosine.c
packet-cups.c
packet-data.c
packet-dccp.c
packet-dcerpc-conv.c
packet-dcerpc-epm.c
packet-dcerpc-mgmt.c
packet-dcerpc-ndr.c
packet-dcerpc-nspi.c
packet-dcerpc-oxid.c
packet-dcerpc-remact.c
packet-dcerpc.c
packet-ddtp.c
packet-dec-bpdu.c
packet-dhcpv6.c
packet-diameter.c
packet-dlsw.c
packet-dns.c
packet-dns.h
packet-dsi.c
packet-dvmrp.c
packet-eap.c
packet-eapol.c
packet-eigrp.c
packet-esis.c
packet-eth.c
packet-eth.h
packet-ethertype.c
packet-fddi.c
packet-fddi.h
packet-ftp.c
packet-giop.c
packet-gmrp.c
packet-gnutella.c
packet-gre.c
packet-gtp.c
packet-gvrp.c
packet-h1.c
packet-h261.c
packet-hclnfsd.c
packet-hsrp.c
packet-http.c
packet-iapp.c
packet-icap.c
packet-icmpv6.c
packet-icp.c
packet-icq.c
packet-ieee80211.c
packet-ieee80211.h
packet-ieee8023.c
packet-igmp.c
packet-imap.c
packet-ip.c
packet-ip.h
packet-ipp.c
packet-ipsec.c
packet-ipv6.c
packet-ipv6.h
packet-ipx.c
packet-irc.c
packet-isakmp.c
packet-iscsi.c
packet-isis-clv.c
packet-isis-hello.c
packet-isis-lsp.c
packet-isis-snp.c
packet-isis.c
packet-isl.c
packet-isl.h
packet-isup.c
packet-kerberos.c
packet-klm.c
packet-l2tp.c
packet-lapb.c
packet-lapbether.c
packet-lapd.c
packet-ldap.c
packet-ldp.c
packet-llc.c
packet-llc.h
packet-lmi.c
packet-lmp.c
packet-lpd.c
packet-m3ua.c
packet-mbtcp.c
packet-mip.c
packet-mmse.c
packet-mount.c
packet-mpeg1.c
packet-mpls.c
packet-mrdisc.c
packet-msdp.c
packet-msnip.c
packet-msproxy.c
packet-nbipx.c
packet-nbns.c
packet-ncp.c
packet-ndmp.c
packet-netbios.c
packet-netbios.h
packet-nfs.c
packet-nfsacl.c
packet-nfsauth.c
packet-nisplus.c
packet-nlm.c
packet-nntp.c
packet-ntlmssp.c
packet-ntp.c
packet-null.c
packet-null.h
packet-osi-options.c
packet-osi-options.h
packet-osi.c
packet-osi.h
packet-ospf.c
packet-pcnfsd.c
packet-pflog.c
packet-pgm.c
packet-pim.c
packet-pop.c
packet-portmap.c
packet-ppp.c
packet-ppp.h
packet-pppoe.c
packet-pptp.c
packet-prism.c
packet-prism.h
packet-q2931.c
packet-q931.c
packet-qllc.c
packet-quake.c
packet-quake2.c
packet-quake3.c
packet-quakeworld.c
packet-radius.c
packet-ranap.c
packet-raw.c
packet-raw.h
packet-rip.c
packet-ripng.c
packet-ripng.h
packet-rlogin.c
packet-rmi.c
packet-rmi.h
packet-rpc.c
packet-rquota.c
packet-rsh.c
packet-rstat.c
packet-rsvp.c
packet-rtcp.c
packet-rtp.c
packet-rtsp.c
packet-rwall.c
packet-rx.c
packet-sadmind.c
packet-sap.c
packet-sccp.c
packet-scsi.c
packet-sdp.c
packet-slimp3.c
packet-sll.c
packet-sll.h
packet-slowprotocols.c
packet-smb-browse.c
packet-smb-common.h
packet-smb-pipe.c
packet-smb.c
packet-smpp.c
packet-smtp.c
packet-sna.c
packet-snaeth.c
packet-snmp.c
packet-socks.c
packet-spray.c
packet-srvloc.c
packet-sscop.c
packet-stat-notify.c
packet-stat.c
packet-sua.c
packet-tacacs.c
packet-tcp.c
packet-telnet.c
packet-tftp.c
packet-tns.c
packet-tpkt.c
packet-tr.c
packet-tr.h
packet-trmac.c
packet-tsp.c
packet-ucp.c
packet-udp.c
packet-v120.c
packet-vines.c
packet-vj.c
packet-vlan.c
packet-vlan.h
packet-vrrp.c
packet-vtp.c
packet-wap.c
packet-wccp.c
packet-wcp.c
packet-who.c
packet-wsp.c
packet-wtls.c
packet-wtp.c
packet-x11.c
packet-x25.c
packet-xdmcp.c
packet-yhoo.c
packet-ypbind.c
packet-yppasswd.c
packet-ypserv.c
packet-ypxfr.c
packet-zebra.c
pcap-util.c
prefs.c
print.c
ringbuffer.c
snprintf.h
tethereal.c
text2pcap.c
util.c
xdlc.c
xdlc.h

diff --git a/asn1.c b/asn1.c
index fae948743c0c93d4575c544b522d318eb6c11aa0..3ff4d4a77ecfdd34ecbf2e203613c572880def9d 100644 (file)
--- 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>
 
 #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 949611e4b6dca4a6b26dff7a4ba5e480d5923b09..0dca04682065d0d755d14e0c6c6312394fb901e2 100644 (file)
--- 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 */
index 843a63fc4cfb9490295af36118c69a14b3b54421..746c77de986870bc2dfb286e1e691bb185e3e364 100644 (file)
@@ -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);
index 064072771378973ce0b0de4930ec4fb9be6ab229..6578ceddc7a49677d166b3987ded13def28d6d3b 100644 (file)
--- 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>
 
 #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;
index d014bc218ce1f9ef46a7c5872b6d2ae0da6e9bbf..300ff727bad772e335113f99b9fc72be70d2aa3d 100644 (file)
--- 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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
index 4b3b620328e121e59af9e29c0a0223b54a2f4ce1..e04f57d608948866f18bf13ab24da2e57da6871b 100644 (file)
--- 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.
 #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;
index dd98fc4bd530d855b4bce73a5153cb44d03a7cc5..ef2d946bb68584966b44e0845b46e9b013f2dfa7 100644 (file)
@@ -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 b50c929ef0c149f43d0294853ed8c48badec4b2a..88c0bce1efa35d494372224037d154bac9a49fc0 100644 (file)
--- 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>
 #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 615c57f7c9adaaedfefe88d01f9a0c452de48d3c..9c7443b65c04187f6041b7435720f8cf15947780 100644 (file)
--- 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>
 #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"
index c3b5ad0f3f42bb16b3e752aa8f35d1ba5b5283dd..fc385bdd90651b4c71f9561759f86d60ab3094f3 100644 (file)
--- 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>
  *
 #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;
index 6ba6d771612d20581a94d074a80b34d0195fffd5..9d2fc5e957f155254a1b6f16a95c4c85092e6227 100644 (file)
--- 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>
  *
 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 {
index ff07a0ad2c9cb435fa235fc554221c48f98f40aa..66ee16a84345493fef83b8e81111316e5b26c5cd 100644 (file)
@@ -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 $
  */
 
 /*
 # 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;
index cfc4f531fd5ad1dfc0d57c5471f811dcc4f650e3..a6af7740e7f4ddba642ab3e0933c3dba4566ef5e 100644 (file)
--- 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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
index e51ffc48697f2b5e12b23c9e2823c3f9ae31aaeb..f8bff1f103b69f87412db3dd0fc9558da8412eec 100644 (file)
@@ -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
 #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),
index 385f8fe8c03e34afac092042dbf181a1bba52594..da74bd58e698cb06df1ea0a64363144250c2e8d4 100644 (file)
@@ -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>
  *
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <epan/packet.h>
index 60ae11bbe5f7b103bf525fc3baa0a1a081c95d47..66ffdecb5a005353e810e37c758130cf2d981b6d 100644 (file)
@@ -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>
 
 #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
index 7b62228ed069f2b714ff05e856181394cfdf1a72..d19ad71d046be5a06d89e853a99ff29c86992f10 100644 (file)
@@ -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>
 
 #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>
index 141b64dd58e7754975aafe246c9a91e5f4e28d99..83991ba44cff562dfe00305961b54538852d59e5 100644 (file)
@@ -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>
 #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;
index e0e0e434503bbcedbf7757192b34673626ba89e7..b35ff852f5c87d2ee9be9663bd6f244a92789f52 100644 (file)
@@ -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>
 #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>
index 5b04123353ba7b1e0fb1131f2e8a0c06f9e081ab..01123b4237b678fbf66c475e3bdaf44c902e87f9 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for AODV dissection
  * Copyright 2000, Erik Nordström <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>
 #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>
index eafccb8c6216e8251619c1dc1a4a9bbd481efb23..d11a85f6d3f691d92b98df2f339b08091f5058ee 100644 (file)
@@ -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>
 # 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>
index 3fd6bf47b2049aa6098a63858c91580b0b5ec902..20139cb9f20e7899b066217dcbac5cd5a2452404 100644 (file)
@@ -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>
 # 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 */
index 5e196ff92ac578ffe156d167d41ffb3273842ee7..700ba9025b573ae3e5d82c156272f056d6f9a8d9 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <string.h>
 #include <epan/packet.h>
index 857284cd52fe9e07ebe353ab43112c90acdfcd79..0410572dcb0de171688763ad928eb96281dc8c54 100644 (file)
@@ -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>
  *
 # 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;
index 889264aa2f43c7204533e90b74744d70da19c3e9..88cd16095b9277d329625201e651a1ddadd98135 100644 (file)
@@ -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>
 # 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) {
index 3c6be61920a246a4c76124bec3a3c4020e53a975..27c69b3935c17d071825344a81f26193e60b162c 100644 (file)
@@ -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
index 9d9647270f08f204d93eb0250fbcc07c15c4484a..3a38c86bf7876232ed5cd83846e0a2dd2039e4a2 100644 (file)
@@ -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>
 # 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>
index 8c4dc433f7007f9902806ea146b67b2d8da66e68..6eb2e5bab34a38a3b405de15d5e852efd9be617f 100644 (file)
@@ -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>
 #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>
index 7e7788c981e40aeabad50ecfc63e9ae810cfe48f..80f7c6c65afa82779f03746525f056bcc04244c2 100644 (file)
@@ -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>
 #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>
index 7693cb9e3b70d0f1b3837b4aa9bba6cea19b4e58..1cf841b4a0ba8029d84238a29e84dec46fb1153b 100644 (file)
@@ -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.
 #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>
index 6c98783a73599ef9eaeda8b5953727e133e23f4f..3a98850eb879902229b9b2fc56fe0ccd785eafb1 100644 (file)
@@ -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)
 #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.
index 24fc623b5baac58dbe496c166fffd92eb0ad806d..4382305e1b887b45389dd24099f016ed4e8b826a 100644 (file)
@@ -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
 # 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);
index 1a18b586ac2c3dd867ad21cf1f4dbf52d04646f7..387762b84960b7530f89fb6d6cc538341229d070 100644 (file)
@@ -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>
 #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;
 
index fd339d997210e42066f5178c36602490467af0b3..6275a28406e69a2afad21b17d6dde6ee1f1850b6 100644 (file)
@@ -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>
  * 
 # 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>
index 232a60fca286fc1b71188a91d63d1f9cd3670284..8e5ffa90cdf0ae1082b4edace4b7afd3920acc3a 100644 (file)
@@ -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>
 #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>
index e98ad8480cd5b324084e9bd9e2082ae4165b544d..593800ff17e0270069e6b370679ce27ffea7a8bf 100644 (file)
@@ -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>
  
 #include "config.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 
index a3484ac2f50eab37df20af1e35d19998df5e6a15..df648f3fcf0484f9e447ed23da74ad9d9faca549 100644 (file)
@@ -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>
  
 #include "config.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 
index 1ba74eaaec1d38cba79c45a8fb06aa51fbe9c264..493907e5c7c2c4443c8944ea467074654c090f3a 100644 (file)
@@ -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>
 # 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;
index 166cde08436ec080c8b2e191b0e849fa8e774d7b..a722e0b449a0d840ed555ab17c711f74d74be8b3 100644 (file)
@@ -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[];
 
index 114c191dc041acdcac7bef5fddf2a44784255871..b7d469d06269962325cdf03c5750c309bfbe69dc 100644 (file)
@@ -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>
 # 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);
 }
index 3887756cb12aa05914e913dac7e53cb17a3e5114..a9bd33810a9c19b901b8bfebe16476815add6208 100644 (file)
@@ -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
index 7a4f5724b00147cebccddd6bae437e2d77b1c739..7b3d253ca722b36e6e6f64ffbd4e793b223ce65b 100644 (file)
@@ -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>
  *
 # 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;
index f1ef69a2fc99bbebbca851d9659f84b0b6fc65ce..ba2234c2b7a4126c4265730b04275ccf260a5d67 100644 (file)
@@ -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>
  *
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <string.h>
 #include <epan/packet.h>
index 20f1c4f06709b18fa8dade0d41d51120c179cd6b..d52a2d8aeae0f9974b70ae9b7f37954d6e4c581c 100644 (file)
@@ -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
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <ctype.h>
 
index 85cd590b5e9a40c9d6115d5c4efe4d6f9b76763c..3406dc96486b75292223b428e3cec8603d7920df 100644 (file)
@@ -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>
 # 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"
index 435166b1a2b48631f6e91fd9152c4cb10ea4c5b4..1ac7db117211268d9312671855962a1cea1553af 100644 (file)
@@ -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>
 
 #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>
index 24e0e5a8178eb84f6e0c728efaf4c5ef49117de8..e94dd1ee19d3b62382be65f9eaacd47993468949 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index 22fe50acbc0a0f53946994b95f45ffff795b4eed..012181686079529e29bd165f4ed1f883b2cbbf82 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index 58ad9d009e2497bd6f4ee76cc732a5831d6b9eab..372001c9c8d3a4d8a4d26ac126e92fc37720ae3c 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index b490c7d802e36822b454ea5a74780f21d09869a7..26fa720c7aad7418c735dfd6c622f92dc4ea2242 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <ctype.h>
 
index 38f6fa9118fb8a5d99c926d9f9b883c249f51ee9..1ce17b528804a6f9bb1572c9bd9739fa4a2575e1 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index da0f4a823f04301a3c4aea2132f978c627c63d13..f36609da10189419da5c6cbb926e2a13ec704858 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index d8a2133e581ca548b578ed5cd001ddca60c1c154..b7ae1c94df4020573300836427f30c64ce3719cf 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index 1f6af042d38a2216b7b5a6f3481ed742ce419857..82cb0ce26a3be2fa04e576cba2479b126497571b 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <ctype.h>
 
index 2b9bc813164df060a04872a6f9dde9ff3b2e65fd..ad565d360b7e1d2bb6b242a384b6ccb2354f071b 100644 (file)
@@ -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>
 #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"
 
index 04848763bfc5f300d1ff79e8492098ee46e75152..b482a1f353228b608b768739bc00260a78c885e4 100644 (file)
@@ -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>
  * 
 # 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>
index a6648e10e29d696f41154e7ff0c8e853adc37204..effb37cb7ad9f98360db21169a9bf1cd30c336d1 100644 (file)
@@ -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
 # 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>
index 5ac5e62ce0e947acd39c81f6502123c0f3998bdd..2b1707d8ad05e2b82757a0db471324aafcdf5d38 100644 (file)
@@ -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>
  *
 #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 {
index c9acca141ff950d21e338877b367f3a85269b882..4a3e3677f9fc716a8f2b02f80b47e2c94f4e5237 100644 (file)
@@ -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>
 
 #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>
index e763fc26342b73455fc6171150bce3486e1f638d..df25723a2d3b2d7067010fe0c27cd8d0c31c5f04 100644 (file)
@@ -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>
 # 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;
 
index 9fefd80edb9181817579c812c9edf36a7aa2209b..e62555a72c5b855c2c1898e3433fb3c53b066bdf 100644 (file)
@@ -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 */
index c39499925f3585a66b53aac86e51bfb390a767c6..2f2be1e30450df0541d5ecfed836551f820a4e50 100644 (file)
@@ -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>
 
 #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>
 
index 6d35c32e5b681f6c06752df58dc0215929074076..1cd3c351d403910c35126843e5a501c77930f5bd 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 0b382f464dada468810cd4e6e768d487f9ca97ac..21944279f0f73189cb6d49ddd733a532c7643740 100644 (file)
@@ -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>
 # 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>
index 04fb53040db87b156187941f10e76a9013dcc752..7c045d0d2a10c0279063b3833589cf98f7ed58c1 100644 (file)
@@ -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>
 # 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"
index 8492c145f8d2abd9199038ee26211d3e6f74bb07..fb75e82a71190609f3bd3d40ff315568c65e44af 100644 (file)
@@ -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>
 # 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>
index 56664a72bb102276d8d5541c8c15cc8af763ba07..f1d2c9133f80bfc31932447bb4f556d9c656b6ed 100644 (file)
@@ -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
 # 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))
index 87e9749c9f5f5c4480f2fd00ebd4bcde4f8bb360..2686c4cfb7a775a48eea4e51ca6e1c40892d6b80 100644 (file)
@@ -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>
 # 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 */
index 48ea485bef61fa8183271042ea740c3ce36c83cd..d4632dd00215eee9a8aa30a87b39c7b547c68ae2 100644 (file)
@@ -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
index 2ee8b8a10cf130c530022b40e7e1f7bf9f83ab62..9c783f799eb01c9507f13f7be68571c5c95a905f 100644 (file)
@@ -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>
  *
 # 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) {
index a17803baeb3d385461236051c3f7ec00a9a3e272..e3ec6a5d9e8125ffaf4afeb49bb220573e862cc5 100644 (file)
@@ -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>
 # 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? */
index fdeabd0df0a349746e4178b6f1f45b9dbf45e788..e886c43f15d62d86efd615134cfdfb2cdc79c122 100644 (file)
@@ -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
index 4c3d3d5fe8c9ee84f8bf0a8babe0b970782103b1..c49a6d67459a2b5432f90b0d7242cbc30bfeaf50 100644 (file)
@@ -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>
 #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;
index 09959b6853307f58bd585d170873ccbaa6a6f3c3..6709c9afdd6084493a478553a2759ef8781dc347 100644 (file)
@@ -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>
 # 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;
 
 
index 69987436be0c9a386e90c3c3f44bdae0ef86812e..7e76bfa789f7f1e1812395f41d8ac44f7d077908 100644 (file)
@@ -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>
 #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>
index 757324fa96dddf1e5a740638ab509d56191cae24..ecd2696d2adb6736f22daa8bb0141422b94d614b 100644 (file)
@@ -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>
 #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>
 
 
index 6d32b48eabcd66aeacc7d99a249b40c70f4ea686..b82aa03ff447fa36b0ca35e9725c9fe501f0f584 100644 (file)
@@ -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>
 # 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"
index 7a55426ddcca4abf34b08808ecf1b3983a127363..e7fc418987dd47e8570dd9b575ee537797259ee8 100644 (file)
@@ -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>
 #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) {
index 0a3958bde8a61eb71ca98909553d02516d2a2506..ce83ad94dbed49c5e184468bd6769d60c44bc5bf 100644 (file)
@@ -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>
 #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>
index 764476dcc8f2b764d4a73d4c813951a87e437903..28a6efa0232b0aa4d91f1b8f27cdf530ebcbe4ba 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index 51652a2aeb291ebd2bff57d3556ade8c900d4bb4..4755a5ca1fc9e96a8b960651318aeb3dfd2c1d0c 100644 (file)
@@ -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>
 #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>
 
index d7bc7435866916f77a8b08dcb0c97d6c831ad20c..e66788d9019b7c134ca68b14a45e4a13b1228cdb 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include "packet-rpc.h"
index 6b6976cdc8e62b65ed332b9f4389b77fea43b187..b40299f7a4ef3da6a3480f6a9a4c0ba9da71bf84 100644 (file)
@@ -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>
 # 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>
index 466a469f00448049144984b96d40b978fad8c49c..4a91f8d1c0b5a88e78ef630c49f0308649ffcc7b 100644 (file)
@@ -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>
 #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 */
index 8ce7e6bad68a92e179580ff8966c461d1d1c4320..f78660c5762dec1c631a04b9f23fdfee0e11374f 100644 (file)
@@ -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>
 #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>
index e3817f38c11b310cad0ac9592d51a2b5a7543e30..bbbf367cae15d442378214c2d9114a4c39b40b12 100644 (file)
@@ -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>
 #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) {       \
index f694ffa5a6eedc6811b68ada9c075157ce18501d..7474dad9828a49c4d19d8cca7d94aebda22be6ff 100644 (file)
@@ -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>
 #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));
index b7a055fe68750d8dcec46c8ad9e5bfab835b70a3..835d59f090bff35401d56f3b82953b9629f5b57e 100644 (file)
@@ -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>
 #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>
index 7124b1546198b13df304657ff5bb4d58cf04851a..50493cd8a7fc484dab9ffbf0e12f2bababfa8ebf 100644 (file)
@@ -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>
 #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) {
index a73d0186febddf27167582287aa50470bdb38873..49a6be410d7105a58c7d82f03a8a3d21a583a589 100644 (file)
@@ -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>
 #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);
 }
index d07bb2b239a31e7aac7eb76d8558b5f632f0b062..639438af245a1294b6543782aab6044dc8700bc4 100644 (file)
@@ -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 *);
index d7197b61e92cd9cdba73538ef1914df83d463eb2..dce8f4c7b1047e021265cd19524c54397527f341 100644 (file)
@@ -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>
 # 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"
index 397cc160638b5db822a1bfee178b823393573121..d289312241b6857128f36512629b8f6a57a854ec 100644 (file)
@@ -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>
 # 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);
                }
index 3538b840cbe8b6dd5a914da45c2a76524c70478c..91510033db39bca8866e5730653b6e7f332ca254 100644 (file)
@@ -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>
 
 #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");
index 2e44e2e8bc54c1fe5fa8e89151700beb4215d8d4..62146c9d3f3322de40a1df9b077b8f9cfd4df5af 100644 (file)
@@ -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>
 # 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;
index 907e16cea95c0ba3ba2c872d72a6fc1c9863c478..8779b1103333646fbb921bec531e813633ac73e2 100644 (file)
@@ -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 */
index 1d775143fb59585ab2ec7d88a86115903045bcea..c075bc6feb596c2c505ba63cbcc65afad55e149f 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <ctype.h>
 
index 1e1e6fcafba7b93b821cf857e9111080b7beb757..f919bb334d8de72ea76b71726652516b59bc56cc 100644 (file)
@@ -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>
 
 #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);
index 353a993c476acf85c9afa9a3ceb9c527c6b8f667..d058158417b42a05c9a059522e61c1ebf7927f78 100644 (file)
@@ -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>
 # 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,
index 899dafb1ed24900ca1266378230bb1f1713efd62..0638123fb8d6296e83d01898ddae5e27be0bf1df 100644 (file)
@@ -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 */
index c1b6e46e92ac358bb79c4d4d732e2ea4bda7491d..437ac0dcdfd1194077ad61a66d517c54021c05dd 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index e2e6eb593f69d2219f40363def8bf5b384e31955..cc1c476a1f6055d9fa9df39b42eef3e9f93896d1 100644 (file)
@@ -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>
 
 #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;
 
index 84244a0e0ab7caeb6adb7abfd131443fa74cc6a5..4e99984e642481b9f280f49f92a99dd63be7e6e9 100644 (file)
@@ -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>
 # 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
index 5b6b40228d73ff0327af122d1eeded07af77d273..8e321f184c44ef8884586e9e008d79fd9ab36593 100644 (file)
@@ -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>
 #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>
index 0c3e9f70f910bfadca3fdb45de1194956d425221..973fed8353afce4ef4c2d4712568b699a8a15656 100644 (file)
@@ -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
 # 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;
index 8351104d34273fc0800fd15895b142bea37b1cb3..cd9b0d3335950143da9a471339f2c6818842401f 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 5951d4a6113362ef7942ac3252f46c22d20548a6..2e4097da839ed19de75e4e9a274451eccf63b6de 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 0c7682178603146cf78909a985e16f93b4aca025..4c22b36214c878501ea098f3392ccde68ac586f8 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 1c2caf6e058c829f682497fafc30c6609e6a9551..fed99e7fe926f7e811849e7fc3d6182c93c50039 100644 (file)
@@ -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
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 5c7e0c637440dddcc8cfa2000cb5db8cb776cbd9..d53551c2c65bf36df8eb2fe0f914b9f3977bdf18 100644 (file)
@@ -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>
 # 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;
 
index 98554572be2194ac4e03a61ae34b5ec16c703926..2d81c3835a92f7837b81cb8986883db670734396 100644 (file)
@@ -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
index 15230a60a04a4bda2b49283bf4c48c66caa30711..c27c4cab4d565af49061876c5709c6de0f2308cd 100644 (file)
@@ -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>
 #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>
index 38a10d0011300cd01e446399b08ec1d028c2d6b9..0b5308c4c57ad785030910c8674a885667c229a7 100644 (file)
@@ -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>
 #include <string.h>
 #include <ctype.h>
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 
 #include <epan/packet.h>
index 47d93df7607b0b7a07075ad462270bbf9eb2de75..0bc653aa69bed111ef3cf31ec982f49e477a2213 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-nfs.h"
index 5630d9b4773ce34eb1ae9b09e24fdca6146803c2..ea3b4646b627f546358517b3cbe5089251be3818 100644 (file)
@@ -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>
index f781a0c78b47f6a939cc85ea7948bfd992cb6f6d..ab6855f81ff4331482acc033d02c77adfb3187a0 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index 2b8cf59f48c7ddb7ea9ec0f09e20bc17e9c0b93e..e3623da372847cfaf62c5498c2172b8a6718246e 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index e5a013756e2f9263b4bf527a641f5ac029f6074c..9ce4035585d021b90acc31fb8b8eba60fb9be2c6 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index e4146a2441d59537889d515ada45a3bec340cd09..88ffb1e0b76487b39ef65363de10f29f843ce533 100644 (file)
@@ -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>
 
 #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>
 
index 3bcbc19c95fac3158b88ad78fe2fd8e430400946..ae2eb886f19ca4ed1df32d2f582f25177272f378 100644 (file)
@@ -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>
  *
 #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>
index 2557214cb98e06fa90160cf17727a44a41aa8166..a8dcd82f0818dcb110e12bc036048179a6e1df88 100644 (file)
@@ -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>
 # 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;
index f6e9bcca22dddf2375605cd7b9d7046ad8ce1e66..45b55f3afca3a76ed9885c7f6f2ec1b5408fb961 100644 (file)
@@ -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);
index 460c7881191b89f72ddd5200e4101173a600e3fb..5b7b125a0fbd1c54c6f4e1a2579ca932d529a0f2 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index 0fa0d425139c34724ef2c5f4bad33cb9474d52b3..88b20b2f9ea2602c6959b970ad81b0e4f61f35da 100644 (file)
@@ -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>
 #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>
index 9ac551a03745d1aed9fed1a3b6114e05d0dd8c20..fbd0cba56620a732db2d6c122054453abb0897e3 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include <glib.h>
index f59168730b9ba0917b5eb6458f201d53fe161c89..607e85527dae9ac19487851e49e926119335f9fd 100644 (file)
@@ -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>
 #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>
 
index 3987bb1107b085c863ac755f75b7bc972d514aa0..4ef65e54f55e747e9c1c6ab9e6e532008cb800f0 100644 (file)
@@ -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>
 #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);
index a3940d58db2822d6c76f2de3e8465150655d19fa..eb9ea4da8584427351439b4eb7f8f9bb70a5b0a9 100644 (file)
@@ -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>
 #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>
index c474ad52851331854a5dc7508b07bf502babbb48..b2fa2b62e7e2c07dcfd35211f7197c24771372df 100644 (file)
@@ -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>
 #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>
index 56644c8491edb9cd12a8378c120c157adf0ca3aa..ba9ebbc350206214224c90ed293df477165c7e83 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 #include "packet-rpc.h"
index ba5a14dfe14bf1bc3872a2907331887e1c28cbfa..1f3901592d6cd7ee9df72099d569e394ebacd6ca 100644 (file)
@@ -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>
 #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>
 
index a036cefdbb69fcf3ab83771307c6c43365d23949..051c510acbdec790faa62070640f095ffa9427c4 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <epan/packet.h>
 #include "ppptypes.h"
index e5a42e3be4037b2e12b04c484a72f7166c651118..c36005920185975469859aa98a04f19f04d1d65b 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index e38e5cdb186db27db1861241703f483abcb14731..c97f2c1d27df0953aeb1f0d4b7f6cf429fda7a84 100644 (file)
@@ -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>
 #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>
index 4d2862eafc4e781159a705129f743c481127802a..0f0829255427a3c9838f71cea3709c6fc4d48fcc 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 6db109a584912283124c2d89c37e21ddae3b576e..958c3c1fdfc23146f7d3247ff8c1cbdaa1bdd483 100644 (file)
@@ -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>
 # 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;
index 26c87869b6f86d26e70951ee72d01da014e2588f..59607a38cd59ecf3a020d8319095aabd8425c885 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
index bf8406554b2a6ec85eda0fb1c293c39190bc546c..717e26346ec767744f5a4f9eb8c4a71770fa1035 100644 (file)
@@ -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>
 # 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;
index 2283d02393febb91a1f8688c0469df3a63a83ca8..856fd78a100d8c728401bccf638184487a96c91e 100644 (file)
@@ -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>
 # 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>
index 955616dcbd08b868f898d84666434dde62d88f70..b81ad7020ad292e6c2fd4a55cedd0b2272143198 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
index 22b6ee90241bced0f8ea8b592b998d2ab64998de..bf39a48fe43a7a4fb00587410404cf72debdef86 100644 (file)
@@ -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>
 # 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)
 
index 69f0303ae35169195aeb1f5e15b4cd4baf824d09..40ecbcc7f19c990e59d7993bce9903df50af481b 100644 (file)
@@ -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);
index 364095b2a75e7fb2f50669e0b7374ce68dd39e67..33c58cf88e4ad7c039dd11b1851675c0f8085ea7 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 
 
index 12dc6d04f08b69287639c6a7ce7f42c0d4065e24..aa98d4d7375e2cc190646e8f42721bd01f51ac67 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 
index bcd07676d58a564b888822e42f0c961acd98974b..2b0b4b7774c9e17292f4e1c495cbe344c55a0104 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 
index bb0f28799d795f4047a366c9674224fc8c191f6f..033246bcaf68abcd77fe21aa6e01149c57b0647c 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <time.h>
 
 #include "packet-rpc.h"
index afb5a5186eb0924202dbd7a5954ff5d03edeee92..17154de517de28c3a5a2e6ff363abecdf4a25f0e 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-nfs.h"
index 7f78efd2d91c00fe0f3e27628e5a9457aeafa6fd..f492f5791fadc7361267c5aa2e7cae010ea93949 100644 (file)
@@ -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>
 
 #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>
index 01e090a5c504c48c61e2712a30977993788c46d1..366ca3f944cf26201ec78673bd48e1106bfbb682 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <epan/packet.h>
 
index a01f30227e43995abbe471b0a8d2c7808663a6d1..4ca885e1f26efcbdaee59b618c140a83a1b438da 100644 (file)
@@ -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>
 
 #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>
index 8d0974592a8fadcef367a320cc9fcf8d8d04d4d5..75c2146d446848e1399dbaf458f02234c7348d76 100644 (file)
@@ -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>
 # 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;
 
index a1b387e380f2286b52546fb66b4be8ef951ed25b..ebfbacdb26e16e92eed6de3b719c405041590eae 100644 (file)
@@ -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
index 0f950a9e32424681f76a04060ed8bebdb978997a..46bba99d42cc57b82c02cd7b5808e735f04a8ded 100644 (file)
@@ -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
 # 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) {
index ec58117d8a9a5899313b1cfa80a703dd25331c5b..afe5ef7850c538f0671df38391181c9264f74578 100644 (file)
@@ -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);
 
index 9f74a753096c5feda24cc33e66fce334a648d41b..643bba0a411d54c4a08f0d7b1e3295379ea2e07e 100644 (file)
@@ -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>
  *
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
 
 
 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 );
index fa132845522d12194e79b9cb78319811bc5c1124..b929e02cfcc700977e512b1e1e3c287394b3a5ab 100644 (file)
@@ -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 */
index 9844fffe62c81a412acd03b710160c14d9d0dd55..5059a01d7977dff9c5e26d1375db3e916b4dabc6 100644 (file)
@@ -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
 # 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);
index 93e36681c2c5d62a7b61018121cc9b1a9f0c144e..ce79d28ac9ec8507d6eb700b0210f3c7f6a40df0 100644 (file)
@@ -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"
index ee7ccfb46ebb61d675d58cdaf873283233ca2d89..4a4bd60fa7956914fc74b8da97326c3853566457 100644 (file)
@@ -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.
 # 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;
 
index b41fdb406457e92c807490779b836be94433926b..5756209b02eda1b23ba13cf395f71e9fd10ed450 100644 (file)
@@ -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
  *
 #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)");
 
index 480410dd7bcb66948202c9e13d183170026043e1..3639856758b13f547718fab4ca3414e393a17a8e 100644 (file)
@@ -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>
 # 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;
index 4bfb96a775e064c49be0de7ce02e5d7a02fadb9f..5b7227249ad54c72df885fc2127a0fd9ee607661 100644 (file)
@@ -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>
 
 #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;
index f5ce917ed4b656a7257bfd03add53a4b2a8be801..b245d7641a75a3bf811cae709431815c4d73e407 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-portmap.h"
index a3688b10ea8a6d0113777aea772d1a2848282584..f28a173e2f732d4ce91a3f2d98712a5d31403424 100644 (file)
@@ -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>
 # 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;
index a0451e8b089d611bd6720b5f3287045415bf9784..8640ecd83d9fb457ee4fb19c229950c56cfe6215 100644 (file)
@@ -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
index 3e69fc3bd03f7bb9cc446e8f6cd00a9eda0047c4..6209e84926837dde1892ccea450d54500b277dc7 100644 (file)
@@ -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>
 # 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>
index 1f8bb7c3c076c3d8b6035f06bfa2bb3267066d90..a1b9eb1fc7018f8713e28c0c5d23bf2621c6e263 100644 (file)
@@ -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>
 # 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>
 
index 0de8b4e8caefa19714b07755e8f9e31d56944612..ece8002dd8ef6385242a8b508304dfffe0e07c2e 100644 (file)
@@ -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>
 # 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 ++;
index f17cd190ff6b893f29864d5e5ccbce11facd40c0..eeadc0e614727981fb4faf2f47a71cd70b5a753f 100644 (file)
@@ -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);
index 4a0c49fb21ce110565696afff9e2d52d2c03dad2..1c423878cf5399f3a1e72d7f2af1d75ebd998fb2 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index 7dcafd271d577bc52e97208e96633f8631f66313..f0833764e9866884cd54e1b7d980e2697c69c324 100644 (file)
@@ -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
  *
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index b202b4b1b32730103f271c065b651bbfc62d04e2..c36bfc39e797d1a0b931b4a33198a6b14c47636e 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <epan/packet.h>
 
index 44d60600755fe9deef272bfc1f9961aeedda840a..f18a0c5a6000352499e4f19d497984dfd4726049 100644 (file)
@@ -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>
 # 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>
index 636f1d76173f6ab26f5c37d1be665a11ef47e252..7fc3206469ae4566646246ee196304f4479b96ef 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <epan/packet.h>
 #include "prefs.h"
index e8d2a0c578095b830025f64d5db79583f9e97356..fd39ebb1b13701f8ae445036a6d3c8d9768720fc 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
index 3ec2730fc9fa18df4814670e055b0909614c252e..88cc93278b3ccb592e49d58b59b47b29046ebc59 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <string.h>
 #include <epan/packet.h>
index d5c22de0358fdc3f3f879c91635b66c0c9630fb4..847e2d0ed00d93214bc15b46b377ac964f11bf75 100644 (file)
@@ -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>
 #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)
   {
index 8a6f93c1838c6476269b5bd54b59879c7dba018a..d5d8f46786696e0a4f41966e3121e2bab69cdcd6 100644 (file)
@@ -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>
 #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>
 
index 8eaa66a1f132bf8b289a69238fc5c499dcf5ec9e..89311925116a05ba9497ea31f1edcc31d35c6cce 100644 (file)
@@ -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>
 # 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
index 1fcfb878bfd6d8fd2fb27060f3348e21ea6a42d1..424613203625f64af076b107624647c683c46e75 100644 (file)
@@ -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
index 1e536147dfa949d89c7366f562f88dd6a7828056..ee268ada9aa562cc62d3369f328ca0a16f0eb3d5 100644 (file)
@@ -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>
  
 #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>
index 0e136e1ba07e02a108b10a5cf59783addebf7502..51af46f4cc8e238e654083fe5702e1db483b00df 100644 (file)
@@ -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>
  
 #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",
index 518a1478256b6e5bc1b0ac9d92013685927feb8d..91ecfa05888e32becca68d8bb8ba02bd9d6465b5 100644 (file)
@@ -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>
 
 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];
index 1b36be4d72a41d7047637b908fd36bd00102ca53..e49fbcc5820e1fcdb308a382bcdc2b2e9788f869 100644 (file)
@@ -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>
 # 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>
index 3a630bcfc744503011f51d4fa7d925f475199cb9..34ed1a37933aabb3cdadd4422ee9b4923df199ad 100644 (file)
@@ -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>
 #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;
     
index 0b404712cbf65d57fbfdb9666fcd1493168d1385..f62cd90f85bbe0d9145093c340db934579f86f45 100644 (file)
@@ -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
index 107836cd3d63ad89a9d71e9a5720d7043a92a843..8431d02dc4f7cbdd9abdefc6542895e110a668b6 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <stdio.h>
 #include <string.h>
index 6616711a7f60b6b322fc11808d1d4da3c2528ac8..43acbe8b82071c05c9381f7ea05668763674cc93 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-rquota.h"
index 1e760c8d167c9f6a01ffbe7bff75668de8dd0d11..93de7a561ad6125379117f284c1c2c5c716cf32a 100644 (file)
@@ -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>
 #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>
index 29d733df2ab2670e281214fd80335823eef11564..92ddd24d355e8096547ddda7a7a93e480931ced0 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 
index c1f76a4a82203438c609932a9139afa0b09369e6..86c884083ef940a0727cdaf932f4e545521f4b46 100644 (file)
@@ -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>
 #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
index 351f2ebed0c4898739bc61ceb1119382ae038bd9..b1efa55c49d576955d6d67b26271dc0561c6db9a 100644 (file)
@@ -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
 #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>
 
index be37628d792a5225ea2799cd9cd8f51f5f276149..6e353836b6fc8924db72d13708164766fec8cb14 100644 (file)
@@ -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>
 #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>
 
index 4b11d986ed6c2d62f50104593fa19aea687a0a26..6b8c57797eebe1ecfeab4edc3481e0eeb7596fb0 100644 (file)
@@ -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>
 
 #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 */
index 7567cc18dc0d31da1a41e56ed40330c5b639a0ba..ad63a4d21eb09755ec6bb3b15316d304a9f11ca1 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-rwall.h"
index fcd0377d49be3b9c28749396cadf315a5a7e422b..c5eb401a9efd9acffcb63c4b5b929a1471cdb86f 100644 (file)
@@ -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>
 
 #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>
index 7ec7a7dcbb24c1f3df18e167684c08251be0d99d..9d3526069599ea862b909432cc1bbf7f48f26ca6 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 
index ed434cdea20cc7545ae1ff7aa58229c03682a089..85574f6def6a79f03f81e35fec9935920f6ad336 100644 (file)
@@ -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>
 # 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>
index bf83bb92bf45278002ea8dec4fb9e3092c0f0049..239470c0cdf2756c66af046fc9eeda0686c6c5e6 100644 (file)
@@ -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>
 #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"
index 9a78a4e895a99b264d5524c544f1a4a131eed8e7..076238d2b23f37f360d9a211703799a8db5784e2 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <string.h>
 #include <epan/strutil.h>
index ce731d5e9a3b475ca1665d08f8545430081c6f28..f2344094e2b44e66ab548c2857724c72cda172ee 100644 (file)
@@ -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>
 
 #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;
index 90d12634b1da3f4bcf647b9cfeea989315f8756f..56f3971f6ae2ff49b61c96dc9e190e0a512df2aa 100644 (file)
@@ -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>
 # 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>
 
index 0569d34d9d2d91533822f4c508088591fbc644d7..8d3d31e0836827dda8af090b88c27f5d96d5df37 100644 (file)
@@ -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>
 # 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;
 
index c65fc34f12ed9f7285e3106149966d70f3f286a7..1fbb52b869d10758ea8de1066a7942bfd19d3258 100644 (file)
@@ -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
index 1799a7142b51e30d6d9de0921037c5b0907522b8..c58f7fd00a0cacaa21e4460f881255105bfabcaa 100644 (file)
@@ -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>
  * 
 # 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>
index 588aec31b57dd70749e7ee538944a516fafe4b8d..728b48072074381556d03ad6b5d523a17aef6f60 100644 (file)
@@ -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>
 
 #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>
index 023d8b699f1c122ef5d9a12ac522fedd8343084f..dc4658d9455609b881f9a83e943194e58a55faa0 100644 (file)
@@ -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>
 
 #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>
index fc5cf59c12053578f14a7a11de4d88c67ca498f4..301dec19c464e0de2ac92d2afb2d583d83e19bd8 100644 (file)
@@ -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>
index 806a6b5ac4b54ae74f68daebda02e65cffad0c1a..a0e852f45ba0edae9af0998e55de93e4d537673e 100644 (file)
@@ -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>
 
 #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>
index 0ea9cb7b9a720e114cb8f4a97d5a48f818c1706a..847f905f4a980cf107af9e949be1b0610a88a555 100644 (file)
@@ -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>
 #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>
index bca97cb45314d1caa372cc28fd59c7dfde6d8329..5a1da4476ae015f712d85b8fd748f456e670e274 100644 (file)
@@ -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>
  *
 #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;
index 704ec552007096ff443718a43596e36d3a751ed9..429eb99569fd03da299bad4ae747a0ddef3b1408 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <epan/packet.h>
 #include "llcsaps.h"
index 9a0c2786bfaf538efb8894a76cdd2a8f7129211c..e82e567c8176fcde30f4caa94587185a03e92584 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <glib.h>
 #include <epan/packet.h>
 #include "etypes.h"
index 052642af9fb043f62db72163c4ac4c01f205c8bf..e5bab4bab9ba84bb4e1792f721cac8dbd8959069 100644 (file)
@@ -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>
 #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;
 
index f8e60994883b874148292438aab8fa29d4976cc3..a623c06b1a581d1a34985d5911c03f854ece674b 100644 (file)
@@ -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>
 #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 */
index 52671dafd10e7ebd6f863656527bec9ebd5be8fb..12ec46208bc26aab23b4084f8ce90abcc1b1612c 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-spray.h"
index feea3b73e960d70484f4416f4b3cd32f22855ced..293d0bbe7737f40acc92597c46a1438794a9d0e0 100644 (file)
@@ -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>
 #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;
 };
index f9658922d4d85180e4952ce4315a7439a39782d8..e54a2251bd11aee13924b192bf4ab7951bcb90b4 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index 065ecf7a4a1d6127205c6334716b5d5305400800..f8375409f22cf940b281fc3fd022151f66025650 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include "packet-rpc.h"
 #include "packet-stat-notify.h"
 
index b659018d3067b8200f4a480c467d8eee17b17589..ae6c6ce8909bd92c930a6f68c1fa8495190dc23a 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include "packet-rpc.h"
 #include "packet-stat.h"
 
index ddaa5788f41e353eaa6e18590fe29c2556ce4357..0d7c8c7361d3703fe80d45cc86ed021af117ef32 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright 2000, Michael Tüxen <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>
 #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>
 
index 4932883dfd59600fa7706a1379a554ed5339ebd1..4f399ac6823c8342ad34764db0d1955aad270b9d 100644 (file)
@@ -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>
 
 #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>
index 3bf46c6323e0799025be6eeec1a6100bb65e40df..8f775f216e8e1e17d63dde8f987dd406fed02315 100644 (file)
@@ -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>
 # 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;
 
index 41bc328e4b78cff93dcd80042b281923e7721af6..9fed183de3feb35c21bbf2525276567d211fbccd 100644 (file)
@@ -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>
 
 #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);
index 38296ef4c28c3163763c3685cae1d08996d3c8ea..659541db41a84294df58b9656b3b7bbadb373cd5 100644 (file)
@@ -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>
 # 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;
 
        /*
index 66a10e8293dcd91935859c11a02eafb92ee23216..fff00bff11df9e56d66907d9726fbc4feb70385d 100644 (file)
@@ -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>
 
 #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>
index 4993ddaf0d15f869b18c1e98ddcc1203a13f6be1..991d876fa409a328afe2353a7cbf58c22220c9ef 100644 (file)
@@ -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>
 #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>
 
index b5f2d40f09ebc910510b4212fb767061994f655a..7eaff89c8b4bc81ffd74e42f71ad6992da63d993 100644 (file)
@@ -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>
 # 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;
index df543c40da9125930b8a8959f55ca88124c1c059..280db644cd1b77a7b4ac07a5450df6bcd09a40e8 100644 (file)
@@ -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
index a400762a12efba6dc1eeaa85cd60eac0f64d7274..1e20bef190cc764ade015deffbe355cf674709c8 100644 (file)
@@ -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>
 # 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
index 2e04dce3956e30a9e0fdd623c453b5780a8cc745..2f798565f7f6327bd2b12b13138a5c5b9b89a1d1 100644 (file)
@@ -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>
 # 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>
 
index 6c9b4bb4618912d743d5ea7cc61cdaabe027f3a2..c373012065a7779b302222937ad59aff1ce13f5d 100644 (file)
@@ -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>
 #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>
index 32d8ce4ed429981320596f2bade60af576b0afde..e695bddc25ab357f82f367e5586abd829b46cf7f 100644 (file)
@@ -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>
 # 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;
 
index 45f483f507c5de8783dd7f8d13b59a043a0d3ce2..00af379193ad85f214d31dd34111495bd489bd0c 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index e27a5b72aab4cdb158189b4e35be89b1e3176a0c..a53418522a2d059fd611c729c10467623d095fb9 100644 (file)
@@ -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>
  *
 #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:      
index 80224041f0864bd20ac6bc5582c85a07f907b60d..cb598b02dd88d63e7a06cb33dc4da19f856f617c 100644 (file)
@@ -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>
 # 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);
index bd22cd5a8dadf44f88411c642b40bf86d0f640a5..992bd27bd9d51570fd52895a220a589d31efd1f8 100644 (file)
@@ -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>
 # 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++;
index c0295d1f932697f74bbcc5c2cf86e975929539b6..df41bb6ae7bbcca72428a4dc40f1694a9555135d 100644 (file)
@@ -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
index e57c131b60db73af9ad07d3ff3710dd093a5fd49..1b500dca04fdc95bc3601eda2e449a42231bf01c 100644 (file)
@@ -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>
 # 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;
index 5c555c05f8d9ccf793359099e35cc5b685e63aba..45e8811595730157090ea094d1677d05f3aa0add 100644 (file)
@@ -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>
  
 #include "config.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 
index 0c0fd08403f953dc72b6175415c6e13094f842d1..76b524d5d43eb9bbe54a843c0b7aeff4a9ffedaf 100644 (file)
@@ -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>
 # 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"
index 518bf73276289cac00efdcf92d70fcc6a0489d20..bed94a3f22cdfc65980ed435ed03de2a7550a7fc 100644 (file)
@@ -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>
 # 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>
index d8f73b27fc11e1efecf2c9073a96b297e95342b6..8527b2b2934c38d6865806665c9154aadee58768 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <string.h>
index 5f926ed7f3a152683c648098d2b84338ab5f3630..66d76b7398e56bdf2351157bf8d9f36ab4a30e43 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <time.h>
 #include <glib.h>
index 87948d07e59e1a190ef68418630fecb2553ab980..45c89d1365ef76f61595db96d44e6af68ebaa809 100644 (file)
@@ -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>
 #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
index e9d6e9b8cb59bb14780a13c3b00cc93f7d0710bf..7aa6f850aab46a4ade2d987d853f0ced89705beb 100644 (file)
@@ -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>
 #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
index 5546e844839815e1217fb7b091f506a1b227a479..c65cd5f6f0d071f3155b46ac63d241727cd838e8 100644 (file)
@@ -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>
 #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
index 7890fadb2b3a3f098897cfd847eef8fa8f59cf7a..f4503eaba3eecc408683ad2127471a0d6eeae3c8 100644 (file)
@@ -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>
 #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 = '.';
index 65430ef4ed84b98880006a1969cfbd69110dca6e..f2171016dc3ff379a57a751524580527449034c5 100644 (file)
@@ -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>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <glib.h>
 #include <stdlib.h>
index 83965faebc54ffa83ec19da1275b760f86005f17..9b21daa59fbba5fefb4de51827609533f98026fa 100644 (file)
@@ -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 = '.';
index 73c122bb401c569725b0d6e8455c09e2de89e45a..dd405ac7dca0f2de8e612b801b5d50c64530a41b 100644 (file)
@@ -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>
 
 #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>
index c80859f4647b991b4314dd72edb0e6278d390962..9feecfa1a84d57ee7e84498b11b800c31d5ddf87 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-ypbind.h"
index d3826953e1181edb2c9be97f9b80cd042e74fe33..064d5b1f97fa703f483835a811171bd14cc696a6 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-yppasswd.h"
index 34b6cd52bda82160f5104e0986bc6509c799fd60..a3b0261c13993d0c4c52e7ab119f702cdebc6a4d 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-ypserv.h"
index 13f7f01ba896888b5ff0289fe5542023021811a9..e0af251f864f20dd1e77e4a1a1cd5d5f4de9717e 100644 (file)
@@ -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>
 #endif
 
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 
 #include "packet-rpc.h"
 #include "packet-ypxfr.h"
index b47cfbe3ca9c426198b5c494b613213e23c12846..c53d76936530983ab29f465d624b53833fd5202b 100644 (file)
@@ -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>
 #include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <ctype.h>
 
index 2fad29f087930be7157d06bd715358c7296a32c9..d2a04cf3a5f49df57b32a9b44eb15baa1bd5c0e6 100644 (file)
@@ -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>
 #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 78b594518f204d2513018f9c5fc99d3d10d8281d..8d2eadd56357922236ae024bac895bc8ab3b2732 100644 (file)
--- 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>
 # 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 89e6ff07801397edfdf4dc5b889c27803f814160..d6880d2a0090ee640a73d6f5c7a24d51cc6f3922 100644 (file)
--- 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>
  *
 #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'};
 
index d9740bf47a70f4d9a77833bc7653e922f4120c91..bfc34ee914d77040e9ddaee6dc976a33e91133e3 100644 (file)
@@ -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>
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
index 1b1f7fb08712068a3589cc60df8cd01141525042..bea1a4f75f914940fbedab5655adeaec5992e5c9 100644 (file)
@@ -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__
 #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);
 
index df53d4dfe5d1482359d76ce8cb33fd9868a6d5e4..4eabb41f10b1c5ec0eafe1dde4b73ad510ecf874 100644 (file)
@@ -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>
 
 #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;
index 23ca641004a2f092bfc5270859ba881a9c9cdea7..5c2fafe809b472f0d1a0066bdf54436ec64c9d32 100644 (file)
@@ -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>
 #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 07a454f243e5da910e43c261aedcc5c8c01b9696..6e6015a7017f74e79d1ea51eb7c5c2c6822e6558 100644 (file)
--- 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>
 #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 46152833b6ffe0e3148f9529df48bd8c7930b820..00383ad05ac5398bcd4d8b60dd3b0196905f28d5 100644 (file)
--- 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>
 # 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 8d17ce4d0fc073db56a4a1c44b21e78d53bcccf2..33b16f861a8dc09f1740780dbb29c736adc2b539 100644 (file)
--- 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,