aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcoib.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-12-21 16:16:56 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-12-21 16:16:56 +0000
commit3d6fdc55d06aba5a8a73c7d77792963a941ad58a (patch)
tree87c3615c3e63ce2fbf46709ffb1cb96f79c4b6a1 /epan/dissectors/packet-fcoib.c
parentaa4b08e2ca2785e22e8e49271b7513a28275bbe1 (diff)
New functions: str_to_ip6(), str_to_ip()
This way we can avoid including lot of system header files in some dissectors and it might fix bug #9581 svn path=/trunk/; revision=54330
Diffstat (limited to 'epan/dissectors/packet-fcoib.c')
-rw-r--r--epan/dissectors/packet-fcoib.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/epan/dissectors/packet-fcoib.c b/epan/dissectors/packet-fcoib.c
index 7de20ea565..b832852bb8 100644
--- a/epan/dissectors/packet-fcoib.c
+++ b/epan/dissectors/packet-fcoib.c
@@ -39,19 +39,6 @@
#include "packet-infiniband.h"
#include "packet-fc.h"
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h> /* needed to define AF_ values on UNIX */
-#endif
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h> /* needed to define AF_ values on Windows */
-#endif
-#ifdef NEED_INET_V6DEFS_H
-# include "wsutil/inet_v6defs.h"
-#endif
-
void proto_register_fcoib(void);
void proto_reg_handoff_fcoib(void);
@@ -454,7 +441,7 @@ proto_reg_handoff_fcoib(void)
SET_ADDRESS(&manual_addr[i], AT_IB, sizeof(guint16), manual_addr_data[i]);
}
} else { /* GID */
- if (inet_pton(AF_INET6, gPREF_ID[i], manual_addr_data[i]) <= 0) {
+ if (!str_to_ip6( gPREF_ID[i], manual_addr_data[i])) {
error_occured = TRUE;
} else {
SET_ADDRESS(&manual_addr[i], AT_IB, GID_SIZE, manual_addr_data[i]);