diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-02 21:29:45 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-02 21:29:45 +0000 |
commit | bbfe7a43adac77429ac8d72873ef3181f9b51514 (patch) | |
tree | 8ffc7d7c256c3f3e72a0be7cc31aa2a69cdaed81 /epan/ipv4.c | |
parent | d84a55c64e962e94abaa7808887842093baba2ad (diff) |
Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c
and inet_ntop.c for now (can't estimate the consequences).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5928 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/ipv4.c')
-rw-r--r-- | epan/ipv4.c | 16 |
1 files changed, 4 insertions, 12 deletions
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); } |