diff options
author | Jörg Mayer <jmayer@loplof.de> | 2002-08-02 23:36:07 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2002-08-02 23:36:07 +0000 |
commit | 173fe5aef4167b9ad35fe514d05ef25fb66c076f (patch) | |
tree | 21967e4c27ac5e02aa39319022dd2858682fc5f4 /packet-udp.c | |
parent | ff72b97ee01caee4dff97d07195d802086c65f38 (diff) | |
download | wireshark-173fe5aef4167b9ad35fe514d05ef25fb66c076f.tar.gz wireshark-173fe5aef4167b9ad35fe514d05ef25fb66c076f.tar.bz2 wireshark-173fe5aef4167b9ad35fe514d05ef25fb66c076f.zip |
Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.
svn path=/trunk/; revision=5932
Diffstat (limited to 'packet-udp.c')
-rw-r--r-- | packet-udp.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/packet-udp.c b/packet-udp.c index 32d8ce4ed4..e695bddc25 100644 --- a/packet-udp.c +++ b/packet-udp.c @@ -1,7 +1,7 @@ /* packet-udp.c * Routines for UDP packet disassembly * - * $Id: packet-udp.c,v 1.103 2002/06/08 21:54:51 guy Exp $ + * $Id: packet-udp.c,v 1.104 2002/08/02 23:36:04 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -29,14 +29,6 @@ # include "config.h" #endif -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif - -#ifdef HAVE_NETINET_IN_H -# include <netinet/in.h> -#endif - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -158,10 +150,10 @@ dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Avoids alignment problems on many architectures. */ tvb_memcpy(tvb, (guint8 *)&uh, offset, sizeof(e_udphdr)); - uh_sport = ntohs(uh.uh_sport); - uh_dport = ntohs(uh.uh_dport); - uh_ulen = ntohs(uh.uh_ulen); - uh_sum = ntohs(uh.uh_sum); + uh_sport = g_ntohs(uh.uh_sport); + uh_dport = g_ntohs(uh.uh_dport); + uh_ulen = g_ntohs(uh.uh_ulen); + uh_sum = g_ntohs(uh.uh_sum); if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Source port: %s Destination port: %s", @@ -207,13 +199,13 @@ dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (pinfo->src.type) { case AT_IPv4: - phdr[0] = htonl((IP_PROTO_UDP<<16) + reported_len); + phdr[0] = g_htonl((IP_PROTO_UDP<<16) + reported_len); cksum_vec[2].len = 4; break; case AT_IPv6: - phdr[0] = htonl(reported_len); - phdr[1] = htonl(IP_PROTO_UDP); + phdr[0] = g_htonl(reported_len); + phdr[1] = g_htonl(IP_PROTO_UDP); cksum_vec[2].len = 8; break; |