aboutsummaryrefslogtreecommitdiffstats
path: root/epan/resolv.c
diff options
context:
space:
mode:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2002-08-02 21:29:45 +0000
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2002-08-02 21:29:45 +0000
commitbbfe7a43adac77429ac8d72873ef3181f9b51514 (patch)
tree8ffc7d7c256c3f3e72a0be7cc31aa2a69cdaed81 /epan/resolv.c
parentd84a55c64e962e94abaa7808887842093baba2ad (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/resolv.c')
-rw-r--r--epan/resolv.c10
1 files changed, 3 insertions, 7 deletions
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;
}