aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/column-utils.c6
-rw-r--r--epan/conversation.c10
-rw-r--r--epan/filesystem.c6
-rw-r--r--epan/frame_data.c6
-rw-r--r--epan/ftypes/ftypes.h6
-rw-r--r--epan/inet_aton.c20
-rw-r--r--epan/inet_ntop.c22
-rw-r--r--epan/inet_pton.c34
-rw-r--r--epan/ipv4.c16
-rw-r--r--epan/osi-utils.c6
-rw-r--r--epan/packet.c24
-rw-r--r--epan/packet.h6
-rw-r--r--epan/pint.h4
-rw-r--r--epan/plugins.c6
-rw-r--r--epan/proto.c6
-rw-r--r--epan/proto.h6
-rw-r--r--epan/resolv.c10
-rw-r--r--epan/strutil.c20
-rw-r--r--epan/strutil.h20
-rw-r--r--epan/to_str.c16
-rw-r--r--epan/to_str.h10
-rw-r--r--epan/tvbuff.c4
22 files changed, 70 insertions, 194 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c
index 3674e616fb..acdd153528 100644
--- a/epan/column-utils.c
+++ b/epan/column-utils.c
@@ -1,7 +1,7 @@
/* column-utils.c
* Routines for column utilities.
*
- * $Id: column-utils.c,v 1.16 2002/06/29 21:27:39 guy Exp $
+ * $Id: column-utils.c,v 1.17 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,10 +29,6 @@
#include <string.h>
#include <time.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/epan/conversation.c b/epan/conversation.c
index b0a6c3c96e..38ee4cb679 100644
--- a/epan/conversation.c
+++ b/epan/conversation.c
@@ -1,7 +1,7 @@
/* conversation.c
* Routines for building lists of packets that are part of a "conversation"
*
- * $Id: conversation.c,v 1.18 2002/05/09 12:10:06 sahlberg Exp $
+ * $Id: conversation.c,v 1.19 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,14 +28,6 @@
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <string.h>
#include <glib.h>
#include "packet.h"
diff --git a/epan/filesystem.c b/epan/filesystem.c
index ffb487445e..e46a488d85 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -1,7 +1,7 @@
/* filesystem.c
* Filesystem utility routines
*
- * $Id: filesystem.c,v 1.18 2002/06/23 21:33:09 guy Exp $
+ * $Id: filesystem.c,v 1.19 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,10 +37,6 @@
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
diff --git a/epan/frame_data.c b/epan/frame_data.c
index c2602a5b47..8399b78835 100644
--- a/epan/frame_data.c
+++ b/epan/frame_data.c
@@ -1,7 +1,7 @@
/* frame_data.c
* Routines for packet disassembly
*
- * $Id: frame_data.c,v 1.1 2001/04/01 04:11:50 hagbard Exp $
+ * $Id: frame_data.c,v 1.2 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -27,10 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include "frame_data.h"
#include "packet.h"
diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h
index 5589147fb9..28660ea6df 100644
--- a/epan/ftypes/ftypes.h
+++ b/epan/ftypes/ftypes.h
@@ -1,7 +1,7 @@
/* ftypes.h
* Definitions for field types
*
- * $Id: ftypes.h,v 1.11 2002/06/23 10:32:35 guy Exp $
+ * $Id: ftypes.h,v 1.12 2002/08/02 21:29:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -113,10 +113,6 @@ ftype_can_le(enum ftenum ftype);
#include <epan/ipv4.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <epan/tvbuff.h>
#include <epan/nstime.h>
#include <epan/dfilter/drange.h>
diff --git a/epan/inet_aton.c b/epan/inet_aton.c
index f101d10cd1..e2b66d3fe6 100644
--- a/epan/inet_aton.c
+++ b/epan/inet_aton.c
@@ -43,14 +43,6 @@ static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
#include <sys/param.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -71,12 +63,12 @@ inet_aton(cp_arg, addr)
const char *cp_arg;
struct in_addr *addr;
{
- register const u_char *cp = cp_arg;
- register u_long val;
+ register const guchar *cp = cp_arg;
+ register gulong val;
register int base, n;
- register u_char c;
- u_int parts[4];
- register u_int *pp = parts;
+ register guchar c;
+ guint parts[4];
+ register guint *pp = parts;
for (;;) {
/*
@@ -152,6 +144,6 @@ inet_aton(cp_arg, addr)
break;
}
if (addr)
- addr->s_addr = htonl(val);
+ addr->s_addr = g_htonl(val);
return (1);
}
diff --git a/epan/inet_ntop.c b/epan/inet_ntop.c
index e2cfa13595..7a540634bd 100644
--- a/epan/inet_ntop.c
+++ b/epan/inet_ntop.c
@@ -20,17 +20,13 @@
#endif
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: inet_ntop.c,v 1.3 2002/06/23 10:32:32 guy Exp $";
+static char rcsid[] = "$Id: inet_ntop.c,v 1.4 2002/08/02 21:29:39 jmayer Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -40,10 +36,6 @@ static char rcsid[] = "$Id: inet_ntop.c,v 1.3 2002/06/23 10:32:32 guy Exp $";
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -77,8 +69,8 @@ static char rcsid[] = "$Id: inet_ntop.c,v 1.3 2002/06/23 10:32:32 guy Exp $";
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
*/
-static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size));
-static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size));
+static const char *inet_ntop4 __P((const guchar *src, char *dst, size_t size));
+static const char *inet_ntop6 __P((const guchar *src, char *dst, size_t size));
/* char *
* inet_ntop(af, src, dst, size)
@@ -114,13 +106,13 @@ inet_ntop(af, src, dst, size)
* `dst' (as a const)
* notes:
* (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
+ * (2) takes a guchar* not an in_addr as input
* author:
* Paul Vixie, 1996.
*/
static const char *
inet_ntop4(src, dst, size)
- const u_char *src;
+ const guchar *src;
char *dst;
size_t size;
{
@@ -147,7 +139,7 @@ inet_ntop4(src, dst, size)
*/
static const char *
inet_ntop6(src, dst, size)
- const u_char *src;
+ const guchar *src;
char *dst;
size_t size;
{
@@ -160,7 +152,7 @@ inet_ntop6(src, dst, size)
*/
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
struct { int base, len; } best, cur;
- u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
+ guint words[NS_IN6ADDRSZ / NS_INT16SZ];
int i;
/*
diff --git a/epan/inet_pton.c b/epan/inet_pton.c
index 07d7c1af7c..47df162d96 100644
--- a/epan/inet_pton.c
+++ b/epan/inet_pton.c
@@ -20,17 +20,13 @@
#endif
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: inet_pton.c,v 1.2 2002/06/23 10:32:32 guy Exp $";
+static char rcsid[] = "$Id: inet_pton.c,v 1.3 2002/08/02 21:29:39 jmayer Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define EAFNOSUPPORT WSAEAFNOSUPPORT
@@ -40,10 +36,6 @@ static char rcsid[] = "$Id: inet_pton.c,v 1.2 2002/06/23 10:32:32 guy Exp $";
#include <sys/socket.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -73,10 +65,10 @@ static char rcsid[] = "$Id: inet_pton.c,v 1.2 2002/06/23 10:32:32 guy Exp $";
*/
#ifdef AF_INET
-static int inet_pton4 __P((const char *src, u_char *dst));
+static int inet_pton4 __P((const char *src, guchar *dst));
#endif
#ifdef AF_INET6
-static int inet_pton6 __P((const char *src, u_char *dst));
+static int inet_pton6 __P((const char *src, guchar *dst));
#endif
/* int
@@ -126,11 +118,11 @@ inet_pton(af, src, dst)
static int
inet_pton4(src, dst)
const char *src;
- u_char *dst;
+ guchar *dst;
{
static const char digits[] = "0123456789";
int saw_digit, octets, ch;
- u_char tmp[NS_INADDRSZ], *tp;
+ guchar tmp[NS_INADDRSZ], *tp;
saw_digit = 0;
octets = 0;
@@ -139,7 +131,7 @@ inet_pton4(src, dst)
const char *pch;
if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
+ guint new = *tp * 10 + (pch - digits);
if (new > 255)
return (0);
@@ -181,14 +173,14 @@ inet_pton4(src, dst)
static int
inet_pton6(src, dst)
const char *src;
- u_char *dst;
+ guchar *dst;
{
static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
+ guchar tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
int ch, saw_xdigit;
- u_int val;
+ guint val;
memset((tp = tmp), '\0', NS_IN6ADDRSZ);
endp = tp + NS_IN6ADDRSZ;
@@ -225,8 +217,8 @@ inet_pton6(src, dst)
}
if (tp + NS_INT16SZ > endp)
return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
+ *tp++ = (guchar) (val >> 8) & 0xff;
+ *tp++ = (guchar) val & 0xff;
saw_xdigit = 0;
val = 0;
continue;
@@ -242,8 +234,8 @@ inet_pton6(src, dst)
if (saw_xdigit) {
if (tp + NS_INT16SZ > endp)
return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
+ *tp++ = (guchar) (val >> 8) & 0xff;
+ *tp++ = (guchar) val & 0xff;
}
if (colonp != NULL) {
/*
diff --git a/epan/ipv4.c b/epan/ipv4.c
index 3dacb8598b..afb3b4e87d 100644
--- a/epan/ipv4.c
+++ b/epan/ipv4.c
@@ -5,7 +5,7 @@
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: ipv4.c,v 1.2 2001/11/13 23:55:37 gram Exp $
+ * $Id: ipv4.c,v 1.3 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -34,14 +34,6 @@
#include <glib.h>
#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include "ipv4.h"
#include "packet.h" /* for ip_to_str */
@@ -72,7 +64,7 @@ ipv4_addr_set_host_order_addr(ipv4_addr *ipv4, guint32 new_addr)
void
ipv4_addr_set_net_order_addr(ipv4_addr *ipv4, guint32 new_addr)
{
- ipv4->addr = ntohl(new_addr);
+ ipv4->addr = g_ntohl(new_addr);
}
void
@@ -85,7 +77,7 @@ ipv4_addr_set_netmask_bits(ipv4_addr *ipv4, guint new_nmask_bits)
guint32
ipv4_get_net_order_addr(ipv4_addr *ipv4)
{
- return htonl(ipv4->addr);
+ return g_htonl(ipv4->addr);
}
guint32
@@ -97,7 +89,7 @@ ipv4_get_host_order_addr(ipv4_addr *ipv4)
gchar*
ipv4_addr_str(ipv4_addr *ipv4)
{
- guint32 ipv4_host_order = htonl(ipv4->addr);
+ guint32 ipv4_host_order = g_htonl(ipv4->addr);
return ip_to_str((gchar*)&ipv4_host_order);
}
diff --git a/epan/osi-utils.c b/epan/osi-utils.c
index 6606e4e64e..f1ac5dc276 100644
--- a/epan/osi-utils.c
+++ b/epan/osi-utils.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: osi-utils.c,v 1.6 2002/07/17 00:42:51 guy Exp $
+ * $Id: osi-utils.c,v 1.7 2002/08/02 21:29:39 jmayer Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -31,10 +31,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <glib.h>
diff --git a/epan/packet.c b/epan/packet.c
index 5a4177fbd2..494a89cc48 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.74 2002/07/17 00:42:51 guy Exp $
+ * $Id: packet.c,v 1.75 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,18 +26,6 @@
# 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_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
#include <glib.h>
#include <stdio.h>
@@ -51,14 +39,6 @@
#include <ctype.h>
#include <time.h>
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
#ifdef NEED_INET_V6DEFS_H
# include "inet_v6defs.h"
#endif
@@ -263,7 +243,7 @@ final_registration_all_protocols(void)
/* Creates the top-most tvbuff and calls dissect_frame() */
void
dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
- const u_char *pd, frame_data *fd, column_info *cinfo)
+ const guchar *pd, frame_data *fd, column_info *cinfo)
{
int i;
diff --git a/epan/packet.h b/epan/packet.h
index fe8f749854..99c8339e0f 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet.h,v 1.57 2002/06/04 07:03:54 guy Exp $
+ * $Id: packet.h,v 1.58 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -278,11 +278,11 @@ extern void free_data_sources(packet_info *pinfo);
* Dissectors should never modify the packet data.
*/
extern void dissect_packet(epan_dissect_t *edt,
- union wtap_pseudo_header *pseudo_header, const u_char *pd,
+ union wtap_pseudo_header *pseudo_header, const guchar *pd,
frame_data *fd, column_info *cinfo);
/* These functions are in packet-ethertype.c */
-extern void capture_ethertype(guint16 etype, const u_char *pd, int offset,
+extern void capture_ethertype(guint16 etype, const guchar *pd, int offset,
int len, packet_counts *ld);
extern void ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_ethertype,
packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree,
diff --git a/epan/pint.h b/epan/pint.h
index 2eaef53153..e73df6d310 100644
--- a/epan/pint.h
+++ b/epan/pint.h
@@ -2,7 +2,7 @@
* Definitions for extracting and translating integers safely and portably
* via pointers.
*
- * $Id: pint.h,v 1.4 2001/10/29 21:56:48 guy Exp $
+ * $Id: pint.h,v 1.5 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -29,7 +29,7 @@
#include <glib.h>
-/* Pointer versions of ntohs and ntohl. Given a pointer to a member of a
+/* Pointer versions of g_ntohs and g_ntohl. Given a pointer to a member of a
* byte array, returns the value of the two or four bytes at the pointer.
* The pletoh[sl] versions return the little-endian representation.
*/
diff --git a/epan/plugins.c b/epan/plugins.c
index 0231b2b0ab..849881bb87 100644
--- a/epan/plugins.c
+++ b/epan/plugins.c
@@ -1,7 +1,7 @@
/* plugins.c
* plugin routines
*
- * $Id: plugins.c,v 1.56 2002/07/16 22:50:48 guy Exp $
+ * $Id: plugins.c,v 1.57 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,10 +52,6 @@
#include <sys/stat.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/epan/proto.c b/epan/proto.c
index b337db2ec5..2d74e8fc46 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.70 2002/06/19 19:21:15 guy Exp $
+ * $Id: proto.c,v 1.71 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,10 +26,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <glib.h>
diff --git a/epan/proto.h b/epan/proto.h
index fe34faf64e..0a70b9d363 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.33 2002/06/23 10:32:32 guy Exp $
+ * $Id: proto.h,v 1.34 2002/08/02 21:29:39 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,10 +31,6 @@
# include <varargs.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-
#include <glib.h>
#include "ipv4.h"
diff --git a/epan/resolv.c b/epan/resolv.c
index 9d51666cc5..7c8128918d 100644
--- a/epan/resolv.c
+++ b/epan/resolv.c
@@ -1,7 +1,7 @@
/* resolv.c
* Routines for network object lookup
*
- * $Id: resolv.c,v 1.23 2002/03/03 21:42:54 guy Exp $
+ * $Id: resolv.c,v 1.24 2002/08/02 21:29:40 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@@ -42,10 +42,6 @@
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
@@ -234,7 +230,7 @@ static guchar *serv_name_lookup(guint port, port_type proto)
tp->next = NULL;
if (!(g_resolv_flags & RESOLV_TRANSPORT) ||
- (servp = getservbyport(htons(port), serv_proto)) == NULL) {
+ (servp = getservbyport(g_htons(port), serv_proto)) == NULL) {
/* unknown port */
sprintf(tp->name, "%d", port);
} else {
@@ -1407,7 +1403,7 @@ gboolean get_host_ipaddr(const char *host, guint32 *addrp)
return FALSE;
}
- *addrp = ntohl(ipaddr.s_addr);
+ *addrp = g_ntohl(ipaddr.s_addr);
return TRUE;
}
diff --git a/epan/strutil.c b/epan/strutil.c
index 9886240ff4..b5fe3d6bcd 100644
--- a/epan/strutil.c
+++ b/epan/strutil.c
@@ -1,7 +1,7 @@
/* strutil.c
* String utility routines
*
- * $Id: strutil.c,v 1.7 2000/12/22 12:05:36 gram Exp $
+ * $Id: strutil.c,v 1.8 2002/08/02 21:29:40 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -40,10 +40,10 @@
* buffer.
* Return a pointer to the EOL character(s) in "*eol".
*/
-const u_char *
-find_line_end(const u_char *data, const u_char *dataend, const u_char **eol)
+const guchar *
+find_line_end(const guchar *data, const guchar *dataend, const guchar **eol)
{
- const u_char *lineend;
+ const guchar *lineend;
lineend = memchr(data, '\n', dataend - data);
if (lineend == NULL) {
@@ -105,10 +105,10 @@ find_line_end(const u_char *data, const u_char *dataend, const u_char **eol)
* Return 0 if there is no next token.
*/
int
-get_token_len(const u_char *linep, const u_char *lineend,
- const u_char **next_token)
+get_token_len(const guchar *linep, const guchar *lineend,
+ const guchar **next_token)
{
- const u_char *tokenp;
+ const guchar *tokenp;
int token_len;
tokenp = linep;
@@ -139,13 +139,13 @@ get_token_len(const u_char *linep, const u_char *lineend,
* characters as C-style escapes, and return a pointer to it.
*/
gchar *
-format_text(const u_char *string, int len)
+format_text(const guchar *string, int len)
{
static gchar *fmtbuf;
static int fmtbuf_len;
int column;
- const u_char *stringend = string + len;
- u_char c;
+ const guchar *stringend = string + len;
+ guchar c;
int i;
/*
diff --git a/epan/strutil.h b/epan/strutil.h
index f334cb7dd4..2201c9d6a4 100644
--- a/epan/strutil.h
+++ b/epan/strutil.h
@@ -1,7 +1,7 @@
/* strutil.h
* String utility definitions
*
- * $Id: strutil.h,v 1.7 2002/06/23 10:32:32 guy Exp $
+ * $Id: strutil.h,v 1.8 2002/08/02 21:29:40 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,19 +27,11 @@
/* ... thus, config.h needs to be #included */
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h> /* for u_char */
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h> /* for u_char */
-#endif
-
-const u_char *find_line_end(const u_char *data, const u_char *dataend,
- const u_char **eol);
-int get_token_len(const u_char *linep, const u_char *lineend,
- const u_char **next_token);
-gchar* format_text(const u_char *line, int len);
+const guchar *find_line_end(const guchar *data, const guchar *dataend,
+ const guchar **eol);
+int get_token_len(const guchar *linep, const guchar *lineend,
+ const guchar **next_token);
+gchar* format_text(const guchar *line, int len);
gchar* bytes_to_str(const guint8 *, int);
gchar* bytes_to_str_punct(const guint8 *, int, gchar punct);
#endif /* __STRUTIL_H__ */
diff --git a/epan/to_str.c b/epan/to_str.c
index 6ea8d125b0..1e0cc363e4 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -1,7 +1,7 @@
/* to_str.c
* Routines for utilities to convert various other types to strings.
*
- * $Id: to_str.c,v 1.14 2002/06/23 10:32:32 guy Exp $
+ * $Id: to_str.c,v 1.15 2002/08/02 21:29:40 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,22 +29,10 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h> /* for "u_char" */
-#endif
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -169,7 +157,7 @@ ip6_to_str(struct e_in6_addr *ad) {
#endif
static gchar buf[INET6_ADDRSTRLEN];
- inet_ntop(AF_INET6, (u_char*)ad, (gchar*)buf, sizeof(buf));
+ inet_ntop(AF_INET6, (guchar*)ad, (gchar*)buf, sizeof(buf));
return buf;
}
diff --git a/epan/to_str.h b/epan/to_str.h
index a954700205..ce7e516822 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -1,7 +1,7 @@
/* to_str.h
* Definitions for utilities to convert various other types to strings.
*
- * $Id: to_str.h,v 1.6 2002/05/05 00:16:34 guy Exp $
+ * $Id: to_str.h,v 1.7 2002/08/02 21:29:40 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,14 +27,6 @@
#include <glib.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include "nstime.h"
/*
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 8fe482fab6..9f75d7510b 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.c,v 1.38 2002/07/17 06:55:24 guy Exp $
+ * $Id: tvbuff.c,v 1.39 2002/08/02 21:29:40 jmayer Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -1893,7 +1893,7 @@ tvb_find_line_end_unquoted(tvbuff_t *tvb, gint offset, int len,
{
gint cur_offset, char_offset;
gboolean is_quoted;
- u_char c;
+ guchar c;
gint eob_offset;
int linelen;